:root {
    --primary: #0B4EA2;
    --accent: #1565FF;
    --dark: #07162C;
    --bg: #EEF5FF;
    --surface: rgba(255, 255, 255, 0.72);
    --surface-strong: rgba(255, 255, 255, 0.9);
    --text: #14233A;
    --muted: #6F7E95;
    --border: rgba(255, 255, 255, 0.45);
    --line: rgba(85, 111, 145, 0.16);
    --success: #16B364;
    --warning: #F79009;
    --danger: #F04438;
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --shadow: 0 18px 50px rgba(11, 78, 162, 0.12);
    --shadow-soft: 0 10px 24px rgba(11, 78, 162, 0.08);
    --sidebar-width: 292px;
    --sidebar-compact: 92px;
    --content-pad: clamp(16px, 2.2vw, 34px);
}

[data-theme="dark"] {
    --bg: #06111F;
    --surface: rgba(10, 25, 47, 0.78);
    --surface-strong: rgba(12, 28, 52, 0.95);
    --text: #E9F2FF;
    --muted: #9CAFCA;
    --border: rgba(255, 255, 255, 0.1);
    --line: rgba(255, 255, 255, 0.1);
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    --shadow-soft: 0 10px 24px rgba(0, 0, 0, 0.22);
}

* { box-sizing: border-box; }

html {
    min-height: 100%;
    max-width: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 5%, rgba(21, 101, 255, 0.18), transparent 320px),
        radial-gradient(circle at 88% 12%, rgba(11, 78, 162, 0.12), transparent 280px),
        linear-gradient(135deg, var(--bg), #F8FBFF 58%, var(--bg));
    overflow-x: hidden;
    transition: background 0.25s ease, color 0.25s ease;
}

img,
svg,
canvas,
video {
    max-width: 100%;
}

[data-theme="dark"] body {
    background:
        radial-gradient(circle at 12% 5%, rgba(21, 101, 255, 0.22), transparent 320px),
        radial-gradient(circle at 88% 12%, rgba(11, 78, 162, 0.18), transparent 280px),
        linear-gradient(135deg, #06111F, #091A31 58%, #06111F);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(11, 78, 162, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(11, 78, 162, 0.045) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent 72%);
}

a { color: inherit; }

button, input, select, textarea {
    font: inherit;
}

.layout {
    display: flex;
    align-items: stretch;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

.sidebar {
    position: sticky;
    top: 0;
    z-index: 80;
    width: var(--sidebar-width);
    flex: 0 0 var(--sidebar-width);
    height: 100vh;
    padding: 14px;
    transition: width 0.28s ease, flex-basis 0.28s ease, transform 0.28s ease;
}

.sidebar-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(7, 22, 44, 0.98), rgba(8, 28, 58, 0.96)),
        radial-gradient(circle at 25% 0%, rgba(21, 101, 255, 0.26), transparent 300px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(7, 22, 44, 0.28);
}

.brand-box {
    margin: 14px;
    padding: 16px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(255, 255, 255, 0.11);
    backdrop-filter: blur(18px);
}

.brand-top {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-logo {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    overflow: hidden;
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 30px rgba(21, 101, 255, 0.28);
}

.brand-logo img {
    width: 86%;
    height: 86%;
    object-fit: contain;
}

.brand-info {
    min-width: 0;
}

.brand-info h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 900;
    letter-spacing: 0;
}

.brand-info p {
    margin: 4px 0 0;
    color: #AFC3E0;
    font-size: 12px;
    line-height: 1.35;
}

.brand-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
}

.status-chip,
.clock-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 9px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    background: rgba(255, 255, 255, 0.08);
    color: #DDEAFF;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.status-dot,
.notification-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--success);
    box-shadow: 0 0 0 6px rgba(22, 179, 100, 0.15);
    animation: pulse 1.8s ease-in-out infinite;
}

.sidebar-collapse,
.icon-button,
.mobile-menu-toggle {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text);
    background: var(--surface-strong);
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.sidebar-collapse {
    width: 38px;
    height: 38px;
    color: #fff;
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.13);
    box-shadow: none;
}

.icon-button {
    position: relative;
    flex: 0 0 auto;
}

.icon-button:hover,
.mobile-menu-toggle:hover,
.sidebar-collapse:hover,
.btn:hover,
.btn-open:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(21, 101, 255, 0.18);
}

