:root {
    color-scheme: light;
    --ink: #172026;
    --muted: #61717c;
    --line: #d9e1e5;
    --surface: #ffffff;
    --soft: #f4f7f8;
    --green: #157f5c;
    --teal: #0f6f78;
    --amber: #9d6a00;
    --red: #b0443b;
    --blue: #255f99;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-width: 320px;
    background: var(--soft);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 72px;
    padding: 14px clamp(16px, 3vw, 36px);
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: var(--green);
    color: white;
    font-weight: 700;
}

.brand small {
    display: block;
    color: var(--muted);
    margin-top: 2px;
}

.topnav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.account-menu { position: relative; }
.account-trigger { border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.account-dropdown { display: none; position: absolute; right: 0; top: calc(100% + 10px); z-index: 20; width: 230px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 12px 28px rgba(23,32,38,.16); }
.account-menu.is-open .account-dropdown { display: grid; gap: 8px; }
.account-dropdown small { color: var(--muted); margin-bottom: 5px; }
.account-dropdown a, .account-dropdown button { padding: 8px; border: 0; border-radius: 6px; background: transparent; text-align: left; color: var(--ink); font: inherit; cursor: pointer; }
.account-dropdown a:hover, .account-dropdown button:hover { background: var(--soft); }
.account-dropdown form { margin: 0; }
.command-account-dropdown { top: calc(100% + 14px); }
.flash { margin-bottom: 16px; padding: 12px 14px; border-radius: 8px; font-weight: 700; }
.flash.success { background: #e4f5ec; color: #116344; }.flash.error { background: #fff0ee; color: #9c3028; }.flash.info { background: #e8f1fb; color: #245d96; }
.auth-card, .account-panel { width: min(520px, 100%); margin: 42px auto; padding: 30px; }
.auth-card { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 12px 30px rgba(23,32,38,.07); }
.form-stack { display: grid; gap: 16px; }.form-stack label { display: grid; gap: 7px; font-weight: 700; }.form-stack input, .user-create input, .user-create select, .users-table input, .users-table select { min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; font: inherit; color: var(--ink); background: #fff; }
.user-create { display: grid; grid-template-columns: repeat(3, minmax(130px, 1fr)); gap: 10px; }.users-table { margin-top: 18px; overflow-x: auto; }.users-table table { width: 100%; border-collapse: collapse; }.users-table th, .users-table td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }.users-table td form + form { margin-top: 6px; }
@media (max-width: 700px) { .user-create { grid-template-columns: 1fr; } .command-user .admin-copy { display: none; } }

.topnav a,
.button {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    font-weight: 700;
    white-space: nowrap;
}

.button.primary {
    background: var(--green);
    border-color: var(--green);
    color: white;
}

.button.compact {
    min-height: 34px;
    padding: 7px 11px;
    font-size: 14px;
}

.button.disabled {
    color: var(--muted);
    background: #eef2f3;
}

.page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 52px;
}

.hero-panel,
.detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: clamp(22px, 4vw, 38px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #eff8f2 58%, #fff7e5 100%);
}

.compact-hero {
    padding: 26px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--teal);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 10px;
    font-size: clamp(30px, 5vw, 52px);
    line-height: 1.05;
    letter-spacing: 0;
}

h2 {
    margin-bottom: 14px;
    font-size: 22px;
    letter-spacing: 0;
}

h3 {
    margin-bottom: 8px;
    font-size: 19px;
    letter-spacing: 0;
}

.hero-copy,
.detail-header p,
.department-card p,
.muted {
    color: var(--muted);
    line-height: 1.55;
}

.hero-actions,
.card-actions,
.quick-links,
.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 12px;
    margin: 18px 0 26px;
}

.metric,
.department-card,
.panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.metric {
    padding: 18px;
}

.metric span {
    display: block;
    margin-bottom: 5px;
    font-size: 30px;
    font-weight: 800;
    color: var(--blue);
}

.metric small {
    color: var(--muted);
    font-weight: 700;
}

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

.toolbar h2 {
    margin: 0;
}

input[type="search"] {
    width: min(340px, 100%);
    min-height: 40px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
}

.department-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.department-card {
    display: flex;
    flex-direction: column;
    min-height: 260px;
    padding: 18px;
}

