/* Self-hosted fonts (downloaded from Google Fonts) */
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url('../fonts/manrope-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url('../fonts/manrope-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../fonts/spacegrotesk-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../fonts/spacegrotesk-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --bg: #060c18;
    --bg-alt: #0d1b2f;
    --card: #0f1b32;
    --card-strong: #122444;
    --border: rgba(90, 140, 220, 0.28);
    --accent: #57c0ff;
    --accent-2: #65e3bd;
    --muted: #c2d3ea;
    --ink: #e8f0ff;
    --shadow: 0 22px 50px rgba(3, 8, 16, 0.65);
    font-family: "Manrope", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
}

html {
    font-size: 15px;
    background:
        radial-gradient(1200px 800px at 8% -10%, rgba(87, 192, 255, 0.25), transparent 60%),
        radial-gradient(900px 700px at 95% 0%, rgba(42, 155, 255, 0.22), transparent 55%),
        radial-gradient(700px 500px at 20% 100%, rgba(101, 227, 189, 0.18), transparent 60%),
        linear-gradient(180deg, #050a14 0%, #070e1c 55%, #050812 100%);
}

body {
    color: var(--ink);
    background: transparent;
    margin-bottom: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body > header,
body > footer {
    flex: 0 0 auto;
}

body > .container {
    flex: 1 0 auto;
}

h1, h2, .hero-copy h1 {
    font-family: "Space Grotesk", "Manrope", sans-serif;
}

a {
    color: var(--accent);
}

::placeholder {
    color: rgba(155, 177, 209, 0.7);
}

.text-muted {
    color: var(--muted) !important;
}

.navbar {
    background: rgba(7, 12, 24, 0.92);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 18px 40px rgba(4, 10, 20, 0.45);
    backdrop-filter: blur(12px);
}

.navbar.bg-white {
    background: rgba(7, 12, 24, 0.92) !important;
}

.navbar a {
    color: var(--ink) !important;
    font-weight: 600;
}

.navbar .navbar-brand {
    color: var(--accent) !important;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding-block: 2px;
}

.navbar .navbar-brand::before {
    content: none;
}

.navbar .navbar-brand-logo {
    display: block;
    height: 30px;
    width: auto;
    max-width: min(300px, 58vw);
    filter: drop-shadow(0 8px 20px rgba(57, 183, 255, 0.28));
}

@media (max-width: 700px) {
    .navbar .navbar-brand-logo {
        height: 26px;
        max-width: min(260px, 64vw);
    }
}

.navbar .navbar-nav {
    gap: 6px 10px;
}

.navbar .nav-link {
    padding: 6px 10px;
    border-radius: 10px;
}

@media (min-width: 576px) {
    .navbar .navbar-nav.flex-grow-1 {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .navbar .navbar-nav.flex-grow-1::-webkit-scrollbar {
        display: none;
    }

    .navbar .navbar-nav.flex-grow-1 > .nav-item {
        flex: 0 0 auto;
    }
}

.navbar .navbar-toggler {
    border-color: rgba(87, 192, 255, 0.4);
}

.navbar .navbar-toggler-icon {
    filter: invert(1);
}

.app-commandbar {
    background: rgba(6, 12, 22, 0.8);
    border-bottom: 1px solid rgba(87, 192, 255, 0.14);
    padding: 10px 0 14px;
    margin-top: -12px;
}

.command-wrap {
    position: relative;
}

.command-input-shell {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid rgba(87, 192, 255, 0.22);
    background: rgba(8, 14, 26, 0.82);
    box-shadow: 0 16px 34px rgba(4, 10, 20, 0.4);
}

.command-input-shell:focus-within {
    border-color: rgba(94, 225, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(94, 225, 255, 0.2);
}

.command-icon {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 700;
    color: rgba(155, 177, 209, 0.9);
    background: rgba(12, 20, 34, 0.8);
    border: 1px solid rgba(87, 192, 255, 0.2);
    border-radius: 999px;
    padding: 4px 8px;
}

#app-command-input {
    border: none;
    background: transparent;
    color: var(--ink);
    font-weight: 600;
    font-size: 0.95rem;
    outline: none;
}

.command-hint {
    font-size: 0.75rem;
    color: rgba(155, 177, 209, 0.8);
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid rgba(87, 192, 255, 0.2);
    background: rgba(9, 16, 30, 0.8);
}

.command-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    border-radius: 16px;
    padding: 10px;
    border: 1px solid rgba(87, 192, 255, 0.22);
    background: rgba(7, 12, 22, 0.95);
    box-shadow: 0 20px 46px rgba(3, 8, 16, 0.6);
    display: grid;
    gap: 8px;
    z-index: 200;
}

.command-empty {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px dashed rgba(87, 192, 255, 0.24);
    color: var(--muted);
    font-size: 0.9rem;
    background: rgba(8, 14, 24, 0.7);
}

.command-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(87, 192, 255, 0.16);
    background: rgba(10, 18, 32, 0.75);
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.15s ease;
}

.command-row:hover,
.command-row.active {
    border-color: rgba(94, 225, 255, 0.45);
    transform: translateY(-1px);
}

.command-label {
    font-weight: 600;
}

.command-path {
    font-size: 0.8rem;
    color: var(--muted);
}

@media (max-width: 900px) {
    .command-input-shell {
        grid-template-columns: 1fr;
    }

    .command-icon,
    .command-hint {
        display: none;
    }
}

.footer {
    background: rgba(7, 12, 24, 0.92);
    border-top: 1px solid var(--border);
    color: var(--muted);
}

.panel {
    background: linear-gradient(160deg, rgba(18, 32, 56, 0.92), rgba(8, 14, 24, 0.8));
    border-radius: 20px;
    padding: 26px 30px;
    margin-top: 24px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(87, 192, 255, 0.22);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 0% 0%, rgba(87, 192, 255, 0.18), transparent 55%);
    opacity: 0.85;
    pointer-events: none;
}

.panel > * {
    position: relative;
    z-index: 1;
}

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

.panel-header h1 {
    margin: 0;
}

.panel-header .muted {
    color: var(--muted);
    margin: 0;
}

.muted {
    color: var(--muted);
}

.muted.tiny {
    font-size: 0.96rem;
    line-height: 1.55;
}

.search-form {
    display: flex;
    gap: 8px;
}

.search-form input {
    background: rgba(7, 14, 26, 0.8);
    border: 1px solid rgba(87, 192, 255, 0.2);
    color: var(--ink);
    padding: 8px 10px;
    border-radius: 10px;
}

.search-form button {
    background: linear-gradient(135deg, #62ccff, #2a9bff);
    color: #07101f;
    border: none;
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 700;
    box-shadow: 0 12px 24px rgba(87, 192, 255, 0.3);
}

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

.card {
    display: block;
    background: linear-gradient(160deg, rgba(16, 28, 50, 0.95), rgba(8, 14, 24, 0.78));
    border-radius: 14px;
    padding: 16px;
    color: var(--ink);
    text-decoration: none;
    border: 1px solid rgba(87, 192, 255, 0.2);
    box-shadow: 0 18px 36px rgba(5, 12, 24, 0.55);
    transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    border-color: rgba(87, 192, 255, 0.45);
    box-shadow: 0 22px 48px rgba(5, 12, 24, 0.65);
}

.card-title {
    font-weight: 700;
    margin-bottom: 8px;
}

.card-body {
    color: var(--muted);
}

.dark-table {
    width: 100%;
    background: rgba(8, 14, 24, 0.6);
    border-collapse: collapse;
    color: var(--ink);
}

.dark-table th,
.dark-table td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(87, 192, 255, 0.12);
}

.call-popup {
    background: linear-gradient(160deg, rgba(14, 24, 44, 0.98), rgba(8, 14, 24, 0.92));
    border: 1px solid rgba(87, 192, 255, 0.32);
    color: var(--ink);
    box-shadow: var(--shadow);
}

.call-popup .modal-header {
    border-bottom: 1px solid rgba(87, 192, 255, 0.2);
}

.call-popup .modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.call-popup-meta {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 0.95rem;
}

.call-popup-divider {
    margin: 0 6px;
    color: rgba(155, 177, 209, 0.6);
}

.call-popup-summary {
    background: rgba(9, 16, 30, 0.65);
    border-radius: 12px;
    padding: 14px 16px;
    color: var(--ink);
    border: 1px solid rgba(87, 192, 255, 0.2);
}

.call-popup-followup {
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(101, 227, 189, 0.12);
    border: 1px solid rgba(101, 227, 189, 0.4);
    color: var(--ink);
}

.call-popup-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.call-popup .btn-outline-light {
    border-color: rgba(232, 240, 255, 0.55);
    color: var(--ink);
}

.order-confirm {
    background: linear-gradient(160deg, rgba(14, 24, 44, 0.98), rgba(8, 14, 24, 0.92));
    border: 1px solid rgba(87, 192, 255, 0.32);
    color: var(--ink);
    box-shadow: var(--shadow);
}

.order-confirm .modal-header,
.order-confirm .modal-footer {
    border-color: rgba(87, 192, 255, 0.2);
}

.order-confirm .modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.order-confirm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.order-confirm-block {
    background: rgba(9, 16, 30, 0.65);
    border-radius: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(87, 192, 255, 0.18);
}

.order-confirm-block span {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    font-weight: 700;
}

.order-confirm-block strong {
    display: block;
    margin-top: 6px;
    font-size: 1.1rem;
    font-weight: 800;
}

.order-confirm-warning {
    margin: 0;
}

.dark-table th {
    background: rgba(8, 16, 28, 0.9);
    text-align: left;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.dark-table tr:hover td {
    background: rgba(15, 26, 42, 0.65);
}

.dark-table a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.dark-table a:hover {
    color: var(--accent-2);
    text-decoration: underline;
}

.order-items {
    width: 100%;
    table-layout: fixed;
    min-width: 1700px;
}

.order-items th,
.order-items td {
    padding: 14px 14px;
    overflow-wrap: anywhere;
    vertical-align: top;
}

.order-items input,
.order-items textarea {
    background: rgba(14, 26, 46, 0.96);
    border: 1px solid rgba(87, 192, 255, 0.35);
    color: #f4f9ff;
    border-radius: 12px;
    padding: 12px 14px;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    font-size: 1.15rem;
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: 0.01em;
    caret-color: #f4f9ff;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.order-items input {
    min-height: 56px;
}

.order-items textarea {
    min-height: 96px;
}

.order-items input::placeholder,
.order-items textarea::placeholder {
    color: rgba(190, 210, 240, 0.8);
}

.order-items input:focus,
.order-items textarea:focus {
    border-color: rgba(120, 210, 255, 0.7);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 0 3px rgba(87, 192, 255, 0.22);
    background: rgba(18, 32, 58, 0.98);
    outline: none;
}

.order-items input:-webkit-autofill,
.order-items textarea:-webkit-autofill {
    -webkit-text-fill-color: #f4f9ff;
    transition: background-color 9999s ease-out;
    box-shadow: 0 0 0 1000px rgba(14, 26, 46, 0.96) inset;
}

.order-items .item-thumb {
    width: 56px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(87, 192, 255, 0.25);
    background: rgba(7, 14, 26, 0.6);
}

.order-items .item-thumb-cell {
    text-align: center;
}

.order-items th:nth-child(6),
.order-items td:nth-child(6) {
    width: 70px;
}

.order-items th:nth-child(7),
.order-items td:nth-child(7) {
    width: 90px;
}

.order-items th:nth-child(1),
.order-items td:nth-child(1) {
    width: 150px;
}

.order-items th:nth-child(2),
.order-items td:nth-child(2) {
    width: 140px;
}

.order-items th:nth-child(3),
.order-items td:nth-child(3) {
    width: 140px;
}

.order-items th:nth-child(4),
.order-items td:nth-child(4) {
    width: 170px;
}

.order-items th:nth-child(5),
.order-items td:nth-child(5) {
    width: 170px;
}

.order-items th:nth-child(8),
.order-items td:nth-child(8) {
    width: 260px;
}

.order-items th:nth-child(9),
.order-items td:nth-child(9) {
    width: 170px;
}

.order-items th:nth-child(10),
.order-items td:nth-child(10) {
    width: 80px;
}

.order-items th:nth-child(11),
.order-items td:nth-child(11) {
    width: 96px;
}

.order-items tr.row-active td {
    background: rgba(14, 24, 40, 0.75);
}

.item-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
}

button.pill {
    cursor: pointer;
}

button.pill.danger {
    background: rgba(42, 16, 22, 0.85);
    border-color: rgba(255, 139, 139, 0.45);
    color: #ff8b8b;
}

.table-wrap {
    overflow-x: auto;
    border-radius: 14px;
    border: 1px solid rgba(87, 192, 255, 0.1);
    background: rgba(8, 14, 24, 0.6);
    padding: 6px;
}

.jobs-filter-bar {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(9, 16, 28, 0.7);
    border: 1px solid rgba(87, 192, 255, 0.16);
}

.jobs-filter-bar input[type="search"] {
    background: rgba(7, 14, 26, 0.85);
    border: 1px solid rgba(87, 192, 255, 0.22);
    color: var(--ink);
    border-radius: 10px;
    padding: 8px 10px;
}

.order-items-wrap {
    overflow-x: visible;
}

.order-items-stacked {
    min-width: 0;
    table-layout: auto;
}

.order-items-stacked thead {
    display: none;
}

.order-items-stacked tbody {
    display: block;
}

.order-items-stacked tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 14px;
    margin: 0 0 14px;
    border-radius: 16px;
    border: 1px solid rgba(87, 192, 255, 0.18);
    background: rgba(10, 18, 32, 0.7);
}

.order-items-stacked td {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0;
}

.order-items-stacked .item-thumb-cell {
    align-items: flex-start;
}

.order-items-stacked .cell-label {
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    color: rgba(176, 200, 230, 0.9);
    font-weight: 700;
}

.order-items-stacked tr.row-active td {
    background: transparent;
}

@media (max-width: 1200px) {
    .order-items-stacked tr {
        grid-template-columns: minmax(0, 1fr);
    }
}

.calendar-board {
    margin-top: 12px;
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid rgba(87, 192, 255, 0.18);
    background: rgba(8, 14, 24, 0.6);
    max-height: 520px;
    overflow: auto;
}

.calendar-grid {
    display: grid;
    grid-template-columns: 220px repeat(var(--day-count), minmax(180px, 1fr));
    min-width: calc(220px + (180px * var(--day-count)));
}

.calendar-cell {
    padding: 12px;
    border-right: 1px solid rgba(87, 192, 255, 0.12);
    border-bottom: 1px solid rgba(87, 192, 255, 0.12);
    min-height: 110px;
}

.calendar-cell.header {
    background: rgba(8, 16, 28, 0.92);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: var(--muted);
    font-weight: 600;
    min-height: auto;
    position: sticky;
    top: 0;
    z-index: 3;
}

.calendar-cell.owner-cell {
    background: rgba(9, 16, 30, 0.85);
    position: sticky;
    left: 0;
    z-index: 2;
}

.calendar-cell.header.owner-cell {
    z-index: 4;
}

.calendar-cell.owner-cell .owner-name {
    font-weight: 700;
}

.calendar-cell.day-cell {
    min-height: 180px;
}

.calendar-event {
    background: rgba(15, 26, 42, 0.8);
    border: 1px solid rgba(87, 192, 255, 0.25);
    border-radius: 10px;
    padding: 8px 10px;
    margin-bottom: 8px;
}

.calendar-event .event-subject {
    font-weight: 600;
}

.calendar-event .event-time {
    font-size: 0.85rem;
    color: var(--muted);
}

.calendar-event .event-location {
    font-size: 0.8rem;
    color: rgba(155, 177, 209, 0.8);
}

.calendar-event.event-busy {
    border-color: rgba(255, 180, 87, 0.4);
    background: rgba(41, 28, 12, 0.75);
}

.calendar-event.event-away {
    border-color: rgba(255, 115, 115, 0.4);
    background: rgba(40, 16, 20, 0.7);
}

.calendar-event.event-tentative {
    border-color: rgba(131, 195, 255, 0.4);
    background: rgba(17, 28, 46, 0.78);
}

.calendar-event.event-free {
    border-color: rgba(101, 227, 189, 0.35);
    background: rgba(15, 30, 25, 0.7);
}

.calendar-empty {
    color: var(--muted);
    font-size: 0.9rem;
    opacity: 0.7;
}

.calendar-details {
    margin-top: 16px;
}

.calendar-details summary {
    cursor: pointer;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 10px;
}

.calendar-hero {
    border: 1px solid rgba(87, 192, 255, 0.35);
    box-shadow: 0 28px 60px rgba(3, 10, 24, 0.6);
}

