/* ============================================================
   Forge — Capital Planning & Tracking
   Refocus Eye Health internal capex platform.
   Stylesheet rebuilt 2026-05-08 from scratch using the official
   Refocus brand tokens (brand.json: teal, orange, navy, charcoal).
   ============================================================ */

/* ── Brand tokens ─────────────────────────────────────────── */
:root {
    --teal:        #1AC8D4;
    --teal-dark:   #0E7490;
    --teal-soft:   #7DE3EA;
    --orange:      #F7941D;
    --orange-soft: #FFB762;
    --charcoal:    #404F60;
    --navy:        #0F172A;
    --navy-light:  #1E293B;
    --navy-card:   #243044;
    --black:       #0A0A0A;
    --white:       #FFFFFF;
    --green:       #16A34A;
    --green-soft:  #4ADE80;
    --red:         #DC2626;
    --red-soft:    #F87171;
    --yellow:      #CA8A04;
    --yellow-soft: #FDE047;
    --purple:      #8B5CF6;
    --purple-soft: #A78BFA;
    --blue:        #3B82F6;
    --blue-soft:   #60A5FA;

    --border:      rgba(255, 255, 255, 0.08);
    --border-mid:  rgba(255, 255, 255, 0.16);
    --text:        #F1F5F9;
    --text-muted:  rgba(255, 255, 255, 0.62);
    --text-faint:  rgba(255, 255, 255, 0.38);

    --font:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    --shadow-md:   0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg:   0 16px 40px rgba(0, 0, 0, 0.55);
    --r-sm:        6px;
    --r-md:        10px;
    --r-lg:        14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    background: var(--navy);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.55;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    position: relative;
    overflow-x: hidden;
}

/* ── Animated background SVG ──────────────────────────────────────── */
.fg-bg {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 1;
}

/* EKG pulse line — slow horizontal sweep */
.fg-pulse-group {
    transform-origin: 50% 50%;
}

.fg-pulse-line {
    stroke-dasharray: 220 2200;
    animation: fg-pulse-drift 9s linear infinite;
    filter: drop-shadow(0 0 6px rgba(26, 200, 212, 0.6));
}

@keyframes fg-pulse-drift {
    0%   { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -2420; }
}

/* Subtle node-twinkle (offset per node via nth-child) */
.fg-nodes circle {
    animation: fg-twinkle 4s ease-in-out infinite;
}
.fg-nodes circle:nth-child(2)  { animation-delay: 0.3s; }
.fg-nodes circle:nth-child(3)  { animation-delay: 0.7s; }
.fg-nodes circle:nth-child(4)  { animation-delay: 1.1s; }
.fg-nodes circle:nth-child(5)  { animation-delay: 1.5s; }
.fg-nodes circle:nth-child(6)  { animation-delay: 1.9s; }
.fg-nodes circle:nth-child(7)  { animation-delay: 2.3s; }
.fg-nodes circle:nth-child(8)  { animation-delay: 2.7s; }
.fg-nodes circle:nth-child(9)  { animation-delay: 3.1s; }
.fg-nodes circle:nth-child(10) { animation-delay: 3.5s; }
.fg-nodes circle:nth-child(11) { animation-delay: 0.5s; }
.fg-nodes circle:nth-child(12) { animation-delay: 1.3s; }

@keyframes fg-twinkle {
    0%, 100% { opacity: 0.3; r: 1.5; }
    50%      { opacity: 1;   r: 2.5; }
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-soft); }

/* ── Topbar ──────────────────────────────────────────────── */
.topbar {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 14px 28px;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.topbar-brand-mark {
    color: var(--teal);
    font-size: 20px;
    text-shadow: 0 0 12px rgba(26, 200, 212, 0.4);
}

.topbar-brand-icon {
    width: 44px;
    height: 44px;
    display: block;
    flex-shrink: 0;
}

.topbar-brand-wordmark {
    height: 32px;
    width: auto;
    display: block;
    flex-shrink: 0;
}

.topbar-brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.topbar-brand-name {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.01em;
}
.topbar-brand-eye { font-weight: 700; opacity: 0.9; }
.topbar-brand-sub {
    font-size: 10.5px;
    color: var(--orange);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-top: 2px;
}

@media (max-width: 720px) {
    .topbar-brand-icon { width: 36px; height: 36px; }
    .topbar-brand-wordmark { height: 26px; }
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ── Topbar Menu (dropdown) ─────────────────────────────── */
.topbar-menu-wrap {
    position: relative;
}

.topbar-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(36, 48, 68, 0.7);
    border: 1px solid var(--border-mid);
    color: var(--text);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
    line-height: 1;
}

.topbar-pill:hover {
    background: rgba(26, 200, 212, 0.16);
    border-color: rgba(26, 200, 212, 0.5);
}

/* Anchor-as-pill (Pipeline shortcut) �?" kill the default underline */
a.topbar-pill { text-decoration: none; }
a.topbar-pill:hover { text-decoration: none; }

.menu-burger { font-size: 14px; }

.menu-chevron {
    transition: transform 0.2s ease;
}

.topbar-menu-wrap.open .menu-chevron {
    transform: rotate(180deg);
}

.topbar-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: var(--navy-light);
    border: 1px solid var(--border-mid);
    border-radius: var(--r-md);
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 2px;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.topbar-menu-wrap.open .topbar-menu-dropdown {
    display: flex;
}

.topbar-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    text-decoration: none;
    text-align: left;
    cursor: pointer;
    border-radius: var(--r-sm);
    transition: background 0.1s, color 0.1s;
}

