@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap');

:root {
    --bg: #f4f7fb;
    --surface: #fff;
    --ink: #172033;
    --muted: #748096;
    --line: #e5eaf1;
    --blue: #2563eb;
    --blue-soft: #eef4ff;
    --nav: #111c35;
    --nav-muted: #8e9bb5;
    --green: #16a36a;
    --orange: #f28b3c;
    --shadow: 0 12px 35px rgba(29, 45, 79, .07);
    --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    font-family: "DM Sans", Arial, sans-serif;
    line-height: 1.55;
}
a { color: var(--blue); text-decoration: none; }
button, input { font: inherit; }
svg { width: 22px; height: 22px; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    width: 272px;
    padding: 0 16px 18px;
    color: #fff;
    background: linear-gradient(180deg, #14213d 0%, #101a30 100%);
    box-shadow: 8px 0 35px rgba(9, 18, 38, .1);
    overflow-y: auto;
}
.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 88px;
    padding: 0 10px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #fff;
    background: linear-gradient(145deg, #3979f6, #1555d2);
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(37,99,235,.32);
    font: 800 21px "Manrope", sans-serif;
}
.brand strong, .brand small { display: block; }
.brand strong { font: 800 20px/1 "Manrope", sans-serif; letter-spacing: -.4px; }
.brand small { margin-top: 4px; color: #8494b5; font-size: 9px; font-weight: 700; letter-spacing: 2.4px; }
.sidebar-close { display: none; color: #fff; background: none; border: 0; font-size: 28px; cursor: pointer; }
.nav-label { margin: 26px 14px 10px; color: #687793; font-size: 10px; font-weight: 700; letter-spacing: 1.4px; }
.site-nav ul { margin: 0; padding: 0; list-style: none; }
.site-nav > ul { display: grid; gap: 4px; }
.site-nav li { position: relative; }
.site-nav a {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 45px;
    padding: 10px 13px;
    color: #aeb9ce;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: .2s ease;
}
.site-nav a:hover, .site-nav > ul > li:first-child > a {
    color: #fff;
    background: rgba(55, 113, 238, .18);
}
.site-nav > ul > li:first-child > a { box-shadow: inset 3px 0 #4482ff; }
.nav-icon { display: grid; place-items: center; flex: 0 0 21px; }
.nav-icon svg { width: 19px; height: 19px; }
.nav-chevron { margin-left: auto; font-size: 20px; transition: transform .2s; }
.site-nav li ul { display: none; padding: 4px 0 7px 34px; }
.site-nav li.is-expanded > ul { display: block; }
.site-nav li.is-expanded > a .nav-chevron { transform: rotate(90deg); }
.site-nav li ul a { min-height: 34px; padding: 6px 10px; color: #8493ad; font-size: 12.5px; }
.site-nav li ul ul { padding-left: 15px; }

.sidebar-help {
    margin: auto 4px 20px;
    padding: 18px;
    color: #fff;
    background: linear-gradient(145deg, rgba(51, 111, 236, .27), rgba(39, 79, 163, .12));
    border: 1px solid rgba(105, 148, 240, .16);
    border-radius: 14px;
}
.sidebar-help > span { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 12px; color: #78a4ff; background: rgba(70,127,247,.15); border-radius: 9px; }
.sidebar-help > span svg { width: 18px; }
.sidebar-help strong, .sidebar-help small { display: block; }
.sidebar-help strong { font-size: 13px; }
.sidebar-help small { margin: 4px 0 12px; color: #8f9db7; font-size: 11px; line-height: 1.5; }
.sidebar-help a { color: #82acff; font-size: 11px; font-weight: 700; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 16px 7px 0; border-top: 1px solid rgba(255,255,255,.08); }
.user-avatar { display: grid; place-items: center; flex: 0 0 36px; height: 36px; background: #2d69de; border-radius: 10px; font-weight: 700; }
.sidebar-user > span:nth-child(2) { min-width: 0; flex: 1; }
.sidebar-user strong, .sidebar-user small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user strong { color: #e8ecf5; font-size: 12px; }
.sidebar-user small { color: #6f7e99; font-size: 10px; }
.sidebar-user > a { color: #7786a0; }

.app-frame { width: calc(100% - 272px); min-width: 0; margin-left: 272px; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 24px;
    height: 76px;
    padding: 0 clamp(22px, 3vw, 48px);
    background: rgba(255,255,255,.93);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}
.topbar-title { margin-right: auto; }
.topbar-title strong, .topbar-title small { display: block; }
.topbar-title strong { font: 700 16px "Manrope", sans-serif; }
.topbar-title small { color: var(--muted); font-size: 11px; }
.menu-toggle { display: none; width: 42px; height: 42px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.menu-toggle span { display: block; height: 2px; margin: 4px 0; background: var(--ink); }
.global-search { position: relative; display: flex; align-items: center; width: min(360px, 32vw); color: #9aa4b6; }
.global-search > svg { position: absolute; left: 14px; width: 18px; pointer-events: none; }
.global-search input { width: 100%; height: 42px; padding: 0 55px 0 42px; color: var(--ink); background: #f6f8fb; border: 1px solid #edf0f5; border-radius: 11px; outline: none; }
.global-search input:focus { background: #fff; border-color: #a9c3fb; box-shadow: 0 0 0 4px rgba(37,99,235,.08); }
.global-search kbd { position: absolute; right: 11px; padding: 2px 7px; color: #929caf; background: #fff; border: 1px solid #dfe4ec; border-radius: 5px; font-size: 10px; }
.search-results { position: absolute; top: 48px; right: 0; left: 0; display: none; padding: 7px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.search-results.is-visible { display: grid; }
.search-results a { padding: 9px 11px; color: var(--ink); border-radius: 7px; font-size: 12px; }
.search-results a:hover { background: var(--blue-soft); }
.notification { position: relative; display: grid; place-items: center; width: 41px; height: 41px; color: #5e6a7e; background: #fff; border: 1px solid var(--line); border-radius: 11px; }
.notification svg { width: 18px; }
.notification span { position: absolute; top: 9px; right: 9px; width: 6px; height: 6px; background: #ef5858; border: 2px solid #fff; border-radius: 50%; }

.site-main { max-width: 1480px; min-height: calc(100vh - 132px); margin: 0 auto; padding: 38px clamp(22px, 3vw, 48px) 52px; }
.dashboard-main { background: radial-gradient(circle at 70% 0, rgba(219,231,255,.42), transparent 35%); }
.dashboard-shell { width: 100%; }
.dashboard-hero { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 5px; color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
.dashboard-hero h1 { margin: 0; font: 800 clamp(27px, 3vw, 38px)/1.25 "Manrope", sans-serif; letter-spacing: -1px; }
.dashboard-hero p:not(.eyebrow) { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.hero-date { display: grid; grid-template-columns: 36px auto; column-gap: 10px; align-items: center; min-width: 160px; padding: 12px 16px; background: rgba(255,255,255,.75); border: 1px solid var(--line); border-radius: 12px; }
.hero-date span { grid-row: 1 / 3; color: var(--blue); }
.hero-date strong { font-size: 13px; line-height: 1.2; }
.hero-date small { color: var(--muted); font-size: 9px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 22px; }
.stat-card { position: relative; display: flex; align-items: center; gap: 17px; min-height: 122px; padding: 21px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 5px 20px rgba(28,45,78,.035); overflow: hidden; }
.stat-card::after { content: ""; position: absolute; top: 0; right: 0; width: 75px; height: 75px; background: currentColor; border-radius: 0 0 0 75px; opacity: .035; }
.stat-icon { display: grid; place-items: center; flex: 0 0 48px; height: 48px; border-radius: 13px; }
.stat-card small, .stat-card strong, .stat-card em { display: block; }
.stat-card small { color: var(--muted); font-size: 11px; font-weight: 600; }
.stat-card strong { margin: 1px 0; color: var(--ink); font: 800 27px "Manrope", sans-serif; }
.stat-card em { color: #9ba4b4; font-size: 9px; font-style: normal; }
.stat-blue { color: var(--blue); } .stat-blue .stat-icon { background: #eaf1ff; }
.stat-green { color: var(--green); } .stat-green .stat-icon { background: #e8f8f1; }
.stat-orange { color: var(--orange); } .stat-orange .stat-icon { background: #fff1e7; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(330px, .88fr); gap: 22px; }
.panel { padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 25px rgba(28,45,78,.035); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.panel-heading h2 { margin: 0; font: 700 17px "Manrope", sans-serif; }
.panel-heading > a { font-size: 11px; font-weight: 700; }
.quick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.quick-card { display: flex; align-items: center; gap: 12px; min-height: 88px; padding: 15px; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; transition: transform .2s, box-shadow .2s, border-color .2s; }
.quick-card:hover { transform: translateY(-2px); border-color: #cdd9ee; box-shadow: 0 10px 22px rgba(30,52,93,.08); }
.quick-icon { display: grid; place-items: center; flex: 0 0 40px; height: 40px; border-radius: 11px; }
.quick-icon svg { width: 19px; }
.quick-card > span:nth-child(2) { min-width: 0; flex: 1; }
.quick-card strong, .quick-card small { display: block; }
.quick-card strong { margin-bottom: 3px; font-size: 12px; }
.quick-card small { color: var(--muted); font-size: 9px; line-height: 1.35; }
.quick-card b { color: #a4adbc; font-size: 16px; }
.quick-support .quick-icon { color: #326de5; background: #eaf1ff; }
.quick-backup .quick-icon { color: #16a36a; background: #e8f8f1; }
.quick-docs .quick-icon { color: #f28b3c; background: #fff1e7; }
.quick-network .quick-icon { color: #8a5cd6; background: #f2ecff; }
.recent-list { display: grid; }
.recent-item { display: flex; align-items: center; gap: 11px; min-height: 58px; padding: 9px 4px; color: var(--ink); border-top: 1px solid #eef1f5; }
.recent-item:first-child { border-top: 0; }
.recent-icon { display: grid; place-items: center; flex: 0 0 34px; height: 34px; color: #6482b9; background: #f1f5fb; border-radius: 9px; }
.recent-icon svg { width: 15px; }
.recent-item > span:nth-child(2) { min-width: 0; flex: 1; }
.recent-item strong, .recent-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-item strong { font-size: 11px; }
.recent-item small { color: #a0a8b6; font-size: 9px; }
.recent-arrow { color: #aab2bf; }

.content-shell { padding: clamp(24px, 4vw, 48px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.page-heading { margin-bottom: 30px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.page-heading h1 { max-width: 900px; margin: 9px 0 0; font: 800 clamp(25px, 3vw, 38px)/1.2 "Manrope", sans-serif; letter-spacing: -.7px; }
.back-link { color: var(--muted); font-size: 12px; }
.page-body { max-width: 100%; overflow-wrap: anywhere; }
.page-body h1, .page-body h2, .page-body h3 { font-family: "Manrope", sans-serif; line-height: 1.3; }
.page-body h2 { margin-top: 32px; }
.page-body img { max-width: 100%; height: auto; border-radius: 9px; }
.page-body table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; }
.page-body th, .page-body td { min-width: 140px; padding: 12px; border: 1px solid var(--line); vertical-align: top; }
.page-body pre, .page-body textarea { display: block; width: 100%; max-width: 100%; padding: 18px; color: #dbeafe; background: #152039; border-radius: 10px; overflow-x: auto; white-space: pre-wrap; }
.lead { max-width: 760px; color: var(--muted); font-size: 17px; }
.link-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0; list-style: none; }
.link-list a { display: block; padding: 13px 15px; color: var(--ink); background: #f8fafc; border: 1px solid var(--line); border-radius: 9px; font-size: 13px; }
.link-list a:hover { color: var(--blue); background: var(--blue-soft); }
.site-footer { display: flex; justify-content: space-between; gap: 20px; padding: 18px clamp(22px, 3vw, 48px); color: #99a3b3; border-top: 1px solid var(--line); font-size: 10px; }
.site-footer p { margin: 0; }
.sidebar-backdrop { display: none; }

@media (max-width: 1100px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .recent-panel { order: 2; }
}
@media (max-width: 860px) {
    .sidebar { transform: translateX(-105%); transition: transform .25s ease; }
    body.menu-open .sidebar { transform: translateX(0); }
    .sidebar-close, .menu-toggle { display: block; }
    .sidebar-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(8,15,30,.48); backdrop-filter: blur(2px); }
    body.menu-open .sidebar-backdrop { display: block; }
    .app-frame { width: 100%; margin-left: 0; }
    .topbar { padding: 0 20px; }
    .global-search { width: min(340px, 45vw); }
    .topbar-title { display: none; }
}
@media (max-width: 620px) {
    .topbar { height: 68px; gap: 12px; }
    .global-search { flex: 1; width: auto; }
    .global-search kbd, .notification { display: none; }
    .site-main { padding: 25px 15px 40px; }
    .dashboard-hero { display: block; }
    .hero-date { display: none; }
    .stat-grid { grid-template-columns: 1fr; gap: 10px; }
    .stat-card { min-height: 100px; }
    .quick-grid, .link-list { grid-template-columns: 1fr; }
    .panel { padding: 19px; }
    .content-shell { padding: 22px 18px; }
    .site-footer { display: block; padding: 18px; }
    .site-footer p + p { margin-top: 4px; }
}