.calendar-hero .card-header {
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.calendar-hero h2 {
    margin: 6px 0 4px;
    font-size: 1.6rem;
}

.calendar-legend {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.legend-pill {
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(87, 192, 255, 0.3);
    background: rgba(10, 18, 32, 0.8);
    color: var(--ink);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.legend-pill.event-busy {
    border-color: rgba(255, 180, 87, 0.4);
}

.legend-pill.event-away {
    border-color: rgba(255, 115, 115, 0.4);
}

.legend-pill.event-tentative {
    border-color: rgba(131, 195, 255, 0.4);
}

.legend-pill.event-free {
    border-color: rgba(101, 227, 189, 0.4);
}

/* Task scheduling calendar */
.task-calendar-card {
    border: 1px solid rgba(87, 192, 255, 0.35);
    box-shadow: 0 26px 60px rgba(4, 10, 22, 0.6);
}

.task-calendar-header {
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.task-calendar-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.task-calendar-controls .pill-row {
    margin: 0;
}

.task-date-picker {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.task-date-picker label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--app-muted);
}

.task-calendar-scroll {
    margin-top: 14px;
    overflow: auto;
    border-radius: 18px;
    border: 1px solid rgba(87, 192, 255, 0.18);
    background: rgba(8, 14, 24, 0.65);
    max-height: 640px;
}

.task-calendar-grid {
    display: grid;
    grid-template-columns: repeat(var(--day-count), minmax(240px, 1fr));
    min-width: calc(240px * var(--day-count));
    gap: 14px;
    padding: 14px;
}

.task-day {
    background: rgba(10, 18, 32, 0.85);
    border: 1px solid rgba(87, 192, 255, 0.18);
    border-radius: 16px;
    padding: 14px;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.task-day:focus {
    outline: none;
    border-color: rgba(87, 192, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(87, 192, 255, 0.2);
}

.task-day.is-selected {
    border-color: rgba(101, 227, 189, 0.5);
    box-shadow: 0 20px 36px rgba(5, 12, 24, 0.6);
    transform: translateY(-2px);
}

.task-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
}

.task-day-label {
    font-weight: 700;
    font-size: 1.05rem;
}

.task-day-count {
    font-size: 0.8rem;
    color: var(--app-muted);
    background: rgba(87, 192, 255, 0.12);
    border: 1px solid rgba(87, 192, 255, 0.2);
    padding: 4px 8px;
    border-radius: 999px;
}

.task-day-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-chip {
    display: block;
    text-decoration: none;
    background: rgba(12, 22, 40, 0.95);
    border: 1px solid rgba(87, 192, 255, 0.2);
    border-radius: 12px;
    padding: 10px 12px;
    color: var(--app-ink);
    transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.task-chip:hover {
    border-color: rgba(87, 192, 255, 0.5);
    box-shadow: 0 14px 26px rgba(5, 12, 24, 0.45);
    transform: translateY(-1px);
}

.task-chip-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.task-chip-meta {
    font-size: 0.85rem;
    color: var(--app-muted);
}

.task-empty {
    color: var(--app-muted);
    font-size: 0.9rem;
    background: rgba(7, 14, 26, 0.5);
    border: 1px dashed rgba(87, 192, 255, 0.25);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
}

.task-calendar-card[data-view="day"] .task-calendar-scroll {
    overflow-x: hidden;
}

.task-calendar-card[data-view="day"] .task-calendar-grid {
    grid-template-columns: minmax(280px, 1fr);
    min-width: 0;
}

.task-calendar-card[data-view="day"] .task-day {
    display: none;
}

.task-calendar-card[data-view="day"] .task-day.is-selected {
    display: flex;
    min-height: 320px;
}

.task-list {
    display: grid;
    gap: 12px;
}

.task-row {
    background: rgba(10, 18, 32, 0.75);
    border: 1px solid rgba(87, 192, 255, 0.2);
    border-radius: 16px;
    padding: 16px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
}

.task-row-title {
    font-size: 1.05rem;
    font-weight: 700;
}

.task-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--app-muted);
}

.task-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.task-row-actions form {
    margin: 0;
}

@media (max-width: 900px) {
    .task-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .task-row-actions {
        justify-content: flex-start;
    }
}

.pager {
    margin-top: 12px;
    color: var(--muted);
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.form-card {
    background: linear-gradient(160deg, rgba(16, 28, 50, 0.94), rgba(8, 14, 24, 0.82));
    border: 1px solid rgba(87, 192, 255, 0.2);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 18px 36px rgba(5, 12, 24, 0.5);
}

.form-card h3 {
    margin: 0 0 6px 0;
}

.form-card input,
.form-card select,
.form-card textarea {
    background: rgba(7, 14, 26, 0.85);
    border: 1px solid rgba(87, 192, 255, 0.22);
    color: var(--ink);
    border-radius: 12px;
    padding: 12px 12px;
    width: 100%;
}

.form-card textarea {
    resize: vertical;
}

.form-card.actions {
    align-items: flex-start;
    justify-content: center;
}

.primary {
    background: linear-gradient(135deg, #62ccff, #2a9bff);
    color: #07101f;
    border: none;
    border-radius: 12px;
    padding: 12px 18px;
    cursor: pointer;
    font-weight: 800;
    box-shadow: 0 14px 30px rgba(87, 192, 255, 0.35);
}

.primary:hover {
    filter: brightness(1.05);
}

.alert {
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 10px;
    border: 1px solid rgba(87, 192, 255, 0.2);
}

.alert.success {
    background: rgba(16, 38, 32, 0.85);
    border-color: rgba(101, 227, 189, 0.4);
    color: #65e3bd;
}

.alert.error {
    background: rgba(42, 16, 22, 0.85);
    border-color: rgba(255, 139, 139, 0.45);
    color: #ff8b8b;
}

.hero {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 20px;
    align-items: stretch;
}

.doors-hero {
    background: linear-gradient(135deg, rgba(87, 192, 255, 0.14), rgba(8, 14, 24, 0.85)), var(--card-strong);
}

.hero-copy h1 {
    margin: 8px 0 10px 0;
    font-size: 2rem;
    line-height: 1.3;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--accent);
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.pill {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(12, 22, 38, 0.8);
    border: 1px solid rgba(87, 192, 255, 0.2);
    font-weight: 600;
    color: var(--ink);
}

.hero-side {
    display: grid;
    gap: 12px;
    align-content: start;
}

.stat-card {
    background: linear-gradient(160deg, rgba(16, 28, 50, 0.94), rgba(8, 14, 24, 0.82));
    border: 1px solid rgba(87, 192, 255, 0.2);
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 16px 34px rgba(5, 12, 24, 0.5);
}

.stat-label {
    color: var(--muted);
    font-size: 0.9rem;
}

.stat-value {
    font-weight: 800;
    font-size: 1.25rem;
    margin: 4px 0;
}

.stat-note {
    color: var(--muted);
    font-size: 0.95rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(87, 192, 255, 0.18);
    border: 1px solid rgba(87, 192, 255, 0.3);
    color: var(--accent);
    font-weight: 700;
    font-size: 0.85rem;
}

.badge.soft {
    background: rgba(101, 227, 189, 0.12);
    border-color: rgba(101, 227, 189, 0.3);
    color: #65e3bd;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    row-gap: 8px;
}

.split-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr);
    gap: 22px;
    align-items: start;
}

.stacked-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.field-grid {
    display: grid;
    gap: 14px;
}

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

.field-grid.three-col {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.custom-species {
    display: none;
}

.summary-column {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.order-summary-bar {
    position: sticky;
    top: 18px;
    z-index: 6;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    padding: 16px 18px;
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(16, 30, 54, 0.92), rgba(10, 18, 32, 0.92));
    border: 1px solid rgba(87, 192, 255, 0.25);
    box-shadow: 0 20px 40px rgba(4, 10, 22, 0.45);
    backdrop-filter: blur(10px);
}

.order-summary-bar .summary-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.order-summary-bar .summary-label {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    color: rgba(185, 210, 245, 0.85);
    font-weight: 700;
}

.order-summary-bar .summary-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: #eaf3ff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-summary-bar .summary-sub {
    font-size: 0.9rem;
    color: rgba(185, 210, 245, 0.7);
}

.order-summary-bar .summary-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.order-summary-bar .summary-actions .app-btn {
    min-width: 160px;
}

.estimate-card {
    background: linear-gradient(160deg, rgba(16, 28, 50, 0.94), rgba(8, 14, 24, 0.82));
    border: 1px solid rgba(87, 192, 255, 0.2);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow);
}

.preview-card {
    display: grid;
    gap: 12px;
}

.preview-frame {
    background: rgba(10, 18, 32, 0.8);
    border: 1px solid rgba(87, 192, 255, 0.2);
    border-radius: 14px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
}

.preview-frame img {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(5, 12, 24, 0.6);
}

.preview-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.preview-name {
    font-weight: 700;
}

.ai-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--muted);
}

.ai-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px rgba(87, 192, 255, 0.45);
}

.preview-card[data-ai="on"] .ai-dot {
    background: #5ee3b5;
    box-shadow: 0 0 10px rgba(94, 227, 181, 0.4);
}

.preview-card[data-ai="on"] .ai-status {
    color: var(--accent-2);
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin: 10px 0 12px 0;
}

.price-total {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent);
}

.price-meta {
    text-align: right;
    background: rgba(8, 14, 24, 0.65);
    padding: 10px;
    border-radius: 10px;
    border: 1px solid rgba(87, 192, 255, 0.2);
}

.meta-label {
    color: var(--muted);
    font-size: 0.85rem;
}

.meta-value {
    font-weight: 700;
}

.estimate-breakdown {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 6px;
}

.estimate-breakdown li {
    display: flex;
    justify-content: space-between;
    background: rgba(10, 18, 32, 0.65);
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(87, 192, 255, 0.18);
}

.timeline-card {
    background: linear-gradient(160deg, rgba(16, 28, 50, 0.94), rgba(8, 14, 24, 0.82));
    border: 1px solid rgba(87, 192, 255, 0.2);
    border-radius: 16px;
    padding: 14px;
}

.timeline-card h4 {
    margin: 0 0 10px 0;
}

.step-list {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    display: grid;
    gap: 6px;
}

.update-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 360px;
    overflow-y: auto;
}

.update-entry {
    background: var(--bg-alt);
    border-radius: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
}

.update-meta {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 4px;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
}

.meta-row:last-child {
    border-bottom: none;
}

@media (max-width: 1200px) {
    .split-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .hero,
    .split-grid {
        grid-template-columns: 1fr;
    }

    .price-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

.barcode-preview {
    background: #ffffff;
    border: 1px dashed rgba(87, 192, 255, 0.45);
    padding: 12px;
    margin: 10px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}
.label-card .barcode-preview {
    width: 4in;
    max-width: 100%;
    height: 2in;
    flex-direction: column;
    gap: 6px;
    padding: 10px 14px;
}
.label-card .barcode-preview svg {
    width: 100%;
    height: 80px;
}
.label-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.label-lines {
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.2;
}
.label-title {
    font-weight: 700;
}

/* Order studio refinements */
.cta-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.btn.ghost {
    border: 1px solid rgba(87, 192, 255, 0.22);
    background: rgba(10, 18, 32, 0.6);
    color: var(--ink);
    font-weight: 700;
    padding: 10px 14px;
    border-radius: 12px;
}

.style-stack {
    display: grid;
    gap: 10px;
}

.style-card {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 10px;
    align-items: center;
    background: linear-gradient(160deg, rgba(16, 28, 50, 0.94), rgba(8, 14, 24, 0.82));
    border: 1px solid rgba(87, 192, 255, 0.2);
    border-radius: 14px;
    padding: 10px;
}

.style-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    border: 1px solid rgba(87, 192, 255, 0.2);
    background: linear-gradient(135deg, rgba(87, 192, 255, 0.18), rgba(14, 24, 40, 0.5));
}

