@font-face {
    font-family: "Material Symbols Rounded";
    font-style: normal;
    font-weight: 400;
    font-display: block;
    src: url("../fonts/material-symbols-rounded.woff2") format("woff2");
}

:root {
    --page-bg: #f5f2eb;
    --page-bg-alt: #efede5;
    --page-bg-deep: #ece4d8;
    --header-bg: #141413;
    --surface-1: rgba(250, 247, 242, 0.9);
    --surface-2: #efede5;
    --surface-3: #f5f2eb;
    --surface-4: #e8dfd2;
    --surface-ink: #141413;
    --border-soft: rgba(20, 20, 19, 0.11);
    --border-strong: rgba(20, 20, 19, 0.2);
    --text-main: #141413;
    --text-muted: #b0aea5;
    --text-soft: #8b8378;
    --accent-main: #2e45b8;
    --accent-main-strong: #1f2e79;
    --accent-red: #e1120d;
    --accent-red-strong: #f6413c;
    --accent-blue: #485ed1;
    --accent-gold: #ffc502;
    --nav-hover-bg: transparent;
    --nav-hover-text: #ffffff;
    --success: #76956f;
    --warning: #c4884d;
    --danger: #de7350;
    --info: #748ab7;
    --shadow-soft: none;
    --shadow-raise: none;
    --shadow-focus: none;
    --curve-smooth: cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-theme="light"] {
    color-scheme: light;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --page-bg: #141413;
    --page-bg-alt: #141413;
    --page-bg-deep: #141413;
    --header-bg: #141413;
    --surface-1: rgba(31, 30, 29, 0.92);
    --surface-2: #1f1e1d;
    --surface-3: #1f1e1d;
    --surface-4: #141413;
    --surface-ink: #f9f8f3;
    --border-soft: rgba(249, 248, 243, 0.1);
    --border-strong: rgba(249, 248, 243, 0.18);
    --text-main: #f9f8f3;
    --text-muted: #b0aea5;
    --text-soft: #9b978b;
    --nav-hover-bg: transparent;
    --nav-hover-text: #ffffff;
    --shadow-soft: none;
    --shadow-raise: none;
    --shadow-focus: none;
}

html {
    scroll-behavior: smooth;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: var(--text-main);
    line-height: 1.58;
    background: var(--page-bg);
}

a {
    color: inherit;
}

.font-display,
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Songti TC", "STSong", "Noto Serif CJK TC", Georgia, "Times New Roman", serif;
    letter-spacing: 0;
}

.font-display {
    font-weight: 700;
    line-height: 1.08;
}

.material-symbols-rounded {
    font-family: "Material Symbols Rounded";
    font-weight: 400;
    font-style: normal;
    font-size: 24px;
    display: inline-block;
    white-space: nowrap;
    letter-spacing: normal;
    text-transform: none;
    direction: ltr;
    word-wrap: normal;
    -webkit-font-feature-settings: "liga";
    -webkit-font-smoothing: antialiased;
    font-variation-settings:
        "FILL" 1,
        "wght" 500,
        "GRAD" 0,
        "opsz" 24;
    line-height: 1;
}

.app-shell {
    position: relative;
}

.app-shell-login {
    min-height: 100dvh;
    max-width: none;
    padding-bottom: 0 !important;
}

.app-shell::before {
    display: none;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 40;
    overflow: visible;
    background: var(--header-bg) !important;
    border: 0 !important;
    border-bottom: 1px solid #30302e !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    backdrop-filter: none !important;
    box-shadow: none;
}

.desktop-nav-shell {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    padding: 0.1rem 0 0.2rem;
    scrollbar-width: none;
}

.desktop-nav-shell::-webkit-scrollbar {
    display: none;
}

.desktop-nav-strip {
    width: max-content;
    min-width: 100%;
    flex-wrap: nowrap;
    white-space: nowrap;
    justify-content: center;
    gap: 0.52rem !important;
    padding: 0 0.15rem;
}

.theme-toggle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.58rem;
    min-height: 2.7rem;
    padding: 0.68rem 0.92rem;
    border: 0;
    border-radius: 0.78rem;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 650;
    line-height: 1;
}

.theme-toggle:hover {
    background: transparent;
    color: var(--nav-hover-text);
}

.theme-toggle-icon {
    font-size: 1rem;
    line-height: 1;
}

.theme-toggle-label {
    white-space: nowrap;
}

.nav-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.72rem;
    min-height: 2.95rem;
    padding: 0.78rem 1.02rem;
    border-radius: 0.78rem;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition:
        transform 220ms var(--curve-smooth),
        color 220ms var(--curve-smooth),
        background 220ms var(--curve-smooth),
        border-color 220ms var(--curve-smooth),
        border-color 220ms var(--curve-smooth);
    flex: none;
}

.nav-pill-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.1rem;
    font-size: 1.06rem;
    line-height: 1;
    flex: none;
}

.nav-pill-profile {
    min-width: 2.95rem;
    width: 2.95rem;
    padding-left: 0;
    padding-right: 0;
    gap: 0;
}

.local-nav-icon-mask,
.local-sheet-icon-mask {
    display: block;
    width: 1.12rem;
    height: 1.12rem;
    background: currentColor;
    -webkit-mask-position: center;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: contain;
}

.local-nav-icon-mask-tasks,
.local-sheet-icon-mask-tasks {
    -webkit-mask-image: url("../icons/tasks-nav.svg");
    mask-image: url("../icons/tasks-nav.svg");
}

.nav-pill:hover {
    background: var(--nav-hover-bg);
    color: var(--nav-hover-text);
}

.nav-pill-active {
    background: transparent;
    color: #ffffff;
}

.nav-pill-active:hover {
    background: transparent;
    color: #ffffff;
}

.nav-pill-active .nav-pill-icon {
    color: #d97757;
}

.nav-pill.nav-pill-orders.nav-pill-active .nav-pill-icon {
    color: #6ca860 !important;
}

.nav-pill.nav-pill-revisions.nav-pill-active .nav-pill-icon {
    color: #63a0ff !important;
}

.nav-pill.nav-pill-tasks.nav-pill-active .local-nav-icon-mask {
    background: #8fd6c4;
}

.nav-pill-active span:last-child {
    text-decoration-line: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 0.32em;
}

.nav-pill-accent {
    background: var(--accent-main);
    color: #ffffff;
}

.nav-pill-accent:hover {
    color: #ffffff;
    background: var(--accent-main-strong);
}

.nav-pill-accent.nav-pill-active {
    background: transparent;
    color: #ffffff;
}

.system-badge {
    background: var(--surface-3) !important;
    border-color: var(--border-soft) !important;
}

.page-content {
    padding-bottom: 1rem;
}

.page-content-login {
    display: flex;
    min-height: 100dvh;
    align-items: center;
    justify-content: center;
    padding-bottom: 0 !important;
}

