:root {
    --navy-950: #07111f;
    --navy-900: #0f172a;
    --navy-800: #17233a;
    --blue-700: #1d4ed8;
    --blue-600: #2563eb;
    --blue-500: #3b82f6;
    --blue-100: #dbeafe;
    --blue-50: #eff6ff;
    --green-700: #15803d;
    --green-100: #dcfce7;
    --amber-700: #b45309;
    --amber-100: #fef3c7;
    --red-700: #b91c1c;
    --red-100: #fee2e2;
    --violet-700: #6d28d9;
    --violet-100: #ede9fe;
    --slate-950: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --white: #fff;
    --sidebar-width: 270px;
    --radius: 14px;
    --shadow: 0 10px 28px rgba(15, 23, 42, .07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: #f4f7fb;
    color: var(--slate-800);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; }
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    overflow: hidden;
    background: linear-gradient(180deg, var(--navy-950), var(--navy-900) 68%, #101d34);
    color: #d9e3f1;
    box-shadow: 10px 0 30px rgba(7, 17, 31, .08);
}
.brand {
    display: flex;
    min-height: 78px;
    align-items: center;
    gap: 12px;
    padding: 0 21px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-mark {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(145deg, #52a5ff, #2865dd);
    color: white;
    font-size: 20px;
    font-weight: 900;
    box-shadow: 0 7px 22px rgba(37,99,235,.4), inset 0 1px rgba(255,255,255,.35);
}
.brand-text { display: flex; min-width: 0; flex-direction: column; }
.brand-text strong { color: white; font-size: 20px; letter-spacing: -.4px; }
.brand-text small { color: #8fa4bf; font-size: 10px; font-weight: 750; letter-spacing: 1.2px; text-transform: uppercase; }
.sidebar-close { display: none; margin-left: auto; border: 0; background: transparent; color: white; font-size: 24px; cursor: pointer; }
.user-scope { margin: 15px 13px 8px; padding: 12px; border: 1px solid rgba(131,167,211,.18); border-radius: 14px; background: rgba(255,255,255,.055); }
.user-scope-label { margin-bottom: 8px; color: #8fa4bf; font-size: 10px; font-weight: 800; letter-spacing: .9px; text-transform: uppercase; }
.user-scope-main { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; }
.user-scope-main > span { display: flex; min-width: 0; flex-direction: column; }
.user-scope-main strong { overflow: hidden; color: white; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.user-scope-main small { overflow: hidden; color: #95a9c2; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 5px 12px 20px; scrollbar-color: #31415b transparent; scrollbar-width: thin; }
.nav-title { margin: 18px 10px 7px; color: #6f85a2; font-size: 10px; font-weight: 800; letter-spacing: 1.1px; text-transform: uppercase; }
.nav-link {
    position: relative;
    display: flex;
    min-height: 43px;
    align-items: center;
    gap: 11px;
    margin: 2px 0;
    padding: 0 11px;
    border-radius: 10px;
    color: #aebdd0;
    font-size: 14px;
    font-weight: 560;
    transition: .16s ease;
}
.nav-link:hover { background: rgba(255,255,255,.06); color: white; }
.nav-link.active { background: linear-gradient(90deg, rgba(50,115,255,.25), rgba(50,115,255,.11)); color: white; font-weight: 700; }
.nav-link.active::before { content: ""; position: absolute; left: -12px; width: 3px; height: 24px; border-radius: 0 4px 4px 0; background: #4c8dff; }
.nav-icon { display: grid; width: 22px; place-items: center; font-size: 17px; }
.nav-count { margin-left: auto; min-width: 22px; padding: 1px 6px; border-radius: 99px; background: rgba(239,68,68,.2); color: #fecaca; font-size: 11px; font-weight: 800; text-align: center; }
.sidebar-footer { padding: 13px; border-top: 1px solid rgba(255,255,255,.07); }
.sidebar-health { display: flex; align-items: center; justify-content: space-between; padding: 7px 9px; color: #8298b4; font-size: 11px; }
.sidebar-health span { display: flex; align-items: center; gap: 6px; }
.sidebar-health i { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 3px rgba(52,211,153,.13); }
.logout-form button { display: flex; width: 100%; min-height: 39px; align-items: center; justify-content: center; gap: 7px; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; background: rgba(255,255,255,.05); color: #b7c5d7; font-size: 13px; cursor: pointer; }
.logout-form button:hover { background: rgba(255,255,255,.09); color: white; }

.main-area { min-height: 100vh; margin-left: var(--sidebar-width); }
.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 28px;
    border-bottom: 1px solid var(--slate-200);
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(14px);
}
.topbar-left { display: flex; min-width: 0; align-items: center; gap: 12px; }
.topbar-title { min-width: 0; }
.topbar-title h1 { overflow: hidden; margin: 0; color: var(--slate-950); font-size: 22px; line-height: 1.25; letter-spacing: -.35px; text-overflow: ellipsis; white-space: nowrap; }
.topbar-title p { overflow: hidden; margin: 3px 0 0; color: var(--slate-500); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.menu-toggle { display: none; width: 40px; height: 40px; place-items: center; border: 1px solid var(--slate-200); border-radius: 10px; background: white; cursor: pointer; }
.icon-button { position: relative; display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid var(--slate-200); border-radius: 10px; background: white; color: var(--slate-600); cursor: pointer; }
.icon-button:hover { background: var(--slate-50); color: var(--slate-950); }
.icon-button .bubble { position: absolute; top: -6px; right: -6px; display: grid; min-width: 18px; height: 18px; place-items: center; border: 2px solid white; border-radius: 99px; background: #dc2626; color: white; font-size: 9px; font-weight: 900; }
.top-user { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 9px; margin-left: 4px; }
.top-user > span:last-child { display: flex; flex-direction: column; }
.top-user strong { color: var(--slate-800); font-size: 13px; }
.top-user small { color: var(--slate-500); font-size: 11px; }
.sidebar-overlay { position: fixed; inset: 0; z-index: 55; display: none; background: rgba(2,6,23,.55); backdrop-filter: blur(2px); }

.page-content { width: min(1580px, 100%); margin: 0 auto; padding: 26px 28px 50px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.page-head h2 { margin: 0; color: var(--slate-950); font-size: 23px; letter-spacing: -.35px; }
.page-head p { margin: 5px 0 0; color: var(--slate-500); font-size: 14px; }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 9px; }

.alert { position: relative; display: flex; align-items: flex-start; gap: 10px; margin-bottom: 18px; padding: 13px 42px 13px 15px; border: 1px solid; border-radius: 12px; font-size: 14px; box-shadow: 0 4px 14px rgba(15,23,42,.04); }
.alert-success { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.alert-danger { border-color: #fecaca; background: #fff7f7; color: #991b1b; }
.alert-info { border-color: #bfdbfe; background: #eff6ff; color: #1e40af; }
.alert ul { margin: 4px 0 0; padding-left: 18px; }
.alert-close { position: absolute; top: 7px; right: 8px; border: 0; background: transparent; color: currentColor; font-size: 22px; cursor: pointer; opacity: .65; }

.card { border: 1px solid var(--slate-200); border-radius: var(--radius); background: white; box-shadow: 0 1px 2px rgba(15,23,42,.025); }
.card + .card { margin-top: 18px; }
.card-header { display: flex; min-height: 62px; align-items: center; justify-content: space-between; gap: 15px; padding: 14px 18px; border-bottom: 1px solid var(--slate-200); }
.card-header h3 { margin: 0; color: var(--slate-950); font-size: 16px; }
.card-header p { margin: 2px 0 0; color: var(--slate-500); font-size: 12px; }
.card-body { padding: 18px; }
.card-footer { padding: 13px 18px; border-top: 1px solid var(--slate-200); background: var(--slate-50); }
.card-compact .card-body { padding: 14px; }
.subtle-card { border: 1px solid var(--slate-200); border-radius: 12px; padding: 14px; background: var(--slate-50); }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main-side { grid-template-columns: minmax(0, 1.65fr) minmax(300px, .72fr); align-items: start; }
.span-2 { grid-column: span 2; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.muted { color: var(--slate-500); }
.small { font-size: 12px; }
.text-danger { color: var(--red-700); }
.text-success { color: var(--green-700); }
.text-amber { color: var(--amber-700); }
.text-blue { color: var(--blue-700); }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.divider { height: 1px; margin: 16px 0; background: var(--slate-200); }

.metric-card { position: relative; overflow: hidden; padding: 18px; }
.metric-card::after { content: ""; position: absolute; top: -28px; right: -28px; width: 95px; height: 95px; border-radius: 50%; background: var(--metric-soft, var(--blue-50)); }
.metric-top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.metric-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; background: var(--metric-soft, var(--blue-50)); color: var(--metric, var(--blue-600)); font-size: 20px; }
.metric-label { color: var(--slate-500); font-size: 13px; font-weight: 650; }
.metric-value { position: relative; z-index: 1; margin-top: 13px; color: var(--slate-950); font-size: 30px; font-weight: 850; letter-spacing: -.7px; line-height: 1; }
.metric-note { position: relative; z-index: 1; margin-top: 8px; color: var(--slate-500); font-size: 12px; }
.metric-blue { --metric: var(--blue-600); --metric-soft: var(--blue-50); }
.metric-red { --metric: var(--red-700); --metric-soft: var(--red-100); }
.metric-amber { --metric: var(--amber-700); --metric-soft: var(--amber-100); }
.metric-green { --metric: var(--green-700); --metric-soft: var(--green-100); }

.button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 7px; padding: 0 15px; border: 1px solid var(--slate-200); border-radius: 10px; background: white; color: var(--slate-700); font-size: 13px; font-weight: 720; cursor: pointer; transition: .15s; }
.button:hover { transform: translateY(-1px); border-color: var(--slate-300); box-shadow: 0 4px 10px rgba(15,23,42,.06); }
.button-primary { border-color: var(--blue-600); background: var(--blue-600); color: white; }
.button-primary:hover { border-color: var(--blue-700); background: var(--blue-700); }
.button-success { border-color: #16a34a; background: #16a34a; color: white; }
.button-danger { border-color: #fecaca; background: #fff7f7; color: var(--red-700); }
.button-soft { border-color: var(--blue-100); background: var(--blue-50); color: var(--blue-700); }
.button-sm { min-height: 33px; padding: 0 11px; border-radius: 8px; font-size: 12px; }
.button-block { width: 100%; }
.link { color: var(--blue-700); font-weight: 650; }
.link:hover { text-decoration: underline; }

.field { display: flex; min-width: 0; flex-direction: column; gap: 6px; }
.field label { color: var(--slate-700); font-size: 13px; font-weight: 700; }
.field label .required { color: #dc2626; }
.field small { color: var(--slate-500); font-size: 11px; }
.input, .select, .textarea { width: 100%; border: 1px solid var(--slate-300); border-radius: 10px; outline: none; background: white; color: var(--slate-800); transition: .15s; }
.input, .select { min-height: 42px; padding: 0 11px; }
.textarea { min-height: 110px; padding: 10px 11px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: #7aa2ed; box-shadow: 0 0 0 3px var(--blue-100); }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: #ef4444; }
.field-error { color: #b91c1c; font-size: 11px; }
.checkbox { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; }
.checkbox input { width: 17px; height: 17px; accent-color: var(--blue-600); }
.form-section { padding: 18px; border: 1px solid var(--slate-200); border-radius: 13px; background: white; }
.form-section + .form-section { margin-top: 16px; }
.form-section-title { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; }
.section-number { display: grid; width: 29px; height: 29px; flex: 0 0 auto; place-items: center; border-radius: 9px; background: var(--blue-50); color: var(--blue-700); font-size: 12px; font-weight: 850; }
.form-section-title h3 { margin: 1px 0 0; color: var(--slate-950); font-size: 16px; }
.form-section-title p { margin: 3px 0 0; color: var(--slate-500); font-size: 12px; }
.form-actions { position: sticky; bottom: 14px; z-index: 20; display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; padding: 12px; border: 1px solid var(--slate-200); border-radius: 13px; background: rgba(255,255,255,.94); box-shadow: var(--shadow); backdrop-filter: blur(12px); }

.filter-bar { display: grid; grid-template-columns: minmax(220px, 1.8fr) repeat(4, minmax(130px, 1fr)) auto; gap: 9px; padding: 13px; border-bottom: 1px solid var(--slate-200); background: var(--slate-50); }
.search-wrap { position: relative; }
.search-wrap .input { padding-left: 36px; }
.search-wrap::before { content: "⌕"; position: absolute; top: 7px; left: 12px; z-index: 1; color: var(--slate-400); font-size: 20px; }
.view-switch { display: inline-flex; padding: 3px; border: 1px solid var(--slate-200); border-radius: 9px; background: var(--slate-50); }
.view-switch a { display: grid; min-width: 34px; height: 32px; place-items: center; border-radius: 7px; color: var(--slate-500); font-size: 15px; }
.view-switch a.active { background: white; color: var(--blue-700); box-shadow: 0 1px 3px rgba(15,23,42,.1); }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { padding: 11px 13px; border-bottom: 1px solid var(--slate-200); background: var(--slate-50); color: var(--slate-500); font-size: 11px; font-weight: 800; letter-spacing: .45px; text-align: left; text-transform: uppercase; white-space: nowrap; }
.table td { padding: 13px; border-bottom: 1px solid var(--slate-100); color: var(--slate-700); font-size: 13px; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fbfdff; }
.table-title { display: flex; min-width: 220px; flex-direction: column; gap: 2px; }
.table-title a { color: var(--slate-950); font-weight: 720; }
.table-title a:hover { color: var(--blue-700); }
.table-title small { color: var(--slate-500); }
.table-actions { display: flex; justify-content: flex-end; gap: 6px; }

.badge { display: inline-flex; min-height: 25px; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 11px; font-weight: 760; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-blue { background: var(--blue-100); color: var(--blue-700); }
.badge-green { background: var(--green-100); color: var(--green-700); }
.badge-amber { background: var(--amber-100); color: var(--amber-700); }
.badge-red { background: var(--red-100); color: var(--red-700); }
.badge-violet { background: var(--violet-100); color: var(--violet-700); }
.badge-slate { background: var(--slate-100); color: var(--slate-600); }
.badge-plain::before { display: none; }
.avatar { display: inline-grid; flex: 0 0 auto; place-items: center; border: 2px solid white; border-radius: 50%; background: linear-gradient(145deg,#3378e9,#194bb4); color: white; font-size: 11px; font-weight: 850; box-shadow: 0 2px 7px rgba(15,23,42,.14); }
.avatar-sm { width: 34px; height: 34px; }
.avatar-md { width: 42px; height: 42px; font-size: 13px; }
.avatar-stack { display: flex; align-items: center; }
.avatar-stack .avatar { margin-left: -7px; }
.avatar-stack .avatar:first-child { margin-left: 0; }
.avatar-more { background: var(--slate-200); color: var(--slate-600); }
.person { display: flex; align-items: center; gap: 9px; }
.person-info { display: flex; min-width: 0; flex-direction: column; }
.person-info strong { overflow: hidden; color: var(--slate-800); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.person-info small { overflow: hidden; color: var(--slate-500); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

.progress { width: 100%; height: 7px; overflow: hidden; border-radius: 99px; background: var(--slate-100); }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue-600), #5c91f7); }
.progress.green > span { background: linear-gradient(90deg,#16a34a,#4ade80); }
.progress.red > span { background: linear-gradient(90deg,#dc2626,#fb7185); }
.progress-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; color: var(--slate-500); font-size: 11px; }

.kanban { display: grid; grid-template-columns: repeat(5, minmax(250px, 1fr)); gap: 13px; overflow-x: auto; padding: 14px; }
.kanban-column { min-height: 440px; border: 1px solid var(--slate-200); border-radius: 12px; background: var(--slate-50); }
.kanban-head { display: flex; align-items: center; justify-content: space-between; padding: 12px; border-bottom: 1px solid var(--slate-200); font-size: 13px; font-weight: 780; }
.kanban-head span:last-child { display: grid; min-width: 22px; height: 22px; place-items: center; border-radius: 99px; background: white; color: var(--slate-500); font-size: 10px; }
.kanban-body { display: flex; flex-direction: column; gap: 9px; padding: 9px; }
.kanban-card { padding: 12px; border: 1px solid var(--slate-200); border-radius: 10px; background: white; box-shadow: 0 2px 6px rgba(15,23,42,.04); }
.kanban-card:hover { border-color: #b9c8de; box-shadow: 0 5px 15px rgba(15,23,42,.07); }
.kanban-card h4 { margin: 8px 0; color: var(--slate-950); font-size: 13px; line-height: 1.45; }
.kanban-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; color: var(--slate-500); font-size: 11px; }

.chart-bars { display: flex; min-height: 220px; align-items: flex-end; gap: 14px; padding: 18px 8px 0; border-bottom: 1px solid var(--slate-200); }
.chart-bar-item { display: flex; min-width: 38px; flex: 1; flex-direction: column; align-items: center; gap: 7px; }
.chart-bar-track { position: relative; display: flex; width: min(44px, 72%); height: 170px; align-items: flex-end; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, transparent, var(--slate-50)); }
.chart-bar-fill { position: relative; width: 100%; min-height: 3px; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, #60a5fa, #2563eb); transition: height .6s ease; }
.chart-bar-fill b { position: absolute; top: -23px; left: 50%; color: var(--slate-600); font-size: 11px; transform: translateX(-50%); }
.chart-bar-label { color: var(--slate-500); font-size: 10px; white-space: nowrap; }
.donut-wrap { display: grid; grid-template-columns: 170px 1fr; align-items: center; gap: 20px; }
.donut { position: relative; width: 160px; height: 160px; border-radius: 50%; background: conic-gradient(var(--blue-600) 0 var(--donut-value), var(--slate-100) var(--donut-value) 100%); }
.donut::after { content: ""; position: absolute; inset: 24px; border-radius: 50%; background: white; }
.donut-center { position: absolute; inset: 0; z-index: 1; display: grid; place-content: center; text-align: center; }
.donut-center strong { color: var(--slate-950); font-size: 25px; }
.donut-center small { color: var(--slate-500); font-size: 11px; }
.legend { display: flex; flex-direction: column; gap: 9px; }
.legend-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; color: var(--slate-600); font-size: 12px; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; }

.task-hero { padding: 20px; }
.task-code { color: var(--blue-700); font-size: 12px; font-weight: 800; letter-spacing: .5px; }
.task-hero h2 { margin: 6px 0 10px; color: var(--slate-950); font-size: 25px; line-height: 1.3; letter-spacing: -.35px; }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; color: var(--slate-500); font-size: 12px; }
.detail-list { display: flex; flex-direction: column; }
.detail-row { display: grid; grid-template-columns: minmax(120px, .65fr) minmax(0, 1.35fr); gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--slate-100); }
.detail-row:last-child { border-bottom: 0; }
.detail-label { color: var(--slate-500); font-size: 12px; }
.detail-value { color: var(--slate-800); font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.rich-text { color: var(--slate-700); font-size: 14px; white-space: pre-line; }
.timeline { position: relative; display: flex; flex-direction: column; gap: 0; }
.timeline::before { content: ""; position: absolute; top: 16px; bottom: 16px; left: 16px; width: 2px; background: var(--slate-200); }
.timeline-item { position: relative; display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 9px 0; }
.timeline-dot { z-index: 1; display: grid; width: 34px; height: 34px; place-items: center; border: 4px solid white; border-radius: 50%; background: var(--blue-100); color: var(--blue-700); font-size: 10px; font-weight: 850; }
.timeline-content { padding: 11px 13px; border: 1px solid var(--slate-200); border-radius: 10px; background: var(--slate-50); }
.timeline-content h4 { margin: 0; color: var(--slate-950); font-size: 13px; }
.timeline-content p { margin: 6px 0 0; color: var(--slate-600); font-size: 12px; white-space: pre-line; }
.timeline-time { margin-top: 7px; color: var(--slate-400); font-size: 10px; }
.tabs { display: flex; gap: 3px; overflow-x: auto; padding: 0 4px; border-bottom: 1px solid var(--slate-200); }
.tab-button { min-height: 43px; padding: 0 13px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--slate-500); font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.tab-button.active { border-color: var(--blue-600); color: var(--blue-700); }
.tab-panel { padding-top: 17px; }

.project-tree { display: flex; flex-direction: column; gap: 12px; }
.project-node { overflow: hidden; border: 1px solid var(--slate-200); border-radius: 13px; background: white; }
.project-node > summary { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px 17px; cursor: pointer; list-style: none; }
.project-node > summary::-webkit-details-marker { display: none; }
.project-node[open] > summary { border-bottom: 1px solid var(--slate-200); background: var(--slate-50); }
.tree-children { padding: 12px 18px 16px 30px; }
.tree-version { position: relative; padding: 9px 0 9px 20px; border-left: 2px solid var(--blue-100); }
.tree-version::before { content: ""; position: absolute; top: 20px; left: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--blue-500); }
.tree-version h4 { margin: 0 0 8px; color: var(--slate-800); font-size: 13px; }
.tree-clusters { display: flex; flex-wrap: wrap; gap: 9px; }
.tree-cluster { min-width: 170px; padding: 9px; border: 1px solid var(--slate-200); border-radius: 9px; background: white; }
.tree-cluster strong { color: var(--slate-700); font-size: 12px; }
.server-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.server-chip { padding: 3px 7px; border-radius: 6px; background: var(--green-100); color: var(--green-700); font-size: 10px; font-weight: 700; }

.team-card { position: relative; overflow: hidden; }
.team-strip { height: 5px; background: var(--team-color, var(--blue-600)); }
.team-card .card-body { padding: 17px; }
.team-name { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.team-name h3 { margin: 0; color: var(--slate-950); font-size: 16px; }
.team-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 15px 0; }
.team-stat { padding: 8px; border-radius: 9px; background: var(--slate-50); text-align: center; }
.team-stat strong { display: block; color: var(--slate-950); font-size: 18px; }
.team-stat small { color: var(--slate-500); font-size: 10px; }
.member-list { display: flex; flex-direction: column; gap: 8px; }

.notification-item { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; padding: 14px 17px; border-bottom: 1px solid var(--slate-100); }
.notification-item:last-child { border-bottom: 0; }
.notification-item.unread { background: #f5f9ff; }
.notification-icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 11px; background: var(--blue-100); color: var(--blue-700); }
.notification-body strong { color: var(--slate-950); font-size: 13px; }
.notification-body p { margin: 3px 0; color: var(--slate-600); font-size: 12px; }
.notification-body time { color: var(--slate-400); font-size: 10px; }

.empty-state { display: grid; min-height: 210px; place-content: center; padding: 30px; text-align: center; }
.empty-icon { display: grid; width: 58px; height: 58px; margin: 0 auto 11px; place-items: center; border-radius: 17px; background: var(--slate-100); color: var(--slate-500); font-size: 26px; }
.empty-state h3 { margin: 0; color: var(--slate-800); font-size: 15px; }
.empty-state p { max-width: 430px; margin: 6px auto 14px; color: var(--slate-500); font-size: 12px; }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin: 18px 0 0; padding: 0; list-style: none; }
.page-item .page-link { display: grid; min-width: 35px; height: 35px; place-items: center; border: 1px solid var(--slate-200); border-radius: 8px; background: white; color: var(--slate-600); font-size: 12px; }
.page-item.active .page-link { border-color: var(--blue-600); background: var(--blue-600); color: white; }
.page-item.disabled .page-link { opacity: .45; }

.guest-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(380px, .85fr) minmax(520px, 1.15fr); background: white; }
.guest-brand-panel { position: relative; display: flex; min-height: 100vh; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 46px; background: linear-gradient(145deg,#07111f,#0f274f 65%,#163b77); color: white; }
.guest-brand-panel::before, .guest-brand-panel::after { content: ""; position: absolute; border-radius: 50%; background: rgba(96,165,250,.13); }
.guest-brand-panel::before { top: -130px; right: -100px; width: 390px; height: 390px; }
.guest-brand-panel::after { bottom: -180px; left: -120px; width: 460px; height: 460px; }
.guest-logo { position: relative; z-index: 1; display: flex; align-items: center; gap: 13px; }
.guest-logo .brand-mark { width: 47px; height: 47px; }
.guest-logo strong { display: block; font-size: 23px; }
.guest-logo small { color: #9db2cd; font-size: 11px; letter-spacing: 1.1px; }
.guest-message { position: relative; z-index: 1; max-width: 580px; }
.guest-message h1 { margin: 0 0 15px; font-size: clamp(34px,4vw,54px); line-height: 1.08; letter-spacing: -1.8px; }
.guest-message p { margin: 0; color: #bed0e5; font-size: 16px; }
.guest-features { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; margin-top: 28px; }
.guest-feature { padding: 13px; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; background: rgba(255,255,255,.06); color: #d7e4f3; font-size: 12px; }
.guest-foot { position: relative; z-index: 1; color: #8097b3; font-size: 11px; }
.login-panel { display: grid; min-height: 100vh; place-items: center; padding: 36px; background: #f8fafc; }
.login-card { width: min(460px,100%); }
.login-card h2 { margin: 0; color: var(--slate-950); font-size: 28px; letter-spacing: -.6px; }
.login-card > p { margin: 7px 0 24px; color: var(--slate-500); font-size: 14px; }
.demo-box { margin-top: 18px; padding: 13px; border: 1px solid #bfdbfe; border-radius: 11px; background: var(--blue-50); color: #1e3a8a; font-size: 12px; }
.demo-box code { display: inline-block; margin-top: 4px; padding: 2px 6px; border-radius: 5px; background: white; color: #1e40af; }

@media (max-width: 1180px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-main-side { grid-template-columns: minmax(0, 1.5fr) minmax(280px, .8fr); }
    .filter-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .filter-bar .search-wrap { grid-column: span 2; }
}
@media (max-width: 900px) {
    .sidebar { transform: translateX(-102%); transition: transform .2s ease; }
    .sidebar.open { transform: translateX(0); }
    .sidebar.open + .sidebar-overlay { display: block; }
    .sidebar-close, .menu-toggle { display: grid; }
    .main-area { margin-left: 0; }
    .topbar { padding: 10px 18px; }
    .top-user > span:last-child { display: none; }
    .page-content { padding: 22px 18px 40px; }
    .grid-main-side, .grid-3 { grid-template-columns: 1fr; }
    .guest-shell { grid-template-columns: 1fr; }
    .guest-brand-panel { display: none; }
    .login-panel { min-height: 100vh; }
}
@media (max-width: 680px) {
    body { font-size: 15px; }
    .topbar-title h1 { font-size: 18px; }
    .topbar-title p { display: none; }
    .page-content { padding: 18px 12px 36px; }
    .page-head { align-items: stretch; flex-direction: column; }
    .page-actions { justify-content: flex-start; }
    .grid-2, .grid-4 { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
    .filter-bar { grid-template-columns: 1fr; }
    .filter-bar .search-wrap { grid-column: auto; }
    .card-header { align-items: flex-start; flex-direction: column; }
    .table th, .table td { padding: 10px; }
    .form-actions { position: static; flex-direction: column-reverse; }
    .form-actions .button { width: 100%; }
    .donut-wrap { grid-template-columns: 1fr; justify-items: center; }
    .detail-row { grid-template-columns: 1fr; gap: 3px; }
    .guest-features { grid-template-columns: 1fr; }
    .login-panel { padding: 24px 16px; }
}

@media print {
    .sidebar, .topbar, .page-actions, .filter-bar, .form-actions, .button { display: none !important; }
    .main-area { margin: 0; }
    .page-content { max-width: none; padding: 0; }
    body { background: white; }
    .card { break-inside: avoid; box-shadow: none; }
}
