:root,
[data-bs-theme="light"] {
    color-scheme: light;
    --gm-bg: #f3f5f2;
    --gm-surface: #ffffff;
    --gm-surface-raised: #ffffff;
    --gm-surface-muted: #edf1ed;
    --gm-surface-hover: #f7f9f7;
    --gm-text: #18211d;
    --gm-heading: #101713;
    --gm-muted: #607068;
    --gm-subtle: #849189;
    --gm-border: #dce3de;
    --gm-border-strong: #cbd5ce;
    --gm-accent: #2f6b49;
    --gm-accent-hover: #25583c;
    --gm-accent-soft: #e3f0e7;
    --gm-sidebar: #111815;
    --gm-sidebar-raised: #19221e;
    --gm-shadow: 0 1px 2px rgba(20, 35, 27, .04), 0 12px 32px rgba(20, 35, 27, .055);
    --gm-shadow-lg: 0 24px 70px rgba(12, 28, 19, .14);
    --bs-body-bg: var(--gm-bg);
    --bs-body-color: var(--gm-text);
    --bs-secondary-bg: var(--gm-surface-muted);
    --bs-tertiary-bg: #f5f7f5;
    --bs-border-color: var(--gm-border);
    --bs-secondary-color: var(--gm-muted);
    --bs-link-color: var(--gm-accent);
    --bs-link-hover-color: var(--gm-accent-hover);
}

[data-bs-theme="dark"] {
    color-scheme: dark;
    --gm-bg: #0c110f;
    --gm-surface: #131a17;
    --gm-surface-raised: #17201c;
    --gm-surface-muted: #1b2521;
    --gm-surface-hover: #1a231f;
    --gm-text: #e7eee9;
    --gm-heading: #f5f8f6;
    --gm-muted: #a3b0a9;
    --gm-subtle: #7e8c85;
    --gm-border: #29342f;
    --gm-border-strong: #36433d;
    --gm-accent: #74bb8c;
    --gm-accent-hover: #91cba4;
    --gm-accent-soft: #1c3426;
    --gm-sidebar: #090e0c;
    --gm-sidebar-raised: #131b17;
    --gm-shadow: 0 1px 2px rgba(0, 0, 0, .24), 0 18px 42px rgba(0, 0, 0, .16);
    --gm-shadow-lg: 0 30px 80px rgba(0, 0, 0, .42);
    --bs-body-bg: var(--gm-bg);
    --bs-body-color: var(--gm-text);
    --bs-secondary-bg: var(--gm-surface-muted);
    --bs-tertiary-bg: #171f1c;
    --bs-border-color: var(--gm-border);
    --bs-secondary-color: var(--gm-muted);
    --bs-link-color: var(--gm-accent);
    --bs-link-hover-color: var(--gm-accent-hover);
}