.warehouse-overview-section {
    padding: 0;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.warehouse-overview-card {
    background: #1f1e1d !important;
    border-color: #333230 !important;
}

.warehouse-overview-card:hover {
    transform: none !important;
    box-shadow: none !important;
}

.dashboard-dark-panel {
    background: #1f1e1d !important;
}

main {
    animation: none;
}

main > section {
    animation: none;
}

.deadline-panel {
    background: rgba(255, 197, 2, 0.08) !important;
    border-color: rgba(255, 197, 2, 0.22) !important;
}

.app-message {
    backdrop-filter: blur(10px);
    box-shadow: none;
}

[class*="bg-white/5"] {
    background: var(--surface-1) !important;
    box-shadow: none;
}

[class*="bg-stone-900/30"],
[class*="bg-stone-900/40"],
[class*="bg-stone-900/50"],
[class*="bg-black/30"],
[class*="bg-black/35"],
[class*="bg-black/40"],
[class*="bg-black/50"] {
    background: var(--surface-2) !important;
}

[class*="border-white/10"],
[class*="border-white/15"],
[class*="border-white/20"] {
    border-color: var(--border-soft) !important;
}

[class*="border-dashed"] {
    border-color: var(--border-soft) !important;
}

.dashboard-dark-panel,
.dashboard-dark-panel[class*="bg-white/5"] {
    background: #1f1e1d !important;
    border-color: #333230 !important;
}

.orders-panel,
.orders-panel[class*="bg-white/5"],
article.order-card,
article.order-card[class*="bg-white/5"],
details.order-card,
details.order-card[class*="bg-white/5"] {
    background: #1f1e1d !important;
    border-color: #333230 !important;
}

.orders-hero-section {
    padding: 0;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.monthly-plan-card {
    border-color: #696662 !important;
    cursor: pointer;
    transform: none !important;
}

.monthly-plan-card:hover,
.monthly-plan-card:focus,
.monthly-plan-card:focus-visible {
    border-color: #b7b4af !important;
    background: #1f1e1d !important;
    transform: none !important;
    box-shadow: none !important;
    outline: none;
}

.monthly-plan-detail-panel,
.monthly-plan-detail-stat {
    background: #1f1e1d !important;
}

.monthly-plan-list-panel {
    background: #1f1e1d !important;
}

.stock-hero-section {
    padding: 0;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.stock-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    align-items: stretch;
}

.stock-filter-form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.stock-filter-field {
    width: 100%;
    min-width: 0;
}

.table-product-search {
    width: 100%;
    min-height: 3.2rem;
    border: 1px solid var(--border-soft);
    border-radius: 1rem;
    background: #191717;
    color: var(--text-main);
    padding: 0.95rem 1rem;
    font-size: 0.95rem;
    line-height: 1.2;
    outline: none;
    transition:
        border-color 240ms var(--curve-smooth),
        background 240ms var(--curve-smooth);
}

.table-product-search::placeholder {
    color: var(--text-soft);
}

.table-product-search:hover,
.table-product-search:focus {
    border-color: #4c4b49;
    background: #262423;
}

.orders-filter-form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.orders-filter-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.orders-filter-main {
    display: grid;
    gap: 0.9rem;
}

.orders-filter-actions {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: 1fr;
}

.orders-filter-field {
    width: 100%;
    min-width: 0;
}

.orders-type-switch {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.orders-type-switch-label {
    color: var(--text-soft);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.orders-type-switch-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.orders-type-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.6rem;
    padding: 0.7rem 1rem;
    border: 1px solid var(--border-soft);
    border-radius: 0.78rem;
    background: transparent;
    color: var(--text-main);
    font-size: 0.92rem;
    font-weight: 650;
    transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.orders-type-chip:hover {
    border-color: rgba(255, 255, 255, 0.16);
}

.orders-type-chip-active {
    background: #3a3937;
    border-color: transparent;
    color: #f9f8f3;
}

.stock-primary-action,
.stock-secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.4rem;
    padding: 0.95rem 1.4rem;
    border-radius: 0.82rem;
    font-size: 0.95rem;
    font-weight: 650;
    text-align: center;
}

.stock-primary-action {
    --button-shell-bg: #3a3937;
    --button-shell-border: transparent;
    background: #3a3937;
    border: 1px solid transparent;
    color: var(--text-main);
}

.stock-secondary-action {
    --button-shell-bg: var(--page-bg);
    --button-shell-border: var(--border-soft);
    border: 1px solid var(--border-soft);
    color: var(--text-main);
    background: transparent;
}

.stock-table-head {
    background: #191717 !important;
}

.stock-table-frame {
    overflow: visible;
}

.stock-table-shell {
    position: relative;
    overflow: visible !important;
    -webkit-overflow-scrolling: touch;
}

.stock-sticky-table thead th {
    position: sticky;
    top: env(safe-area-inset-top);
    z-index: 18;
    background: #191717 !important;
    box-shadow: inset 0 -1px 0 rgba(249, 248, 243, 0.08);
}

.stock-sticky-table thead th:first-child {
    z-index: 19;
    border-top-left-radius: 1.5rem;
    background-clip: padding-box;
}

.stock-sticky-table thead th:last-child {
    border-top-right-radius: 1.5rem;
    background-clip: padding-box;
}

.stock-table-body,
.stock-table-body tr,
.stock-table-body td {
    background: #1f1e1d !important;
}

.stock-table-body tr[data-stock-product-row] {
    cursor: pointer;
}

.stock-table-body tr[data-stock-product-row]:focus-visible td,
.stock-table-body tr[data-stock-product-row]:hover td,
.stock-table-body tr.stock-flow-row-active td {
    background: var(--surface-2) !important;
}

.stock-flow-panel {
    display: grid;
    grid-template-columns: minmax(14rem, 1.3fr) minmax(8rem, 0.45fr) minmax(18rem, 1fr);
    align-items: end;
    gap: 0.9rem;
    border: 1px solid var(--border-soft);
    border-radius: 0.5rem;
    background: var(--surface-3);
    padding: 1rem;
}

.stock-flow-target {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
}

.stock-flow-kicker,
.stock-flow-quantity-label span {
    color: var(--text-soft);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.stock-flow-label {
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.3;
}

.stock-flow-quantity-label {
    display: grid;
    gap: 0.35rem;
}

.stock-flow-quantity-input {
    min-height: 2.75rem;
    width: 100%;
    border: 1px solid var(--border-soft);
    border-radius: 0.45rem;
    background: var(--surface-4);
    color: var(--text-main);
    padding: 0.7rem 0.85rem;
    font-size: 0.95rem;
    outline: none;
    box-shadow: none;
}

.stock-flow-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

.stock-flow-button {
    display: inline-flex;
    min-height: 2.75rem;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-soft);
    border-radius: 0.5rem;
    background: var(--surface-2);
    color: var(--text-main);
    padding: 0.72rem 0.95rem;
    font-size: 0.88rem;
    font-weight: 700;
    box-shadow: none;
    transition:
        background 180ms ease,
        color 180ms ease,
        opacity 180ms ease,
        transform 180ms ease,
        border-color 180ms ease;
}

.stock-flow-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.stock-flow-button:not(:disabled):active {
    transform: translateY(1px);
}

.stock-flow-button-launch {
    border-color: rgba(119, 251, 253, 0.28);
    background: rgba(119, 251, 253, 0.08);
    color: var(--text-main);
}

.stock-flow-button-transfer {
    border-color: rgba(69, 224, 111, 0.3);
    background: rgba(69, 224, 111, 0.08);
    color: var(--text-main);
}

.stock-flow-button-launch:hover:not(:disabled) {
    border-color: rgba(119, 251, 253, 0.42);
    background: rgba(119, 251, 253, 0.14);
}

.stock-flow-button-transfer:hover:not(:disabled) {
    border-color: rgba(69, 224, 111, 0.44);
    background: rgba(69, 224, 111, 0.14);
}

.stock-flow-message {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--lattice-green, var(--success));
    font-size: 0.84rem;
    font-weight: 650;
}

.stock-flow-message[data-tone="error"] {
    color: var(--lattice-red, var(--danger));
}

@media (min-width: 1024px) {
    .stock-sticky-table thead th {
        top: calc(4.55rem + env(safe-area-inset-top));
    }

    .stock-sticky-table {
        width: 100%;
    }
}

@media (max-width: 920px) {
    .stock-flow-panel {
        grid-template-columns: 1fr;
    }

    .stock-flow-actions {
        grid-template-columns: 1fr;
    }
}

.revision-hero-section {
    padding: 0;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.revision-table-head {
    background: #191717 !important;
}

.revision-table-body,
.revision-table-body tr,
.revision-table-body td {
    background: #1f1e1d !important;
}

.consumables-stock-section {
    padding: 0;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.consumables-table-frame {
    overflow: visible;
}

.consumables-table-shell {
    position: relative;
    overflow: visible !important;
    -webkit-overflow-scrolling: touch;
}

.consumables-table-head {
    background: #191717 !important;
}

.consumables-sticky-table thead th {
    position: sticky;
    top: env(safe-area-inset-top);
    z-index: 18;
    background: #191717 !important;
    box-shadow: inset 0 -1px 0 rgba(249, 248, 243, 0.08);
}

.consumables-sticky-table thead th:first-child {
    z-index: 19;
    border-top-left-radius: 1.5rem;
    background-clip: padding-box;
}

.consumables-sticky-table thead th:last-child {
    border-top-right-radius: 1.5rem;
    background-clip: padding-box;
}

.consumables-table-body,
.consumables-table-body tr,
.consumables-table-body td {
    background: #1f1e1d !important;
}

@media (min-width: 1024px) {
    .consumables-sticky-table thead th {
        top: calc(4.55rem + env(safe-area-inset-top));
    }

    .consumables-sticky-table {
        width: 100%;
    }
}

.products-hero-section {
    padding: 0;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.products-table-head {
    background: #191717 !important;
}

.products-table-body,
.products-table-body tr,
.products-table-body td {
    background: #1f1e1d !important;
}

.products-table-body tr:hover,
.products-table-body tr:hover td {
    background: #1f1e1d !important;
}

.dashboard-panel-link {
    color: #9c9a92 !important;
    transition: color 420ms var(--curve-smooth);
}

.dashboard-panel-link:hover {
    color: #ffffff !important;
}

.solid-action-button {
    --button-shell-bg: #3a3937 !important;
    --button-shell-border: transparent !important;
    background: #3a3937 !important;
    border: 1px solid transparent !important;
    color: #f9f8f3 !important;
}

@media (min-width: 1024px) {
    .stock-toolbar {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
        gap: 1rem;
    }

    .stock-filter-form {
        flex-direction: row;
        align-items: flex-end;
        flex: 1 1 auto;
    }

    .stock-filter-field {
        max-width: 24rem;
    }

    .orders-filter-toolbar {
        flex-direction: row;
        align-items: flex-end;
        gap: 1rem;
    }

    .orders-filter-main {
        flex: 1 1 auto;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .orders-filter-actions {
        flex: 0 0 auto;
        grid-template-columns: 11rem 11rem 13rem;
    }
}

.orders-table-head {
    background: #191717 !important;
}

.order-checkbox-wrap {
    position: relative;
    display: inline-flex;
    width: 1.25rem;
    height: 1.25rem;
    min-width: 1.25rem;
    flex-shrink: 0;
}

.order-checkbox-wrap input[type="checkbox"],
.order-checkbox-input {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.order-checkbox-indicator {
    position: relative;
    width: 1.25rem;
    height: 1.25rem;
    border: 1px solid #78716c;
    border-radius: 0.38rem;
    background: #fff;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.order-checkbox-indicator::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8.3L6.5 11.2L12.5 4.8' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 0.9rem 0.9rem;
    opacity: 0;
}

.order-checkbox-wrap input[type="checkbox"]:checked + .order-checkbox-indicator,
.order-checkbox-input:checked + .order-checkbox-indicator {
    border-color: #6ca860;
    background-color: #6ca860;
}

.order-checkbox-wrap input[type="checkbox"]:checked + .order-checkbox-indicator::after,
.order-checkbox-input:checked + .order-checkbox-indicator::after {
    opacity: 1;
}

.order-checkbox-wrap input[type="checkbox"]:focus + .order-checkbox-indicator,
.order-checkbox-wrap input[type="checkbox"]:focus-visible + .order-checkbox-indicator,
.order-checkbox-input:focus + .order-checkbox-indicator,
.order-checkbox-input:focus-visible + .order-checkbox-indicator {
    box-shadow: 0 0 0 4px rgba(108, 168, 96, 0.18);
}

.order-name-accent {
    color: #d97757 !important;
}

[class*="text-white"],
[class*="text-slate-100"],
[class*="text-slate-200"],
[class*="text-slate-300"] {
    color: var(--text-main) !important;
}

[class*="text-slate-400"],
[class*="text-slate-500"] {
    color: var(--text-muted) !important;
}

[class*="text-orange-100"] {
    color: var(--accent-main) !important;
}

[class*="text-amber-100"] {
    color: var(--warning) !important;
}

[class*="text-emerald-100"],
[class*="text-emerald-200"] {
    color: var(--success) !important;
}

[class*="text-sky-200"] {
    color: var(--accent-blue) !important;
}

[class*="bg-amber-300/20"] {
    background: rgba(196, 136, 77, 0.18) !important;
}

[class*="bg-emerald-400/20"] {
    background: rgba(118, 149, 111, 0.18) !important;
}

[class*="bg-slate-300/20"] {
    background: rgba(116, 138, 183, 0.18) !important;
}

[class*="bg-rose-400/10"] {
    background: rgba(222, 115, 80, 0.16) !important;
}

[class*="border-rose-400/30"] {
    border-color: rgba(222, 115, 80, 0.26) !important;
}

[class*="hover:border-orange-300/30"]:hover,
[class*="hover:border-white/20"]:hover {
    border-color: rgba(46, 69, 184, 0.26) !important;
}

[class*="hover:bg-white/10"]:hover,
[class*="hover:bg-black/40"]:hover,
[class*="hover:bg-black/50"]:hover {
    background: var(--surface-3) !important;
}

article.order-card:hover,
details.order-card:hover {
    border-color: #4c4b49 !important;
    background: var(--surface-3) !important;
}

.dashboard-order-card:hover,
.dashboard-order-card:focus,
.dashboard-order-card:focus-visible {
    border-color: #4c4b49 !important;
    background: var(--surface-3) !important;
    outline: none !important;
    box-shadow: none !important;
}

.dashboard-revision-card:hover,
.dashboard-revision-card:focus,
.dashboard-revision-card:focus-visible,
article.revision-card:hover,
article.revision-card:focus,
article.revision-card:focus-visible {
    border-color: #b7b4af !important;
    background: #1f1e1d !important;
    outline: none !important;
    box-shadow: none !important;
}

[class*="rounded-[1rem]"],
[class*="rounded-[1.25rem]"],
[class*="rounded-[1.5rem]"],
[class*="rounded-[2rem]"] {
    transition:
        transform 220ms var(--curve-smooth),
        border-color 220ms var(--curve-smooth),
        background 220ms var(--curve-smooth),
        box-shadow 220ms var(--curve-smooth);
}

[class*="rounded-[1rem]"] {
    border-radius: 0.7rem !important;
}

[class*="rounded-[1.25rem]"] {
    border-radius: 0.82rem !important;
}

[class*="rounded-[1.5rem]"] {
    border-radius: 0.92rem !important;
}

[class*="rounded-[2rem]"] {
    border-radius: 1rem !important;
}

[class*="rounded-2xl"] {
    border-radius: 0.82rem !important;
}

[class*="rounded-full"] {
    border-radius: 0.78rem !important;
}

a[class*="rounded-[1rem]"]:hover,
a[class*="rounded-[1.25rem]"]:hover,
a[class*="rounded-[1.5rem]"]:hover,
a[class*="rounded-[2rem]"]:hover,
article[class*="rounded-[1.25rem]"]:hover,
article[class*="rounded-[1.5rem]"]:hover,
article[class*="rounded-[2rem]"]:hover {
    transform: translateY(-1px);
    box-shadow: none;
}

.metric-card {
    border: 1px solid var(--border-soft);
    border-radius: 0.78rem;
    background: var(--surface-2);
    padding: 1rem 1.1rem;
    box-shadow: none;
}

.metric-label {
    color: var(--text-soft);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.metric-value {
    margin-top: 0.7rem;
    color: var(--text-main);
    font-size: 1.95rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
}

.metric-card-alert .metric-label {
    color: var(--text-soft);
}

.metric-card-alert .metric-value {
    color: #d97757;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

thead th {
    font-size: 0.71rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--text-soft) !important;
}

tbody tr {
    transition: background 220ms var(--curve-smooth);
}

tbody tr:hover {
    background: #312f2e;
}

input:disabled,
textarea:disabled,
select:disabled {
    opacity: 1;
    color: var(--text-muted);
    background: var(--surface-4);
}

input:not(:disabled),
textarea:not(:disabled),
select:not(:disabled) {
    background: var(--surface-2) !important;
    border-color: var(--border-soft) !important;
    color: var(--text-main) !important;
    box-shadow: none;
    transition:
        border-color 200ms var(--curve-smooth),
        background 200ms var(--curve-smooth),
        border-color 200ms var(--curve-smooth),
        transform 200ms var(--curve-smooth);
}

input:not(:disabled):hover,
textarea:not(:disabled):hover,
select:not(:disabled):hover {
    background: var(--surface-3) !important;
    border-color: var(--border-strong) !important;
}

input:not(:disabled):focus,
textarea:not(:disabled):focus,
select:not(:disabled):focus {
    outline: none;
    background: var(--surface-3) !important;
    border-color: var(--border-strong) !important;
    box-shadow: none;
}

table input,
table select,
table textarea {
    min-width: 8rem;
}

.revision-section-row td {
    border-top: 1px solid var(--border-soft);
    background: #1f1e1d !important;
}

.revision-product-name {
    font-weight: 600;
    color: var(--text-main);
}

.revision-qty-value {
    display: inline-flex;
    align-items: center;
    min-height: 3rem;
    color: var(--text-main);
    font-weight: 600;
}

.revision-count-input input {
    width: 100%;
    min-width: 7rem;
}

button,
a[class*="rounded-2xl"],
a[class*="rounded-full"],
.stock-primary-action,
.stock-secondary-action {
    position: relative;
    isolation: isolate;
    overflow: visible;
    transition:
        opacity 840ms var(--curve-smooth),
        color 840ms var(--curve-smooth),
        background 840ms var(--curve-smooth),
        border-color 840ms var(--curve-smooth),
        border-color 840ms var(--curve-smooth);
}

button:not(.nav-pill):not(.mobile-tab)::before,
a[class*="rounded-2xl"]:not(.nav-pill):not(.mobile-tab)::before,
a[class*="rounded-full"]:not(.nav-pill):not(.mobile-tab)::before,
.stock-primary-action:not(.nav-pill):not(.mobile-tab)::before,
.stock-secondary-action:not(.nav-pill):not(.mobile-tab)::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: var(--button-shell-bg, transparent);
    border: 1px solid var(--button-shell-border, transparent);
    box-shadow: none;
    opacity: 0;
    transition:
        inset 840ms var(--curve-smooth),
        opacity 840ms var(--curve-smooth),
        background 840ms var(--curve-smooth),
        border-color 840ms var(--curve-smooth);
    pointer-events: none;
}

button[class*="bg-white/10"],
a[class*="bg-white/10"] {
    --button-shell-bg: rgba(255, 255, 255, 0.1);
    --button-shell-border: transparent;
}

button[class*="border"],
a[class*="border"] {
    --button-shell-bg: var(--page-bg);
    --button-shell-border: var(--border-soft);
}

button:hover,
a[class*="rounded-2xl"]:hover,
a[class*="rounded-full"]:hover,
.stock-primary-action:hover,
.stock-secondary-action:hover {
    box-shadow: none;
}

button:not(.nav-pill):not(.mobile-tab):hover::before,
a[class*="rounded-2xl"]:not(.nav-pill):not(.mobile-tab):hover::before,
a[class*="rounded-full"]:not(.nav-pill):not(.mobile-tab):hover::before,
.stock-primary-action:not(.nav-pill):not(.mobile-tab):hover::before,
.stock-secondary-action:not(.nav-pill):not(.mobile-tab):hover::before {
    opacity: 1;
    inset: -2px;
}

.nav-pill:hover,
.nav-pill-active:hover {
    transform: none !important;
    box-shadow: none !important;
}

a[class*="bg-gradient-to-r"],
button[class*="bg-gradient-to-r"] {
    --button-shell-bg: #e8e7e4;
    --button-shell-border: #e8e7e4;
    background: #ffffff !important;
    color: #30302e !important;
    border: 1px solid #ffffff !important;
    box-shadow: none;
}

a[class*="bg-gradient-to-r"]:hover,
button[class*="bg-gradient-to-r"]:hover {
    background: #e8e7e4 !important;
    color: #30302e !important;
    border-color: #e8e7e4 !important;
    box-shadow: none;
}

a[class*="bg-gradient-to-r"]:active,
button[class*="bg-gradient-to-r"]:active {
    box-shadow: none;
}

button:not(.nav-pill):not(.mobile-tab):active::before,
a[class*="rounded-2xl"]:not(.nav-pill):not(.mobile-tab):active::before,
a[class*="rounded-full"]:not(.nav-pill):not(.mobile-tab):active::before,
.stock-primary-action:not(.nav-pill):not(.mobile-tab):active::before,
.stock-secondary-action:not(.nav-pill):not(.mobile-tab):active::before {
    opacity: 1;
    inset: -1px;
}

button[class*="border"]:hover,
a[class*="border"]:hover {
    border-color: transparent !important;
}

a.dashboard-revision-card:hover,
a.dashboard-revision-card:focus,
a.dashboard-revision-card:focus-visible {
    border-color: #b7b4af !important;
    background: #1f1e1d !important;
}

a.dashboard-order-card:hover,
a.dashboard-order-card:focus,
a.dashboard-order-card:focus-visible {
    border-color: #4c4b49 !important;
    background: var(--surface-3) !important;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 0.7rem;
    border: 1px solid transparent;
    padding: 0.42rem 0.82rem;
    font-size: 0.71rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-chip::before {
    content: "";
    width: 0.46rem;
    height: 0.46rem;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.92;
}

.status-chip-success {
    color: var(--success);
    background: rgba(118, 149, 111, 0.18);
    border-color: rgba(118, 149, 111, 0.26);
}

.status-chip-warning {
    color: var(--warning);
    background: rgba(196, 136, 77, 0.18);
    border-color: rgba(196, 136, 77, 0.26);
}

.status-chip-danger {
    color: var(--danger);
    background: rgba(222, 115, 80, 0.18);
    border-color: rgba(222, 115, 80, 0.26);
}

.status-chip-info {
    color: var(--info);
    background: rgba(116, 138, 183, 0.18);
    border-color: rgba(116, 138, 183, 0.26);
}

.order-product-select-native {
    display: none;
}

.order-product-combobox {
    position: relative;
    z-index: 1;
}

.order-product-combobox.is-open {
    z-index: 90;
}

.line-item {
    position: relative;
    overflow: visible;
    z-index: 1;
}

.line-item.line-item-product-open {
    z-index: 80;
}

.order-product-combobox-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 3.65rem;
    border: 1px solid var(--border-soft);
    border-radius: 1.25rem;
    background: #1f1e1d;
    color: var(--text-main);
    padding: 1.12rem 1.1rem;
    font-size: 0.95rem;
    line-height: 1.2;
    outline: none;
    text-align: left;
    transition:
        border-color 240ms var(--curve-smooth),
        background 240ms var(--curve-smooth);
}

.order-product-combobox-trigger::before {
    display: none !important;
}

.order-product-combobox-trigger:hover,
.order-product-combobox-trigger:focus-visible {
    border-color: #4c4b49;
    background: #262423;
}

.order-product-combobox-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-main);
}

.order-product-combobox-icon {
    flex: 0 0 auto;
    display: block;
    width: 1.35rem;
    height: 1.35rem;
    margin-left: 0.75rem;
    color: var(--text-soft);
}

.order-product-dropdown {
    position: absolute;
    top: calc(100% + 0.55rem);
    left: 0;
    right: 0;
    z-index: 50;
    border: 1px solid #3a3835;
    border-radius: 1.25rem;
    background: #1f1e1d;
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.38);
    padding: 0.85rem;
}

.order-product-dropdown.hidden {
    display: none;
}

.order-product-search-wrap {
    margin-bottom: 0.65rem;
}

.order-product-search {
    width: 100%;
    min-height: 3.65rem;
    border: 1px solid var(--border-soft);
    border-radius: 1.25rem;
    background: #191717;
    color: var(--text-main);
    padding: 1.12rem 1.1rem;
    font-size: 0.95rem;
    line-height: 1.2;
    outline: none;
    transition:
        border-color 240ms var(--curve-smooth),
        background 240ms var(--curve-smooth);
}

.order-product-search::placeholder {
    color: var(--text-soft);
}

.order-product-search:hover,
.order-product-search:focus {
    border-color: #4c4b49;
    background: #262423;
}

.order-product-results {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    max-height: 15rem;
    overflow-y: auto;
}

.order-product-option,
.order-product-empty {
    border-radius: 1rem;
    padding: 0.85rem 0.95rem;
    font-size: 0.94rem;
    line-height: 1.25;
}

.order-product-option {
    width: 100%;
    border: 1px solid transparent;
    background: #191717;
    color: var(--text-main);
    text-align: left;
    transition:
        background 220ms var(--curve-smooth),
        border-color 220ms var(--curve-smooth),
        color 220ms var(--curve-smooth);
}

.order-product-option:hover,
.order-product-option:focus-visible {
    background: #262423;
    border-color: #4c4b49;
    color: #ffffff;
}

.order-product-empty {
    border: 1px dashed #3a3835;
    background: #191717;
    color: var(--text-soft);
}

.order-quantity-inline {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr) 3rem;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
}

.order-quantity-inline input[data-order-quantity-input] {
    grid-column: 2;
    text-align: center;
    min-width: 0;
    width: 100%;
    margin: 0;
}

.order-quantity-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    min-height: 3.25rem;
    border: 1px solid var(--border-soft);
    border-radius: 1rem;
    background: #1f1e1d;
    color: var(--text-main);
    font-size: 1.45rem;
    line-height: 1;
    padding: 0;
}

.order-quantity-button:hover,
.order-quantity-button:focus-visible {
    background: #312f2e;
    border-color: #4c4b49;
    color: #ffffff;
}

.mobile-bottom-nav,
.mobile-nav-backdrop,
.mobile-more-panel {
    display: none;
}

.phone-only {
    display: none !important;
}

.phone-action-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.phone-action-stack form {
    width: auto;
}

.phone-table-shell {
    width: 100%;
}

@media (max-width: 1023px) {
    .app-shell {
        padding-bottom: calc(7.25rem + env(safe-area-inset-bottom));
    }

    .app-shell-login {
        padding-bottom: 0 !important;
    }

    .page-content {
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }

    .page-content-login {
        min-height: 100dvh;
        padding-bottom: 0 !important;
    }

    .mobile-bottom-nav {
        position: fixed;
        left: calc(0.75rem + env(safe-area-inset-left));
        right: calc(0.75rem + env(safe-area-inset-right));
        bottom: calc(0.7rem + env(safe-area-inset-bottom));
        z-index: 70;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.35rem;
        width: auto;
        max-width: 34rem;
        margin-inline: auto;
        padding: 0.55rem;
        border: 1px solid var(--border-soft);
        border-radius: 0.95rem;
        background: #faf7f2;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        box-shadow: none;
        animation: none;
    }

    .mobile-tab {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.32rem;
        min-height: 4.15rem;
        padding: 0.52rem 0.35rem;
        border: 0;
        border-radius: 0.82rem;
        background: transparent;
        color: var(--text-muted);
        text-decoration: none;
        transition:
            transform 200ms var(--curve-smooth),
            color 200ms var(--curve-smooth),
            background 200ms var(--curve-smooth);
    }

    .mobile-tab:hover,
    .mobile-tab:focus-visible {
        color: #ffffff;
        background: #312f2e;
    }

    .mobile-tab-active {
        color: #ffffff;
        background: transparent;
        box-shadow: none;
        border: 0;
    }

    .mobile-tab-icon {
        width: 1.28rem;
        height: 1.28rem;
        flex: none;
    }

    .mobile-tab-active .mobile-tab-icon {
        color: #d97757;
    }

    .mobile-tab.mobile-tab-orders.mobile-tab-active .mobile-tab-icon {
        color: #6ca860 !important;
    }

    .mobile-tab-label {
        font-size: 0.68rem;
        font-weight: 700;
        letter-spacing: 0.01em;
    }

    .mobile-nav-backdrop {
        position: fixed;
        inset: 0;
        z-index: 68;
        display: block;
        background: rgba(20, 20, 19, 0.34);
        backdrop-filter: blur(6px);
    }

    .mobile-nav-backdrop.hidden {
        display: none !important;
    }

    .mobile-more-panel {
        position: fixed;
        left: calc(0.75rem + env(safe-area-inset-left));
        right: calc(0.75rem + env(safe-area-inset-right));
        bottom: calc(6.05rem + env(safe-area-inset-bottom));
        z-index: 69;
        display: block;
        width: auto;
        max-width: 34rem;
        margin-inline: auto;
        padding: 0.95rem 0.95rem 1rem;
        border: 1px solid var(--border-soft);
        border-radius: 0.95rem;
        background: rgba(250, 247, 242, 0.97);
        box-shadow: none;
        backdrop-filter: blur(20px) saturate(120%);
        animation: none;
    }

    .mobile-more-panel.hidden {
        display: none !important;
    }

    .mobile-more-panel-handle {
        width: 2.8rem;
        height: 0.28rem;
        margin: 0 auto 0.95rem;
        border-radius: 999px;
        background: var(--border-strong);
    }

    .mobile-more-panel-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 1rem;
        margin-bottom: 0.9rem;
    }

    .mobile-more-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.45rem;
        height: 2.45rem;
        padding: 0;
        border: 1px solid var(--border-soft);
        border-radius: 0.78rem;
        background: var(--surface-3);
        color: var(--text-main);
    }

    .mobile-more-links {
        display: grid;
        gap: 0.65rem;
    }

    .mobile-sheet-link {
        display: block;
        padding: 0.95rem 1rem;
        border: 1px solid var(--border-soft);
        border-radius: 0.78rem;
        background: var(--surface-2);
        color: var(--text-main);
        text-decoration: none;
        transition:
            transform 200ms var(--curve-smooth),
            border-color 200ms var(--curve-smooth),
            background 200ms var(--curve-smooth);
    }

    .mobile-sheet-link:hover,
    .mobile-sheet-link:focus-visible {
        border-color: #4c4b49;
        background: #312f2e;
    }

    .mobile-sheet-link-active {
        border-color: #4c4b49;
        background: #262423;
        box-shadow: none;
    }

    .mobile-theme-toggle {
        width: 100%;
        text-align: left;
    }

    .mobile-sheet-link-title {
        display: block;
        font-size: 0.95rem;
        font-weight: 700;
    }

    .mobile-sheet-link-row {
        display: flex;
        align-items: flex-start;
        gap: 0.95rem;
    }

    .mobile-sheet-link-icon {
        flex: none;
        margin-top: 0.05rem;
        font-size: 1.3rem;
        min-width: 1.3rem;
        color: var(--text-muted);
    }

    .mobile-sheet-link-icon-local {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-sheet-link-active .mobile-sheet-link-title,
    .mobile-sheet-link-active .mobile-sheet-link-icon {
        color: #d97757;
    }

    .mobile-sheet-link-active .local-sheet-icon-mask {
        background: #8fd6c4;
    }

    .mobile-sheet-link.mobile-sheet-link-revisions.mobile-sheet-link-active .mobile-sheet-link-icon {
        color: #63a0ff !important;
    }

    .mobile-sheet-link-meta {
        display: block;
        margin-top: 0.2rem;
        font-size: 0.8rem;
        color: var(--text-muted);
    }

    body.mobile-nav-open {
        overflow: hidden;
    }
}

html[data-theme="dark"] .mobile-bottom-nav {
    background: #242422;
}

html[data-theme="dark"] .mobile-more-panel {
    background: rgba(36, 36, 34, 0.97);
}

@media (max-width: 480px) {
    html {
        -webkit-text-size-adjust: 100%;
    }

    body {
        overflow-x: hidden;
    }

    input,
    select,
    textarea {
        font-size: 16px !important;
    }

    .app-shell {
        padding-left: max(0.85rem, env(safe-area-inset-left));
        padding-right: max(0.85rem, env(safe-area-inset-right));
        padding-bottom: calc(7.4rem + env(safe-area-inset-bottom));
    }

    .app-shell-login {
        padding-bottom: 0 !important;
    }

    .page-content {
        padding-bottom: calc(1.4rem + env(safe-area-inset-bottom));
    }

    .page-content-login {
        min-height: 100dvh;
        padding-bottom: 0 !important;
    }

    .page-content h1.font-display {
        font-size: 2.2rem !important;
        line-height: 1.05 !important;
    }

    .page-content h2.font-display {
        font-size: 1.55rem !important;
        line-height: 1.08 !important;
    }

    .page-content [class*="rounded-[2rem]"],
    .page-content [class*="rounded-[1.75rem]"] {
        border-radius: 1rem !important;
        padding: 1rem !important;
    }

    .page-content [class*="rounded-[1.5rem]"] {
        border-radius: 0.95rem !important;
    }

    .page-content [class*="rounded-2xl"] {
        border-radius: 0.9rem !important;
    }

    .page-content [class*="rounded-full"] {
        border-radius: 0.9rem !important;
    }

    .page-content button,
    .page-content a[class*="rounded"],
    .stock-primary-action,
    .stock-secondary-action {
        min-height: 3rem;
    }

    .phone-only {
        display: block !important;
    }

    .phone-action-stack {
        display: grid !important;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .phone-action-stack > * {
        width: 100%;
    }

    .phone-action-stack form {
        width: 100%;
    }

    .phone-action-stack a,
    .phone-action-stack button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .phone-sticky-submit {
        position: sticky;
        bottom: calc(6.2rem + env(safe-area-inset-bottom));
        z-index: 25;
    }

    .phone-table-shell {
        overflow: visible !important;
    }

    .phone-card-table {
        min-width: 0 !important;
        width: 100%;
        border: 0;
    }

    .phone-card-table thead {
        display: none;
    }

    .phone-card-table tbody {
        display: grid;
        gap: 0.85rem;
        background: transparent !important;
    }

    .phone-card-table tr {
        display: block;
        overflow: hidden;
        border: 1px solid var(--border-soft);
        border-radius: 0.95rem;
        padding: 0.95rem;
        background: #1f1e1d !important;
    }

    .phone-card-table td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 0.8rem;
        width: 100%;
        padding: 0.35rem 0 !important;
        border: 0 !important;
        background: transparent !important;
        text-align: right;
        white-space: normal !important;
    }

    .phone-card-table td::before {
        content: attr(data-label);
        flex: 0 0 44%;
        max-width: 44%;
        color: var(--text-muted);
        font-size: 0.74rem;
        font-weight: 700;
        line-height: 1.35;
        letter-spacing: 0.02em;
        text-align: left;
    }

    .phone-card-table td[data-card-title="true"],
    .phone-card-table td[data-card-actions="true"],
    .phone-card-table td[data-card-full="true"],
    .phone-card-table td[colspan] {
        display: block;
        text-align: left;
    }

    .phone-card-table td[data-card-title="true"]::before,
    .phone-card-table td[data-card-actions="true"]::before,
    .phone-card-table td[data-card-full="true"]::before,
    .phone-card-table td[colspan]::before {
        display: none;
    }

    .phone-card-table td[data-card-title="true"] {
        margin-bottom: 0.5rem;
        padding-bottom: 0.65rem !important;
        border-bottom: 1px solid var(--border-soft) !important;
    }

    .phone-card-table td[data-card-actions="true"] {
        margin-top: 0.55rem;
        padding-top: 0.7rem !important;
        border-top: 1px solid var(--border-soft) !important;
    }

    .phone-card-table td[data-card-actions="true"] .phone-action-stack,
    .phone-card-table td[data-card-actions="true"] > div {
        width: 100%;
    }

    .phone-card-table td[data-card-actions="true"] form {
        width: 100%;
    }

    .phone-card-table td[data-card-actions="true"] a,
    .phone-card-table td[data-card-actions="true"] button {
        display: inline-flex;
        align-items: center;
        width: 100%;
        justify-content: center;
    }

    .phone-card-table tr.revision-section-row {
        border: 0;
        padding: 0;
        background: transparent !important;
    }

    .phone-card-table tr.revision-section-row td {
        padding: 0.15rem 0 0.45rem !important;
    }

    .phone-card-table tr.production-flow-detail-row[hidden] {
        display: none !important;
    }

    .deadline-panel .flex.flex-wrap.gap-3,
    .dashboard-dark-panel .flex.flex-wrap.gap-3,
    .products-hero-section .flex.flex-wrap.items-center.gap-3,
    .orders-panel .flex.flex-wrap.gap-3 {
        width: 100%;
    }

    .deadline-panel .flex.flex-wrap.gap-3 > *,
    .dashboard-dark-panel .flex.flex-wrap.gap-3 > *,
    .products-hero-section .flex.flex-wrap.items-center.gap-3 > * {
        width: 100%;
    }

    .orders-filter-actions {
        grid-template-columns: 1fr !important;
    }

    .orders-type-switch-links {
        display: grid;
        grid-template-columns: 1fr;
    }

    .mobile-bottom-nav {
        max-width: none;
    }

    .mobile-more-panel {
        max-width: none;
    }

    .stock-table-shell.phone-table-shell {
        overflow-x: auto !important;
        overflow-y: visible !important;
    }

    .stock-sticky-table {
        min-width: max-content !important;
        width: max-content !important;
        border: 0;
    }

    .stock-sticky-table thead {
        display: table-header-group !important;
    }

    .stock-sticky-table tbody {
        display: table-row-group !important;
        background: #1f1e1d !important;
    }

    .stock-sticky-table tr {
        display: table-row !important;
        overflow: visible;
        border: 0;
        border-radius: 0;
        padding: 0;
        background: #1f1e1d !important;
    }

    .stock-sticky-table td {
        display: table-cell !important;
        width: auto;
        padding: 1rem !important;
        border: 0 !important;
        background: #1f1e1d !important;
        text-align: left;
        white-space: nowrap !important;
    }

    .stock-sticky-table td::before {
        display: none !important;
        content: none !important;
    }

    .stock-sticky-table td[data-card-title="true"],
    .stock-sticky-table td[data-card-actions="true"],
    .stock-sticky-table td[data-card-full="true"],
    .stock-sticky-table td[colspan] {
        display: table-cell !important;
        margin: 0;
        padding: 1rem !important;
        border: 0 !important;
        text-align: left;
    }

    .stock-sticky-table td[data-card-title="true"]::before,
    .stock-sticky-table td[data-card-actions="true"]::before,
    .stock-sticky-table td[data-card-full="true"]::before,
    .stock-sticky-table td[colspan]::before {
        display: none !important;
    }

    .stock-sticky-table td[data-card-title="true"] {
        margin-bottom: 0;
        padding-bottom: 1rem !important;
        border-bottom: 0 !important;
        white-space: normal !important;
        min-width: 16rem;
    }

    .consumables-table-shell.phone-table-shell {
        overflow-x: auto !important;
        overflow-y: visible !important;
    }

    .consumables-sticky-table {
        min-width: max-content !important;
        width: max-content !important;
        border: 0;
    }

    .consumables-sticky-table thead {
        display: table-header-group !important;
    }

    .consumables-sticky-table tbody {
        display: table-row-group !important;
        background: #1f1e1d !important;
    }

    .consumables-sticky-table tr {
        display: table-row !important;
        overflow: visible;
        border: 0;
        border-radius: 0;
        padding: 0;
        background: #1f1e1d !important;
    }

    .consumables-sticky-table td {
        display: table-cell !important;
        width: auto;
        padding: 1rem !important;
        border: 0 !important;
        background: #1f1e1d !important;
        text-align: left;
        white-space: nowrap !important;
    }

    .consumables-sticky-table td::before {
        display: none !important;
        content: none !important;
    }

    .consumables-sticky-table td[data-card-title="true"],
    .consumables-sticky-table td[data-card-actions="true"],
    .consumables-sticky-table td[data-card-full="true"],
    .consumables-sticky-table td[colspan] {
        display: table-cell !important;
        margin: 0;
        padding: 1rem !important;
        border: 0 !important;
        text-align: left;
    }

    .consumables-sticky-table td[data-card-title="true"]::before,
    .consumables-sticky-table td[data-card-actions="true"]::before,
    .consumables-sticky-table td[data-card-full="true"]::before,
    .consumables-sticky-table td[colspan]::before {
        display: none !important;
    }

    .consumables-sticky-table td[data-card-title="true"] {
        margin-bottom: 0;
        padding-bottom: 1rem !important;
        border-bottom: 0 !important;
        white-space: normal !important;
        min-width: 16rem;
    }
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-down {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

@font-face {
    font-family: "Source Serif 4";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("https://www.qdayprize.org/_next/static/media/e54d16b9f2c4535b-s.woff2") format("woff2");
}

@font-face {
    font-family: "Source Serif 4";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("https://www.qdayprize.org/_next/static/media/97ac91773d3121b2-s.p.woff2") format("woff2");
}

@font-face {
    font-family: "Geist Mono";
    font-style: normal;
    font-weight: 100 600;
    font-display: swap;
    src: url("https://www.qdayprize.org/_next/static/media/463dafcda517f24f-s.p.woff") format("woff");
}

/* QDay / Project Eleven inspired editorial skin. */
:root,
html[data-theme="dark"] {
    --page-bg: #0a0a0a;
    --page-bg-alt: #0a0a0a;
    --page-bg-deep: #050505;
    --header-bg: rgba(10, 10, 10, 0.94);
    --surface-1: rgba(15, 15, 15, 0.92);
    --surface-2: #101010;
    --surface-3: #151515;
    --surface-4: #1a1a1a;
    --surface-ink: #f5f5f5;
    --border-soft: rgba(245, 245, 245, 0.13);
    --border-strong: rgba(245, 245, 245, 0.28);
    --text-main: #f5f5f5;
    --text-muted: rgba(245, 245, 245, 0.64);
    --text-soft: rgba(245, 245, 245, 0.42);
    --accent-main: #f5f5f5;
    --accent-main-strong: #d7d7d7;
    --accent-red: #ff6b4a;
    --accent-red-strong: #ff8a70;
    --accent-blue: #9fb7ff;
    --accent-gold: #dfc15b;
    --nav-hover-bg: transparent;
    --nav-hover-text: #ffffff;
    --success: #8bbd7a;
    --warning: #dfc15b;
    --danger: #ff7a57;
    --info: #9fb7ff;
    --font-editorial: "Source Serif 4", Georgia, "Times New Roman", serif;
    --font-ui: "Geist Mono", "SFMono-Regular", "Roboto Mono", Consolas, "Liberation Mono", monospace;
    --font-sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

html {
    background: var(--page-bg);
}

body {
    min-height: 100dvh;
    background: var(--page-bg);
    color: var(--text-main);
    font-family: var(--font-editorial);
    font-size: 16px;
    font-variant-numeric: tabular-nums;
    line-height: 1.7;
    letter-spacing: 0;
}

.font-display,
h1,
h2,
h3,
h4,
h5,
h6,
.nav-pill,
.nav-brand,
.dashboard-panel-link,
.status-chip,
.metric-label,
thead th,
button,
input,
select,
textarea,
.mobile-tab,
.mobile-sheet-link-title,
.orders-type-chip,
.stock-primary-action,
.stock-secondary-action {
    font-family: var(--font-ui);
    letter-spacing: 0;
}

.font-display,
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.18;
}

.page-content h1.font-display,
.page-content h1 {
    font-size: clamp(2rem, 4vw, 3.55rem);
}

.page-content h2.font-display,
.page-content h2 {
    font-size: clamp(1.35rem, 2vw, 2.05rem);
}

.app-shell {
    max-width: 1560px;
}

.app-header {
    margin-bottom: clamp(3.2rem, 6vw, 6rem) !important;
    background: var(--header-bg) !important;
    border: 0 !important;
    border-bottom: 1px solid var(--border-soft) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.desktop-nav-shell {
    padding: 0 !important;
}

.desktop-nav-strip {
    justify-content: flex-start;
    gap: 0 !important;
    padding: 0 0.15rem;
}

.nav-brand,
.desktop-nav-strip .nav-pill {
    min-height: 2.75rem;
    padding: 0.62rem 0.45rem;
    border-radius: 0.35rem !important;
    color: var(--text-muted);
    font-size: 0.86rem;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
}

.nav-brand {
    color: var(--text-main);
}

.desktop-nav-strip .nav-pill {
    gap: 0;
}

.desktop-nav-strip .nav-pill::before {
    content: "/";
    margin: 0 0.72rem 0 0.28rem;
    color: rgba(245, 245, 245, 0.25);
}

.desktop-nav-strip .nav-pill-icon,
.desktop-nav-strip .local-nav-icon-mask {
    display: none;
}

.nav-pill-profile {
    width: auto;
    min-width: 0;
    padding-left: 0.45rem;
    padding-right: 0.45rem;
}

.nav-pill:hover,
.nav-pill-active,
.nav-pill-active:hover,
.nav-brand:hover {
    background: transparent !important;
    color: #ffffff !important;
}

.nav-pill-active span:last-child {
    text-decoration-line: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.28em;
}

.page-content {
    padding-bottom: 4rem;
}

.app-page-hero {
    margin: 0 0 clamp(3rem, 6vw, 5.5rem);
    padding: 0 0 clamp(2.2rem, 4vw, 4rem);
    border-bottom: 1px solid var(--border-soft);
}

.app-page-kicker {
    margin: 0 0 1.35rem;
    color: var(--text-soft);
    font-family: var(--font-ui);
    font-size: 0.82rem;
    line-height: 1.4;
}

.app-page-hero-grid {
    display: grid;
    gap: clamp(1.35rem, 4vw, 4rem);
}

.app-page-hero h1 {
    margin: 0;
    max-width: 12ch;
    color: var(--text-main);
    font-size: clamp(2.25rem, 6vw, 5.6rem);
    line-height: 0.98;
}

.app-page-hero p:last-child {
    max-width: 44rem;
    margin: 0;
    color: var(--text-muted);
    font-size: clamp(1.05rem, 1.6vw, 1.38rem);
    line-height: 1.7;
}

@media (min-width: 960px) {
    .app-page-hero-grid {
        grid-template-columns: minmax(0, 0.9fr) minmax(24rem, 0.62fr);
        align-items: end;
    }
}

.warehouse-overview-section,
.orders-hero-section,
.stock-hero-section,
.revision-hero-section,
.consumables-stock-section,
.products-hero-section {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

.dashboard-dark-panel,
.warehouse-overview-card,
.orders-panel,
article.order-card,
.revision-card,
.monthly-plan-card,
.monthly-plan-detail-panel,
.monthly-plan-detail-stat,
.monthly-plan-list-panel,
[class*="bg-white/5"],
[class*="bg-stone-900/30"],
[class*="bg-stone-900/40"],
[class*="bg-stone-900/50"],
[class*="bg-black/20"],
[class*="bg-black/30"],
[class*="bg-black/35"],
[class*="bg-black/40"],
[class*="bg-black/50"] {
    background: var(--surface-1) !important;
    border-color: var(--border-soft) !important;
    box-shadow: none !important;
}

.dashboard-dark-panel:hover,
.warehouse-overview-card:hover,
article.order-card:hover,
article.revision-card:hover,
.monthly-plan-card:hover,
.dashboard-order-card:hover,
.dashboard-revision-card:hover {
    background: var(--surface-2) !important;
    border-color: var(--border-strong) !important;
    transform: none !important;
}

[class*="rounded-[1rem]"],
[class*="rounded-[1.25rem]"],
[class*="rounded-[1.5rem]"],
[class*="rounded-[1.75rem]"],
[class*="rounded-[2rem]"],
[class*="rounded-2xl"],
[class*="rounded-full"] {
    border-radius: 0.5rem !important;
}

a.dashboard-panel-link,
.dashboard-panel-link,
body a:not(.nav-pill):not(.nav-brand):not(.mobile-tab):not(.mobile-sheet-link):not([class*="bg-gradient-to-r"]) {
    color: var(--text-muted) !important;
    text-decoration-line: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

a.dashboard-panel-link:hover,
.dashboard-panel-link:hover,
body a:not(.nav-pill):not(.nav-brand):not(.mobile-tab):not(.mobile-sheet-link):not([class*="bg-gradient-to-r"]):hover {
    color: var(--text-main) !important;
}

a[class*="bg-gradient-to-r"],
button[class*="bg-gradient-to-r"],
.solid-action-button,
.stock-primary-action {
    background: var(--text-main) !important;
    border: 1px solid var(--text-main) !important;
    color: var(--page-bg) !important;
    font-family: var(--font-ui);
    font-weight: 600;
}

a[class*="bg-gradient-to-r"]:hover,
button[class*="bg-gradient-to-r"]:hover,
.solid-action-button:hover,
.stock-primary-action:hover {
    background: var(--accent-main-strong) !important;
    border-color: var(--accent-main-strong) !important;
    color: var(--page-bg) !important;
}

button[class*="border"],
a[class*="border"],
.stock-secondary-action,
.orders-type-chip,
a.orders-type-chip {
    background: transparent !important;
    border-color: var(--border-soft) !important;
    color: var(--text-main) !important;
    text-decoration: none !important;
}

button[class*="border"]:hover,
a[class*="border"]:hover,
.stock-secondary-action:hover,
.orders-type-chip:hover,
a.orders-type-chip:hover {
    border-color: var(--border-strong) !important;
    color: var(--text-main) !important;
}

.orders-type-chip-active,
a.orders-type-chip-active {
    background: var(--text-main) !important;
    border-color: var(--text-main) !important;
    color: var(--page-bg) !important;
    text-decoration: none !important;
}

body .orders-type-switch-links a.orders-type-chip {
    text-decoration: none !important;
}

body .orders-type-switch-links a.orders-type-chip-active {
    color: #0a0a0a !important;
    -webkit-text-fill-color: #0a0a0a;
}

.metric-card {
    background: transparent;
    border-color: var(--border-soft);
    padding: 1rem;
}

.metric-label {
    color: var(--text-soft);
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
}

.metric-value {
    color: var(--text-main);
    font-family: var(--font-ui);
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    font-weight: 500;
    letter-spacing: 0;
}

.metric-card-alert .metric-value,
.order-name-accent {
    color: var(--danger) !important;
}

.status-chip {
    border-color: currentColor;
    background: transparent;
    padding: 0.34rem 0.62rem;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0;
}

.status-chip::before {
    width: 0.38rem;
    height: 0.38rem;
}

.status-chip-success,
.status-chip-warning,
.status-chip-danger,
.status-chip-info {
    background: transparent;
}

table {
    border-collapse: separate;
    border-spacing: 0;
}

thead th,
.stock-table-head,
.revision-table-head,
.consumables-table-head,
.products-table-head,
.orders-table-head {
    background: #0d0d0d !important;
}

thead th {
    border-bottom: 1px solid var(--border-soft);
    color: var(--text-soft) !important;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: uppercase;
}

tbody,
tbody tr,
tbody td,
.stock-table-body,
.stock-table-body tr,
.stock-table-body td,
.revision-table-body,
.revision-table-body tr,
.revision-table-body td,
.consumables-table-body,
.consumables-table-body tr,
.consumables-table-body td,
.products-table-body,
.products-table-body tr,
.products-table-body td {
    background: var(--surface-1) !important;
}

tbody tr:hover,
tbody tr:hover td,
.products-table-body tr:hover,
.products-table-body tr:hover td {
    background: var(--surface-2) !important;
}

input:not(:disabled),
textarea:not(:disabled),
select:not(:disabled),
.table-product-search,
.order-product-combobox-trigger,
.order-product-search,
.order-product-option,
.order-quantity-button {
    background: #0d0d0d !important;
    border-color: var(--border-soft) !important;
    color: var(--text-main) !important;
    border-radius: 0.45rem !important;
    font-family: var(--font-ui);
}

input:not(:disabled):hover,
textarea:not(:disabled):hover,
select:not(:disabled):hover,
input:not(:disabled):focus,
textarea:not(:disabled):focus,
select:not(:disabled):focus,
.table-product-search:hover,
.table-product-search:focus,
.order-product-combobox-trigger:hover,
.order-product-combobox-trigger:focus-visible,
.order-product-search:hover,
.order-product-search:focus,
.order-product-option:hover,
.order-product-option:focus-visible,
.order-quantity-button:hover,
.order-quantity-button:focus-visible {
    background: #141414 !important;
    border-color: var(--border-strong) !important;
    box-shadow: none !important;
}

.order-product-dropdown {
    background: #0d0d0d;
    border-color: var(--border-soft);
    border-radius: 0.5rem;
    box-shadow: none;
}

.deadline-panel {
    background: rgba(255, 122, 87, 0.08) !important;
    border-color: rgba(255, 122, 87, 0.28) !important;
}

.login-brand {
    margin: 0;
    color: var(--text-main);
    font-size: clamp(2.55rem, 7vw, 4.7rem);
    line-height: 0.98;
}

.page-content-login input {
    min-height: 3.45rem;
}

.mobile-bottom-nav {
    border-color: var(--border-soft) !important;
    background: rgba(10, 10, 10, 0.92) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.mobile-tab {
    color: var(--text-muted);
}

.mobile-tab:hover,
.mobile-tab:focus-visible,
.mobile-tab-active {
    background: transparent !important;
    color: var(--text-main) !important;
}

.mobile-tab-active .mobile-tab-label {
    text-decoration-line: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.24em;
}

.mobile-more-panel {
    border-color: var(--border-soft) !important;
    background: rgba(10, 10, 10, 0.97) !important;
}

.mobile-sheet-link {
    background: var(--surface-1) !important;
    border-color: var(--border-soft) !important;
}

.mobile-sheet-link:hover,
.mobile-sheet-link:focus-visible,
.mobile-sheet-link-active {
    background: var(--surface-2) !important;
    border-color: var(--border-strong) !important;
}

@media (max-width: 480px) {
    .app-page-hero {
        margin-bottom: 2.4rem;
        padding-bottom: 2rem;
    }

    .app-page-hero h1 {
        max-width: none;
        font-size: 2.35rem !important;
    }

    .phone-card-table tr,
    .stock-sticky-table tbody,
    .stock-sticky-table tr,
    .stock-sticky-table td,
    .consumables-sticky-table tbody,
    .consumables-sticky-table tr,
    .consumables-sticky-table td {
        background: var(--surface-1) !important;
    }
}

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

/* Anduril-inspired operational skin. */
:root,
html[data-theme="dark"] {
    --page-bg: #010101;
    --page-bg-alt: #010101;
    --page-bg-deep: #000000;
    --header-bg: #010101;
    --surface-1: #070707;
    --surface-2: #0c0c0c;
    --surface-3: #111111;
    --surface-4: #181818;
    --surface-ink: #ffffff;
    --border-soft: rgba(255, 255, 255, 0.13);
    --border-strong: rgba(255, 255, 255, 0.34);
    --text-main: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.66);
    --text-soft: rgba(255, 255, 255, 0.44);
    --accent-main: #ffffff;
    --accent-main-strong: #dff140;
    --accent-red: #ff3535;
    --accent-red-strong: #ff6a5d;
    --accent-blue: #8e9291;
    --accent-gold: #dff140;
    --nav-hover-bg: transparent;
    --nav-hover-text: #ffffff;
    --success: #dff140;
    --warning: #dff140;
    --danger: #ff3535;
    --info: #b0b0a9;
    --font-anduril: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-industrial: "Arial Narrow", "Helvetica Neue Condensed", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

html,
body {
    background: var(--page-bg);
}

body {
    color: var(--text-main);
    font-family: var(--font-anduril);
    font-size: 14px;
    line-height: 1.2;
    letter-spacing: 0;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: calc((100vw - 4rem) / 12) 7rem, calc((100vw - 4rem) / 12) 7rem;
    background-position: 2rem 0, 2rem 0;
    opacity: 0.55;
}

.font-display,
h1,
h2,
h3,
h4,
h5,
h6,
p,
a,
button,
input,
select,
textarea,
thead th,
.nav-pill,
.nav-brand,
.dashboard-panel-link,
.status-chip,
.metric-label,
.metric-value,
.orders-type-chip,
.stock-primary-action,
.stock-secondary-action,
.mobile-tab,
.mobile-sheet-link-title {
    font-family: var(--font-anduril);
    letter-spacing: 0;
}

.font-display,
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.02;
}

p {
    line-height: 1.28;
}

.app-shell {
    max-width: none;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
}

.app-header {
    min-height: 5rem;
    margin-bottom: 4.6rem !important;
    padding: 0 !important;
    background: #010101 !important;
    border-bottom: 1px solid var(--border-soft) !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.desktop-nav-shell {
    height: 5rem;
    padding: 0 !important;
}

.desktop-nav-strip {
    position: relative;
    width: 100%;
    min-width: 0;
    height: 5rem;
    justify-content: center;
    gap: 1.65rem !important;
    padding: 0 7rem;
}

.nav-brand {
    position: absolute;
    left: 2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    height: 5rem;
    min-height: 5rem;
    padding: 0 !important;
    color: #ffffff !important;
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none !important;
}

.nav-brand::before {
    content: "";
    width: 0.74rem;
    height: 0.74rem;
    border: 1.5px solid currentColor;
    transform: rotate(45deg);
}

.desktop-nav-strip .nav-pill {
    min-height: 5rem;
    padding: 0 !important;
    border-radius: 0 !important;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1;
    text-decoration: none !important;
}

.desktop-nav-strip .nav-pill::before {
    display: none;
}

.desktop-nav-strip .nav-pill:hover,
.desktop-nav-strip .nav-pill-active,
.desktop-nav-strip .nav-pill-active:hover {
    color: #ffffff !important;
    background: transparent !important;
}

.nav-pill-active span:last-child {
    text-decoration-line: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.38em;
}

.nav-pill-profile {
    position: absolute;
    right: 2rem;
}

.page-content {
    padding-bottom: 5rem;
}

.app-page-hero {
    position: relative;
    isolation: isolate;
    min-height: clamp(24rem, 58vh, 42rem);
    margin: -1.6rem 0 4.5rem;
    padding: clamp(2rem, 5vw, 5rem) 0 2rem;
    border: 0;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.app-page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(90deg, rgba(1, 1, 1, 0.99) 0%, rgba(1, 1, 1, 0.78) 38%, rgba(1, 1, 1, 0.18) 100%),
        linear-gradient(180deg, rgba(1, 1, 1, 0.22) 0%, rgba(1, 1, 1, 0.06) 48%, rgba(1, 1, 1, 0.92) 100%),
        url("../images/anduril-operations-hero.png");
    background-position: center right;
    background-size: cover;
}

.app-page-hero::after {
    content: "";
    position: absolute;
    inset: 0 0 auto auto;
    z-index: -1;
    width: min(68vw, 62rem);
    height: 100%;
    background:
        linear-gradient(110deg, transparent 0 20%, rgba(255, 255, 255, 0.11) 20% 20.35%, transparent 20.35% 100%),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 4.2rem);
    opacity: 0.55;
    clip-path: polygon(24% 0, 100% 0, 100% 100%, 0 100%);
}

.app-page-kicker {
    position: absolute;
    top: clamp(2rem, 4vw, 4rem);
    left: 0;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.05;
    text-transform: uppercase;
}

.app-page-hero-grid {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(18rem, 4fr);
    align-items: end;
    gap: 1.125rem;
}

.app-page-hero h1 {
    max-width: 13ch;
    margin: 0;
    font-size: clamp(4rem, 9vw, 9.8rem);
    font-weight: 800;
    line-height: 0.9;
}

.app-page-hero p:last-child {
    max-width: 31rem;
    margin: 0 0 0.55rem;
    color: var(--text-muted);
    font-size: clamp(1.05rem, 1.35vw, 1.35rem);
    line-height: 1.2;
}

.warehouse-overview-section,
.orders-hero-section,
.stock-hero-section,
.revision-hero-section,
.consumables-stock-section,
.products-hero-section {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

.dashboard-dark-panel,
.warehouse-overview-card,
.orders-panel,
article.order-card,
.revision-card,
.monthly-plan-card,
.monthly-plan-detail-panel,
.monthly-plan-detail-stat,
.monthly-plan-list-panel,
[class*="bg-white/5"],
[class*="bg-stone-900/30"],
[class*="bg-stone-900/40"],
[class*="bg-stone-900/50"],
[class*="bg-black/20"],
[class*="bg-black/30"],
[class*="bg-black/35"],
[class*="bg-black/40"],
[class*="bg-black/50"] {
    background: rgba(1, 1, 1, 0.88) !important;
    border-color: var(--border-soft) !important;
    border-radius: 2px !important;
    box-shadow: none !important;
}

.dashboard-dark-panel,
.warehouse-overview-card,
.orders-panel {
    backdrop-filter: none !important;
}

.dashboard-dark-panel:hover,
.warehouse-overview-card:hover,
article.order-card:hover,
article.revision-card:hover,
.monthly-plan-card:hover,
.dashboard-order-card:hover,
.dashboard-revision-card:hover {
    background: #080808 !important;
    border-color: var(--border-strong) !important;
    transform: none !important;
}

[class*="rounded-[1rem]"],
[class*="rounded-[1.25rem]"],
[class*="rounded-[1.5rem]"],
[class*="rounded-[1.75rem]"],
[class*="rounded-[2rem]"],
[class*="rounded-2xl"],
[class*="rounded-full"] {
    border-radius: 2px !important;
}

.page-content h1.font-display,
.page-content h1 {
    font-size: clamp(3.2rem, 6vw, 6.5rem);
    font-weight: 800;
    line-height: 0.95;
}

.page-content h2.font-display,
.page-content h2 {
    font-size: clamp(1.9rem, 3.5vw, 4rem);
    font-weight: 700;
    line-height: 1.02;
}

.page-content h3.font-display,
.page-content h3 {
    font-size: clamp(1.4rem, 2.1vw, 2.5rem);
}

.text-sm,
.text-xs,
.dashboard-panel-link,
label,
thead th,
.status-chip,
.metric-label,
.orders-type-switch-label {
    font-size: 0.78rem !important;
}

.orders-type-switch-label,
.metric-label,
thead th,
.status-chip {
    text-transform: uppercase;
    font-weight: 500;
}

a.dashboard-panel-link,
.dashboard-panel-link,
body a:not(.nav-pill):not(.nav-brand):not(.mobile-tab):not(.mobile-sheet-link):not([class*="bg-gradient-to-r"]) {
    color: rgba(255, 255, 255, 0.6) !important;
    text-decoration-line: none;
}

a.dashboard-panel-link:hover,
.dashboard-panel-link:hover,
body a:not(.nav-pill):not(.nav-brand):not(.mobile-tab):not(.mobile-sheet-link):not([class*="bg-gradient-to-r"]):hover {
    color: #ffffff !important;
}

a[class*="bg-gradient-to-r"],
button[class*="bg-gradient-to-r"],
.solid-action-button,
.stock-primary-action {
    background: #ffffff !important;
    border: 1px solid #ffffff !important;
    color: #010101 !important;
    border-radius: 2px !important;
    font-weight: 600;
    text-transform: none;
}

a[class*="bg-gradient-to-r"]:hover,
button[class*="bg-gradient-to-r"]:hover,
.solid-action-button:hover,
.stock-primary-action:hover {
    background: transparent !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
}

button[class*="border"],
a[class*="border"],
.stock-secondary-action,
.orders-type-chip,
a.orders-type-chip {
    background: transparent !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
    color: rgba(255, 255, 255, 0.72) !important;
    border-radius: 2px !important;
    text-decoration: none !important;
}

button[class*="border"]:hover,
a[class*="border"]:hover,
.stock-secondary-action:hover,
.orders-type-chip:hover,
a.orders-type-chip:hover {
    border-color: #ffffff !important;
    color: #ffffff !important;
}

.orders-type-chip-active,
a.orders-type-chip-active,
body .orders-type-switch-links a.orders-type-chip-active {
    background: #ffffff !important;
    border-color: #ffffff !important;
    color: #010101 !important;
    -webkit-text-fill-color: #010101;
}

.metric-card {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 2px;
}

.metric-label {
    color: var(--text-soft);
}

.metric-value {
    color: var(--text-main);
    font-size: clamp(2.3rem, 4.8vw, 5rem);
    font-weight: 800;
    line-height: 0.9;
}

.metric-card-alert .metric-value,
.order-name-accent {
    color: #dff140 !important;
}

.status-chip {
    gap: 0.5rem;
    padding: 0.42rem 0.58rem;
    border-color: rgba(255, 255, 255, 0.18);
    background: transparent !important;
    color: rgba(255, 255, 255, 0.78);
}

.status-chip::before {
    width: 0.42rem;
    height: 0.42rem;
    background: currentColor;
}

.status-chip-success {
    color: #dff140;
}

.status-chip-warning {
    color: #dff140;
}

.status-chip-danger {
    color: #ff3535;
}

.status-chip-info {
    color: #b0b0a9;
}

thead th,
.stock-table-head,
.revision-table-head,
.consumables-table-head,
.products-table-head,
.orders-table-head {
    background: #050505 !important;
}

thead th {
    border-bottom: 1px solid var(--border-soft);
    color: rgba(255, 255, 255, 0.42) !important;
}

tbody,
tbody tr,
tbody td,
.stock-table-body,
.stock-table-body tr,
.stock-table-body td,
.revision-table-body,
.revision-table-body tr,
.revision-table-body td,
.consumables-table-body,
.consumables-table-body tr,
.consumables-table-body td,
.products-table-body,
.products-table-body tr,
.products-table-body td {
    background: #070707 !important;
}

tbody tr:hover,
tbody tr:hover td,
.products-table-body tr:hover,
.products-table-body tr:hover td {
    background: #0f0f0f !important;
}

input:not(:disabled),
textarea:not(:disabled),
select:not(:disabled),
.table-product-search,
.order-product-combobox-trigger,
.order-product-search,
.order-product-option,
.order-quantity-button {
    background: #050505 !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
    color: #ffffff !important;
    border-radius: 2px !important;
}

input:not(:disabled):hover,
textarea:not(:disabled):hover,
select:not(:disabled):hover,
input:not(:disabled):focus,
textarea:not(:disabled):focus,
select:not(:disabled):focus,
.table-product-search:hover,
.table-product-search:focus,
.order-product-combobox-trigger:hover,
.order-product-combobox-trigger:focus-visible,
.order-product-search:hover,
.order-product-search:focus,
.order-product-option:hover,
.order-product-option:focus-visible,
.order-quantity-button:hover,
.order-quantity-button:focus-visible {
    background: #0d0d0d !important;
    border-color: #ffffff !important;
}

.order-product-dropdown {
    background: #050505 !important;
    border-color: rgba(255, 255, 255, 0.22);
    border-radius: 2px;
}

.deadline-panel {
    background: rgba(255, 53, 53, 0.09) !important;
    border-color: rgba(255, 53, 53, 0.42) !important;
}

.login-brand {
    color: #ffffff;
    font-size: clamp(4rem, 7vw, 7.25rem);
    font-weight: 800;
    line-height: 0.9;
    text-transform: uppercase;
}

.page-content-login input {
    min-height: 3.7rem;
}

.mobile-bottom-nav {
    border-color: rgba(255, 255, 255, 0.16) !important;
    border-radius: 2px !important;
    background: rgba(1, 1, 1, 0.95) !important;
}

.mobile-tab:hover,
.mobile-tab:focus-visible,
.mobile-tab-active {
    background: transparent !important;
    color: #ffffff !important;
}

.mobile-more-panel {
    border-color: rgba(255, 255, 255, 0.16) !important;
    border-radius: 2px !important;
    background: rgba(1, 1, 1, 0.98) !important;
}

.mobile-sheet-link {
    border-radius: 2px !important;
    background: #070707 !important;
}

.mobile-sheet-link:hover,
.mobile-sheet-link:focus-visible,
.mobile-sheet-link-active {
    background: #0f0f0f !important;
    border-color: #ffffff !important;
}

@media (max-width: 1023px) {
    .app-shell {
        padding-left: max(1rem, env(safe-area-inset-left)) !important;
        padding-right: max(1rem, env(safe-area-inset-right)) !important;
    }
}

@media (max-width: 768px) {
    body::before {
        background-size: 5rem 5rem;
        background-position: 1rem 0;
    }

    .app-page-hero {
        min-height: 27rem;
        margin-top: 0;
        margin-bottom: 3rem;
    }

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

    .app-page-hero h1 {
        max-width: none;
        font-size: 3.35rem !important;
    }

    .app-page-hero p:last-child {
        max-width: 23rem;
        font-size: 1.05rem;
    }
}

@media (max-width: 480px) {
    .page-content h1.font-display,
    .page-content h1 {
        font-size: 3rem !important;
    }

    .page-content h2.font-display,
    .page-content h2 {
        font-size: 2rem !important;
    }

    .login-brand {
        font-size: clamp(3rem, 12vw, 3.55rem);
        max-width: 100%;
    }
}

/* Annotation fixes: graphite panels and cyan system accent. */
:root,
html[data-theme="dark"] {
    --accent-main-strong: #77FBFD;
    --accent-gold: #77FBFD;
    --success: #77FBFD;
    --warning: #77FBFD;
}

.dashboard-dark-panel,
.dashboard-panel-black {
    background: #000000 !important;
    background-color: #000000 !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
}

.dashboard-panel-black.bg-white\/5,
.dashboard-panel-black.bg-stone-900\/30,
.dashboard-panel-black.bg-stone-900\/40,
.dashboard-panel-black.bg-stone-900\/50 {
    background: #000000 !important;
    background-color: #000000 !important;
}

.dashboard-dark-panel [class*="bg-stone-900/30"],
.dashboard-dark-panel [class*="bg-stone-900/40"],
.dashboard-dark-panel [class*="bg-stone-900/50"],
.dashboard-dark-panel [class*="bg-black/30"],
.dashboard-dark-panel [class*="bg-black/35"],
.dashboard-dark-panel [class*="bg-black/40"],
.dashboard-dark-panel [class*="bg-black/50"],
.dashboard-dark-panel [class*="bg-white/5"] {
    background: #000000 !important;
}

.orders-panel,
.orders-panel-graphite {
    background: #171717 !important;
    background-color: #171717 !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
}

.orders-panel-graphite.bg-white\/5,
.orders-panel-graphite.bg-stone-900\/30,
.orders-panel-graphite.bg-stone-900\/40,
.orders-panel-graphite.bg-stone-900\/50 {
    background: #171717 !important;
    background-color: #171717 !important;
}

.orders-panel [class*="bg-white/5"],
.orders-panel [class*="bg-stone-900/30"],
.orders-panel [class*="bg-stone-900/40"],
.orders-panel [class*="bg-stone-900/50"],
.orders-panel [class*="bg-black/30"],
.orders-panel [class*="bg-black/35"],
.orders-panel [class*="bg-black/40"],
.orders-panel [class*="bg-black/50"] {
    background: #101010 !important;
}

.metric-card-alert .metric-value,
.order-name-accent,
.status-chip-success,
.status-chip-warning,
.text-emerald-100,
.text-emerald-200,
.text-amber-100,
.text-amber-200,
[class*="text-emerald-"],
[class*="text-amber-"] {
    color: #77FBFD !important;
}

.status-chip-success::before,
.status-chip-warning::before {
    background: #77FBFD !important;
}

[class*="bg-emerald-400/10"],
[class*="bg-emerald-400/20"],
[class*="bg-amber-300/10"],
[class*="bg-amber-300/20"],
.products-table-body .bg-emerald-400\/20 {
    background: rgba(119, 251, 253, 0.1) !important;
}

[class*="border-emerald-400/"],
[class*="border-amber-300/"] {
    border-color: rgba(119, 251, 253, 0.32) !important;
}

.products-table-body .text-emerald-100,
.products-table-body span[class*="text-emerald"] {
    color: #77FBFD !important;
}

/* LatticeOS-inspired command layout. */
.lattice-auth-body {
    --lattice-bg: #050608;
    --lattice-panel: #1d1f24;
    --lattice-panel-strong: #24272d;
    --lattice-panel-soft: #111318;
    --lattice-border: #30333a;
    --lattice-border-soft: rgba(255, 255, 255, 0.09);
    --lattice-text: #f2f4f7;
    --lattice-muted: #8a8f9a;
    --lattice-muted-strong: #b6bbc4;
    --lattice-cyan: #77FBFD;
    --lattice-magenta: #FF3EC8;
    --lattice-green: #45E06F;
    --lattice-yellow: #FFB82E;
    --lattice-red: #FF3E55;
    --page-bg: var(--lattice-bg);
    --page-bg-alt: var(--lattice-bg);
    --page-bg-deep: #000000;
    --surface-1: var(--lattice-panel);
    --surface-2: var(--lattice-panel-soft);
    --surface-3: #0b0d10;
    --surface-4: #050608;
    --text-main: var(--lattice-text);
    --text-muted: var(--lattice-muted);
    --text-soft: #69707b;
    --border-soft: var(--lattice-border);
    --border-strong: rgba(255, 255, 255, 0.24);
    --accent-main: var(--lattice-cyan);
    --accent-main-strong: var(--lattice-magenta);
    --accent-gold: var(--lattice-yellow);
    --success: var(--lattice-green);
    --warning: var(--lattice-yellow);
    --info: var(--lattice-cyan);
    background: var(--lattice-bg);
    color: var(--lattice-text);
}

.lattice-auth-body::before {
    background-image:
        linear-gradient(rgba(119, 251, 253, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(119, 251, 253, 0.03) 1px, transparent 1px);
    background-size: 4.5rem 4.5rem;
    background-position: 0 0;
    opacity: 0.42;
}

.lattice-auth-body .app-shell:not(.app-shell-login) {
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 1.25rem 1.5rem 2.5rem calc(56px + 1.5rem) !important;
    transition: padding-left 180ms ease;
}

.lattice-auth-body.lattice-sidebar-open .app-shell:not(.app-shell-login) {
    padding-left: calc(324px + 1.5rem) !important;
}

.lattice-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 80;
    width: 56px;
    min-height: 100dvh;
    background: #07080b;
    border-right: 1px solid var(--lattice-border);
    color: var(--lattice-text);
    overflow: hidden;
    transition: width 180ms ease;
}

.lattice-auth-body.lattice-sidebar-open .lattice-sidebar {
    width: 324px !important;
}

@media (min-width: 1024px) {
    .lattice-sidebar.hidden {
        display: flex !important;
    }
}

.lattice-rail {
    position: relative;
    z-index: 2;
    display: flex;
    width: 56px;
    min-width: 56px;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 0.45rem;
    background: #07080b;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.lattice-mark {
    position: relative;
    display: inline-flex;
    width: 2.35rem;
    height: 2.35rem;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 2px;
    background: transparent;
    color: var(--lattice-text);
    cursor: pointer;
    text-decoration: none;
    overflow: hidden;
    transition:
        background 160ms ease,
        border-color 160ms ease,
        color 160ms ease;
}

.lattice-mark:hover,
.lattice-mark:focus-visible {
    background: rgba(255, 255, 255, 0.055);
    border-color: var(--lattice-border);
    color: var(--lattice-cyan);
    outline: none;
}

.lattice-mark-glyph {
    position: relative;
    display: block;
    width: 1.3rem;
    height: 1.3rem;
    border: 2px solid currentColor;
    transform: rotate(45deg);
    opacity: 1;
    transition:
        opacity 180ms ease,
        transform 180ms ease,
        filter 180ms ease;
}

.lattice-mark-glyph::before,
.lattice-mark-glyph::after {
    content: "";
    position: absolute;
    inset: 0.22rem;
    border: 1px solid currentColor;
}

.lattice-mark-glyph::after {
    inset: 0.46rem;
    background: currentColor;
}

.lattice-mark-icon {
    position: absolute;
    inset: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--lattice-cyan);
    font-size: 1.35rem;
    opacity: 0;
    transform: translateY(0.28rem) scale(0.72);
    transition:
        opacity 180ms ease,
        transform 180ms ease;
}

.lattice-mark:hover .lattice-mark-glyph,
.lattice-mark:focus-visible .lattice-mark-glyph {
    opacity: 0;
    transform: rotate(45deg) translateY(-0.25rem) scale(0.72);
    filter: blur(2px);
}

.lattice-mark:hover .lattice-mark-icon,
.lattice-mark:focus-visible .lattice-mark-icon {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.lattice-rail-nav {
    display: grid;
    width: 100%;
    gap: 0.25rem;
    padding-top: 0.35rem;
}

.lattice-menu-toggle {
    color: var(--lattice-text);
}

.lattice-rail-button {
    position: relative;
    display: inline-flex;
    width: 2.65rem;
    height: 2.65rem;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 2px;
    color: #9aa1ad;
    text-decoration: none;
    transition:
        background 160ms ease,
        border-color 160ms ease,
        color 160ms ease;
}

.lattice-rail-button .material-symbols-rounded {
    font-size: 1.35rem;
}

.lattice-rail-label {
    display: none;
}

.lattice-rail-button:hover,
.lattice-rail-button:focus-visible,
.lattice-rail-button.lattice-active {
    background: rgba(255, 255, 255, 0.055);
    border-color: var(--lattice-border);
    color: var(--item-accent, var(--lattice-cyan));
    outline: none;
}

.lattice-rail-button.lattice-active::before {
    content: "";
    position: absolute;
    left: -0.45rem;
    width: 2px;
    height: 1.55rem;
    background: var(--item-accent, var(--lattice-cyan));
    box-shadow: 0 0 12px var(--item-accent, var(--lattice-cyan));
}

.lattice-rail-profile {
    margin-top: auto;
}

.lattice-menu {
    position: absolute;
    inset: 0 auto 0 56px;
    display: flex;
    width: 268px;
    min-width: 0;
    flex-direction: column;
    background: #07080b;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-0.75rem);
    transition:
        opacity 170ms ease,
        transform 170ms ease;
}

.lattice-auth-body.lattice-sidebar-open .lattice-menu {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateX(0) !important;
}

.lattice-sidebar-open #lattice-sidebar {
    width: 324px !important;
}

#lattice-menu-panel[aria-hidden="false"] {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateX(0) !important;
}

.lattice-menu-list {
    display: grid;
    gap: 0.25rem;
    padding: 4.05rem 0.45rem 0.7rem 0;
}

.lattice-menu-lock-form {
    position: absolute;
    top: 0.75rem;
    left: 0.45rem;
    display: flex;
    width: 2.65rem;
    height: 2.65rem;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.lattice-menu-lock-button {
    display: inline-flex;
    width: 2.35rem;
    height: 2.35rem;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 2px;
    background: transparent;
    color: var(--lattice-muted-strong);
    cursor: pointer;
    transition:
        background 160ms ease,
        border-color 160ms ease,
        color 160ms ease;
}

.lattice-menu-lock-button:hover,
.lattice-menu-lock-button:focus-visible {
    background: rgba(255, 255, 255, 0.055);
    border-color: var(--lattice-border);
    color: #ff3c5d;
    outline: none;
}

.lattice-menu-lock-button .material-symbols-rounded {
    font-size: 1.32rem;
}

.lattice-menu-item,
.lattice-profile-card {
    position: relative;
    display: flex;
    min-height: 2.65rem;
    align-items: center;
    gap: 0.72rem;
    padding: 0 1.1rem;
    border: 1px solid transparent;
    color: var(--lattice-muted-strong);
    font-size: 0.92rem;
    font-weight: 650;
    line-height: 1;
    text-decoration: none;
    transition:
        background 160ms ease,
        border-color 160ms ease,
        color 160ms ease;
}

.lattice-menu-item {
    border-radius: 0 !important;
    background: transparent !important;
}

.lattice-menu-item:hover,
.lattice-menu-item:focus-visible,
.lattice-menu-item.lattice-active {
    background: transparent !important;
    border-color: transparent;
    color: var(--item-accent, var(--lattice-cyan));
    outline: none;
}

.lattice-profile-card:hover,
.lattice-profile-card:focus-visible,
.lattice-profile-card.lattice-active {
    background: rgba(255, 255, 255, 0.035) !important;
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--lattice-cyan);
    outline: none;
}

.lattice-profile-card.lattice-active::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 2px;
    background: var(--item-accent, var(--lattice-cyan));
}

.lattice-menu-item.lattice-active::before {
    display: none;
}

.lattice-profile-card {
    margin: auto 0.45rem 0.75rem 0;
    background: transparent !important;
    color: var(--lattice-text);
}

.lattice-auth-body .page-content {
    min-height: calc(100dvh - 2.5rem);
    padding-bottom: 3rem;
}

.lattice-auth-body .font-display,
.lattice-auth-body h1,
.lattice-auth-body h2,
.lattice-auth-body h3,
.lattice-auth-body h4,
.lattice-auth-body h5,
.lattice-auth-body h6 {
    font-family: var(--font-anduril);
    letter-spacing: 0;
    text-transform: none;
}

.lattice-auth-body .app-page-hero {
    min-height: 0 !important;
    margin: 0 0 1.1rem !important;
    padding: 1rem !important;
    border: 1px solid var(--lattice-border);
    background:
        linear-gradient(90deg, rgba(119, 251, 253, 0.06), transparent 48%),
        #0a0b0f;
    display: block;
}

.lattice-auth-body .app-page-hero::before,
.lattice-auth-body .app-page-hero::after {
    display: none;
}

.lattice-auth-body .app-page-kicker {
    position: static;
    color: var(--lattice-cyan);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.72rem;
}

.lattice-auth-body .app-page-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.42fr);
    align-items: end;
    gap: 1rem;
    margin-top: 0.82rem;
}

.lattice-auth-body .app-page-hero h1 {
    max-width: none;
    font-size: clamp(2.45rem, 5vw, 5.7rem) !important;
    line-height: 0.92;
}

.lattice-auth-body .app-page-hero p:last-child {
    max-width: 34rem;
    margin: 0;
    color: var(--lattice-muted-strong);
    font-size: 1rem;
    line-height: 1.22;
}

.lattice-auth-body .dashboard-photo-hero {
    position: relative;
    isolation: isolate;
    min-height: clamp(19rem, 36vh, 30rem) !important;
    margin-bottom: 1.35rem !important;
    padding: clamp(1.35rem, 3vw, 2.4rem) !important;
    display: flex !important;
    align-items: flex-end;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(5, 6, 8, 0.98) 0%, rgba(5, 6, 8, 0.76) 42%, rgba(5, 6, 8, 0.22) 100%),
        linear-gradient(180deg, rgba(5, 6, 8, 0.08) 0%, rgba(5, 6, 8, 0.22) 45%, rgba(5, 6, 8, 0.88) 100%),
        url("../images/anduril-operations-hero.png") center right / cover no-repeat !important;
}

.lattice-auth-body .dashboard-photo-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    display: block;
    pointer-events: none;
    background:
        linear-gradient(110deg, transparent 0 22%, rgba(119, 251, 253, 0.16) 22% 22.25%, transparent 22.25% 100%),
        repeating-linear-gradient(90deg, rgba(119, 251, 253, 0.08) 0 1px, transparent 1px 4.25rem);
    opacity: 0.42;
}