.style-shaker {
    background: linear-gradient(180deg, #f8f4ed 0%, #f1e9df 60%, #e9dfd1 100%), linear-gradient(90deg, #d9c7af 25%, transparent 25%), linear-gradient(0deg, #d9c7af 25%, transparent 25%);
    background-size: 100% 100%, 100% 18%, 18% 100%;
}

.style-raised {
    background: radial-gradient(circle at 30% 30%, #f7efe3, #e7d8c3 70%), linear-gradient(135deg, rgba(0,0,0,0.04), rgba(255,255,255,0.5));
}

.style-slab {
    background: linear-gradient(90deg, #e8e3db 0%, #f3eee6 50%, #e8e3db 100%);
}

.style-beaded {
    background: repeating-linear-gradient(90deg, #f2eae0 0 12px, #e8dfd2 12px 18px);
}

.style-name {
    font-weight: 700;
}

.style-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.style-option {
    border: 1px solid rgba(87, 192, 255, 0.22);
    border-radius: 14px;
    padding: 12px;
    cursor: pointer;
    display: grid;
    gap: 8px;
    background: linear-gradient(160deg, rgba(16, 28, 50, 0.94), rgba(8, 14, 24, 0.82));
    box-shadow: 0 16px 34px rgba(5, 12, 24, 0.5);
    transition: border-color 0.15s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.style-option input {
    display: none;
}

.style-option.active,
.style-option:hover {
    border-color: rgba(87, 192, 255, 0.5);
    box-shadow: 0 22px 48px rgba(5, 12, 24, 0.6);
    transform: translateY(-1px);
}

.color-row {
    display: grid;
    gap: 12px;
}

.color-chips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.color-chip {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 10px;
    align-items: center;
    border: 1px solid rgba(87, 192, 255, 0.22);
    border-radius: 14px;
    background: linear-gradient(160deg, rgba(16, 28, 50, 0.94), rgba(8, 14, 24, 0.82));
    padding: 10px;
    cursor: pointer;
    text-align: left;
}

.color-chip .chip-swatch {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid rgba(87, 192, 255, 0.22);
    background: var(--swatch, #e0d6c8);
}

.color-chip.active {
    border-color: rgba(87, 192, 255, 0.5);
    box-shadow: 0 22px 48px rgba(5, 12, 24, 0.6);
}

.color-input input {
    margin-top: 6px;
}

.value-strong {
    font-weight: 700;
    margin-bottom: 6px;
}

/* Staff dashboard */
.staff-dashboard {
    --dash-bg: #060c18;
    --dash-panel: #0b1529;
    --dash-card: #0f1b32;
    --dash-card-strong: #122441;
    --dash-border: rgba(96, 146, 235, 0.3);
    --dash-muted: #9bb1d1;
    --dash-text: #e8f0ff;
    --dash-accent: #57c0ff;
    --dash-accent-strong: #2a9bff;
    --dash-accent-soft: rgba(87, 192, 255, 0.18);
    --dash-good: #65e3bd;
    --dash-warning: #ffd38b;
    --dash-danger: #ff8b8b;
    --dash-glow: rgba(79, 178, 255, 0.35);
    font-family: "Manrope", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
    color: var(--dash-text);
}

.staff-dashboard h1,
.staff-dashboard h2 {
    font-family: "Space Grotesk", "Manrope", sans-serif;
    margin: 0;
    letter-spacing: -0.02em;
}

.staff-dashboard .dashboard-shell {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    padding: 32px;
    border: 1px solid var(--dash-border);
    background:
        radial-gradient(1200px 700px at 6% -10%, rgba(87, 192, 255, 0.28), transparent 55%),
        radial-gradient(900px 700px at 100% 0%, rgba(42, 155, 255, 0.3), transparent 55%),
        radial-gradient(700px 500px at 80% 90%, rgba(101, 227, 189, 0.15), transparent 60%),
        linear-gradient(160deg, #070f20 0%, #0a1428 45%, #050a12 100%);
    box-shadow: 0 32px 80px rgba(3, 8, 18, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    gap: 26px;
    min-height: 86vh;
}

.staff-dashboard .dashboard-shell::before {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    right: -220px;
    top: -220px;
    background: radial-gradient(circle, rgba(87, 192, 255, 0.55), transparent 65%);
    opacity: 0.85;
    pointer-events: none;
}

.staff-dashboard .dashboard-shell::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(rgba(79, 178, 255, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 178, 255, 0.05) 1px, transparent 1px),
        linear-gradient(180deg, rgba(87, 192, 255, 0.06), transparent 60%);
    background-size: 30px 30px, 30px 30px, 100% 100%;
    opacity: 0.22;
    pointer-events: none;
}

.staff-dashboard .dashboard-content,
.staff-dashboard .dashboard-status {
    position: relative;
    z-index: 1;
}

.staff-dashboard .dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.dashboard-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px;
    border-radius: 22px;
    background: linear-gradient(140deg, rgba(17, 28, 48, 0.92), rgba(9, 16, 28, 0.7));
    border: 1px solid rgba(87, 192, 255, 0.2);
    box-shadow: 0 20px 52px rgba(5, 12, 24, 0.65);
    position: relative;
    overflow: hidden;
    animation: dash-reveal 0.6s ease both;
}

.dashboard-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 0%, rgba(87, 192, 255, 0.25), transparent 55%);
    opacity: 0.9;
    pointer-events: none;
}

.dashboard-hero > * {
    position: relative;
    z-index: 1;
}

.hero-copy {
    max-width: 620px;
}

.dashboard-hero h1 {
    font-size: clamp(2.1rem, 2.1vw + 1.6rem, 3.1rem);
    margin: 6px 0 8px 0;
    text-shadow: 0 12px 30px rgba(5, 12, 24, 0.45);
}

.dashboard-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.32em;
    font-weight: 700;
    font-size: 0.72rem;
    color: #7fd0ff;
}

.dashboard-subtitle {
    margin: 8px 0 0 0;
    color: var(--dash-muted);
    max-width: 560px;
    line-height: 1.5;
}

.hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.hero-chip {
    background: rgba(10, 20, 36, 0.8);
    border: 1px solid rgba(87, 192, 255, 0.22);
    color: var(--dash-text);
    padding: 7px 14px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: 0 10px 22px rgba(6, 14, 24, 0.35);
    backdrop-filter: blur(8px);
}

.hero-range {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}

.range-label {
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-weight: 700;
    font-size: 0.68rem;
    color: #7fd0ff;
}

.range-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.range-link {
    text-decoration: none;
    color: var(--dash-text);
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.82rem;
    background: rgba(14, 26, 44, 0.8);
    border: 1px solid rgba(87, 192, 255, 0.12);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.range-link:hover {
    border-color: var(--dash-accent);
    box-shadow: 0 10px 20px rgba(87, 192, 255, 0.2);
    transform: translateY(-1px);
}

.range-link.active {
    border-color: rgba(87, 192, 255, 0.5);
    background: rgba(87, 192, 255, 0.2);
    color: #eaf6ff;
}

.range-custom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 16px;
    background: rgba(14, 26, 44, 0.6);
    border: 1px solid rgba(87, 192, 255, 0.15);
}

.range-custom.active {
    border-color: rgba(87, 192, 255, 0.5);
    box-shadow: 0 12px 22px rgba(87, 192, 255, 0.18);
}

.range-field {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #c3d6ee;
}

.range-input {
    background: rgba(8, 16, 28, 0.85);
    color: #eaf6ff;
    border: 1px solid rgba(87, 192, 255, 0.2);
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 0.8rem;
}

.range-input:focus {
    outline: none;
    border-color: var(--dash-accent);
    box-shadow: 0 0 0 2px rgba(87, 192, 255, 0.2);
}

.range-apply {
    background: linear-gradient(135deg, #4fb2ff, #2a9bff);
    border: none;
    color: #0b1529;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.78rem;
    cursor: pointer;
}

.range-apply:hover {
    filter: brightness(1.05);
}

.hero-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    align-items: center;
    width: min(420px, 100%);
}

.dash-btn {
    text-decoration: none;
    padding: 11px 16px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.95rem;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.dash-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.18), transparent 60%);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.dash-btn.primary {
    background: linear-gradient(135deg, #62ccff, #2a9bff);
    color: #08111d;
    box-shadow: 0 16px 34px rgba(79, 178, 255, 0.4);
}

.dash-btn.ghost {
    background: rgba(12, 20, 32, 0.75);
    border-color: rgba(87, 192, 255, 0.22);
    color: var(--dash-text);
}

.dash-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 36px rgba(10, 20, 32, 0.45);
}

.dash-btn:hover::after {
    opacity: 1;
}

.dashboard-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(10, 18, 32, 0.72);
    border: 1px solid rgba(87, 192, 255, 0.18);
    box-shadow: 0 16px 30px rgba(5, 12, 24, 0.45);
    backdrop-filter: blur(14px);
    animation: dash-reveal 0.6s ease both;
    animation-delay: 0.1s;
}

.menu-link {
    text-decoration: none;
    color: var(--dash-text);
    padding: 9px 14px;
    border-radius: 12px;
    font-weight: 600;
    background: rgba(14, 26, 44, 0.7);
    border: 1px solid rgba(87, 192, 255, 0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.menu-link:hover {
    border-color: var(--dash-accent);
    box-shadow: 0 12px 24px rgba(87, 192, 255, 0.22);
    transform: translateY(-1px);
}

.menu-link.active {
    border-color: rgba(87, 192, 255, 0.5);
    background: rgba(87, 192, 255, 0.2);
    color: #eaf6ff;
}

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

.metric-card {
    background: linear-gradient(150deg, rgba(87, 192, 255, 0.12), rgba(11, 19, 34, 0.9)), var(--dash-card);
    border-radius: 18px;
    padding: 18px;
    border: 1px solid rgba(87, 192, 255, 0.2);
    box-shadow: 0 18px 44px rgba(4, 10, 20, 0.55);
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 140px;
    animation: dash-reveal 0.6s ease both;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    border-color: rgba(87, 192, 255, 0.45);
    box-shadow: 0 22px 52px rgba(6, 14, 28, 0.6);
}
.metric-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 0% 0%, rgba(87, 192, 255, 0.22), transparent 55%);
    opacity: 0.8;
    pointer-events: none;
}

.dashboard-grid .metric-card:nth-child(2) { animation-delay: 0.05s; }
.dashboard-grid .metric-card:nth-child(3) { animation-delay: 0.1s; }
.dashboard-grid .metric-card:nth-child(4) { animation-delay: 0.15s; }
.dashboard-grid .metric-card:nth-child(5) { animation-delay: 0.2s; }
.dashboard-grid .metric-card:nth-child(6) { animation-delay: 0.25s; }
.dashboard-grid .metric-card:nth-child(7) { animation-delay: 0.3s; }

.metric-label {
    color: var(--dash-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.7rem;
}

.metric-link {
    color: var(--dash-accent);
    font-weight: 600;
    text-decoration: none;
    margin-top: auto;
}

.metric-link:hover {
    color: var(--dash-accent-strong);
    text-decoration: underline;
}

.metric-value {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.metric-change {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dash-muted);
}

.metric-change.up {
    color: var(--dash-good);
}

.metric-change.down {
    color: var(--dash-warning);
}

.sparkline {
    width: 100%;
    height: 40px;
}

.sparkline polyline {
    fill: none;
    stroke: var(--dash-accent);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.85;
}

.dashboard-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.chart-card {
    background: linear-gradient(160deg, rgba(16, 26, 46, 0.95), rgba(9, 16, 28, 0.7));
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(87, 192, 255, 0.22);
    box-shadow: 0 20px 48px rgba(5, 12, 24, 0.65);
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: dash-reveal 0.6s ease both;
    position: relative;
    overflow: hidden;
    min-height: 300px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.chart-card:hover {
    transform: translateY(-2px);
    border-color: rgba(87, 192, 255, 0.45);
    box-shadow: 0 24px 56px rgba(6, 14, 28, 0.65);
}
.chart-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 100% 0%, rgba(87, 192, 255, 0.18), transparent 50%);
    opacity: 0.8;
    pointer-events: none;
}

.chart-card.wide {
    grid-column: span 2;
}

.dashboard-charts .chart-card:nth-child(1) { animation-delay: 0.05s; }
.dashboard-charts .chart-card:nth-child(2) { animation-delay: 0.1s; }
.dashboard-charts .chart-card:nth-child(3) { animation-delay: 0.15s; }

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.chart-header h2,
.card-header h2 {
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

.chart-meta {
    margin: 6px 0 0 0;
    color: var(--dash-muted);
    font-size: 0.9rem;
}

.chart-badge {
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 700;
    background: rgba(87, 192, 255, 0.2);
    color: var(--dash-accent);
    font-size: 0.8rem;
}

.chart-badge.subtle {
    background: rgba(18, 32, 54, 0.6);
    color: var(--dash-muted);
}

.line-chart {
    width: 100%;
    height: 180px;
}

.line-chart .line-area {
    fill: url(#dash-line-fill);
}

.line-chart .line-stroke {
    fill: none;
    stroke: var(--dash-accent);
    stroke-width: 2.5;
}

.line-chart .line-points circle {
    fill: #0c1524;
    stroke: var(--dash-accent);
    stroke-width: 2;
}

.bar-chart {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    height: 180px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(9, 14, 24, 0.65);
    border: 1px solid rgba(79, 178, 255, 0.12);
}

.bar {
    flex: 1;
    min-width: 28px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    color: var(--dash-muted);
    font-size: 0.75rem;
    position: relative;
}

.bar::before {
    content: "";
    width: 100%;
    height: calc(var(--value) * 1%);
    border-radius: 10px;
    background: linear-gradient(180deg, var(--bar-color), rgba(79, 178, 255, 0.3));
    box-shadow: 0 12px 24px rgba(15, 40, 80, 0.35);
    transform-origin: bottom;
    animation: bar-grow 0.7s ease forwards;
}

.donut-chart {
    --slice-a: 42;
    --slice-b: 33;
    width: 170px;
    height: 170px;
    margin: 0 auto;
    border-radius: 50%;
    position: relative;
    background: conic-gradient(
        #4fb2ff 0 calc(var(--slice-a) * 1%),
        #5ee3b5 calc(var(--slice-a) * 1%) calc((var(--slice-a) + var(--slice-b)) * 1%),
        #ffd37d calc((var(--slice-a) + var(--slice-b)) * 1%) 100%
    );
    box-shadow: 0 20px 40px rgba(5, 12, 24, 0.6);
}

.donut-chart::after {
    content: "";
    position: absolute;
    inset: 26px;
    background: #0c1524;
    border-radius: 50%;
    border: 1px solid rgba(79, 178, 255, 0.2);
}

.donut-center {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    gap: 4px;
}

.donut-value {
    font-size: 1.6rem;
    font-weight: 700;
}

.donut-label {
    color: var(--dash-muted);
    font-size: 0.9rem;
}

.chart-legend {
    list-style: none;
    padding: 0;
    margin: 12px 0 0 0;
    display: grid;
    gap: 6px;
    color: var(--dash-muted);
    font-size: 0.9rem;
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
}

.legend-dot.accent { background: #4fb2ff; }
.legend-dot.success { background: #5ee3b5; }
.legend-dot.warning { background: #ffd37d; }

.chart-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.chart-area {
    position: relative;
    width: 100%;
    height: 260px;
}

.chart-card canvas {
    display: block;
    width: 100%;
}

.chart-card.wide .chart-canvas {
    height: 100%;
}

.chart-card.wide .chart-area {
    height: 300px;
}

.dashboard-tables {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.data-card {
    background: linear-gradient(160deg, rgba(14, 24, 42, 0.9), rgba(8, 14, 24, 0.75));
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(87, 192, 255, 0.2);
    box-shadow: 0 20px 48px rgba(5, 12, 24, 0.65);
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: dash-reveal 0.6s ease both;
    animation-delay: 0.15s;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.data-card:hover {
    transform: translateY(-2px);
    border-color: rgba(87, 192, 255, 0.45);
    box-shadow: 0 24px 56px rgba(6, 14, 28, 0.65);
}

.data-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 0% 0%, rgba(87, 192, 255, 0.18), transparent 55%);
    opacity: 0.85;
    pointer-events: none;
}

.dash-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--dash-text);
    font-size: 0.92rem;
    line-height: 1.45;
}

.dash-table th,
.dash-table td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(79, 178, 255, 0.12);
}

.dash-table th {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    color: var(--dash-muted);
    text-align: left;
    background: rgba(11, 20, 36, 0.8);
}

.dash-table tr:hover td {
    background: rgba(15, 26, 42, 0.65);
}

.dash-table tr.selected td {
    background: rgba(24, 44, 78, 0.7);
    box-shadow: inset 0 0 0 1px rgba(87, 192, 255, 0.35);
}

.data-card .table-wrap {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(87, 192, 255, 0.1);
    background: rgba(8, 14, 24, 0.6);
}

.table-link {
    color: var(--dash-accent);
    text-decoration: none;
    font-weight: 600;
}

.table-link:hover {
    color: var(--dash-accent-strong);
    text-decoration: underline;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid rgba(79, 178, 255, 0.25);
    background: rgba(79, 178, 255, 0.12);
    color: var(--dash-text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-good {
    border-color: rgba(94, 227, 181, 0.35);
    background: rgba(94, 227, 181, 0.12);
    color: #5ee3b5;
}

.status-warn {
    border-color: rgba(255, 211, 125, 0.35);
    background: rgba(255, 211, 125, 0.12);
    color: #ffd37d;
}

.status-danger {
    border-color: rgba(255, 122, 122, 0.35);
    background: rgba(255, 122, 122, 0.12);
    color: #ff8a7a;
}

.status-info {
    border-color: rgba(79, 178, 255, 0.35);
    background: rgba(79, 178, 255, 0.12);
    color: #4fb2ff;
}

.status-neutral {
    border-color: rgba(159, 177, 201, 0.35);
    background: rgba(159, 177, 201, 0.12);
    color: var(--dash-muted);
}

.empty-cell {
    padding: 18px 12px;
    text-align: center;
    color: var(--dash-muted);
}

.dashboard-panels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.activity-card,
.system-card {
    background: linear-gradient(160deg, rgba(16, 26, 46, 0.94), rgba(8, 14, 24, 0.78));
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(87, 192, 255, 0.2);
    box-shadow: 0 20px 48px rgba(5, 12, 24, 0.65);
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: dash-reveal 0.6s ease both;
    animation-delay: 0.2s;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.activity-card:hover,
.system-card:hover {
    transform: translateY(-2px);
    border-color: rgba(87, 192, 255, 0.45);
    box-shadow: 0 24px 56px rgba(6, 14, 28, 0.65);
}

.activity-card::before,
.system-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 100% 0%, rgba(87, 192, 255, 0.18), transparent 55%);
    opacity: 0.85;
    pointer-events: none;
}

.activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.activity-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(12, 22, 38, 0.85);
    border: 1px solid rgba(87, 192, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(87, 192, 255, 0.06);
}

.activity-title {
    font-weight: 600;
}

.activity-meta {
    color: var(--dash-muted);
    font-size: 0.85rem;
    line-height: 1.35;
}

.progress-list {
    display: grid;
    gap: 12px;
}

.progress-row {
    display: grid;
    grid-template-columns: 1fr 3fr auto;
    gap: 12px;
    align-items: center;
    color: var(--dash-muted);
    font-size: 0.9rem;
}

.progress-track {
    position: relative;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: var(--value);
    background: linear-gradient(90deg, #4fb2ff, #1b8cff);
    border-radius: inherit;
    box-shadow: 0 6px 14px rgba(79, 178, 255, 0.35);
}

.progress-value {
    font-weight: 600;
    color: var(--dash-text);
}

.pulse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    background: rgba(15, 26, 42, 0.8);
    border: 1px solid rgba(79, 178, 255, 0.12);
    border-radius: 14px;
    padding: 12px;
}

.pulse-label {
    color: var(--dash-muted);
    font-size: 0.85rem;
}

.pulse-value {
    font-weight: 700;
    margin-top: 4px;
}

.dashboard-status {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 16px;
    background: linear-gradient(120deg, rgba(10, 18, 32, 0.9), rgba(6, 12, 22, 0.95));
    border: 1px solid rgba(87, 192, 255, 0.22);
    box-shadow: 0 16px 30px rgba(5, 12, 24, 0.5);
    backdrop-filter: blur(10px);
    color: var(--dash-muted);
}

.status-left,
.status-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--dash-good);
    box-shadow: 0 0 12px rgba(94, 227, 181, 0.5);
}

@keyframes dash-reveal {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bar-grow {
    from {
        transform: scaleY(0);
    }
    to {
        transform: scaleY(1);
    }
}

@media (min-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }

    .dashboard-grid .metric-card {
        grid-column: span 4;
    }

    .dashboard-charts {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }

    .dashboard-charts .chart-card {
        grid-column: span 4;
    }

    .dashboard-charts .chart-card.wide {
        grid-column: span 8;
    }

    .dashboard-tables {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }

    .dashboard-tables .data-card {
        grid-column: span 6;
    }
}

@media (max-width: 980px) {
    .chart-card.wide {
        grid-column: auto;
    }
}

@media (max-width: 720px) {
    .staff-dashboard .dashboard-shell {
        padding: 20px;
    }

    .dashboard-hero {
        padding: 18px;
    }

    .hero-actions {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .dashboard-menu {
        gap: 8px;
    }

    .dashboard-status {
        justify-content: flex-start;
    }

    .progress-row {
        grid-template-columns: 1fr;
    }

    .chart-area {
        height: 210px;
    }
}

/* App UI */
.app-mode .navbar,
.app-mode .footer {
    display: none;
}

.staff-mode .navbar,
.staff-mode .footer {
    display: none;
}

body.staff-mode {
    background: linear-gradient(120deg, #050a14 0%, #0a1426 55%, #060b18 100%);
    color: #e8f0ff;
}

.staff-mode {
    margin-bottom: 0;
}

.staff-mode .container {
    max-width: 1700px;
    padding-left: 24px;
    padding-right: 24px;
}

.staff-mode main {
    padding-top: 8px;
}

.app-mode {
    margin-bottom: 0;
}

body.app-mode {
    background: linear-gradient(120deg, #050a14 0%, #0a1426 55%, #060b18 100%);
    color: #e8f0ff;
    position: relative;
}

body.app-mode::before {
    content: "";
    position: fixed;
    inset: -20vh -10vw;
    background:
        radial-gradient(1400px 900px at 10% -10%, rgba(87, 192, 255, 0.28), transparent 60%),
        radial-gradient(1200px 800px at 90% 0%, rgba(42, 155, 255, 0.22), transparent 65%),
        linear-gradient(140deg, rgba(8, 16, 28, 0.95), rgba(6, 12, 22, 0.9));
    opacity: 1;
    pointer-events: none;
    z-index: 0;
    animation: aurora-shift 24s ease-in-out infinite;
}

body.app-mode::after {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        repeating-linear-gradient(60deg, rgba(87, 192, 255, 0.12) 0 1px, transparent 1px 30px),
        repeating-linear-gradient(-60deg, rgba(87, 192, 255, 0.12) 0 1px, transparent 1px 30px),
        repeating-linear-gradient(0deg, rgba(87, 192, 255, 0.08) 0 1px, transparent 1px 52px),
        linear-gradient(120deg, rgba(255, 255, 255, 0.04), transparent 45%);
    background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%;
    mix-blend-mode: screen;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

body.app-mode > * {
    position: relative;
    z-index: 1;
}

body.app-mode .container::before,
body.app-mode .container::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

body.app-mode .container::before {
    background:
        repeating-linear-gradient(30deg, rgba(101, 227, 189, 0.08) 0 1px, transparent 1px 36px),
        repeating-linear-gradient(-30deg, rgba(101, 227, 189, 0.08) 0 1px, transparent 1px 36px);
    opacity: 0.25;
}

body.app-mode .container::after {
    background:
        radial-gradient(900px 600px at 15% 20%, rgba(87, 192, 255, 0.18), transparent 65%),
        radial-gradient(900px 600px at 85% 80%, rgba(101, 227, 189, 0.16), transparent 70%);
    opacity: 0.6;
}

.app-mode .container {
    max-width: 1600px;
    padding-left: 24px;
    padding-right: 24px;
}

.app-mode main {
    padding-top: 16px;
}

.app-shell {
    --app-bg: #070d1a;
    --app-card: #0f1b32;
    --app-card-alt: #122441;
    --app-ink: #e8f0ff;
    --app-muted: #c7d8ee;
    --app-border: rgba(87, 192, 255, 0.2);
    --app-accent: #57c0ff;
    --app-accent-strong: #2a9bff;
    --app-warm: #ffd38b;
    --app-teal: #65e3bd;
    --dash-text: var(--app-ink);
    --dash-muted: var(--app-muted);
    --dash-accent: var(--app-accent);
    --dash-accent-strong: var(--app-accent-strong);
    font-family: "Manrope", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
    color: var(--app-ink);
    background:
        radial-gradient(900px 600px at 10% -20%, rgba(79, 178, 255, 0.28), transparent 60%),
        radial-gradient(700px 520px at 110% 10%, rgba(101, 227, 189, 0.22), transparent 60%),
        linear-gradient(160deg, #070f20 0%, #0a1428 45%, #050a12 100%);
    border-radius: 28px;
    border: 1px solid var(--app-border);
    padding: 32px;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 28px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 30px 72px rgba(3, 8, 18, 0.7);
    backdrop-filter: blur(8px);
    animation: app-rise 0.5s ease both;
    line-height: 1.55;
}

.network-shell {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 12px 6px 32px;
}

.network-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 24px;
    border-radius: 22px;
    background: linear-gradient(160deg, rgba(12, 22, 40, 0.95), rgba(8, 14, 24, 0.85));
    border: 1px solid rgba(87, 192, 255, 0.2);
    box-shadow: 0 18px 40px rgba(4, 10, 20, 0.45);
}

.network-meta {
    min-width: 220px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(8, 14, 24, 0.7);
    border: 1px solid rgba(87, 192, 255, 0.18);
}

.network-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 16px;
    background: rgba(8, 14, 24, 0.65);
    border: 1px solid rgba(87, 192, 255, 0.18);
}

.summary-chip {
    display: grid;
    gap: 4px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(12, 20, 34, 0.7);
    border: 1px solid rgba(87, 192, 255, 0.2);
    min-width: 110px;
}

.summary-label {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(155, 177, 209, 0.8);
    font-weight: 700;
}

.summary-chip strong {
    font-size: 1.1rem;
}

.network-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.network-card {
    padding: 18px 20px;
    border-radius: 18px;
    background: linear-gradient(160deg, rgba(16, 28, 50, 0.92), rgba(9, 16, 28, 0.85));
    border: 1px solid rgba(87, 192, 255, 0.2);
    box-shadow: 0 16px 32px rgba(4, 10, 20, 0.4);
}

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

.network-asset-posture-card {
    display: grid;
    gap: 12px;
}

.network-asset-posture-summary {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.network-asset-posture-list {
    display: grid;
    gap: 10px;
}

.network-asset-posture-row {
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(220px, 1.1fr) minmax(180px, 0.8fr) minmax(220px, 1.3fr);
    align-items: start;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(87, 192, 255, 0.2);
    background: rgba(8, 14, 24, 0.64);
}

.network-asset-posture-main {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

.network-asset-posture-signal {
    display: grid;
    gap: 3px;
    color: rgba(205, 224, 255, 0.9);
    font-size: 0.85rem;
}

.network-asset-posture-detail {
    color: rgba(205, 224, 255, 0.9);
    font-size: 0.86rem;
    line-height: 1.45;
}

.asset-posture-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 82px;
    padding: 3px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    font-size: 0.66rem;
    border: 1px solid rgba(160, 181, 210, 0.45);
    color: #dbe8ff;
    background: rgba(20, 34, 56, 0.72);
}

.asset-posture-pill.ok {
    color: #7cffb3;
    border-color: rgba(92, 219, 155, 0.55);
    background: rgba(29, 64, 47, 0.38);
}

.asset-posture-pill.warn {
    color: #ffd085;
    border-color: rgba(245, 177, 67, 0.55);
    background: rgba(68, 45, 14, 0.35);
}

.asset-posture-pill.critical {
    color: #ff9a9a;
    border-color: rgba(239, 93, 93, 0.55);
    background: rgba(76, 22, 22, 0.36);
}

.asset-posture-pill.stale {
    color: #a5b6cf;
    border-color: rgba(154, 177, 207, 0.45);
    background: rgba(33, 45, 63, 0.4);
}

.asset-posture-pill.unknown {
    color: #c8d7ee;
    border-color: rgba(150, 171, 199, 0.45);
    background: rgba(24, 35, 51, 0.38);
}

.network-diagram {
    grid-column: 1 / -1;
    padding: 18px;
}

.topology {
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    grid-template-rows: repeat(2, minmax(120px, auto));
    gap: 18px;
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(160deg, rgba(7, 12, 24, 0.9), rgba(6, 10, 20, 0.85));
    border: 1px solid rgba(87, 192, 255, 0.18);
    overflow: hidden;
}

.topology::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(60deg, rgba(87, 192, 255, 0.12) 0 1px, transparent 1px 30px),
        repeating-linear-gradient(-60deg, rgba(87, 192, 255, 0.12) 0 1px, transparent 1px 30px),
        repeating-linear-gradient(0deg, rgba(87, 192, 255, 0.08) 0 1px, transparent 1px 52px);
    opacity: 0.25;
    pointer-events: none;
}

.topology-node {
    position: relative;
    z-index: 1;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(87, 192, 255, 0.25);
    background: rgba(12, 20, 34, 0.85);
    box-shadow: 0 14px 26px rgba(4, 10, 20, 0.35);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.topology-node.core {
    background: linear-gradient(140deg, rgba(13, 26, 44, 0.92), rgba(10, 18, 30, 0.92));
}

.topology-node.azure {
    background: linear-gradient(140deg, rgba(12, 26, 36, 0.92), rgba(9, 16, 26, 0.92));
    border-color: rgba(101, 227, 189, 0.3);
}

.topology-node.vpn {
    background: linear-gradient(140deg, rgba(20, 26, 40, 0.92), rgba(11, 18, 30, 0.92));
    border-style: dashed;
}

.node-title {
    font-weight: 700;
    letter-spacing: 0.02em;
}

.node-sub {
    color: rgba(193, 210, 235, 0.75);
    font-size: 0.9rem;
}

.node-proof {
    font-size: 0.85rem;
    color: rgba(126, 160, 205, 0.9);
}

.node-light {
    position: absolute;
    right: 14px;
    top: 14px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 211, 125, 0.4);
    box-shadow: 0 0 12px rgba(255, 211, 125, 0.45);
}

.node-light.ok {
    background: #5ee3b5;
    box-shadow: 0 0 16px rgba(94, 227, 181, 0.7);
}

.node-light.down {
    background: #ff7a7a;
    box-shadow: 0 0 16px rgba(255, 122, 122, 0.7);
}

.node-light.neutral {
    background: rgba(155, 177, 209, 0.6);
    box-shadow: 0 0 12px rgba(155, 177, 209, 0.6);
}

.topology-node.edge {
    background: rgba(10, 16, 28, 0.9);
}

.topology-line {
    position: absolute;
    background: linear-gradient(90deg, rgba(87, 192, 255, 0.25), rgba(101, 227, 189, 0.3));
    height: 2px;
    z-index: 0;
}

.line-1 { top: 74px; left: 13%; width: 18%; }
.line-2 { top: 74px; left: 35%; width: 18%; }
.line-3 { top: 74px; left: 57%; width: 18%; }
.line-4 { top: 158px; left: 57%; width: 18%; }
.line-5 { top: 158px; left: 35%; width: 22%; }

.topology-node[data-node="internet"] { grid-column: 1; grid-row: 1; }
.topology-node[data-node="modem"] { grid-column: 2; grid-row: 1; }
.topology-node[data-node="asr"] { grid-column: 3; grid-row: 1; }
.topology-node[data-node="office-switch"] { grid-column: 4; grid-row: 1; }
.topology-node[data-node="shop-switch"] { grid-column: 5; grid-row: 1; }
.topology-node[data-node="vpn"] { grid-column: 3 / span 2; grid-row: 2; }
.topology-node[data-node="ubuntu"] { grid-column: 5; grid-row: 2; }
.topology-node[data-node="web"] { grid-column: 6; grid-row: 2; }

.network-status-list {
    display: grid;
    gap: 10px;
}

.device-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.device-filters {
    display: grid;
    gap: 12px;
    margin-bottom: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(9, 16, 28, 0.7);
    border: 1px solid rgba(87, 192, 255, 0.16);
}

.device-filter-group {
    display: grid;
    gap: 6px;
}

.device-filter-group input,
.device-filter-group select,
.activity-filters input,
.activity-filters select {
    background: rgba(7, 14, 26, 0.85);
    border: 1px solid rgba(87, 192, 255, 0.22);
    color: var(--ink);
    border-radius: 10px;
    padding: 8px 10px;
}

.noc-alert-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    border-color: rgba(245, 177, 67, 0.4);
    background: rgba(41, 28, 12, 0.75);
    color: #ffd697;
}

.noc-alert-banner strong {
    color: #ffb143;
}

.device-filter-row {
    margin-top: 0;
}

.device-filter-summary {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    font-weight: 600;
}

.device-card {
    text-align: left;
    border: 1px solid rgba(87, 192, 255, 0.2);
    background: rgba(8, 14, 24, 0.7);
    border-radius: 14px;
    padding: 12px 14px;
    color: #e8f0ff;
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
}

.device-card:hover {
    transform: translateY(-2px);
    border-color: rgba(87, 192, 255, 0.35);
    box-shadow: 0 12px 22px rgba(4, 10, 20, 0.4);
}

.device-status {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(155, 177, 209, 0.6);
    box-shadow: 0 0 10px rgba(155, 177, 209, 0.5);
}

.device-status.ok {
    background: #5ee3b5;
    box-shadow: 0 0 12px rgba(94, 227, 181, 0.7);
}

.device-status.down {
    background: #ff7a7a;
    box-shadow: 0 0 12px rgba(255, 122, 122, 0.7);
}

.device-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.device-title {
    font-weight: 700;
}

.device-sub {
    color: rgba(155, 177, 209, 0.8);
    font-size: 0.9rem;
}

.device-meta {
    color: rgba(205, 224, 255, 0.85);
    font-size: 0.85rem;
    margin-top: 6px;
}

.device-health {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    font-size: 0.75rem;
    color: rgba(200, 220, 245, 0.9);
}

.device-health-pill {
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    font-size: 0.68rem;
    background: rgba(80, 180, 120, 0.15);
    border: 1px solid rgba(80, 180, 120, 0.4);
    color: #7cffa3;
}

.device-health-pill.warn {
    background: rgba(245, 177, 67, 0.15);
    border-color: rgba(245, 177, 67, 0.5);
    color: #f5b143;
}

.device-health-pill.stale {
    background: rgba(239, 93, 93, 0.18);
    border-color: rgba(239, 93, 93, 0.5);
    color: #ef5d5d;
}

.device-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 214, 120, 0.35);
    color: #ffd47a;
    background: rgba(23, 18, 10, 0.7);
}

.device-badge.inferred {
    border-color: rgba(255, 169, 90, 0.45);
    color: #ffb870;
    background: rgba(32, 16, 6, 0.75);
}

.device-drawer {
    position: fixed;
    inset: 0;
    background: rgba(5, 10, 18, 0.65);
    backdrop-filter: blur(8px);
    display: grid;
    place-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 60;
}

.device-drawer.open {
    opacity: 1;
    pointer-events: auto;
}

.device-drawer-card {
    width: min(520px, 90vw);
    border-radius: 18px;
    border: 1px solid rgba(87, 192, 255, 0.3);
    background: linear-gradient(160deg, rgba(12, 22, 40, 0.95), rgba(8, 14, 24, 0.9));
    padding: 18px 20px;
    box-shadow: 0 22px 46px rgba(4, 10, 20, 0.6);
}

.network-health {
    display: grid;
    gap: 12px;
}

.health-row {
    display: grid;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(87, 192, 255, 0.2);
    background: rgba(8, 14, 24, 0.65);
}

.health-name {
    font-weight: 700;
    color: #e8f0ff;
}

.health-meta {
    color: rgba(155, 177, 209, 0.85);
    font-size: 0.85rem;
}

.health-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.85rem;
    color: rgba(205, 224, 255, 0.9);
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.drawer-title {
    font-size: 1.2rem;
    font-weight: 700;
}

.drawer-sub {
    color: rgba(155, 177, 209, 0.8);
}

.drawer-body {
    display: grid;
    gap: 12px;
}

.drawer-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(8, 14, 24, 0.7);
    border: 1px solid rgba(87, 192, 255, 0.12);
}

.drawer-actions {
    align-items: center;
}

.drawer-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.network-activity {
    display: grid;
    gap: 10px;
    max-height: 360px;
    overflow: auto;
    padding-right: 4px;
}

.activity-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.activity-filters {
    display: grid;
    grid-template-columns: auto minmax(180px, 1fr) auto minmax(200px, 1.4fr) auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}

.activity-filters .meta-label {
    margin: 0;
}

.activity-row {
    display: grid;
    grid-template-columns: 10px 1fr;
    gap: 12px;
    align-items: start;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(8, 14, 24, 0.7);
    border: 1px solid rgba(87, 192, 255, 0.12);
}

.activity-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 4px;
    background: rgba(155, 177, 209, 0.6);
    box-shadow: 0 0 8px rgba(155, 177, 209, 0.4);
}