.card-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.logo-box {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--teal);
    font-weight: 800;
}

.logo-box.large {
    width: 78px;
    height: 78px;
    flex: 0 0 auto;
}

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

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eef2f3;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.status-pill.online {
    background: #e4f5ec;
    color: var(--green);
}

.status-pill.integrated {
    background: #e4f5ec;
    color: var(--green);
}

.status-pill.offline {
    background: #fff1d9;
    color: var(--amber);
}

.status-pill.not-configured {
    background: #f7e9e8;
    color: var(--red);
}

.mini-stats,
.detail-list {
    display: grid;
    gap: 8px;
    margin: auto 0 16px;
}

.mini-stats {
    grid-template-columns: repeat(3, 1fr);
}

.mini-stats div,
.detail-list div {
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafb;
}

dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

dd {
    margin: 4px 0 0;
    font-weight: 800;
}

.data-band,
.split-layout {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.data-band {
    grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.8fr);
    align-items: start;
    padding: 24px;
    border-radius: 8px;
    background: #10261f;
    color: white;
}

.data-band .eyebrow,
.data-band strong {
    color: #8ee0bc;
}

.table-list,
.database-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.table-list span,
.database-grid div {
    min-height: 48px;
    padding: 11px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
}

.database-grid div {
    background: #f8fafb;
    border: 1px solid var(--line);
}

.database-grid strong,
.database-grid span {
    display: block;
}

.database-grid span {
    margin-top: 4px;
    color: var(--muted);
}

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

.panel {
    padding: 20px;
}

.panel.full {
    margin-top: 18px;
}

.command {
    overflow-x: auto;
    padding: 12px;
    border-radius: 8px;
    background: #172026;
    color: #e4f5ec;
    white-space: pre-wrap;
}

.chip-row span {
    padding: 8px 10px;
    border-radius: 999px;
    background: #e9f6f1;
    color: var(--green);
    font-weight: 800;
}

.chip-row.write span {
    background: #fff1d9;
    color: var(--amber);
}