.topbar-menu-item:hover {
    background: rgba(26, 200, 212, 0.16);
    color: var(--text);
}

.menu-icon {
    flex-shrink: 0;
    color: var(--text-muted);
    width: 18px;
    text-align: center;
}

.topbar-menu-item:hover .menu-icon { color: var(--teal); }

.topbar-menu-item-primary {
    color: var(--teal);
    font-weight: 700;
}
.topbar-menu-item-primary .menu-icon { color: var(--teal); }
.topbar-menu-item-primary:hover {
    background: rgba(26, 200, 212, 0.22);
    color: var(--teal-soft);
}

.topbar-menu-item-logout {
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    margin-top: 4px;
    padding-top: 12px;
}

.topbar-avatar-wrap {
    position: relative;
    margin-left: 4px;
}

.topbar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
    color: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    border: 2px solid rgba(26, 200, 212, 0.4);
    font-family: inherit;
    transition: transform 0.15s, box-shadow 0.15s;
}

.topbar-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 16px rgba(26, 200, 212, 0.4);
}

.topbar-avatar-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 280px;
    background: var(--navy-light);
    border: 1px solid var(--border-mid);
    border-radius: var(--r-md);
    padding: 0;
    display: none;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.topbar-avatar-wrap.open .topbar-avatar-dropdown {
    display: block;
}

.avatar-dd-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: linear-gradient(135deg, rgba(26, 200, 212, 0.12), rgba(247, 148, 29, 0.06));
    border-bottom: 1px solid var(--border);
}

.avatar-dd-large {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
    color: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
    flex-shrink: 0;
}

.avatar-dd-info {
    min-width: 0;
    flex: 1;
}

.avatar-dd-name {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
    line-height: 1.2;
}

.avatar-dd-email {
    font-size: 11.5px;
    color: var(--text-muted);
    word-break: break-all;
}

.avatar-dd-badge {
    display: inline-block;
    margin-top: 6px;
    margin-right: 4px;
    padding: 2px 8px;
    background: rgba(26, 200, 212, 0.16);
    color: var(--teal);
    border: 1px solid rgba(26, 200, 212, 0.4);
    border-radius: 99px;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.avatar-dd-badge-signer {
    background: rgba(247, 148, 29, 0.14);
    color: var(--orange);
    border-color: rgba(247, 148, 29, 0.4);
}

.avatar-dd-items {
    padding: 8px;
}

.avatar-dd-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--r-sm);
    transition: background 0.1s, color 0.1s;
}

.avatar-dd-item:hover {
    background: rgba(26, 200, 212, 0.16);
    color: var(--text);
}

.avatar-dd-item-logout {
    color: var(--text-muted);
}

.avatar-dd-item-logout:hover {
    background: rgba(220, 38, 38, 0.12);
    color: var(--red-soft);
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--r-sm);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s;
    text-decoration: none;
}

.btn-primary {
    background: var(--teal);
    color: var(--navy);
    border-color: var(--teal);
}
.btn-primary:hover {
    background: var(--teal-soft);
    color: var(--navy);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--border-mid);
}
.btn-secondary:hover { border-color: var(--teal); color: var(--teal); }

/* ── Page layout ──────────────────────────────────────────── */
.page {
    padding: 24px 32px;
    max-width: 1400px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 24px;
}

.page-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.015em;
    color: var(--text);
}