.activity-dot.info { background: #4fb2ff; box-shadow: 0 0 10px rgba(79, 178, 255, 0.6); }
.activity-dot.warn { background: #ffd37d; box-shadow: 0 0 10px rgba(255, 211, 125, 0.6); }
.activity-dot.error { background: #ff7a7a; box-shadow: 0 0 10px rgba(255, 122, 122, 0.6); }

.activity-line {
    font-size: 0.95rem;
    color: rgba(232, 240, 255, 0.92);
}

.activity-meta {
    font-size: 0.8rem;
    color: rgba(155, 177, 209, 0.75);
    margin-top: 4px;
}

.status-row {
    display: grid;
    grid-template-columns: 14px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(8, 14, 24, 0.65);
    border: 1px solid rgba(87, 192, 255, 0.12);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(155, 177, 209, 0.6);
}

.status-dot.ok { background: #5ee3b5; }
.status-dot.down { background: #ff7a7a; }

.status-name {
    font-weight: 600;
}

.status-sub {
    font-size: 0.85rem;
    color: rgba(155, 177, 209, 0.8);
}

.status-proof {
    font-size: 0.9rem;
    color: rgba(205, 224, 255, 0.9);
}

@media (max-width: 1100px) {
    .topology {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
        grid-template-rows: repeat(4, minmax(120px, auto));
    }

    .topology-line {
        display: none;
    }

    .topology-node[data-node="internet"] { grid-column: 1; grid-row: 1; }
    .topology-node[data-node="modem"] { grid-column: 2; grid-row: 1; }
    .topology-node[data-node="asr"] { grid-column: 1; grid-row: 2; }
    .topology-node[data-node="office-switch"] { grid-column: 2; grid-row: 2; }
    .topology-node[data-node="shop-switch"] { grid-column: 1; grid-row: 3; }
    .topology-node[data-node="vpn"] { grid-column: 2; grid-row: 3; }
    .topology-node[data-node="ubuntu"] { grid-column: 1; grid-row: 4; }
    .topology-node[data-node="web"] { grid-column: 2; grid-row: 4; }
}

.network-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 8px;
    color: rgba(232, 240, 255, 0.9);
}

.network-columns {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

@media (max-width: 900px) {
    .network-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .network-summary {
        justify-content: flex-start;
    }

    .activity-filters {
        grid-template-columns: 1fr;
    }

    .network-asset-posture-row {
        grid-template-columns: 1fr;
    }

    .network-asset-posture-signal,
    .network-asset-posture-detail {
        font-size: 0.82rem;
    }

    .noc-posture-summary,
    .noc-posture-list-tile,
    .noc-log-freshness {
        grid-column: span 1;
    }

    .noc-posture-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

.app-shell::before {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    right: -220px;
    top: -220px;
    background: radial-gradient(circle, rgba(87, 192, 255, 0.45), transparent 65%);
    pointer-events: none;
}

.app-shell::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(rgba(87, 192, 255, 0.15) 1px, transparent 1px),
        linear-gradient(120deg, rgba(87, 192, 255, 0.16), transparent 45%),
        linear-gradient(200deg, rgba(255, 255, 255, 0.08), transparent 55%);
    background-size: 22px 22px, 100% 100%, 100% 100%;
    opacity: 0.45;
    pointer-events: none;
}

@keyframes aurora-shift {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(1.5%, -1%, 0) scale(1.04);
    }
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
}


.app-shell h2 {
    font-family: "Space Grotesk", "Manrope", sans-serif;
    margin: 0 0 6px 0;
    line-height: 1.25;
}

.app-shell .muted {
    color: var(--app-muted);
}

.app-rail,
.app-main {
    position: relative;
    z-index: 1;
}

.app-rail {
    background: linear-gradient(180deg, rgba(11, 22, 42, 0.98) 0%, rgba(8, 14, 24, 0.95) 100%);
    color: #eaf2ff;
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    border: 1px solid rgba(87, 192, 255, 0.18);
    box-shadow: 0 20px 42px rgba(4, 10, 20, 0.6);
}

.rail-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.85rem 0.95rem;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(14, 24, 40, 0.92), rgba(8, 16, 28, 0.86));
    border: 1px solid rgba(87, 192, 255, 0.12);
    box-shadow: 0 16px 32px rgba(4, 10, 20, 0.22);
}

.rail-logo {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background:
        radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.2), transparent 30%),
        linear-gradient(145deg, rgba(8, 19, 34, 0.98), rgba(22, 72, 126, 0.92)),
        url("../images/pafds-icon-64.png") center / 68% no-repeat;
    border: 1px solid rgba(87, 192, 255, 0.16);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-family: "Space Grotesk", "Manrope", sans-serif;
    letter-spacing: 0.5px;
    color: transparent;
    text-indent: -9999px;
    overflow: hidden;
    box-shadow: 0 14px 26px rgba(4, 10, 20, 0.28);
}