.access-table {
    display: grid;
    grid-template-columns: 180px 1fr 1fr;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.access-table > div {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    background: #fff;
    line-height: 1.45;
}

.access-table > div:nth-last-child(-n+3) {
    border-bottom: 0;
}

.access-head {
    background: #eef5f4 !important;
    color: var(--teal);
    font-weight: 800;
}

@media (max-width: 900px) {
    .metrics-grid,
    .department-grid,
    .split-layout,
    .data-band,
    .table-list,
    .database-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-panel,
    .detail-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

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

    .topnav,
    .toolbar input {
        width: 100%;
    }

    .topnav a,
    .hero-actions .button,
    .card-actions .button,
    .quick-links .button {
        flex: 1 1 auto;
    }

    .metrics-grid,
    .department-grid,
    .split-layout,
    .data-band,
    .table-list,
    .database-grid,
    .access-table {
        grid-template-columns: 1fr;
    }

    .access-head {
        display: none;
    }

    h1 {
        font-size: 34px;
    }
}

/* Dashboard Utama PT - Hybrid Corporate Command Center */
.dashboard-command-page {
    background: #f4f7fb;
    color: #17212b;
    overflow-x: hidden;
}

.dashboard-command-page > .topbar {
    display: none;
}

.dashboard-command-page > .page {
    width: 100%;
    margin: 0;
    padding: 0;
}

.command-shell {
    min-height: 100vh;
    background: #f4f7fb;
}

.icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

.command-header {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(360px, auto) minmax(260px, 1fr);
    align-items: center;
    gap: 20px;
    min-height: 70px;
    padding: 10px clamp(18px, 2.4vw, 36px);
    background:
        radial-gradient(circle at 18% 10%, rgba(30, 107, 255, 0.24), transparent 30%),
        linear-gradient(135deg, #06142f 0%, #081b3a 52%, #06162d 100%);
    color: #fff;
    box-shadow: 0 12px 34px rgba(8, 27, 58, 0.28);
}

.command-brand,
.command-user,
.command-center-label,
.department-identity,
.department-tools,
.quick-tabs,
.hero-chip,
.command-actions a,
.command-actions span {
    display: flex;
    align-items: center;
}

.command-brand {
    gap: 14px;
    min-width: 0;
}

.command-brand-logo {
    display: flex;
    align-items: center;
    width: 98px;
    height: 48px;
    flex: 0 0 auto;
    padding: 3px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.command-brand-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.command-brand-copy {
    min-width: 0;
}

.command-brand-copy strong {
    display: block;
    font-size: 14px;
    line-height: 1.1;
    letter-spacing: 0.03em;
}

.command-brand-copy small,
.admin-copy small {
    display: block;
    color: rgba(255, 255, 255, 0.74);
    margin-top: 4px;
}

.command-center-label {
    justify-self: center;
    gap: 12px;
    min-height: 40px;
    padding: 7px 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    white-space: nowrap;
}

.shield-mark {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: rgba(30, 107, 255, 0.18);
    color: #7bb0ff;
}

.system-connected {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
}

.system-connected i,
.ok-dot,
.command-status i {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #17d98b;
    box-shadow: 0 0 0 4px rgba(23, 217, 139, 0.13);
}

.command-user {
    justify-self: end;
    gap: 12px;
}

.notification-button {
    position: relative;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
}

.notification-button span {
    position: absolute;
    top: 1px;
    right: 0;
    display: grid;
    place-items: center;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    background: #f5a623;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
}

.admin-avatar {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #1e6bff;
    color: #fff;
    font-weight: 900;
}

.admin-copy strong {
    display: block;
}

.caret {
    width: 9px;
    height: 9px;
    border-right: 2px solid rgba(255, 255, 255, 0.8);
    border-bottom: 2px solid rgba(255, 255, 255, 0.8);
    transform: rotate(45deg) translateY(-3px);
}

.command-layout {
    display: grid;
    grid-template-columns: 276px minmax(0, 1fr);
    min-height: calc(100vh - 70px);
}

.command-sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    min-height: calc(100vh - 70px);
    overflow: hidden;
    padding: 14px 18px;
    background:
        linear-gradient(180deg, #071731 0%, #06142c 64%, #052047 100%);
    color: rgba(255, 255, 255, 0.78);
}

.side-menu {
    display: grid;
    gap: 5px;
}

.side-menu a {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 42px;
    padding: 8px 16px;
    border-radius: 9px;
    color: rgba(255, 255, 255, 0.82);
    font-weight: 800;
    transition: background 160ms ease, color 160ms ease;
}

.side-menu a:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
}

.side-menu a.active {
    background: linear-gradient(135deg, #1e6bff, #0b55db);
    color: white;
    box-shadow: 0 14px 30px rgba(30, 107, 255, 0.24);
}

.side-menu hr {
    width: calc(100% - 20px);
    margin: 10px auto;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.company-menu-group {
    display: grid;
    gap: 5px;
}

.side-menu-section-title {
    padding: 0 16px 4px;
    color: rgba(255, 255, 255, 0.52);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.side-menu .company-menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 58px;
    padding: 9px 16px;
    border-radius: 9px;
    color: rgba(255, 255, 255, 0.58);
    font-weight: 800;
    transition: background 160ms ease, color 160ms ease;
}

.side-menu .company-menu-item:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
}

.company-logo {
    display: grid;
    place-items: center;
    width: 48px;
    height: 34px;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.94);
}

.company-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.company-menu-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
    line-height: 1.2;
}

.company-menu-copy strong {
    font-size: 12px;
    letter-spacing: 0.01em;
}

.company-menu-copy small {
    color: rgba(255, 255, 255, 0.52);
    font-size: 11px;
    font-weight: 600;
}

.side-menu .company-menu-item.active .company-menu-copy small {
    color: rgba(255, 255, 255, 0.78);
}

.system-card {
    position: relative;
    z-index: 1;
    margin-top: 14px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(12, 49, 96, 0.82), rgba(5, 25, 55, 0.94));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.system-card div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.system-card p {
    margin: 14px 0;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.35;
}

.system-card b {
    display: block;
    color: #20e69a;
}

.system-card small,
.system-card time {
    display: block;
    color: rgba(255, 255, 255, 0.65);
    font-size: 12px;
    line-height: 1.5;
}

.sidebar-network {
    position: absolute;
    right: -36px;
    bottom: -30px;
    width: 250px;
    height: 150px;
    opacity: 0.48;
    background:
        linear-gradient(25deg, transparent 50%, rgba(40, 160, 255, 0.5) 51%, transparent 52%),
        linear-gradient(155deg, transparent 50%, rgba(40, 160, 255, 0.35) 51%, transparent 52%),
        radial-gradient(circle at 40% 36%, rgba(29, 182, 182, 0.75) 0 3px, transparent 4px),
        radial-gradient(circle at 66% 56%, rgba(30, 107, 255, 0.85) 0 3px, transparent 4px),
        radial-gradient(circle at 20% 72%, rgba(255, 255, 255, 0.7) 0 2px, transparent 3px);
    border-top: 1px solid rgba(64, 169, 255, 0.34);
    border-radius: 50% 50% 0 0;
}

.command-main {
    min-width: 0;
    padding: 14px clamp(18px, 2.2vw, 30px) 28px;
}

.quick-tabs {
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 10px;
}

.quick-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 144px;
    min-height: 40px;
    padding: 8px 17px;
    border: 1px solid #e5eaf1;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    font-weight: 900;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.quick-tabs a.active {
    border-color: #1e6bff;
    background: #1e6bff;
    color: #fff;
    box-shadow: 0 16px 30px rgba(30, 107, 255, 0.22);
}

