:root{
    --bg:#f5f5f7;
    --surface:#ffffff;
    --surface-soft:#fafafa;
    --text:#111827;
    --muted:#6b7280;
    --line:#e5e7eb;
    --line-strong:#d1d5db;
    --black:#0b0f19;
    --ok:#166534;
    --warn:#92400e;
    --bad:#991b1b;
    --blue:#1d4ed8;
    --shadow:0 1px 2px rgba(15,23,42,.04);
    --shadow-soft:0 12px 42px rgba(15,23,42,.07);
    --radius:22px;
    --sidebar:268px;
}

*{box-sizing:border-box}
html,body{width:100%;max-width:100vw;overflow-x:hidden}
body{
    margin:0;
    background:
        radial-gradient(circle at top left, rgba(255,255,255,.95), rgba(245,245,247,.95) 34%, rgba(241,245,249,.96) 100%);
    color:var(--text);
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
    -webkit-font-smoothing:antialiased;
    text-rendering:geometricPrecision;
}

a{color:inherit}
button,input,select,textarea{font:inherit}
label{display:block;font-size:13px;color:#374151;margin-bottom:7px;font-weight:780}
input,select,textarea{
    width:100%;
    max-width:100%;
    border:1px solid var(--line);
    border-radius:14px;
    padding:11px 12px;
    background:#fff;
    color:var(--text);
    outline:none;
}
input:focus,select:focus,textarea:focus{border-color:#111827;box-shadow:0 0 0 3px rgba(17,24,39,.08)}
textarea{min-height:82px;resize:vertical}

.elementary-app{
    min-height:100vh;
}

.elementary-left-menu{
    position:fixed;
    top:14px;
    left:14px;
    bottom:14px;
    width:var(--sidebar);
    z-index:50;
    overflow:auto;
    padding:16px 12px;
    background:rgba(255,255,255,.88);
    border:1px solid rgba(229,231,235,.9);
    border-radius:28px;
    box-shadow:var(--shadow-soft);
    backdrop-filter:blur(22px);
}

.elementary-left-brand{
    display:flex;
    align-items:center;
    gap:11px;
    padding:8px 8px 16px;
    border-bottom:1px solid #eef2f7;
    margin-bottom:10px;
}

.elementary-left-mark{
    width:42px;
    height:42px;
    border-radius:15px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#111827;
    color:#fff;
    font-weight:950;
    letter-spacing:-.04em;
}

.elementary-left-title{
    font-size:14px;
    font-weight:950;
    letter-spacing:-.035em;
    line-height:1.1;
}

.elementary-left-subtitle{
    font-size:12px;
    color:#64748b;
    line-height:1.15;
}

.elementary-left-version{
    margin:9px 8px 15px;
    padding:8px 10px;
    border-radius:14px;
    background:#f8fafc;
    border:1px solid #eef2f7;
    color:#64748b;
    font-size:12px;
    font-weight:750;
    overflow-wrap:anywhere;
}

.elementary-left-group{margin-top:13px}
.elementary-left-group-title{
    padding:0 10px 7px;
    color:#94a3b8;
    font-size:11px;
    font-weight:950;
    text-transform:uppercase;
    letter-spacing:.06em;
}

.elementary-left-link{
    display:flex;
    align-items:center;
    justify-content:space-between;
    min-height:39px;
    padding:9px 11px;
    border-radius:14px;
    color:#111827;
    text-decoration:none;
    font-size:14px;
    font-weight:780;
    margin-bottom:4px;
}
.elementary-left-link:hover{background:#f1f5f9}
.elementary-left-link.active{background:#111827;color:#fff}

.shell{
    width:calc(100% - var(--sidebar) - 54px);
    max-width:none;
    margin:14px 24px 54px calc(var(--sidebar) + 28px);
    padding:0;
}

.elementary-topbar{
    position:sticky;
    top:14px;
    z-index:30;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding:14px 16px;
    margin-bottom:14px;
    background:rgba(255,255,255,.86);
    border:1px solid rgba(229,231,235,.92);
    border-radius:24px;
    box-shadow:var(--shadow);
    backdrop-filter:blur(20px);
}

.elementary-topbar-left{
    display:flex;
    flex-direction:column;
    gap:2px;
    min-width:0;
}
.elementary-topbar-title{
    font-size:15px;
    font-weight:900;
    letter-spacing:-.025em;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.elementary-topbar-subtitle{
    color:#64748b;
    font-size:12px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.elementary-topbar-actions{
    display:flex;
    gap:8px;
    align-items:center;
    flex-wrap:wrap;
}
.elementary-pill{
    display:inline-flex;
    align-items:center;
    min-height:34px;
    padding:8px 11px;
    border-radius:999px;
    background:#f8fafc;
    border:1px solid #e5e7eb;
    color:#374151;
    font-size:12px;
    font-weight:800;
    text-decoration:none;
}

.hero,.card{
    background:rgba(255,255,255,.94);
    border:1px solid rgba(229,231,235,.92);
    border-radius:28px;
    padding:22px 24px;
    box-shadow:var(--shadow);
}

.hero{
    margin-bottom:14px;
}

h1{
    margin:0;
    font-size:clamp(28px,2.5vw,44px);
    line-height:1.02;
    letter-spacing:-.055em;
}
h2{
    margin:0 0 14px;
    font-size:21px;
    line-height:1.15;
    letter-spacing:-.03em;
}
h3{margin:0 0 6px;font-size:16px}
.sub,.small{color:var(--muted);font-size:13px;line-height:1.45}

.alert{
    margin-top:14px;
    border-radius:18px;
    padding:14px 16px;
    border:1px solid #bbf7d0;
    background:#ecfdf5;
    color:#166534;
    font-size:14px;
}

.actions{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    align-items:center;
    margin-top:14px;
}

.action,.btn,button.action,button.btn,a.action,a.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:40px;
    padding:10px 13px;
    border:0;
    border-radius:14px;
    background:#111827;
    color:#fff;
    text-decoration:none;
    font-weight:850;
    cursor:pointer;
    line-height:1.15;
    white-space:normal;
}
.action.secondary,.btn.secondary,a.action.secondary,a.btn.secondary{
    background:#fff;
    color:#111827;
    border:1px solid var(--line);
}
.action.bad,.btn.bad{background:#7f1d1d;color:#fff}

.grid,.grid3,.grid4,.grid5{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
    gap:11px;
}
.kpis{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
    gap:10px;
}
.kpi{
    background:#f9fafb;
    border:1px solid #eef2f7;
    border-radius:18px;
    padding:13px;
}
.kpi strong{
    display:block;
    font-size:21px;
    letter-spacing:-.04em;
}
.kpi span{font-size:12px;color:#64748b}

.table-wrap{
    width:100%;
    max-width:100%;
    overflow:auto;
    border-radius:20px;
    border:1px solid var(--line);
    margin-top:14px;
    background:#fff;
}
table{
    width:100%;
    min-width:980px;
    border-collapse:collapse;
    background:#fff;
}
th,td{
    padding:11px 12px;
    border-bottom:1px solid #eef2f7;
    text-align:left;
    font-size:13px;
    vertical-align:top;
    overflow-wrap:anywhere;
}
th{
    background:#f9fafb;
    color:#374151;
    font-size:12px;
    font-weight:900;
    position:sticky;
    top:0;
    z-index:1;
}
tr:hover td{background:#fcfcfd}

.badge{
    display:inline-flex;
    border-radius:999px;
    padding:5px 9px;
    background:#f3f4f6;
    border:1px solid #e5e7eb;
    font-size:12px;
    font-weight:850;
    line-height:1.15;
}
.ok,.okbadge{color:var(--ok)}
.bad,.badbadge{color:var(--bad)}
.warn,.warnbadge{color:var(--warn)}

.elementary-home-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
    gap:12px;
    margin-top:14px;
}
.elementary-home-button{
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:64px;
    padding:15px 18px;
    border:1px solid var(--line);
    border-radius:19px;
    background:#fff;
    color:#111827;
    text-decoration:none;
    font-weight:880;
    text-align:center;
    box-shadow:var(--shadow);
}
.elementary-home-button:hover{border-color:#111827}

@media(max-width:980px){
    .elementary-left-menu{
        position:relative;
        top:auto;
        left:auto;
        bottom:auto;
        width:min(100% - 22px,100%);
        margin:10px auto 0;
        max-height:none;
        border-radius:24px;
    }
    .elementary-left-group-title{display:none}
    .elementary-left-link{
        display:inline-flex;
        width:auto;
        margin:3px;
        min-height:34px;
        font-size:13px;
    }
    .shell{
        width:min(100% - 22px,100%);
        max-width:1280px;
        margin:12px auto 42px;
    }
    .elementary-topbar{
        position:relative;
        top:auto;
        align-items:flex-start;
        flex-direction:column;
    }
}

@media(max-width:720px){
    .hero,.card{padding:18px;border-radius:22px}
    .actions .action,.actions .btn{flex:1 1 100%}
    h1{font-size:28px}
    table{font-size:12px}
}