.rail-title {
    font-family: "Space Grotesk", "Manrope", sans-serif;
    font-size: 1.08rem;
    font-weight: 700;
}

.rail-subtitle {
    color: rgba(234, 242, 255, 0.76);
    font-size: 0.8rem;
}

.rail-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rail-link {
    text-decoration: none;
    color: inherit;
    padding: 12px 14px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(10, 18, 32, 0.82), rgba(7, 14, 26, 0.76));
    border: 1px solid rgba(87, 192, 255, 0.1);
    box-shadow: 0 12px 22px rgba(4, 10, 20, 0.16);
    font-weight: 600;
    transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.rail-link:hover {
    transform: translateX(2px);
    background: rgba(87, 192, 255, 0.18);
    border-color: rgba(87, 192, 255, 0.4);
}

.rail-link.active {
    background: rgba(87, 192, 255, 0.3);
    border-color: rgba(87, 192, 255, 0.55);
}

.rail-footer {
    margin-top: auto;
    padding: 12px;
    border-radius: 14px;
    background: rgba(10, 18, 32, 0.6);
    border: 1px solid rgba(87, 192, 255, 0.12);
    font-size: 0.8rem;
    color: rgba(234, 242, 255, 0.8);
}

.rail-label {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.65rem;
    color: rgba(234, 242, 255, 0.6);
}

.rail-value {
    margin-top: 6px;
    font-weight: 600;
}

.app-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.app-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.app-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--app-accent);
    margin: 0;
}

.app-header h1 {
    margin: 6px 0 6px 0;
    font-family: "Space Grotesk", "Manrope", sans-serif;
    font-size: 2.2rem;
    line-height: 1.2;
}

.app-subtitle {
    color: var(--app-muted);
    max-width: 640px;
    margin: 0;
    line-height: 1.5;
}

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

.app-btn {
    text-decoration: none;
    padding: 12px 18px;
    border-radius: 14px;
    font-weight: 700;
    border: 1px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.app-btn.primary {
    background: linear-gradient(135deg, #62ccff, #2a9bff);
    color: #07101f;
    box-shadow: 0 14px 30px rgba(87, 192, 255, 0.35);
}

.app-btn.ghost {
    background: rgba(10, 18, 32, 0.75);
    border-color: rgba(87, 192, 255, 0.2);
    color: var(--app-ink);
}

.app-btn.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.app-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(6, 14, 28, 0.5);
}

.app-btn:focus-visible,
.rail-link:focus-visible,
.app-search button:focus-visible,
.app-search input:focus-visible,
.app-shell .pill:focus-visible,
.app-shell .dark-table a:focus-visible,
.app-shell .form-card input:focus-visible,
.app-shell .app-card input:focus-visible,
.app-shell .form-card select:focus-visible,
.app-shell .app-card select:focus-visible,
.app-shell .form-card textarea:focus-visible,
.app-shell .app-card textarea:focus-visible {
    outline: 2px solid rgba(87, 192, 255, 0.75);
    outline-offset: 2px;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.app-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.app-card {
    background: linear-gradient(160deg, rgba(16, 28, 50, 0.94), rgba(8, 14, 24, 0.82));
    border: 1px solid var(--app-border);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 18px 40px rgba(5, 12, 24, 0.55);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.app-card.card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.app-card.soft {
    background: linear-gradient(160deg, rgba(18, 36, 66, 0.95), rgba(9, 16, 28, 0.85));
}

.app-card:hover {
    transform: translateY(-2px);
    border-color: rgba(87, 192, 255, 0.45);
    box-shadow: 0 24px 50px rgba(5, 12, 24, 0.65);
}

.app-kpis {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
}

.app-kpi {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(87, 192, 255, 0.14);
    color: var(--app-ink);
    font-weight: 600;
    border: 1px solid rgba(87, 192, 255, 0.2);
    flex: 1 1 160px;
    min-width: 150px;
}

.app-kpi strong {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
}

.app-search {
    display: flex;
    gap: 10px;
    align-items: center;
    background: linear-gradient(160deg, rgba(14, 26, 46, 0.9), rgba(7, 14, 26, 0.7));
    border: 1px solid rgba(87, 192, 255, 0.25);
    border-radius: 16px;
    padding: 10px 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 10px 24px rgba(4, 10, 20, 0.35);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.12s ease;
    flex: 1 1 280px;
    max-width: 480px;
    width: 100%;
}

.app-search:focus-within {
    border-color: rgba(87, 192, 255, 0.6);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 0 0 3px rgba(87, 192, 255, 0.2);
}

.app-search input {
    border: none;
    background: transparent;
    color: var(--app-ink);
    min-width: 0;
    padding: 8px 8px;
    flex: 1 1 auto;
    outline: none;
}

.app-search input::placeholder {
    color: rgba(155, 177, 209, 0.75);
}

.app-search button {
    border: none;
    background: linear-gradient(135deg, #62ccff, #2a9bff);
    color: #07101f;
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: 700;
}

.app-select {
    border: 1px solid rgba(87, 192, 255, 0.25);
    background: rgba(9, 16, 30, 0.75);
    color: var(--app-ink);
    border-radius: 12px;
    padding: 10px 12px;
    font-weight: 600;
}

.call-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.app-shell .form-card,
.app-shell .estimate-card,
.app-shell .timeline-card {
    background: linear-gradient(160deg, rgba(16, 28, 50, 0.94), rgba(8, 14, 24, 0.82));
    border: 1px solid var(--app-border);
    box-shadow: 0 18px 40px rgba(5, 12, 24, 0.55);
    border-radius: 18px;
}

.app-shell .form-card {
    padding: 20px;
}

.app-shell .primary {
    background: linear-gradient(135deg, var(--app-accent), var(--app-accent-strong));
    color: #07101f;
    box-shadow: 0 14px 30px rgba(87, 192, 255, 0.35);
}

.app-shell .step-list {
    color: var(--app-muted);
}

.app-shell .eyebrow {
    color: var(--app-accent);
}

.app-shell .form-card input:not([type="checkbox"]):not([type="radio"]),
.app-shell .app-card input:not([type="checkbox"]):not([type="radio"]),
.app-shell .form-card select,
.app-shell .app-card select,
.app-shell .form-card textarea,
.app-shell .app-card textarea {
    background: linear-gradient(180deg, rgba(12, 22, 40, 0.96), rgba(7, 14, 26, 0.85));
    border: 1px solid rgba(87, 192, 255, 0.25);
    color: var(--app-ink);
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 8px 18px rgba(4, 10, 20, 0.35);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.12s ease;
    outline: none;
}

.app-shell .form-card input::placeholder,
.app-shell .app-card input::placeholder,
.app-shell .form-card textarea::placeholder,
.app-shell .app-card textarea::placeholder {
    color: rgba(155, 177, 209, 0.75);
}

.app-shell .form-card input:not([type="checkbox"]):not([type="radio"]):focus,
.app-shell .app-card input:not([type="checkbox"]):not([type="radio"]):focus,
.app-shell .form-card select:focus,
.app-shell .app-card select:focus,
.app-shell .form-card textarea:focus,
.app-shell .app-card textarea:focus {
    border-color: rgba(87, 192, 255, 0.6);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 0 0 3px rgba(87, 192, 255, 0.2);
    background: linear-gradient(180deg, rgba(16, 30, 56, 0.98), rgba(8, 16, 30, 0.9));
}

.app-shell .order-items input,
.app-shell .order-items textarea {
    background: rgba(14, 26, 46, 0.96);
    border: 1px solid rgba(87, 192, 255, 0.35);
    color: #f4f9ff;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 1.15rem;
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: 0.01em;
    caret-color: #f4f9ff;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.app-shell .order-items input::placeholder,
.app-shell .order-items textarea::placeholder {
    color: rgba(190, 210, 240, 0.8);
}

.app-shell .order-items input:focus,
.app-shell .order-items textarea:focus {
    border-color: rgba(120, 210, 255, 0.7);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 0 3px rgba(87, 192, 255, 0.22);
    background: rgba(18, 32, 58, 0.98);
    outline: none;
}

/* Orders page: enforce high-contrast inputs so typed text is always visible. */
.app-shell.app-orders .form-card input:not([type="checkbox"]):not([type="radio"]),
.app-shell.app-orders .app-card input:not([type="checkbox"]):not([type="radio"]),
.app-shell.app-orders .form-card select,
.app-shell.app-orders .app-card select,
.app-shell.app-orders .form-card textarea,
.app-shell.app-orders .app-card textarea {
    background: #f7f9fd;
    border-color: rgba(15, 25, 40, 0.25);
    color: #0c1422;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
    padding: 14px 16px;
    min-height: 56px;
    font-size: 1.15rem;
    font-weight: 600;
}

.app-shell.app-orders .form-card input::placeholder,
.app-shell.app-orders .app-card input::placeholder,
.app-shell.app-orders .form-card textarea::placeholder,
.app-shell.app-orders .app-card textarea::placeholder {
    color: rgba(72, 86, 110, 0.8);
}

.app-shell.app-orders .form-card input:not([type="checkbox"]):not([type="radio"]):focus,
.app-shell.app-orders .app-card input:not([type="checkbox"]):not([type="radio"]):focus,
.app-shell.app-orders .form-card select:focus,
.app-shell.app-orders .app-card select:focus,
.app-shell.app-orders .form-card textarea:focus,
.app-shell.app-orders .app-card textarea:focus {
    border-color: rgba(42, 155, 255, 0.7);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(42, 155, 255, 0.18);
}

.app-shell.app-orders .order-items input,
.app-shell.app-orders .order-items textarea {
    background: #f7f9fd;
    border-color: rgba(15, 25, 40, 0.22);
    color: #0c1422;
    caret-color: #0c1422;
    text-shadow: none;
    padding: 14px 16px;
    min-height: 60px;
    font-size: 1.2rem;
    font-weight: 700;
}

.app-shell.app-orders .order-items input::placeholder,
.app-shell.app-orders .order-items textarea::placeholder {
    color: rgba(72, 86, 110, 0.7);
}

.app-shell.app-orders .order-items input:focus,
.app-shell.app-orders .order-items textarea:focus {
    background: #ffffff;
    border-color: rgba(42, 155, 255, 0.7);
    box-shadow: 0 0 0 3px rgba(42, 155, 255, 0.18);
}

.order-complete {
    position: relative;
    border-radius: 20px;
    padding: 26px 28px;
    background: linear-gradient(135deg, rgba(10, 22, 40, 0.95), rgba(20, 40, 74, 0.95));
    color: #f1f7ff;
    border: 1px solid rgba(87, 192, 255, 0.35);
    box-shadow: 0 18px 30px rgba(7, 16, 32, 0.25);
    overflow: hidden;
    animation: order-pop 0.6s ease both;
}

.order-complete-glow {
    position: absolute;
    inset: -40% -10% auto -10%;
    height: 200%;
    background: radial-gradient(circle at top left, rgba(87, 192, 255, 0.35), transparent 60%);
    pointer-events: none;
}

.order-complete::after {
    content: "";
    position: absolute;
    inset: -40% -120%;
    background: linear-gradient(120deg, transparent 40%, rgba(255, 255, 255, 0.22) 50%, transparent 60%);
    opacity: 0.6;
    animation: order-shimmer 2.4s ease 1;
    pointer-events: none;
}

.order-complete-body {
    display: flex;
    align-items: center;
    gap: 18px;
    position: relative;
    z-index: 1;
}

.order-complete-mark {
    width: 58px;
    height: 58px;
    border-radius: 999px;
    background: linear-gradient(135deg, #47d1ff, #79ffba);
    position: relative;
    flex: 0 0 auto;
    box-shadow: 0 10px 18px rgba(71, 209, 255, 0.25);
    animation: order-mark-pop 0.5s ease both;
}

.order-complete-mark::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 10px;
    border-left: 4px solid #0b1220;
    border-bottom: 4px solid #0b1220;
    left: 18px;
    top: 23px;
    transform: rotate(-45deg);
}

.order-complete-title {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.75rem;
    color: rgba(200, 230, 255, 0.9);
    margin: 0 0 4px;
}

.order-complete-id {
    margin: 0;
    font-size: 1.6rem;
    letter-spacing: 0.01em;
}

.order-complete-sub {
    margin: 6px 0 0;
    color: rgba(225, 240, 255, 0.8);
}

.order-complete-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.order-complete-stats span {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(190, 220, 255, 0.8);
}

.order-complete-stats strong {
    display: block;
    font-size: 1.05rem;
}

.order-complete-actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
}

@keyframes order-pop {
    0% { transform: translateY(8px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes order-mark-pop {
    0% { transform: scale(0.85); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes order-shimmer {
    0% { transform: translateX(-30%); opacity: 0; }
    40% { opacity: 0.65; }
    100% { transform: translateX(40%); opacity: 0; }
}

.app-shell .form-card input:not([type="checkbox"]):not([type="radio"]):disabled,
.app-shell .app-card input:not([type="checkbox"]):not([type="radio"]):disabled,
.app-shell .form-card select:disabled,
.app-shell .app-card select:disabled,
.app-shell .form-card textarea:disabled,
.app-shell .app-card textarea:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.app-shell .form-card select,
.app-shell .app-card select {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, rgba(155, 177, 209, 0.8) 50%),
        linear-gradient(135deg, rgba(155, 177, 209, 0.8) 50%, transparent 50%);
    background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 38px;
}

.app-shell .form-card label:not(.pill),
.app-shell .app-card label:not(.pill) {
    color: var(--app-ink);
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.02em;
    display: block;
    margin-bottom: 4px;
}

.app-shell .toggle-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--app-ink);
}

.app-shell .toggle-row input {
    margin: 0;
}

.app-shell .card-header h3 {
    font-family: "Space Grotesk", "Manrope", sans-serif;
}

.app-shell .pill {
    background: rgba(87, 192, 255, 0.14);
    border: 1px solid rgba(87, 192, 255, 0.22);
    color: var(--app-ink);
}

.app-shell .pill.soft {
    background: rgba(101, 227, 189, 0.12);
    border-color: rgba(101, 227, 189, 0.3);
}

.app-shell .alert {
    border-radius: 16px;
}

.app-shell .dark-table {
    background: transparent;
    color: var(--app-ink);
    width: 100%;
    border-collapse: collapse;
}

.app-shell .dark-table th {
    background: rgba(8, 16, 28, 0.9);
    color: var(--app-muted);
    border-bottom: 1px solid rgba(87, 192, 255, 0.2);
    padding: 12px 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
    position: sticky;
    top: 0;
    z-index: 2;
}

.app-shell .dark-table td {
    border-bottom: 1px solid rgba(87, 192, 255, 0.12);
    padding: 12px 14px;
    font-size: 0.95rem;
}

.app-shell .dark-table a {
    color: var(--app-accent);
    font-weight: 600;
    text-decoration: none;
}

.app-shell .dark-table a:hover {
    color: var(--app-accent-strong);
    text-decoration: underline;
}

.app-shell .dark-table tr:hover td {
    background: rgba(14, 26, 44, 0.6);
}

.app-shell .dark-table tbody tr:nth-child(even) td {
    background: rgba(10, 18, 32, 0.6);
}

.app-shell .dark-table tbody tr:nth-child(even):hover td {
    background: rgba(14, 26, 44, 0.7);
}

.app-shell .dense-history-list {
    display: grid;
    gap: 0.85rem;
}

.app-shell .dense-history-item {
    display: grid;
    gap: 0.8rem;
    padding: 1rem 1.05rem;
    border-radius: 18px;
    border: 1px solid rgba(87, 192, 255, 0.16);
    background: linear-gradient(180deg, rgba(12, 22, 38, 0.94), rgba(8, 16, 28, 0.84));
    box-shadow: 0 14px 24px rgba(4, 10, 20, 0.22);
    min-width: 0;
}

.app-shell .dense-history-head {
    display: grid;
    grid-template-columns: minmax(140px, auto) minmax(0, 1fr);
    gap: 0.8rem 1rem;
    align-items: start;
}

.app-shell .dense-history-stamp,
.app-shell .dense-history-summary {
    display: grid;
    gap: 0.22rem;
    min-width: 0;
}

.app-shell .dense-history-label {
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--app-muted);
}

.app-shell .dense-history-when,
.app-shell .dense-history-title {
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 700;
    color: var(--app-ink);
    overflow-wrap: anywhere;
}

.app-shell .dense-history-sub {
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--app-muted);
    overflow-wrap: anywhere;
}

.app-shell .dense-history-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: flex-start;
}

.app-shell .dense-history-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.65rem;
}

.app-shell .dense-history-fact {
    display: grid;
    gap: 0.18rem;
    padding: 0.72rem 0.8rem;
    border-radius: 14px;
    border: 1px solid rgba(87, 192, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    min-width: 0;
}

.app-shell .dense-history-fact span {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--app-muted);
}

.app-shell .dense-history-fact strong {
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--app-ink);
    overflow-wrap: anywhere;
}

.app-shell .dense-history-note {
    margin: 0;
    padding: 0.82rem 0.9rem;
    border-radius: 14px;
    border: 1px solid rgba(87, 192, 255, 0.1);
    background: rgba(255, 255, 255, 0.035);
    color: var(--app-ink);
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.app-shell .dense-history-note.is-empty {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--app-muted);
}

@media (max-width: 820px) {
    .app-shell .dense-history-head,
    .app-shell .dense-history-facts {
        grid-template-columns: 1fr;
    }
}

.app-shell .app-details {
    border-radius: 16px;
    border: 1px solid rgba(87, 192, 255, 0.18);
    background: rgba(9, 16, 30, 0.6);
    padding: 12px 14px;
}

.app-shell .app-details summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--app-ink);
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.app-shell .app-details summary::marker {
    display: none;
}