.notification-dot {
    position: absolute;
    top: 9px;
    right: 9px;
    width: 7px;
    height: 7px;
    box-shadow: 0 0 0 4px rgba(22, 179, 100, 0.12);
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 14px 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.menu::-webkit-scrollbar,
.sidebar-shell::-webkit-scrollbar {
    width: 7px;
}

.menu::-webkit-scrollbar-thumb,
.sidebar-shell::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
}

.menu-section {
    display: grid;
    gap: 4px;
}

.menu-title {
    margin: 16px 12px 8px;
    color: #8EA3C0;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 8px 10px;
    border-radius: 16px;
    color: #DCE7F7;
    text-decoration: none;
    isolation: isolate;
    transition: transform 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.nav-link::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(21, 101, 255, 0.28), rgba(255, 255, 255, 0.04));
    opacity: 0;
    transition: opacity 0.22s ease;
}

.nav-link:hover {
    transform: translateX(4px);
}

.nav-link:hover::before,
.nav-link.active::before {
    opacity: 1;
}

.nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    box-shadow: 0 14px 30px rgba(21, 101, 255, 0.22);
}

.nav-link.active::after {
    content: "";
    position: absolute;
    left: -6px;
    top: 14px;
    bottom: 14px;
    width: 3px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.75);
}

.nav-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
}