.command-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    min-height: 132px;
    overflow: hidden;
    padding: 18px 24px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 10px;
    background:
        linear-gradient(90deg, rgba(5, 33, 78, 0.98), rgba(8, 45, 95, 0.92) 48%, rgba(6, 18, 43, 0.82)),
        #081b3a;
    color: white;
    box-shadow: 0 18px 44px rgba(8, 27, 58, 0.18);
}

.command-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(91, 168, 255, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(91, 168, 255, 0.1) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(90deg, transparent, black 35%, black);
}

.hero-content,
.hero-visual {
    position: relative;
    z-index: 1;
}

.command-hero .eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 11px;
    border-radius: 999px;
    background: rgba(23, 168, 107, 0.16);
    color: #20e69a;
    font-size: 12px;
}

.command-hero h1 {
    max-width: 780px;
    margin: 4px 0 8px;
    font-size: clamp(25px, 2.35vw, 30px);
    line-height: 1.12;
}

.command-hero h1 span {
    color: #20e69a;
}

.command-hero p:not(.eyebrow) {
    max-width: 760px;
    margin: 0 0 4px;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.38;
}

.hero-visual {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 104px;
}

.hero-chips {
    position: absolute;
    left: 0;
    top: 18px;
    display: grid;
    gap: 9px;
    z-index: 2;
}

.hero-chip {
    gap: 10px;
    min-width: 158px;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 900;
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.16);
}