.app-shell .app-details summary::after {
    content: "▾";
    color: var(--app-muted);
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

.app-shell .app-details[open] summary::after {
    transform: rotate(180deg);
}

.app-shell .app-details + .app-details {
    margin-top: 10px;
}

.app-shell .update-entry {
    background: rgba(10, 18, 32, 0.75);
    border: 1px solid rgba(87, 192, 255, 0.18);
}

.app-shell .update-attachment a {
    color: var(--app-accent);
    font-weight: 600;
    text-decoration: none;
}

.app-shell .update-attachment a:hover {
    color: var(--app-accent-strong);
    text-decoration: underline;
}

.app-shell .update-meta {
    color: var(--app-muted);
}

.app-shell .meta-row {
    border-bottom: 1px solid rgba(87, 192, 255, 0.12);
}

.app-shell .meta-label {
    color: var(--app-muted);
}

.app-shell .badge {
    background: rgba(87, 192, 255, 0.18);
    border-color: rgba(87, 192, 255, 0.3);
    color: var(--app-accent);
}

.app-shell .badge.soft {
    background: rgba(101, 227, 189, 0.12);
    border-color: rgba(101, 227, 189, 0.22);
    color: var(--app-teal);
}

.app-shell .drive-picker {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(8, 14, 24, 0.7);
    border: 1px solid rgba(87, 192, 255, 0.15);
}

.app-shell .drive-search {
    width: 100%;
    background: rgba(7, 14, 26, 0.9);
    border: 1px solid rgba(87, 192, 255, 0.2);
    color: var(--app-ink);
    padding: 8px 10px;
    border-radius: 12px;
}

.app-shell .drive-results {
    display: grid;
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 4px;
}

.app-shell .drive-item {
    border: 1px solid rgba(87, 192, 255, 0.16);
    background: rgba(10, 18, 32, 0.85);
    color: var(--app-ink);
    padding: 10px 12px;
    border-radius: 12px;
    text-align: left;
    display: grid;
    gap: 4px;
    cursor: pointer;
}

.app-shell .drive-item:hover {
    border-color: rgba(87, 192, 255, 0.4);
    box-shadow: 0 10px 24px rgba(5, 12, 24, 0.45);
}

.app-shell .preview-frame {
    background: rgba(10, 18, 32, 0.75);
}

.app-shell .ai-dot {
    background: var(--app-warm);
    box-shadow: 0 0 8px rgba(255, 185, 96, 0.4);
}

.app-shell .preview-card[data-ai="on"] .ai-dot {
    background: var(--app-teal);
    box-shadow: 0 0 10px rgba(36, 183, 157, 0.4);
}

.app-shell .preview-card[data-ai="on"] .ai-status {
    color: var(--app-accent-strong);
}

.app-quick-update .quick-update-form {
    position: relative;
}

.app-quick-update .quick-update-templates {
    background: rgba(9, 16, 28, 0.6);
    border: 1px dashed rgba(87, 192, 255, 0.3);
    border-radius: 14px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.app-quick-update .quick-update-templates .pill {
    cursor: pointer;
}

.app-quick-update .quick-update-preview {
    position: sticky;
    top: 24px;
}

.app-quick-update .preview-message {
    margin-top: 12px;
    background: rgba(7, 14, 26, 0.7);
    border: 1px dashed rgba(87, 192, 255, 0.35);
    border-radius: 12px;
    padding: 12px;
    min-height: 140px;
    white-space: pre-wrap;
}

.app-quick-update .preview-message.empty {
    color: var(--app-muted);
}

.app-quick-update .preview-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
}

/* AI reports */
.app-reports .report-console {
    display: grid;
    gap: 12px;
}

.app-reports .report-status {
    color: var(--app-muted);
    font-size: 0.9rem;
}

.app-reports .report-status.error {
    color: #ffb3b3;
}

.app-reports .report-log {
    min-height: 260px;
    max-height: 360px;
    overflow-y: auto;
    background: rgba(7, 14, 26, 0.78);
    border: 1px solid rgba(87, 192, 255, 0.2);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.app-reports .report-msg {
    padding: 10px 12px;
    border-radius: 12px;
    line-height: 1.45;
    white-space: pre-wrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.app-reports .report-msg.user {
    align-self: flex-end;
    background: rgba(101, 227, 189, 0.16);
    border: 1px solid rgba(101, 227, 189, 0.35);
}

.app-reports .report-msg.assistant {
    align-self: flex-start;
    background: rgba(87, 192, 255, 0.16);
    border: 1px solid rgba(87, 192, 255, 0.35);
}

.app-reports .report-msg.system {
    align-self: stretch;
    background: rgba(10, 18, 32, 0.7);
    border: 1px dashed rgba(87, 192, 255, 0.3);
    color: var(--app-muted);
    font-size: 0.9rem;
}

.app-reports .report-controls {
    margin-top: 6px;
}

.app-reports .report-input textarea {
    min-height: 130px;
}

.app-reports .report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

.app-reports .report-actions .app-btn {
    min-width: 120px;
    text-align: center;
}

.app-reports .report-quick .report-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.app-reports .report-list-item {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(10, 18, 32, 0.7);
    border: 1px solid rgba(87, 192, 255, 0.2);
}

.app-reports .report-summary {
    margin-bottom: 12px;
}

.app-reports .report-table-wrap {
    max-height: 420px;
    overflow-y: auto;
}

.app-reports .report-table {
    table-layout: fixed;
}

.app-reports .report-table th,
.app-reports .report-table td {
    vertical-align: top;
    word-break: break-word;
    white-space: normal;
}

.app-reports .report-empty {
    color: var(--app-muted);
    background: rgba(10, 18, 32, 0.6);
    border: 1px dashed rgba(87, 192, 255, 0.25);
    border-radius: 14px;
    padding: 18px;
    text-align: center;
}

.app-reports .report-json {
    background: rgba(7, 14, 26, 0.8);
    border: 1px solid rgba(87, 192, 255, 0.2);
    border-radius: 12px;
    padding: 12px;
    color: var(--app-ink);
    font-family: "Consolas", "Menlo", "Courier New", monospace;
    font-size: 0.85rem;
    white-space: pre-wrap;
    word-break: break-word;
    min-height: 120px;
}

.app-reveal {
    animation: app-rise 0.6s ease both;
    animation-delay: var(--delay, 0s);
}

@keyframes app-rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

@media (max-width: 1100px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .app-quick-update .quick-update-preview {
        position: static;
    }

    .app-rail {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }

    .rail-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

@media (max-width: 820px) {
    .app-header {
        flex-direction: column;
    }

    .app-actions {
        width: 100%;
    }

    .app-grid {
        grid-template-columns: 1fr;
    }

    .order-summary-bar {
        position: static;
        grid-template-columns: 1fr;
    }

    .order-summary-bar .summary-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .app-shell {
        padding: 16px;
    }

    .app-search {
        width: 100%;
    }

    .app-search input {
        min-width: 0;
        flex: 1;
    }
}

/* Inventory dashboard */
.app-inventory .inventory-overview-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
    position: sticky;
    top: 14px;
    z-index: 3;
}

.app-inventory .inventory-overview-switcher .pill {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 16px;
}

.app-inventory .inventory-switch-meta {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--app-muted);
    font-weight: 700;
}

.app-inventory .inventory-overview-panels {
    margin-top: 18px;
}

.app-inventory .inventory-overview-panel {
    display: none;
    gap: 18px;
}

.app-inventory .inventory-overview-panel.active {
    display: grid;
}

.app-inventory .inventory-at-a-glance {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}

.app-inventory .inventory-glance-card {
    background: linear-gradient(160deg, rgba(16, 28, 50, 0.94), rgba(8, 14, 24, 0.82));
    border: 1px solid rgba(87, 192, 255, 0.18);
    border-radius: 18px;
    padding: 18px 20px;
    box-shadow: 0 18px 40px rgba(5, 12, 24, 0.42);
    display: grid;
    gap: 8px;
    align-content: start;
}

.app-inventory .inventory-glance-card.emphasis {
    background: linear-gradient(155deg, rgba(24, 41, 71, 0.98), rgba(9, 16, 28, 0.86));
    border-color: rgba(94, 227, 181, 0.28);
}

.app-inventory .inventory-glance-card strong {
    font-size: clamp(1.6rem, 2vw, 2.2rem);
    line-height: 1;
    font-weight: 800;
    color: var(--app-ink);
}

.app-inventory .inventory-glance-label {
    font-size: 0.76rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--app-muted);
    font-weight: 800;
}

.app-inventory .inventory-glance-note {
    font-size: 0.88rem;
    color: var(--app-muted);
}

.app-inventory .inventory-glance-card.quick-links {
    gap: 12px;
}

.app-inventory .inventory-glance-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.app-inventory .inventory-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.app-inventory .inventory-filters .pill {
    text-decoration: none;
}

.app-inventory .inventory-filters .pill.active {
    background: rgba(87, 192, 255, 0.32);
    border-color: rgba(87, 192, 255, 0.6);
    color: var(--app-ink);
}

.app-inventory .inventory-status {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.app-inventory .inventory-status-row {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(140px, 3fr) auto;
    gap: 12px;
    align-items: center;
}

.app-inventory .inventory-status-label {
    font-weight: 600;
}

.app-inventory .inventory-status-track {
    height: 8px;
    background: rgba(87, 192, 255, 0.12);
    border-radius: 999px;
    overflow: hidden;
}

.app-inventory .inventory-status-fill {
    height: 100%;
    width: var(--value);
    background: linear-gradient(90deg, #5ee3b5, #4fb2ff);
    border-radius: 999px;
    box-shadow: 0 6px 14px rgba(79, 178, 255, 0.35);
}

.app-inventory .inventory-status-value {
    font-weight: 700;
}

.app-inventory .inventory-alerts {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.app-inventory .inventory-alert {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(10, 18, 32, 0.7);
    border: 1px solid rgba(87, 192, 255, 0.16);
}

.app-inventory .inventory-alert .alert-title {
    font-weight: 600;
}

.app-inventory .inventory-alert .alert-title a {
    color: var(--app-accent);
    text-decoration: none;
}

.app-inventory .inventory-alert .alert-title a:hover {
    color: var(--app-accent-strong);
    text-decoration: underline;
}

.app-inventory .inventory-alert .alert-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--app-muted);
}

.app-inventory .inventory-alert .alert-qty {
    font-weight: 700;
    color: var(--app-ink);
}

.app-inventory .inventory-alert .alert-loc {
    color: var(--app-muted);
}

.app-inventory .inventory-table {
    width: 100%;
    table-layout: auto;
}

.app-inventory .inventory-table th,
.app-inventory .inventory-table td {
    overflow-wrap: anywhere;
    vertical-align: top;
}

.app-inventory .inventory-table-readable .inv-name {
    display: block;
    font-weight: 800;
    font-size: 1.02rem;
    color: var(--app-ink);
    text-decoration: none;
}

.app-inventory .inventory-table-readable .inv-name:hover {
    color: var(--app-accent-strong);
    text-decoration: underline;
}

.app-inventory .inventory-table-readable .inv-subline {
    margin-top: 6px;
    line-height: 1.35;
}

.app-inventory .inventory-table-readable .inv-dot {
    margin: 0 6px;
    opacity: 0.6;
}

.app-inventory .inventory-table-readable .inv-primary {
    font-weight: 700;
    color: var(--app-ink);
}

.app-inventory .inventory-table-readable .inv-date-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.app-inventory .inventory-table-readable .inv-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.app-inventory .inventory-table-readable .inv-actions .pill {
    white-space: nowrap;
}

@media (max-width: 1100px) {
    .app-inventory .inventory-table-readable [data-col="dates"] {
        display: none;
    }
}

@media (max-width: 900px) {
    .app-inventory .inventory-table-readable [data-col="where"] {
        display: none;
    }

    .app-inventory .inventory-table-readable .inv-actions {
        justify-content: flex-start;
    }
}

/* Inventory daily activity */
.app-inventory .activity-kpis {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
}

.app-inventory .activity-kpi {
    background: rgba(10, 18, 32, 0.75);
    border: 1px solid rgba(87, 192, 255, 0.18);
    border-radius: 16px;
    padding: 12px 14px;
    flex: 1 1 180px;
    min-width: 160px;
}

.app-inventory .activity-kpi span {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--app-muted);
    font-weight: 700;
}

.app-inventory .activity-kpi strong {
    display: block;
    font-size: 1.35rem;
    margin-top: 6px;
    font-weight: 800;
}

.app-inventory .activity-panels {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.app-inventory .activity-panel {
    background: rgba(8, 14, 26, 0.7);
    border: 1px solid rgba(87, 192, 255, 0.16);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.app-inventory .activity-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.app-inventory .activity-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
}

.app-inventory .activity-item {
    background: rgba(10, 18, 32, 0.8);
    border: 1px solid rgba(87, 192, 255, 0.16);
    border-radius: 12px;
    padding: 10px 12px;
    display: grid;
    gap: 4px;
}

.app-inventory .activity-title {
    font-weight: 600;
}

.app-inventory .activity-title a {
    color: var(--app-ink);
    text-decoration: none;
}

.app-inventory .activity-title a:hover {
    color: var(--app-accent-strong);
    text-decoration: underline;
}

.app-inventory .activity-meta {
    font-size: 0.85rem;
    color: var(--app-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.app-inventory .activity-note {
    font-size: 0.85rem;
    color: var(--app-muted);
}

/* Order entry recap */
.order-entry-card .entry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px 12px;
    margin-top: 6px;
}

.order-entry-card .entry-span {
    grid-column: span 2;
}

.order-entry-card .entry-value {
    font-weight: 600;
}

.order-entry-card .entry-value.empty {
    color: var(--app-muted);
}

@media (max-width: 820px) {
    .order-entry-card .entry-span {
        grid-column: span 1;
    }
}

@media (max-width: 820px) {
    .app-inventory .inventory-overview-switcher {
        position: static;
    }

    .app-inventory .inventory-status-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}

/* Inventory install */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.photo-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border-radius: 14px;
    background: rgba(10, 18, 32, 0.7);
    border: 1px solid rgba(87, 192, 255, 0.16);
    text-decoration: none;
    color: inherit;
}

.photo-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    background: rgba(10, 18, 32, 0.9);
}

.photo-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85rem;
}