.lattice-auth-body .dashboard-photo-hero .app-page-kicker {
    position: absolute;
    top: clamp(1.35rem, 2.5vw, 2.2rem);
    left: clamp(1.35rem, 3vw, 2.4rem);
}

.lattice-auth-body .dashboard-photo-hero .app-page-hero-grid {
    width: 100%;
}

.lattice-auth-body .dashboard-photo-hero h1 {
    max-width: 12ch;
    font-size: clamp(3.25rem, 7vw, 8rem) !important;
}

.lattice-auth-body .dashboard-photo-hero p:last-child {
    color: rgba(242, 244, 247, 0.82);
    text-shadow: 0 1px 20px rgba(0, 0, 0, 0.55);
}

.lattice-auth-body .warehouse-overview-card,
.lattice-auth-body .dashboard-dark-panel,
.lattice-auth-body .orders-panel,
.lattice-auth-body .consumables-stock-section,
.lattice-auth-body .products-hero-section,
.lattice-auth-body .stock-hero-section,
.lattice-auth-body .revision-hero-section,
.lattice-auth-body .orders-hero-section,
.lattice-auth-body [class*="bg-white/5"],
.lattice-auth-body [class*="bg-stone-900/30"],
.lattice-auth-body [class*="bg-stone-900/40"],
.lattice-auth-body [class*="bg-stone-900/50"],
.lattice-auth-body [class*="bg-black/30"],
.lattice-auth-body [class*="bg-black/35"],
.lattice-auth-body [class*="bg-black/40"],
.lattice-auth-body [class*="bg-black/50"] {
    background: var(--lattice-panel) !important;
    border-color: var(--lattice-border) !important;
    box-shadow: none !important;
}