.nav-text {
    min-width: 0;
    overflow: hidden;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-meta {
    margin: auto 20px 12px;
    color: #8EA3C0;
    font-size: 11px;
    font-weight: 700;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 14px 14px;
    padding: 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar,
.mini-avatar {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    color: #fff;
    font-weight: 900;
    box-shadow: 0 12px 26px rgba(21, 101, 255, 0.24);
}

.mini-avatar {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    border-radius: 11px;
    font-size: 12px;
}

.user-info {
    min-width: 0;
}

.user-info h4 {
    margin: 0;
    overflow: hidden;
    font-size: 13px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-info p {
    margin: 4px 0 0;
    color: #9EB2D0;
    font-size: 11px;
    font-weight: 700;
}

.main {
    flex: 1;
    min-width: 0;
    width: calc(100% - var(--sidebar-width));
    max-width: 100%;
    padding: var(--content-pad);
    overflow-x: clip;
}

.topbar {
    position: sticky;
    top: 14px;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
    max-width: 100%;
    margin-bottom: clamp(18px, 2vw, 28px);
    padding: 16px clamp(16px, 2vw, 24px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(20px);
}

.topbar-title {
    min-width: 220px;
    max-width: 100%;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.breadcrumb i {
    font-size: 9px;
}

.topbar h1 {
    margin: 0;
    font-size: clamp(24px, 3vw, 38px);
    font-weight: 900;
    letter-spacing: 0;
}

.topbar p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: 1;
    min-width: 280px;
    max-width: 100%;
}

.global-search {
    display: flex;
    align-items: center;
    gap: 9px;
    width: min(300px, 26vw);
    min-width: 190px;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--surface-strong);
    color: var(--muted);
}

.global-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
}

.clock-pill {
    color: var(--text);
    background: var(--surface-strong);
    border-color: var(--line);
}

.user-menu {
    position: relative;
    flex: 0 0 auto;
}

.user-menu summary {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    padding: 6px 10px 6px 7px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--surface-strong);
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    list-style: none;
    font-size: 13px;
    font-weight: 800;
}

.user-menu summary::-webkit-details-marker {
    display: none;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    display: grid;
    gap: 8px;
    min-width: 190px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface-strong);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.user-dropdown a,
.user-dropdown strong {
    padding: 9px 10px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 13px;
}

.user-dropdown a:hover {
    background: rgba(21, 101, 255, 0.1);
}

.card,
.table-card,
.chart-card,
.quick-card,
.stat-card,
.live-card {
    position: relative;
    margin-bottom: clamp(18px, 2vw, 26px);
    width: 100%;
    max-width: 100%;
    padding: clamp(18px, 2vw, 28px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(20px);
}

.card h2,
.card h3,
.table-card h3,
.chart-card h3 {
    margin: 0 0 14px;
    font-weight: 900;
    letter-spacing: 0;
}

.card h2 { font-size: clamp(22px, 2.2vw, 30px); }
.card h3, .table-card h3, .chart-card h3 { font-size: clamp(18px, 1.8vw, 24px); }

.card > p.muted,
.muted {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 16px;
    width: 100%;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.field label {
    color: var(--text);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.01em;
}

input,
select,
textarea {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: 0;
    color: var(--text);
    background: var(--surface-strong);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

textarea {
    min-height: 98px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(21, 101, 255, 0.55);
    box-shadow: 0 0 0 4px rgba(21, 101, 255, 0.13);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 18px 0 0;
}

.btn,
button.btn,
.btn-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 11px 16px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 14px 28px rgba(21, 101, 255, 0.24);
    cursor: pointer;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
    transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.btn.secondary {
    color: var(--text);
    background: var(--surface-strong);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--line);
}

.btn.danger {
    background: linear-gradient(135deg, #B42318, var(--danger));
}

.btn.small {
    min-height: 34px;
    padding: 8px 11px;
    border-radius: 11px;
    font-size: 12px;
}

.table-wrap {
    width: 100%;
    max-width: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface-strong);
}

.table {
    width: 100%;
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0;
}

.table th,
.table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
    font-size: 13px;
    line-height: 1.45;
}

.table th {
    position: sticky;
    top: 0;
    z-index: 2;
    color: var(--muted);
    background: rgba(232, 241, 255, 0.94);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

[data-theme="dark"] .table th {
    background: rgba(15, 35, 64, 0.96);
}

.table tr:nth-child(even) td {
    background: rgba(21, 101, 255, 0.035);
}

.table tr:hover td {
    background: rgba(21, 101, 255, 0.08);
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 26px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(21, 101, 255, 0.11);
    color: var(--primary);
    font-size: 11px;
    font-weight: 900;
}

.badge.green { background: rgba(22, 179, 100, 0.13); color: var(--success); }
.badge.red { background: rgba(240, 68, 56, 0.12); color: var(--danger); }
.badge.amber { background: rgba(247, 144, 9, 0.14); color: var(--warning); }

.flash {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 800;
    box-shadow: var(--shadow-soft);
}

.flash.success {
    color: #087443;
    background: rgba(22, 179, 100, 0.13);
    border: 1px solid rgba(22, 179, 100, 0.18);
}

.flash.error {
    color: #B42318;
    background: rgba(240, 68, 56, 0.12);
    border: 1px solid rgba(240, 68, 56, 0.18);
}

.schedule-cell {
    min-width: 128px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(21, 101, 255, 0.06);
    font-size: 12px;
    line-height: 1.35;
}

.schedule-cell strong {
    font-size: 12px;
}

.locked {
    border-color: rgba(247, 144, 9, 0.45);
    background: rgba(247, 144, 9, 0.12);
}

.mobile-menu-toggle,
.sidebar-backdrop {
    display: none;
}

.sidebar-collapsed .sidebar {
    width: var(--sidebar-compact);
    flex-basis: var(--sidebar-compact);
}

.sidebar-collapsed .brand-info,
.sidebar-collapsed .brand-bottom .status-chip,
.sidebar-collapsed .menu-title,
.sidebar-collapsed .nav-text,
.sidebar-collapsed .sidebar-meta,
.sidebar-collapsed .user-info {
    display: none;
}

.sidebar-collapsed .brand-box,
.sidebar-collapsed .sidebar-user {
    padding: 10px;
}

.sidebar-collapsed .brand-top,
.sidebar-collapsed .sidebar-user {
    justify-content: center;
}

.sidebar-collapsed .sidebar-collapse i {
    transform: rotate(180deg);
}

.sidebar-collapsed .nav-link {
    justify-content: center;
}

.sidebar-collapsed .main {
    width: calc(100% - var(--sidebar-compact));
}

.dashboard-shell {
    display: grid;
    gap: clamp(18px, 2vw, 28px);
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 360px;
    width: 100%;
    max-width: 100%;
    padding: clamp(24px, 4vw, 48px);
    border-radius: 32px;
    color: #fff;
    background:
        radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.18), transparent 190px),
        linear-gradient(135deg, #07162C 0%, #0B4EA2 50%, #1565FF 100%);
    box-shadow: 0 26px 70px rgba(11, 78, 162, 0.26);
    isolation: isolate;
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    animation: floatBlob 10s ease-in-out infinite;
}

.hero::before {
    width: 420px;
    height: 420px;
    right: -120px;
    top: -160px;
}

.hero::after {
    width: 280px;
    height: 280px;
    left: -100px;
    bottom: -120px;
    animation-delay: -3s;
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 330px);
    gap: clamp(24px, 4vw, 52px);
    align-items: center;
    min-width: 0;
}

.hero-badge,
.hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 34px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.92);
    font-size: 12px;
    font-weight: 900;
    backdrop-filter: blur(12px);
}