@media (max-width: 820px) {
    .photo-card img {
        height: 160px;
    }
}

/* Inventory installed today */
.app-inventory-installed .installers-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.app-inventory-installed .installer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(10, 18, 32, 0.7);
    border: 1px solid rgba(87, 192, 255, 0.16);
}

.app-inventory-installed .installer-row .installer-name {
    font-weight: 600;
}

.app-inventory-installed .installer-row .installer-count {
    font-weight: 700;
    color: var(--app-ink);
}

.app-inventory-installed .install-records {
    display: grid;
    gap: 16px;
    margin-top: 12px;
}

.app-inventory-installed .install-record {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(10, 18, 32, 0.7);
    border: 1px solid rgba(87, 192, 255, 0.16);
}

.app-inventory-installed .install-photo {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border-radius: 14px;
    background: rgba(7, 14, 26, 0.7);
    border: 1px solid rgba(87, 192, 255, 0.18);
    min-height: 160px;
}

.app-inventory-installed .install-photo img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 10px;
    background: rgba(10, 18, 32, 0.9);
}

.app-inventory-installed .install-photo-placeholder {
    flex: 1;
    display: grid;
    place-items: center;
    text-align: center;
    color: var(--app-muted);
    font-size: 0.9rem;
    padding: 12px;
    border-radius: 10px;
    background: rgba(10, 18, 32, 0.6);
    border: 1px dashed rgba(87, 192, 255, 0.2);
}

.app-inventory-installed .install-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.app-inventory-installed .install-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.app-inventory-installed .install-title a {
    color: var(--app-ink);
    text-decoration: none;
}

.app-inventory-installed .install-title a:hover {
    color: var(--app-accent-strong);
    text-decoration: underline;
}

.app-inventory-installed .install-status {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.app-inventory-installed .install-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 6px 16px;
    margin-top: 10px;
}

.app-inventory-installed .install-notes {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(7, 14, 26, 0.7);
    border: 1px dashed rgba(87, 192, 255, 0.25);
    color: var(--app-muted);
}

.app-inventory-installed .install-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

@media (max-width: 900px) {
    .app-inventory-installed .install-record {
        grid-template-columns: 1fr;
    }

    .app-inventory-installed .install-photo img {
        height: 180px;
    }
}

/* Job detail items emphasis */
.items-hero {
    background: rgba(15, 20, 27, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 20px 22px;
    margin-bottom: 24px;
    box-shadow: 0 22px 40px rgba(0, 0, 0, 0.25);
}

.items-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.items-meta {
    font-size: 0.9rem;
    color: #c2c9d6;
    background: rgba(20, 33, 48, 0.65);
    padding: 8px 12px;
    border-radius: 999px;
}

.items-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin: 16px 0 18px;
}

.items-kpi {
    background: rgba(12, 18, 26, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.items-kpi strong {
    font-size: 1.4rem;
}

.items-kpi.highlight {
    border-color: rgba(229, 188, 88, 0.45);
    background: rgba(35, 29, 15, 0.9);
}

.items-tools {
    display: grid;
    grid-template-columns: minmax(180px, 1.6fr) minmax(160px, 0.8fr) minmax(200px, 1fr);
    gap: 14px;
    align-items: end;
    margin-bottom: 14px;
}

.items-tools label {
    font-size: 0.85rem;
    color: #aeb7c5;
    display: block;
    margin-bottom: 6px;
}

.items-tools input[type="search"],
.items-tools select {
    width: 100%;
}

.items-checks {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.items-checks .check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: #cbd4e1;
}

.items-table .dark-table th,
.items-table .dark-table td {
    font-size: 0.98rem;
}

.items-table .dark-table td {
    padding: 14px 12px;
}

@media (max-width: 900px) {
    .items-tools {
        grid-template-columns: 1fr;
    }
}

/* Daily ordered vs received summary */
.daily-counts {
    background: rgba(12, 18, 26, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.daily-counts-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.daily-counts-form input[type="date"] {
    min-width: 150px;
}

.daily-counts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 14px;
}

.daily-count {
    background: rgba(8, 12, 18, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.daily-count strong {
    font-size: 1.6rem;
}

.daily-count.highlight {
    border-color: rgba(79, 178, 255, 0.45);
    background: rgba(15, 25, 38, 0.95);
}

/* Compact barcode previews for tables */
.barcode-preview--compact {
    padding: 6px 8px;
    min-height: 44px;
    background: #ffffff;
}

.barcode-preview--compact svg {
    width: 100%;
    height: 38px;
}

/* Jobs activity + drawer */
.items-activity {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
}

.items-activity-left {
    display: grid;
    gap: 0.4rem;
}

.items-activity-label {
    font-size: 0.8rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}

.items-activity-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.items-activity-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.items-activity-date label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.6);
}

.items-activity-date input[type='date'] {
    background: #111722;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e8eef6;
    padding: 0.4rem 0.6rem;
    border-radius: 10px;
}

.app-details.drawer summary {
    padding: 0.7rem 0.9rem;
    border-radius: 12px;
    background: rgba(15, 24, 36, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.app-details.drawer .drawer-body {
    margin-top: 0.8rem;
    display: grid;
    gap: 1rem;
}

.drawer-section {
    padding: 0.85rem 0.9rem;
    border-radius: 14px;
    background: rgba(10, 16, 26, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.field-grid.compact {
    gap: 0.8rem;
}

.drawer-section h4 {
    font-size: 0.95rem;
    margin-bottom: 0.6rem;
}

.field-grid.three-col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
    .field-grid.three-col {
        grid-template-columns: 1fr;
    }
}

/* Activity + NOC lite */
.activity-table td,
.activity-table th {
    vertical-align: top;
}

.activity-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    background: rgba(20, 26, 35, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.75rem;
}

.noc-lite-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.noc-tile {
    padding: 1rem;
    border-radius: 16px;
    background: rgba(12, 18, 28, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: grid;
    gap: 0.4rem;
}

.noc-tile strong {
    font-size: 1.6rem;
}

.noc-netflow {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.noc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.35rem;
    font-size: 0.9rem;
    color: rgba(231, 239, 250, 0.86);
}

.noc-list li {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    align-items: center;
}

.noc-list li span:last-child {
    font-weight: 600;
    color: #f4fbff;
}

.noc-refresh {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(8, 14, 24, 0.7);
    border: 1px solid rgba(87, 192, 255, 0.18);
}

.noc-refresh strong {
    font-size: 0.95rem;
}

.noc-device-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.6rem;
}

.noc-device-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 12px;
    background: rgba(10, 16, 25, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.noc-device-row::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #8fa7c1;
    box-shadow: 0 0 10px rgba(143, 167, 193, 0.6);
}

.noc-device-row.ok::before {
    background: #29d391;
    box-shadow: 0 0 10px rgba(41, 211, 145, 0.6);
}

.noc-device-row.warn::before {
    background: #f5b143;
    box-shadow: 0 0 10px rgba(245, 177, 67, 0.6);
}

.noc-device-row.stale::before {
    background: #ef5d5d;
    box-shadow: 0 0 10px rgba(239, 93, 93, 0.6);
}

.noc-device-name {
    font-weight: 600;
    color: #f4fbff;
}

.noc-device-metrics {
    display: grid;
    gap: 0.2rem;
    font-size: 0.85rem;
    color: rgba(231, 239, 250, 0.86);
    text-align: right;
}
.noc-device-actions {
    display: flex;
    gap: 0.35rem;
    justify-content: flex-end;
    align-items: center;
    margin-top: 0.1rem;
}

.noc-device-actions .pill {
    font-size: 0.75rem;
}

.noc-device-status {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(231, 239, 250, 0.65);
}

.noc-alerts {
    grid-column: span 2;
}

.noc-alert-list {
    list-style: none;
    margin: 8px 0 0 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.noc-alert-row {
    display: grid;
    gap: 4px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(18, 24, 36, 0.7);
    border: 1px solid rgba(255, 190, 120, 0.2);
}

.noc-alert-label {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: #ffcc8a;
}

.noc-alert-detail {
    font-size: 0.85rem;
    color: rgba(240, 245, 255, 0.9);
}

.noc-alert-time {
    font-size: 0.75rem;
    color: rgba(170, 185, 210, 0.85);
}

.noc-summary {
    grid-column: span 2;
}

.noc-log-freshness {
    grid-column: span 4;
}

.noc-summary-body {
    margin: 10px 0 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(8, 14, 26, 0.7);
    border: 1px solid rgba(87, 192, 255, 0.18);
    white-space: pre-wrap;
    font-size: 0.85rem;
    color: rgba(231, 239, 250, 0.92);
}

.noc-posture-summary {
    grid-column: span 2;
}

.noc-posture-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.noc-posture-list-tile {
    grid-column: span 2;
}

.noc-posture-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.noc-posture-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(87, 192, 255, 0.18);
    background: rgba(10, 16, 25, 0.6);
}

.noc-posture-row.warn {
    border-color: rgba(245, 177, 67, 0.35);
}

.noc-posture-row.critical {
    border-color: rgba(239, 93, 93, 0.4);
}

.noc-posture-row.stale {
    border-color: rgba(154, 177, 207, 0.3);
}

.noc-posture-main {
    display: grid;
    gap: 4px;
}

.noc-posture-name {
    font-weight: 700;
    color: #f4fbff;
}

.noc-posture-detail {
    color: rgba(231, 239, 250, 0.88);
    font-size: 0.85rem;
}

/* Footer health widget */
.footer-health {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
    font-size: 0.8rem;
}

.footer-powered {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-left: 1rem;
}

.footer-powered-logo {
    height: 18px;
    width: auto;
    opacity: 0.92;
    filter: drop-shadow(0 8px 14px rgba(5, 12, 24, 0.6));
}

.footer-health .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #8fa7c1;
    box-shadow: 0 0 10px rgba(143, 167, 193, 0.6);
}

.footer-health.ok .status-dot {
    background: #29d391;
    box-shadow: 0 0 10px rgba(41, 211, 145, 0.6);
}

.footer-health.warn .status-dot {
    background: #f5b143;
    box-shadow: 0 0 10px rgba(245, 177, 67, 0.6);
}

.footer-health.bad .status-dot {
    background: #ef5d5d;
    box-shadow: 0 0 10px rgba(239, 93, 93, 0.6);
}

/* Home dashboard layout + KPI cards */
.app-home-dashboard .home-kpi-card {
    min-height: 132px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.app-home-dashboard .home-kpi-value {
    font-size: clamp(1.45rem, 2vw, 2rem);
    font-weight: 800;
    letter-spacing: 0.01em;
    color: #f6fbff;
}

.app-home-dashboard .timeline-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.app-home-dashboard .timeline-list li {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 12px;
    background: rgba(9, 18, 34, 0.55);
}

.app-home-dashboard .timeline-title {
    font-weight: 600;
    color: #e9f3ff;
}

/* Ops hub polish: calmer palette + touch-first targets. */
.app-shell.app-ops-hub {
    --app-border: rgba(124, 171, 201, 0.24);
    --app-accent: #7fb9d7;
    --app-accent-strong: #4f90b6;
    --app-teal: #8ed5bb;
    background:
        radial-gradient(860px 560px at 14% -18%, rgba(127, 185, 215, 0.25), transparent 62%),
        radial-gradient(720px 520px at 108% 14%, rgba(142, 213, 187, 0.2), transparent 64%),
        linear-gradient(160deg, #081322 0%, #0b192c 50%, #08101b 100%);
}

.app-shell.app-ops-hub .hub-tabs {
    gap: 10px;
}

.app-shell.app-ops-hub .hub-tabs .pill,
.app-shell.app-ops-hub .app-actions .app-btn,
.app-shell.app-ops-hub .rail-link {
    min-height: 46px;
}

.app-shell.app-ops-hub .hub-tabs .pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 14px;
    border: 1px solid rgba(127, 185, 215, 0.28);
    background: rgba(9, 22, 37, 0.72);
    font-weight: 700;
}

.app-shell.app-ops-hub .hub-tabs .pill.active {
    background: rgba(127, 185, 215, 0.3);
    border-color: rgba(127, 185, 215, 0.62);
    color: #f3f8ff;
}

.app-shell.app-ops-hub .app-kpi {
    background: rgba(127, 185, 215, 0.13);
    border-color: rgba(127, 185, 215, 0.24);
}

.app-shell.app-ops-hub .app-card.card-link {
    background: linear-gradient(160deg, rgba(17, 35, 58, 0.94), rgba(9, 18, 30, 0.86));
    border-color: rgba(127, 185, 215, 0.26);
}

.app-shell.app-ops-hub .app-card.card-link:hover {
    border-color: rgba(142, 213, 187, 0.42);
    box-shadow: 0 24px 52px rgba(5, 14, 26, 0.62);
}

.app-shell.app-ops-hub .app-actions {
    gap: 12px;
}

.app-shell.app-ops-hub .app-actions .app-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* PAFDS mode for Ops hub. */
.app-shell.app-ops-hub.app-ops-pafds {
    --app-border: rgba(133, 168, 196, 0.24);
    --app-accent: #8bbacb;
    --app-accent-strong: #5c90ac;
    --app-teal: #90cfbe;
    background:
        radial-gradient(860px 560px at 10% -20%, rgba(139, 186, 203, 0.24), transparent 62%),
        radial-gradient(700px 520px at 108% 18%, rgba(144, 207, 190, 0.2), transparent 64%),
        linear-gradient(160deg, #081322 0%, #0a182a 52%, #07111e 100%);
}

.app-shell.app-ops-hub.app-ops-pafds .hub-tabs .pill {
    border-color: rgba(133, 168, 196, 0.3);
    background: rgba(12, 24, 42, 0.74);
}

.app-shell.app-ops-hub.app-ops-pafds .hub-tabs .pill.active {
    background: rgba(139, 186, 203, 0.33);
    border-color: rgba(139, 186, 203, 0.62);
}

.app-shell.app-ops-hub.app-ops-pafds .app-kpi,
.app-shell.app-ops-hub.app-ops-pafds .app-card.card-link {
    border-color: rgba(133, 168, 196, 0.28);
}

@media (max-width: 900px) {
    .app-shell.app-ops-hub .hub-tabs .pill {
        flex: 1 1 calc(50% - 10px);
    }
}

@media (pointer: coarse) {
    .app-shell.app-ops-hub .hub-tabs .pill,
    .app-shell.app-ops-hub .app-actions .app-btn,
    .app-shell.app-ops-hub .rail-link {
        min-height: 52px;
        padding-top: 12px;
        padding-bottom: 12px;
    }
}

/* PAFDS operations pages: long-session readability + touch controls. */
.app-shell.app-pafds-service,
.app-shell.app-pafds-leads,
.app-shell.app-pafds-ops {
    --app-border: rgba(133, 168, 196, 0.24);
    --app-accent: #8bbacb;
    --app-accent-strong: #5c90ac;
    background:
        radial-gradient(860px 560px at 10% -20%, rgba(139, 186, 203, 0.24), transparent 62%),
        radial-gradient(700px 520px at 108% 18%, rgba(144, 207, 190, 0.18), transparent 64%),
        linear-gradient(160deg, #081322 0%, #0a182a 52%, #07111e 100%);
}

.app-shell.app-pafds-hub {
    --app-border: rgba(133, 168, 196, 0.24);
    --app-accent: #8bbacb;
    --app-accent-strong: #5c90ac;
    background:
        radial-gradient(860px 560px at 10% -20%, rgba(139, 186, 203, 0.24), transparent 62%),
        radial-gradient(700px 520px at 108% 18%, rgba(144, 207, 190, 0.18), transparent 64%),
        linear-gradient(160deg, #081322 0%, #0a182a 52%, #07111e 100%);
}

.app-shell.app-pafds-hub .app-card-wide {
    grid-column: 1 / -1;
}

.app-shell.app-pafds-hub .pulse-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.app-shell.app-pafds-hub .pulse-tile {
    text-decoration: none;
    color: var(--app-ink);
    padding: 14px;
    border-radius: 14px;
    border: 1px solid rgba(133, 168, 196, 0.28);
    background: linear-gradient(150deg, rgba(13, 24, 44, 0.92), rgba(8, 16, 30, 0.85));
    box-shadow: 0 14px 30px rgba(5, 12, 24, 0.4);
    display: grid;
    gap: 4px;
    transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.app-shell.app-pafds-hub .pulse-tile strong {
    font-size: 1.3rem;
    line-height: 1.2;
}

.app-shell.app-pafds-hub .pulse-tile small {
    color: var(--app-muted);
    font-size: 0.8rem;
}

.app-shell.app-pafds-hub .pulse-tile:hover {
    transform: translateY(-2px);
    border-color: rgba(133, 168, 196, 0.44);
    box-shadow: 0 18px 34px rgba(5, 12, 24, 0.52);
}

.app-shell.app-pafds-hub .app-kpi.sla {
    min-width: 220px;
}

.app-shell.app-pafds-hub .app-kpi.sla em {
    display: block;
    margin-top: 3px;
    font-style: normal;
    font-size: 0.78rem;
    color: rgba(232, 240, 255, 0.8);
}

.app-shell.app-pafds-hub .app-kpi.sla.ok {
    border-color: rgba(101, 227, 189, 0.4);
    background: rgba(101, 227, 189, 0.12);
}

.app-shell.app-pafds-hub .app-kpi.sla.warn {
    border-color: rgba(255, 211, 125, 0.45);
    background: rgba(255, 211, 125, 0.14);
}

.app-shell.app-pafds-hub .app-kpi.sla.danger {
    border-color: rgba(255, 139, 139, 0.45);
    background: rgba(255, 139, 139, 0.15);
}

.app-shell.app-pafds-hub .dash-table .app-btn {
    padding: 7px 10px;
    border-radius: 10px;
    font-size: 0.82rem;
    min-height: 36px;
}

.app-shell.app-pafds-hub .pafds-row-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.app-shell.app-pafds-hub .app-btn,
.app-shell.app-pafds-hub .pill {
    min-height: 44px;
}

.app-shell.app-pafds-service .app-search,
.app-shell.app-pafds-leads .app-search {
    flex-wrap: wrap;
    align-items: stretch;
}

.app-shell.app-pafds-service .app-search input,
.app-shell.app-pafds-service .app-search select,
.app-shell.app-pafds-service .app-search button,
.app-shell.app-pafds-service .app-btn,
.app-shell.app-pafds-service .pill,
.app-shell.app-pafds-leads .app-search input,
.app-shell.app-pafds-leads .app-search select,
.app-shell.app-pafds-leads .app-search button,
.app-shell.app-pafds-leads .app-btn,
.app-shell.app-pafds-leads .pill {
    min-height: 44px;
}

.app-shell.app-pafds-service .app-search button,
.app-shell.app-pafds-leads .app-search button {
    border-radius: 12px;
    border: 1px solid rgba(133, 168, 196, 0.34);
    background: linear-gradient(135deg, rgba(139, 186, 203, 0.26), rgba(92, 144, 172, 0.28));
    color: #eaf5ff;
    font-weight: 700;
    padding: 10px 14px;
}

.app-shell.app-pafds-service .app-kpi,
.app-shell.app-pafds-leads .app-kpi,
.app-shell.app-pafds-ops .app-kpi {
    background: rgba(133, 168, 196, 0.13);
    border-color: rgba(133, 168, 196, 0.25);
}

.app-shell.app-pafds-ops .app-card-wide {
    grid-column: 1 / -1;
}

.app-shell.app-pafds-ops .hub-tabs {
    gap: 8px;
}

.app-shell.app-pafds-ops .dash-table td strong {
    color: #eaf4ff;
}

.app-shell.app-pafds-ops .status-pill {
    white-space: nowrap;
}

.app-shell.app-pafds-ops [data-ops-refresh-countdown] {
    font-family: var(--app-font-mono);
    letter-spacing: 0.01em;
}

.app-shell.app-pafds-ops [data-ops-auto-refresh-toggle][aria-pressed="true"] {
    border-color: rgba(101, 227, 189, 0.5);
    background: linear-gradient(135deg, rgba(101, 227, 189, 0.24), rgba(87, 192, 255, 0.2));
    color: #ecfff8;
}

.app-shell.app-pafds-ops .dash-table tr.row-overdue td {
    background: linear-gradient(120deg, rgba(255, 112, 112, 0.2), rgba(16, 30, 54, 0.22));
}

.app-shell.app-pafds-ops .dash-table tr.row-today td {
    background: linear-gradient(120deg, rgba(255, 207, 118, 0.14), rgba(16, 30, 54, 0.2));
}

@media (pointer: coarse) {
    .app-shell.app-pafds-hub .dash-table .app-btn {
        min-height: 44px;
    }

    .app-shell.app-pafds-hub .app-btn,
    .app-shell.app-pafds-hub .pill,
    .app-shell.app-pafds-service .app-search input,
    .app-shell.app-pafds-service .app-search select,
    .app-shell.app-pafds-service .app-search button,
    .app-shell.app-pafds-service .app-btn,
    .app-shell.app-pafds-service .pill,
    .app-shell.app-pafds-leads .app-search input,
    .app-shell.app-pafds-leads .app-search select,
    .app-shell.app-pafds-leads .app-search button,
    .app-shell.app-pafds-leads .app-btn,
    .app-shell.app-pafds-leads .pill {
        min-height: 52px;
    }
}

@media (max-width: 900px) {
    .app-shell.app-pafds-ops .hub-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: thin;
    }

    .app-shell.app-pafds-ops .hub-tabs .pill {
        flex: 0 0 auto;
        white-space: nowrap;
    }
}

.alert.warn {
    background: rgba(52, 40, 16, 0.85);
    border-color: rgba(255, 211, 125, 0.45);
    color: #ffd37d;
}

/* Hub tabs + embedded consoles (consolidated pages). */
.hub-tabs .pill {
    text-decoration: none;
}

.hub-tabs .pill.active {
    background: rgba(87, 192, 255, 0.32);
    border-color: rgba(87, 192, 255, 0.6);
    color: var(--app-ink, #e8f0ff);
}

.hub-embed {
    border-radius: 22px;
    border: 1px solid rgba(87, 192, 255, 0.18);
    background: rgba(7, 13, 26, 0.62);
    box-shadow: 0 20px 52px rgba(4, 10, 20, 0.55);
    overflow: hidden;
}

.hub-frame {
    width: 100%;
    height: clamp(680px, 78vh, 1200px);
    border: 0;
    display: block;
    background: transparent;
}

@media (max-width: 900px) {
    .hub-frame {
        height: clamp(560px, 74vh, 980px);
    }
}

/* Embedded mode (iframe-friendly): remove duplicate chrome for embedded pages. */
body.embed {
    background: transparent;
}

body.embed .app-shell {
    padding: 18px;
    border-radius: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
    grid-template-columns: 1fr;
    gap: 0;
    backdrop-filter: none;
    animation: none;
}

body.embed .app-rail {
    display: none;
}

body.embed .staff-dashboard .dashboard-shell {
    min-height: 0;
    padding: 18px;
    border-radius: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
    backdrop-filter: none;
}

body.embed .staff-dashboard .dashboard-shell::before,
body.embed .staff-dashboard .dashboard-shell::after {
    opacity: 0;
}

body.embed .dashboard-menu {
    display: none;
}

/* Public pafds.tech customer-facing website. */
body.pafds-public {
    background:
        radial-gradient(1200px 760px at 10% -18%, rgba(102, 225, 212, 0.22), transparent 62%),
        radial-gradient(1000px 700px at 102% 6%, rgba(96, 184, 255, 0.22), transparent 60%),
        linear-gradient(170deg, #04111e 0%, #071a2a 54%, #051120 100%);
}

body.pafds-public .container {
    max-width: min(1240px, 94vw);
}

.public-home {
    display: grid;
    gap: 22px;
    padding-bottom: 22px;
}

.public-panel {
    position: relative;
    border-radius: 24px;
    padding: clamp(20px, 3vw, 34px);
    border: 1px solid rgba(102, 225, 212, 0.22);
    background: linear-gradient(145deg, rgba(10, 25, 39, 0.95), rgba(8, 18, 30, 0.88));
    box-shadow: 0 20px 48px rgba(3, 10, 20, 0.55);
    overflow: hidden;
}

.public-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 0% 0%, rgba(96, 184, 255, 0.18), transparent 55%);
    pointer-events: none;
}

.public-panel > * {
    position: relative;
    z-index: 1;
}

.public-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 20px;
}

.public-hero-copy {
    display: grid;
    align-content: start;
}

.public-eyebrow {
    margin: 0 0 8px;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
    text-transform: uppercase;
    color: rgba(176, 231, 255, 0.88);
    font-weight: 700;
}

.public-hero h1 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.1;
}

.public-lead {
    margin-top: 12px;
    color: rgba(227, 242, 255, 0.9);
    max-width: 64ch;
}

.public-action-row {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.public-trust-strip {
    margin-top: 18px;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.public-trust-item {
    border-radius: 18px;
    border: 1px solid rgba(130, 216, 220, 0.24);
    background: rgba(9, 20, 34, 0.78);
    padding: 14px 15px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    display: grid;
    gap: 4px;
}

.public-trust-item strong {
    font-size: 0.96rem;
    color: #f2f8ff;
}

.public-trust-item span {
    color: rgba(187, 213, 232, 0.9);
    font-size: 0.84rem;
    line-height: 1.45;
}

.public-hero-stack {
    display: grid;
    gap: 14px;
}

.public-hero-card {
    border-radius: 20px;
    border: 1px solid rgba(130, 216, 220, 0.26);
    background: linear-gradient(150deg, rgba(15, 35, 52, 0.9), rgba(9, 22, 35, 0.85));
    padding: 18px;
    display: grid;
    gap: 12px;
}

.public-hero-card h2 {
    margin: 0;
    font-size: 1.15rem;
}

.public-card-kicker {
    margin: 0;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
    text-transform: uppercase;
    color: rgba(156, 221, 255, 0.84);
    font-weight: 700;
}

.public-hero-card ul {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 8px;
    color: rgba(225, 240, 255, 0.92);
}

.public-hero-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.public-hero-kpis div {
    border-radius: 14px;
    border: 1px solid rgba(130, 216, 220, 0.24);
    background: rgba(9, 19, 33, 0.75);
    padding: 10px 12px;
    display: grid;
    gap: 2px;
}

.public-hero-kpis strong {
    font-size: 1.15rem;
    line-height: 1.1;
}

.public-hero-kpis span {
    font-size: 0.78rem;
    color: rgba(177, 207, 230, 0.86);
}

.public-benefit-list {
    display: grid;
    gap: 12px;
}

.public-benefit-item {
    border-radius: 16px;
    border: 1px solid rgba(130, 216, 220, 0.18);
    background: rgba(8, 18, 30, 0.55);
    padding: 12px 13px;
    display: grid;
    gap: 4px;
}

.public-benefit-item strong {
    color: #f1f7ff;
    font-size: 0.96rem;
}

.public-benefit-item span {
    color: rgba(189, 215, 232, 0.9);
    line-height: 1.48;
    font-size: 0.88rem;
}

.public-issue-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 9px;
    color: rgba(225, 240, 255, 0.92);
}

.public-value-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.public-value-card {
    border-radius: 18px;
    border: 1px solid rgba(130, 216, 220, 0.24);
    background: linear-gradient(145deg, rgba(12, 27, 43, 0.92), rgba(7, 17, 29, 0.88));
    padding: 17px;
    box-shadow: 0 12px 30px rgba(3, 10, 20, 0.35);
    display: grid;
    gap: 8px;
}

.public-value-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(102, 225, 212, 0.5);
    background: rgba(10, 22, 35, 0.85);
    color: #bff8ea;
    font-size: 0.82rem;
    font-weight: 800;
}

.public-value-card h3 {
    margin: 0;
    font-size: 1.02rem;
}

.public-value-card p {
    margin: 0;
    color: rgba(201, 222, 241, 0.9);
}

.public-card-grid,
.public-bundle-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.public-card,
.public-bundle {
    border-radius: 16px;
    border: 1px solid rgba(130, 216, 220, 0.24);
    background: linear-gradient(145deg, rgba(12, 27, 43, 0.9), rgba(8, 17, 30, 0.85));
    padding: 15px 16px;
    box-shadow: 0 12px 30px rgba(3, 10, 20, 0.35);
}

.public-card h3,
.public-bundle h3 {
    margin: 0;
    font-size: 1rem;
}

.public-card p,
.public-bundle p {
    margin: 8px 0 0;
    color: rgba(201, 222, 241, 0.9);
}

.public-timeline {
    display: grid;
    gap: 10px;
}

.public-step {
    border-radius: 14px;
    border: 1px solid rgba(130, 216, 220, 0.2);
    background: rgba(9, 20, 34, 0.8);
    padding: 12px 14px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: center;
}

.public-step strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid rgba(102, 225, 212, 0.5);
    font-size: 0.85rem;
}

.public-step div {
    display: grid;
    gap: 4px;
}

.public-step-title {
    font-weight: 700;
    color: #edf6ff;
}

.public-step p {
    margin: 0;
    color: rgba(196, 219, 238, 0.9);
    line-height: 1.5;
}

.public-faq-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.public-faq-item {
    border-radius: 18px;
    border: 1px solid rgba(130, 216, 220, 0.24);
    background: linear-gradient(145deg, rgba(12, 27, 43, 0.92), rgba(8, 17, 30, 0.86));
    padding: 16px 17px;
    box-shadow: 0 12px 30px rgba(3, 10, 20, 0.35);
    display: grid;
    gap: 8px;
}

.public-faq-item h3 {
    margin: 0;
    font-size: 1rem;
    color: #f1f7ff;
}

.public-faq-item p {
    margin: 0;
    color: rgba(201, 222, 241, 0.92);
    line-height: 1.55;
}

.public-contact-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
}

.public-contact-form label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.82rem;
    color: rgba(182, 213, 235, 0.92);
}

.public-contact-form input,
.public-contact-form select,
.public-contact-form textarea {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(130, 216, 220, 0.28);
    background: rgba(9, 19, 32, 0.82);
    color: #e9f3ff;
    padding: 10px 12px;
}

.public-contact-form input:focus,
.public-contact-form select:focus,
.public-contact-form textarea:focus {
    outline: none;
    border-color: rgba(102, 225, 212, 0.56);
    box-shadow: 0 0 0 3px rgba(102, 225, 212, 0.18);
}

.public-contact-message,
.public-contact-actions {
    grid-column: 1 / -1;
}

.public-contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

[data-public-contact-status][data-state="ok"] {
    color: #8af1c8;
}

[data-public-contact-status][data-state="error"] {
    color: #ff9f9f;
}

[data-public-contact-status][data-state="pending"] {
    color: #b8deff;
}

.hp-field {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.pafds-contract-form {
    margin-top: 12px;
}

.pafds-contract-toggle {
    grid-column: 1 / -1;
}

.pafds-contract-toggle .pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pafds-contract-toggle input[type="checkbox"] {
    accent-color: #65e3bd;
}

@media (max-width: 1000px) {
    .public-hero {
        grid-template-columns: 1fr;
    }

    .public-trust-strip {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .public-contact-form {
        grid-template-columns: 1fr;
    }

    .public-hero-kpis {
        grid-template-columns: 1fr;
    }
}

