*{
box-sizing:border-box;
margin:0;
padding:0;
font-family:Tahoma;
}

body{
min-height:100vh;
background:linear-gradient(135deg,#eef4fb,#dfe9f7);
padding:20px;
color:#1455a0;
}

.container{
width:100%;
max-width:1450px;
margin:auto;
background:#fff;
border-radius:25px;
padding:28px;
box-shadow:0 15px 40px rgba(0,0,0,0.1);
}

h1{
margin-bottom:25px;
font-size:28px;
text-align:right;
color:#1455a0;
font-weight:800;
}

.filters-form{
margin-bottom:20px;
border:2px solid #111;
border-radius:18px;
padding:18px;
}

.filters-grid{
display:grid;
grid-template-columns:repeat(2, minmax(0, 1fr));
gap:14px 16px;
margin-bottom:16px;
}

.filter-field{
display:flex;
flex-direction:column;
text-align:right;
min-width:0;
}

.filter-field label{
margin-bottom:8px;
font-size:15px;
font-weight:800;
color:#1455a0;
}

.filter-field input,
.filter-field select,
.table-bottom-controls select{
width:100%;
height:48px;
border-radius:12px;
border:1px solid #cfd8e6;
padding:0 14px;
font-size:15px;
font-weight:700;
color:#1455a0;
background:#fff;
outline:none;
}

.filter-field input:focus,
.filter-field select:focus,
.table-bottom-controls select:focus{
border-color:#1455a0;
box-shadow:0 0 0 3px rgba(20,85,160,0.15);
}

.filter-field input[type="date"]{
display:block;
max-width:100%;
min-width:0;
line-height:48px;
-webkit-appearance:none;
appearance:none;
}

.actions-bar{
display:grid;
grid-template-columns:1fr;
gap:12px;
}

.btn{
width:100%;
min-height:48px;
padding:0 20px;
border:none;
border-radius:12px;
font-size:15px;
cursor:pointer;
font-weight:bold;
text-decoration:none;
display:inline-flex;
align-items:center;
justify-content:center;
transition:.2s ease;
}

.search,
.reset{
background:#facc15;
color:#713f12;
}

.back{
background:#d8e0ea;
color:#1455a0;
}

.print{
background:#1455a0;
color:#fff;
}

.edit{
width:auto;
height:36px;
min-height:36px;
min-width:70px;
padding:0 12px;
border-radius:9px;
background:#2563eb;
color:#fff;
font-size:14px;
}

.btn:hover{
opacity:.9;
}

.table-wrap{
width:100%;
overflow-x:auto;
border-radius:16px;
border:1px solid #d6dde8;
}

table{
width:max-content;
min-width:100%;
border-collapse:collapse;
table-layout:auto;
}

.col-id{width:7ch;}
.col-date{width:12ch;}
.col-company{width:30ch;}
.col-entity{width:22ch;}
.col-payment{width:8ch;}
.col-account,
.col-sender,
.col-beneficiary{width:30ch;}
.col-currency{width:8ch;}
.col-money{width:15ch;}
.col-commission{width:12ch;}
.col-status{width:12ch;}
.col-notes{width:22ch;}
.col-action{width:10ch;}

th,
td{
border:1px solid #d6dde8;
padding:12px;
text-align:center;
font-size:15px;
white-space:nowrap;
}

th{
background:#edf3fb;
color:#1455a0;
font-weight:800;
position:sticky;
top:0;
z-index:1;
}

td{
color:#111;
font-weight:600;
background:#fff;
}

tr:nth-child(even){
background:#fff;
}

.row-sent{
background:#eef6ff !important;
}

.row-not-sent{
background:#fff !important;
}

.row-sent td{
background:#eef6ff !important;
color:#111;
}

.row-not-sent td{
background:#fff !important;
color:#111;
}

.status{
display:inline-flex;
align-items:center;
justify-content:center;
min-width:85px;
height:30px;
border-radius:999px;
font-size:13px;
font-weight:800;
border:1px solid transparent;
}

.status.sent{
background:#1455a0;
color:#fff;
box-shadow:0 0 0 3px rgba(20,85,160,0.12);
}

.status.not-sent{
background:#fff8d6;
color:#713f12;
border-color:#facc15;
}

td[colspan]{
padding:25px;
font-size:17px;
color:#777;
background:#fafafa;
}

.totals-box{
margin-top:16px;
display:grid;
grid-template-columns:1fr 2fr 2fr;
gap:14px;
border:1px solid #111;
border-radius:18px;
padding:16px;
background:#fff;
}

.totals-section{
border:1px solid #d6dde8;
border-radius:14px;
padding:14px;
background:#f8fbff;
text-align:right;
}

.totals-section h3{
margin-bottom:12px;
font-size:18px;
font-weight:900;
color:#1455a0;
}

.totals-section h4{
margin-bottom:8px;
font-size:15px;
font-weight:900;
color:#5b6f8e;
}

.commission-grid{
display:grid;
grid-template-columns:1fr 1fr;
gap:10px;
}

.total-line{
display:flex;
align-items:center;
justify-content:space-between;
gap:12px;
min-height:34px;
padding:7px 0;
border-top:1px solid #e5edf7;
}

.total-line span{
font-size:13px;
font-weight:800;
color:#5b6f8e;
}

.total-line strong{
direction:ltr;
text-align:left;
font-size:17px;
font-weight:900;
color:#1455a0;
}

.total-line.negative strong{
color:#991b1b;
}

.table-bottom-controls{
margin-top:16px;
display:flex;
align-items:center;
gap:10px;
max-width:260px;
margin-right:auto;
}

.table-bottom-controls label{
font-weight:800;
color:#1455a0;
white-space:nowrap;
}

.pagination-wrap{
margin-top:18px;
display:flex;
align-items:center;
justify-content:space-between;
gap:12px;
flex-wrap:wrap;
}

.pagination-info{
font-weight:700;
color:#1455a0;
}

.pagination{
display:flex;
gap:8px;
flex-wrap:wrap;
}

.page-btn{
height:38px;
min-width:42px;
padding:0 12px;
border-radius:9px;
background:#edf3fb;
color:#1455a0;
border:1px solid #cfd8e6;
text-decoration:none;
display:inline-flex;
align-items:center;
justify-content:center;
font-weight:700;
}

.page-btn:hover{
background:#dceafe;
}

.page-btn.active{
background:#1455a0;
color:#fff;
border-color:#1455a0;
}

.select2-container{
width:100% !important;
}

.select2-container .select2-selection--single{
height:48px !important;
border-radius:12px !important;
border:1px solid #cfd8e6 !important;
background:#fff !important;
display:flex !important;
align-items:center !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered{
color:#1455a0 !important;
font-size:15px !important;
font-weight:700 !important;
line-height:48px !important;
padding-right:14px !important;
padding-left:35px !important;
width:100%;
}

.select2-container--default .select2-selection--single .select2-selection__arrow{
height:48px !important;
left:10px !important;
right:auto !important;
}

.select2-dropdown{
border:1px solid #cfd8e6 !important;
border-radius:12px !important;
overflow:hidden;
}

.select2-search__field{
height:40px !important;
font-size:15px !important;
border-radius:8px !important;
padding:8px !important;
}

@media(max-width:1100px){
.filters-grid{
grid-template-columns:1fr;
}

.filter-field input,
.filter-field select,
.table-bottom-controls select{
height:46px;
min-height:46px;
font-size:14px;
padding:0 12px;
}

.filter-field input[type="date"]{
height:46px;
line-height:46px;
padding:0 10px;
}

.totals-box{
grid-template-columns:1fr;
}

.commission-grid{
grid-template-columns:1fr;
}
}

@media(max-width:700px){
body{
padding:12px;
}

.container{
padding:20px;
border-radius:20px;
}

h1{
font-size:24px;
}

.filters-grid{
grid-template-columns:1fr;
}

.filters-form{
padding:14px;
border-radius:16px;
}

.filter-field input[type="date"]{
height:46px;
line-height:46px;
font-size:14px;
padding:0 8px;
}

.btn{
width:100%;
min-width:100%;
}

table{
min-width:1450px;
}

th,
td{
font-size:14px;
padding:10px;
}

.table-bottom-controls{
max-width:none;
margin-left:0;
flex-direction:column;
align-items:stretch;
}

.totals-box{
grid-template-columns:1fr;
}

.pagination-wrap{
align-items:stretch;
}

.pagination-info{
text-align:center;
}

.pagination{
justify-content:center;
}
}