.page-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ── KPIs ─────────────────────────────────────────────────── */
.kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.kpi-card {
    background: var(--navy-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 18px 22px;
    transition: border-color 0.15s;
}

.kpi-card:hover { border-color: rgba(26, 200, 212, 0.3); }

.kpi-label {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.kpi-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}

/* ── Rebuild banner ────────────────────────────────────────── */
.rebuild-banner {
    background: linear-gradient(135deg, rgba(26, 200, 212, 0.08), rgba(247, 148, 29, 0.06));
    border: 1px solid rgba(26, 200, 212, 0.3);
    border-radius: var(--r-md);
    padding: 14px 18px;
    font-size: 13px;
    color: var(--text);
    margin-bottom: 22px;
}

.rebuild-banner strong { color: var(--teal); }

.rebuild-banner a {
    color: var(--teal);
    border-bottom: 1px dotted currentColor;
}

/* ── Kanban ───────────────────────────────────────────────── */
.kanban-row {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.kanban-col {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    min-height: 200px;
    min-width: 0;
}

/* v3 stage accent colors */
.kanban-col[data-stage='regional_review'] .kanban-col-h   { border-bottom-color: rgba(139, 92, 246, 0.5); }
.kanban-col[data-stage='executive_review'] .kanban-col-h  { border-bottom-color: rgba(247, 148, 29, 0.5); }
.kanban-col[data-stage='pending_signature'] .kanban-col-h { border-bottom-color: rgba(59, 130, 246, 0.5); }
.kanban-col[data-stage='po_assigned'] .kanban-col-h       { border-bottom-color: rgba(56, 189, 248, 0.5); }
.kanban-col[data-stage='packet_accepted'] .kanban-col-h   { border-bottom-color: rgba(34, 197, 94, 0.6); }
.kanban-col[data-stage='on_hold'] .kanban-col-h           { border-bottom-color: rgba(234, 179, 8, 0.6); }

.kanban-col-h {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 2px solid var(--border-mid);
    background: rgba(255, 255, 255, 0.03);
}

.kanban-col-name {
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text);
}

.kanban-col-count {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 24px;
    text-align: center;
}

.kanban-col-body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 100px;
}

.kanban-empty {
    font-size: 11.5px;
    color: var(--text-faint);
    text-align: center;
    padding: 18px 0;
    font-style: italic;
}

/* ── Empty / error states ────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.error-page {
    text-align: center;
    padding: 80px 20px;
}

.error-code {
    font-size: 72px;
    font-weight: 900;
    color: var(--orange);
    line-height: 1;
}

.error-msg {
    font-size: 16px;
    color: var(--text-muted);
    margin: 12px 0 24px;
}

/* ── Login page ───────────────────────────────────────────── */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden;
}

.login-body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(26, 200, 212, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(26, 200, 212, 0.06) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    z-index: 0;
}

.login-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 460px;
    padding: 32px;
}

.login-card {
    background: var(--navy-card);
    border: 1px solid var(--border-mid);
    border-radius: var(--r-lg);
    padding: 40px 36px;
    box-shadow: var(--shadow-lg);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.login-brand-mark {
    color: var(--teal);
    font-size: 24px;
    text-shadow: 0 0 16px rgba(26, 200, 212, 0.5);
}

.login-brand-name {
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
}

.login-brand-eye { font-weight: 700; opacity: 0.9; }

.login-brand-sub {
    font-size: 11px;
    color: var(--orange);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 3px;
}

.login-h1 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.015em;
}

.login-p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: var(--white);
    color: var(--navy);
    font-weight: 600;
    font-size: 14px;
    border-radius: var(--r-sm);
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
}

.login-btn:hover {
    color: var(--navy);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.1);
}

.login-foot {
    font-size: 11px;
    color: var(--text-faint);
    text-align: center;
    margin-top: 20px;
    line-height: 1.6;
}

.login-flash {
    margin: 12px 0;
    padding: 10px 14px;
    border-radius: var(--r-sm);
    font-size: 12.5px;
    border: 1px solid;
}
.login-flash-error {
    background: rgba(220, 38, 38, 0.12);
    border-color: rgba(220, 38, 38, 0.4);
    color: var(--red-soft);
}
.login-flash-info {
    background: rgba(26, 200, 212, 0.12);
    border-color: rgba(26, 200, 212, 0.4);
    color: var(--teal);
}