.hero h2 {
    max-width: 860px;
    margin: 18px 0 14px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.03;
    font-weight: 900;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(14px, 1.3vw, 17px);
    line-height: 1.75;
}

.hero-panel {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(18px);
    min-width: 0;
}

.hero-logo {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    width: min(100%, 210px);
    margin: 0 auto;
    padding: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
}

.hero-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hero-chips,
.hero-stats,
.quick-grid,
.stats-grid,
.live-status {
    display: grid;
    gap: 16px;
}

.hero-chips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hero-stats {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
    margin-top: 26px;
}

.hero-stat {
    padding: 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
}

.hero-stat h3 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    font-weight: 900;
}

.hero-stat p {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.35;
}

.live-status {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.live-card {
    margin-bottom: 0;
}

.live-top,
.stat-top,
.chart-head,
.table-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.live-title,
.stat-label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

.live-value,
.stat-value {
    margin-top: 8px;
    font-size: clamp(28px, 3.4vw, 44px);
    font-weight: 900;
}

.quick-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.quick-card {
    display: block;
    min-height: 184px;
    margin-bottom: 0;
    color: var(--text);
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.quick-card:hover,
.stat-card:hover,
.live-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.quick-card::after {
    content: "";
    position: absolute;
    right: -46px;
    bottom: -54px;
    width: 150px;
    height: 150px;
    border-radius: 999px;
    background: rgba(21, 101, 255, 0.08);
}

.quick-icon,
.stat-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 14px 28px rgba(21, 101, 255, 0.24);
}

.quick-card h3 {
    margin: 16px 0 8px;
    font-size: 18px;
    font-weight: 900;
}

.quick-card p,
.table-head p,
.chart-head p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stat-card {
    margin-bottom: 0;
    overflow: hidden;
}

.stat-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(18px, 2vw, 26px);
}

.table-search {
    width: min(320px, 100%);
}

.empty-state {
    padding: 54px 18px;
    text-align: center;
    color: var(--muted);
}

.empty-state i {
    margin-bottom: 14px;
    font-size: 42px;
}

.empty-state strong {
    display: block;
    color: var(--text);
    font-size: 17px;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    55% { transform: scale(1.32); opacity: 0.72; }
}

@keyframes floatBlob {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(14px, 20px, 0); }
}

@media (max-width: 1180px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar-actions {
        width: 100%;
        min-width: 0;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .global-search {
        flex: 1 1 260px;
        width: auto;
    }

    .hero-inner,
    .chart-grid {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        max-width: 520px;
        width: 100%;
    }
}

@media (max-width: 1024px) {
    body {
        background-attachment: fixed;
    }

    .layout {
        display: block;
        overflow-x: hidden;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(88vw, 320px);
        height: 100vh;
        padding: 10px;
        transform: translateX(-105%);
    }

    .sidebar-shell {
        border-radius: 24px;
    }

    .sidebar-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 70;
        background: rgba(5, 16, 31, 0.48);
        backdrop-filter: blur(4px);
    }

    .sidebar-open .sidebar-backdrop {
        display: block;
    }

    .mobile-menu-toggle {
        position: fixed;
        top: 18px;
        left: 18px;
        z-index: 90;
        display: grid;
        color: #fff;
        border-color: rgba(255, 255, 255, 0.16);
        background: linear-gradient(135deg, var(--primary), var(--accent));
    }

    .sidebar-collapse {
        display: none;
    }

    .sidebar-collapsed .sidebar {
        width: min(88vw, 320px);
        flex-basis: auto;
    }

    .sidebar-collapsed .brand-info,
    .sidebar-collapsed .brand-bottom .status-chip,
    .sidebar-collapsed .menu-title,
    .sidebar-collapsed .nav-text,
    .sidebar-collapsed .sidebar-meta,
    .sidebar-collapsed .user-info {
        display: block;
    }

    .sidebar-collapsed .nav-link {
        justify-content: flex-start;
    }

    .main,
    .sidebar-collapsed .main {
        width: 100%;
        max-width: 100%;
        padding-top: 86px;
        overflow-x: hidden;
    }

    .topbar {
        position: relative;
        top: 0;
    }
}