* { scrollbar-width: thin; scrollbar-color: var(--gm-border-strong) transparent; }
html { min-width: 320px; background: var(--gm-bg); }
body { min-height: 100vh; margin: 0; background: var(--gm-bg); color: var(--gm-text); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: .9375rem; line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { text-underline-offset: .18em; }
code { padding: .17rem .38rem; border-radius: .38rem; background: var(--gm-surface-muted); color: var(--gm-accent); font-size: .83em; }
.skip-link { position: fixed; top: .75rem; left: .75rem; z-index: 2000; padding: .7rem 1rem; border: 1px solid var(--gm-border-strong); border-radius: .65rem; background: var(--gm-surface); color: var(--gm-text); box-shadow: var(--gm-shadow); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid #bb7500 !important; outline-offset: 3px; }
[data-bs-theme="dark"] :focus-visible { outline-color: #ffbf52 !important; }

/* Application shell */
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 1040; display: flex; width: 252px; flex-direction: column; padding: 1.25rem 1rem 1rem; overflow-y: auto; color: #f1f6f3; background: var(--gm-sidebar); border-right: 1px solid rgba(255, 255, 255, .07); }
.brand { display: flex; align-items: center; gap: .8rem; min-height: 52px; margin: 0 .25rem 1.4rem; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-mark { position: relative; display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; overflow: hidden; border: 1px solid rgba(255, 255, 255, .14); border-radius: 12px; background: #69a97c; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 8px 24px rgba(0, 0, 0, .18); color: #0d2115; font-size: 1.08rem; font-weight: 850; letter-spacing: -.06em; }
.brand-mark::after { position: absolute; width: 24px; height: 24px; right: -9px; bottom: -10px; border-radius: 50%; background: rgba(255, 255, 255, .28); content: ""; }
.brand-copy { display: block; line-height: 1.15; }
.brand-copy strong { display: block; font-size: 1rem; font-weight: 760; letter-spacing: -.015em; }
.brand-copy small { display: block; margin-top: .28rem; color: #85948c; font-size: .63rem; font-weight: 650; letter-spacing: .115em; text-transform: uppercase; }
.sidebar .nav { gap: .25rem; }
.nav-section { display: block; padding: 1.2rem .75rem .45rem; color: #67756e; font-size: .64rem; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }
.nav-section:first-child { padding-top: .25rem; }
.sidebar .nav-link { position: relative; display: flex; min-height: 44px; align-items: center; gap: .72rem; padding: .58rem .7rem; border: 1px solid transparent; border-radius: 10px; color: #aab7b0; font-size: .87rem; font-weight: 570; text-decoration: none; transition: color .16s ease, background-color .16s ease, border-color .16s ease; }
.sidebar .nav-link:hover { color: #f6faf7; background: rgba(255, 255, 255, .045); }
.sidebar .nav-link.active { color: #fff; background: var(--gm-sidebar-raised); border-color: rgba(255, 255, 255, .07); box-shadow: 0 6px 22px rgba(0, 0, 0, .13); }
.sidebar .nav-link.active::before { position: absolute; left: -1rem; width: 3px; height: 22px; border-radius: 0 5px 5px 0; background: #75bd8d; content: ""; }
.sidebar .nav-icon { display: grid; width: 27px; height: 27px; flex: 0 0 auto; place-items: center; border-radius: 8px; color: #829189; }
.sidebar .nav-link.active .nav-icon { color: #86c99b; background: rgba(116, 187, 140, .1); }
.sidebar .nav-link small { margin-left: auto; color: #66736d; font-size: .62rem; font-weight: 750; }
.sidebar .nav-link.disabled { color: #59665f; cursor: not-allowed; }
.sidebar .nav-link.disabled .nav-icon { color: #515e57; }
.sidebar-footer { display: flex; align-items: center; gap: .72rem; margin-top: auto; padding: 1rem .55rem .15rem; border-top: 1px solid rgba(255, 255, 255, .075); }
.user-avatar { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(255, 255, 255, .12); border-radius: 10px; background: #25372e; color: #a9dbb8; font-size: .8rem; font-weight: 800; }
.profile-copy { min-width: 0; line-height: 1.2; }
.profile-copy a { color: #eef4f0; font-size: .8rem; text-decoration: none; }
.profile-copy small { color: #75837b; font-size: .69rem; }
.sidebar-logout-form { margin: 0 0 0 auto; }
.sidebar-logout { display: grid; width: 32px; height: 32px; padding: 0; place-items: center; border: 0; border-radius: 8px; color: #7f8e86; background: transparent; text-decoration: none; cursor: pointer; }
.sidebar-logout:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.sidebar-backdrop { display: none; }
.main-content { min-height: 100vh; margin-left: 252px; }
.topbar { position: sticky; top: 0; z-index: 1020; display: flex; height: 68px; align-items: center; padding: 0 1.75rem; border-bottom: 1px solid color-mix(in srgb, var(--gm-border) 78%, transparent); background: color-mix(in srgb, var(--gm-bg) 88%, transparent); backdrop-filter: blur(18px) saturate(140%); }
.topbar-heading { display: flex; flex-direction: column; line-height: 1.12; }
.topbar-heading span { color: var(--gm-subtle); font-size: .61rem; font-weight: 750; letter-spacing: .105em; text-transform: uppercase; }
.topbar-heading strong { margin-top: .2rem; color: var(--gm-heading); font-size: .86rem; font-weight: 690; }
.topbar-action, .theme-toggle { display: inline-flex; min-width: 38px; height: 38px; align-items: center; justify-content: center; border: 1px solid var(--gm-border); border-radius: 10px; background: var(--gm-surface); box-shadow: 0 1px 2px rgba(15, 28, 21, .03); color: var(--gm-muted); text-decoration: none; transition: border-color .15s ease, color .15s ease, background-color .15s ease, transform .15s ease; }
.topbar-action:hover, .theme-toggle:hover { border-color: var(--gm-border-strong); background: var(--gm-surface-hover); color: var(--gm-heading); transform: translateY(-1px); }
.theme-toggle { gap: .48rem; padding: 0 .72rem; }
.theme-toggle-label { font-size: .76rem; font-weight: 650; }
.theme-toggle-icon { display: grid; width: 17px; place-items: center; }
.system-state { align-items: center; gap: .5rem; margin-right: .35rem; color: var(--gm-muted); font-size: .75rem; font-weight: 560; }
.system-state span { width: 7px; height: 7px; border-radius: 50%; background: #42a768; box-shadow: 0 0 0 4px rgba(66, 167, 104, .12); }
.notification-count { position: absolute; top: -.32rem; right: -.32rem; min-width: 1.12rem; height: 1.12rem; padding: 0 .22rem; border: 2px solid var(--gm-bg); border-radius: 1rem; background: #c33d36; color: #fff; font-size: .61rem; font-weight: 800; line-height: .9rem; text-align: center; }
.content-wrap { width: 100%; max-width: 1540px; margin: 0 auto; padding: 2rem clamp(1.15rem, 2.4vw, 2.5rem) 3rem; }

/* Page structure */
.page-title { margin: 0; color: var(--gm-heading); font-size: clamp(1.65rem, 2.6vw, 2.15rem); font-weight: 760; letter-spacing: -.04em; line-height: 1.1; }
.page-subtitle { max-width: 720px; margin: .45rem 0 0; color: var(--gm-muted); font-size: .9rem; }
.page-eyebrow { display: block; margin-bottom: .5rem; color: var(--gm-accent); font-size: .67rem; font-weight: 780; letter-spacing: .12em; text-transform: uppercase; }
.page-header { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.65rem; }
.page-header-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.panel, .metric-card { border: 1px solid var(--gm-border); border-radius: 16px; background: var(--gm-surface); box-shadow: var(--gm-shadow); }
.panel { overflow: hidden; }
.panel-header { display: flex; min-height: 64px; align-items: center; justify-content: space-between; gap: 1rem; padding: .95rem 1.25rem; border-bottom: 1px solid var(--gm-border); }
.panel-header strong, .panel-title { margin: 0; color: var(--gm-heading); font-size: .91rem; font-weight: 700; letter-spacing: -.01em; }
.panel-header .small { margin-top: .2rem; color: var(--gm-muted); font-size: .75rem; }
.panel-body { padding: 1.25rem; }
.metric-card { position: relative; height: 100%; min-height: 126px; padding: 1.05rem; overflow: hidden; }
.metric-card::after { position: absolute; right: -24px; bottom: -38px; width: 86px; height: 86px; border-radius: 50%; background: var(--metric-glow, rgba(47, 107, 73, .06)); content: ""; }
.metric-card.tone-success { --metric-accent: #2e8a58; --metric-soft: #e3f5e9; --metric-glow: rgba(46, 138, 88, .1); }
.metric-card.tone-danger { --metric-accent: #b54741; --metric-soft: #faeae8; --metric-glow: rgba(181, 71, 65, .1); }
.metric-card.tone-warning { --metric-accent: #9a6a16; --metric-soft: #f8efd9; --metric-glow: rgba(154, 106, 22, .1); }
.metric-label { max-width: 135px; color: var(--gm-muted); font-size: .69rem; font-weight: 720; letter-spacing: .06em; line-height: 1.3; text-transform: uppercase; }
.metric-value { margin-top: .62rem; color: var(--gm-heading) !important; font-size: 2rem; font-weight: 760; letter-spacing: -.045em; line-height: 1; }
.metric-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 10px; background: var(--metric-soft, var(--gm-accent-soft)); color: var(--metric-accent, var(--gm-accent)); font-size: .88rem; }
[data-bs-theme="dark"] .metric-card.tone-success { --metric-soft: #193325; --metric-accent: #79c793; }
[data-bs-theme="dark"] .metric-card.tone-danger { --metric-soft: #3a2220; --metric-accent: #ee938d; }
[data-bs-theme="dark"] .metric-card.tone-warning { --metric-soft: #382e1b; --metric-accent: #e3bd68; }

/* Controls */
.btn { min-height: 40px; padding: .55rem .9rem; border-radius: 10px; font-size: .82rem; font-weight: 650; box-shadow: none !important; }
.btn-sm { min-height: 34px; padding: .4rem .7rem; border-radius: 9px; font-size: .76rem; }
.btn-lg { min-height: 48px; border-radius: 11px; font-size: .9rem; }
.btn-primary { --bs-btn-bg: #2f6b49; --bs-btn-border-color: #2f6b49; --bs-btn-hover-bg: #25583c; --bs-btn-hover-border-color: #25583c; --bs-btn-active-bg: #204d34; --bs-btn-active-border-color: #204d34; --bs-btn-disabled-bg: #759281; --bs-btn-disabled-border-color: #759281; color: #fff; }
[data-bs-theme="dark"] .btn-primary { --bs-btn-bg: #4b9367; --bs-btn-border-color: #4b9367; --bs-btn-hover-bg: #5fa978; --bs-btn-hover-border-color: #5fa978; color: #08110c; }
.btn-light { --bs-btn-bg: var(--gm-surface); --bs-btn-border-color: var(--gm-border); --bs-btn-hover-bg: var(--gm-surface-hover); --bs-btn-hover-border-color: var(--gm-border-strong); --bs-btn-color: var(--gm-text); }
.btn-outline-secondary { --bs-btn-color: var(--gm-muted); --bs-btn-border-color: var(--gm-border-strong); --bs-btn-hover-color: var(--gm-heading); --bs-btn-hover-bg: var(--gm-surface-muted); --bs-btn-hover-border-color: var(--gm-border-strong); }
.btn-outline-primary { --bs-btn-color: var(--gm-accent); --bs-btn-border-color: color-mix(in srgb, var(--gm-accent) 50%, var(--gm-border)); --bs-btn-hover-bg: var(--gm-accent-soft); --bs-btn-hover-border-color: var(--gm-accent); --bs-btn-hover-color: var(--gm-accent-hover); }
.form-label { margin-bottom: .42rem; color: var(--gm-text); font-size: .78rem; font-weight: 650; }
.form-control, .form-select, .input-group-text { min-height: 42px; border-color: var(--gm-border-strong); border-radius: 10px; background-color: var(--gm-surface-raised); color: var(--gm-text); font-size: .85rem; }
.form-control::placeholder { color: var(--gm-subtle); opacity: .8; }
.form-control:focus, .form-select:focus { border-color: var(--gm-accent); background-color: var(--gm-surface-raised); color: var(--gm-text); box-shadow: 0 0 0 .22rem color-mix(in srgb, var(--gm-accent) 15%, transparent); }
.input-group > .input-group-text:first-child { border-radius: 10px 0 0 10px; color: var(--gm-subtle); }
.input-group > .form-control:last-child { border-radius: 0 10px 10px 0; }
.form-check-input { border-color: var(--gm-border-strong); background-color: var(--gm-surface-raised); }
.form-check-input:checked { border-color: var(--gm-accent); background-color: var(--gm-accent); }
.form-text { color: var(--gm-muted); font-size: .72rem; }
textarea.form-control { min-height: 118px; }
.dropdown-menu { padding: .4rem; border-color: var(--gm-border); border-radius: 12px; background: var(--gm-surface-raised); box-shadow: var(--gm-shadow-lg); }
.dropdown-item { padding: .58rem .72rem; border-radius: 8px; color: var(--gm-text); font-size: .8rem; }
.dropdown-item:hover { background: var(--gm-surface-muted); color: var(--gm-heading); }
.dropdown-divider { border-color: var(--gm-border); }

/* Tables and status */
.table { --bs-table-bg: transparent; --bs-table-color: var(--gm-text); --bs-table-border-color: var(--gm-border); margin: 0; }
.table > :not(caption) > * > * { padding: .86rem .78rem; }
.table thead th { border-bottom-width: 1px; background: color-mix(in srgb, var(--gm-surface-muted) 64%, transparent); color: var(--gm-muted); font-size: .65rem; font-weight: 750; letter-spacing: .065em; text-transform: uppercase; white-space: nowrap; }
.table tbody td { border-bottom-color: color-mix(in srgb, var(--gm-border) 72%, transparent); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color .12s ease; }
.table tbody tr:hover { background: var(--gm-surface-hover); }
.table-danger { --bs-table-bg: color-mix(in srgb, #b54741 10%, transparent); }
.device-name { color: var(--gm-heading); font-weight: 680; text-decoration: none; }
.device-name:hover { color: var(--gm-accent); }
.badge { padding: .38rem .58rem; border-radius: 999px; font-size: .66rem; font-weight: 720; letter-spacing: .015em; }
.badge-soft-success { background: #e1f3e7; color: #256b43; }
.badge-soft-danger { background: #f8e6e4; color: #9e3833; }
.badge-soft-warning { background: #f7edd3; color: #815a12; }
.badge-soft-secondary { background: #e8eeea; color: #526159; }
[data-bs-theme="dark"] .badge-soft-success { background: #193426; color: #8ad1a1; }
[data-bs-theme="dark"] .badge-soft-danger { background: #3b2220; color: #f0a09a; }
[data-bs-theme="dark"] .badge-soft-warning { background: #392f1d; color: #e7c46f; }
[data-bs-theme="dark"] .badge-soft-secondary { background: #26312c; color: #bdc8c2; }
.text-bg-light { background: var(--gm-surface-muted) !important; color: var(--gm-text) !important; }
.text-body-secondary { color: var(--gm-muted) !important; }

/* Charts */
.chart-columns { display: flex; min-height: 218px; align-items: end; gap: clamp(.28rem, .65vw, .62rem); margin: 0; padding: 1.25rem .15rem 1.55rem; background-image: linear-gradient(to top, color-mix(in srgb, var(--gm-border) 68%, transparent) 1px, transparent 1px); background-size: 100% 25%; }
.chart-column { display: flex; min-width: 16px; height: 180px; flex: 1; flex-direction: column; justify-content: end; align-items: center; gap: .38rem; color: var(--gm-muted); }
.chart-column > .small { min-height: 18px; font-size: .66rem; font-weight: 700 !important; }
.chart-column-bar { width: min(24px, 74%); min-height: 4px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #68ad7d, #2f6b49); box-shadow: 0 4px 10px rgba(47, 107, 73, .12); }
.chart-column.availability .chart-column-bar { background: linear-gradient(180deg, #6caac6, #356f8a); box-shadow: 0 4px 10px rgba(53, 111, 138, .12); }
.chart-column-label { margin-bottom: -1.05rem; color: var(--gm-subtle); font-size: .58rem; white-space: nowrap; transform: rotate(-42deg); transform-origin: center; }
.distribution-row { display: grid; grid-template-columns: minmax(110px, 1fr) 2fr 2.25rem; align-items: center; gap: .85rem; margin-bottom: .95rem; font-size: .82rem; }
.distribution-row:last-child { margin-bottom: 0; }
.distribution-track { height: 7px; overflow: hidden; border-radius: 999px; background: var(--gm-surface-muted); }
.distribution-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #386f4e, #70b686); }

/* Feedback, lists and details */
.alert { border: 1px solid transparent; border-radius: 12px; font-size: .83rem; }
.alert-success { border-color: #bddfc8; background: #e7f5eb; color: #255b3a; }
.alert-warning { border-color: #ead7a6; background: #faf3df; color: #684b18; }
.alert-danger { border-color: #e8bbb7; background: #faeae8; color: #7f302c; }
.alert-info { border-color: #bcd7e3; background: #e9f3f7; color: #29596e; }
[data-bs-theme="dark"] .alert-success { border-color: #285338; background: #172d20; color: #a4d9b4; }
[data-bs-theme="dark"] .alert-warning { border-color: #554722; background: #2c2619; color: #e8cb83; }
[data-bs-theme="dark"] .alert-danger { border-color: #60322e; background: #301f1d; color: #f0aaa5; }
[data-bs-theme="dark"] .alert-info { border-color: #294d5d; background: #172a32; color: #a7d3e6; }
.list-group-item { border-color: var(--gm-border); background: var(--gm-surface); color: var(--gm-text); }
.notification-unread { position: relative; background: color-mix(in srgb, var(--gm-accent-soft) 52%, var(--gm-surface)); }
.notification-unread::before { position: absolute; inset: 1rem auto 1rem 0; width: 3px; border-radius: 0 3px 3px 0; background: var(--gm-accent); content: ""; }
.audit-context { max-width: 34rem; max-height: 16rem; overflow: auto; padding: .8rem; border: 1px solid var(--gm-border); border-radius: 9px; background: var(--gm-surface-muted); color: var(--gm-text); font-size: .72rem; white-space: pre-wrap; overflow-wrap: anywhere; }
details summary { color: var(--gm-accent); font-size: .76rem; font-weight: 650; cursor: pointer; }
.panel-body dl.row dt { color: var(--gm-muted) !important; font-size: .76rem; font-weight: 590; }
.panel-body dl.row dd { margin-bottom: .85rem; color: var(--gm-text); font-size: .86rem; }
.nav-tabs { gap: .3rem; padding: .3rem; border: 1px solid var(--gm-border); border-radius: 12px; background: var(--gm-surface); box-shadow: 0 1px 2px rgba(20, 35, 27, .03); }
.nav-tabs .nav-link { padding: .5rem .75rem; border: 0 !important; border-radius: 8px; color: var(--gm-muted); font-size: .78rem; font-weight: 620; }
.nav-tabs .nav-link.active { background: var(--gm-surface-muted); color: var(--gm-heading); }
.nav-tabs .nav-link.disabled { color: var(--gm-subtle); opacity: .55; }
.pagination { --bs-pagination-bg: var(--gm-surface); --bs-pagination-border-color: var(--gm-border); --bs-pagination-color: var(--gm-muted); --bs-pagination-hover-bg: var(--gm-surface-muted); --bs-pagination-hover-color: var(--gm-heading); --bs-pagination-disabled-bg: var(--gm-surface-muted); --bs-pagination-disabled-border-color: var(--gm-border); }

/* Authentication */
.login-page { position: relative; display: grid; min-height: 100vh; grid-template-columns: minmax(440px, 1.08fr) minmax(430px, .92fr); background: var(--gm-bg); }
.login-visual { position: relative; display: flex; min-height: 100vh; flex-direction: column; justify-content: space-between; padding: clamp(2rem, 5vw, 5rem); overflow: hidden; background: #101815; color: #f6faf7; }
.login-visual::before { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 56px 56px; mask-image: linear-gradient(to bottom right, black, transparent 75%); content: ""; }
.login-visual::after { position: absolute; width: 480px; height: 480px; right: -180px; bottom: -210px; border: 90px solid rgba(111, 181, 133, .09); border-radius: 50%; content: ""; }
.login-visual > * { position: relative; z-index: 1; }
.login-visual .brand { margin: 0; }
.login-copy { max-width: 680px; }
.login-kicker { margin: 0 0 1.1rem; color: #88c99c; font-size: .68rem; font-weight: 780; letter-spacing: .14em; text-transform: uppercase; }
.login-visual h1 { max-width: 700px; margin: 0; color: #fff; font-size: clamp(2.6rem, 5vw, 5.3rem); font-weight: 720; letter-spacing: -.06em; line-height: .98; }
.login-visual .lead { max-width: 560px; margin-top: 1.5rem; color: #9eaea5; font-size: clamp(1rem, 1.4vw, 1.2rem); line-height: 1.65; }
.login-features { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 2rem; }
.login-feature { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .7rem; border: 1px solid rgba(255,255,255,.09); border-radius: 999px; background: rgba(255,255,255,.035); color: #b9c5be; font-size: .72rem; }
.login-feature i { color: #7fc294; }
.login-footnote { color: #718078; font-size: .7rem; }
.login-card-wrap { position: relative; display: grid; min-height: 100vh; place-items: center; padding: clamp(1.25rem, 5vw, 4.5rem); }
.login-card { width: min(430px, 100%); padding: clamp(1.5rem, 3vw, 2.25rem); border: 1px solid var(--gm-border); border-radius: 20px; background: var(--gm-surface); box-shadow: var(--gm-shadow-lg); }
.login-card h2 { margin-bottom: .4rem; color: var(--gm-heading); font-size: 1.7rem; font-weight: 750; letter-spacing: -.035em; }
.login-card .brand { color: var(--gm-heading); }
.login-theme { position: absolute; top: 1.25rem; right: 1.25rem; }

@media (max-width: 1199.98px) { .metric-card { min-height: 116px; } .login-visual h1 { font-size: clamp(2.5rem, 5vw, 4rem); } }
@media (max-width: 991.98px) {
    body.sidebar-is-open { overflow: hidden; }
    .sidebar { transform: translateX(-102%); box-shadow: 28px 0 80px rgba(0, 0, 0, .32); transition: transform .2s ease; }
    .sidebar.open { transform: translateX(0); }
    .sidebar-backdrop { position: fixed; inset: 0; z-index: 1035; display: block; border: 0; background: rgba(5, 10, 7, .48); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
    .sidebar-is-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }
    .main-content { margin-left: 0; }
    .topbar { height: 62px; padding: 0 1rem; }
    .content-wrap { padding: 1.35rem 1rem 2.5rem; }
    .login-page { grid-template-columns: 1fr; }
    .login-visual { display: none; }
    .login-card-wrap { min-height: 100vh; }
}
@media (max-width: 575.98px) {
    .page-header { align-items: stretch; flex-direction: column; }
    .page-header-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .page-header-actions .btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .page-title { font-size: 1.65rem; }
    .panel-header, .panel-body { padding-right: 1rem; padding-left: 1rem; }
    .metric-card { min-height: 112px; }
    .table > :not(caption) > * > * { padding: .78rem .7rem; }
    .login-card { padding: 1.35rem; border-radius: 16px; }
    .login-card-wrap { padding: 1rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }
