.public-signup {
    display: grid;
    gap: 1.25rem;
}

.public-signup__intro h2 {
    margin: 0 0 0.5rem 0;
    font-size: clamp(1.6rem, 2.4vw, 2rem);
    font-weight: 800;
    color: #f8fafc;
}

.public-signup__intro p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.6;
}

.public-signup__billing-toggle {
    display: inline-flex;
    gap: 0.65rem;
    background: rgba(2, 6, 23, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    padding: 0.38rem;
    width: fit-content;
}

.public-signup__toggle-btn {
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #cbd5e1;
    padding: 0.6rem 1.1rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.public-signup__toggle-btn.is-active {
    background: linear-gradient(135deg, #f0cf62, #d4af37);
    color: #0f172a;
    box-shadow: 0 10px 24px rgba(212, 175, 55, 0.35);
}

.public-signup__savings {
    margin: 0.55rem 0 0.2rem 0;
    color: #f8d670;
    font-size: 0.86rem;
}

.public-signup__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.public-signup__module-card {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 16px;
    padding: 1.15rem;
    background: rgba(15, 23, 42, 0.62);
    min-height: 260px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.public-signup__module-card--selected {
    border-color: rgba(212, 175, 55, 0.62);
    box-shadow: 0 18px 40px rgba(212, 175, 55, 0.25);
    background: linear-gradient(160deg, rgba(212, 175, 55, 0.16), rgba(15, 23, 42, 0.82));
}

.public-signup__module-card--locked {
    opacity: 0.86;
    filter: saturate(0.75);
}

.public-signup__module-title {
    margin: 0;
    color: #f8fafc;
    font-size: 1.1rem;
    text-align: center;
}

.public-signup__module-icon {
    width: auto;
    height: auto;
    color: #dbeafe;
    font-size: 1.9rem;
    margin: 0.15rem auto 0.2rem;
    line-height: 1;
}

.public-signup__module-card--selected .public-signup__module-icon {
    color: #f8d670;
}

.public-signup__module-card p {
    margin: 0;
    color: #cbd5e1;
    font-size: 0.94rem;
    line-height: 1.5;
    text-align: center;
}

.public-signup__badge {
    font-size: 0.72rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border: 1px solid rgba(134, 239, 172, 0.35);
}

.public-signup__badge--locked {
    background: rgba(148, 163, 184, 0.14);
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, 0.35);
}

.public-signup__price {
    margin-top: 0;
    color: #f8d670;
    font-weight: 800;
    font-size: 0.92rem;
}

.public-signup__module-list {
    margin: 0;
    padding-left: 1.05rem;
    color: #dbeafe;
    display: grid;
    gap: 0.28rem;
    font-size: 0.82rem;
}

.public-signup__module-foot {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
}

.public-signup__summary-card {
    margin-top: 0.5rem;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 16px;
    padding: 1.2rem;
    background: rgba(2, 6, 23, 0.72);
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.08);
}

.public-signup__field {
    display: grid;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.public-signup__field label {
    color: #dbeafe;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.public-signup__field input {
    border: 1px solid rgba(148, 163, 184, 0.32);
    background: rgba(15, 23, 42, 0.9);
    color: #f8fafc;
    border-radius: 10px;
    padding: 0.6rem 0.7rem;
}

.public-signup__summary-list {
    margin: 0;
    display: grid;
    gap: 0.55rem;
}

.public-signup__summary-list div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.public-signup__summary-list dt {
    color: #94a3b8;
    font-weight: 500;
}

.public-signup__summary-list dd {
    margin: 0;
    color: #f8fafc;
    font-weight: 700;
}

.public-signup__cta {
    width: 100%;
    margin-top: 1.1rem;
}

.public-signup__setup-form {
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .public-signup__grid {
        grid-template-columns: 1fr;
    }
}

.public-signup-page {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(1100px 540px at 10% 0%, rgba(212, 175, 55, 0.18), transparent 70%),
        radial-gradient(1000px 600px at 90% 100%, rgba(30, 64, 175, 0.23), transparent 70%),
        linear-gradient(145deg, #030712, #0f172a 60%, #111827);
}

.public-signup-shell-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.public-signup-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    flex: 1;
    display: flex;
    align-items: center;
}

.public-legal-footer {
    text-align: center;
    font-size: 0.82rem;
    color: #94a3b8;
    padding: 0.5rem 1rem 1.2rem;
}

.public-legal-footer__text {
    margin: 0;
}

.public-legal-footer a {
    color: #cbd5e1;
    text-decoration: none;
}

.public-legal-footer a:hover {
    color: #fbbf24;
    text-decoration: underline;
}

.public-signup-marketing-grid {
    display: grid;
    grid-template-columns: minmax(340px, 1fr) minmax(500px, 1.35fr);
    gap: 1.8rem;
    align-items: stretch;
    width: 100%;
    margin: 0 auto;
}

.public-signup-left,
.public-signup-right {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.56);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 50px rgba(2, 6, 23, 0.45);
    padding: 1.6rem;
}

.public-signup-brand {
    display: inline-flex;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #f8d670;
    font-weight: 800;
    margin-bottom: 0.9rem;
}

.public-signup-left h1 {
    margin: 0;
    color: #f8fafc;
    font-size: clamp(1.95rem, 3.1vw, 2.85rem);
    line-height: 1.15;
    font-weight: 800;
}

.public-signup-lead {
    margin: 0.95rem 0 0.65rem;
    color: #cbd5e1;
    line-height: 1.7;
    max-width: 54ch;
}

.public-signup-toggle-wrap {
    margin-top: 1.5rem;
    padding: 0.95rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.45);
}

.public-signup-toggle-label {
    display: block;
    color: #dbeafe;
    margin-bottom: 0.55rem;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.public-signup__toggle-btn small {
    display: block;
    font-size: 0.7rem;
    line-height: 1.1;
    margin-top: 0.2rem;
    font-weight: 500;
    color: inherit;
    opacity: 0.9;
}

.public-signup-trust-list {
    margin: 1.5rem 0 0;
    padding-left: 1.2rem;
    color: #cbd5e1;
    display: grid;
    gap: 0.62rem;
}

.public-signup-right .public-signup__summary-card {
    margin-top: 1.2rem;
}

.public-signup-section-title {
    color: #e2e8f0;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.public-signup--setup {
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(10px);
    box-shadow: 0 24px 58px rgba(2, 6, 23, 0.48);
    padding: 1.8rem;
}

.public-signup__setup-hero {
    display: flex;
    align-items: center;
    gap: 1.15rem;
    margin-bottom: 1.2rem;
}

.public-signup__setup-logo {
    width: 88px;
    height: 88px;
    border-radius: 16px;
    object-fit: cover;
    border: 1px solid rgba(212, 175, 55, 0.65);
    box-shadow: 0 16px 34px rgba(212, 175, 55, 0.35);
    flex-shrink: 0;
}

.public-signup__setup-card {
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 16px;
    padding: 1.3rem;
    background: rgba(2, 6, 23, 0.55);
}

.public-signup__setup-title {
    color: #f8fafc;
    margin: 0 0 0.4rem;
}

.public-signup__setup-subtitle {
    color: #cbd5e1;
    margin: 0 0 1.25rem;
}

.public-signup__legal-check .form-check-input {
    border-color: rgba(203, 213, 225, 0.45);
    background-color: rgba(255, 255, 255, 0.04);
}

.public-signup__legal-check .form-check-input:focus {
    border-color: #d4af37;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.22);
}

.public-signup__legal-check .form-check-label {
    color: #cbd5e1;
    font-size: 0.92rem;
    line-height: 1.45;
}

.public-signup__legal-check .form-check-label a {
    color: #f8d670;
    text-decoration: none;
}

.public-signup__legal-check .form-check-label a:hover {
    color: #fde68a;
    text-decoration: underline;
}

@media (max-width: 992px) {
    .public-signup-shell {
        align-items: flex-start;
    }

    .public-signup-marketing-grid {
        grid-template-columns: 1fr;
    }

    .public-signup__setup-hero {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
}
/* ===== GLOBAL MESH BACKGROUND ===== */
html, body {
    height: 100%;
}

/* ============================
   Timesheets Admin Dashboard
   (Desktop-first, Figma match)
   ============================ */
.ts-admin {
    --ts-navy: #0f172a;
    --ts-gold: #d4af37;
    --ts-bg: #f8fafc;
    --ts-blue: #2563eb;
    --ts-card: rgba(255, 255, 255, 0.86);
    --ts-border: color-mix(in srgb, rgba(15, 23, 42, 0.12) 70%, #fff);
    --ts-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
    --ts-shadow-sm: 0 10px 22px rgba(15, 23, 42, 0.06);
    color: var(--ts-navy);
}

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

.ts-admin__header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ts-admin__app-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.35), rgba(212, 175, 55, 0.12));
    border: 1px solid color-mix(in srgb, rgba(212, 175, 55, 0.35) 60%, #fff);
    box-shadow: 0 14px 34px rgba(212, 175, 55, 0.22);
    color: color-mix(in srgb, var(--ts-navy) 70%, var(--ts-gold));
    font-size: 1.15rem;
}

.ts-admin__title {
    margin: 0;
    font-size: 2.1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.ts-admin__subtitle {
    margin-top: 2px;
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 500;
}

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

.ts-btn {
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 600;
    height: 40px;
}

.ts-btn--primary {
    background: linear-gradient(180deg, #3b82f6, #1d4ed8);
    border: 1px solid color-mix(in srgb, #3b82f6 55%, #0b2a7a);
    box-shadow: 0 14px 34px rgba(29, 78, 216, 0.24);
    color: white;
}

.ts-btn--primary:hover {
    color: white;
    box-shadow: 0 20px 50px rgba(29, 78, 216, 0.30);
}

.ts-btn--secondary {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--ts-border);
    color: var(--ts-navy);
    box-shadow: var(--ts-shadow-sm);
}

.ts-btn--ghost {
    background: transparent;
    border: 1px solid transparent;
    color: color-mix(in srgb, var(--ts-navy) 65%, #64748b);
}

.ts-btn--filter {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.98), rgba(37, 99, 235, 0.86));
    border: 1px solid color-mix(in srgb, rgba(37, 99, 235, 0.7) 65%, #0b2a7a);
    color: #fff;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.22);
}

.ts-btn--danger {
    background: linear-gradient(180deg, #ef4444, #dc2626);
    border: 1px solid color-mix(in srgb, #ef4444 55%, #7f1d1d);
    color: #fff;
    box-shadow: 0 14px 34px rgba(239, 68, 68, 0.22);
}

.ts-admin__rangebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    padding: 12px 14px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.76));
    border: 1px solid var(--ts-border);
    box-shadow: var(--ts-shadow-sm);
    margin-bottom: 18px;
}

.ts-admin__rangebar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 420px;
}

.ts-admin__rangebar-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, 0.06);
    border: 1px solid color-mix(in srgb, rgba(15, 23, 42, 0.14) 70%, #fff);
    color: var(--ts-navy);
}

.ts-admin__rangebar-date {
    font-weight: 700;
    letter-spacing: -0.01em;
}

.ts-admin__rangebar-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ts-admin__rangebar-select .form-select {
    min-width: 320px;
    height: 40px;
    font-weight: 600;
}

.ts-admin__hint {
    margin: 6px 0 18px 0;
    color: color-mix(in srgb, var(--ts-navy) 55%, #64748b);
    font-size: 0.9rem;
}

.ts-admin__hint-strong {
    font-weight: 700;
    color: var(--ts-navy);
}

.ts-admin__summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 0 0 22px 0;
}

.ts-summary-card {
    border-radius: 18px;
    padding: 18px 18px 16px 18px;
    border: 1px solid var(--ts-border);
    background: #fff;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
    position: relative;
    overflow: hidden;
    min-height: 118px;
}

.ts-summary-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    background: radial-gradient(900px 190px at 10% 15%, rgba(212, 175, 55, 0.10), transparent 60%);
    pointer-events: none;
}

.ts-summary-card--green {
    background: #fff;
}

.ts-summary-card--red {
    background: #fff;
}

.ts-summary-card--green::before {
    background: radial-gradient(900px 190px at 10% 15%, rgba(34, 197, 94, 0.08), transparent 60%);
}

.ts-summary-card--red::before {
    background: radial-gradient(900px 190px at 10% 15%, rgba(239, 68, 68, 0.08), transparent 60%);
}

.ts-summary-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.ts-summary-card__icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--ts-border);
    box-shadow: var(--ts-shadow-sm);
    color: var(--ts-navy);
}

.ts-summary-card__value {
    font-size: 2.15rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.05;
    position: relative;
}

.ts-summary-card__label {
    margin-top: 4px;
    color: #64748b;
    font-weight: 600;
    position: relative;
}

.ts-summary-card__pill {
    font-size: 0.72rem;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.12);
    color: color-mix(in srgb, var(--ts-navy) 65%, #7c5f10);
    border: 1px solid color-mix(in srgb, rgba(212, 175, 55, 0.26) 65%, #fff);
    font-weight: 700;
}

.ts-summary-card__pill--success {
    background: rgba(34, 197, 94, 0.12);
    border-color: color-mix(in srgb, rgba(34, 197, 94, 0.26) 65%, #fff);
    color: #166534;
}

.ts-summary-card__pill--danger {
    background: rgba(239, 68, 68, 0.12);
    border-color: color-mix(in srgb, rgba(239, 68, 68, 0.26) 65%, #fff);
    color: #7f1d1d;
}

.ts-admin__overview-card {
    border-radius: 18px;
    padding: 20px;
    border: 1px solid var(--ts-border);
    background: linear-gradient(180deg, #ffffff, #f9fafb);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
    margin-bottom: 18px;
}

.ts-admin__overview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.ts-admin__kicker {
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--ts-navy) 55%, #64748b);
    font-weight: 800;
}

.ts-admin__overview-range {
    margin-top: 6px;
    font-size: 1.18rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.ts-status-badge {
    padding: 7px 12px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.75rem;
    background: rgba(37, 99, 235, 0.10);
    border: 1px solid color-mix(in srgb, rgba(37, 99, 235, 0.22) 70%, #fff);
    color: color-mix(in srgb, var(--ts-navy) 65%, var(--ts-blue));
}

.ts-admin__overview-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
    margin-top: 16px;
}

.ts-stat__label {
    font-size: 0.7rem;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--ts-navy) 50%, #64748b);
    font-weight: 800;
}

.ts-stat__value {
    margin-top: 8px;
    font-size: 1.75rem;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.ts-stat__value--warn {
    color: #b45309;
}

.ts-stat__value--ok {
    color: #15803d;
}

.ts-admin__divider {
    height: 1px;
    background: color-mix(in srgb, rgba(15, 23, 42, 0.12) 70%, #fff);
    margin: 16px 0;
}

.ts-admin__breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    gap: 14px;
    margin-top: 10px;
}

.ts-mini-card {
    border-radius: 14px;
    padding: 14px 12px;
    background: #fff;
    border: 1px solid var(--ts-border);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
    text-align: center;
}

.ts-mini-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.08);
}

.ts-mini-card__value {
    font-size: 1.2rem;
}

.ts-mini-card__label {
    font-size: 0.7rem;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--ts-navy) 45%, #64748b);
    font-weight: 800;
}

.ts-mini-card__value {
    margin-top: 8px;
    font-size: 1.15rem;
    font-weight: 900;
}

.ts-admin__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 8px 0 18px 0;
    flex-wrap: wrap;
}

/* Engineers table container (match Figma “table card”) */
.ts-admin__engineers {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--ts-border);
    background: linear-gradient(180deg, #ffffff, #f9fafb);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
    padding: 0;
}

