*{box-sizing:border-box}
:root{
    --bg:#f4f6f8;
    --panel:#fff;
    --text:#172033;
    --muted:#758096;
    --border:#e4e8ee;
    --shadow:0 8px 28px rgba(23,32,51,.07);
}
html,body{min-height:100%}
body{
    margin:0;
    background:var(--bg);
    color:var(--text);
    font-family:Inter,Arial,sans-serif;
}
.app{max-width:1500px;margin:0 auto;padding:24px}
.topbar{
    display:flex;
    justify-content:space-between;
    gap:20px;
    align-items:center;
    margin-bottom:20px
}
h1{font-size:28px;margin:0 0 5px}
h2{font-size:18px;margin:0 0 4px}
.subtitle,.muted,.updated{color:var(--muted)}
.date{
    font-size:18px;
    font-weight:700;
    background:#fff;
    border:1px solid var(--border);
    padding:10px 14px;
    border-radius:12px
}
.filters{
    background:#fff;
    border:1px solid var(--border);
    border-radius:16px;
    padding:16px;
    display:flex;
    align-items:flex-end;
    gap:12px;
    margin-bottom:20px;
    box-shadow:var(--shadow)
}
.filters label{
    display:flex;
    flex-direction:column;
    gap:7px;
    min-width:360px
}
.filters label span{font-size:13px;color:var(--muted)}
select,button{
    min-height:42px;
    border-radius:10px;
    border:1px solid #d7dce4;
    padding:0 12px;
    background:#fff;
    font-size:14px
}
button{
    cursor:pointer;
    font-weight:700;
    padding:0 20px
}
button:hover{background:#f0f3f7}
button:disabled{opacity:.55;cursor:wait}
.updated{
    margin-left:auto;
    font-size:13px;
    padding-bottom:12px
}
.cards{
    display:grid;
    grid-template-columns:repeat(6,minmax(0,1fr));
    gap:14px;
    margin-bottom:18px
}
.card,.panel{
    background:var(--panel);
    border:1px solid var(--border);
    border-radius:16px;
    box-shadow:var(--shadow)
}
.card{padding:20px}
.card-label{font-size:13px;color:var(--muted);margin-bottom:8px}
.card-value{font-size:30px;font-weight:800}
.warning{border-left:4px solid #e5a000}
.danger{border-left:4px solid #d74a4a}
.funnels-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:18px;
    margin-bottom:18px
}
.panel{margin-bottom:18px;overflow:hidden}
.panel-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:18px 20px;
    border-bottom:1px solid var(--border)
}
.panel-total{font-size:14px}
.table-wrap{overflow:auto}
table{width:100%;border-collapse:collapse}
th,td{
    padding:12px 16px;
    border-bottom:1px solid #edf0f4;
    text-align:left;
    font-size:14px
}
th{
    font-size:12px;
    text-transform:uppercase;
    letter-spacing:.04em;
    color:#667085;
    background:#fafbfc;
    white-space:nowrap
}
.num{text-align:right;white-space:nowrap}
tbody tr:last-child td{border-bottom:0}
tbody tr:hover{background:#fafbfc}
a{color:#216ac3;text-decoration:none}
a:hover{text-decoration:underline}
.empty{text-align:center;color:var(--muted);padding:24px}
.loader,.error{
    padding:18px;
    border-radius:12px;
    background:#fff;
    border:1px solid var(--border);
    margin-bottom:18px
}
.error{
    color:#a12626;
    background:#fff5f5;
    border-color:#f2cccc;
    line-height:1.5
}
code{
    background:#f0f2f5;
    border-radius:5px;
    padding:2px 5px
}
.hidden{display:none!important}
.clickable{cursor:pointer}
.wide-table{min-width:1050px}
@media(max-width:1100px){
    .cards{grid-template-columns:repeat(3,1fr)}
}
@media(max-width:760px){
    .app{padding:12px}
    .topbar,.filters{align-items:stretch;flex-direction:column}
    .filters label{min-width:0}
    .updated{margin-left:0;padding-bottom:0}
    .cards{grid-template-columns:repeat(2,1fr)}
    .funnels-grid{grid-template-columns:1fr}
}