.lattice-auth-body .dashboard-panel-black,
.lattice-auth-body .dashboard-panel-black[class*="bg-white/5"] {
    background: #060708 !important;
    border-color: var(--lattice-border) !important;
}

.lattice-auth-body .orders-panel-graphite,
.lattice-auth-body .orders-panel-graphite[class*="bg-white/5"] {
    background: #15171c !important;
}

.lattice-auth-body [class*="rounded-"],
.lattice-auth-body .rounded,
.lattice-auth-body .rounded-full {
    border-radius: 2px !important;
}

.lattice-auth-body [class*="bg-gradient-to-r"] {
    background-image: none !important;
    background-color: var(--lattice-yellow) !important;
    color: #07080b !important;
}

.lattice-auth-body .status-chip {
    border-color: var(--lattice-border);
    background: rgba(255, 255, 255, 0.035) !important;
}

.lattice-auth-body .status-chip-success,
.lattice-auth-body [class*="text-emerald-"] {
    color: var(--lattice-green) !important;
}

.lattice-auth-body .status-chip-warning,
.lattice-auth-body [class*="text-amber-"] {
    color: var(--lattice-yellow) !important;
}

.lattice-auth-body .status-chip-info,
.lattice-auth-body [class*="text-sky-"] {
    color: var(--lattice-cyan) !important;
}

.lattice-auth-body .order-name-accent,
.lattice-auth-body .metric-card-alert .metric-value {
    color: var(--lattice-magenta) !important;
}

.lattice-auth-body .order-name-accent {
    color: var(--lattice-green) !important;
}

.lattice-auth-body .status-chip-success::before {
    background: var(--lattice-green) !important;
}

.lattice-auth-body .status-chip-warning::before {
    background: var(--lattice-yellow) !important;
}

.lattice-auth-body .status-chip-info::before {
    background: var(--lattice-cyan) !important;
}

.lattice-auth-body thead th,
.lattice-auth-body .stock-table-head,
.lattice-auth-body .revision-table-head,
.lattice-auth-body .consumables-table-head,
.lattice-auth-body .products-table-head,
.lattice-auth-body .orders-table-head {
    background: #101216 !important;
    border-color: var(--lattice-border) !important;
}

.lattice-auth-body tbody,
.lattice-auth-body tbody tr,
.lattice-auth-body tbody td,
.lattice-auth-body .stock-table-body,
.lattice-auth-body .stock-table-body tr,
.lattice-auth-body .stock-table-body td,
.lattice-auth-body .revision-table-body,
.lattice-auth-body .revision-table-body tr,
.lattice-auth-body .revision-table-body td,
.lattice-auth-body .consumables-table-body,
.lattice-auth-body .consumables-table-body tr,
.lattice-auth-body .consumables-table-body td,
.lattice-auth-body .products-table-body,
.lattice-auth-body .products-table-body tr,
.lattice-auth-body .products-table-body td {
    background: #07080b !important;
}

.lattice-auth-body tbody tr:hover,
.lattice-auth-body tbody tr:hover td,
.lattice-auth-body .products-table-body tr:hover,
.lattice-auth-body .products-table-body tr:hover td {
    background: #12151a !important;
}

.lattice-auth-body .orders-hero-section {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.lattice-auth-body .production-flow-hero-row {
    align-items: center !important;
}

.lattice-auth-body .production-flow-actions {
    flex-wrap: nowrap !important;
    justify-content: flex-end;
    min-width: max-content;
}

.lattice-auth-body .production-flow-action-button {
    flex: 0 0 auto;
    min-height: 3.25rem;
    white-space: nowrap;
}

@media (min-width: 1280px) {
    .lattice-auth-body .production-flow-hero-row {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) max-content;
        gap: 1.5rem !important;
    }
}

.lattice-auth-body .consumables-table-frame,
.lattice-auth-body .consumables-sticky-table,
.lattice-auth-body .consumables-sticky-table thead,
.lattice-auth-body .consumables-sticky-table tr,
.lattice-auth-body .consumables-sticky-table th {
    border-radius: 0 !important;
}

.lattice-auth-body .consumables-sticky-table thead th:first-child,
.lattice-auth-body .consumables-sticky-table thead th:last-child {
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    background-clip: border-box;
}

.lattice-auth-body input:not(:disabled),
.lattice-auth-body textarea:not(:disabled),
.lattice-auth-body select:not(:disabled),
.lattice-auth-body .table-product-search,
.lattice-auth-body .order-product-combobox-trigger,
.lattice-auth-body .order-product-search,
.lattice-auth-body .order-product-option,
.lattice-auth-body .order-quantity-button {
    background: #090b0f !important;
    border-color: var(--lattice-border) !important;
    color: #ffffff !important;
}

.lattice-auth-body input:not(:disabled):hover,
.lattice-auth-body textarea:not(:disabled):hover,
.lattice-auth-body select:not(:disabled):hover,
.lattice-auth-body input:not(:disabled):focus,
.lattice-auth-body textarea:not(:disabled):focus,
.lattice-auth-body select:not(:disabled):focus,
.lattice-auth-body .table-product-search:hover,
.lattice-auth-body .table-product-search:focus,
.lattice-auth-body .order-product-combobox-trigger:hover,
.lattice-auth-body .order-product-combobox-trigger:focus-visible,
.lattice-auth-body .order-product-search:hover,
.lattice-auth-body .order-product-search:focus,
.lattice-auth-body .order-product-option:hover,
.lattice-auth-body .order-product-option:focus-visible,
.lattice-auth-body .order-quantity-button:hover,
.lattice-auth-body .order-quantity-button:focus-visible {
    background: #11151b !important;
    border-color: var(--lattice-cyan) !important;
}

.lattice-auth-body .mobile-bottom-nav {
    background: rgba(7, 8, 11, 0.96) !important;
    border-color: var(--lattice-border) !important;
}

.lattice-auth-body .mobile-tab-active,
.lattice-auth-body .mobile-tab:hover,
.lattice-auth-body .mobile-tab:focus-visible {
    color: var(--lattice-cyan) !important;
}

.lattice-auth-body .mobile-tab-active .mobile-tab-icon,
.lattice-auth-body .mobile-sheet-link-active .mobile-sheet-link-icon {
    color: var(--lattice-cyan) !important;
}

.lattice-auth-body .mobile-more-panel {
    background: #111318 !important;
    border-color: var(--lattice-border) !important;
}

.lattice-auth-body .mobile-sheet-link {
    background: #0b0d11 !important;
    border-color: var(--lattice-border-soft) !important;
}

.lattice-auth-body .mobile-sheet-link:hover,
.lattice-auth-body .mobile-sheet-link:focus-visible,
.lattice-auth-body .mobile-sheet-link-active {
    background: #171a20 !important;
    border-color: var(--lattice-cyan) !important;
}

.lattice-auth-body .deadline-panel {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(119, 251, 253, 0.025)),
        #07080b !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
}

.lattice-auth-body .deadline-card {
    --deadline-accent: var(--lattice-cyan);
    --deadline-bg: rgba(119, 251, 253, 0.09);
    --deadline-border: rgba(119, 251, 253, 0.32);
    --deadline-muted: rgba(215, 226, 236, 0.68);
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, var(--deadline-bg), rgba(16, 18, 22, 0.92)),
        #101216 !important;
    border-color: var(--deadline-border) !important;
    border-left: 3px solid var(--deadline-accent) !important;
}

.lattice-auth-body .deadline-card:hover,
.lattice-auth-body .deadline-card:focus-visible {
    border-color: var(--deadline-accent) !important;
    background:
        linear-gradient(135deg, var(--deadline-bg), rgba(22, 25, 31, 0.95)),
        #14171d !important;
}

.lattice-auth-body .deadline-card-danger {
    --deadline-accent: var(--lattice-red);
    --deadline-bg: rgba(255, 62, 85, 0.13);
    --deadline-border: rgba(255, 62, 85, 0.46);
    --deadline-muted: rgba(255, 196, 205, 0.76);
}

.lattice-auth-body .deadline-card-warning {
    --deadline-accent: var(--lattice-yellow);
    --deadline-bg: rgba(255, 184, 46, 0.14);
    --deadline-border: rgba(255, 184, 46, 0.42);
    --deadline-muted: rgba(255, 228, 172, 0.76);
}

.lattice-auth-body .deadline-card-info {
    --deadline-accent: var(--lattice-cyan);
    --deadline-bg: rgba(119, 251, 253, 0.11);
    --deadline-border: rgba(119, 251, 253, 0.36);
    --deadline-muted: rgba(190, 249, 255, 0.76);
}

.lattice-auth-body .deadline-card .font-semibold,
.lattice-auth-body .deadline-card [class*="text-white"] {
    color: #ffffff !important;
}

.lattice-auth-body .deadline-card [class*="text-slate-"] {
    color: var(--deadline-muted) !important;
}

.lattice-auth-body .deadline-card .status-chip {
    color: var(--deadline-accent) !important;
    background: rgba(255, 255, 255, 0.055) !important;
    border-color: var(--deadline-border) !important;
}

.lattice-auth-body .deadline-card .status-chip::before {
    background: var(--deadline-accent) !important;
}

.lattice-auth-body .status-chip {
    min-height: 2rem;
    border-radius: 4px !important;
    padding: 0.46rem 0.72rem;
    font-size: 0.8rem !important;
    font-weight: 700;
    letter-spacing: 0.015em;
    line-height: 1;
    background: rgba(255, 255, 255, 0.045) !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
}

.lattice-auth-body .status-chip::before {
    width: 0.43rem;
    height: 0.43rem;
    flex: 0 0 auto;
}

.lattice-auth-body .status-chip-success {
    color: var(--lattice-green) !important;
    background: rgba(69, 224, 111, 0.11) !important;
    border-color: rgba(69, 224, 111, 0.28) !important;
}

.lattice-auth-body .status-chip-warning {
    color: var(--lattice-yellow) !important;
    background: rgba(255, 184, 46, 0.12) !important;
    border-color: rgba(255, 184, 46, 0.32) !important;
}

.lattice-auth-body .status-chip-danger {
    color: var(--lattice-red) !important;
    background: rgba(255, 62, 85, 0.12) !important;
    border-color: rgba(255, 62, 85, 0.34) !important;
}

.lattice-auth-body .status-chip-info {
    color: var(--lattice-cyan) !important;
    background: rgba(119, 251, 253, 0.1) !important;
    border-color: rgba(119, 251, 253, 0.26) !important;
}

.lattice-auth-body .status-chip-success::before {
    background: var(--lattice-green) !important;
}

.lattice-auth-body .status-chip-warning::before {
    background: var(--lattice-yellow) !important;
}

.lattice-auth-body .status-chip-danger::before {
    background: var(--lattice-red) !important;
}

.lattice-auth-body .status-chip-info::before {
    background: var(--lattice-cyan) !important;
}

.lattice-auth-body .deadline-card .status-chip {
    color: var(--deadline-accent) !important;
    background: rgba(255, 255, 255, 0.055) !important;
    border-color: var(--deadline-border) !important;
}

.lattice-auth-body .deadline-card .status-chip::before {
    background: var(--deadline-accent) !important;
}

.lattice-auth-body span[class*="rounded-full"][class*="bg-emerald-400/20"],
.lattice-auth-body span[class*="rounded-full"][class*="bg-amber-300/20"],
.lattice-auth-body span[class*="rounded-full"][class*="bg-sky-400/20"],
.lattice-auth-body span[class*="rounded-full"][class*="bg-slate-300/20"] {
    display: inline-flex;
    align-items: center;
    min-height: 1.9rem;
    border-radius: 4px !important;
    padding: 0.4rem 0.68rem !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.015em;
    line-height: 1;
}

.lattice-auth-body span[class*="rounded-full"][class*="bg-emerald-400/20"] {
    background: rgba(69, 224, 111, 0.11) !important;
    color: var(--lattice-green) !important;
}

.lattice-auth-body span[class*="rounded-full"][class*="bg-amber-300/20"] {
    background: rgba(255, 184, 46, 0.12) !important;
    color: var(--lattice-yellow) !important;
}

.lattice-auth-body span[class*="rounded-full"][class*="bg-sky-400/20"] {
    background: rgba(119, 251, 253, 0.1) !important;
    color: var(--lattice-cyan) !important;
}

.lattice-auth-body span[class*="rounded-full"][class*="bg-slate-300/20"] {
    background: rgba(167, 173, 184, 0.11) !important;
    color: var(--lattice-muted) !important;
}

.lattice-auth-body .page-content h1.font-display,
.lattice-auth-body .page-content h1 {
    font-size: 2rem !important;
    font-weight: 700;
    line-height: 1.08 !important;
    letter-spacing: 0;
}

.lattice-auth-body .page-content h2.font-display,
.lattice-auth-body .page-content h2 {
    font-size: 1.35rem !important;
    font-weight: 700;
    line-height: 1.12 !important;
    letter-spacing: 0;
}

.lattice-auth-body .page-content h3.font-display,
.lattice-auth-body .page-content h3 {
    font-size: 1.08rem !important;
    font-weight: 700;
    line-height: 1.2 !important;
    letter-spacing: 0;
}

.lattice-auth-body .dashboard-photo-hero h1 {
    font-size: clamp(3.25rem, 7vw, 8rem) !important;
    font-weight: 800;
    line-height: 0.92 !important;
}

.lattice-auth-body .warehouse-overview-section > .mb-5 h2,
.lattice-auth-body .dashboard-dark-panel > .mb-4 h2,
.lattice-auth-body .dashboard-dark-panel > .mb-5 h2 {
    font-size: 1.25rem !important;
    font-weight: 700;
    line-height: 1.15 !important;
    letter-spacing: 0;
}

.lattice-auth-body .warehouse-overview-card h3 {
    font-size: 1.08rem !important;
    font-weight: 700;
    line-height: 1.2 !important;
    letter-spacing: 0;
}

.lattice-auth-body .warehouse-overview-card .metric-value {
    font-size: 1.6rem !important;
    line-height: 1 !important;
}

.lattice-auth-body .warehouse-overview-card [class*="bg-black/"] p.font-semibold,
.lattice-auth-body .dashboard-order-card p.font-semibold,
.lattice-auth-body .dashboard-revision-card p.font-semibold,
.lattice-auth-body .dashboard-dark-panel .space-y-3 > div p.font-semibold {
    font-size: 0.98rem !important;
    line-height: 1.25 !important;
}

.lattice-auth-body a[class*="bg-gradient-to-r"],
.lattice-auth-body button[class*="bg-gradient-to-r"],
.lattice-auth-body label[class*="bg-gradient-to-r"],
.lattice-auth-body .phone-sticky-submit[class*="bg-gradient-to-r"] {
    background: var(--lattice-yellow) !important;
    border: 1px solid rgba(255, 214, 123, 0.86) !important;
    color: #07080b !important;
    -webkit-text-fill-color: #07080b;
    box-shadow: none !important;
}

.lattice-auth-body a[class*="bg-gradient-to-r"]::before,
.lattice-auth-body button[class*="bg-gradient-to-r"]::before,
.lattice-auth-body label[class*="bg-gradient-to-r"]::before,
.lattice-auth-body .phone-sticky-submit[class*="bg-gradient-to-r"]::before {
    content: none !important;
    display: none !important;
}

.lattice-auth-body a[class*="bg-gradient-to-r"]:hover,
.lattice-auth-body button[class*="bg-gradient-to-r"]:hover,
.lattice-auth-body label[class*="bg-gradient-to-r"]:hover,
.lattice-auth-body .phone-sticky-submit[class*="bg-gradient-to-r"]:hover,
.lattice-auth-body a[class*="bg-gradient-to-r"]:focus-visible,
.lattice-auth-body button[class*="bg-gradient-to-r"]:focus-visible,
.lattice-auth-body label[class*="bg-gradient-to-r"]:focus-visible,
.lattice-auth-body .phone-sticky-submit[class*="bg-gradient-to-r"]:focus-visible {
    background: #f0a915 !important;
    border-color: rgba(255, 230, 166, 0.98) !important;
    color: #050607 !important;
    -webkit-text-fill-color: #050607;
}

.lattice-auth-body a[class*="bg-gradient-to-r"]:active,
.lattice-auth-body button[class*="bg-gradient-to-r"]:active,
.lattice-auth-body label[class*="bg-gradient-to-r"]:active,
.lattice-auth-body .phone-sticky-submit[class*="bg-gradient-to-r"]:active {
    background: #d8930c !important;
    border-color: rgba(255, 209, 100, 0.92) !important;
    color: #050607 !important;
    -webkit-text-fill-color: #050607;
}

.lattice-auth-body .status-chip {
    gap: 0;
    justify-content: center;
    padding-left: 0.72rem;
}

.lattice-auth-body .status-chip::before {
    content: none !important;
    display: none !important;
}

.lattice-auth-body .deadline-card {
    border-left-width: 4px !important;
    border-left-style: solid !important;
    border-left-color: var(--deadline-accent) !important;
}

.lattice-auth-body .deadline-card .status-chip {
    gap: 0;
    padding-left: 0.72rem;
}

.lattice-auth-body .deadline-card .status-chip::before {
    content: none !important;
    display: none !important;
}

.lattice-auth-body .deadline-panel-count {
    gap: 0.58rem;
    justify-content: center;
    padding-left: 0.72rem;
    color: #f8f8f8 !important;
}

.lattice-auth-body .deadline-panel-count::before {
    content: "" !important;
    display: inline-block !important;
    width: 0.46rem;
    height: 0.46rem;
    flex: 0 0 auto;
    border-radius: 1px;
    background: var(--lattice-red) !important;
}

@media (max-width: 1279px) and (min-width: 1024px) {
    .lattice-auth-body .app-shell:not(.app-shell-login) {
        padding-left: calc(56px + 1.1rem) !important;
        padding-right: 1.1rem !important;
    }

    .lattice-auth-body.lattice-sidebar-open .app-shell:not(.app-shell-login) {
        padding-left: calc(300px + 1.1rem) !important;
    }

    .lattice-sidebar {
        width: 56px;
    }

    .lattice-auth-body.lattice-sidebar-open .lattice-sidebar {
        width: 300px !important;
    }

    .lattice-menu {
        width: 244px;
    }
}

@media (max-width: 1023px) {
    .lattice-auth-body .app-shell:not(.app-shell-login) {
        padding-left: max(1rem, env(safe-area-inset-left)) !important;
        padding-right: max(1rem, env(safe-area-inset-right)) !important;
        padding-top: 1rem !important;
        padding-bottom: 6.5rem !important;
    }

    .lattice-auth-body.lattice-sidebar-open .app-shell:not(.app-shell-login) {
        padding-left: max(1rem, env(safe-area-inset-left)) !important;
        padding-right: max(1rem, env(safe-area-inset-right)) !important;
    }

    .lattice-auth-body .app-page-hero-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .lattice-sidebar.hidden {
        display: flex !important;
        width: 56px;
    }

    .lattice-auth-body.lattice-sidebar-open .lattice-sidebar.hidden {
        width: 280px !important;
    }

    .lattice-sidebar .lattice-menu {
        width: 224px;
    }

    .lattice-auth-body .app-shell:not(.app-shell-login) {
        padding-left: calc(56px + 1rem) !important;
        padding-right: 1rem !important;
        padding-bottom: 2rem !important;
    }

    .lattice-auth-body.lattice-sidebar-open .app-shell:not(.app-shell-login) {
        padding-left: calc(280px + 1rem) !important;
    }

    .lattice-auth-body .mobile-bottom-nav,
    .lattice-auth-body .mobile-more-panel,
    .lattice-auth-body .mobile-nav-backdrop {
        display: none !important;
    }
}

/* Phone-first command layout, tuned for iPhone Pro Max widths. */
@media (max-width: 1023px) and (pointer: coarse) {
    .lattice-auth-body .lattice-sidebar.hidden {
        display: none !important;
    }

    .lattice-auth-body .mobile-bottom-nav {
        display: grid !important;
    }

    .lattice-auth-body .mobile-more-panel:not(.hidden),
    .lattice-auth-body .mobile-nav-backdrop:not(.hidden) {
        display: block !important;
    }

    .lattice-auth-body .app-shell:not(.app-shell-login),
    .lattice-auth-body.lattice-sidebar-open .app-shell:not(.app-shell-login) {
        padding-left: max(0.9rem, env(safe-area-inset-left)) !important;
        padding-right: max(0.9rem, env(safe-area-inset-right)) !important;
        padding-bottom: calc(7rem + env(safe-area-inset-bottom)) !important;
    }
}

@media (max-width: 932px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .lattice-auth-body {
        background: #050608;
    }

    .lattice-auth-body::before {
        background-size: 3.2rem 3.2rem;
        opacity: 0.28;
    }

    .lattice-auth-body .app-shell:not(.app-shell-login) {
        width: 100%;
        max-width: 100vw !important;
        padding-top: max(0.85rem, env(safe-area-inset-top)) !important;
        padding-left: max(0.9rem, env(safe-area-inset-left)) !important;
        padding-right: max(0.9rem, env(safe-area-inset-right)) !important;
        padding-bottom: calc(7rem + env(safe-area-inset-bottom)) !important;
    }

    .lattice-auth-body .page-content {
        width: 100%;
        min-width: 0;
        padding-bottom: calc(1.35rem + env(safe-area-inset-bottom));
    }

    .lattice-auth-body .page-content > *,
    .lattice-auth-body .page-content section,
    .lattice-auth-body .page-content form,
    .lattice-auth-body .page-content article,
    .lattice-auth-body .page-content div {
        min-width: 0;
    }

    .lattice-auth-body .app-page-hero,
    .lattice-auth-body .stock-hero-section,
    .lattice-auth-body .production-flow-hero,
    .lattice-auth-body .dashboard-dark-panel,
    .lattice-auth-body .orders-panel,
    .lattice-auth-body .products-hero-section,
    .lattice-auth-body .revision-hero-section,
    .lattice-auth-body .consumables-stock-section {
        padding: 0.95rem !important;
        border-radius: 2px !important;
        background: #0a0b0f !important;
        border-color: var(--lattice-border) !important;
    }

    .lattice-auth-body .app-page-hero-grid,
    .lattice-auth-body .production-flow-hero-row {
        grid-template-columns: 1fr !important;
        gap: 0.85rem !important;
    }

    .lattice-auth-body .page-content h1,
    .lattice-auth-body .page-content h1.font-display {
        max-width: 100%;
        font-size: clamp(1.45rem, 7.4vw, 2rem) !important;
        line-height: 1.08 !important;
        overflow-wrap: anywhere;
    }

    .lattice-auth-body .page-content h2,
    .lattice-auth-body .page-content h2.font-display {
        font-size: clamp(1.18rem, 5vw, 1.45rem) !important;
        line-height: 1.14 !important;
    }

    .lattice-auth-body .page-content h3,
    .lattice-auth-body .page-content h3.font-display {
        font-size: 1.02rem !important;
        line-height: 1.18 !important;
    }

    .lattice-auth-body .dashboard-photo-hero {
        min-height: min(62dvh, 27rem) !important;
        margin-bottom: 1rem !important;
        padding: 1rem !important;
        background:
            linear-gradient(90deg, rgba(5, 6, 8, 0.98) 0%, rgba(5, 6, 8, 0.78) 58%, rgba(5, 6, 8, 0.34) 100%),
            linear-gradient(180deg, rgba(5, 6, 8, 0.1) 0%, rgba(5, 6, 8, 0.24) 48%, rgba(5, 6, 8, 0.92) 100%),
            url("../images/anduril-operations-hero.png") 64% center / cover no-repeat !important;
    }

    .lattice-auth-body .dashboard-photo-hero .app-page-kicker {
        top: 1rem;
        left: 1rem;
    }

    .lattice-auth-body .dashboard-photo-hero h1 {
        max-width: 10ch;
        font-size: clamp(2.1rem, 12vw, 4.2rem) !important;
        line-height: 0.96 !important;
    }

    .lattice-auth-body .dashboard-photo-hero p:last-child {
        max-width: 25rem;
        font-size: 0.92rem;
        line-height: 1.28;
    }

    .lattice-auth-body input:not([type="checkbox"]):not([type="radio"]),
    .lattice-auth-body select,
    .lattice-auth-body textarea,
    .lattice-auth-body .table-product-search,
    .lattice-auth-body .stock-flow-quantity-input {
        min-height: 2.9rem;
        max-width: 100%;
        font-size: 16px !important;
        border-radius: 4px !important;
    }

    .lattice-auth-body .stock-toolbar,
    .lattice-auth-body .stock-filter-form,
    .lattice-auth-body .orders-filter-actions,
    .lattice-auth-body .production-flow-actions {
        display: grid !important;
        grid-template-columns: 1fr !important;
        width: 100%;
        gap: 0.7rem !important;
        min-width: 0 !important;
    }

    .lattice-auth-body .stock-primary-action,
    .lattice-auth-body .stock-secondary-action,
    .lattice-auth-body .production-flow-action-button,
    .lattice-auth-body .phone-sticky-submit {
        width: 100%;
        min-height: 2.95rem;
        justify-content: center;
        border-radius: 4px !important;
        white-space: normal;
        text-align: center;
    }

    .lattice-auth-body .phone-action-stack {
        display: grid !important;
        grid-template-columns: 1fr !important;
        width: 100%;
        gap: 0.62rem !important;
    }

    .lattice-auth-body .phone-action-stack > *,
    .lattice-auth-body .phone-action-stack form,
    .lattice-auth-body .phone-action-stack a,
    .lattice-auth-body .phone-action-stack button {
        width: 100%;
        min-width: 0;
    }

    .lattice-auth-body .phone-action-stack a,
    .lattice-auth-body .phone-action-stack button {
        min-height: 2.8rem;
        justify-content: center;
        white-space: normal;
    }

    .lattice-auth-body .mobile-bottom-nav {
        left: max(0.6rem, env(safe-area-inset-left)) !important;
        right: max(0.6rem, env(safe-area-inset-right)) !important;
        bottom: max(0.45rem, env(safe-area-inset-bottom)) !important;
        max-width: min(29rem, calc(100vw - 1.2rem)) !important;
        padding: 0.45rem !important;
        border-radius: 4px !important;
        background: rgba(7, 8, 11, 0.98) !important;
        border-color: var(--lattice-border) !important;
    }

    .lattice-auth-body .mobile-tab {
        min-height: 3.75rem;
        padding: 0.42rem 0.2rem;
        border-radius: 3px !important;
    }

    .lattice-auth-body .mobile-tab-icon {
        width: 1.32rem;
        height: 1.32rem;
    }

    .lattice-auth-body .mobile-tab-label {
        max-width: 100%;
        font-size: 0.66rem;
        line-height: 1.08;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .lattice-auth-body .mobile-more-panel {
        left: max(0.6rem, env(safe-area-inset-left)) !important;
        right: max(0.6rem, env(safe-area-inset-right)) !important;
        bottom: calc(5.45rem + env(safe-area-inset-bottom)) !important;
        max-width: min(29rem, calc(100vw - 1.2rem)) !important;
        max-height: min(76dvh, 42rem);
        overflow-y: auto;
        padding: 0.85rem 0.85rem calc(0.95rem + env(safe-area-inset-bottom)) !important;
        border-radius: 4px !important;
        background: #111318 !important;
        border-color: var(--lattice-border) !important;
    }

    .lattice-auth-body .mobile-sheet-link,
    .lattice-auth-body .mobile-more-close {
        border-radius: 3px !important;
    }
}

@media (max-width: 480px) {
    .lattice-auth-body .app-shell:not(.app-shell-login) {
        padding-left: max(0.75rem, env(safe-area-inset-left)) !important;
        padding-right: max(0.75rem, env(safe-area-inset-right)) !important;
    }

    .lattice-auth-body .page-content h1,
    .lattice-auth-body .page-content h1.font-display {
        font-size: clamp(1.36rem, 8vw, 1.86rem) !important;
    }

    .lattice-auth-body .page-content p,
    .lattice-auth-body .page-content li,
    .lattice-auth-body .page-content td {
        overflow-wrap: anywhere;
    }

    .lattice-auth-body .phone-card-table tbody {
        gap: 0.72rem;
    }

    .lattice-auth-body .phone-card-table tr {
        border-color: var(--lattice-border) !important;
        border-radius: 4px !important;
        background: #07080b !important;
        padding: 0.78rem !important;
    }

    .lattice-auth-body .phone-card-table td {
        gap: 0.7rem;
        min-width: 0;
        color: var(--lattice-text);
        background: transparent !important;
        text-align: right;
    }

    .lattice-auth-body .phone-card-table td::before {
        flex: 0 0 42%;
        max-width: 42%;
        color: var(--lattice-muted);
        font-size: 0.68rem;
        line-height: 1.25;
        letter-spacing: 0.04em;
        overflow-wrap: anywhere;
    }

    .lattice-auth-body .phone-card-table td[data-card-title="true"],
    .lattice-auth-body .phone-card-table td[data-card-actions="true"],
    .lattice-auth-body .phone-card-table td[data-card-full="true"],
    .lattice-auth-body .phone-card-table td[colspan] {
        text-align: left;
    }

    .lattice-auth-body .stock-table-frame {
        margin-left: calc(-1 * max(0.75rem, env(safe-area-inset-left)));
        margin-right: calc(-1 * max(0.75rem, env(safe-area-inset-right)));
        border-left: 0 !important;
        border-right: 0 !important;
        border-radius: 0 !important;
        overflow: visible;
    }

    .lattice-auth-body .stock-table-shell.phone-table-shell {
        overflow-x: auto !important;
        overflow-y: visible !important;
        padding-left: max(0.75rem, env(safe-area-inset-left));
        padding-right: max(0.75rem, env(safe-area-inset-right));
        scrollbar-width: thin;
    }

    .lattice-auth-body .stock-sticky-table {
        min-width: 58rem !important;
        width: max-content !important;
        border-collapse: separate;
        border-spacing: 0;
    }

    .lattice-auth-body .stock-sticky-table thead th {
        top: 0;
        padding: 0.78rem 0.82rem !important;
        background: #101216 !important;
        white-space: nowrap;
    }

    .lattice-auth-body .stock-sticky-table tbody,
    .lattice-auth-body .stock-sticky-table tr,
    .lattice-auth-body .stock-sticky-table td {
        background: #07080b !important;
    }

    .lattice-auth-body .stock-sticky-table td {
        padding: 0.82rem !important;
        white-space: nowrap !important;
    }

    .lattice-auth-body .stock-sticky-table td[data-card-title="true"] {
        min-width: 15.5rem;
        max-width: 19rem;
        white-space: normal !important;
    }

    .lattice-auth-body .stock-sticky-table th:first-child,
    .lattice-auth-body .stock-sticky-table td:first-child:not([colspan]) {
        position: sticky;
        left: 0;
        z-index: 20;
        background: #07080b !important;
        box-shadow: inset -1px 0 0 var(--lattice-border);
    }

    .lattice-auth-body .stock-sticky-table thead th:first-child {
        z-index: 24;
        background: #101216 !important;
    }

    .lattice-auth-body .stock-sticky-table tr[data-stock-product-row]:hover td,
    .lattice-auth-body .stock-sticky-table tr.stock-flow-row-active td {
        background: #12151a !important;
    }

    .lattice-auth-body .stock-sticky-table tr[data-stock-product-row]:hover td:first-child,
    .lattice-auth-body .stock-sticky-table tr.stock-flow-row-active td:first-child {
        background: #12151a !important;
    }

    .lattice-auth-body .stock-sticky-table td[data-card-full="true"] {
        white-space: normal !important;
    }

    .lattice-auth-body .stock-flow-panel {
        position: sticky;
        left: max(0.75rem, env(safe-area-inset-left));
        width: min(100%, calc(100vw - 1.5rem));
        max-width: calc(100vw - 1.5rem);
        grid-template-columns: 1fr !important;
        align-items: stretch;
        gap: 0.72rem;
        padding: 0.82rem;
        border-radius: 4px !important;
        background: #0b0d11 !important;
        border-color: var(--lattice-border) !important;
    }

    .lattice-auth-body .stock-flow-actions {
        grid-template-columns: 1fr !important;
        gap: 0.58rem;
    }

    .lattice-auth-body .stock-flow-button {
        min-height: 2.9rem;
        border-radius: 4px !important;
        white-space: normal;
    }

    .lattice-auth-body .stock-flow-label {
        overflow-wrap: anywhere;
    }

    .lattice-auth-body .phone-sticky-submit {
        position: static;
        margin-top: 0.2rem;
    }
}

/* Final interaction pass: remove legacy warm hover panels across authenticated pages. */
.lattice-auth-body {
    --lattice-card-hover: #12151a;
    --lattice-card-active: #171a20;
}

.lattice-auth-body .dashboard-revision-card:hover,
.lattice-auth-body .dashboard-revision-card:focus,
.lattice-auth-body .dashboard-revision-card:focus-visible,
.lattice-auth-body .dashboard-order-card:hover,
.lattice-auth-body .dashboard-order-card:focus,
.lattice-auth-body .dashboard-order-card:focus-visible,
.lattice-auth-body article.revision-card:hover,
.lattice-auth-body article.revision-card:focus,
.lattice-auth-body article.revision-card:focus-within,
.lattice-auth-body article.order-card:hover,
.lattice-auth-body article.order-card:focus-within,
.lattice-auth-body .monthly-plan-card:hover,
.lattice-auth-body .monthly-plan-card:focus-visible,
.lattice-auth-body .warehouse-overview-card:hover,
.lattice-auth-body .warehouse-overview-card:focus-within,
.lattice-auth-body a[class*="bg-white/5"]:hover,
.lattice-auth-body a[class*="bg-white/5"]:focus-visible,
.lattice-auth-body a[class*="bg-stone-900/30"]:hover,
.lattice-auth-body a[class*="bg-stone-900/30"]:focus-visible,
.lattice-auth-body article[class*="bg-white/5"]:hover,
.lattice-auth-body article[class*="bg-white/5"]:focus-within,
.lattice-auth-body article[class*="bg-stone-900/30"]:hover,
.lattice-auth-body article[class*="bg-stone-900/30"]:focus-within,
.lattice-auth-body [class*="hover:bg-white/10"]:hover,
.lattice-auth-body [class*="hover:bg-black/40"]:hover,
.lattice-auth-body [class*="hover:bg-black/50"]:hover {
    background: var(--lattice-card-hover) !important;
    border-color: var(--lattice-border) !important;
    box-shadow: none !important;
    outline: none !important;
    transform: none !important;
}

.lattice-auth-body .dashboard-revision-card:focus-visible,
.lattice-auth-body .dashboard-order-card:focus-visible,
.lattice-auth-body article.revision-card:focus-within,
.lattice-auth-body article.order-card:focus-within,
.lattice-auth-body a[class*="hover:border-white/20"]:focus-visible {
    border-color: var(--lattice-cyan) !important;
}

.lattice-auth-body [class*="hover:border-white/20"]:hover,
.lattice-auth-body [class*="hover:border-orange-300/30"]:hover {
    border-color: var(--lattice-border) !important;
}

.lattice-auth-body .profile-panel,
.lattice-auth-body .profile-session-card,
.lattice-auth-body .profile-page [class*="bg-[#1F1E1D]"],
.lattice-auth-body .profile-page [class*="bg-black/25"] {
    background: #0b0d11 !important;
    border: 1px solid var(--lattice-border) !important;
    border-radius: 4px !important;
    box-shadow: none !important;
}

.lattice-auth-body .profile-session-card {
    background: #07080b !important;
}

.lattice-auth-body .profile-panel:hover,
.lattice-auth-body .profile-session-card:hover {
    background: #0f1217 !important;
    border-color: var(--lattice-border) !important;
}

.lattice-auth-body .profile-page input[type="file"] {
    width: 100%;
    min-height: 2.9rem;
    padding: 0.62rem;
    border: 1px solid var(--lattice-border);
    border-radius: 4px;
    background: #090b0f;
    color: var(--lattice-text);
}

.lattice-auth-body .profile-page input[type="file"]::file-selector-button {
    min-height: 2.2rem;
    margin-right: 0.75rem;
    border: 1px solid var(--lattice-border);
    border-radius: 3px;
    background: #171a20;
    color: var(--lattice-text);
    font-weight: 700;
}

/* Navigation and table polish pass. */
.lattice-auth-body .lattice-sidebar {
    background: #07080b !important;
    border-right: 1px solid var(--lattice-border) !important;
    box-shadow: none !important;
}

.lattice-auth-body .lattice-rail,
.lattice-auth-body .lattice-menu {
    background: transparent !important;
    border-right: 0 !important;
    box-shadow: none !important;
}

.lattice-auth-body .lattice-menu-list {
    padding-right: 0.55rem;
}

.lattice-auth-body .lattice-menu-item,
.lattice-auth-body .lattice-profile-card {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.lattice-auth-body .lattice-menu-item:hover,
.lattice-auth-body .lattice-menu-item:focus-visible,
.lattice-auth-body .lattice-menu-item.lattice-active,
.lattice-auth-body .lattice-profile-card:hover,
.lattice-auth-body .lattice-profile-card:focus-visible,
.lattice-auth-body .lattice-profile-card.lattice-active {
    background: transparent !important;
    border-color: transparent !important;
    color: var(--item-accent, var(--lattice-cyan)) !important;
    box-shadow: none !important;
}

.lattice-auth-body .lattice-profile-card.lattice-active::before {
    content: none !important;
    display: none !important;
}

.lattice-auth-body .lattice-profile-card {
    margin-right: 0.55rem;
}

.lattice-auth-body .consumables-stock-section {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.lattice-auth-body .stock-sticky-table thead th,
.lattice-auth-body .consumables-sticky-table thead th {
    top: 0 !important;
}

@media (min-width: 1280px) {
    .lattice-auth-body.lattice-sidebar-open .lattice-sidebar {
        width: 300px !important;
    }

    .lattice-auth-body.lattice-sidebar-open .app-shell:not(.app-shell-login) {
        padding-left: calc(300px + 1.5rem) !important;
    }

    .lattice-auth-body .lattice-menu {
        width: 244px !important;
    }
}

@media (min-width: 1024px) and (max-width: 1279px) {
    .lattice-auth-body .lattice-sidebar,
    .lattice-auth-body.lattice-sidebar-open .lattice-sidebar {
        display: flex !important;
        width: 56px !important;
    }

    .lattice-auth-body .lattice-menu,
    .lattice-auth-body.lattice-sidebar-open .lattice-menu,
    .lattice-auth-body #lattice-menu-panel[aria-hidden="false"] {
        opacity: 0 !important;
        pointer-events: none !important;
        transform: translateX(-0.75rem) !important;
    }

    .lattice-auth-body .app-shell:not(.app-shell-login),
    .lattice-auth-body.lattice-sidebar-open .app-shell:not(.app-shell-login) {
        padding-left: calc(56px + 1.1rem) !important;
        padding-right: 1.1rem !important;
    }
}

@media (max-width: 1023px) {
    .lattice-auth-body .lattice-sidebar,
    .lattice-auth-body .lattice-sidebar.hidden {
        display: none !important;
    }

    .lattice-auth-body .app-shell:not(.app-shell-login),
    .lattice-auth-body.lattice-sidebar-open .app-shell:not(.app-shell-login) {
        padding-left: max(1rem, env(safe-area-inset-left)) !important;
        padding-right: max(1rem, env(safe-area-inset-right)) !important;
        padding-top: 1rem !important;
        padding-bottom: calc(7rem + env(safe-area-inset-bottom)) !important;
    }

    .lattice-auth-body .mobile-bottom-nav {
        display: grid !important;
    }

    .lattice-auth-body .mobile-more-panel.hidden,
    .lattice-auth-body .mobile-nav-backdrop.hidden {
        display: none !important;
    }

    .lattice-auth-body .mobile-more-panel:not(.hidden),
    .lattice-auth-body .mobile-nav-backdrop:not(.hidden) {
        display: block !important;
    }
}

/* Restore deadline cards and center the public login form. */
.lattice-auth-body .deadline-card {
    background:
        linear-gradient(135deg, var(--deadline-bg), rgba(16, 18, 22, 0.92)),
        #101216 !important;
    border-color: var(--deadline-border) !important;
    border-left-color: var(--deadline-accent) !important;
    box-shadow: none !important;
}

.lattice-auth-body .deadline-card:hover,
.lattice-auth-body .deadline-card:focus-visible {
    background:
        linear-gradient(135deg, var(--deadline-bg), rgba(22, 25, 31, 0.95)),
        #14171d !important;
    border-color: var(--deadline-accent) !important;
    border-left-color: var(--deadline-accent) !important;
    box-shadow: none !important;
    outline: none !important;
    transform: none !important;
}

.app-shell-login {
    width: 100vw !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.page-content-login {
    display: grid !important;
    width: 100vw !important;
    min-height: 100dvh !important;
    place-items: center !important;
    padding: 0 !important;
}

.page-content-login > section {
    display: block !important;
    width: min(100vw, 432px) !important;
    min-height: auto !important;
    margin: 0 auto !important;
    padding: 0 max(1rem, env(safe-area-inset-left)) !important;
}

.page-content-login > section > div {
    width: 100% !important;
    max-width: 400px !important;
    margin: 0 auto !important;
}

.page-content-login .login-brand {
    width: 100%;
    text-align: center;
}

/* Keep the large warehouse overview panels visually stable on hover. */
.lattice-auth-body .warehouse-overview-card:hover,
.lattice-auth-body .warehouse-overview-card:focus,
.lattice-auth-body .warehouse-overview-card:focus-within,
.lattice-auth-body .warehouse-overview-card:focus-visible {
    background: var(--lattice-panel) !important;
    border-color: var(--lattice-border) !important;
    box-shadow: none !important;
    outline: none !important;
    transform: none !important;
}

/* Keep expanded desktop navigation separated from page content. */
@media (min-width: 1280px) {
    .lattice-auth-body.lattice-sidebar-open .lattice-sidebar {
        width: 324px !important;
    }

    .lattice-auth-body.lattice-sidebar-open .app-shell:not(.app-shell-login) {
        padding-left: calc(324px + 2.75rem) !important;
    }

    .lattice-auth-body.lattice-sidebar-open .lattice-rail {
        width: 324px !important;
        min-width: 324px !important;
        align-items: stretch !important;
        padding-right: 0.55rem !important;
    }

    .lattice-auth-body.lattice-sidebar-open .lattice-menu {
        display: none !important;
    }

    .lattice-auth-body.lattice-sidebar-open .lattice-rail-nav {
        width: 100%;
    }

    .lattice-auth-body.lattice-sidebar-open .lattice-rail-button {
        width: calc(100% - 0.9rem) !important;
        justify-content: flex-start;
        gap: 1.35rem;
        margin-left: 0.45rem;
        margin-right: 0.45rem;
        padding: 0 0.95rem 0 0.84rem;
    }

    .lattice-auth-body.lattice-sidebar-open .lattice-rail-button .material-symbols-rounded {
        flex: 0 0 1.35rem;
    }

    .lattice-auth-body.lattice-sidebar-open .lattice-rail-label {
        display: inline-block;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: inherit;
        font-size: 0.92rem;
        font-weight: 650;
        line-height: 1;
    }
}

/* Clean mobile navigation states. */
@media (max-width: 1023px) {
    .lattice-auth-body .mobile-bottom-nav {
        background: rgba(7, 8, 11, 0.98) !important;
        border-color: var(--lattice-border) !important;
    }

    .lattice-auth-body .mobile-tab,
    .lattice-auth-body .mobile-tab:hover,
    .lattice-auth-body .mobile-tab:focus-visible {
        background: transparent !important;
        color: #9aa1ad !important;
        box-shadow: none !important;
    }

    .lattice-auth-body .mobile-tab-icon,
    .lattice-auth-body .mobile-tab-icon[style],
    .lattice-auth-body .mobile-tab .mobile-tab-icon {
        color: #9aa1ad !important;
    }

    .lattice-auth-body .mobile-tab-active,
    .lattice-auth-body .mobile-tab-active:hover,
    .lattice-auth-body .mobile-tab-active:focus-visible {
        color: #ffffff !important;
    }

    .lattice-auth-body .mobile-tab-active .mobile-tab-icon,
    .lattice-auth-body .mobile-tab-active .mobile-tab-icon[style],
    .lattice-auth-body .mobile-tab-active svg,
    .lattice-auth-body .mobile-tab-active svg[style] {
        color: #ffffff !important;
    }

    .lattice-auth-body .mobile-tab-active .mobile-tab-label {
        color: #ffffff !important;
        text-decoration: none !important;
    }

    .lattice-auth-body .mobile-more-panel {
        background: #090b0f !important;
        border-color: var(--lattice-border) !important;
        border-radius: 4px !important;
        padding: 0.82rem 0.82rem calc(0.9rem + env(safe-area-inset-bottom)) !important;
    }

    .lattice-auth-body .mobile-more-panel-header {
        align-items: center;
        gap: 0.85rem;
        margin-bottom: 0.75rem;
    }

    .lattice-auth-body .mobile-more-panel-header p {
        color: var(--lattice-muted) !important;
        font-size: 0.68rem !important;
        letter-spacing: 0.16em !important;
    }

    .lattice-auth-body .mobile-more-panel-header h2 {
        margin-top: 0.35rem !important;
        font-size: clamp(1.22rem, 6vw, 1.55rem) !important;
        line-height: 1.08 !important;
    }

    .lattice-auth-body .mobile-more-close {
        width: 2.65rem;
        height: 2.65rem;
        border-radius: 4px !important;
        background: #0d1015 !important;
        border-color: var(--lattice-border) !important;
        color: #ffffff !important;
    }

    .lattice-auth-body .mobile-more-links {
        gap: 0.55rem;
    }

    .lattice-auth-body .mobile-sheet-link,
    .lattice-auth-body .mobile-sheet-link:hover,
    .lattice-auth-body .mobile-sheet-link:focus-visible,
    .lattice-auth-body .mobile-sheet-link-active {
        border-radius: 4px !important;
        box-shadow: none !important;
        transform: none !important;
    }

    .lattice-auth-body .mobile-sheet-link {
        padding: 0.82rem 0.9rem !important;
        background: #0b0d11 !important;
        border-color: rgba(255, 255, 255, 0.1) !important;
        color: var(--lattice-text) !important;
    }

    .lattice-auth-body .mobile-sheet-link:hover,
    .lattice-auth-body .mobile-sheet-link:focus-visible {
        background: #11151b !important;
        border-color: rgba(255, 255, 255, 0.18) !important;
    }

    .lattice-auth-body .mobile-sheet-link-active {
        background: #11151b !important;
        border-color: rgba(255, 255, 255, 0.24) !important;
    }

    .lattice-auth-body .mobile-sheet-link-row {
        gap: 0.78rem;
    }

    .lattice-auth-body .mobile-sheet-link-icon,
    .lattice-auth-body .mobile-sheet-link-icon[style] {
        color: #9aa1ad !important;
        font-size: 1.22rem !important;
    }

    .lattice-auth-body .mobile-sheet-link-title {
        color: #f2f4f7 !important;
        font-size: 0.98rem !important;
        line-height: 1.16 !important;
    }

    .lattice-auth-body .mobile-sheet-link-meta {
        color: #8a8f9a !important;
        font-size: 0.78rem !important;
        line-height: 1.25 !important;
    }

    .lattice-auth-body .mobile-sheet-link-active .mobile-sheet-link-icon,
    .lattice-auth-body .mobile-sheet-link-active .mobile-sheet-link-icon[style],
    .lattice-auth-body .mobile-sheet-link-active .mobile-sheet-link-title {
        color: #ffffff !important;
    }
}

/* Mobile stock overview: turn the wide production table into daily-use cards. */
@media (max-width: 767px) {
    .lattice-auth-body .stock-hero-section {
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .lattice-auth-body .stock-hero-section > div:first-child {
        padding: 0.1rem 0.05rem 0;
    }

    .lattice-auth-body .stock-hero-section h1 {
        font-size: clamp(1.55rem, 7vw, 1.95rem) !important;
        line-height: 1.08 !important;
    }

    .lattice-auth-body .stock-hero-section p {
        max-width: 32rem;
        color: #a7adb8 !important;
        font-size: 0.86rem;
        line-height: 1.35;
        white-space: normal !important;
        overflow-wrap: anywhere;
    }

    .lattice-auth-body .stock-toolbar,
    .lattice-auth-body .stock-filter-form {
        gap: 0.65rem !important;
    }

    .lattice-auth-body .stock-filter-field label,
    .lattice-auth-body .stock-hero-section label {
        color: #a7adb8 !important;
        font-size: 0.78rem !important;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .lattice-auth-body .stock-save-bar {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 0.7rem !important;
        margin-top: 1rem !important;
        padding: 0.78rem;
        border: 1px solid var(--lattice-border);
        border-radius: 4px;
        background: #0b0d11;
    }

    .lattice-auth-body .stock-save-note {
        margin: 0 !important;
        color: #a7adb8 !important;
        font-size: 0.82rem !important;
        line-height: 1.3;
    }

    .lattice-auth-body .stock-save-bar .phone-sticky-submit {
        width: 100%;
        min-height: 2.85rem;
        border-radius: 4px !important;
    }

    .lattice-auth-body #stock-product-search {
        min-height: 3rem;
        border-radius: 4px !important;
        background: #07080b !important;
        border-color: var(--lattice-border) !important;
    }

    .lattice-auth-body .stock-table-frame {
        margin: 1rem 0 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        overflow: visible !important;
    }

    .lattice-auth-body .stock-table-shell.phone-table-shell {
        overflow: visible !important;
        padding: 0 !important;
    }

    .lattice-auth-body .stock-sticky-table {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        border: 0 !important;
        border-collapse: separate !important;
        border-spacing: 0 !important;
    }

    .lattice-auth-body .stock-sticky-table thead {
        display: none !important;
    }

    .lattice-auth-body .stock-sticky-table tbody {
        display: grid !important;
        gap: 0.72rem;
        width: 100%;
        background: transparent !important;
    }

    .lattice-auth-body .stock-sticky-table tr[data-stock-product-row] {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.55rem;
        width: 100%;
        padding: 0.78rem !important;
        border: 1px solid var(--lattice-border) !important;
        border-radius: 4px !important;
        background: #07080b !important;
        box-shadow: none !important;
    }

    .lattice-auth-body .stock-sticky-table tr[data-stock-product-row]:hover,
    .lattice-auth-body .stock-sticky-table tr[data-stock-product-row]:focus-visible,
    .lattice-auth-body .stock-sticky-table tr.stock-flow-row-active {
        background: #07080b !important;
        border-color: rgba(119, 251, 253, 0.34) !important;
        outline: none !important;
    }

    .lattice-auth-body .stock-sticky-table tr[data-stock-action-row][hidden] {
        display: none !important;
    }

    .lattice-auth-body .stock-sticky-table tr[data-stock-action-row] {
        display: block !important;
        width: 100%;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
    }

    .lattice-auth-body .stock-sticky-table td,
    .lattice-auth-body .stock-sticky-table td:first-child:not([colspan]) {
        position: static !important;
        left: auto !important;
        z-index: auto !important;
        display: flex !important;
        min-width: 0 !important;
        width: 100% !important;
        padding: 0.58rem 0.62rem !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        border-radius: 4px !important;
        background: #0d1015 !important;
        box-shadow: none !important;
        color: #f2f4f7;
        text-align: left !important;
        white-space: normal !important;
    }

    .lattice-auth-body .stock-sticky-table td:not([data-card-title="true"]):not([data-card-full="true"]) {
        min-height: 3.35rem;
        flex-direction: column;
        align-items: flex-start;
        justify-content: space-between;
        gap: 0.24rem;
        font-size: 1rem;
        font-weight: 750;
        line-height: 1.1;
    }

    .lattice-auth-body .stock-sticky-table td::before {
        display: block !important;
        content: attr(data-label) !important;
        flex: none !important;
        max-width: 100% !important;
        color: #8e95a3 !important;
        font-size: 0.63rem !important;
        font-weight: 750 !important;
        line-height: 1.15 !important;
        letter-spacing: 0.08em !important;
        text-align: left !important;
        text-transform: uppercase;
    }

    .lattice-auth-body .stock-sticky-table td[data-card-title="true"] {
        grid-column: 1 / -1;
        display: block !important;
        min-width: 0 !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 0 0.68rem !important;
        border: 0 !important;
        border-bottom: 1px solid var(--lattice-border) !important;
        border-radius: 0 !important;
        background: transparent !important;
    }

    .lattice-auth-body .stock-sticky-table td[data-card-title="true"]::before,
    .lattice-auth-body .stock-sticky-table td[data-card-full="true"]::before,
    .lattice-auth-body .stock-sticky-table td[colspan]::before {
        display: none !important;
        content: none !important;
    }

    .lattice-auth-body .stock-sticky-table td[data-card-title="true"] p {
        color: #ffffff;
        font-size: 0.98rem;
        line-height: 1.22;
        white-space: normal !important;
        overflow-wrap: anywhere;
    }

    .lattice-auth-body .stock-sticky-table td[data-stock-field="status"],
    .lattice-auth-body .stock-sticky-table td[data-stock-field="norm-input"] {
        grid-column: 1 / -1;
    }

    .lattice-auth-body .stock-sticky-table td[data-stock-field="status"] {
        min-height: 0;
        gap: 0.42rem;
    }

    .lattice-auth-body .stock-sticky-table td[data-stock-field="status"] > div {
        width: 100%;
        gap: 0.38rem;
    }

    .lattice-auth-body .stock-sticky-table td[data-stock-field="norm-input"] {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(6.25rem, 8rem);
        align-items: center;
        gap: 0.72rem;
        min-height: 3.2rem;
    }

    .lattice-auth-body .stock-sticky-table td[data-stock-field="norm-input"]::before {
        align-self: center;
    }

    .lattice-auth-body .stock-sticky-table td[data-stock-field="norm-input"] input {
        width: 100% !important;
        min-height: 2.45rem;
        border-radius: 4px !important;
        background: #07080b !important;
        border-color: var(--lattice-border) !important;
        text-align: center;
    }

    .lattice-auth-body .stock-sticky-table td[data-stock-field="available"],
    .lattice-auth-body .stock-sticky-table td[data-stock-field="gap"],
    .lattice-auth-body .stock-sticky-table td[data-stock-field="welding"],
    .lattice-auth-body .stock-sticky-table td[data-stock-field="painting"] {
        background: #101319 !important;
    }

    .lattice-auth-body .stock-sticky-table td[data-card-full="true"],
    .lattice-auth-body .stock-sticky-table td[colspan] {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
    }

    .lattice-auth-body .stock-flow-panel {
        position: static !important;
        left: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        grid-template-columns: 1fr !important;
        gap: 0.68rem !important;
        padding: 0.78rem !important;
        border-radius: 4px !important;
        background: #0b0d11 !important;
        border-color: rgba(119, 251, 253, 0.24) !important;
    }

    .lattice-auth-body .stock-flow-actions {
        grid-template-columns: 1fr !important;
        gap: 0.55rem !important;
    }

    .lattice-auth-body .stock-flow-button {
        min-height: 2.9rem;
        border-radius: 4px !important;
        font-size: 0.88rem;
        line-height: 1.15;
        white-space: normal;
    }

    .lattice-auth-body .stock-flow-quantity-input {
        min-height: 2.8rem;
        border-radius: 4px !important;
        background: #07080b !important;
    }

    .lattice-auth-body .stock-flow-message {
        font-size: 0.78rem;
        line-height: 1.25;
    }
}

/* Final compact deadline layout. Keep this after other deadline/card overrides. */
.lattice-auth-body .deadline-panel {
    max-height: none;
    padding: 0.6rem 0.75rem !important;
    overflow: visible;
}

.lattice-auth-body .deadline-panel > .flex {
    gap: 0.45rem !important;
}

.lattice-auth-body .deadline-panel h2 {
    font-size: 1rem !important;
    line-height: 1.1 !important;
}

.lattice-auth-body .deadline-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0.34rem !important;
    max-height: none;
    overflow: visible;
    padding-right: 0;
}

.lattice-auth-body .deadline-card,
.lattice-auth-body .deadline-card[class*="p-"] {
    min-height: 0 !important;
    padding: 0.4rem 0.52rem !important;
    border-left-width: 3px !important;
}

.lattice-auth-body .deadline-card .font-semibold {
    font-size: 0.82rem !important;
    line-height: 1.05 !important;
}

.lattice-auth-body .deadline-card-title {
    display: flex;
    align-items: center;
    gap: 0.28rem;
    min-width: 0;
}

.lattice-auth-body .deadline-card-title-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lattice-auth-body .deadline-card-custom-icon.material-symbols-rounded {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 1.05rem;
    height: 1.05rem;
    border: 1px solid rgba(255, 184, 46, 0.56);
    border-radius: 50%;
    background: rgba(255, 184, 46, 0.16);
    color: #ffdf8a;
    font-size: 0.78rem;
    line-height: 1;
}

.lattice-auth-body .deadline-card p {
    margin-top: 0.12rem !important;
    line-height: 1.08 !important;
}

.lattice-auth-body .deadline-card p[class*="text-sm"] {
    font-size: 0.7rem !important;
}

.lattice-auth-body .deadline-card p[class*="text-xs"] {
    margin-top: 0.28rem !important;
    font-size: 0.66rem !important;
}

.lattice-auth-body .deadline-card .status-chip {
    min-height: 1.35rem !important;
    max-width: 9.5rem;
    padding: 0.18rem 0.38rem !important;
    font-size: 0.62rem !important;
    line-height: 1 !important;
    white-space: normal !important;
    text-align: center;
}

.lattice-auth-body .deadline-panel-count {
    min-height: 1.45rem !important;
    padding: 0.18rem 0.48rem !important;
    font-size: 0.68rem !important;
}

@media (max-width: 1100px) {
    .lattice-auth-body .deadline-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 767px) {
    .lattice-auth-body .deadline-panel {
        max-height: none;
        overflow: visible;
    }

    .lattice-auth-body .deadline-grid {
        grid-template-columns: 1fr !important;
        max-height: none;
        overflow: visible;
    }
}

/* Collapsible requirement sections on the Orders page. */
.lattice-auth-body .orders-accordion {
    overflow: hidden;
    border: 1px solid var(--lattice-border);
    border-radius: 8px;
    background: #0b0d11;
}

.lattice-auth-body .orders-accordion-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4rem;
    padding: 0.9rem 1rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.lattice-auth-body .orders-accordion-summary::-webkit-details-marker {
    display: none;
}

.lattice-auth-body .orders-accordion-heading {
    min-width: 0;
    color: #ffffff;
    font-family: var(--font-anduril);
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.14;
    letter-spacing: 0;
}

.lattice-auth-body .orders-accordion-heading-lg {
    font-size: 1.16rem;
}

.lattice-auth-body .orders-accordion-toggle {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 0.35rem;
    color: #a7adb8;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
}

.lattice-auth-body .orders-accordion-toggle-close {
    display: none;
}

.lattice-auth-body .orders-accordion-icon {
    font-size: 1.25rem;
    transition: transform 160ms var(--curve-smooth);
}

.lattice-auth-body .orders-accordion[open] .orders-accordion-icon {
    transform: rotate(180deg);
}

.lattice-auth-body .orders-accordion[open] .orders-accordion-toggle-open {
    display: none;
}

.lattice-auth-body .orders-accordion[open] .orders-accordion-toggle-close {
    display: inline;
}

.lattice-auth-body .orders-accordion-body {
    padding: 0 1rem 1rem;
    border-top: 1px solid var(--lattice-border);
}

.lattice-auth-body .orders-requirement-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem 0;
}

.lattice-auth-body .orders-accordion-body > .orders-requirement-chips + .mb-3 {
    margin-top: 0;
}

@media (max-width: 767px) {
    .lattice-auth-body .orders-accordion-summary {
        align-items: flex-start;
        min-height: 0;
        padding: 0.86rem;
    }

    .lattice-auth-body .orders-accordion-heading,
    .lattice-auth-body .orders-accordion-heading-lg {
        font-size: 1rem;
        line-height: 1.15;
    }

    .lattice-auth-body .orders-accordion-toggle {
        padding-top: 0.08rem;
    }

    .lattice-auth-body .orders-accordion-body {
        padding: 0 0.86rem 0.86rem;
    }

    .lattice-auth-body .orders-requirement-chips {
        gap: 0.5rem;
        padding: 0.86rem 0;
    }
}

/* Final order-card override: keep the Orders page on the graphite Lattice palette. */
.lattice-auth-body article.order-card,
.lattice-auth-body article.order-card[class*="bg-white/5"],
.lattice-auth-body details.order-card,
.lattice-auth-body details.order-card[class*="bg-white/5"] {
    background: #15171c !important;
    border-color: var(--lattice-border) !important;
}

.lattice-auth-body article.order-card:hover,
.lattice-auth-body article.order-card:focus-within,
.lattice-auth-body details.order-card:hover,
.lattice-auth-body details.order-card:focus-within,
.lattice-auth-body details.order-card[open] {
    background: #12151a !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
}

.lattice-auth-body .order-card-summary {
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.lattice-auth-body .order-card-summary::-webkit-details-marker {
    display: none;
}

.lattice-auth-body .order-card-summary-grid {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 1rem;
}

.lattice-auth-body .order-select-label {
    margin-right: 0.25rem;
}

.lattice-auth-body .order-card-summary-meta {
    display: grid;
    gap: 0.4rem;
    color: #aeb6c2;
    font-size: 0.9rem;
    text-align: right;
}

.lattice-auth-body .order-card-disclosure {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-width: 6.75rem;
    min-height: 2.4rem;
    border: 1px solid var(--lattice-border);
    border-radius: 999px;
    color: #f2f5f8;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
    background: rgba(255, 255, 255, 0.04);
}

.lattice-auth-body .order-card-disclosure-icon {
    font-size: 1.25rem;
    transition: transform 160ms var(--curve-smooth);
}

.lattice-auth-body details.order-card[open] .order-card-disclosure-icon {
    transform: rotate(180deg);
}

.lattice-auth-body details.order-card[open] .order-card-disclosure-label {
    font-size: 0;
}

.lattice-auth-body details.order-card[open] .order-card-disclosure-label::after {
    content: "Скрыть";
    font-size: 0.82rem;
}

.lattice-auth-body .order-card-panel {
    margin-top: 1.1rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--lattice-border);
}

.lattice-auth-body .order-card-comment,
.lattice-auth-body .order-card-locked-note {
    margin-bottom: 1rem;
    border: 1px solid var(--lattice-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: #c7ced8;
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
}

.lattice-auth-body .order-card-table-shell {
    overflow-x: auto;
    border: 1px solid var(--lattice-border);
    border-radius: 8px;
}

.lattice-auth-body .order-card-lines-table tbody {
    background: rgba(255, 255, 255, 0.035) !important;
}

.lattice-auth-body .order-card-lines-table tr[data-order-line-row] {
    scroll-margin-top: 7rem;
    transition:
        background-color 180ms var(--curve-smooth),
        box-shadow 180ms var(--curve-smooth);
}

.lattice-auth-body .order-card-lines-table tr.order-line-scroll-highlight {
    background: rgba(255, 184, 46, 0.16) !important;
    box-shadow: inset 4px 0 0 rgba(255, 184, 46, 0.72);
}

.lattice-auth-body .order-card-actions {
    --order-action-width: 12.75rem;
    --order-action-height: 3.45rem;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1rem;
}

.lattice-auth-body .order-card-actions form {
    margin: 0;
}

.lattice-auth-body .order-card-actions > form:not(.order-ship-inline-form),
.lattice-auth-body .order-card-actions > .order-inline-action {
    flex: 0 0 var(--order-action-width);
}

.lattice-auth-body .order-ship-inline-form {
    flex: 0 1 34rem;
    display: grid;
    grid-template-columns: minmax(15rem, 1fr) var(--order-action-width);
    gap: 0.75rem;
    align-items: start;
}

.lattice-auth-body .order-inline-note {
    width: 100%;
    height: var(--order-action-height);
    min-height: var(--order-action-height);
    max-height: 7rem;
    resize: vertical;
    border: 1px solid var(--lattice-border);
    border-radius: 10px;
    background: #0b0d11;
    color: #f5f7fa;
    padding: 0.9rem 1rem;
    font-size: 0.86rem;
    line-height: 1.15;
    outline: none;
}

.lattice-auth-body .order-inline-note:focus {
    border-color: rgba(129, 217, 110, 0.8);
    box-shadow: 0 0 0 4px rgba(129, 217, 110, 0.12);
}

.lattice-auth-body .order-inline-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: var(--order-action-width);
    min-width: var(--order-action-width);
    height: var(--order-action-height);
    min-height: var(--order-action-height);
    border: 1px solid var(--lattice-border);
    border-radius: 10px;
    padding: 0 1rem;
    color: #f6f8fb;
    font-size: 0.9rem;
    font-weight: 850;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition:
        border-color 160ms var(--curve-smooth),
        background-color 160ms var(--curve-smooth),
        color 160ms var(--curve-smooth),
        box-shadow 160ms var(--curve-smooth);
}

.lattice-auth-body .order-inline-action .material-symbols-rounded {
    font-size: 1.1rem;
}

.lattice-auth-body .order-inline-action-neutral {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
        #1b1f25;
    color: #dfe4eb;
}

.lattice-auth-body .order-inline-action-success {
    border-color: rgba(129, 217, 110, 0.62);
    background:
        linear-gradient(180deg, rgba(129, 217, 110, 0.2), rgba(129, 217, 110, 0.1)),
        #142219;
    color: #e8ffe1;
}

.lattice-auth-body .order-inline-action-warning {
    border-color: rgba(255, 184, 46, 0.62);
    background:
        linear-gradient(180deg, rgba(255, 184, 46, 0.18), rgba(255, 184, 46, 0.08)),
        #241a0c;
    color: #ffe6ad;
}

.lattice-auth-body .order-inline-action-danger {
    border-color: rgba(255, 62, 95, 0.66);
    background:
        linear-gradient(180deg, rgba(255, 62, 95, 0.2), rgba(255, 62, 95, 0.09)),
        #261018;
    color: #ffd7de;
}

.lattice-auth-body .order-inline-action:hover,
.lattice-auth-body .order-inline-action:focus-visible {
    border-color: rgba(255, 255, 255, 0.28);
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.09),
        0 0 0 3px rgba(255, 255, 255, 0.045);
    outline: none;
}

.lattice-auth-body .order-checkbox-readonly {
    opacity: 0.7;
}

@media (max-width: 900px) {
    .lattice-auth-body .order-card-summary-grid {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: start;
    }

    .lattice-auth-body .order-select-label {
        margin-top: 0.35rem;
    }

    .lattice-auth-body .order-card-summary-meta {
        grid-column: 1 / -1;
        text-align: left;
    }

    .lattice-auth-body .order-card-disclosure {
        grid-column: 1 / -1;
        width: 100%;
    }

    .lattice-auth-body .order-ship-inline-form {
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
    }

    .lattice-auth-body .order-card-actions,
    .lattice-auth-body .order-card-actions form,
    .lattice-auth-body .order-inline-action {
        width: 100%;
        min-width: 0;
    }
}

/* Red production action drawer inside stock cards. */
.lattice-auth-body .stock-flow-panel {
    border-color: rgba(255, 62, 95, 0.7) !important;
    background:
        linear-gradient(135deg, rgba(255, 62, 95, 0.16), rgba(24, 12, 18, 0.94) 58%, rgba(7, 8, 11, 0.98)),
        #100b10 !important;
    box-shadow: inset 3px 0 0 rgba(255, 62, 95, 0.72) !important;
}

.lattice-auth-body .stock-flow-kicker,
.lattice-auth-body .stock-flow-quantity-label span {
    color: #d3a3ad !important;
    letter-spacing: 0.12em;
}

.lattice-auth-body .stock-flow-label {
    color: #ffffff !important;
}

.lattice-auth-body .stock-flow-quantity-input {
    background: #07080b !important;
    border-color: rgba(255, 62, 95, 0.36) !important;
    color: #ffffff !important;
}

.lattice-auth-body .stock-flow-quantity-input:hover,
.lattice-auth-body .stock-flow-quantity-input:focus {
    border-color: rgba(255, 62, 95, 0.75) !important;
    background: #090a0d !important;
    box-shadow: 0 0 0 1px rgba(255, 62, 95, 0.16) !important;
}

.lattice-auth-body .stock-flow-button,
.lattice-auth-body .stock-flow-button-launch,
.lattice-auth-body .stock-flow-button-transfer {
    border-color: rgba(255, 62, 95, 0.62) !important;
    background: rgba(255, 62, 95, 0.08) !important;
    color: #ff4968 !important;
    box-shadow: none !important;
}

.lattice-auth-body .stock-flow-button:hover:not(:disabled),
.lattice-auth-body .stock-flow-button-launch:hover:not(:disabled),
.lattice-auth-body .stock-flow-button-transfer:hover:not(:disabled) {
    border-color: #ff3e5f !important;
    background: rgba(255, 62, 95, 0.16) !important;
    color: #ff5b76 !important;
}

.lattice-auth-body .stock-flow-button:disabled {
    border-color: rgba(255, 62, 95, 0.24) !important;
    background: rgba(255, 62, 95, 0.035) !important;
    color: rgba(255, 255, 255, 0.44) !important;
    opacity: 1 !important;
}

.lattice-auth-body .stock-flow-message {
    color: #f0b5bf !important;
}

.lattice-auth-body .stock-flow-message[data-tone="error"] {
    color: #ff4968 !important;
}

@media (max-width: 767px) {
    .lattice-auth-body .stock-sticky-table tr[hidden],
    .lattice-auth-body .stock-sticky-table tr[data-stock-product-row][hidden],
    .lattice-auth-body .stock-sticky-table tr[data-stock-norm-row][hidden],
    .lattice-auth-body .stock-sticky-table tr[data-stock-action-row][hidden] {
        display: none !important;
    }

    .lattice-auth-body .stock-sticky-table tr[data-stock-product-row]:hover,
    .lattice-auth-body .stock-sticky-table tr[data-stock-product-row]:focus-visible,
    .lattice-auth-body .stock-sticky-table tr.stock-flow-row-active {
        border-color: rgba(255, 62, 95, 0.72) !important;
    }

    .lattice-auth-body .stock-flow-panel {
        border-color: rgba(255, 62, 95, 0.68) !important;
        box-shadow: inset 3px 0 0 rgba(255, 62, 95, 0.7) !important;
    }
}

/* Painting workspace: priority board, modals, and oven visualizer. */
.lattice-auth-body .painting-page {
    --paint-surface: rgba(12, 15, 20, 0.78);
    --paint-surface-strong: rgba(17, 21, 28, 0.94);
    --paint-border: rgba(255, 255, 255, 0.11);
    --paint-muted: rgba(214, 224, 236, 0.66);
    --paint-text: #f8fafc;
}

.lattice-auth-body .painting-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.65rem;
}

.lattice-auth-body .painting-stat,
.lattice-auth-body .painting-action {
    min-height: 2.65rem;
    border: 1px solid var(--paint-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.065);
    color: #e7edf6;
}

.lattice-auth-body .painting-stat {
    display: inline-flex;
    align-items: center;
    padding: 0.58rem 0.95rem;
    font-size: 0.88rem;
    font-weight: 700;
}

.lattice-auth-body .painting-action {
    display: inline-flex;
    align-items: center;
    gap: 0.48rem;
    padding: 0.58rem 1rem;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.lattice-auth-body .painting-action .material-symbols-rounded {
    font-size: 1.18rem;
    line-height: 1;
}

.lattice-auth-body .painting-action:hover,
.lattice-auth-body .painting-action:focus-visible {
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.lattice-auth-body .painting-action-primary {
    border-color: rgba(251, 146, 60, 0.68);
    background: linear-gradient(135deg, #fb923c, #facc15);
    color: #19130a;
    box-shadow: 0 14px 34px rgba(251, 146, 60, 0.17);
}

.lattice-auth-body .painting-table-head,
.lattice-auth-body .painting-row-button {
    grid-template-columns: 70px 150px minmax(240px, 1fr) 120px 120px 165px 170px;
}

.lattice-auth-body .painting-table-head {
    gap: 0;
    padding: 0.86rem 1rem;
    border-bottom: 1px solid var(--paint-border);
    background: rgba(255, 255, 255, 0.075);
    color: #aeb9c8;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.lattice-auth-body .painting-queue {
    display: grid;
    background: rgba(255, 255, 255, 0.035);
}

.lattice-auth-body .painting-row {
    --paint-row-accent: #8da2b8;
    --paint-row-bg: rgba(255, 255, 255, 0.035);
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--paint-row-accent) 18%, transparent), transparent 38%),
        var(--paint-row-bg);
}