.ts-admin__engineers-head {
    border-radius: 0;
    border: none;
    border-bottom: 1px solid color-mix(in srgb, rgba(15, 23, 42, 0.10) 70%, #fff);
    box-shadow: none;
    background: rgba(255, 255, 255, 0.65);
}

.ts-engineer {
    margin-top: 0;
    border: none;
    border-bottom: 1px solid color-mix(in srgb, rgba(15, 23, 42, 0.08) 70%, #fff);
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.ts-engineer:last-of-type {
    border-bottom: none;
}

.ts-engineer__summary {
    padding: 14px 16px;
}

.ts-engineer__summary:hover {
    background: color-mix(in srgb, #ffffff 70%, rgba(212, 175, 55, 0.06));
}

.ts-progress {
    height: 6px;
    background: rgba(15, 23, 42, 0.08);
}

.ts-progress__bar {
    background: linear-gradient(90deg, #d4af37, #f59e0b);
}

.ts-admin__actions-left,
.ts-admin__actions-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ts-admin__header-actions .btn,
.ts-admin__rangebar .btn,
.ts-engineer .btn {
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.ts-admin__rangebar,
.ts-summary-card,
.ts-admin__overview-card,
.ts-mini-card,
.ts-engineer {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ts-summary-card:hover,
.ts-mini-card:hover,
.ts-engineer:hover,
.ts-admin__overview-card:hover,
.ts-admin__rangebar:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.10);
}

.ts-admin__action-form {
    margin: 0;
}

.ts-admin__engineers {
    margin-top: 6px;
}

.ts-admin__engineers-head {
    display: grid;
    grid-template-columns: 1.4fr 2.2fr 0.8fr 0.8fr;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--ts-border);
    box-shadow: var(--ts-shadow-sm);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--ts-navy) 50%, #64748b);
    font-weight: 800;
}

.ts-engineer {
    margin-top: 10px;
    border-radius: 16px;
    border: 1px solid var(--ts-border);
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.ts-engineer__summary {
    list-style: none;
    display: grid;
    grid-template-columns: 40px 1.4fr 2.2fr 0.8fr 0.8fr;
    gap: 14px;
    align-items: center;
    padding: 14px;
    cursor: pointer;
}

.ts-engineer__summary::-webkit-details-marker {
    display: none;
}

.ts-engineer[open] .ts-engineer__chev i {
    transform: rotate(90deg);
}

.ts-engineer__chev i {
    transition: transform 160ms ease;
    color: color-mix(in srgb, var(--ts-navy) 45%, #64748b);
}

.ts-engineer__name-text {
    font-weight: 800;
}

.ts-engineer__completion-text {
    font-size: 0.9rem;
    color: color-mix(in srgb, var(--ts-navy) 70%, #64748b);
}

.ts-engineer__completion-sub {
    margin-left: 8px;
    color: color-mix(in srgb, var(--ts-navy) 55%, #64748b);
    font-weight: 600;
    font-size: 0.85rem;
}

.ts-progress {
    margin-top: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.10);
    overflow: hidden;
}

.ts-progress__bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #d4af37, color-mix(in srgb, #d4af37 40%, #f59e0b));
}

.ts-engineer__hours {
    font-weight: 900;
    text-align: right;
}

.ts-engineer__status {
    text-align: right;
}

.ts-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    border: 1px solid var(--ts-border);
    background: rgba(255, 255, 255, 0.7);
}

.ts-pill--neutral {
    color: color-mix(in srgb, var(--ts-navy) 60%, #64748b);
}

.ts-pill--warn {
    background: rgba(212, 175, 55, 0.12);
    border-color: color-mix(in srgb, rgba(212, 175, 55, 0.24) 60%, #fff);
    color: #7c5f10;
}

.ts-pill--success {
    background: rgba(34, 197, 94, 0.12);
    border-color: color-mix(in srgb, rgba(34, 197, 94, 0.24) 60%, #fff);
    color: #166534;
}

.ts-pill--danger {
    background: rgba(239, 68, 68, 0.12);
    border-color: color-mix(in srgb, rgba(239, 68, 68, 0.24) 60%, #fff);
    color: #7f1d1d;
}

.ts-engineer__details {
    padding: 0 14px 14px 14px;
}

.ts-engineer__sheet-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ts-sheet-list__toolbar {
    padding: 4px 0 2px 0;
}

.ts-select-all-wrap {
    display: inline-flex;
    align-items: center;
    margin: 0;
    cursor: pointer;
    user-select: none;
}

.ts-sheet-block {
    border-radius: 14px;
    border: 1px solid color-mix(in srgb, rgba(15, 23, 42, 0.10) 70%, #fff);
    background: rgba(255, 255, 255, 0.92);
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.ts-sheet-block__header {
    display: grid;
    grid-template-columns: 40px minmax(120px, 1fr) auto minmax(180px, 1.2fr);
    gap: 10px 12px;
    align-items: center;
    padding: 12px 12px;
    border-bottom: 1px solid color-mix(in srgb, rgba(15, 23, 42, 0.08) 70%, #fff);
}

@media (max-width: 992px) {
    .ts-sheet-block__header {
        grid-template-columns: 40px 1fr;
        grid-auto-flow: row;
    }

    .ts-sheet-block__actions {
        grid-column: 1 / -1;
        justify-self: end;
    }
}

.ts-sheet-block__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px 16px;
}

.ts-sheet-block__week {
    font-weight: 800;
    color: var(--ts-navy);
}

.ts-sheet-block__hours {
    font-weight: 900;
    color: var(--ts-navy);
    font-variant-numeric: tabular-nums;
}

.ts-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px 12px;
    padding: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: color-mix(in srgb, var(--ts-navy) 55%, #64748b);
}

.ts-breakdown-grid strong {
    color: var(--ts-navy);
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

/* Sidepanel editor */
.ts-sidepanel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 420px;
    height: 100%;
    background: white;
    box-shadow: -10px 0 30px rgba(0,0,0,0.10);
    transition: right 0.3s ease;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    border-left: 1px solid color-mix(in srgb, rgba(15, 23, 42, 0.10) 70%, #fff);
}

.ts-sidepanel.open {
    right: 0;
}

.ts-sidepanel__header {
    padding: 14px 14px;
    border-bottom: 1px solid color-mix(in srgb, rgba(15, 23, 42, 0.10) 70%, #fff);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ts-sidepanel__title {
    font-weight: 900;
    color: var(--ts-navy);
}

.ts-sidepanel__close {
    border: 1px solid var(--ts-border);
    background: rgba(255,255,255,0.9);
    border-radius: 10px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.ts-sidepanel__content {
    overflow: auto;
    flex: 1;
}

.ts-admin__timesheets-table {
    margin-top: 10px;
}

.ts-row-actions {
    display: inline-flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.ts-admin__archive-selected {
    margin-top: 12px;
    display: flex;
    justify-content: flex-start;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: var(--ao-font);
    color: var(--text-primary);
    line-height: 1.45;
    display: flex;
    flex-direction: column;

    background:
        linear-gradient(115deg, rgba(255,255,255,0.35) 0%, transparent 35%),
        linear-gradient(65deg, rgba(255,255,255,0.25) 0%, transparent 40%),
        linear-gradient(145deg, rgba(255,255,255,0.18) 0%, transparent 45%),

        radial-gradient(900px 250px at 15% 10%, rgba(255,255,255,0.45), transparent 70%),
        radial-gradient(800px 200px at 85% 25%, rgba(255,255,255,0.35), transparent 75%),
        radial-gradient(1000px 300px at 50% 90%, rgba(255,255,255,0.40), transparent 80%),

        radial-gradient(900px 500px at 10% 30%, rgba(212,175,55,0.12), transparent 70%),
        radial-gradient(800px 500px at 90% 20%, rgba(59,130,246,0.12), transparent 75%),
        radial-gradient(700px 400px at 70% 85%, rgba(99,102,241,0.10), transparent 80%),

        linear-gradient(135deg, #f8fafc 0%, #eef2f7 40%, #f8fafc 100%);

    background-attachment: fixed;
}

/* =========================================================
   Requisition modal — financial summary bar
========================================================= */
.req-financial-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: center;
    padding: 16px 20px;
    border-top: 1px solid #e5e5e5;
    background: #fafafa;
}

.req-financial-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.req-financial-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    font-weight: 500;
}

.req-financial-value {
    font-size: 18px;
    font-weight: 600;
    color: #111;
}

.req-financial-item--margin .req-financial-value {
    color: #16a34a; /* will still be overridden by JS classes */
}

.req-financial-sub {
    font-size: 12px;
    color: #777;
}

/* Keep legacy margin color hooks working (if present elsewhere). */
.req-total--margin.negative {
    color: #dc2626;
}

.req-total--margin.warning {
    color: #f59e0b;
}

.req-total--margin.good {
    color: #16a34a;
}

/* New financial bar margin state colors (driven by JS classes). */
.req-financial-item--margin.negative .req-financial-value {
    color: #dc2626;
}

.req-financial-item--margin.warning .req-financial-value {
    color: #f59e0b;
}

.req-financial-item--margin.good .req-financial-value {
    color: #16a34a;
}

main {
    flex: 1;
    background: transparent;
}

a,
a:hover,
a:focus,
a:active {
    text-decoration: none !important;
    color: inherit;
}

.btn,
.btn:hover,
.btn:focus,
.btn:active {
    text-decoration: none !important;
}

/* =========================================================
   ATHENIUM OS — GLOBAL DESIGN SYSTEM (Light theme only)
   - Token-driven, reusable across Ops/Time/Equipment/future modules
   - No backend logic changes required
========================================================= */

/* STRICT SaaS DESIGN SYSTEM TOKENS (Figma) */
:root {
    /* Colors */
    --bg-page: #f7f9fc;
    --card-bg: #ffffff;
    --border: #e5e7eb;

    /* Gold (new, lighter) */
    --primary-gold: #facc15;
    --gold-gradient: linear-gradient(135deg, #facc15, #eab308);
    --primary-blue: #3B82F6;
    --success-green: #22c55e;
    --danger-red: #ef4444;
    --warning-amber: #f59e0b;

    /* Text */
    --text-primary: #111827;
    --text-secondary: #6b7280;

    /* Shadows (exact) */
    --shadow-card: 0 1px 2px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.04);
    --shadow-button: 0 4px 12px rgba(0,0,0,0.08);

    /* Radius (exact) */
    --radius-card: 16px;
    --radius-input: 12px;
    --radius-pill: 999px;

    /* Typography */
    --ao-font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    --ao-font-weight-regular: 400;
    --ao-font-weight-medium: 500;
    --ao-font-weight-semibold: 600;
    --ao-font-weight-bold: 700;

    /* Layout helpers (keep existing) */
    --ao-sidebar-collapsed: 80px;
    --ao-sidebar-expanded: 250px;
    --ao-focus: rgba(59, 130, 246, 0.25);

    /* Athenium brand — navy & gold (premium Ops / cards) */
    --ath-navy: #0f172a;
    --ath-navy-soft: #1e293b;
    --ath-gold: #d4af37;
    --ath-gold-soft: rgba(212, 175, 55, 0.12);
    --ath-bg: #f6f7f9;
    --ath-card: #ffffff;
    --ath-text: #0f172a;
    --ath-muted: #64748b;
    --ath-border: rgba(15, 23, 42, 0.06);

    /* Legacy token mapping (DO NOT USE FOR NEW UI) */
    --ao-primary-blue: var(--primary-blue);
    --ao-primary-gold: var(--primary-gold);
    --ao-bg: var(--bg-page);
    --ao-surface: var(--card-bg);
    --ao-border: var(--border);
    --ao-text: var(--text-primary);
    --ao-text-muted: var(--text-secondary);
    --ao-success: var(--success-green);
    --ao-danger: var(--danger-red);
    --ao-warning: var(--warning-amber);

    /* Legacy radii/shadows mapped to strict system */
    --ao-radius-card: var(--radius-card);
    --ao-radius-input: var(--radius-input);
    --ao-radius-btn: var(--radius-pill);
    --ao-shadow-sm: var(--shadow-card);
    --ao-shadow-md: var(--shadow-card);

    --athenium-gold: #d4af37;
}

/* =========================================================
   Requisitions table UX (clickable rows + hover preview)
========================================================= */
.hidden {
    display: none !important;
}

.req-row {
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

.req-row:hover {
    background: rgba(0, 0, 0, 0.03);
    transform: scale(1.002);
}

/* Archive requisitions — passive SaaS row + overflow menu */
.archive-requisitions tbody tr {
    cursor: default;
    opacity: 0.85;
    transition: background 0.15s ease, opacity 0.15s ease;
}

.archive-requisitions tbody tr:hover {
    background: #fafafa;
    opacity: 1;
    transform: none;
}

.archive-menu-wrapper {
    position: relative;
    display: inline-block;
}

.archive-menu-trigger {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #9ca3af;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 6px;
}

.archive-menu-trigger:hover {
    color: #6b7280;
    background: rgba(0, 0, 0, 0.04);
}

.archive-menu {
    position: absolute;
    right: 0;
    top: 28px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border, #e5e7eb);
    padding: 6px 0;
    display: none;
    min-width: 160px;
    z-index: 10;
}

.archive-menu a,
.archive-menu button {
    display: block;
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary, #111827);
    text-decoration: none !important;
}

.archive-menu a:hover,
.archive-menu button:hover {
    background: #f9fafb;
}

.archive-menu.show {
    display: block;
}

/* Hover preview: never on narrow viewports (touch synthesizes hover); never for self-serve requesters */
@media (max-width: 768px) {
    #req-preview,
    #req-preview.req-hovercard,
    .req-hovercard,
    .hovercard {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
}

body.ops-requester #req-preview,
body.ops-requester .req-hovercard {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.req-hovercard {
    position: fixed;
    left: 0;
    top: 0;
    width: 360px;
    max-width: calc(100vw - 16px);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(17, 24, 39, 0.10);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    padding: 18px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transform: translateY(8px) scale(0.96);
    color: var(--text-primary);
    box-sizing: border-box;
    overflow: hidden;
    transition:
        opacity 160ms cubic-bezier(0.16, 1, 0.3, 1),
        transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.req-hovercard.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.req-hovercard.is-visible {
    opacity: 1;
    transform: translateY(0px) scale(1);
}

@keyframes slideSkeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

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

.req-hovercard__title {
    font-weight: 700;
    font-size: 14px;
    letter-spacing: -0.01em;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

.req-hovercard__id {
    font-weight: 800;
}

.req-hovercard__badge {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(17,24,39,0.10);
    background: rgba(17,24,39,0.04);
    color: rgba(17,24,39,0.82);
    white-space: nowrap;
}
.req-hovercard__badge--blue { background: rgba(59,130,246,0.10); border-color: rgba(59,130,246,0.18); color: #1d4ed8; }
.req-hovercard__badge--amber { background: rgba(245,158,11,0.10); border-color: rgba(245,158,11,0.18); color: #b45309; }
.req-hovercard__badge--purple { background: rgba(99,102,241,0.10); border-color: rgba(99,102,241,0.18); color: #4338ca; }
.req-hovercard__badge--success { background: rgba(34,197,94,0.10); border-color: rgba(34,197,94,0.18); color: #15803d; }
.req-hovercard__badge--neutral { background: rgba(17,24,39,0.05); border-color: rgba(17,24,39,0.10); color: rgba(17,24,39,0.80); }

.req-hovercard__section {
    display: grid;
    gap: 8px;
}

.req-hovercard__sectiontitle {
    font-size: 12px;
    font-weight: 700;
    color: rgba(17, 24, 39, 0.62);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.req-hovercard__row {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 10px;
    align-items: baseline;
}

.req-hovercard__label {
    font-size: 12px;
    color: rgba(17, 24, 39, 0.62);
}

.req-hovercard__value {
    font-size: 13px;
    font-weight: 600;
    color: rgba(17, 24, 39, 0.92);
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

.req-hovercard__value--truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.req-hovercard__divider {
    height: 1px;
    background: rgba(17, 24, 39, 0.08);
    margin: 12px 0;
}

.req-hovercard__parts {
    display: grid;
    gap: 6px;
}

.req-hovercard__part {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
}

.req-hovercard__partname {
    font-size: 13px;
    font-weight: 600;
    color: rgba(17, 24, 39, 0.92);
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

.req-hovercard__partmeta {
    font-size: 12px;
    font-weight: 600;
    color: rgba(17, 24, 39, 0.70);
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
    text-align: right;
}

.req-hovercard__more {
    font-size: 12px;
    font-weight: 600;
    color: rgba(17, 24, 39, 0.58);
    margin-top: 2px;
}

.req-hovercard__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
}

.req-hovercard__kv--span {
    grid-column: 1 / -1;
}

.req-hovercard__muted {
    color: rgba(17, 24, 39, 0.60);
    font-weight: 600;
}

.req-hovercard__margin--good {
    color: #0f766e;
}

.req-hovercard__margin--bad {
    color: #b91c1c;
}


.req-hovercard__loading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(17, 24, 39, 0.72);
    font-weight: 600;
}

.req-hovercard__spinner {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 2px solid rgba(17, 24, 39, 0.16);
    border-top-color: rgba(17, 24, 39, 0.55);
    animation: reqSpin 650ms linear infinite;
}

@keyframes reqSpin {
    to { transform: rotate(360deg); }
}

.req-hovercard__error {
    color: rgba(185, 28, 28, 0.86);
    font-weight: 700;
}

.req-hovercard__empty {
    color: rgba(17, 24, 39, 0.62);
    font-weight: 600;
}

/* =========================================================
   Settings tabs (Athenium)
========================================================= */
.ao-tabs {
    position: relative;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 24px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    border-bottom: 1px solid color-mix(in srgb, var(--ao-border) 75%, #fff);
}

.ao-tab {
    appearance: none;
    border: none;
    background: transparent;
    color: color-mix(in srgb, var(--ao-text-muted) 75%, #000);
    padding: 10px 0 12px;
    border-radius: 0;
    font-weight: 600;
    cursor: pointer;
    transition: all 200ms ease;
    opacity: 0.86;
}

.ao-tab:hover {
    color: color-mix(in srgb, var(--ao-text) 92%, #000);
    transform: translateY(-1px);
    opacity: 1;
}

.ao-tab.is-active {
    color: var(--ao-text);
    font-weight: 700;
    opacity: 1;
    transform: scale(1.03);
}

.ao-tab.is-active:hover {
    transform: translateY(-1px) scale(1.03);
}

.ao-tabs__indicator {
    position: absolute;
    left: 0;
    bottom: -1px;
    height: 3px;
    width: 0;
    background: #d4af37;
    border-radius: 999px;
    transform: translateX(0);
    transition: transform 220ms ease, width 220ms ease;
    box-shadow: 0 2px 8px rgba(212,175,55,0.3);
    will-change: transform, width;
}

.ao-tab:focus-visible {
    outline: 3px solid var(--ao-focus);
    outline-offset: 2px;
}

.ao-tab-panels {
    margin-top: 14px;
    position: relative;
    transition: height 220ms ease;
    width: 100%;
}

.ao-tab-panel {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
    visibility: hidden;
    transition: opacity 220ms ease, transform 220ms ease, visibility 0ms linear 220ms;
}

.ao-tab-panel.is-active {
    position: absolute;
    inset: 0;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
    transition: opacity 220ms ease, transform 220ms ease, visibility 0ms;
}

/* =========================================================
   Company settings (Settings tab)
========================================================= */
.ao-settings-page {
    /* 8px base grid */
    --ao-s-1: 8px;
    --ao-s-2: 16px;
    --ao-s-3: 24px;
    --ao-s-card-pad: 20px;
    --ao-s-label-gap: 6px;
}

.ao-settings-page .form-label {
    margin-bottom: var(--ao-s-label-gap);
}

.ao-settings-page .btn-primary {
    background: linear-gradient(135deg, #D4AF37, #C19A2E) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(212,175,55,0.22) !important;
    transition: all 200ms ease;
}

.ao-settings-page .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(212,175,55,0.30) !important;
}

.ao-settings-page .btn-secondary,
.ao-settings-page .btn-outline-secondary,
.ao-settings-page .btn-outline-primary,
.ao-settings-page .btn-outline-dark {
    border: 1px solid rgba(0,0,0,0.08) !important;
}

.ao-settings-company h5,
.ao-settings-company .ao-section-card__header,
.ao-tabs {
    color: #1F2937;
}

.ao-settings-company label.form-label {
    color: #4B5563;
}

.ao-settings-company .form-control,
.ao-settings-company .form-select {
    color: #111827;
}

.ao-settings-company .form-control::placeholder,
.ao-settings-company .form-select::placeholder {
    color: #9CA3AF;
}

.ao-section-card {
    background: rgba(255,255,255,0.6);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-top: 2px solid rgba(212,175,55,0.2);
    border-radius: 16px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.05);
    padding: var(--ao-s-card-pad);
    margin-bottom: var(--ao-s-3);
    transition: all 200ms ease;
}

.ao-section-card:hover {
    transform: translateY(-3px);
}

.ao-section-card__header {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ao-text);
    margin-bottom: 12px;
}

.ao-settings-company .form-control,
.ao-settings-company .form-select {
    height: 44px;
}

.ao-settings-company .form-control:focus,
.ao-settings-company .form-select:focus {
    border-color: #d4af37 !important;
    box-shadow: 0 0 0 2px rgba(212,175,55,0.15) !important;
}

.ao-settings-save {
    transition: transform 160ms ease, box-shadow 180ms ease;
}

.ao-settings-save:hover {
    transform: translateY(-1px);
}

.company-logo-preview {
    max-height: 60px;
    width: auto;
    border-radius: 6px;
    margin-bottom: 12px;
}

/* =========================================================
   Users table (Settings)
========================================================= */
.ao-users__search {
    position: relative;
    width: min(360px, 100%);
}

.ao-users__search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ao-text-muted);
    pointer-events: none;
}

.ao-users__search input {
    padding-left: 36px;
    height: 42px;
}

.ao-users__table tbody td {
    padding-top: 16px;
    padding-bottom: 16px;
}

.ao-users__table tbody tr:hover {
    background: rgba(0, 0, 0, 0.025);
    transform: scale(1.002);
    box-shadow: 0 6px 14px rgba(0,0,0,0.06);
}

.ao-users__table tbody tr {
    transition: all 150ms ease;
}

.ao-users__table thead th {
    opacity: 0.72;
    font-size: 0.8rem;
}

.ao-users__email {
    font-weight: 500;
}

.ao-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: color-mix(in srgb, var(--ao-text-muted) 88%, #000);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 150ms ease;
    opacity: 0.6;
}

.ao-icon-btn:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: color-mix(in srgb, var(--ao-border) 85%, #fff);
    color: var(--ao-text);
    transform: scale(1.04);
    opacity: 1;
}

.ao-icon-btn:active {
    background: rgba(0,0,0,0.05);
    border-radius: 6px;
}

.ao-icon-btn:focus-visible {
    outline: 3px solid var(--ao-focus);
    outline-offset: 2px;
}

.ao-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.ao-status__dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #94a3b8; /* slate */
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.18);
}

.ao-status__dot.is-active {
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34,197,94,0.5);
    animation: aoPulse 2s infinite;
}

.ao-status__dot.is-locked {
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
}

/* =========================================================
   Users batch modal (Settings) - requisition modal pattern
========================================================= */
.ao-users-modal-overlay {
    z-index: 100020;
    pointer-events: auto;
}

.ao-users-modal-overlay.hidden {
    display: none;
    pointer-events: none;
}

.ao-users-modal-overlay .req-modal__card {
    pointer-events: auto;
}

.ao-users-modal-card {
    width: min(1160px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
}

.ao-users-modal-form {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.ao-users-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 24px 24px 132px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ao-users-modal-section {
    margin-bottom: 0;
}

.ao-users-batch-table-wrap {
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 14px;
    overflow: auto;
    max-height: min(42vh, 420px);
    background: rgba(255, 255, 255, 0.95);
}

.ao-users-batch-table-wrap table {
    margin-bottom: 0;
}

.ao-users-batch-table-wrap thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
}

.ao-users-batch-table-wrap td,
.ao-users-batch-table-wrap th {
    vertical-align: middle;
}

.ao-users-batch-table-wrap .form-control,
.ao-users-batch-table-wrap .form-select {
    height: 42px;
}

.ao-users-modal-footer {
    justify-content: space-between;
}

.ao-users-confirm-overlay {
    z-index: 100030;
}

.ao-users-confirm-card {
    width: min(640px, calc(100vw - 48px));
    max-height: calc(100vh - 96px);
}

.ao-users-confirm-body {
    padding: 22px 24px 26px;
}

.ao-users-confirm-footer {
    justify-content: flex-end;
}

@media (max-width: 992px) {
    .ao-users-modal-card {
        width: calc(100vw - 28px);
        max-height: calc(100vh - 28px);
    }

    .ao-users-modal-body {
        padding: 20px 18px 124px;
    }
}

@keyframes aoPulse {
    0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
    70% { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
    100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

/* =========================================================
   Role management (Settings)
========================================================= */
.ao-card-primary {
    box-shadow: 0 12px 30px rgba(0,0,0,0.08) !important;
    transition: all 200ms ease;
}

.ao-card-primary:hover {
    transform: translateY(-3px);
}

.ao-card-section {
    box-shadow: 0 6px 16px rgba(0,0,0,0.05) !important;
    border: 1px solid rgba(0,0,0,0.04) !important;
    transition: all 200ms ease;
}

.ao-card-section:hover {
    transform: translateY(-3px);
}

.ao-roles__panel {
    border: 1px solid color-mix(in srgb, var(--ao-border) 75%, #fff);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.ao-roles__panel .card-body {
    padding: var(--ao-s-card-pad) !important;
}

.ao-roles__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 440px;
    overflow: auto;
    padding-right: 4px;
}

.ao-roles__item {
    border-radius: 12px !important;
    border: 1px solid color-mix(in srgb, var(--ao-border) 70%, #fff) !important;
    background: rgba(255, 255, 255, 0.65) !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    transition: all 180ms ease;
}

.ao-roles__item:hover {
    transform: translateY(-1px);
    background: rgba(0, 0, 0, 0.03) !important;
}

.ao-roles__item.active {
    background: rgba(212,175,55,0.15) !important;
    border-color: rgba(212, 175, 55, 0.30) !important;
    color: var(--ao-text) !important;
    box-shadow: 0 4px 12px rgba(212,175,55,0.25);
    position: relative;
}

.ao-roles__item.active::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 999px;
    background: #d4af37;
}

.ao-perms__panel {
    border: 1px solid color-mix(in srgb, var(--ao-border) 75%, #fff);
    max-height: 720px;
    overflow: auto;
}

.ao-perms__group {
    background: rgba(255, 255, 255, 0.72);
}

.ao-perms__group .card-body {
    padding: var(--ao-s-card-pad) !important;
}

.ao-perms__group + .ao-perms__group {
    margin-top: var(--ao-s-3);
}

.ao-perms__group-title {
    font-weight: 600;
    letter-spacing: 0.08em;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--ao-text-muted);
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 6px;
}

/* Select all as pill toggle */
.ao-selectall input.select-all-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ao-selectall {
    position: relative;
}

.ao-selectall__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--ao-border) 78%, #fff);
    background: rgba(0, 0, 0, 0.03);
    color: color-mix(in srgb, var(--ao-text-muted) 92%, #000);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 180ms ease;
    user-select: none;
}

.ao-selectall__btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--ao-text);
}

.ao-selectall input.select-all-checkbox:checked + .ao-selectall__btn {
    background: rgba(212, 175, 55, 0.12);
    border-color: rgba(212, 175, 55, 0.25);
    color: #8a6f18;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.18);
}

/* Permission rows */
.ao-perm {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: var(--ao-s-2);
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--ao-border) 78%, #fff);
    background: rgba(255, 255, 255, 0.72);
}

.ao-perm:hover {
    background: rgba(0,0,0,0.02);
    border-color: color-mix(in srgb, var(--ao-border) 70%, #fff);
}

.ao-perm .form-check-input.permission-checkbox {
    margin-top: 0;
    transform: scale(1.18);
    transition: transform 200ms ease;
    position: relative;
    top: 1px; /* optical baseline alignment */
}

.ao-perm .form-check-input.permission-checkbox:checked {
    transform: scale(1.26);
}

.ao-perm__label {
    margin: 0;
    cursor: pointer;
}

.main-content {
    flex: 1;
    min-height: 0;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--ao-primary-blue);
    text-decoration: none;
}

a:hover {
    color: color-mix(in srgb, var(--ao-primary-blue) 88%, #000);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Strong headers, muted secondary text */
h1,
h2,
h3,
h4,
h5 {
    color: var(--ao-text);
    letter-spacing: -0.02em;
}

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

/* =========================================================
   REQUIRED REUSABLE COMPONENT CLASSES
========================================================= */

/* ========== STRICT REUSABLE COMPONENTS (ds-*) ========== */

.ds-kpi-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 22px;
    min-height: 104px;
    text-decoration: none;
    color: var(--text-primary);
    display: block;
    text-decoration: none !important;
}

.ds-kpi-card--clickable {
    cursor: pointer;
}

.ds-kpi-card--clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    text-decoration: none !important;
}

.ds-kpi-card--active {
    border-color: color-mix(in srgb, var(--primary-blue) 55%, var(--border));
}

.ds-kpi-card__label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.ds-kpi-card__value {
    margin-top: 8px;
    font-size: 2.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.ds-kpi-card__icon {
    position: absolute;
    right: 14px;
    top: 14px;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ds-kpi-card__icon--red {
    background: rgba(239, 68, 68, 0.10);
    color: #b91c1c;
}
.ds-kpi-card__icon--amber {
    background: rgba(245, 158, 11, 0.10);
    color: #92400e;
}
.ds-kpi-card__icon--green {
    background: rgba(34, 197, 94, 0.10);
    color: #15803d;
}
.ds-kpi-card__icon--blue {
    background: rgba(59, 130, 246, 0.10);
    color: #1d4ed8;
}

.ds-filterbar {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 10px 12px;
}

.ds-table {
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    overflow: hidden;
    border-collapse: separate;
    border-spacing: 0;
    box-shadow: var(--shadow-card);
}

.ds-table thead th {
    background: rgba(247, 249, 252, 0.9);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.65rem;
    border-bottom: 1px solid var(--border);
    padding: 14px 16px;
    white-space: nowrap;
}

.ds-table tbody td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    vertical-align: middle;
}

.ds-table tbody tr:nth-child(even) {
    background: rgba(247, 249, 252, 0.55);
}

.ds-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.04);
}

.ds-table tbody tr:last-child td {
    border-bottom: none;
}

/* Cards */
.card {
    border: 1px solid var(--border);
    background: var(--card-bg);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--ao-border);
    padding: 14px 16px;
    font-weight: var(--ao-font-weight-semibold);
    color: var(--ao-text);
}

/* Buttons */
.btn-primary,
.btn-gold,
.btn-secondary,
.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: var(--radius-pill);
    padding: 0.7rem 1.15rem;
    font-weight: 500;
    border: 1px solid transparent;
    box-shadow: var(--shadow-button);
    transition: background-color 160ms ease, border-color 160ms ease, transform 120ms ease, box-shadow 160ms ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #d4af37, #c49b2a);
    border: none;
    color: white;
    border-radius: 10px;
    font-weight: 600;
    padding: 10px 14px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #e6c65c, #d4af37);
    color: white;
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.35);
}

.btn-gold {
    background: linear-gradient(135deg, #d4af37, #f1c94a);
    color: #1a1a1a;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-gold:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(212, 175, 55, 0.25);
}

.btn-gold:active {
    transform: translateY(0);
    box-shadow: none;
}

.parts-add-row {
    display: flex;
    justify-content: flex-start;
    margin-top: 12px;
}

.btn-secondary {
    background: var(--card-bg);
    border-color: color-mix(in srgb, var(--border) 75%, #fff);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: color-mix(in srgb, var(--card-bg) 85%, var(--bg-page));
    color: var(--text-primary);
}

.btn-disabled {
    background: #e5e7eb;
    border-color: #e5e7eb;
    color: #6b7280;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 1;
}

.btn-disabled:hover {
    background: #e5e7eb;
    border-color: #e5e7eb;
    color: #6b7280;
    transform: none;
    box-shadow: none;
}

.btn-danger {
    background: var(--danger-red);
    border-color: var(--danger-red);
    color: #fff;
}

/* =========================================================
   Requisition Details — Athenium OS premium screen
========================================================= */

.req-details-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(10px);
    padding: 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.req-details-header h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.req-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.req-status-badge {
    display: inline-block;
    margin-top: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.req-status-badge.submitted {
    background: #f3f4f6;
    color: #555;
}

.req-status-badge.ordered {
    background: rgba(212,175,55,0.15);
    color: #b8962e;
}

.req-status-badge.quoted {
    background: rgba(59,130,246,0.15);
    color: #2563eb;
}

.req-status-badge.completed {
    background: rgba(34,197,94,0.15);
    color: #16a34a;
}

.req-card-section {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.section-title {
    font-size: 12px;
    font-weight: 600;
    color: #888;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}

.req-part-card {
    border-radius: 12px;
    padding: 12px;
    border: 1px solid #eee;
    margin-bottom: 10px;
    background: #fafafa;
}

.req-part-card:hover {
    background: #f5f5f5;
}

.req-details-container {
    padding: 16px;
    max-width: 700px;
    margin: 0 auto;
}

/* Requisition photo thumbnails (Create/Edit parity) */
.req-photo-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.req-photo-thumb {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
}

.req-photo-thumb a {
    display: block;
    width: 100%;
    height: 100%;
}

.req-photos-section {
    margin-top: 12px;
}

.req-photos-header {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.req-photos-scroll {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.req-photos-scroll .req-photo-thumb {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    cursor: pointer;
}

.req-photos-scroll .req-photo-thumb:hover {
    transform: scale(1.05);
    transition: transform 0.15s ease;
}

.req-photos-actions {
    margin-bottom: 10px;
}

.req-add-photos-btn {
    display: inline-block;
    padding: 8px 12px;
    background: #111827;
    color: white;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.req-add-photos-btn:hover {
    background: #000;
}

.req-photo-hover-preview {
    position: fixed !important;

    top: 0 !important;
    left: 0 !important;

    width: 100vw;
    height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 999999;

    opacity: 0;
    pointer-events: none;

    transition: opacity 0.2s ease;
}

.req-photo-hover-preview.active {
    opacity: 1;
}

.req-photo-hover-preview img {
    position: relative;
    max-width: 600px;
    max-height: 80vh;

    border-radius: 12px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.4);
}

.req-photo-hover-preview::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
}

.req-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.req-photo-thumb {
    position: relative;
}

.req-photo-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.req-photo-delete:hover {
    background: rgba(0,0,0,0.85);
}

/* Job photo picker preview (Create modal) */
.req-photo-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.req-photo-preview .req-photo-thumb {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
}

.req-photo-preview .req-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.req-photo-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: black;
    color: white;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

#addJobPhotosBtn {
    width: auto;
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
}

.btn-danger:hover {
    background: color-mix(in srgb, var(--ao-danger) 92%, #000);
    color: #fff;
}

.btn-info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    color: white;
}

.btn-info:hover {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    color: white;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.35);
}

.btn-primary:focus-visible,
.btn-gold:focus-visible,
.btn-secondary:focus-visible,
.btn-danger:focus-visible,
.btn-info:focus-visible {
    outline: 3px solid var(--ao-focus);
    outline-offset: 2px;
}

/* App-wide content width + padding (full width) */
.app-main {
    background: transparent;
}

.app-content {
    padding: 28px 36px;
    background: rgba(255, 255, 255, 0.7);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    border: 1px solid color-mix(in srgb, var(--ao-border) 65%, #fff);
    border-radius: var(--radius-card);
}

@media (min-width: 1200px) {
    .app-content {
        padding-left: 36px;
        padding-right: 36px;
    }
}

/* Inputs */
.input,
.form-control,
.form-select {
    border-radius: var(--radius-input) !important;
    border: 1px solid var(--border) !important;
    background: var(--card-bg) !important;
    color: var(--text-primary) !important;
    box-shadow: none !important;
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

.input:focus,
.form-control:focus,
.form-select:focus {
    border-color: color-mix(in srgb, var(--primary-blue) 55%, var(--border)) !important;
    box-shadow: 0 0 0 4px var(--ao-focus) !important;
}

/* Tables */
.table-modern {
    width: 100%;
    background: var(--ao-surface);
    border: 1px solid var(--ao-border);
    border-radius: var(--ao-radius-card);
    overflow: hidden;
    border-collapse: separate;
    border-spacing: 0;
    box-shadow: var(--ao-shadow-sm);
}

/* Table standardization: apply modern table styling globally */
.table:not(.table-modern) {
    border-color: var(--ao-border);
    color: var(--ao-text);
}

.table:not(.table-modern) thead th {
    background: color-mix(in srgb, var(--ao-bg) 55%, var(--ao-surface));
    color: var(--ao-text-muted);
    font-weight: var(--ao-font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.65rem;
    border-bottom: 1px solid var(--ao-border);
    padding: 12px 14px;
    white-space: nowrap;
}

.table:not(.table-modern) tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--ao-border);
    vertical-align: middle;
}

.table:not(.table-modern) tbody tr:nth-child(even) {
    background: color-mix(in srgb, var(--ao-bg) 35%, var(--ao-surface));
}

.table:not(.table-modern) tbody tr:hover {
    background: color-mix(in srgb, var(--ao-primary-blue) 6%, var(--ao-surface));
}

.table-modern thead th {
    background: color-mix(in srgb, var(--ao-bg) 55%, var(--ao-surface));
    color: var(--ao-text);
    font-weight: var(--ao-font-weight-semibold);
    border-bottom: 1px solid var(--ao-border);
    padding: 12px 14px;
    white-space: nowrap;
}

.table-modern tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--ao-border);
    color: var(--ao-text);
    vertical-align: middle;
}

.table-modern tbody tr:nth-child(even) {
    background: color-mix(in srgb, var(--ao-bg) 35%, var(--ao-surface));
}

.table-modern tbody tr:hover {
    background: color-mix(in srgb, var(--ao-primary-blue) 6%, var(--ao-surface));
}

.table-modern tbody tr:last-child td {
    border-bottom: none;
}

/* (ds-badge) defined at end-of-file */

@media (max-width: 768px) {

    /* Premium palette */
    .role-employee {
        --parts-navy: #0f172a;
        --parts-gold: #d4af37;
        --parts-text: #1f2937;
        --parts-muted: #6b7280;
        --parts-danger: #dc2626;
        --parts-bg: #f8fafc;
    }

    /* Remove desktop table header on mobile */
    .role-employee .req-parts-header {
        display: none !important;
    }
    .view-only input,
    .view-only select,
    .view-only textarea {
        border: none !important;
        background: transparent !important;
        padding-left: 0 !important;
        font-weight: 500;
    }

    .view-only label {
        font-size: 0.75rem;
        color: var(--ao-text-muted);
        text-transform: uppercase;
        letter-spacing: 0.08em;
        font-weight: var(--ao-font-weight-semibold);
    }
}

/* Link reset utility (remove inline styles) */
.link-reset {
    color: inherit;
    text-decoration: none;
}

.link-reset:hover {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* All buttons: premium SaaS lift / press */
.btn {
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.2s ease;
    transform: translateY(0);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* HOVER (lift effect) */
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.btn-primary:hover {
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.35);
}

.btn-info:hover {
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.35);
}

/* ACTIVE (press effect) */
.btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.btn:disabled,
.btn[disabled] {
    background: #f3f4f6 !important;
    color: #9ca3af !important;
    cursor: not-allowed;
    box-shadow: none !important;
    transform: none !important;
}

.btn:disabled:hover,
.btn[disabled]:hover {
    background: #f3f4f6 !important;
    color: #9ca3af !important;
    box-shadow: none !important;
    transform: none !important;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.btn-sm {
    padding: 0.55rem 0.9rem !important;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--ao-sidebar-collapsed);
    background: color-mix(in srgb, var(--ao-surface) 92%, var(--ao-bg));
    border-right: 1px solid var(--ao-border);
    color: var(--ao-text);
    transition: background-color 180ms ease, border-color 180ms ease;
    overflow: visible; /* tooltips must not clip */
    z-index: 50; /* z-index hierarchy: sidebar */
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

/* Athenium icon-only sidebar */
.ao-sidebar {
    display: flex;
    flex-direction: column;
    padding: 10px 0 12px;
}

.sidebar-logo {
    display: flex;
    justify-content: center;
    padding-top: 22px; /* breathing room above logo */
    padding-bottom: 16px;
    margin-bottom: 36px; /* 32px–40px */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.sidebar-logo img {
    height: 36px;
    width: auto;
    display: block;
    opacity: 0.9;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15));
    transition: transform 180ms ease, opacity 180ms ease;
}

.sidebar-logo img:hover {
    transform: scale(1.04);
    opacity: 0.95;
}

.ao-sidebar__nav {
    padding: 2px 0;
}

.sidebar-nav {
    padding-top: 16px;
}

.ao-sidebar__bottom {
    padding-top: 10px;
}

.ao-sidebar__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px; /* vertical spacing between items */
}

.ao-sidebar__item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}

.ao-sidebar__link {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: transparent;
    color: color-mix(in srgb, var(--ao-text) 82%, #fff);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 180ms ease;
    text-decoration: none;
}

.ao-sidebar__link:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: color-mix(in srgb, var(--ao-border) 82%, #fff);
    transform: translateY(-2px);
}

.ao-sidebar__link:focus-visible {
    outline: 3px solid var(--ao-focus);
    outline-offset: 2px;
}

.ao-sidebar__link.is-active {
    background: rgba(212, 175, 55, 0.12); /* soft gold tint */
    border-color: color-mix(in srgb, var(--ao-primary-gold) 55%, var(--ao-border));
    box-shadow:
        0 0 12px rgba(212,175,55,0.35),
        inset 0 0 6px rgba(255,255,255,0.4);
    transform: scale(1.05);
    color: #d4af37;
}

.ao-sidebar__icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 22px;
}

.ao-sidebar__icon i,
.ao-sidebar__icon svg {
    display: block;
}

/* Tooltip: floating, not clipped, above all content */
.ao-sidebar__tooltip {
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(-6px);
    opacity: 0;
    pointer-events: none;
    z-index: 120; /* z-index hierarchy: tooltips (100+) */

    background: rgba(15, 23, 42, 0.92);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.22);
    padding: 8px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;

    transition: opacity 140ms ease, transform 160ms ease;
    transition-delay: 0s;
}

.ao-sidebar__link:hover .ao-sidebar__tooltip,
.ao-sidebar__link:focus-visible .ao-sidebar__tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
    transition-delay: 100ms;
}

/* Button-in-form should look like link */
.ao-sidebar__logout {
    margin: 0;
}

.ao-sidebar__logout .ao-sidebar__link {
    appearance: none;
    cursor: pointer;
}

/* Push page content right (keeps existing behavior) */
.layout-wrapper {
    margin-left: var(--ao-sidebar-collapsed);
    overflow: visible;
}

@media (max-width: 767.98px) {
    .layout-wrapper {
        margin-left: 0 !important;
    }

    .sidebar.ao-sidebar {
        transform: translateX(-100%);
        transition: transform 0.22s ease;
        box-shadow: 8px 0 28px rgba(15, 23, 42, 0.14);
        z-index: 1050;
        width: min(288px, 88vw);
    }

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

    body.sidebar-open::before {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.4);
        z-index: 1040;
    }
}

@media (min-width: 768px) {
    body.sidebar-open::before {
        content: none;
        display: none;
    }

    .sidebar.ao-sidebar {
        transform: none !important;
    }
}

/* Guardrails: prevent accidental tooltip clipping */
.app-main,
.app-content,
.main-content {
    overflow: visible;
}

/* =========================================================
   COMPATIBILITY LAYER (existing markup styles)
   - keeps pages looking consistent without editing backend/markup
========================================================= */

.tenant-logo-container {
    height: 40px;
    width: 180px;
    display: flex;
    align-items: center;
    overflow: hidden;
    flex-shrink: 0;
}

.tenant-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* Map Bootstrap buttons to new system */
.btn.btn-primary {
    background: linear-gradient(135deg, #d4af37, #c49b2a) !important;
    border: none !important;
    color: #fff !important;
}

.btn.btn-primary:hover {
    background: linear-gradient(135deg, #e6c65c, #d4af37) !important;
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.35) !important;
}

.btn.btn-secondary {
    background: color-mix(in srgb, var(--ao-bg) 55%, var(--ao-surface)) !important;
    border-color: var(--ao-border) !important;
    color: var(--ao-text) !important;
}

.btn.btn-warning {
    background: var(--ao-primary-gold) !important;
    border-color: color-mix(in srgb, var(--ao-primary-gold) 70%, #000) !important;
    color: #1f2937 !important;
    font-weight: var(--ao-font-weight-semibold);
    border-radius: var(--ao-radius-btn) !important;
}

.btn.btn-success {
    background: var(--ao-primary-blue) !important;
    border-color: color-mix(in srgb, var(--ao-primary-blue) 70%, #000) !important;
    color: #fff !important;
}

.btn.btn-info {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    border: none !important;
    color: #fff !important;
}

.btn.btn-info:hover {
    background: linear-gradient(135deg, #60a5fa, #3b82f6) !important;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.35) !important;
}

.btn.btn-dark {
    background: color-mix(in srgb, var(--ao-bg) 55%, var(--ao-surface)) !important;
    border-color: var(--ao-border) !important;
    color: var(--ao-text) !important;
}

.btn.btn-outline-primary,
.btn.btn-outline-success,
.btn.btn-outline-secondary,
.btn.btn-outline-warning,
.btn.btn-outline-dark {
    background: color-mix(in srgb, var(--ao-bg) 55%, var(--ao-surface)) !important;
    border-color: var(--ao-border) !important;
    color: var(--ao-text) !important;
    box-shadow: var(--ao-shadow-sm) !important;
}

.btn.btn-outline-primary:hover,
.btn.btn-outline-success:hover,
.btn.btn-outline-secondary:hover,
.btn.btn-outline-warning:hover,
.btn.btn-outline-dark:hover {
    background: var(--ao-surface) !important;
}

.btn.btn-danger {
    background: var(--ao-danger) !important;
    border-color: color-mix(in srgb, var(--ao-danger) 70%, #000) !important;
    border-radius: var(--ao-radius-btn) !important;
}

/* Card utility normalization (many views use Bootstrap utilities) */
.card.shadow-sm {
    box-shadow: var(--ao-shadow-sm) !important;
}

.card.border-0 {
    border: 1px solid var(--ao-border) !important;
}

/* Bootstrap badge mapping removed (strict Figma badges applied above) */

/* Dashboard table/card selectors mapped to modern table/card styling */
.dashboard-table-card {
    border: 1px solid var(--ao-border);
    border-radius: var(--ao-radius-card);
    box-shadow: var(--ao-shadow-sm);
    background: var(--ao-surface);
}

.dashboard-table-header {
    background: transparent;
    font-weight: var(--ao-font-weight-semibold);
    padding: 14px 16px;
    border-bottom: 1px solid var(--ao-border);
    color: var(--ao-text);
}

.dashboard-table-card thead {
    background: color-mix(in srgb, var(--ao-bg) 55%, var(--ao-surface));
}

.dashboard-table tbody tr:nth-child(even) {
    background: color-mix(in srgb, var(--ao-bg) 35%, var(--ao-surface));
}

.dashboard-table tbody tr:hover {
    background: color-mix(in srgb, var(--ao-primary-blue) 6%, var(--ao-surface));
}

/* Table "badge-like" overrides removed (Ops now uses ds-badge) */

/* KPI cards tuned to new light system */
.kpi-card {
    position: relative;
    border-radius: var(--ao-radius-card);
    padding: 18px;
    background: var(--ao-surface);
    border: 1px solid var(--ao-border);
    box-shadow: var(--ao-shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 90px;
    transition: transform 140ms ease, box-shadow 160ms ease;
}

.kpi-filter:hover {
    transform: translateY(-4px);
    box-shadow: var(--ao-shadow-md);
}

.kpi-filter.active {
    transform: translateY(-4px);
    box-shadow: var(--ao-shadow-md);
    background: color-mix(in srgb, var(--ao-bg) 55%, var(--ao-surface));
}

.kpi-title {
    font-size: 0.7rem;
    font-weight: var(--ao-font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ao-text-muted);
}

.kpi-value {
    font-size: 2rem;
    font-weight: 800;
    margin-top: 8px;
    color: var(--ao-text);
}

.kpi-icon {
    position: absolute;
    right: 14px;
    top: 14px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ao-border);
    background: color-mix(in srgb, var(--ao-bg) 55%, var(--ao-surface));
    color: var(--ao-text);
}

.kpi-warning .kpi-icon {
    color: color-mix(in srgb, var(--ao-warning) 70%, #000);
    background: color-mix(in srgb, var(--ao-warning) 10%, #fff);
    border-color: color-mix(in srgb, var(--ao-warning) 18%, var(--ao-border));
}

.kpi-success .kpi-icon {
    color: color-mix(in srgb, var(--ao-success) 65%, #000);
    background: color-mix(in srgb, var(--ao-success) 9%, #fff);
    border-color: color-mix(in srgb, var(--ao-success) 18%, var(--ao-border));
}

.kpi-primary .kpi-icon {
    color: color-mix(in srgb, var(--ao-primary-blue) 70%, #000);
    background: color-mix(in srgb, var(--ao-primary-blue) 8%, #fff);
    border-color: color-mix(in srgb, var(--ao-primary-blue) 18%, var(--ao-border));
}

/* =========================================================
   OPS PAGE (Figma match)
========================================================= */

.ops-page {
    color: var(--ao-text);
}

/* Ops canvas — structured page depth so white/navy cards read clearly (all roles) */
main.app-main:has(.ops-page) {
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

main.app-main:has(.ops-page) .app-content {
    background: transparent !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Mobile employee Ops: forced neutral canvas (cards must not blend with page) */
@media (max-width: 767.98px) {
    body.role-employee:not(.landing-page) .layout-wrapper {
        background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    }

    body.role-employee:not(.landing-page) .layout-wrapper > .flex-fill {
        background-color: transparent !important;
    }

    body.role-employee:not(.landing-page) main.app-main {
        background-color: transparent !important;
    }

    body.role-employee:not(.landing-page) main.app-main:has(.ops-page) .app-content {
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        padding-top: 16px;
        padding-bottom: 28px;
    }
}

.ops-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    padding: 12px 16px;
    background: #ffffff;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 12px;
}

.ops-header__left {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.ops-back {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ao-surface);
    border: 1px solid var(--ao-border);
    box-shadow: var(--ao-shadow-sm);
    color: var(--ao-text);
    text-decoration: none;
    flex: 0 0 auto;
}

button.ops-back {
    appearance: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
    line-height: 1;
}

.ops-back:hover {
    text-decoration: none;
    background: color-mix(in srgb, var(--ao-bg) 55%, var(--ao-surface));
}

a.ops-back.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0f172a;
    font-weight: 500;
}

.back-btn:active,
.cancel-btn:active {
    opacity: 0.6;
}

/* Timesheets — same navigation rhythm as Ops (back | centred title | actions) */
.timesheets-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 1rem;
    padding: 12px 16px;
    background: #ffffff;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 12px;
}

.timesheets-page-header__start {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    min-width: 36px;
}

.timesheets-page-header__center {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
}

.timesheets-page-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.2;
    text-align: center;
}

.timesheets-page-header__actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 36px;
    min-height: 36px;
}

/* Timesheets — mobile create form (Figma-aligned) */
.ts-mobile-form {
    --ts-mobile-radius-input: 12px;
    --ts-mobile-gap-section: 16px;
    --ts-mobile-input-bg: #f1f5f9;
    --ts-mobile-input-border: rgba(15, 23, 42, 0.12);
    --ts-mobile-blue: var(--ao-primary-blue, #2563eb);
    --ts-mobile-total-bg: color-mix(in srgb, var(--ts-mobile-blue) 12%, #ffffff);
    --ts-mobile-action-navy: #0f172a;
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    margin: 0 auto;
    max-width: 520px;
    box-sizing: border-box;
}

.ts-mobile-form__scroll {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

.ts-mobile-form__scroll-main {
    flex: 1 1 auto;
    padding: 12px 16px 0;
    box-sizing: border-box;
}

.ts-mobile-form__section--last-fields {
    gap: 6px;
    margin-bottom: 20px;
}

.ts-mobile-form__section--last-fields #ts-callouts {
    margin-bottom: 0;
}

.ts-mobile-form__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 4px;
}

.ts-mobile-form__title-block {
    min-width: 0;
}

.ts-mobile-form__title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: #0f172a;
}

.ts-mobile-form__subtitle {
    margin: 6px 0 0;
    font-size: 0.9375rem;
    color: #64748b;
    font-weight: 500;
}

.ts-mobile-form__close {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: -8px -8px 0 0;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #94a3b8;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: color 120ms ease, background-color 120ms ease;
}

.ts-mobile-form__close:hover {
    color: #475569;
    background: rgba(15, 23, 42, 0.06);
}

.ts-mobile-form__rule {
    margin: 12px 0 var(--ts-mobile-gap-section);
    border: 0;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    opacity: 1;
}

.ts-mobile-form__rule--inset {
    margin: var(--ts-mobile-gap-section) 0;
}

.ts-mobile-form__section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ts-mobile-form__section + .ts-mobile-form__section {
    margin-top: var(--ts-mobile-gap-section);
}

.ts-mobile-form__section-title {
    margin: 0 0 4px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}

.ts-mobile-form__label {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
}

.ts-mobile-form__control {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid var(--ts-mobile-input-border);
    border-radius: var(--ts-mobile-radius-input);
    background: var(--ts-mobile-input-bg);
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

.ts-mobile-form__control::placeholder {
    color: #94a3b8;
    font-weight: 450;
}

.ts-mobile-form__control:focus {
    outline: none;
    border-color: color-mix(in srgb, var(--ts-mobile-blue) 45%, var(--ts-mobile-input-border));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ts-mobile-blue) 22%, transparent);
}

.ts-mobile-form__select {
    font-weight: 600;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.ts-mobile-form__textarea {
    min-height: 5.5rem;
    resize: vertical;
    font-weight: 450;
}

.ts-mobile-form__helper {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 2px 0 0;
    font-size: 0.8125rem;
    line-height: 1.35;
    color: #64748b;
}

.ts-mobile-form__helper-icon {
    flex-shrink: 0;
    margin-top: 1px;
    color: #94a3b8;
}

.ts-mobile-form__grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 4px;
}

.ts-mobile-form__grid2 > div {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ts-mobile-form__grid2--pair-row {
    margin-top: 12px;
}

/* Timesheet create — sticky footer (native-style) */
.timesheet-actions {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    flex-shrink: 0;
    display: flex;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 16px 16px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(to top, #ffffff 80%, rgba(255, 255, 255, 0));
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: box-shadow 180ms ease;
}

.timesheet-actions--scrolled {
    box-shadow: 0 -10px 28px rgba(15, 23, 42, 0.12);
}

.ts-mobile-form__btn {
    flex: 1;
    min-height: 48px;
    padding: 12px 16px;
    border-radius: var(--ts-mobile-radius-input);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease, border-color 120ms ease;
}

.ts-mobile-form__btn:active {
    transform: scale(0.98);
}

.ts-mobile-form__btn--secondary {
    background: #f8fafc;
    color: #334155;
    border: 1px solid rgba(15, 23, 42, 0.12);
}

.ts-mobile-form__btn--secondary:hover {
    background: #f1f5f9;
    border-color: rgba(15, 23, 42, 0.18);
}

.ts-mobile-form__btn--primary {
    background: var(--ts-mobile-action-navy);
    color: #ffffff;
    border: 1px solid rgba(212, 175, 55, 0.35);
    box-shadow:
        0 4px 14px rgba(15, 23, 42, 0.25),
        0 0 20px rgba(212, 175, 55, 0.2);
}

.ts-mobile-form__btn--primary:hover {
    filter: brightness(1.06);
    box-shadow:
        0 6px 18px rgba(15, 23, 42, 0.3),
        0 0 26px rgba(212, 175, 55, 0.28);
}

.ops-title {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: #0f172a;
}

.ops-subtitle {
    margin-top: 2px;
    font-size: 0.95rem;
    color: #475569;
    font-weight: var(--ao-font-weight-medium);
}

.ops-header__right {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.ops-btn-secondary {
    background: color-mix(in srgb, var(--ao-bg) 55%, var(--ao-surface));
    border: 1px solid var(--ao-border);
    color: var(--ao-text);
    box-shadow: var(--ao-shadow-sm);
    border-radius: var(--ao-radius-btn);
    padding: 0.55rem 0.9rem;
    font-weight: var(--ao-font-weight-semibold);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 160ms ease, border-color 160ms ease, transform 120ms ease;
}

.ops-btn-secondary:hover {
    text-decoration: none;
    background: var(--ao-surface);
    color: var(--ao-text);
    transform: translateY(-1px);
}

.ops-btn-primary {
    border-radius: 10px;
    padding: 0.7rem 1.15rem;
    font-weight: 500;
}

/* Ops — Create Requisition: navy anchor + gold depth (scoped; does not change global .btn-gold) */
.ops-page .ops-header__right .btn-gold.ops-btn-primary {
    background: #0f172a !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    font-weight: 500 !important;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.25) !important;
    transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

.ops-page .ops-header__right .btn-gold.ops-btn-primary:hover {
    background: #1e293b !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.32) !important;
}

.ops-page .ops-header__right .btn-gold.ops-btn-primary:active {
    transform: translateY(0);
}

.ops-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 14px;
}

.ops-table-meta {
    margin: 8px 0 12px;
    font-size: 14px;
    color: #6b7280;
}

.ops-table-meta strong {
    color: #111827;
    font-weight: 600;
}

.ops-stat-card {
    /* legacy alias: use ds-kpi-card */
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 22px;
    min-height: 104px;
}

.ops-stat-card:hover {
    text-decoration: none;
}

.ops-stat-card__meta {
    font-size: 0.7rem;
    font-weight: var(--ao-font-weight-bold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ao-text-muted);
}

.ops-stat-card__value {
    margin-top: 8px;
    font-size: 2.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ao-text);
}

.ops-stat-card__icon {
    position: absolute;
    right: 14px;
    top: 14px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
}

.ops-stat-card__icon--danger {
    color: color-mix(in srgb, var(--ao-danger) 65%, #000);
    background: color-mix(in srgb, var(--ao-danger) 8%, #fff);
    border-color: color-mix(in srgb, var(--ao-danger) 18%, var(--ao-border));
}

.ops-stat-card__icon--warning {
    color: color-mix(in srgb, var(--ao-warning) 70%, #000);
    background: color-mix(in srgb, var(--ao-warning) 10%, #fff);
    border-color: color-mix(in srgb, var(--ao-warning) 18%, var(--ao-border));
}

.ops-stat-card__icon--success {
    color: color-mix(in srgb, var(--ao-success) 65%, #000);
    background: color-mix(in srgb, var(--ao-success) 9%, #fff);
    border-color: color-mix(in srgb, var(--ao-success) 18%, var(--ao-border));
}

.ops-stat-card__icon--primary {
    color: color-mix(in srgb, var(--ao-primary-blue) 70%, #000);
    background: color-mix(in srgb, var(--ao-primary-blue) 8%, #fff);
    border-color: color-mix(in srgb, var(--ao-primary-blue) 18%, var(--ao-border));
}

.ops-filterbar {
    background: color-mix(in srgb, var(--ao-bg) 55%, var(--ao-surface));
    border: 1px solid var(--ao-border);
    border-radius: var(--ao-radius-card);
    box-shadow: var(--ao-shadow-md);
    padding: 8px 10px;
    display: grid;
    grid-template-columns: 1.2fr 1.1fr 0.8fr 0.8fr auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}

.ops-filterbar__field {
    position: relative;
    display: flex;
    align-items: center;
    height: 40px;
    background: var(--ao-surface);
    border: 1px solid var(--ao-border);
    border-radius: 999px;
}

.ops-filterbar__icon {
    position: absolute;
    left: 12px;
    color: var(--ao-text-muted);
    font-size: 0.95rem;
    pointer-events: none;
}

.ops-filterbar__input {
    height: 40px;
    padding-left: 34px;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.ops-filterbar__select {
    height: 40px;
    border-radius: 999px !important;
    background: var(--ao-surface) !important;
}

.ops-filterbar__clear {
    height: 40px;
    border-radius: 999px;
    border: 1px solid var(--ao-border);
    background: transparent;
    color: var(--ao-text-muted);
    font-weight: var(--ao-font-weight-semibold);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 14px;
    text-decoration: none;
    justify-content: center;
    white-space: nowrap;
}

.ops-filterbar__clear:hover {
    text-decoration: none;
    background: color-mix(in srgb, var(--ao-bg) 55%, var(--ao-surface));
    color: var(--ao-text);
}

/* Ops table toolbar — single search + filters */
.table-toolbar-wrap {
    margin-bottom: 4px;
}

.table-toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.table-toolbar .ops-search {
    flex: 1;
    min-width: 200px;
    max-width: 400px;
}

.table-toolbar .ops-search .table-search {
    width: 100%;
}

/* Ops toolbar search — navy-tinted field + gold focus ring */
.ops-page .table-toolbar .ops-search .table-search {
    background: rgba(15, 23, 42, 0.03) !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    color: #0f172a !important;
}

.ops-page .table-toolbar .ops-search .table-search:focus {
    border-color: #d4af37 !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15) !important;
}

.table-toolbar .table-toolbar__select {
    width: auto;
    min-width: 9.5rem;
    max-width: 11rem;
}

.table-toolbar .btn-clear {
    font-size: 12px;
    padding: 6px 10px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    color: inherit;
    white-space: nowrap;
}

.table-toolbar .btn-clear:hover {
    background: rgba(0, 0, 0, 0.04);
}

.ops-table thead th {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.65rem;
    color: var(--ao-text-muted);
}

.ops-customer {
    font-weight: var(--ao-font-weight-semibold);
}

.ops-page .ops-customer {
    color: #0f172a;
    font-weight: 600;
}

.ops-page .ops-table tbody td:not(.ops-customer):not(:has(.ds-badge)) {
    color: #475569;
}

.ops-table tbody td {
    padding-top: 12px;
    padding-bottom: 12px;
    vertical-align: middle;
    border-bottom-color: rgba(229, 231, 235, 0.65);
}

.ops-table tbody tr:nth-child(even) {
    background: rgba(247, 249, 252, 0.55);
}

.ops-table tbody tr:hover {
    background: rgba(59,130,246,0.04);
}

.ops-table tbody td:not(.ops-customer):not(:has(.ds-badge)) {
    color: color-mix(in srgb, var(--ao-text-muted) 92%, #000);
}

.ops-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: color-mix(in srgb, var(--ao-text-muted) 75%, #000);
    text-decoration: none;
    margin-left: 8px;
    vertical-align: middle;
}

.ops-action:hover {
    text-decoration: none;
    color: var(--ao-text);
    border-color: var(--ao-border);
    background: color-mix(in srgb, var(--ao-bg) 55%, var(--ao-surface));
}

.ops-action:focus-visible {
    outline: 3px solid var(--ao-focus);
    outline-offset: 2px;
}

.ops-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 6px;
    margin-top: 12px;
    font-size: 13px;
    color: #6B7280;
}

.ops-pagination__left {
    font-weight: 500;
}

.ops-pagination__right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Page size */
.ops-pagination__page-size {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ops-pagination__page-size select {
    border-radius: 8px;
    padding: 4px 8px;
    border: 1px solid #E5E7EB;
    background: white;
    font-size: 13px;
}

/* Page buttons */
.ops-pagination__controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

@media (max-width: 768px) {
    .ops-header-mobile {
        margin-bottom: 12px;
        padding: 10px 0 12px;
        background: #ffffff;
        border-bottom: 1px solid rgba(15, 23, 42, 0.06);
        border-radius: 12px;
    }

    .ops-page .ops-header-mobile .ops-header-right .btn.btn-primary {
        background: #0f172a !important;
        color: #ffffff !important;
        border-color: transparent !important;
        border-radius: 10px !important;
        font-weight: 500 !important;
        box-shadow: 0 4px 12px rgba(212, 175, 55, 0.25) !important;
    }

    .ops-page .ops-header-mobile .ops-header-right .btn.btn-primary:hover,
    .ops-page .ops-header-mobile .ops-header-right .btn.btn-primary:focus {
        background: #1e293b !important;
        color: #ffffff !important;
    }

    .ops-header-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
        column-gap: 8px;
    }

    .ops-header-left {
        display: flex;
        gap: 6px;
        flex-shrink: 0;
        justify-self: start;
    }

    .ops-header-title {
        font-weight: 600;
        font-size: 18px;
        line-height: 1.2;
        text-align: center;
        justify-self: center;
        grid-column: 2;
        min-width: 0;
        color: #0f172a;
    }

    .ops-header-right {
        justify-self: end;
        grid-column: 3;
        flex-shrink: 0;
    }

    .ops-header-right .btn {
        padding: 6px 10px;
        font-size: 13px;
    }

    .icon-btn {
        background: #f3f4f6;
        border: none;
        border-radius: 8px;
        width: 36px;
        height: 36px;
        font-size: 16px;
        line-height: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: inherit;
        padding: 0;
    }

    .icon-btn:focus-visible {
        outline: 3px solid var(--ao-focus, #3b82f6);
        outline-offset: 2px;
    }

    a.icon-btn {
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
    }

    .icon-btn--back {
        transition: transform 0.12s ease, background-color 0.12s ease;
    }

    .icon-btn--back:active {
        transform: scale(0.96);
        background: #e5e7eb;
    }

    @media (hover: hover) {
        .icon-btn--back:hover {
            background: #e5e7eb;
        }
    }

    .table-toolbar-wrap .table-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .table-toolbar-wrap .table-toolbar .ops-search {
        flex: none;
        min-width: 0;
        max-width: none;
    }

    .ops-search input {
        width: 100%;
        border-radius: 10px;
    }

    .table-toolbar-wrap .table-toolbar .table-search {
        min-width: 0;
        max-width: none;
    }

    .ops-meta {
        font-size: 13px;
        color: #666;
        margin: 4px 0 10px;
    }

    .ops-pagination__left,
    .ops-pagination__page-size,
    .ops-page-nav {
        display: none !important;
    }

    .ops-pagination {
        justify-content: center;
        padding-left: 0;
        padding-right: 0;
    }

    .ops-pagination__right {
        justify-content: center;
        width: 100%;
    }

    .ops-pagination__controls {
        flex-wrap: wrap;
        justify-content: center;
    }
}

.ops-autocomplete {
    position: relative;
    width: 100%;
}

.ops-autocomplete__results {
    position: absolute;
    top: 44px;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    z-index: 1000;
    overflow: hidden;
}

.ops-autocomplete__item {
    padding: 10px 12px;
    font-size: 13px;
    cursor: pointer;
    color: #374151;
}

.ops-autocomplete__item:hover {
    background: #F3F4F6;
}

.ops-page-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    color: #6B7280;
    text-decoration: none;
    font-weight: 500;
}

.ops-page-btn:hover {
    background: #F3F4F6;
    color: #111827;
}

.ops-page-btn.active {
    background: #3B82F6;
    color: white;
}

/* Remove old bootstrap pagination */
.pagination {
    display: none !important;
}

@media (max-width: 991.98px) {
    .ops-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ops-filterbar {
        grid-template-columns: 1fr 1fr;
    }

    .ops-filterbar__clear {
        grid-column: 1 / -1;
    }
}

/* =========================================================
   LANDING / MODULE HUB
========================================================= */

.landing-page-clean {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    background: transparent;
}

.landing-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 24px;
}

.landing-footer {
    margin-top: auto;
    margin-bottom: 0;
    font-size: 0.75rem;
    color: #9ca3af;
    text-align: center;
    padding: 16px 0;
}

.brand-gold {
    color: #d4af37;
    font-weight: 600;
}

/* Landing dashboard (Figma-style module grid) */
.landing-header {
    max-width: 640px;
    margin: 0 auto 40px;
    text-align: center;
}

.landing-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.landing-header p {
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 4px;
}

.landing-grid {
    margin-top: 32px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Tablet */
@media (max-width: 1100px) {
    .landing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 640px) {
    .landing-grid {
        grid-template-columns: 1fr;
    }
}

.ds-module-card {
    background: white;
    border: 1px solid rgba(0,0,0,0.04);
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    transition: all 0.25s ease;
    transform: translateY(0);
    cursor: pointer;
}

/* HOVER */
.ds-module-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.ds-module-card__icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    transition: transform 0.25s ease;
}

.ds-module-card:hover .ds-module-card__icon {
    transform: scale(1.1);
}

.ds-module-card--gold .ds-module-card__icon {
    background: rgba(250,204,21,0.2);
    color: #92400e;
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.22);
}

.ds-module-card--blue .ds-module-card__icon {
    background: rgba(59,130,246,0.2);
    color: #1d4ed8;
    box-shadow: 0 0 16px rgba(59, 130, 246, 0.20);
}

.card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

/* OPS (Gold) */
.card-icon.ops {
    background: rgba(217, 173, 43, 0.15);
    color: #D9AD2B;
    box-shadow: 0 6px 14px rgba(217, 173, 43, 0.25);
}

/* TIME (Blue) */
.card-icon.time {
    background: rgba(59, 130, 246, 0.15);
    color: #3B82F6;
    box-shadow: 0 6px 14px rgba(59, 130, 246, 0.25);
}

/* LOCKED (Grey) */
.card-icon.locked {
    background: rgba(156, 163, 175, 0.15);
    color: #9CA3AF;
}

/* ICON SIZE */
.card-icon svg {
    width: 20px;
    height: 20px;
}

.ds-module-card--gold {
    border-bottom: 4px solid #d4af37;
    transition: all 0.25s ease;
}

.ds-module-card--blue {
    border-bottom: 4px solid #3b82f6;
    transition: all 0.25s ease;
}

.ds-module-card:hover.ds-module-card--gold {
    border-bottom: 4px solid #e6c65c;
}

.ds-module-card:hover.ds-module-card--blue {
    border-bottom: 4px solid #60a5fa;
}

.ds-module-card--locked {
    opacity: 0.85;
    cursor: not-allowed;
}

.ds-module-card--locked:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.ds-module-card h3 {
    font-size: 1.05rem;
    font-weight: 650;
}

.ds-module-card p {
    font-size: 0.8rem;
    color: #6b7280;
}

.ds-module-card ul {
    padding-left: 16px;
    font-size: 0.75rem;
    color: #6b7280;
}

.ds-module-card li {
    margin-bottom: 4px;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 16px 0;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #4B5563;
}

.feature-list li svg {
    width: 16px;
    height: 16px;
}

.feature-list.ops li svg {
    color: #D9AD2B;
}

.feature-list.time li svg {
    color: #3B82F6;
}

.feature-list.locked li svg {
    color: #9CA3AF;
}

.ds-module-card .btn {
    margin-top: auto;
    width: 100%;
    align-self: stretch;
    justify-content: center;
    min-height: 48px;
    box-sizing: border-box;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

/* Soften button dominance inside module cards */
.ds-module-card .btn-primary {
    background: linear-gradient(
        135deg,
        color-mix(in srgb, #d4af37 86%, #fff),
        color-mix(in srgb, #c49b2a 86%, #fff)
    ) !important;
}

.ds-module-card .btn:hover {
    filter: brightness(1.03);
}

.landing-content {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 64px 20px;
}

.landing-content .landing-title {
    font-size: 2.6rem;
    letter-spacing: -0.7px;
    line-height: 1.1;
    font-weight: 800;
    color: var(--ao-text);
}

.landing-content .landing-subtitle {
    margin-top: 0;
    font-size: 1.15rem;
    line-height: 1.35;
    opacity: 1;
    font-weight: var(--ao-font-weight-medium);
    color: var(--ao-text-muted);
}

.landing-footer-text {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 0.9rem;
    font-weight: var(--ao-font-weight-medium);
    color: var(--ao-text-muted);
    opacity: 0.9;
    pointer-events: none;
    letter-spacing: 0.2px;
    z-index: 2;
}

.landing-wrapper {
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.module-hub-inner {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.module-hub-grid .container {
    max-width: 1140px;
}

.module-hub-grid .row > div {
    display: flex;
}

.module-hub-grid .row > div > .module-card {
    flex: 1;
    width: 100%;
}

.module-card {
    position: relative;
    border-radius: var(--ao-radius-card);
    padding: 1.35rem 1.35rem 1.25rem 1.35rem;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--ao-border);
    box-shadow: var(--ao-shadow-md);
    overflow: hidden;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.module-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: var(--ao-radius-card) 0 0 var(--ao-radius-card);
    background: var(--module-accent, var(--ao-primary-blue));
}

.module-hub-grid .module-card.landing-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    width: 100%;
    height: 100%;
    min-height: 260px;
    padding: 24px;
}

.module-hub-grid .module-card.landing-card.active-module {
    border-color: color-mix(in srgb, var(--ao-primary-gold) 55%, var(--ao-border));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ao-primary-gold) 22%, transparent), var(--ao-shadow-md);
}

@media (hover: hover) {
    .module-hub-grid .module-card.landing-card:not(.module-locked):hover {
        transform: translateY(-4px);
        box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(15, 23, 42, 0.08);
    }
}

.module-accent--ops {
    --module-accent: var(--ao-primary-gold);
}

.module-accent--time {
    --module-accent: var(--ao-primary-blue);
}

.module-accent--people {
    --module-accent: #7c3aed;
}

.module-accent--training {
    --module-accent: #ea580c;
}

.module-accent--safety {
    --module-accent: #16a34a;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 767.98px) {
    body > .d-flex {
        margin-left: 0 !important;
    }

    .layout-wrapper {
        margin-left: 0 !important;
    }

    .container-fluid {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .landing-content {
        padding: 48px 16px;
    }

    .landing-content .landing-title {
        font-size: 2rem;
    }

    .landing-content .landing-subtitle {
        font-size: 1rem;
    }

    .module-hub-grid .module-card.landing-card {
        min-height: 240px;
        padding: 20px;
    }
}

/* =========================================================
   ds-badge FINAL OVERRIDES (must win)
   - placed at end of file to prevent table text rules overriding
========================================================= */

.ds-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    border: none;
    color: inherit; /* reset */
    gap: 6px;
}

.ds-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
    flex: 0 0 auto;
}

.ds-badge--success {
    background: #DCFCE7;
    color: #166534 !important;
}

.ds-badge--danger {
    background: #FEE2E2;
    color: #991B1B !important;
}

.ds-badge--warning {
    background: #FEF3C7;
    color: #92400E !important;
}

.ds-badge--blue {
    background: #DBEAFE;
    color: #1E40AF !important;
}

.ds-badge--neutral {
    background: #ecfdf5;
    color: #065f46 !important;
}

.ds-badge--success::before { background: #22C55E; }
.ds-badge--danger::before { background: #EF4444; }
.ds-badge--warning::before { background: #F59E0B; }
.ds-badge--blue::before { background: #3B82F6; }
.ds-badge--neutral::before { background: #059669; }

.table td .ds-badge {
    vertical-align: middle;
}

.ops-table .ds-badge {
    opacity: 1;
    filter: none;
}

.autocomplete-list {
    display: none;
    position: absolute;
    top: 42px;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid rgba(0,0,0,0.04);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    z-index: 50;
    overflow: hidden;
}

.autocomplete-list.active {
    display: block;
}

.autocomplete-item {
    padding: 10px 14px;
    font-size: 13px;
    cursor: pointer;
}

.autocomplete-item:hover {
    background: #f7f9fc;
}

body.req-modal-open {
    overflow: hidden;
}

/* Add Part sheet open: class-driven scroll lock (avoid inline body.style.overflow) */
body.sheet-open {
    overflow: hidden;
}

/* Employee create modal: server validation (backup to client) */
.req-create-validation-summary:not(.validation-summary-errors) {
    display: none;
}

.req-create-validation-summary.validation-summary-errors ul {
    margin: 0 0 12px;
    padding-left: 1.1rem;
    font-size: 13px;
    color: #b45309;
    font-weight: 500;
    list-style: disc;
}

/* Employee: lightweight toast for client-side submit gates */
.req-employee-modal-toast {
    position: fixed;
    left: 50%;
    bottom: calc(24px + env(safe-area-inset-bottom));
    transform: translate3d(-50%, 120%, 0);
    max-width: min(92vw, 360px);
    padding: 12px 18px;
    border-radius: 12px;
    background: #0f172a;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22);
    z-index: 100000;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.req-employee-modal-toast--visible {
    transform: translate3d(-50%, 0, 0);
    opacity: 1;
    pointer-events: auto;
}

/* Ops: background list updates + modal save (above req modal z-index 9999) */
.req-portal-toast-host {
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 100000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    max-width: min(100vw - 32px, 380px);
    pointer-events: none;
}

.req-portal-toast {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    transform: translate3d(8px, 0, 0);
    opacity: 0;
    transition: transform 0.22s ease, opacity 0.22s ease;
    pointer-events: auto;
}

.req-portal-toast--visible {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

.req-portal-toast--info {
    background: #1e293b;
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.req-portal-toast--success {
    background: #14532d;
    color: #ecfdf5;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Employee: no parts subtotal / green costing under list (any viewport) */
.role-employee .parts-footer {
    display: none !important;
}

body.modal-open {
    overflow: hidden;
}

body.no-scroll {
    overflow: hidden;
    height: 100vh;
}

/* Mobile bottom sheet — Add Line (Requisitions Create / Edit) */
.mobile-sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 999999;
}

.mobile-sheet-backdrop.hidden {
    display: none;
}

.mobile-sheet-backdrop,
.mobile-add-line-sheet {
    pointer-events: auto;
}

.mobile-add-line-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70vh;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
    z-index: 1000000;
    transform: translateZ(0);
    min-height: 0;
    overflow: hidden;
}

.mobile-sheet-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.mobile-sheet-body {
    flex: 1;
    min-height: 0;
    height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
    display: block;
}

.mobile-sheet-body > * {
    margin-bottom: 10px;
}

.mobile-sheet-footer {
    position: sticky;
    bottom: 0;
    flex-shrink: 0;
    background: #fff;
    padding: 12px;
    padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.mobile-sheet-footer .btn {
    flex: 1;
}

.mobile-sheet-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 4px;
}

.mobile-lines-preview {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 2px;
}

/* Mobile inline Add Line (Requisitions Create) */
.mobile-add-line-inline {
    margin-top: 12px;
}

.mobile-add-line-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.mobile-line-item {
    background: #f9fafb;
    padding: 10px;
    border-radius: 10px;
    font-size: 14px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.mobile-line-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.mobile-line-main strong {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    line-height: 1.25;
    word-break: break-word;
}

.mobile-line-qty {
    flex-shrink: 0;
    color: #6b7280;
    font-size: 13px;
    white-space: nowrap;
}

.mobile-line-delete {
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 18px;
    line-height: 1;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 8px;
}

.mobile-line-delete:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #374151;
}

.mobile-line-delete:focus-visible {
    outline: 2px solid var(--ao-focus, #3b82f6);
    outline-offset: 2px;
}

/* =========================================================
   Requisition modal base (centered + premium)
========================================================= */
.req-modal-overlay {
    /* Root #reqModalOverlay: viewport-fixed shell; .req-modal fills it (true viewport centering) */
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.req-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;

    z-index: 9999;

    /* overlay */
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.req-modal__card {
    width: 1100px;
    max-width: calc(100vw - 48px);
    max-height: calc(100vh - 48px);

    display: flex;
    flex-direction: column;

    border-radius: 16px;

    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    box-shadow:
        0 20px 60px rgba(0,0,0,0.12),
        0 4px 20px rgba(0,0,0,0.06);

    border: 1px solid rgba(0,0,0,0.06);

    overflow: hidden; /* IMPORTANT */
}

#reqModalContent {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 24px;
}

.req-modal__footer {
    flex-shrink: 0;
    position: sticky;
    bottom: 0;

    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);

    padding: 16px 24px;
    border-top: 1px solid rgba(0,0,0,0.06);

    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.req-modal-header,
.req-modal-footer {
    flex: 0 0 auto;
}

.req-modal__header {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.req-modal__title {
    font-size: 20px;
    font-weight: 600;
}

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

.req-status-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 184, 0, 0.12);
    color: #b78100;
    font-size: 12px;
    font-weight: 600;
}

.req-status-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ffb800;
}

.req-save-status {
    font-size: 12px;
    color: #16a34a;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.req-modal__close {
    border: none;
    background: transparent;
    font-size: 18px;
    opacity: 0.6;
    cursor: pointer;
}

.req-modal__close:hover {
    opacity: 1;
}

.hidden {
    display: none;
}

.req-modal-header {
    flex: 0 0 auto;
}

.req-modal-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.req-modal-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.req-title {
    font-size: 16px;
    font-weight: 600;
}

.req-status {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(0,0,0,0.06);
}

.autosave-status {
    font-size: 12px;
    color: rgba(0,0,0,0.5);
}

.autosave-status.saving {
    color: #f59e0b;
}

.autosave-status.saved {
    color: #10b981;
}

.req-modal-close {
    appearance: none;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    padding: 6px 8px;
    border-radius: 10px;
    color: rgba(17, 24, 39, 0.72);
}

.req-modal-close:hover {
    background: rgba(0,0,0,0.04);
    color: rgba(17, 24, 39, 0.92);
}

.req-modal-body {
    flex: 1;
    min-height: 0;
    padding: 32px 32px 120px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    scroll-behavior: smooth;
}

.req-modal input,
.req-modal select,
.req-modal textarea {
    transition: all 0.2s ease;
    border: 1px solid rgba(0,0,0,0.08);
    background: rgba(255,255,255,0.9);
}

.req-modal input:hover,
.req-modal select:hover,
.req-modal textarea:hover {
    border-color: rgba(0,0,0,0.18);
}

.req-modal input:focus,
.req-modal select:focus,
.req-modal textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    background: #fff;
}

.ao-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(0,0,0,0.05);
}

.ao-card--primary {
    padding: 24px;
}

.ao-card--secondary {
    background: #fafafa;
}

.ao-card-header {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(0,0,0,0.5);
    margin-bottom: 16px;
}

.ao-card-body {
    min-width: 0;
}

.req-modal-footer,
.ao-modal-footer {
    position: sticky;
    bottom: 0;

    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    border-top: 1px solid rgba(17, 24, 39, 0.08);

    padding: 14px 18px;

    display: flex;
    justify-content: flex-end;
    gap: 10px;

    z-index: 5;
}

.req-modal-footer .btn-primary {
    background: #111;
    color: white;
    border-radius: 8px;
    padding: 10px 16px;
    border: 1px solid #111;
}

.req-modal-footer .btn-secondary {
    background: transparent;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 8px;
    padding: 10px 16px;
}

.req-modal-footer .btn-secondary:hover {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.16);
}

.req-modal-footer .btn-primary:hover {
    filter: brightness(1.04);
}

/* Super Admin — tenant billing modal (requisition modal shell) */
.billing-modal-root {
    max-width: 720px;
    margin: 0 auto;
}

.billing-modal-form.req-modal-body {
    padding-bottom: 100px;
}

.billing-modal-section {
    margin-bottom: 4px;
}

.billing-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
}

@media (max-width: 520px) {
    .billing-overview-grid {
        grid-template-columns: 1fr;
    }
}

.billing-muted-label {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7280;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.billing-overview-value {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.35;
}

.billing-overview-value--money {
    font-variant-numeric: tabular-nums;
}

.billing-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.billing-check-disabled .form-check-input:disabled {
    opacity: 0.65;
}

.billing-badge {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    margin-left: 6px;
}

.billing-hint {
    margin-top: 12px;
}

.billing-discount-input {
    max-width: 160px;
}

.billing-modal-footer {
    flex-wrap: wrap;
    gap: 10px;
}

.req-modal-footer .btn-outline-danger {
    border-radius: 8px;
    padding: 10px 16px;
}

input, select, textarea {
    height: 40px;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.06);
    padding: 8px 10px;
}

textarea {
    height: auto;
    min-height: 100px;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #111;
}

input.saving,
select.saving,
textarea.saving {
    border-color: #f59e0b !important;
}

input.saved,
select.saved,
textarea.saved {
    border-color: #10b981 !important;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* =========================================================
   Premium requisition modal form layout
========================================================= */

.req-form {
   padding: 24px 28px 140px;
}

.req-card {
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.06);
    margin-bottom: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Navy-tile depth (modals / panels; not table rows — tr uses row striping) */
.req-card:not(tr) {
    background: linear-gradient(180deg, #ffffff 0%, rgba(15, 23, 42, 0.02) 100%);
}

tbody tr.req-card {
    background-color: transparent;
}

.req-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.req-card__header {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    font-weight: 600;
    font-size: 14px;
    color: #111827;
    background: #fafbfc;
}

.req-card__header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.req-card__header--split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.req-field--span-2 {
    grid-column: span 2;
}

@media (max-width: 992px) {
    .req-field--span-2 {
        grid-column: span 2;
    }
}

@media (max-width: 576px) {
    .req-field--span-2 {
        grid-column: span 1;
    }
}

.req-card__body {
    padding: 18px;
}

.req-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.req-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.req-section-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 12px;
    letter-spacing: 0.04em;
}

/* Unified section shell (modal — header + body, matches section-card chrome) */
.req-section__header {
    font-size: 12px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.5);
    text-transform: uppercase;
    margin-bottom: 12px;
    letter-spacing: 0.04em;
}

.req-section__body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.req-job-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.req-job-btn {
    border: 1px solid rgba(0,0,0,0.08);
    background: #fff;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.req-job-btn:hover {
    border-color: #d4af37;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.req-job-btn.active,
.req-job-btn.selected {
    background: linear-gradient(135deg, #d4af37, #f1c40f);
    color: #111;
    border: none;
    box-shadow:
        0 4px 12px rgba(212,175,55,0.35),
        0 0 0 1px rgba(212,175,55,0.4);
    transform: translateY(-1px);
}

.req-job-btn.active:hover,
.req-job-btn.selected:hover {
    box-shadow:
        0 6px 16px rgba(212,175,55,0.45),
        0 0 12px rgba(212,175,55,0.35);
    transform: translateY(-2px);
}

.req-job-btn:active {
    transform: scale(0.98);
}

.req-job-btn.active::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at center, rgba(255,255,255,0.25), transparent 70%);
    pointer-events: none;
}

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

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

.req-field label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
    display: block;
}

.req-field input,
.req-field select,
.req-field textarea {
    width: 100%;
}

.req-table-wrap {
    overflow-x: auto;
}

.req-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.req-table th {
    text-align: left;
    padding: 10px;
    background: #f9fafb;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.req-table td {
    padding: 10px;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    vertical-align: middle;
}

.req-actions {
    position: sticky;
    bottom: 0;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    padding: 14px 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.req-modal__scroll {
    flex: 1;
    overflow-y: auto;
    overflow-anchor: none;
    min-height: 0;

    padding: 24px;
}

/* modal scroll guard (alias for older naming) */
.req-modal__body,
.req-modal__content {
    max-height: none;
    overflow: visible;
}

/* Compact parts table actions/toggles + density */
.actions-col {
    width: 40px;
}

.actions-col .icon-btn {
    display: block;
    width: 100%;
    margin: 2px 0;
    text-align: center;
}

.icon-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    opacity: 0.7;
    padding: 2px 4px;
    color: inherit;
}

.icon-btn:hover {
    opacity: 1;
}

.icon-btn[disabled] {
    cursor: not-allowed;
    opacity: 0.35;
}

.icon-btn i {
    font-size: 13px;
}

.icon-btn.danger {
    color: #dc2626;
}

.qty-col {
    width: 70px;
}

.qty-input {
    text-align: center;
    padding: 4px 6px;
}

.req-toggle {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.btn-add-line {
    margin-top: 10px;
    border: none;
    background: #c9a227;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.btn-add-line:hover {
    background: #b8961f;
}

.job-type-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.job-type-btn {
    border: 1px solid rgba(0,0,0,0.04);
    background: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
}

.job-type-btn.active {
    background: #c9a227;
    color: white;
    border-color: #c9a227;
}

.job-type-btn.selected {
    background: #facc15;
    color: black;
    border-color: #eab308;
}

.job-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #1f2937; /* FORCE visible text */
    background: #e5e7eb;
}

.job-type-damage {
    background: #fee2e2;
    color: #991b1b;
}

.job-type-service,
.job-type-servicerepair {
    background: #dbeafe;
    color: #1e40af;
}

.job-type-terepair {
    background: #e0e7ff;
    color: #3730a3;
}

.job-type-contract {
    background: #fef3c7;
    color: #92400e;
}

.job-type-warranty {
    background: #d1fae5;
    color: #065f46;
}

.job-type-vor {
    background: #fee2e2;
    color: #b91c1c;
    font-weight: 700;
}

/* Home ops table — job type pill (Index); combines with .job-type-* modifiers above */
.job-type {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
    background: #f3f4f6;
    color: #374151;
}

/* VOR row emphasis (desktop table + mobile card) */
tbody tr.row-vor > td {
    background-color: rgba(220, 38, 38, 0.04);
}

tbody tr.row-vor > td:first-child {
    box-shadow: inset 4px 0 0 #dc2626;
}

.mobile-req-card.row-vor {
    border-left: 4px solid #dc2626;
    background: rgba(220, 38, 38, 0.04);
}

/* Premium mobile requisition cards (Ops) — Athenium navy & gold; d-md-none list */
@keyframes ath-fade-slide {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 767.98px) {
    .ops-mobile-req-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-top: 12px;
        margin-bottom: 0;
        padding-bottom: 12px;
    }

    .ops-mobile-req-empty {
        text-align: center;
        color: var(--ath-muted);
        font-size: 0.9375rem;
        padding: 2.5rem 1rem;
        background: var(--ath-card);
        border-radius: 18px;
        border: 1px dashed rgba(148, 163, 184, 0.45);
        box-shadow:
            0 8px 24px rgba(15, 23, 42, 0.06),
            0 1px 0 rgba(255, 255, 255, 0.6) inset;
    }

    /* Premium Athenium tile (scoped — does not affect table tr.req-card or modal) */
    .ops-mobile-req-card.req-card {
        position: relative !important;
        overflow: hidden !important;
        background: linear-gradient(
            180deg,
            #ffffff 0%,
            rgba(15, 23, 42, 0.02) 100%
        ) !important;
        border-radius: 18px !important;
        padding: 18px !important;
        margin-bottom: 0 !important;
        border: 1px solid var(--ath-border) !important;
        box-shadow:
            0 8px 24px rgba(15, 23, 42, 0.06),
            0 1px 0 rgba(255, 255, 255, 0.6) inset !important;
        transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease !important;
        animation: ath-fade-slide 0.4s ease both;
        -webkit-tap-highlight-color: transparent;
        cursor: default;
        opacity: 1 !important;
    }

    .ops-mobile-req-card.req-card:not(.row-vor)::before {
        content: "";
        position: absolute;
        left: 0;
        top: 12px;
        bottom: 12px;
        width: 3px;
        border-radius: 2px;
        background: linear-gradient(180deg, var(--ath-gold), rgba(212, 175, 55, 0.3));
        opacity: 0.6;
        pointer-events: none;
    }

    .ops-mobile-req-card.row-vor.req-card::before {
        display: none;
    }

    .ops-mobile-req-card.req-card h3,
    .ops-mobile-req-card.req-card .company-name,
    .ops-mobile-req-card__customer {
        color: var(--ath-navy) !important;
        font-weight: 600 !important;
        letter-spacing: -0.2px;
    }

    .ops-mobile-req-card__address {
        color: #475569 !important;
        font-size: 13px;
    }

    .ops-mobile-req-card.req-card p,
    .ops-mobile-req-card.req-card .meta,
    .ops-mobile-req-card__meta,
    .ops-mobile-req-card__createdby {
        color: #64748b !important;
        font-size: 13px;
    }

    .ops-mobile-req-card__hint {
        color: #64748b !important;
        font-size: 13px;
    }

    .ops-mobile-req-card__edit-hint {
        color: var(--ath-gold) !important;
        font-weight: 500 !important;
    }

    @media (hover: hover) {
        .ops-mobile-req-card__edit-hint:hover {
            text-decoration: underline;
        }
    }

    .ops-mobile-req-card .status-badge.status-badge--pill {
        border-radius: 999px;
        padding: 4px 10px;
        font-size: 12px;
        font-weight: 500;
    }

    .ops-mobile-req-card .status-badge.status-badge--pill.submitted {
        background: var(--ath-gold-soft) !important;
        color: #8a6d1f !important;
        border: 1px solid rgba(212, 175, 55, 0.25) !important;
    }

    .ops-mobile-req-card .status-badge.status-badge--pill.to-order {
        background: rgba(15, 23, 42, 0.08) !important;
        color: #0f172a !important;
        border: 1px solid rgba(15, 23, 42, 0.08) !important;
    }

    .ops-mobile-req-card .status-badge.status-badge--pill.quoted {
        background: rgba(59, 130, 246, 0.08) !important;
        color: #2563eb !important;
        border: 1px solid rgba(59, 130, 246, 0.22) !important;
    }

    .ops-mobile-req-list .ops-mobile-req-card:nth-child(1) {
        animation-delay: 0.02s;
    }
    .ops-mobile-req-list .ops-mobile-req-card:nth-child(2) {
        animation-delay: 0.05s;
    }
    .ops-mobile-req-list .ops-mobile-req-card:nth-child(3) {
        animation-delay: 0.08s;
    }
    .ops-mobile-req-list .ops-mobile-req-card:nth-child(4) {
        animation-delay: 0.11s;
    }
    .ops-mobile-req-list .ops-mobile-req-card:nth-child(5) {
        animation-delay: 0.14s;
    }
    .ops-mobile-req-list .ops-mobile-req-card:nth-child(6) {
        animation-delay: 0.17s;
    }
    .ops-mobile-req-list .ops-mobile-req-card:nth-child(7) {
        animation-delay: 0.2s;
    }
    .ops-mobile-req-list .ops-mobile-req-card:nth-child(8) {
        animation-delay: 0.23s;
    }
    .ops-mobile-req-list .ops-mobile-req-card:nth-child(9) {
        animation-delay: 0.26s;
    }
    .ops-mobile-req-list .ops-mobile-req-card:nth-child(10) {
        animation-delay: 0.29s;
    }
    .ops-mobile-req-list .ops-mobile-req-card:nth-child(11) {
        animation-delay: 0.32s;
    }
    .ops-mobile-req-list .ops-mobile-req-card:nth-child(12) {
        animation-delay: 0.35s;
    }

    @media (prefers-reduced-motion: reduce) {
        .ops-mobile-req-card.req-card {
            animation: none !important;
        }
    }

    .ops-mobile-req-card--readonly.req-card {
        box-shadow:
            0 6px 20px rgba(15, 23, 42, 0.055),
            0 1px 0 rgba(255, 255, 255, 0.6) inset !important;
        opacity: 0.98 !important;
    }

    .ops-mobile-req-card--editable.req-card {
        cursor: pointer !important;
        box-shadow:
            0 10px 28px rgba(15, 23, 42, 0.08),
            0 1px 0 rgba(255, 255, 255, 0.6) inset !important;
    }

    @media (hover: hover) {
        .ops-mobile-req-card.req-card:not(.ops-mobile-req-card--viewonly):hover {
            transform: translateY(-3px) scale(1.01) !important;
            box-shadow:
                0 16px 32px rgba(15, 23, 42, 0.12),
                0 0 0 1px rgba(212, 175, 55, 0.15),
                0 1px 0 rgba(255, 255, 255, 0.65) inset !important;
        }
    }

    .ops-mobile-req-card.req-card:not(.ops-mobile-req-card--viewonly):active {
        transform: translateY(-1px) scale(1.005) !important;
        box-shadow:
            0 8px 20px rgba(15, 23, 42, 0.09),
            0 1px 0 rgba(255, 255, 255, 0.55) inset !important;
    }

    .ops-mobile-req-card--viewonly.req-card {
        cursor: default !important;
    }

    @media (hover: hover) {
        .ops-mobile-req-card--viewonly.req-card:hover {
            transform: none !important;
            box-shadow:
                0 8px 24px rgba(15, 23, 42, 0.06),
                0 1px 0 rgba(255, 255, 255, 0.6) inset !important;
        }
    }

    .ops-mobile-req-card--viewonly.req-card:active {
        transform: none !important;
    }

    .ops-mobile-req-card.row-vor.req-card {
        border-left: 4px solid #dc2626 !important;
    }

    /* Touch: light press feedback (no enlarged “lift” on tap) */
    @media (hover: none) {
        .ops-mobile-req-card.req-card:not(.ops-mobile-req-card--viewonly):active {
            transform: scale(0.98) !important;
            box-shadow:
                0 8px 20px rgba(15, 23, 42, 0.09),
                0 1px 0 rgba(255, 255, 255, 0.55) inset !important;
        }
    }
}

.search-bundle__table {
    display: none;
}

.ops-mobile-req-card__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}

.ops-mobile-req-card__customer {
    font-weight: 700;
    font-size: 1.05rem;
    color: #0f172a;
    line-height: 1.25;
    flex: 1;
    min-width: 0;
}

.ops-mobile-req-card__address {
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 14px;
}

.ops-mobile-req-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.ops-mobile-req-tag {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 5px 12px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
}

.ops-mobile-req-card__meta {
    font-size: 0.75rem;
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    line-height: 1.45;
}

.ops-mobile-req-card__sep {
    color: #94a3b8;
    user-select: none;
}

.ops-mobile-req-card__createdby {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 4px;
}

.ops-mobile-req-card__edit-hint {
    margin-top: 14px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #b45309;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ops-mobile-req-card__hint {
    margin-top: 14px;
    font-size: 0.75rem;
    color: #94a3b8;
    font-style: italic;
}

.ops-mobile-req-card__actions {
    margin-top: 16px;
}

.status-badge--pill.status-badge.submitted {
    background: var(--ath-gold-soft);
    color: #8a6d1f;
    border: 1px solid rgba(212, 175, 55, 0.25);
}

.status-badge--pill.status-badge.quoted {
    background: rgba(59, 130, 246, 0.08);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.22);
}

.status-badge--pill.status-badge.to-order {
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #f3f4f6;
    color: #111827;
    border: 1px solid rgba(17, 24, 39, 0.08);
    white-space: nowrap;
}

.status-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #94a3b8;
    display: inline-block;
}

.status-badge.draft::before { background: #94a3b8; }
.status-badge.submitted::before { background: #f59e0b; }
.status-badge.priced::before { background: #0369a1; }
.status-badge.quoted::before { background: #3b82f6; }
.status-badge.to-order::before { background: #94a3b8; }
.status-badge.ordered::before { background: #22c55e; }
.status-badge.approved::before { background: #22c55e; }
.status-badge.archived::before { background: #94a3b8; }

.status-priced {
    background: #e0f2fe;
    color: #0369a1;
}

.req-table td {
    padding: 8px 10px;
    vertical-align: middle;
}

.req-table input {
    height: 32px;
}

.req-table td input {
    padding: 6px 8px;
    font-size: 13px;
}

.req-table th {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
}

.req-table td.text-muted {
    font-weight: 500;
    color: #6b7280;
}

.req-table tr:hover {
    background: #fafafa;
}

.req-table th:nth-child(5),
.req-table td:nth-child(5) {
    width: 90px;
}

.markup-input {
    text-align: center;
    padding: 4px 6px;
}

.desc-input {
    resize: none;
    overflow: hidden;
    line-height: 1.4;
}

.req-table td:first-child {
    min-width: 220px;
}

/* Premium Customer Details section */
.form-grid--customer {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.span-2 {
    grid-column: span 2;
}

.form-group label {
    font-size: 12px;
    color: #6b7280;
}

.form-group input {
    height: 40px;
    border-radius: 10px;
    padding: 0 12px;
}

.form-section {
    background: #f9fafb;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

/* =========================================================
   Requisition modal (premium form layout)
========================================================= */
.ao-modal-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ao-modal-body {
    padding: 32px 32px 120px;
}

.ao-section {
    margin-bottom: 36px;
}

.ao-section:last-child {
    margin-bottom: 0;
}

.ao-section__label {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7280;
    font-weight: 700;
    margin-bottom: 14px;
}

.form-grid {
    display: grid;
    gap: 18px;
}

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

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

.form-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.form-field--span-2 {
    grid-column: span 2;
}

.form-field label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
    margin: 0;
}

.ao-input,
.ao-cell-input {
    height: 42px;
    border-radius: 10px;

    border: 1px solid rgba(0,0,0,0.08);
    padding: 0 12px;
    background: rgba(255,255,255,0.9);
    outline: none;

    transition: all 160ms ease;
}

.ao-input:focus,
.ao-cell-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    background: #fff;
}

.ao-textarea {
    height: auto;
    padding: 10px 12px;
}

/* Parts table */
.ao-parts__tablewrap {
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
}

.ao-parts__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ao-parts__table thead th {
    font-size: 12px;
    color: #6b7280;
    font-weight: 700;
    background: #f9fafb;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
    text-align: left;
    white-space: nowrap;
}

.ao-parts__table tbody td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(17, 24, 39, 0.06);
    vertical-align: middle;
}

.ao-parts__table tbody tr:last-child td {
    border-bottom: none;
}

.parts-table {
    position: relative;
}

/* PARTS: footer sum, header alignment, numeric centering, text overflow */
.parts-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.parts-footer .parts-total {
    font-weight: 600;
    color: #16a34a;
    font-size: 16px;
    font-variant-numeric: tabular-nums;
}

.parts-table .parts-header > div {
    text-align: center;
}

.parts-table .parts-header .description,
.parts-table .parts-header .partno,
.parts-table .parts-header .supplier {
    text-align: left;
}

.parts-table .parts-row input[type="text"] {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.parts-table .parts-row input[type="text"]:focus {
    position: relative;
    z-index: 10;
    background: #fff;
    width: 200%;
    max-width: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.parts-table .parts-row input {
    height: 36px;
}

.parts-table .parts-row .parts-total.total-cell.total {
    text-align: center;
    font-weight: 500;
}

.parts-header,
.parts-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 80px 100px 100px 120px 40px 40px;
    gap: 10px;
    align-items: center;
}

.parts-header {
    position: sticky;
    top: 0;
    background: #fafafa;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(0,0,0,0.5);
    padding: 6px 8px;
    z-index: 1;
}

.parts-body {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.parts-row {
    padding: 6px 8px;
    border-radius: 8px;
    position: relative;
}

.parts-row:hover {
    background: rgba(0,0,0,0.02);
}

.parts-row:focus-within {
    background: rgba(0,0,0,0.05);
}

.parts-row input[type="hidden"] {
    display: none;
}

.parts-row input {
    width: 100%;
    height: 34px;
    border: 1px solid transparent;
    background: transparent;
    padding: 4px 6px;
    border-radius: 8px;
}

.parts-row input:focus {
    border: 1px solid rgba(0,0,0,0.12);
    background: white;
    outline: none;
}

.parts-row input[type="number"] {
    text-align: right;
}

.parts-table .parts-row input[type="number"] {
    text-align: center;
}

.parts-row .parts-total {
    font-variant-numeric: tabular-nums;
    text-align: right;
    padding: 0 6px;
    color: rgba(0,0,0,0.75);
    font-weight: 600;
}

.parts-row div:last-child,
.parts-row .total-cell {
    font-weight: 600;
}

.parts-delete {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: rgba(0,0,0,0.55);
    cursor: pointer;
    opacity: 0;
    transition: opacity 140ms ease, background 140ms ease, color 140ms ease;
}

.parts-row:hover .parts-delete,
.parts-row:focus-within .parts-delete {
    opacity: 1;
}

.parts-delete:hover {
    background: rgba(0,0,0,0.06);
    color: rgba(0,0,0,0.85);
}

.parts-table .parts-header .chargeable,
.parts-table .parts-row .chargeable {
    text-align: center;
    width: 40px;
    justify-self: center;
}

.parts-table .parts-row .chargeable .charge-toggle {
    transform: scale(1.2);
    cursor: pointer;
    width: auto;
    height: auto;
    margin: 0;
    accent-color: var(--athenium-gold, #ca8a04);
}

.parts-table .parts-row.not-chargeable {
    opacity: 0.6;
}

.req-add-line-btn,
.add-line-btn {
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    font-size: 13px;
    font-weight: 500;
    color: var(--athenium-gold);
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
}

.add-line-btn .plus {
    font-size: 16px;
    font-weight: 600;
}

.req-add-line-btn:hover,
.add-line-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}

.req-add-line-btn:active,
.add-line-btn:active {
    transform: scale(0.97);
}

.ao-cell-input {
    height: 34px;
    padding: 0 10px;
    font-size: 13px;
}

.ao-cell-input--center {
    text-align: center;
}

.ao-cell-input--right {
    text-align: right;
}

.ao-cell-text {
    color: #6b7280;
    font-weight: 600;
}

.ao-col--qty { width: 72px; }
.ao-col--pct { width: 96px; }
.ao-col--money { width: 130px; }
.ao-col--toggle { width: 56px; text-align: center; }

.ao-toggle {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.ao-parts__empty {
    color: #6b7280;
    padding: 14px 12px;
    text-align: center;
}

@media (max-width: 992px) {
    .ao-modal-body { padding: 32px 32px 120px; }
    .form-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-field--span-2 { grid-column: span 2; }
}

@media (max-width: 576px) {
    .form-grid--4,
    .form-grid--3,
    .form-grid--2 { grid-template-columns: 1fr; }
    .form-field--span-2 { grid-column: span 1; }
}

/* =========================================
   FORCE ATHENIUM PARTS GRID (OVERRIDE MODE)
========================================= */

/* GRID STRUCTURE (force alignment) */
.parts-grid--header,
.parts-grid--row {
    display: grid !important;

    grid-template-columns:
        2fr
        1fr
        1fr
        80px
        100px
        100px
        120px
        40px
        40px;

    gap: 12px;
    align-items: center;
}

/* HEADER */
.parts-grid--header {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;

    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;

    color: var(--text-secondary);

    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
}

/* ROW */
.parts-grid--row {
    padding: 8px 10px;
    border-radius: 10px;

    transition: all 160ms ease;
}

.parts-grid--row:hover {
    background: rgba(0,0,0,0.02);
}

.parts-grid--row:focus-within {
    background: rgba(0,0,0,0.05);
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
}

/* Create modal: extra column for line photo uploads */
.parts-table--create-modal .parts-grid--header,
.parts-table--create-modal .parts-grid--row {
    grid-template-columns:
        2fr
        1fr
        1fr
        80px
        100px
        100px
        120px
        minmax(72px, 1fr)
        40px
        40px !important;
}

.parts-table--create-modal .parts-photo-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.parts-table--create-modal .photo-field-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
}

.parts-table--create-modal .photo-field-label-text {
    color: rgba(0, 0, 0, 0.65);
}

.parts-table--create-modal .parts-photo-cell input[type="file"] {
    width: 100%;
    max-width: 100%;
    font-size: 11px;
    padding: 4px 0;
    height: auto;
    min-height: 34px;
}

.parts-table--create-modal .parts-photo-cell .photo-count {
    display: block;
    font-size: 11px;
    color: rgba(0, 0, 0, 0.5);
    min-height: 14px;
}

.photo-preview {
    display: flex;
    gap: 6px;
    margin-top: 2px;
    flex-wrap: wrap;
}

.photo-thumb {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #eee;
}

.photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-thumb .remove-photo {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #000;
    color: #fff;
    border: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 12px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-thumb .remove-photo:hover {
    background: #333;
}

/* Create modal — mobile part cards (stacked; hide table header) */
.parts-table--create-modal.parts-table--mobile-cards .parts-header {
    display: none;
}

.mobile-part-card.parts-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.mobile-part-card-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 2px;
}

.mobile-part-card-title {
    font-size: 13px;
    font-weight: 600;
}

.mobile-part-delete {
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(0, 0, 0, 0.14);
    background: #fff;
    cursor: pointer;
}

.mobile-part-delete:active {
    background: rgba(0, 0, 0, 0.04);
}

.mobile-part-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.55);
    margin: 0;
}

.mobile-part-label--inline {
    margin-top: 6px;
}

.mobile-part-input {
    width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    font-size: 16px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-sizing: border-box;
}

.mobile-part-line-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
}

.mobile-part-line-total .parts-total {
    font-weight: 600;
    font-size: 15px;
}

.mobile-part-chargeable {
    display: flex;
    align-items: center;
    min-height: 44px;
}

.mobile-part-chargeable .charge-toggle {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.mobile-part-card .mobile-parts-photo input[type="file"] {
    min-height: 48px;
    font-size: 14px;
}

/* Create modal — employees: no cost / markup / total columns */
.parts-table--create-modal.parts-table--employee-parts .parts-grid--header,
.parts-table--create-modal.parts-table--employee-parts .parts-grid--row {
    grid-template-columns:
        2fr
        1fr
        1fr
        80px
        minmax(72px, 1fr)
        40px
        40px !important;
}

/* req-labour-row--compact styling lives near labour section */

/* CELLS */
.parts-cell {
    display: flex;
    align-items: center;
}

/* INPUTS (ALIGN PERFECTLY WITH HEADER) */
.parts-cell input {
    width: 100%;
    height: 34px;

    border-radius: 8px;
    border: 1px solid transparent;

    background: transparent;

    padding: 4px 8px;

    font-size: 13px;
}

/* FOCUS = ATHENIUM STYLE */
.parts-cell input:focus {
    border: 1px solid var(--primary-gold);
    background: #fff;

    box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.15);
    outline: none;
}

/* NUMBER ALIGNMENT */
.parts-cell input[type="number"] {
    text-align: right;
}

/* TOTAL COLUMN */
.total-cell {
    justify-content: flex-end;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* =========================================
   GOLD ADD LINE (ATHENIUM STYLE)
========================================= */

.add-line-btn {
    margin-top: 14px;

    display: inline-flex;
    align-items: center;
    gap: 8px;

    background: transparent;
    border: none;

    font-size: 13px;
    font-weight: 600;

    color: var(--primary-gold);

    cursor: pointer;
}

/* GOLD + ICON */
.add-line-btn .plus {
    width: 22px;
    height: 22px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 6px;

    background: var(--gold-gradient);
    color: #fff;

    font-size: 14px;
    font-weight: 700;

    box-shadow: 0 4px 10px rgba(250,204,21,0.3);
}

/* HOVER */
.add-line-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* =========================================
   KILL OLD PARTS TABLE STYLES (IMPORTANT)
========================================= */

/* =========================================
   ATHENIUM PARTS GRID (FIXED VERSION)
========================================= */

/* TABLE WRAPPER */
.parts-grid-table {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* FORCE GRID STRUCTURE */
.parts-grid--header,
.parts-grid--row {
    display: grid;

    grid-template-columns:
        2fr
        1fr
        1fr
        80px
        100px
        100px
        120px
        40px
        40px;

    gap: 12px;
    align-items: center;
}

/* HEADER */
.parts-grid--header {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;

    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;

    color: var(--text-secondary);

    padding: 6px 10px;
    border-bottom: 1px solid var(--border);
}

/* BODY */
.parts-grid--body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ROW */
.parts-grid--row {
    padding: 6px 10px;
    border-radius: 10px;
    transition: all 160ms ease;
}

.parts-grid--row:hover {
    background: rgba(0,0,0,0.02);
}

/* CELLS */
.parts-cell {
    display: flex;
    align-items: center;
}

/* INPUTS */
.parts-cell input {
    width: 100%;
    height: 34px;

    border-radius: 8px;
    border: 1px solid transparent;

    background: transparent;

    padding: 4px 8px;
    font-size: 13px;
}

/* INPUT FOCUS (ATHENIUM GOLD) */
.parts-cell input:focus {
    border: 1px solid var(--primary-gold);
    background: #fff;
    box-shadow: 0 0 0 2px rgba(250,204,21,0.15);
    outline: none;
}

/* NUMBER ALIGNMENT */
.parts-cell input[type="number"] {
    text-align: right;
}

/* TOTAL CELL */
.total-cell {
    justify-content: flex-end;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* =========================================
   GOLD ADD BUTTON (FIXED)
========================================= */

.add-line-btn {
    margin-top: 12px;

    display: inline-flex;
    align-items: center;
    gap: 8px;

    background: transparent;
    border: none;

    font-size: 13px;
    font-weight: 600;

    color: var(--primary-gold);
    cursor: pointer;
}

.add-line-btn .plus {
    width: 22px;
    height: 22px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 6px;

    background: var(--gold-gradient);
    color: #fff;

    font-size: 14px;
    font-weight: 700;

    box-shadow: 0 4px 10px rgba(250,204,21,0.3);
}

.add-line-btn:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

/* =========================================
   Requisition modal - header layout
========================================= */

.req-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.req-header-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.req-header-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.req-header-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.req-meta-dot {
    opacity: 0.5;
}

.req-header-autosave {
    font-size: 12px;
    color: var(--text-secondary);
}

.req-section {
    margin-top: 0;
    margin-bottom: 0;
}

.req-section:first-child {
    margin-top: 0;
}

.req-section--charges {
    margin-top: 8px;
}

.req-section-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
    margin-bottom: 16px;
    transition: all 0.25s ease;
}

.req-section-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.06);
}

.ao-card--secondary.req-section-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 16px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
}

.req-section-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: var(--text-secondary);

    margin-bottom: 12px;
}

.req-subsection {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(0,0,0,0.04);
}

.req-subsection:first-of-type {
    margin-top: 6px;
    padding-top: 0;
    border-top: none;
}

.req-subsection-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* CHARGES (modal grid) */
.charges-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.charge-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.charge-item label {
    font-size: 13px;
    font-weight: 500;
    color: #666;
    display: flex;
    align-items: center;
    gap: 6px;
}

.charge-item input[type="number"] {
    height: 36px;
}

.charges-divider {
    height: 1px;
    background: #eee;
    margin: 16px 0;
}

/* NOTES (modal — always visible) */
.notes-box {
    width: 100%;
    min-height: 120px;
    resize: vertical;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px;
    font-size: 14px;
}

.notes-box:focus {
    outline: none;
    border-color: #d1d5db;
}

.req-section--equipment {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
}

.req-section--secondary {
    opacity: 0.85;
}

.req-section--equipment input {
    background: #f9fafb;
    font-weight: 500;
}

.req-equipment-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.req-equipment-search {
    position: relative;
    margin-bottom: 12px;
}

.req-search-results {
    position: absolute;
    width: 100%;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    z-index: 10;
    max-height: 240px;
    overflow-y: auto;
}

.req-search-item {
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.req-search-item:hover {
    background: rgba(0,0,0,0.04);
}

.req-labour-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-x: auto;
}

.req-labour-row {
    display: grid;
    grid-template-columns: 150px 120px 80px 120px;
    align-items: center;
    gap: 12px;
}

.req-labour-row .req-input {
    min-width: 0;
    width: 100%;
}

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

.req-labour-label {
    font-size: 13px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.7);
}

.req-labour-rate-label {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.5);
    text-align: right;
}

.req-labour-total {
    text-align: right;
    align-self: flex-end;
    font-weight: 600;
    font-size: 18px;
    color: #16a34a;
    margin-top: 6px;
    transition: all 0.2s ease;
}

/* Non-manager compact mode: keep grid alignment, hide rate columns visually */
.req-labour-row--compact {
    grid-template-columns: 150px 120px 80px 120px !important;
}

.req-labour-row--compact .req-labour-rate-label,
.req-labour-row--compact .req-labour-field--rate {
    visibility: hidden;
}

.req-labour-total.low {
    color: #dc2626;
}

.req-labour-total.good {
    color: #16a34a;
}

.req-empty {
    text-align: center;
    padding: 20px;
    font-size: 13px;
    opacity: 0.6;
}

.req-charges-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.req-charge-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 240px;
}

.req-notes summary {
    cursor: pointer;
}

.req-notes summary::-webkit-details-marker {
    display: none;
}

.req-totals-bar {
    position: sticky;
    bottom: 70px; /* sits above sticky footer */
    z-index: 4;

    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;

    border-top: 1px solid rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);

    padding: 12px 18px;
}

.req-total--sell .req-total-value {
    font-size: 20px;
    font-weight: 700;
}

.req-total--sell {
    font-size: 20px;
    font-weight: 700;
}

.req-total--margin .req-total-value {
    font-size: 18px;
    font-weight: 700;
}

.req-total--margin {
    font-size: 18px;
    font-weight: 700;
}

.req-total--cost .req-total-value {
    font-size: 13px;
    opacity: 0.6;
}

.req-total--cost {
    font-size: 13px;
    opacity: 0.6;
}

.req-totals {
    display: flex;
    justify-content: flex-end;
    gap: 28px;
}

.req-total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.req-total-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #6b7280;
    font-weight: 600;
}

.req-total-value {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    transition: all 0.25s ease;
}

.req-total-value.updated {
    transform: scale(1.06);
    opacity: 0.85;
}

.req-total--margin .req-total-value {
    color: #0f766e;
}

.req-total--margin.negative .req-total-value {
    color: #b91c1c;
}

.req-total--margin.warning .req-total-value {
    color: #b45309;
}

.req-total--margin.good .req-total-value {
    color: #15803d;
}

/* Optional subtle helper text */
.req-margin-hint {
    font-size: 11px;
    margin-top: 2px;
    font-weight: 600;
    color: #6b7280;
}

.req-margin-status {
    font-size: 12px;
    margin-top: 2px;
    opacity: 0.7;
}

.req-total--margin.good:not(.flip) {
    animation: pulseGood 1.2s ease;
}

@keyframes pulseGood {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.req-total--margin.flip {
    animation: flipIn 0.4s ease;
    transform-origin: center top;
}

@keyframes flipIn {
    from { transform: rotateX(90deg); opacity: 0; }
    to { transform: rotateX(0); opacity: 1; }
}

.parts-grid--row.loss {
    background: rgba(220,38,38,0.04);
}

.parts-grid--row.healthy {
    background: rgba(22,163,74,0.04);
}

.input-validation-error {
    border-color: #ef4444 !important;
    background: #fff5f5;
}

.field-validation-error {
    color: #dc2626;
    font-size: 12px;
    margin-top: 4px;
}

/* =========================
   MOBILE EMPLOYEE MODE
   ========================= */
@media (max-width: 768px) {

    /* Hide financial summary */
    .role-employee .req-financials,
    .role-employee .req-margin,
    .role-employee .req-cost-summary {
        display: none !important;
    }

    /* Hide charges + pricing controls */
    .role-employee .req-charges,
    .role-employee .req-discount,
    .role-employee .req-vat {
        display: none !important;
    }

    /* Simplify parts layout */
    .role-employee .req-part-row {
        display: grid;
        grid-template-columns: 1fr !important;
        gap: 8px;
    }

    /* Hide unused part fields (mobile only) */
    .role-employee .req-part-supplier,
    .role-employee .req-part-charge,
    .role-employee .req-part-price,
    .role-employee .req-part-markup {
        display: none !important;
    }

    /* Hide the inline inputs now that we render display rows */
    .role-employee .req-part-desc,
    .role-employee .req-part-no,
    .role-employee .req-part-qty {
        display: none !important;
    }

    /* Improve touch inputs */
    .role-employee input,
    .role-employee textarea,
    .role-employee select {
        font-size: 16px;
        padding: 12px;
    }

    /* Card spacing — requisition modal only (not Ops list / table rows) */
    .role-employee #reqModalContent .req-card,
    .role-employee #reqModalContent .req-section-card {
        padding: 12px;
        border-radius: 12px;
    }

    /* =========================
       Refined mobile employee UX
       ========================= */

    /* Flatten modal sections only — keeps Ops .ops-mobile-req-card + table rows intact */
    .role-employee #reqModalContent .req-card,
    .role-employee #reqModalContent .req-section-card {
        box-shadow: none !important;
        border: none !important;
        padding: 10px 8px !important;
        border-radius: 0 !important;
        background: transparent !important;
    }

    /* Reduce section spacing */
    .role-employee #reqModalContent .req-section {
        margin-bottom: 14px !important;
    }

    /* Make headings smaller + tighter */
    .role-employee #reqModalContent .req-card h3,
    .role-employee #reqModalContent .req-card h4,
    .role-employee .req-section__header,
    .role-employee .req-section-title,
    .role-employee .req-section-label {
        font-size: 13px;
        margin-bottom: 6px;
        color: #666;
    }

    /* Equipment section → simplify */
    .role-employee .req-equipment-grid {
        display: grid;
        grid-template-columns: 1fr !important;
        gap: 8px;
    }

    .role-employee .req-equipment-make,
    .role-employee .req-equipment-model {
        display: none !important;
    }

    /* Job type → tap-friendly */
    .role-employee .req-jobtype-group {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .role-employee .req-jobtype-group button {
        padding: 12px;
        font-size: 14px;
        border-radius: 10px;
    }

    /* Parts — complete mobile rebuild */
    .role-employee .req-part-row {
        background: transparent !important;
        padding: 12px 0 !important;
        border-radius: 0 !important;
        margin-bottom: 0 !important;
        border-bottom: 1px solid #eee;
        box-shadow: none !important;
    }

    .role-employee .req-part-desc {
        width: 100%;
        margin-bottom: 8px;
        font-size: 16px;
    }

    .role-employee .req-part-inline {
        display: flex;
        gap: 8px;
    }

    .role-employee .req-part-no {
        flex: 2;
        font-size: 15px;
    }

    .role-employee .mobile-part-card .req-part-qty {
        flex: 1;
        text-align: center;
        font-size: 16px;
    }

    /* Parts — premium gold pill Add line (main list + sheet) */
    .role-employee .parts-add-row {
        margin-top: 14px;
    }

    .role-employee .req-add-line-btn {
        display: inline-flex !important;
        width: 100%;
        min-height: 52px;
        padding: 14px 20px;
        border-radius: 999px;
        font-weight: 600;
        font-size: 15px;
        margin-top: 0;
        background: var(--parts-gold) !important;
        color: var(--parts-navy) !important;
        border: none !important;
        box-shadow: 0 6px 16px rgba(212, 175, 55, 0.35);
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .role-employee .req-add-line-btn:hover {
        background: color-mix(in srgb, var(--parts-gold) 88%, #000) !important;
        box-shadow: 0 8px 20px rgba(212, 175, 55, 0.4);
    }

    .role-employee .req-add-line-btn:active {
        transform: scale(0.98);
        box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
    }

    .role-employee .req-add-line-btn::before {
        content: "+";
        margin-right: 0;
        font-weight: 700;
        color: var(--parts-navy);
        font-size: 18px;
        line-height: 1;
    }

    .role-employee .req-part-sheet-add-btn {
        margin-top: 8px;
    }

    /* Remove visual noise */
    .role-employee .req-part-card-title,
    .role-employee .req-part-label {
        display: none !important;
    }

    /* Bottom sheet flow (mobile employee only) */
    .role-employee .part-sheet {
        position: fixed !important;
        inset: 0 !important;
        z-index: 9999 !important;
        pointer-events: none;
    }

    .role-employee .part-sheet.hidden {
        display: none;
    }

    .role-employee .part-sheet__overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        opacity: 0;
        transition: opacity 180ms ease;
    }

    .role-employee .part-sheet__overlay {
        background: rgba(15, 23, 42, 0.45);
    }

    .role-employee .part-sheet__panel {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        margin: 0 !important;
        background: #fff;
        border-radius: 16px 16px 0 0;
        padding: 16px;
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.18);
        transform: translateY(100%);
        transition: transform 0.3s ease;
        will-change: transform;
    }

    .role-employee .part-sheet.open {
        pointer-events: auto;
    }

    .role-employee .part-sheet.open .part-sheet__overlay {
        opacity: 1;
    }

    .role-employee .part-sheet.open .part-sheet__panel {
        transform: translateY(0);
    }

    /* Dedicated backdrop (outside modal) */
    .role-employee .parts-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 9998;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    .role-employee .parts-backdrop.open {
        opacity: 1;
        pointer-events: all;
    }

    /* Parts sheet open: modal card stays fixed; inner form body scrolls (not whole page) */
    .role-employee.sheet-open .req-modal {
        overflow: hidden;
    }

    .role-employee.sheet-open .req-modal__card {
        overflow: visible !important;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .role-employee.sheet-open #reqModalContent.req-modal__content {
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .role-employee.sheet-open #reqModalContent > .req-modal__header {
        flex: 0 0 auto;
    }

    .role-employee.sheet-open #reqModalContent > form.ao-modal-form {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .role-employee.sheet-open .req-modal-body,
    .role-employee.sheet-open .ao-modal-body {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        max-height: 100vh;
    }

    .role-employee.sheet-open #reqModalContent .req-financials {
        flex: 0 0 auto;
    }

    .role-employee.sheet-open #reqModalContent .req-modal-footer,
    .role-employee.sheet-open #reqModalContent .req-modal__footer {
        flex: 0 0 auto;
    }

    /* Alias if markup uses BEM __body */
    .role-employee.sheet-open .req-modal__body {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        max-height: 100vh;
    }

    .role-employee .part-sheet__panel h3 {
        margin: 0 0 12px;
        font-size: 16px;
        font-weight: 600;
        color: var(--parts-text);
    }

    .role-employee .part-sheet__panel .req-part-sheet-add-btn,
    .role-employee .part-sheet__panel .req-add-line-btn {
        background: var(--parts-gold) !important;
        color: var(--parts-navy) !important;
        border: none !important;
        border-radius: 999px !important;
        min-height: 54px;
        padding: 14px 20px;
        font-weight: 600 !important;
        font-size: 15px;
        box-shadow: 0 6px 16px rgba(212, 175, 55, 0.35);
    }

    .role-employee .part-sheet__panel .req-part-sheet-add-btn:hover,
    .role-employee .part-sheet__panel .req-add-line-btn:hover {
        background: color-mix(in srgb, var(--parts-gold) 88%, #000) !important;
        box-shadow: 0 8px 20px rgba(212, 175, 55, 0.42);
    }

    .role-employee .part-sheet__panel .req-part-sheet-add-btn:active,
    .role-employee .part-sheet__panel .req-add-line-btn:active {
        transform: scale(0.98);
    }

    .role-employee .part-sheet__panel .req-part-sheet-add-btn::before,
    .role-employee .part-sheet__panel .req-add-line-btn::before {
        color: var(--parts-navy);
    }

    .role-employee .part-sheet__handle {
        width: 40px;
        height: 4px;
        background: #cbd5e1;
        border-radius: 2px;
        margin: 0 auto 8px;
    }

    .role-employee .part-sheet__panel input {
        width: 100%;
        margin: 0;
        height: 44px;
        font-size: 16px;
    }

    .role-employee .part-sheet__panel {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .role-employee .ps-chargeable {
        margin: 0;
    }

    .role-employee .part-sheet__panel button.req-part-sheet-add-btn,
    .role-employee .part-sheet__panel button.req-add-line-btn {
        width: 100%;
    }

    /* Parts list (mobile employee): simple flex rows */
    .role-employee .parts-table {
        background: transparent;
        border: 0;
    }

    .role-employee .parts-body {
        display: block;
    }

    .role-employee .parts-row.parts-list-row {
        position: relative;
        padding: 0;
        border-bottom: 1px solid #e5e7eb;
    }

    .role-employee .req-part-list-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 12px 0;
        cursor: pointer;
        user-select: none;
    }

    .role-employee .req-part-left {
        width: 16px;
        flex: 0 0 16px;
        color: var(--parts-gold);
        opacity: 0.9;
        font-size: 12px;
        line-height: 1;
    }

    .role-employee .req-part-center {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
    }

    .role-employee .req-part-center .req-part-list-title {
        font-weight: 600;
        color: var(--parts-navy);
        font-size: 15px;
        line-height: 1.25;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .role-employee .req-part-center .req-part-list-partno {
        font-size: 13px;
        color: var(--parts-muted);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .role-employee .req-part-right {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        flex: 0 0 auto;
    }

    .role-employee .req-part-right .req-part-list-qty {
        font-weight: 600;
        color: var(--parts-text);
        font-size: 14px;
        white-space: nowrap;
        padding-top: 1px;
    }

    .role-employee .req-part-delete {
        border: none;
        background: transparent;
        color: var(--parts-danger);
        font-size: 16px;
        line-height: 1;
        padding: 0 4px;
        opacity: 0.8;
        cursor: pointer;
    }

    .role-employee .req-part-delete:active {
        opacity: 1;
        transform: scale(0.95);
    }

    .role-employee .req-part-list-row:active {
        background: rgba(15, 23, 42, 0.04);
    }

    /* Chargeable: list view hidden (edit in bottom sheet only) */
    .role-employee .req-part-chargeable {
        display: none !important;
    }

    .role-employee .ps-chargeable {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 14px;
        color: var(--parts-muted);
        margin: 4px 0 12px;
        user-select: none;
    }

    .role-employee .ps-chargeable input[type="checkbox"] {
        width: 18px;
        height: 18px;
        margin: 0;
        accent-color: var(--parts-gold);
    }

    /* Hide inline edit affordances — mobile card rows only (not list-row hidden bindings) */
    .role-employee .parts-row.mobile-part-card .req-part-row input,
    .role-employee .mobile-part-card input.req-part-desc,
    .role-employee .mobile-part-card input.req-part-no {
        pointer-events: none;
        border: none;
        background: transparent;
        padding: 0;
    }

    /* Sticky footer → improved hierarchy */
    .role-employee .req-modal__footer {
        display: flex;
        gap: 8px;
    }

    .role-employee .req-modal__footer button {
        height: 48px;
        font-size: 15px;
    }

    .role-employee .req-modal__footer .btn-primary {
        flex: 2;
    }

    /* Remove cognitive noise */
    .role-employee .req-notes,
    .role-employee .req-internal-only {
        display: none !important;
    }

    /* Remove cost summary (mobile employee only) */
    .role-employee .req-summary,
    .role-employee .req-cost,
    .role-employee .req-margin {
        display: none !important;
    }

    /* Full-width footer buttons */
    .role-employee .req-modal__footer button {
        flex: 1;
    }

    /* Sticky footer for mobile */
    .role-employee .req-modal__footer {
        position: sticky;
        bottom: 0;
        background: white;
        padding: 10px;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
        z-index: 10;
    }
}

/* ----- Identity / Login (Athenium OS) ----- */
body.login-standalone {
    margin: 0;
    min-height: 100vh;
    background-color: #0b1120;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;

    background:
        radial-gradient(circle at 20% 20%, rgba(212,175,55,0.15), transparent 40%),
        radial-gradient(circle at 80% 30%, rgba(59,130,246,0.2), transparent 40%),
        radial-gradient(circle at 50% 80%, rgba(30,58,138,0.3), transparent 50%),
        #0b1120;

    font-family: 'Inter', sans-serif;
    padding: 24px 16px;
    box-sizing: border-box;
}

.login-card {
    width: 100%;
    max-width: 420px;

    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    border-radius: 20px;
    padding: 40px;

    box-shadow:
        0 20px 60px rgba(0,0,0,0.6),
        inset 0 1px 0 rgba(255,255,255,0.05);

    border: 1px solid rgba(255,255,255,0.08);
}

.auth-card-shell {
    max-width: 460px;
}

.login-owl {
    height: 56px;
    margin-bottom: 12px;
    border-radius: 12px;
}

.login-title {
    color: #f8fafc;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 4px;
}

.login-subtitle {
    color: #94a3b8;
    font-size: 14px;
}

.login-page .form-control {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 12px;
    color: #f8fafc;
}

.login-page .form-control::placeholder {
    color: #64748b;
}

.login-page .form-control:focus {
    border-color: #d4af37;
    box-shadow: 0 0 0 2px rgba(212,175,55,0.25);
    background: rgba(255,255,255,0.06);
    color: #f8fafc;
}

.btn-login {
    width: 100%;
    padding: 12px;

    background: linear-gradient(135deg, #d4af37, #fbbf24);
    color: #0b1120;

    border: none;
    border-radius: 10px;
    font-weight: 600;

    transition: all 0.2s ease;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(212,175,55,0.4);
    color: #0b1120;
}

.btn-login:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(212,175,55,0.45);
}

.login-page label {
    color: #cbd5f5;
    font-size: 13px;
    margin-bottom: 4px;
}

.login-page a {
    color: #94a3b8;
    text-decoration: none;
}

.login-page a:hover {
    color: #fbbf24;
}

.login-page .form-check-label {
    color: #cbd5f5;
}

.login-page .form-check-input {
    border-color: rgba(255,255,255,0.2);
    background-color: rgba(255,255,255,0.04);
}

.login-page .form-check-input:checked {
    background-color: #d4af37;
    border-color: #d4af37;
}

.login-page .form-check-input:focus {
    border-color: #d4af37;
    box-shadow: 0 0 0 2px rgba(212,175,55,0.25);
}

.login-footer {
    margin-top: 20px;
    font-size: 0.85rem;
    text-align: center;
}

.login-legal-note {
    margin: 14px auto 0;
    max-width: 360px;
    text-align: center;
    font-size: 0.8rem;
    line-height: 1.45;
    color: #94a3b8;
}

.login-legal-note a {
    color: #cbd5e1;
}

.login-legal-note a:hover {
    color: #fbbf24;
}

.login-validation-summary {
    color: #f87171 !important;
}

.auth-intro {
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
    text-align: center;
}

.auth-message {
    background: rgba(15, 23, 42, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #cbd5e1;
    padding: 16px;
    text-align: center;
}

.auth-message-title {
    color: #f8fafc;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.auth-actions {
    margin-top: 14px;
}

@media (max-width: 575.98px) {
    .login-card {
        padding: 28px 24px;
        border-radius: 16px;
    }

    .login-title {
        font-size: 20px;
    }
}

.legal-doc-page {
    width: 100%;
}

.legal-doc-back-link {
    display: inline-flex;
    margin-bottom: 0.85rem;
    font-size: 0.85rem;
    color: #94a3b8;
    text-decoration: none;
}

.legal-doc-back-link:hover {
    color: #fbbf24;
    text-decoration: underline;
}