/* ── Toast ───────────────────────────────────────────────── */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 400px;
    pointer-events: none;
}
.toast {
    background: rgba(11, 18, 32, 0.96);
    border: 1px solid rgba(26, 200, 212, 0.30);
    color: #fff;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 13.5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.40);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transform: translateX(120%);
    transition: transform 0.28s cubic-bezier(.2,.8,.2,1);
    pointer-events: auto;
}
.toast.toast-show { transform: translateX(0); }
.toast.toast-info  { border-color: rgba(26, 200, 212, 0.40); }
.toast.toast-ok    { border-color: rgba(74, 222, 128, 0.50); color: #d1fae5; }
.toast.toast-warn  { border-color: rgba(247, 148, 29, 0.50); color: #fed7aa; }
.toast.toast-error { border-color: rgba(220, 38, 38, 0.55);  color: #fecaca; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
    .topbar-inner { padding: 12px 16px; }
    .page { padding: 16px; }
    .kanban-row { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}

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

/* ═══ Settings page — split view ═══════════════════════════════════════════ */
/* Make sure HTML [hidden] always wins over our explicit display rules. */
[hidden] { display: none !important; }

.settings-shell {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 28px;
    background: rgba(11, 18, 32, 0.72);
    border: 1px solid rgba(26, 200, 212, 0.10);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    min-height: 540px;
    margin-top: 6px;
}

.settings-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 22px 14px;
    border-right: 1px solid rgba(26, 200, 212, 0.10);
    background: rgba(8, 14, 26, 0.55);
}

.settings-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--text-soft, #c8d3df);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.settings-menu-item:hover {
    background: rgba(26, 200, 212, 0.06);
    color: var(--white, #fff);
}
.settings-menu-item.is-active {
    background: rgba(26, 200, 212, 0.10);
    color: var(--white, #fff);
    border-color: rgba(26, 200, 212, 0.30);
}
.settings-menu-item svg { flex-shrink: 0; opacity: 0.85; }

.settings-body {
    padding: 28px 32px 32px;
    min-width: 0;
}
.settings-tab { display: none; }
.settings-tab.is-active { display: block; }

.settings-tab-header h2 {
    margin: 0 0 4px 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--white, #fff);
}
.settings-tab-header p {
    margin: 0 0 22px 0;
    color: var(--text-soft, #b6c1cf);
    font-size: 13px;
}

/* fields */
.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}
.field-label {
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-soft, #b6c1cf);
}
.field-hint {
    font-size: 11.5px;
    color: var(--text-faint, #8895a6);
    line-height: 1.5;
}
.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
}
.field input[type="text"],
.field input[type="email"],
.field select,
.add-user-form input,
.add-user-form select {
    width: 100%;
    padding: 10px 12px;
    background: rgba(7, 13, 24, 0.85);
    color: var(--white, #fff);
    border: 1px solid rgba(26, 200, 212, 0.18);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.12s, box-shadow 0.12s;
}
.field input:focus,
.field select:focus {
    outline: none;
    border-color: rgba(26, 200, 212, 0.55);
    box-shadow: 0 0 0 3px rgba(26, 200, 212, 0.14);
}

/* M365 search dropdown */
.search-wrap { position: relative; }
.search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 30;
    max-height: 280px;
    overflow-y: auto;
    background: rgba(11, 18, 32, 0.96);
    border: 1px solid rgba(26, 200, 212, 0.22);
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}
.search-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    color: var(--white, #fff);
    border: none;
    border-bottom: 1px solid rgba(26, 200, 212, 0.06);
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.search-row:last-child { border-bottom: none; }
.search-row:hover { background: rgba(26, 200, 212, 0.08); }
.search-avatar {
    width: 30px; height: 30px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #1AC8D4, #0a7780);
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    display: grid;
    place-items: center;
}
.search-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.search-name { font-size: 13.5px; font-weight: 600; color: var(--white, #fff); }
.search-email { font-size: 11.5px; color: var(--text-soft, #b6c1cf); }
.search-empty {
    padding: 14px 16px;
    font-size: 12.5px;
    color: var(--text-faint, #8895a6);
}

.selected-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(26, 200, 212, 0.08);
    border: 1px solid rgba(26, 200, 212, 0.25);
    border-radius: 10px;
    margin-bottom: 18px;
}
.selected-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1AC8D4, #0a7780);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: grid;
    place-items: center;
}
.selected-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.selected-name { font-size: 14px; font-weight: 600; color: var(--white, #fff); }
.selected-email { font-size: 12px; color: var(--text-soft, #b6c1cf); }

.btn-link {
    background: none;
    border: none;
    color: var(--teal, #1AC8D4);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
}
.btn-link:hover { text-decoration: underline; }

.add-user-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 6px;
}

.btn-primary, .btn-secondary {
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
}
.btn-primary {
    background: var(--teal, #1AC8D4);
    color: #06222b;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(26, 200, 212, 0.30); }
.btn-primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(26, 200, 212, 0.20);
    color: var(--white, #fff);
}
.btn-secondary:hover { background: rgba(26, 200, 212, 0.08); }

.status-msg {
    font-size: 12.5px;
    color: var(--text-soft, #b6c1cf);
}
.status-msg.is-ok { color: #4ade80; }
.status-msg.is-err { color: #fca5a5; }

.manual-add {
    margin-top: 26px;
    border-top: 1px solid rgba(26, 200, 212, 0.10);
    padding-top: 18px;
}
.manual-add summary {
    cursor: pointer;
    font-size: 12.5px;
    color: var(--text-soft, #b6c1cf);
    font-weight: 500;
    padding: 4px 0;
    list-style: none;
}
.manual-add summary::-webkit-details-marker { display: none; }
.manual-add summary::before { content: '+ '; color: var(--teal); font-weight: 700; margin-right: 4px; }
.manual-add[open] summary::before { content: '− '; }
.manual-form {
    margin-top: 14px;
    padding: 16px;
    background: rgba(7, 13, 24, 0.55);
    border-radius: 10px;
    border: 1px solid rgba(26, 200, 212, 0.10);
}

/* ── User Management table ─────────────────────────────────────────────── */
.user-table-wrap {
    background: rgba(7, 13, 24, 0.55);
    border: 1px solid rgba(26, 200, 212, 0.10);
    border-radius: 12px;
    overflow: hidden;
}
.user-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
.user-table thead th {
    text-align: left;
    padding: 12px 16px;
    background: rgba(26, 200, 212, 0.06);
    color: var(--text-soft, #b6c1cf);
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid rgba(26, 200, 212, 0.10);
}
.user-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(26, 200, 212, 0.06);
    color: var(--white, #fff);
    vertical-align: middle;
}
.user-table tbody tr:last-child td { border-bottom: none; }
.user-table tbody tr:hover { background: rgba(26, 200, 212, 0.04); }
.user-table .col-actions { text-align: right; white-space: nowrap; }
.user-table .muted { color: var(--text-faint, #8895a6); font-size: 12.5px; }
.user-table .empty-state {
    text-align: center;
    color: var(--text-faint, #8895a6);
    padding: 28px 16px;
    font-size: 13px;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}
.user-avatar {
    width: 30px; height: 30px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #1AC8D4, #0a7780);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: grid;
    place-items: center;
}
.user-name { font-weight: 600; color: var(--white, #fff); font-size: 13.5px; }
.user-email { color: var(--text-soft, #b6c1cf); font-size: 11.5px; }

.role-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.role-admin           { background: rgba(247, 148, 29, 0.18); color: #f7c184; border: 1px solid rgba(247, 148, 29, 0.40); }
.role-senior_approver { background: rgba(26, 200, 212, 0.18); color: #7be7f0; border: 1px solid rgba(26, 200, 212, 0.40); }
.role-rvp             { background: rgba(167, 139, 250, 0.18); color: #c8b9fb; border: 1px solid rgba(167, 139, 250, 0.40); }
.role-requester       { background: rgba(255, 255, 255, 0.06); color: #c8d3df; border: 1px solid rgba(255, 255, 255, 0.14); }

.btn-row {
    background: transparent;
    color: var(--text-soft, #b6c1cf);
    border: 1px solid rgba(26, 200, 212, 0.18);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    margin-left: 6px;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.btn-row:hover { background: rgba(26, 200, 212, 0.08); color: var(--white, #fff); }
.btn-row.btn-remove:hover { background: rgba(220, 38, 38, 0.14); color: #fca5a5; border-color: rgba(220, 38, 38, 0.40); }

/* ── Modal ─────────────────────────────────────────────────────────────── */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(3, 7, 14, 0.66);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 1500;
    display: grid;
    place-items: center;
}
.modal {
    width: min(440px, calc(100vw - 40px));
    background: rgba(11, 18, 32, 0.98);
    border: 1px solid rgba(26, 200, 212, 0.30);
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.60);
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    border-bottom: 1px solid rgba(26, 200, 212, 0.10);
}
.modal-header h3 { margin: 0; font-size: 15px; font-weight: 700; color: var(--white, #fff); }
.modal-close {
    background: none; border: none; cursor: pointer;
    color: var(--text-soft, #b6c1cf); font-size: 22px; line-height: 1;
}
.modal-body { padding: 18px 22px; }
.modal-user {
    margin-bottom: 18px;
    padding: 10px 12px;
    background: rgba(26, 200, 212, 0.05);
    border-radius: 8px;
}
.modal-user-name { font-weight: 600; color: var(--white, #fff); font-size: 14px; }
.modal-user-email { font-size: 12px; color: var(--text-soft, #b6c1cf); }
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 22px;
    border-top: 1px solid rgba(26, 200, 212, 0.10);
}

/* avatar dropdown — extra badge for RVP */
.avatar-dd-badge-rvp {
    background: rgba(167, 139, 250, 0.18) !important;
    color: #c8b9fb !important;
    border: 1px solid rgba(167, 139, 250, 0.40);
}

/* ═══ Capex form ═══════════════════════════════════════════════════════════ */
.capex-form-wrap {
    max-width: 920px;
    margin: 0 auto;
}
.capex-form {
    max-width: 920px;
}
.form-section {
    border: 1px solid rgba(26, 200, 212, 0.10);
    border-radius: 12px;
    padding: 18px 22px 8px;
    margin-bottom: 18px;
    background: rgba(11, 18, 32, 0.55);
}
.form-section legend {
    padding: 0 8px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7be7f0;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-row .field { margin-bottom: 14px; }
.form-section .field { margin-bottom: 14px; }
.form-section textarea {
    width: 100%;
    padding: 10px 12px;
    background: rgba(7, 13, 24, 0.85);
    color: #fff;
    border: 1px solid rgba(26, 200, 212, 0.18);
    border-radius: 8px;
    font: inherit;
    resize: vertical;
}
.form-section textarea:focus,
.form-section input[type="date"]:focus,
.form-section input[type="number"]:focus {
    outline: none;
    border-color: rgba(26, 200, 212, 0.55);
    box-shadow: 0 0 0 3px rgba(26, 200, 212, 0.14);
}
.form-section input[type="date"],
.form-section input[type="number"],
.form-section input[type="file"] {
    width: 100%;
    padding: 10px 12px;
    background: rgba(7, 13, 24, 0.85);
    color: #fff;
    border: 1px solid rgba(26, 200, 212, 0.18);
    border-radius: 8px;
    font: inherit;
}
.form-section input[type="file"] {
    padding: 8px;
}
.form-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

/* ═══ Status pills ═════════════════════════════════════════════════════════ */
.status-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid;
}
/* v3 status pills (Nick's restructure) */
.status-regional_review     { background: rgba(167, 139, 250, 0.18); color: #c8b9fb; border-color: rgba(167, 139, 250, 0.40); }
.status-executive_review    { background: rgba(247, 148, 29, 0.18);  color: #f7c184; border-color: rgba(247, 148, 29, 0.40); }
.status-pending_signature   { background: rgba(26, 200, 212, 0.18);  color: #7be7f0; border-color: rgba(26, 200, 212, 0.40); }
.status-po_assigned         { background: rgba(56, 189, 248, 0.18);  color: #7dd3fc; border-color: rgba(56, 189, 248, 0.40); }
.status-packet_accepted     { background: rgba(34, 197, 94, 0.18);   color: #4ade80; border-color: rgba(34, 197, 94, 0.40); }
.status-on_hold             { background: rgba(234, 179, 8, 0.18);   color: #fde047; border-color: rgba(234, 179, 8, 0.40); }
.status-rejected            { background: rgba(220, 38, 38, 0.18);   color: #fca5a5; border-color: rgba(220, 38, 38, 0.40); }
.status-completed           { background: rgba(20, 184, 166, 0.18);  color: #5eead4; border-color: rgba(20, 184, 166, 0.40); }
/* Legacy aliases (won't appear after v3 migration but kept for safety) */
.status-new                 { background: rgba(148, 163, 184, 0.18); color: #cbd5e1; border-color: rgba(148, 163, 184, 0.40); }
.status-waiting_approval    { background: rgba(247, 148, 29, 0.18);  color: #f7c184; border-color: rgba(247, 148, 29, 0.40); }
.status-approved            { background: rgba(74, 222, 128, 0.18);  color: #86efac; border-color: rgba(74, 222, 128, 0.40); }
.status-purchase_in_progress{ background: rgba(56, 189, 248, 0.18);  color: #7dd3fc; border-color: rgba(56, 189, 248, 0.40); }
.status-delivered           { background: rgba(34, 197, 94, 0.18);   color: #4ade80; border-color: rgba(34, 197, 94, 0.40); }

.topbar-menu-divider {
    height: 1px;
    background: var(--border-mid, #2c333d);
    margin: 6px 4px;
}

/* ═══ Inline PDF sign modal ════════════════════════════════════════════════ */
.modal.modal-xl {
    width: min(900px, 95vw);
    max-height: 95vh;
}
.pdfsign-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-mid, #2c333d);
    background: rgba(255, 255, 255, 0.02);
}
.pdfsign-spacer { flex: 1; }
.pdfsign-stage {
    position: relative;
    padding: 16px;
    overflow: auto;
    max-height: 65vh;
    background: #1a1f28;
    display: flex;
    justify-content: center;
}
#pdfsign-canvas-wrap {
    position: relative;
}
.pdfsign-overlay {
    position: absolute;
    inset: 0;
    cursor: default;
}
.pdfsign-stage-armed .pdfsign-overlay {
    cursor: crosshair;
}
.pdfsign-placed {
    position: absolute;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border: 2px dashed var(--teal, #13b3a6);
}
.pdfsign-placed-x {
    position: absolute;
    top: -10px; right: -10px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--surface-1, #131923);
    color: #fff;
    border: 1px solid var(--teal, #13b3a6);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: flex; align-items: center; justify-content: center;
}
.pdfsign-placed-x:hover { background: rgba(220, 38, 38, 0.18); border-color: #e87979; color: #fca5a5; }

/* Active tool button highlight (Sign as / Stamp / Draw) */
.pdfsign-toolbar button.is-active {
    background: var(--teal, #13b3a6);
    color: var(--surface-1, #0a1014);
    border-color: var(--teal, #13b3a6);
    box-shadow: 0 0 0 3px rgba(19, 179, 166, 0.18);
}
.pdfsign-draw-panel {
    position: absolute;
    bottom: 80px;
    right: 24px;
    width: 540px;
    background: var(--surface-1, #131923);
    border: 1px solid var(--teal, #13b3a6);
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    z-index: 10;
}
#pdfsign-canvas {
    display: block;
    width: 100%;
    height: 160px;
    background: #0d1626;
    border-radius: 6px;
    border: 1px solid var(--border-mid, #2c333d);
    cursor: crosshair;
}

/* ═══ PO Draft form modal ═════════════════════════════════════════════════ */
.po-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    font-size: 13px;
}
.po-items-table th {
    text-align: left;
    color: var(--text-soft, #b6c1cf);
    font-weight: 600;
    padding: 6px 8px;
    border-bottom: 1px solid var(--border-mid, #2c333d);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.05em;
}
.po-items-table td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--border-soft, #1e2530);
}
.po-items-table input {
    width: 100%;
    background: var(--surface-2, #1a212c);
    border: 1px solid var(--border-mid, #2c333d);
    color: var(--text, #e6eaf2);
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 13px;
}
.btn-link {
    background: none;
    border: none;
    color: var(--teal, #13b3a6);
    cursor: pointer;
    font-size: 13px;
    padding: 4px 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.btn-link:hover { color: #5eead4; }

/* ═══ My Requests cards ════════════════════════════════════════════════════ */
.my-requests-toolbar {
    margin-bottom: 14px;
}
.request-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 10px;
}
.request-card {
    background: rgba(11, 18, 32, 0.72);
    border: 1px solid rgba(26, 200, 212, 0.10);
    border-radius: 12px;
    padding: 14px 18px;
    cursor: pointer;
    transition: border-color 120ms ease, transform 120ms ease;
}
.request-card:hover {
    border-color: rgba(26, 200, 212, 0.45);
}
.request-card:active {
    transform: translateY(1px);
}
.request-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.request-card-name {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}
.request-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--text-soft, #b6c1cf);
}
.request-card-amount {
    font-weight: 700;
    color: #fff;
    font-size: 14px;
}
.request-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    font-size: 12px;
}
.reject-reason { color: #fca5a5; font-size: 12px; }

/* History card right cluster (status pill + admin delete button) */
.request-card-head-right {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.history-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: transparent;
    border: 1px solid rgba(220, 38, 38, 0.22);
    border-radius: 8px;
    color: #fca5a5;
    cursor: pointer;
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease;
}
.history-delete-btn:hover {
    background: rgba(220, 38, 38, 0.16);
    border-color: rgba(220, 38, 38, 0.55);
    color: #fecaca;
}
.history-delete-btn:active { transform: translateY(1px); }
.history-delete-btn:disabled { opacity: 0.5; cursor: progress; }

/* Destructive variant of btn-primary (used by forgeConfirm) */
.btn-primary.btn-danger {
    background: linear-gradient(180deg, #dc2626 0%, #b91c1c 100%);
    border-color: rgba(248, 113, 113, 0.55);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}
.btn-primary.btn-danger:hover {
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.35);
}

/* PDF row inside the shared request detail modal */
.pdf-row-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.pdf-row-actions + .pdf-row-actions { margin-top: 8px; }
.pdf-row-name {
    color: #fff;
    font-weight: 500;
    flex: 1 1 220px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pdf-view-btn,
.pdf-dl-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    background: rgba(26, 200, 212, 0.12);
    border: 1px solid rgba(26, 200, 212, 0.40);
    color: var(--teal, #1AC8D4);
    text-decoration: none;
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
    font-family: inherit;
}
.pdf-view-btn:hover,
.pdf-dl-link:hover {
    background: rgba(26, 200, 212, 0.22);
    border-color: rgba(26, 200, 212, 0.7);
    color: #fff;
    text-decoration: none;
}
.pdf-dl-link {
    background: transparent;
    color: var(--text-soft, #b6c1cf);
    border-color: var(--border-mid, rgba(255,255,255,0.10));
}
.pdf-dl-link:hover { color: #fff; }

/* Stack multiple attachment rows nicely inside one detail-v */
.detail-v > .detail-row {
    margin-top: 8px;
    padding: 0;
    border: 0;
    background: transparent;
}
.detail-v > .detail-row:first-child { margin-top: 0; }

/* PDF preview modal */
.forge-pdf-modal-shell {
    width: min(96vw, 1100px);
    height: min(92vh, 900px);
    display: flex;
    flex-direction: column;
}
.forge-pdf-modal-shell .modal-header {
    flex: 0 0 auto;
}
.forge-pdf-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.forge-pdf-actions .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 12.5px;
}
.forge-pdf-body {
    flex: 1 1 auto;
    padding: 0;
    background: #0b1220;
    display: flex;
}
#forge-pdf-frame {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}

/* ═══ Kanban cards ═════════════════════════════════════════════════════════ */
.kanban-card {
    background: rgba(7, 13, 24, 0.85);
    border: 1px solid rgba(26, 200, 212, 0.14);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: border-color 0.12s, transform 0.12s;
}
.kanban-card:hover {
    border-color: rgba(26, 200, 212, 0.40);
    transform: translateY(-1px);
}
.kanban-card-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 4px;
}
.kanban-card-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
    color: var(--text-soft, #b6c1cf);
}
.kanban-card-amount {
    font-weight: 700;
    color: #fff;
}
.kanban-card-loc {
    font-size: 11px;
    margin-top: 4px;
}
.kanban-card-tags {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.tag {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 9.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: 1px solid;
    background: rgba(255, 255, 255, 0.06);
    color: #c8d3df;
    border-color: rgba(255, 255, 255, 0.14);
}
.tag-roi_analysis_needed   { background: rgba(167, 139, 250, 0.18); color: #c8b9fb; border-color: rgba(167, 139, 250, 0.40); }
.tag-confirm_pricing       { background: rgba(247, 148, 29, 0.18);  color: #f7c184; border-color: rgba(247, 148, 29, 0.40); }
.tag-additional_info_needed{ background: rgba(234, 179, 8, 0.18);   color: #fde047; border-color: rgba(234, 179, 8, 0.40); }
.tag-ready_for_review      { background: rgba(74, 222, 128, 0.18);  color: #86efac; border-color: rgba(74, 222, 128, 0.40); }

/* ═══ Detail modal ═════════════════════════════════════════════════════════ */
.modal-lg { width: min(720px, calc(100vw - 40px)); max-height: 85vh; display: flex; flex-direction: column; }
.modal-lg .modal-body { overflow-y: auto; max-height: 60vh; }
.modal-lg .modal-footer { flex-wrap: wrap; gap: 8px; }
.detail-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
.detail-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(26, 200, 212, 0.08);
    font-size: 13px;
}
.detail-row:last-child { border-bottom: none; }
.detail-k {
    color: var(--text-soft, #b6c1cf);
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-top: 2px;
}
.detail-v {
    color: #fff;
    font-size: 13.5px;
    word-wrap: break-word;
}
.detail-v .muted { font-size: 11.5px; }

/* ═══ Tag picker ═══════════════════════════════════════════════════════════ */
.tag-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 6px;
    background: rgba(7, 13, 24, 0.55);
    border: 1px solid rgba(26, 200, 212, 0.14);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.12s, background 0.12s;
}
.tag-check:hover { border-color: rgba(26, 200, 212, 0.40); background: rgba(26, 200, 212, 0.06); }
.tag-check input { width: 16px; height: 16px; accent-color: #1AC8D4; cursor: pointer; }
.tag-check .tag { font-size: 11.5px; }

/* ═══ Signature canvas ═════════════════════════════════════════════════════ */
.sig-amount {
    margin-bottom: 10px;
    padding: 8px 12px;
    background: rgba(26, 200, 212, 0.08);
    border: 1px solid rgba(26, 200, 212, 0.30);
    border-radius: 8px;
    font-size: 13.5px;
    color: #fff;
}
#sig-canvas {
    width: 100%;
    height: 180px;
    background: #0d1626;
    border: 1px solid rgba(26, 200, 212, 0.30);
    border-radius: 8px;
    cursor: crosshair;
    touch-action: none;
}

/* ═══ Page header on simple pages ══════════════════════════════════════════ */
.page-header {
    margin-bottom: 18px;
}
.page-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #fff;
}
.page-sub {
    margin: 4px 0 0 0;
    color: var(--text-soft, #b6c1cf);
    font-size: 13px;
}
.muted { color: var(--text-faint, #8895a6); }
.empty-state {
    color: var(--text-faint, #8895a6);
    font-size: 13px;
    padding: 20px 0;
}
.kanban-empty {
    color: var(--text-faint, #8895a6);
    font-size: 11.5px;
    text-align: center;
    padding: 12px 4px;
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .settings-shell { grid-template-columns: 1fr; }
    .settings-menu {
        flex-direction: row;
        overflow-x: auto;
        border-right: none;
        border-bottom: 1px solid rgba(26, 200, 212, 0.10);
        padding: 12px;
    }
    .settings-menu-item { white-space: nowrap; }
    .settings-body { padding: 22px 18px; }
    .field-row { grid-template-columns: 1fr; }
    .user-table thead { display: none; }
    .user-table tbody td { display: block; padding: 8px 14px; border-bottom: none; }
    .user-table tbody tr {
        display: block;
        padding: 12px 0 14px;
        border-bottom: 1px solid rgba(26, 200, 212, 0.10);
    }
    .user-table .col-actions { text-align: left; padding-top: 6px !important; }
}