@media (max-width: 720px) {
    .mobile-menu-toggle {
        top: 12px;
        left: 12px;
        width: 46px;
        height: 46px;
        border-radius: 14px;
    }

    .main,
    .sidebar-collapsed .main {
        padding: 72px 12px 18px;
    }

    .topbar {
        gap: 14px;
        margin-bottom: 16px;
    }

    .topbar-title {
        min-width: 0;
        width: 100%;
    }

    .topbar h1 {
        font-size: 24px;
        line-height: 1.12;
    }

    .topbar p {
        font-size: 12px;
    }

    .topbar-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 46px 46px;
        width: 100%;
        min-width: 0;
        gap: 8px;
    }

    .global-search,
    .user-menu {
        grid-column: 1 / -1;
        width: 100%;
        min-width: 0;
    }

    .clock-pill {
        grid-column: 1;
        grid-row: 2;
        width: 100%;
        min-width: 0;
        justify-content: center;
    }

    .icon-button {
        width: 46px;
        min-width: 0;
        box-shadow: none;
    }

    .topbar-actions > .icon-button:first-of-type {
        grid-column: 2;
        grid-row: 2;
    }

    .topbar-actions > .icon-button:nth-of-type(2) {
        grid-column: 3;
        grid-row: 2;
    }

    .user-menu summary {
        justify-content: space-between;
        width: 100%;
    }

    .hero {
        min-height: 0;
        padding: 22px;
        border-radius: 24px;
    }

    .hero h2 {
        margin-top: 14px;
        font-size: 31px;
        line-height: 1.08;
    }

    .hero p {
        font-size: 13px;
        line-height: 1.65;
    }

    .hero-stats,
    .hero-chips {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        padding: 14px;
        border-radius: 22px;
    }

    .hero-logo {
        width: 150px;
    }

    .table-head,
    .chart-head,
    .live-top,
    .stat-top {
        flex-direction: column;
    }

    .grid,
    .quick-grid,
    .stats-grid,
    .live-status {
        grid-template-columns: 1fr;
    }

    .table {
        min-width: 680px;
    }

    .table th,
    .table td {
        padding: 12px;
        font-size: 12px;
    }
}

@media (max-width: 520px) {
    :root {
        --content-pad: 14px;
    }

    .main,
    .sidebar-collapsed .main {
        padding: 68px 10px 16px;
    }

    .sidebar {
        width: 92vw;
        padding: 8px;
    }

    .sidebar-shell {
        border-radius: 20px;
    }

    .brand-box {
        margin: 10px;
        padding: 12px;
        border-radius: 18px;
    }

    .brand-logo {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
        border-radius: 14px;
    }

    .brand-info h2 {
        font-size: 15px;
    }

    .brand-info p,
    .status-chip {
        font-size: 11px;
    }

    .menu {
        padding: 0 10px 12px;
    }

    .nav-link {
        min-height: 44px;
        border-radius: 14px;
    }

    .nav-icon {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
    }

    .topbar {
        border-radius: 20px;
        padding: 12px;
    }

    .breadcrumb {
        flex-wrap: wrap;
        gap: 6px;
    }

    .global-search,
    .clock-pill,
    .user-menu summary,
    input,
    select,
    textarea {
        min-height: 42px;
        border-radius: 13px;
    }

    .card,
    .table-card,
    .chart-card,
    .quick-card,
    .stat-card,
    .live-card {
        border-radius: 20px;
        padding: 16px;
        margin-bottom: 14px;
    }

    .actions .btn {
        width: 100%;
    }

    .hero h2 {
        font-size: 27px;
    }

    .hero {
        padding: 18px;
    }

    .hero-badge,
    .hero-chip {
        width: 100%;
        justify-content: center;
        white-space: normal;
        text-align: center;
    }

    .hero-stat {
        padding: 14px;
        border-radius: 16px;
    }

    .hero-stat h3 {
        font-size: 28px;
    }

    .quick-card {
        min-height: 0;
    }

    .quick-icon,
    .stat-icon {
        width: 50px;
        height: 50px;
        border-radius: 16px;
    }

    .table {
        min-width: 620px;
    }

    .empty-state {
        padding: 34px 12px;
    }
}

@media (max-width: 380px) {
    .main,
    .sidebar-collapsed .main {
        padding-left: 8px;
        padding-right: 8px;
    }

    .topbar h1 {
        font-size: 22px;
    }

    .hero h2 {
        font-size: 24px;
    }

    .card,
    .table-card,
    .chart-card,
    .quick-card,
    .stat-card,
    .live-card {
        padding: 14px;
    }
}