.lattice-auth-body .painting-row::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--paint-row-accent);
}

.lattice-auth-body .painting-row-danger {
    --paint-row-accent: #ff4968;
    --paint-row-bg: rgba(255, 73, 104, 0.095);
}

.lattice-auth-body .painting-row-warning {
    --paint-row-accent: #fbbf24;
    --paint-row-bg: rgba(251, 191, 36, 0.09);
}

.lattice-auth-body .painting-row-info {
    --paint-row-accent: #67e8f9;
    --paint-row-bg: rgba(103, 232, 249, 0.055);
}

.lattice-auth-body .painting-row-muted {
    --paint-row-accent: #94a3b8;
}

.lattice-auth-body .painting-row-button {
    display: grid;
    width: 100%;
    gap: 0;
    align-items: center;
    padding: 1rem;
    color: var(--paint-text);
    text-align: left;
}

.lattice-auth-body .painting-row-button:hover,
.lattice-auth-body .painting-row-button:focus-visible {
    background: rgba(255, 255, 255, 0.045);
}

.lattice-auth-body .painting-cell {
    min-width: 0;
    padding-right: 0.85rem;
}

.lattice-auth-body .painting-index {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.lattice-auth-body .painting-drag-icon {
    color: rgba(214, 224, 236, 0.42);
    cursor: grab;
}

.lattice-auth-body .painting-index-number,
.lattice-auth-body .painting-title,
.lattice-auth-body .painting-strong,
.lattice-auth-body .painting-quantity {
    color: #ffffff;
    font-weight: 850;
}

.lattice-auth-body .painting-title {
    display: block;
    line-height: 1.25;
}

.lattice-auth-body .painting-subline,
.lattice-auth-body .painting-mini,
.lattice-auth-body .painting-muted {
    color: var(--paint-muted);
}

.lattice-auth-body .painting-subline,
.lattice-auth-body .painting-mini {
    display: block;
    margin-top: 0.24rem;
    font-size: 0.77rem;
    line-height: 1.25;
}

.lattice-auth-body .painting-source {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.lattice-auth-body .paint-source-chip,
.lattice-auth-body .paint-urgency-chip {
    display: inline-flex;
    align-items: center;
    min-height: 1.7rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    padding: 0.28rem 0.62rem;
    font-size: 0.72rem;
    font-weight: 850;
    line-height: 1;
    white-space: nowrap;
}

.lattice-auth-body .paint-source-chip-danger,
.lattice-auth-body .paint-urgency-chip-danger {
    border-color: rgba(255, 73, 104, 0.42);
    background: rgba(255, 73, 104, 0.14);
    color: #ffc4cc;
}

.lattice-auth-body .paint-source-chip-warning,
.lattice-auth-body .paint-urgency-chip-warning {
    border-color: rgba(251, 191, 36, 0.42);
    background: rgba(251, 191, 36, 0.14);
    color: #fde68a;
}

.lattice-auth-body .paint-source-chip-info,
.lattice-auth-body .paint-urgency-chip-info {
    border-color: rgba(103, 232, 249, 0.32);
    background: rgba(103, 232, 249, 0.1);
    color: #bae6fd;
}

.lattice-auth-body .paint-source-chip-success {
    border-color: rgba(52, 211, 153, 0.34);
    background: rgba(52, 211, 153, 0.1);
    color: #bbf7d0;
}

.lattice-auth-body .paint-source-chip-muted,
.lattice-auth-body .paint-urgency-chip-muted {
    border-color: rgba(148, 163, 184, 0.28);
    background: rgba(148, 163, 184, 0.09);
    color: #cbd5e1;
}

.lattice-auth-body .painting-order-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    margin-top: 0.45rem;
    border-radius: 999px;
    padding: 0.28rem 0.62rem;
    background: rgba(255, 255, 255, 0.07);
    color: #dfe7f1;
    font-size: 0.73rem;
    font-weight: 800;
    line-height: 1.1;
}

.lattice-auth-body .painting-order-hint .material-symbols-rounded {
    font-size: 1rem;
}

.lattice-auth-body .painting-order-hint-danger {
    background: rgba(255, 73, 104, 0.16);
    color: #ffd1d8;
}

.lattice-auth-body .painting-order-hint-warning {
    background: rgba(251, 191, 36, 0.14);
    color: #fde68a;
}

.lattice-auth-body .painting-details {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.24);
    padding: 1rem;
}

.lattice-auth-body .painting-detail-grid {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lattice-auth-body .painting-detail-label {
    color: #8793a4;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.paint-modal-open {
    overflow: hidden;
}

.lattice-auth-body .paint-modal[hidden] {
    display: none !important;
}

.lattice-auth-body .paint-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 1.25rem;
}

.lattice-auth-body .paint-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 12, 0.72);
    backdrop-filter: blur(10px);
}

.lattice-auth-body .paint-modal-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 720px);
    max-height: min(90vh, 920px);
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 1.6rem;
    background:
        radial-gradient(circle at top left, rgba(251, 146, 60, 0.14), transparent 36%),
        var(--paint-surface-strong, rgba(12, 15, 20, 0.96));
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
    padding: 1.2rem;
}

.lattice-auth-body .paint-modal-panel-wide {
    width: min(100%, 1120px);
}

.lattice-auth-body .paint-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.lattice-auth-body .paint-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #f8fafc;
}

.lattice-auth-body .paint-modal-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.95rem;
}

.lattice-auth-body .oven-settings-layout {
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
    gap: 1rem;
    align-items: start;
}

.lattice-auth-body .oven-visual-card {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1.35rem;
    background:
        linear-gradient(145deg, rgba(15, 23, 42, 0.78), rgba(6, 10, 16, 0.92)),
        rgba(255, 255, 255, 0.04);
    padding: 1rem;
}

.lattice-auth-body .oven-3d-svg {
    display: block;
    width: 100%;
    aspect-ratio: 420 / 260;
    overflow: visible;
}

.lattice-auth-body .oven-3d-svg polygon,
.lattice-auth-body .oven-3d-svg polyline {
    vector-effect: non-scaling-stroke;
}

.lattice-auth-body .oven-3d-svg [data-oven-face="floor"] {
    fill: rgba(251, 146, 60, 0.16);
    stroke: rgba(251, 191, 36, 0.58);
    stroke-width: 1.4;
}

.lattice-auth-body .oven-3d-svg [data-oven-face="back"] {
    fill: rgba(103, 232, 249, 0.08);
    stroke: rgba(148, 163, 184, 0.36);
    stroke-width: 1.1;
}

.lattice-auth-body .oven-3d-svg [data-oven-face="side"] {
    fill: rgba(251, 146, 60, 0.09);
    stroke: rgba(251, 191, 36, 0.34);
    stroke-width: 1.1;
}

.lattice-auth-body .oven-3d-svg [data-oven-face="top"] {
    fill: rgba(255, 255, 255, 0.055);
    stroke: rgba(255, 255, 255, 0.28);
    stroke-width: 1.1;
}

.lattice-auth-body .oven-3d-svg [data-oven-edge] {
    fill: none;
    stroke: rgba(255, 255, 255, 0.58);
    stroke-linejoin: round;
    stroke-width: 1.3;
}

.lattice-auth-body .oven-3d-svg [data-oven-rails] line {
    stroke: #fb923c;
    stroke-linecap: round;
    stroke-width: 4.5;
    filter: drop-shadow(0 0 8px rgba(251, 146, 60, 0.34));
}

.lattice-auth-body .oven-3d-svg text {
    fill: #dbeafe;
    font-size: 12px;
    font-weight: 800;
    paint-order: stroke;
    stroke: rgba(5, 8, 14, 0.8);
    stroke-width: 3px;
}

.lattice-auth-body .oven-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin-top: 0.75rem;
}

.lattice-auth-body .oven-metrics span {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.055);
    padding: 0.72rem;
    color: #cbd5e1;
    font-size: 0.8rem;
    font-weight: 700;
}

.lattice-auth-body .oven-metrics strong {
    color: #ffffff;
    font-size: 1.02rem;
}

@media (max-width: 1023px) {
    .lattice-auth-body .painting-board {
        padding: 0.75rem !important;
    }

    .lattice-auth-body .painting-table {
        overflow: visible;
        border: 0 !important;
    }

    .lattice-auth-body .painting-queue {
        gap: 0.85rem;
        background: transparent;
    }

    .lattice-auth-body .painting-row {
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 1.25rem;
        box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
    }

    .lattice-auth-body .painting-row-button {
        grid-template-columns: 1fr;
        gap: 0.72rem;
        padding: 0.95rem;
    }

    .lattice-auth-body .painting-cell {
        width: 100%;
        padding-right: 0;
    }

    .lattice-auth-body .painting-cell:not([data-card-title="true"]) {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        padding-top: 0.68rem;
        text-align: right;
    }

    .lattice-auth-body .painting-cell:not([data-card-title="true"])::before {
        content: attr(data-label);
        flex: 0 0 6.8rem;
        color: #8e9aac;
        font-size: 0.68rem;
        font-weight: 850;
        letter-spacing: 0.09em;
        line-height: 1.25;
        text-align: left;
        text-transform: uppercase;
    }

    .lattice-auth-body .painting-title-cell {
        order: -2;
    }

    .lattice-auth-body .painting-index {
        order: -1;
        border-top: 0 !important;
        padding-top: 0 !important;
    }

    .lattice-auth-body .painting-source {
        justify-content: flex-end;
    }

    .lattice-auth-body .painting-order-hint {
        max-width: 100%;
        border-radius: 0.85rem;
        white-space: normal;
    }

    .lattice-auth-body .painting-detail-grid,
    .lattice-auth-body .oven-settings-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .lattice-auth-body .painting-hero {
        border-radius: 1.35rem !important;
        padding: 1rem !important;
    }

    .lattice-auth-body .painting-toolbar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .lattice-auth-body .painting-stat,
    .lattice-auth-body .painting-action {
        justify-content: center;
        min-width: 0;
        width: 100%;
        padding-right: 0.7rem;
        padding-left: 0.7rem;
        text-align: center;
    }

    .lattice-auth-body .painting-toolbar .painting-action-primary,
    .lattice-auth-body .painting-toolbar .painting-action {
        grid-column: span 2;
    }

    .lattice-auth-body .painting-cell:not([data-card-title="true"]) {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
        text-align: left;
    }

    .lattice-auth-body .painting-cell:not([data-card-title="true"])::before {
        flex-basis: auto;
    }

    .lattice-auth-body .paint-modal {
        align-items: end;
        padding: 0;
    }

    .lattice-auth-body .paint-modal-panel {
        width: 100%;
        max-height: 92vh;
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 1.4rem 1.4rem 0 0;
        padding: 1rem;
    }

    .lattice-auth-body .paint-modal-form,
    .lattice-auth-body .oven-form {
        grid-template-columns: 1fr;
    }

    .lattice-auth-body .oven-metrics {
        grid-template-columns: 1fr;
    }
}

/* Align the Painting page with the Orders page visual system. */
.lattice-auth-body .painting-page {
    --paint-border: var(--lattice-border);
    --paint-border-strong: rgba(255, 255, 255, 0.18);
    --paint-surface: #07080b;
    --paint-surface-alt: #0b0d11;
    --paint-surface-hover: #12151a;
    --paint-surface-panel: #15171c;
    --paint-text: #f5f7fa;
    --paint-muted: #aeb6c2;
}

.lattice-auth-body .painting-hero {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.lattice-auth-body .painting-hero-row {
    display: grid;
    gap: 1rem;
    align-items: end;
}

@media (min-width: 1280px) {
    .lattice-auth-body .painting-hero-row {
        grid-template-columns: minmax(0, 1fr) max-content;
        gap: 1.5rem;
    }
}

.lattice-auth-body .painting-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
}

.lattice-auth-body .painting-stat,
.lattice-auth-body .painting-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 3.25rem;
    padding: 0 1rem;
    border: 1px solid var(--paint-border);
    border-radius: 4px !important;
    background: var(--paint-surface-alt);
    color: var(--paint-text);
    font-size: 0.86rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: none !important;
    transition:
        border-color 160ms var(--curve-smooth),
        background-color 160ms var(--curve-smooth),
        color 160ms var(--curve-smooth);
}

.lattice-auth-body .painting-stat {
    background: rgba(255, 255, 255, 0.045);
}

.lattice-auth-body .painting-action .material-symbols-rounded {
    font-size: 1.08rem;
    line-height: 1;
}

.lattice-auth-body .painting-action:hover,
.lattice-auth-body .painting-action:focus-visible {
    border-color: var(--paint-border-strong);
    background: var(--paint-surface-hover);
    color: #ffffff;
    transform: none;
    outline: none;
}

.lattice-auth-body .painting-action-primary {
    background: var(--lattice-yellow) !important;
    border-color: rgba(255, 214, 123, 0.86) !important;
    color: #07080b !important;
    -webkit-text-fill-color: #07080b;
}

.lattice-auth-body .painting-action-primary:hover,
.lattice-auth-body .painting-action-primary:focus-visible {
    background: #f0a915 !important;
    border-color: rgba(255, 230, 166, 0.98) !important;
    color: #050607 !important;
    -webkit-text-fill-color: #050607;
}

.lattice-auth-body .painting-action-secondary {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
        #1b1f25;
    color: #dfe4eb;
}

.lattice-auth-body .painting-inline-note {
    background: var(--paint-surface-alt) !important;
    border-color: var(--paint-border) !important;
    color: #c7ced8 !important;
}

.lattice-auth-body .painting-board {
    padding: 1rem !important;
}

.lattice-auth-body .painting-board-header {
    gap: 1rem;
}

.lattice-auth-body .painting-table {
    border-color: var(--paint-border) !important;
    background: var(--paint-surface);
}

.lattice-auth-body .painting-table-head,
.lattice-auth-body .painting-row-button {
    grid-template-columns: 70px 150px minmax(240px, 1fr) 120px 120px 165px 170px;
}

.lattice-auth-body .painting-table-head {
    gap: 0;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--paint-border);
    background: #101216 !important;
    color: #8e9aac;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.lattice-auth-body .painting-queue {
    display: grid;
    background: var(--paint-surface);
}

.lattice-auth-body .painting-row {
    --paint-row-accent: rgba(167, 173, 184, 0.72);
    position: relative;
    overflow: hidden;
    border-top: 1px solid var(--paint-border);
    background: var(--paint-surface);
}

.lattice-auth-body .painting-row:first-child {
    border-top: 0;
}

.lattice-auth-body .painting-row::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 2px;
    background: var(--paint-row-accent);
}

.lattice-auth-body .painting-row-danger {
    --paint-row-accent: var(--lattice-red);
    background:
        linear-gradient(90deg, rgba(255, 62, 85, 0.1), transparent 18%),
        var(--paint-surface);
}

.lattice-auth-body .painting-row-warning {
    --paint-row-accent: var(--lattice-yellow);
    background:
        linear-gradient(90deg, rgba(255, 184, 46, 0.1), transparent 18%),
        var(--paint-surface);
}

.lattice-auth-body .painting-row-info {
    --paint-row-accent: var(--lattice-cyan);
    background:
        linear-gradient(90deg, rgba(119, 251, 253, 0.08), transparent 18%),
        var(--paint-surface);
}

.lattice-auth-body .painting-row-muted {
    --paint-row-accent: rgba(167, 173, 184, 0.72);
}

.lattice-auth-body .painting-row-button {
    display: grid;
    width: 100%;
    gap: 0;
    align-items: center;
    padding: 1rem;
    color: var(--paint-text);
    text-align: left;
}

.lattice-auth-body .painting-row-button:hover,
.lattice-auth-body .painting-row-button:focus-visible {
    background: var(--paint-surface-hover);
    outline: none;
}

.lattice-auth-body .painting-cell {
    min-width: 0;
    padding-right: 1rem;
}

.lattice-auth-body .painting-index {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.lattice-auth-body .painting-drag-icon {
    color: rgba(214, 224, 236, 0.42);
    cursor: grab;
}

.lattice-auth-body .painting-index-number,
.lattice-auth-body .painting-title,
.lattice-auth-body .painting-strong,
.lattice-auth-body .painting-quantity {
    color: #ffffff;
    font-weight: 700;
}

.lattice-auth-body .painting-title {
    display: block;
    line-height: 1.22;
}

.lattice-auth-body .painting-subline,
.lattice-auth-body .painting-mini,
.lattice-auth-body .painting-muted {
    color: var(--paint-muted);
}

.lattice-auth-body .painting-subline,
.lattice-auth-body .painting-mini {
    display: block;
    margin-top: 0.28rem;
    font-size: 0.76rem;
    line-height: 1.25;
}

.lattice-auth-body .painting-source {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.lattice-auth-body .paint-source-chip,
.lattice-auth-body .paint-urgency-chip,
.lattice-auth-body .painting-order-hint {
    display: inline-flex;
    align-items: center;
    min-height: 1.9rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 4px !important;
    padding: 0.38rem 0.68rem;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.lattice-auth-body .paint-source-chip-danger,
.lattice-auth-body .paint-urgency-chip-danger,
.lattice-auth-body .painting-order-hint-danger {
    border-color: rgba(255, 62, 85, 0.34);
    background: rgba(255, 62, 85, 0.12);
    color: var(--lattice-red);
}

.lattice-auth-body .paint-source-chip-warning,
.lattice-auth-body .paint-urgency-chip-warning,
.lattice-auth-body .painting-order-hint-warning {
    border-color: rgba(255, 184, 46, 0.32);
    background: rgba(255, 184, 46, 0.12);
    color: var(--lattice-yellow);
}

.lattice-auth-body .paint-source-chip-info,
.lattice-auth-body .paint-urgency-chip-info {
    border-color: rgba(119, 251, 253, 0.26);
    background: rgba(119, 251, 253, 0.1);
    color: var(--lattice-cyan);
}

.lattice-auth-body .paint-source-chip-success {
    border-color: rgba(69, 224, 111, 0.28);
    background: rgba(69, 224, 111, 0.11);
    color: var(--lattice-green);
}

.lattice-auth-body .paint-source-chip-muted,
.lattice-auth-body .paint-urgency-chip-muted,
.lattice-auth-body .painting-order-hint {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
    color: #dfe4eb;
}

.lattice-auth-body .painting-order-hint {
    gap: 0.35rem;
    margin-top: 0.5rem;
    white-space: normal;
}

.lattice-auth-body .painting-order-hint .material-symbols-rounded {
    font-size: 0.95rem;
}

.lattice-auth-body .painting-details {
    border-top: 1px solid var(--paint-border);
    background: var(--paint-surface-alt);
    padding: 1rem;
}

.lattice-auth-body .painting-detail-grid {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lattice-auth-body .painting-detail-label {
    color: #8e9aac;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.lattice-auth-body .painting-inline-input {
    min-height: 3.25rem;
    border-color: var(--paint-border) !important;
    border-radius: 4px !important;
    background: #090b0f !important;
    color: #ffffff !important;
}

.lattice-auth-body .painting-inline-input:hover,
.lattice-auth-body .painting-inline-input:focus {
    border-color: var(--lattice-cyan) !important;
    background: #11151b !important;
    outline: none;
}

.lattice-auth-body .paint-modal-backdrop {
    background: rgba(2, 6, 12, 0.76);
    backdrop-filter: blur(8px);
}

.lattice-auth-body .paint-modal-panel {
    border-color: var(--paint-border);
    border-radius: 4px !important;
    background: #111318;
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.42);
}

.lattice-auth-body .paint-modal-close {
    border-color: var(--paint-border);
    border-radius: 4px !important;
    background: var(--paint-surface-alt);
    color: #f8fafc;
}

.lattice-auth-body .paint-modal-close:hover,
.lattice-auth-body .paint-modal-close:focus-visible {
    border-color: var(--paint-border-strong);
    background: var(--paint-surface-hover);
    outline: none;
}

.lattice-auth-body .paint-modal-form {
    gap: 0.9rem;
}

.lattice-auth-body .oven-visual-card,
.lattice-auth-body .oven-metrics span {
    border-color: var(--paint-border);
    border-radius: 4px !important;
    background: var(--paint-surface-alt);
}

@media (max-width: 1023px) {
    .lattice-auth-body .painting-board {
        padding: 0.85rem !important;
    }

    .lattice-auth-body .painting-table {
        overflow: visible;
        border: 0 !important;
        background: transparent;
    }

    .lattice-auth-body .painting-queue {
        gap: 0.75rem;
        background: transparent;
    }

    .lattice-auth-body .painting-row {
        border: 1px solid var(--paint-border);
        border-radius: 4px !important;
        box-shadow: none;
    }

    .lattice-auth-body .painting-row-button {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 0.95rem;
    }

    .lattice-auth-body .painting-cell {
        width: 100%;
        padding-right: 0;
    }

    .lattice-auth-body .painting-cell:not([data-card-title="true"]) {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 0.9rem;
        border-top: 1px solid var(--paint-border);
        padding-top: 0.7rem;
        text-align: right;
    }

    .lattice-auth-body .painting-cell:not([data-card-title="true"])::before {
        content: attr(data-label);
        flex: 0 0 6.4rem;
        color: #8e9aac;
        font-size: 0.68rem;
        font-weight: 800;
        letter-spacing: 0.1em;
        line-height: 1.25;
        text-align: left;
        text-transform: uppercase;
    }

    .lattice-auth-body .painting-title-cell {
        order: -2;
    }

    .lattice-auth-body .painting-index {
        order: -1;
        border-top: 0 !important;
        padding-top: 0 !important;
    }

    .lattice-auth-body .painting-source {
        justify-content: flex-end;
    }

    .lattice-auth-body .painting-detail-grid,
    .lattice-auth-body .oven-settings-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .lattice-auth-body .painting-toolbar,
    .lattice-auth-body .painting-board-header form {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .lattice-auth-body .painting-stat,
    .lattice-auth-body .painting-action {
        width: 100%;
        min-width: 0;
        padding-right: 0.8rem;
        padding-left: 0.8rem;
        text-align: center;
    }

    .lattice-auth-body .painting-cell:not([data-card-title="true"]) {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.32rem;
        text-align: left;
    }

    .lattice-auth-body .painting-cell:not([data-card-title="true"])::before {
        flex-basis: auto;
    }

    .lattice-auth-body .paint-modal {
        align-items: end;
        padding: 0;
    }

    .lattice-auth-body .paint-modal-panel {
        width: 100%;
        max-height: 92vh;
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 4px 4px 0 0 !important;
        padding: 1rem;
    }

    .lattice-auth-body .paint-modal-form,
    .lattice-auth-body .oven-form,
    .lattice-auth-body .oven-metrics {
        grid-template-columns: 1fr;
    }
}