.hero-chip.database {
    background: linear-gradient(135deg, #15965f, #0a7a50);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: white;
}

.hero-chip.json {
    width: fit-content;
    min-width: 110px;
    background: #fff;
    color: #0f172a;
}

.digital-globe {
    position: relative;
    width: 284px;
    height: 128px;
    margin-right: -26px;
    border-radius: 180px 180px 0 0;
    background:
        radial-gradient(circle at 65% 15%, #74dbff 0 2px, transparent 3px),
        radial-gradient(circle at 28% 35%, #29b7ff 0 2px, transparent 3px),
        radial-gradient(circle at 78% 54%, #1e6bff 0 2px, transparent 3px),
        radial-gradient(circle at 55% 68%, #ffffff 0 2px, transparent 3px),
        radial-gradient(circle at center, rgba(29, 182, 182, 0.25), transparent 62%);
    border-top: 2px solid rgba(104, 202, 255, 0.65);
    border-left: 1px solid rgba(104, 202, 255, 0.3);
    box-shadow: inset 0 0 42px rgba(35, 155, 255, 0.32);
}

.globe-ring,
.globe-line,
.node {
    position: absolute;
    display: block;
}

.globe-ring {
    inset: 14px 22px auto;
    height: 122px;
    border-top: 1px solid rgba(133, 218, 255, 0.5);
    border-radius: 50%;
}

.ring-b {
    inset: 34px 68px auto;
    height: 78px;
}

.globe-line {
    width: 1px;
    height: 130px;
    top: 16px;
    background: linear-gradient(transparent, rgba(133, 218, 255, 0.46), transparent);
}

.line-a {
    left: 42%;
    transform: rotate(14deg);
}

.line-b {
    left: 65%;
    transform: rotate(-18deg);
}

.node {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #72ddff;
    box-shadow: 0 0 16px #72ddff;
}

.node-a { top: 42px; left: 86px; }
.node-b { top: 26px; right: 64px; }
.node-c { bottom: 26px; left: 182px; }

.command-metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    gap: 12px;
    margin: 12px 0 14px;
}

.kpi-card {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    min-height: 78px;
    overflow: hidden;
    padding: 12px 14px;
    border: 1px solid #e5eaf1;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
}

.kpi-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-right: 14px;
    border-radius: 11px;
    color: white;
}

.kpi-card strong {
    display: block;
    color: #0f172a;
    font-size: 30px;
    line-height: 1;
    letter-spacing: 0;
}

.kpi-card small {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-weight: 800;
}

.kpi-card.blue .kpi-icon { background: linear-gradient(135deg, #1e6bff, #0d55dc); }
.kpi-card.green .kpi-icon { background: linear-gradient(135deg, #17a86b, #0c7d50); }
.kpi-card.purple .kpi-icon { background: linear-gradient(135deg, #6b5bff, #5845de); }
.kpi-card.amber .kpi-icon { background: linear-gradient(135deg, #f5a623, #f08a00); }
.kpi-card.teal .kpi-icon { background: linear-gradient(135deg, #1db6b6, #0b929c); }

.sparkline {
    position: absolute;
    right: 14px;
    bottom: 13px;
    width: 48px;
    height: 20px;
    border-bottom: 2px solid currentColor;
    border-right: 2px solid currentColor;
    color: #1e6bff;
    clip-path: polygon(0 82%, 18% 82%, 18% 62%, 36% 62%, 36% 72%, 54% 72%, 54% 38%, 72% 38%, 72% 54%, 100% 54%, 100% 100%, 0 100%);
    opacity: 0.9;
}

.green .sparkline { color: #17a86b; }
.purple .sparkline { color: #6b5bff; }
.amber .sparkline { color: #f5a623; }
.teal .sparkline { color: #1db6b6; }

.department-section {
    min-width: 0;
}

.department-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 10px;
}

.department-heading h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: #17212b;
}

.department-tools {
    justify-content: flex-end;
    gap: 10px;
    flex: 1;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(360px, 100%);
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid #e5eaf1;
    border-radius: 8px;
    background: #fff;
    color: #94a3b8;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.search-box input[type="search"] {
    width: 100%;
    min-height: 36px;
    padding: 0;
    border: 0;
    outline: 0;
    box-shadow: none;
}

.view-toggle {
    display: grid;
    place-items: center;
    width: 42px;
    height: 38px;
    border: 1px solid #e5eaf1;
    border-radius: 8px;
    background: #fff;
    color: #334155;
}

.view-toggle.active {
    border-color: #1e6bff;
    background: #1e6bff;
    color: white;
}

.command-grid {
    grid-template-columns: repeat(3, minmax(230px, 1fr));
    gap: 14px;
}

.command-card {
    min-height: 182px;
    padding: 14px 16px;
    border-color: #e5eaf1;
    border-radius: 10px;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.command-card.inactive {
    min-height: 152px;
    opacity: 0.72;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.department-identity {
    gap: 12px;
    min-width: 0;
}

.command-logo {
    width: 50px;
    height: 50px;
    border-radius: 999px;
    background: #fff;
}

.command-card.inactive .command-logo {
    background: #c7cbd1;
    color: #fff;
}

.initial-logo {
    border: 0;
    background: linear-gradient(135deg, #17a86b, #0b8757);
    color: #fff;
    font-size: 18px;
}

.command-card h3 {
    margin: 0 0 3px;
    color: #17212b;
    font-size: 17px;
    line-height: 1.25;
}

.command-card p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.35;
}

.card-menu {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    color: #94a3b8;
    font-size: 22px;
}

.command-status {
    align-self: flex-end;
    min-height: 24px;
    margin-top: -6px;
    padding: 5px 9px;
    border-radius: 7px;
    font-size: 11px;
}

.command-status.not-configured,
.command-status.offline {
    background: #eef0f2;
    color: #8b96a3;
}

.command-status.not-configured i,
.command-status.offline i {
    background: #a5acb5;
    box-shadow: none;
}

.command-stats {
    gap: 0;
    overflow: hidden;
    margin: 10px 0 10px;
    border: 1px solid #edf1f6;
    border-radius: 8px;
    background: #f8fafc;
}

.command-stats div {
    border: 0;
    border-right: 1px solid #e5eaf1;
    border-radius: 0;
    background: transparent;
    text-align: center;
}

.command-stats div:last-child {
    border-right: 0;
}

.command-stats dt {
    color: #7c8aa0;
    font-size: 11px;
    text-transform: none;
}

.command-stats dd {
    color: #1e6bff;
    font-size: 16px;
}

.command-card.inactive .command-stats dd {
    color: #8b96a3;
}

.command-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: auto;
}

.command-actions .button {
    gap: 8px;
    width: 100%;
    border-radius: 8px;
    min-height: 38px;
    font-size: 13px;
}

.detail-button {
    border-color: #dce4ef;
    background: #fff;
    color: #16416d;
}

.open-button.primary {
    border-color: #0b62f0;
    background: linear-gradient(135deg, #1e6bff, #0757de);
    color: #fff;
    box-shadow: 0 12px 22px rgba(30, 107, 255, 0.2);
}

.division-qhse-card {
    color: inherit;
    text-decoration: none;
    border-color: rgba(30, 107, 255, 0.38);
    background: linear-gradient(145deg, #ffffff 0%, #f3f8ff 62%, #ecfff8 100%);
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.division-qhse-card:hover,
.division-qhse-card:focus-visible {
    transform: translateY(-3px);
    border-color: #1e6bff;
    box-shadow: 0 20px 40px rgba(30, 107, 255, 0.18);
}

.division-qhse-card:focus-visible {
    outline: 3px solid rgba(30, 107, 255, 0.28);
    outline-offset: 3px;
}

.division-qhse-logo {
    background: linear-gradient(135deg, #1e6bff, #17a86b);
}

.division-card-arrow {
    color: #1e6bff;
    font-size: 28px;
    font-weight: 900;
}

.division-card-action {
    grid-template-columns: 1fr;
}

.division-back-link {
    display: inline-flex;
    align-items: center;
    margin-top: 6px;
    color: #7dd3fc;
    font-weight: 800;
}

.division-back-link:hover {
    color: #ffffff;
}

@media (max-width: 1180px) {
    .command-header {
        grid-template-columns: 1fr auto;
    }

    .command-center-label {
        grid-column: 1 / -1;
        justify-self: start;
        order: 3;
    }

    .command-layout {
        grid-template-columns: 238px minmax(0, 1fr);
    }

    .command-metrics {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }

    .command-grid {
        grid-template-columns: repeat(2, minmax(230px, 1fr));
    }
}

@media (max-width: 860px) {
    .command-header,
    .command-layout,
    .command-hero {
        grid-template-columns: 1fr;
    }

    .command-user,
    .command-center-label {
        justify-self: start;
    }

    .command-sidebar {
        position: relative;
        min-height: auto;
    }

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

    .company-menu-group {
        grid-column: 1 / -1;
    }

    .side-menu hr,
    .sidebar-network {
        display: none;
    }

    .quick-tabs,
    .department-heading,
    .department-tools {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .command-metrics,
    .command-grid {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        justify-content: center;
    }

    .hero-chips {
        left: 0;
    }
}

@media (max-width: 560px) {
    .command-header {
        padding: 16px;
    }

    .command-brand-copy strong {
        font-size: 13px;
    }

    .command-main {
        padding: 16px;
    }

    .quick-tabs a {
        min-width: 0;
        flex: 1 1 100%;
    }

    .command-hero {
        padding: 22px;
    }

    .hero-chips {
        position: relative;
        top: auto;
    }

    .digital-globe {
        width: 260px;
        height: 130px;
    }

    .command-metrics {
        grid-template-columns: 1fr;
    }
}
