:root {
    --c-primary: #1e3a6b;
    --c-primary-deep: #14264a;
    --c-accent: #c9a961;
    --c-accent-2: #e8c77a;
    --c-bg: #f7f2e8;
    --c-surface: #ffffff;
    --c-surface-2: #faf6ec;
    --c-line: #eae3d4;
    --c-line-2: #d9d0ba;
    --c-text: #1a1f2c;
    --c-text-2: #4d5466;
    --c-text-3: #8a8e9b;
    --c-green: #4f8b5c;
    --c-amber: #c68a1e;
    --c-red: #b84a3d;
    --c-info: #3a6ba5;
    --radius: 10px;
    --shadow: 0 8px 24px -12px rgba(20, 38, 74, .28);
}

[data-theme="dark"] {
    --c-bg: #0f1420;
    --c-surface: #1a2030;
    --c-surface-2: #232a3c;
    --c-line: #2a3245;
    --c-line-2: #3a4258;
    --c-text: #e8eaf0;
    --c-text-2: #b8bdc8;
    --c-text-3: #7d8294;
    --shadow: 0 8px 24px -12px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--c-bg);
    color: var(--c-text);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}
body:has(.fh-popout-content) {
    background:
        linear-gradient(rgba(20, 38, 74, .36), rgba(20, 38, 74, .36)),
        var(--c-bg);
}
a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: none; }
button, input, select, textarea { font: inherit; }

.fh-app { display: flex; min-height: 100vh; }
.fh-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fh-content { padding: 24px 32px 56px; flex: 1; }
.fh-popout-content {
    min-height: 100vh;
    padding: 22px;
    display: grid;
    place-items: start center;
}
body.has-inline-modal { overflow: hidden; }
.container { width: min(1180px, calc(100% - 32px)); margin: 24px auto 56px; }

.fh-sidebar {
    width: 248px;
    height: 100vh;
    position: sticky;
    top: 0;
    align-self: flex-start;
    background: linear-gradient(180deg, var(--c-primary-deep), var(--c-primary));
    color: rgba(255,255,255,.9);
    padding: 22px 14px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.25) transparent;
}
.fh-sidebar::after {
    content: "";
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--c-accent), var(--c-accent-2), var(--c-accent), transparent);
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
}
.fh-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 6px 18px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    margin-bottom: 16px;
    color: #fff;
}
.fh-brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    border: 1px solid rgba(232,199,122,.28);
    background: rgba(255,255,255,.06);
    overflow: hidden;
}
.fh-brand-mark img { width: 34px; height: auto; display: block; }
.fh-brand-name {
    display: block;
    font-family: Georgia, serif;
    letter-spacing: .12em;
    font-size: 18px;
    font-weight: 700;
}
.fh-brand-sub {
    display: block;
    color: var(--c-accent-2);
    text-transform: uppercase;
    letter-spacing: .16em;
    font-size: 10px;
}
.fh-nav-label {
    padding: 0 10px;
    margin: 4px 0 4px;
    color: rgba(255,255,255,.42);
    font-size: 10px;
    letter-spacing: .2em;
    text-transform: uppercase;
}
.fh-nav { display: grid; gap: 1px; flex: 1; align-content: start; }
.fh-nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 12px;
    border-radius: var(--radius);
    color: rgba(255,255,255,.78);
    font-weight: 650;
}
.fh-nav-item:hover, .fh-nav-item.is-active {
    color: #fff;
    background: rgba(232,199,122,.13);
}
.fh-nav-item.is-active::before {
    content: "";
    position: absolute;
    left: -14px;
    top: 24%;
    bottom: 24%;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--c-accent);
}
.fh-nav-icon {
    width: 22px;
    height: 22px;
    color: var(--c-accent-2);
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.fh-nav-icon svg { display: block; }
.fh-side-card {
    border: 1px solid rgba(232,199,122,.25);
    border-radius: 14px;
    padding: 14px;
    background: rgba(255,255,255,.06);
}
.fh-side-card-title { color: #fff; font-weight: 800; }
.fh-side-card-sub { color: rgba(255,255,255,.6); font-size: 12px; }

.fh-topbar {
    min-height: 74px;
    background: rgba(247,242,232,.86);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--c-line);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    padding: 14px 32px;
    position: sticky;
    top: 0;
    z-index: 4;
}
.fh-breadcrumb {
    color: var(--c-text-3);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .18em;
}
.fh-page-title { font-size: 22px; font-weight: 800; }
.fh-user { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.fh-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 800;
}
.fh-user-name { font-weight: 800; }
.fh-user-role { font-size: 12px; color: var(--c-text-3); }

.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}
.page-head.compact { align-items: center; margin-bottom: 12px; }
.fh-eyebrow {
    color: var(--c-accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
}
h1, h2, h3 { margin: 0 0 10px; line-height: 1.2; }
h1 { font-size: 28px; }
h2 { font-size: 18px; }
.muted { color: var(--c-text-3); }

section, .fh-panel {
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: 14px;
    padding: 18px;
    margin: 18px 0;
    box-shadow: var(--shadow);
}
.fh-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}
.fh-panel-title { margin: 0; font-size: 16px; }
.fh-panel-sub { color: var(--c-text-3); font-size: 12px; }

.fh-tabs-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 18px;
}
.fh-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.fh-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    color: var(--c-text-2);
    font-weight: 750;
}
.fh-tab.is-active {
    border-color: rgba(201,169,97,.55);
    background: #fff9e8;
    color: var(--c-primary);
}
.fh-tab b {
    min-width: 22px;
    min-height: 20px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--c-surface-2);
    color: var(--c-primary);
    font-size: 12px;
}

.fh-pr-cards { display: grid; gap: 12px; }
.fh-pr-card {
    display: grid;
    grid-template-columns: 5px 1fr;
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow);
    color: inherit;
    transition: transform .15s ease, box-shadow .15s ease;
}
.fh-pr-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px -20px rgba(20,38,74,.42);
}
.fh-pr-card-rail { background: linear-gradient(180deg, var(--c-accent), var(--c-primary)); }
.fh-pr-card-body { display: grid; gap: 14px; padding: 16px; }
.fh-pr-card-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}
.fh-pr-card-id {
    display: block;
    color: var(--c-primary);
    font-weight: 850;
    font-size: 16px;
}
.fh-pr-card-req { display: block; color: var(--c-text-3); font-size: 13px; margin-top: 3px; }
.fh-pr-card-items {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.fh-pr-card-item {
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-line);
}
.fh-foot-label { color: var(--c-text-3); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.fh-foot-value { color: var(--c-text); font-weight: 800; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
}
.stat {
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: 14px;
    padding: 16px;
    box-shadow: var(--shadow);
}
.stat span { display: block; color: var(--c-text-3); min-height: 34px; }
.stat strong { display: block; margin-top: 8px; font-size: 22px; color: var(--c-primary); }
.grid-two, .grid-three { display: grid; gap: 18px; }
.grid-two { grid-template-columns: 1fr 1fr; }
.grid-two > *, .grid-three > * { min-width: 0; }
.grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 14px;
}
.meta-grid div {
    display: grid;
    gap: 3px;
    padding: 10px;
    border: 1px solid var(--c-line);
    border-radius: 8px;
    background: var(--c-surface);
}
.meta-grid b {
    color: var(--c-text-3);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.meta-grid span {
    color: var(--c-text);
    font-weight: 700;
}

.table-wrap { width: 100%; overflow-x: auto; }
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--c-surface);
}
th, td {
    border-bottom: 1px solid var(--c-line);
    padding: 10px 11px;
    text-align: left;
    vertical-align: top;
}
th {
    color: var(--c-text-2);
    background: var(--c-surface-2);
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
tfoot th { background: #fff9e8; color: var(--c-primary); }
.empty { color: var(--c-text-3); text-align: center; padding: 22px; }

.stack { display: grid; gap: 14px; }
.form-grid, .filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
}
.filters { grid-template-columns: repeat(7, minmax(110px, 1fr)); margin-bottom: 18px; }
label { display: grid; gap: 6px; font-weight: 800; color: var(--c-text-2); }
input, select, textarea {
    width: 100%;
    border: 1px solid var(--c-line-2);
    border-radius: 9px;
    padding: 9px 10px;
    background: #fff;
    color: var(--c-text);
}
input:focus, select:focus, textarea:focus {
    outline: 2px solid rgba(201,169,97,.26);
    border-color: var(--c-accent);
}
textarea { resize: vertical; }

.pr-form input[name="item_name[]"],
.pr-form input[name="unit[]"] { text-transform: uppercase; }
.pr-form input[name="quantity[]"],
.pr-form input[name="estimated_price[]"] {
    appearance: textfield;
    -moz-appearance: textfield;
}
.pr-form input[name="quantity[]"]::-webkit-outer-spin-button,
.pr-form input[name="quantity[]"]::-webkit-inner-spin-button,
.pr-form input[name="estimated_price[]"]::-webkit-outer-spin-button,
.pr-form input[name="estimated_price[]"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[name="quantity[]"] {
    appearance: textfield;
    -moz-appearance: textfield;
}
input[name="quantity[]"]::-webkit-outer-spin-button,
input[name="quantity[]"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.btn, .fh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    border: 1px solid var(--c-line-2);
    border-radius: 9px;
    padding: 8px 12px;
    color: var(--c-text);
    background: #fff;
    cursor: pointer;
    font-weight: 800;
    text-decoration: none;
}
.btn:hover, .fh-btn:hover { background: var(--c-surface-2); }
.btn.primary, .fh-btn-primary {
    color: #fff;
    border-color: var(--c-primary);
    background: linear-gradient(135deg, var(--c-primary), #2c4f8a);
}
.btn.primary:hover, .fh-btn-primary:hover { background: var(--c-primary-deep); }
.fh-btn-ghost { background: rgba(255,255,255,.72); }
.fh-btn-block { width: 100%; }
.btn.danger { color: #fff; border-color: var(--c-red); background: var(--c-red); }
.btn.small { min-height: 30px; padding: 5px 9px; font-size: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions form { margin: 0; }
.inline-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.inline-form input { min-width: 90px; flex: 1 1 90px; }

.modal-backdrop-page {
    min-height: calc(100vh - 150px);
    display: grid;
    place-items: start center;
    padding: 6px 0;
}
.detail-modal {
    width: min(1120px, 100%);
    background: var(--c-surface);
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 18px;
    box-shadow: 0 28px 72px -24px rgba(20,38,74,.56);
    padding: 20px;
}
.fh-popout-content .modal-backdrop-page {
    width: 100%;
    min-height: auto;
    padding: 0;
}
.fh-popout-content .detail-modal {
    max-height: calc(100vh - 44px);
    overflow: auto;
}
.detail-modal > .page-head {
    position: sticky;
    top: -20px;
    z-index: 2;
    margin: -20px -20px 18px;
    padding: 18px 20px;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--c-line);
    border-radius: 18px 18px 0 0;
}
.detail-modal section { box-shadow: var(--shadow); }

.fh-inline-modal[hidden] { display: none; }
.fh-inline-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 28px;
}
.fh-inline-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 38, 74, .42);
    backdrop-filter: blur(4px);
}
.fh-inline-modal-window {
    position: relative;
    z-index: 1;
    width: min(1120px, calc(100vw - 44px));
    height: min(860px, calc(100vh - 44px));
    border-radius: 20px;
    background: var(--c-surface);
    border: 1px solid rgba(255,255,255,.78);
    box-shadow: 0 30px 90px -24px rgba(20,38,74,.62);
    overflow: hidden;
}
.fh-inline-modal-window iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: var(--c-bg);
}
.fh-inline-modal-close {
    position: absolute;
    z-index: 2;
    top: 14px;
    right: 18px;
    min-height: 34px;
    border: 1px solid var(--c-line-2);
    border-radius: 999px;
    padding: 7px 13px;
    background: #fff;
    color: var(--c-primary);
    font-weight: 800;
    cursor: pointer;
    box-shadow: var(--shadow);
}
.fh-inline-modal-close:hover { background: var(--c-surface-2); }

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
}
.badge.big { font-size: 13px; padding: 7px 10px; }
.secondary { background: #7a8190; }
.warning { background: var(--c-amber); }
.danger { background: var(--c-red); }
.info { background: var(--c-info); }
.primary { background: var(--c-primary); }
.success { background: var(--c-green); }
.dark { background: #1f2937; }

.alert {
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
    border: 1px solid var(--c-line);
    background: #fff;
    box-shadow: var(--shadow);
}
.alert-success { border-color: #b9d8bd; background: #f1fbf1; }
.alert-danger { border-color: #e9b2ab; background: #fff3f1; }
.alert-warning { border-color: #ead19a; background: #fff9e8; }

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--c-primary-deep), var(--c-bg));
}
.login-card {
    width: min(420px, calc(100% - 28px));
    background: var(--c-surface);
    padding: 28px;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0,0,0,.22);
}
.hint { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--c-line); color: var(--c-text-3); }

@media (max-width: 1080px) {
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-two, .grid-three, .summary, .meta-grid, .form-grid, .filters { grid-template-columns: 1fr; }
}
/* fh-topbar-auth: desktop inline with fh-user */
.fh-topbar-auth { display: flex; align-items: center; gap: 6px; }

@media (max-width: 760px) {
    /* Topbar: 2-row layout */
    .fh-topbar {
        padding: 8px 14px;
        min-height: unset;
        flex-wrap: wrap;
        gap: 0;
        align-items: center;
    }
    /* Row 1: hamburger+title (left) + Profil+Logout (right) */
    .fh-topbar-left { order: 1; flex: 1; min-width: 0; padding-bottom: 5px; }
    .fh-topbar-auth { order: 2; padding-bottom: 5px; gap: 4px; }
    .fh-topbar-auth .fh-btn-ghost { font-size: 11px; padding: 4px 8px; }
    .fh-page-title { font-size: 15px; }
    .fh-breadcrumb { display: none; }
    /* Row 2: bell+theme (left) + avatar+name (right) — full width */
    .fh-user {
        order: 3;
        width: 100%;
        gap: 4px;
        padding: 5px 0 2px;
        border-top: 1px solid var(--c-line);
        margin-left: 0;
    }
    /* Push avatar+name to the right */
    .fh-user-avatar { margin-left: auto; }
    /* Show avatar + name on mobile row 2 */
    .fh-user-avatar { display: flex !important; width: 28px; height: 28px; font-size: 11px; }
    .fh-user-meta { display: flex !important; flex-direction: column; }
    .fh-user-name { font-size: 12px; }
    .fh-user-role { font-size: 10px; }
    /* Layout */
    .fh-content { padding: 14px 12px 40px; }
    .page-head { flex-direction: column; gap: 10px; }
    .fh-pr-card-items { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    th, td { padding: 6px 8px; font-size: 13px; }
    .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ============== UI/UX Polish Additions ============== */

/* Stats grid responsive: 6 → 4 → 3 → 2 → 1 */
.stats-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1280px) { .stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 980px)  { .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px)  { .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px)  { .stats-grid { grid-template-columns: 1fr; } }

/* Dashboard purchase stats row — 5 cards fixed on desktop, stack vertical on mobile */
.dash-purchase-grid {
    grid-template-columns: repeat(5, max-content);
    gap: 0.5rem;
    margin-top: 0;
    align-items: stretch;
}
.dash-purchase-scroll { width: 100%; }
@media (max-width: 760px) {
    .dash-purchase-grid {
        grid-template-columns: 1fr;
        white-space: normal;
    }
    /* all table-wrap: horizontal scroll on mobile */
    .table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        display: block;
        max-width: 100%;
    }
    section { overflow: visible; min-width: 0; }
}

/* Custom focus ring (gold) */
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
    outline: 2px solid var(--c-accent);
    outline-offset: 2px;
    border-radius: 6px;
}

/* Topbar layout */
.fh-topbar-left { display: flex; align-items: center; gap: 14px; }
.fh-hamburger {
    display: none;
    background: transparent;
    border: 1px solid var(--c-line);
    border-radius: 8px;
    padding: 6px 8px;
    color: var(--c-text-2);
    cursor: pointer;
}
.fh-hamburger:hover { background: var(--c-surface-2); }

/* Bell dropdown */
.fh-bell-trigger, .fh-theme-toggle {
    position: relative;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 999px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--c-text-2);
    cursor: pointer;
}
.fh-bell-trigger:hover, .fh-theme-toggle:hover {
    background: var(--c-surface-2);
    border-color: var(--c-line);
    color: var(--c-text);
}
.fh-bell-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--c-red);
    color: #fff;
    border-radius: 10px;
    padding: 1px 5px;
    font-size: 10px;
    font-weight: 800;
    min-width: 16px;
    text-align: center;
    border: 2px solid var(--c-bg);
}
.fh-bell-dropdown {
    position: absolute;
    top: 64px;
    right: 100px;
    width: 360px;
    max-width: 92vw;
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: 14px;
    box-shadow: 0 20px 50px -18px rgba(20, 38, 74, .35);
    z-index: 50;
    overflow: hidden;
}
.fh-bell-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid var(--c-line);
}
.fh-bell-head a { font-size: 12px; font-weight: 700; color: var(--c-primary); }
.fh-bell-list { max-height: 400px; overflow-y: auto; }
.fh-bell-item {
    display: block;
    padding: 10px 14px;
    border-bottom: 1px solid var(--c-line);
    color: inherit;
}
.fh-bell-item:hover { background: var(--c-surface-2); }
.fh-bell-item.is-unread { background: rgba(232, 199, 122, .08); }
.fh-bell-item.is-unread .fh-bell-item-title::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--c-red);
    margin-right: 6px;
}
.fh-bell-item-title { font-weight: 700; font-size: 13px; }
.fh-bell-item-body { color: var(--c-text-2); font-size: 12px; margin-top: 2px; }
.fh-bell-item-time { color: var(--c-text-3); font-size: 11px; margin-top: 4px; }
.fh-bell-empty { padding: 24px 14px; text-align: center; color: var(--c-text-3); }

/* Theme toggle: show sun in light mode, moon in dark */
.fh-theme-toggle .fh-icon-moon { display: none; }
[data-theme="dark"] .fh-theme-toggle .fh-icon-sun { display: none; }
[data-theme="dark"] .fh-theme-toggle .fh-icon-moon { display: inline; }

/* Form grid 3-col */
.form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 14px; }
.form-grid-3 .span-2 { grid-column: span 2; }
.form-grid-3 .span-3 { grid-column: span 3; }
.form-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--c-text-2); font-weight: 700; }
.form-grid label input, .form-grid label select, .form-grid label textarea {
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: 8px;
    padding: 8px 10px;
    color: var(--c-text);
    font-size: 14px;
    font-weight: 500;
}
@media (max-width: 900px) { .form-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid-3 .span-3 { grid-column: span 2; } }
@media (max-width: 600px) { .form-grid-3 { grid-template-columns: 1fr; } .form-grid-3 .span-2, .form-grid-3 .span-3 { grid-column: span 1; } }

/* Items actions bar (Tambah Item + Grand Total) */
.items-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-line);
    border-top: 0;
    border-radius: 0 0 12px 12px;
}
.grand-total-display {
    display: flex; align-items: baseline; gap: 12px;
    font-size: 22px;
    font-weight: 800;
    color: var(--c-primary);
}
.grand-total-display .muted {
    font-size: 11px;
    letter-spacing: .15em;
    color: var(--c-text-3);
    font-weight: 700;
}

/* Frozen first column */
.fh-table-frozen { border-collapse: separate; border-spacing: 0; }
.fh-table-frozen th.freeze-col, .fh-table-frozen td.freeze-col {
    position: sticky;
    left: 0;
    background: var(--c-surface);
    z-index: 2;
    box-shadow: 1px 0 0 var(--c-line);
}
.fh-table-frozen tbody tr:hover td.freeze-col { background: var(--c-surface-2); }
.fh-table-frozen tbody tr:hover td { background: var(--c-surface-2); }

/* Approval dot pills */
.appr-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--c-surface-2);
    border: 1px solid var(--c-line);
    color: var(--c-text-3);
    font-size: 11px;
    font-weight: 800;
    margin-right: 2px;
}
.appr-dot.is-approved {
    background: var(--c-primary);
    color: #fff;
    border-color: var(--c-primary);
}

/* Empty state */
.empty-state {
    padding: 48px 24px;
    text-align: center;
    color: var(--c-text-3);
}
.empty-state-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--c-surface-2);
    border: 1px solid var(--c-line);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--c-text-3);
    margin-bottom: 12px;
}
.empty-state h3 { color: var(--c-text-2); font-size: 16px; margin: 0 0 4px; }
.empty-state p { margin: 0 0 14px; }

/* Skeleton */
.skeleton {
    background: linear-gradient(90deg, var(--c-surface-2) 0%, var(--c-line) 50%, var(--c-surface-2) 100%);
    background-size: 200% 100%;
    animation: skel 1.4s ease-in-out infinite;
    border-radius: 6px;
    color: transparent !important;
}
@keyframes skel { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* Toast container (auto-dismiss alert) */
.alert {
    position: relative;
    padding: 12px 36px 12px 14px;
    border-radius: 10px;
    margin-bottom: 12px;
    border: 1px solid;
    animation: slideIn .25s ease-out;
}
.alert-success { background: rgba(79, 139, 92, .12); border-color: rgba(79, 139, 92, .35); color: #2c5e3a; }
.alert-danger  { background: rgba(184, 74, 61, .12); border-color: rgba(184, 74, 61, .35); color: #8a3a30; }
.alert-warning { background: rgba(198, 138, 30, .14); border-color: rgba(198, 138, 30, .35); color: #7a560f; }
.alert-info    { background: rgba(58, 107, 165, .12); border-color: rgba(58, 107, 165, .35); color: #2a5179; }
.alert.is-fading { opacity: 0; transition: opacity .4s; }
@keyframes slideIn { from { transform: translateY(-6px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
[data-theme="dark"] .alert-success { color: #8fd3a0; }
[data-theme="dark"] .alert-danger { color: #ffa090; }
[data-theme="dark"] .alert-warning { color: #ffd485; }
[data-theme="dark"] .alert-info { color: #97c0ee; }

/* Autosave indicator */
#autosave-indicator.is-saving { color: var(--c-amber); }
#autosave-indicator.is-saved { color: var(--c-green); }

/* Mobile hamburger + collapsible sidebar */
@media (max-width: 900px) {
    .fh-hamburger { display: inline-flex; }
    .fh-sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        bottom: 0;
        width: 270px;
        z-index: 60;
        transition: left .25s;
        overflow-y: auto;
        overflow-x: hidden;
    }
    body.sidebar-open .fh-sidebar {
        left: 0;
        padding-inline: 14px;
    }
    /* Restore full text when drawer is open on mobile */
    body.sidebar-open .fh-brand span:not(.fh-brand-mark),
    body.sidebar-open .fh-nav-label,
    body.sidebar-open .fh-nav-item span:not(.fh-nav-icon) {
        display: initial;
    }
    body.sidebar-open .fh-brand { justify-content: flex-start; }
    body.sidebar-open .fh-nav-item { justify-content: flex-start; padding: 9px 10px; }
    body.sidebar-open::after {
        content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 50;
    }
    .fh-bell-dropdown { right: 16px; }
    .fh-main { min-width: 0; overflow-x: hidden; }
}

/* Auto-dismiss flash message helper class */
.flash-stack { position: fixed; top: 90px; right: 24px; z-index: 70; max-width: 360px; }
@media (max-width: 600px) { .flash-stack { left: 12px; right: 12px; max-width: none; } }

/* Number format helper */
.num { font-variant-numeric: tabular-nums; text-align: right; }

/* Dark mode overrides */
[data-theme="dark"] body { background: var(--c-bg); color: var(--c-text); }
[data-theme="dark"] .fh-topbar { background: rgba(15, 20, 32, .86); }
[data-theme="dark"] .fh-pr-card, [data-theme="dark"] section, [data-theme="dark"] .stat, [data-theme="dark"] .fh-tab, [data-theme="dark"] .fh-card {
    background: var(--c-surface);
    border-color: var(--c-line);
}
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea {
    background: var(--c-surface-2);
    color: var(--c-text);
    border-color: var(--c-line);
}
[data-theme="dark"] .fh-tab.is-active { background: rgba(232,199,122,.16); color: var(--c-accent-2); border-color: rgba(232,199,122,.4); }

/* ============== Professional Operations UI Refresh ============== */
:root {
    --c-primary: #2563eb;
    --c-primary-deep: #1d4ed8;
    --c-accent: #0f766e;
    --c-accent-2: #14b8a6;
    --c-bg: #f5f7fb;
    --c-surface: #ffffff;
    --c-surface-2: #f8fafc;
    --c-line: #e2e8f0;
    --c-line-2: #cbd5e1;
    --c-text: #172033;
    --c-text-2: #475569;
    --c-text-3: #7b8798;
    --c-green: #15803d;
    --c-amber: #b7791f;
    --c-red: #b42318;
    --c-info: #0369a1;
    --radius: 8px;
    --shadow: 0 10px 30px -22px rgba(15, 23, 42, .42);
    --shadow-strong: 0 20px 60px -30px rgba(15, 23, 42, .5);
}

[data-theme="dark"] {
    --c-bg: #111827;
    --c-surface: #172033;
    --c-surface-2: #1f2937;
    --c-line: #2f3a4d;
    --c-line-2: #3d495c;
    --c-text: #f8fafc;
    --c-text-2: #cbd5e1;
    --c-text-3: #94a3b8;
    --shadow: 0 10px 30px -20px rgba(0, 0, 0, .72);
}

body {
    background:
        linear-gradient(180deg, rgba(255,255,255,.9) 0, rgba(255,255,255,0) 190px),
        var(--c-bg);
    font-size: 13px;
    color: var(--c-text);
}
a { color: var(--c-primary); }

.fh-sidebar {
    width: 264px;
    background: var(--c-surface);
    color: var(--c-text-2);
    border-right: 1px solid var(--c-line);
    padding: 18px 14px;
    box-shadow: 12px 0 28px -28px rgba(15, 23, 42, .5);
}
.fh-sidebar::after { display: none; }
.fh-brand {
    color: var(--c-text);
    border-bottom: 1px solid var(--c-line);
    padding: 0 6px 16px;
    margin-bottom: 14px;
}
.fh-brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border-color: var(--c-line);
    background: var(--c-surface-2);
}
.fh-brand-mark img { width: 31px; }
.fh-brand-name {
    font-family: "Segoe UI", Inter, Arial, sans-serif;
    letter-spacing: .06em;
    font-size: 16px;
}
.fh-brand-sub {
    color: var(--c-text-3);
    letter-spacing: .1em;
}
.fh-nav { gap: 1px; }
.fh-nav-label {
    color: var(--c-text-3);
    letter-spacing: .12em;
    margin: 8px 0 3px;
}
.fh-nav-item {
    color: var(--c-text-2);
    border-radius: 8px;
    padding: 6px 10px;
    font-weight: 700;
}
.fh-nav-icon { color: var(--c-text-3); }
.fh-nav-item:hover {
    color: var(--c-text);
    background: var(--c-surface-2);
}
.fh-nav-item.is-active {
    color: var(--c-primary);
    background: #eff6ff;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .12);
}
.fh-nav-item.is-active .fh-nav-icon { color: var(--c-primary); }
.fh-nav-item.is-active::before {
    left: -14px;
    top: 18%;
    bottom: 18%;
    width: 3px;
    background: var(--c-primary);
}

.fh-main { background: transparent; }
.fh-content {
    width: min(100%, 1480px);
    padding: 22px 30px 52px;
}
.fh-topbar {
    min-height: 68px;
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid var(--c-line);
    box-shadow: 0 16px 34px -34px rgba(15, 23, 42, .55);
    padding: 12px 30px;
}
.fh-breadcrumb {
    letter-spacing: .08em;
    font-size: 10px;
    color: var(--c-text-3);
}
.fh-page-title {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 0;
}
.fh-user { gap: 9px; }
.fh-user-avatar {
    width: 34px;
    height: 34px;
    background: #e0f2fe;
    color: #075985;
    border: 1px solid #bae6fd;
}
.fh-user-name { font-size: 13px; }
.fh-user-role { font-size: 11px; }
.fh-btn-ghost {
    background: var(--c-surface);
    border-color: var(--c-line);
}

.page-head {
    align-items: center;
    margin-bottom: 16px;
}
.page-head h1 {
    font-size: 24px;
    letter-spacing: -.01em;
}
.fh-eyebrow {
    color: var(--c-text-3);
    font-size: 10px;
    letter-spacing: .1em;
}
h1, h2, h3 { color: var(--c-text); }
h2 { font-size: 16px; }
.muted { color: var(--c-text-3); }

section, .fh-panel, .stat, .fh-pr-card, .detail-modal, .login-card {
    border-radius: 8px;
    border-color: var(--c-line);
    box-shadow: var(--shadow);
}
section, .fh-panel {
    padding: 16px;
    margin: 14px 0;
}
.fh-panel-head {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--c-line);
}
.fh-panel-title { font-size: 15px; }
.fh-panel-sub { font-size: 12px; }

.stats-grid { gap: 10px; }
.stat {
    padding: 14px;
    background: var(--c-surface);
}
.stat span {
    min-height: 0;
    font-size: 12px;
}
.stat strong {
    color: var(--c-text);
    font-size: 24px;
    margin-top: 6px;
    letter-spacing: -.02em;
}

.fh-tabs-row { margin-bottom: 14px; }
.fh-tab {
    min-height: 34px;
    border-radius: 8px;
    padding: 7px 10px;
    background: transparent;
    color: var(--c-text-2);
}
.fh-tab:hover { background: var(--c-surface); }
.fh-tab.is-active {
    background: var(--c-surface);
    color: var(--c-primary);
    border-color: rgba(37, 99, 235, .28);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.fh-tab b {
    background: #eff6ff;
    color: var(--c-primary);
}

.table-wrap {
    border: 1px solid var(--c-line);
    border-radius: 8px;
    background: var(--c-surface);
}
table {
    font-size: 13px;
    background: transparent;
}
th, td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--c-line);
}
th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f1f5f9;
    color: #334155;
    font-size: 11px;
    letter-spacing: .035em;
}
tbody tr:hover td { background: #f8fafc; }
tbody tr:last-child td { border-bottom: 0; }
tfoot th {
    background: #f8fafc;
    color: var(--c-text);
}
.num { font-variant-numeric: tabular-nums; }
td.line-total { text-align: right !important; vertical-align: middle !important; }

label {
    gap: 5px;
    color: var(--c-text-2);
    font-size: 12px;
    font-weight: 750;
}
input, select, textarea {
    min-height: 36px;
    border-radius: 8px;
    border-color: var(--c-line-2);
    background: var(--c-surface);
    color: var(--c-text);
    padding: 8px 10px;
    font-size: 13px;
}
input[type="checkbox"],
input[type="radio"] {
    width: 16px;
    height: 16px;
    min-height: 0;
    padding: 0;
    margin: 0;
    accent-color: var(--c-primary);
    vertical-align: middle;
}
td:has(> input[type="checkbox"]),
td:has(> input[type="radio"]) {
    text-align: center;
    vertical-align: middle;
}
.po-entry-table th,
.po-entry-table td {
    vertical-align: middle;
}
.po-entry-table td {
    height: 36px;
    padding: 3px 5px;
}
.po-entry-table th {
    padding: 4px 5px;
}
.po-entry-table input:not([type="checkbox"]):not([type="radio"]),
.po-entry-table select {
    min-height: 26px;
    height: 26px;
    padding: 3px 5px;
}
.po-entry-table input[name="quantity[]"],
.po-entry-table input[name="price[]"] {
    text-align: right;
    font-variant-numeric: tabular-nums;
    min-width: 92px;
}
.po-entry-table input[name="remarks[]"] {
    min-width: 160px;
}
.po-entry-table .po-line-total {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    font-weight: 700;
}
.po-entry-table td:nth-child(6),
.po-entry-table td:nth-child(7),
.po-entry-table td:nth-child(8),
.po-entry-table td:nth-child(10) {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
#items-table th,
#items-table td {
    padding: 3px 5px;
}
#items-table input:not([type="checkbox"]):not([type="radio"]),
#items-table select {
    min-height: 26px;
    height: 26px;
    padding: 3px 5px;
}

.po-review-total-label {
    font-size: 14px;
    font-weight: 850;
}
.po-review-total {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 500;
}
.po-review-total-label {
    text-align: left;
    letter-spacing: .02em;
}
.po-review-grand-total {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 850;
}
textarea { min-height: 74px; }
input::placeholder, textarea::placeholder { color: #9aa6b2; }
input:focus, select:focus, textarea:focus {
    outline: 3px solid rgba(37, 99, 235, .12);
    border-color: var(--c-primary);
}
.form-grid, .filters { gap: 10px; }
.filters {
    padding: 12px;
    border: 1px solid var(--c-line);
    border-radius: 8px;
    background: var(--c-surface);
}

.btn, .fh-btn {
    min-height: 34px;
    border-radius: 8px;
    padding: 7px 11px;
    font-size: 12px;
    font-weight: 800;
    box-shadow: none;
}
.btn.primary, .fh-btn-primary {
    background: var(--c-primary);
    border-color: var(--c-primary);
}
.btn.primary:hover, .fh-btn-primary:hover {
    background: var(--c-primary-deep);
}
.btn.danger {
    background: var(--c-red);
    border-color: var(--c-red);
}
.btn.warning {
    background: var(--c-amber);
    border-color: var(--c-amber);
    color: #fff;
}
.btn.small {
    min-height: 28px;
    padding: 4px 8px;
}
.actions { gap: 7px; }

.badge {
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 850;
    border: 1px solid transparent;
}
.badge.big { padding: 5px 10px; }
.secondary { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.danger { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.info { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.primary { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.success { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.dark { background: #111827; color: #fff; border-color: #111827; }

.detail-modal {
    width: min(1180px, 100%);
    padding: 18px;
    box-shadow: var(--shadow-strong);
}
.detail-modal > .page-head {
    top: -18px;
    margin: -18px -18px 16px;
    padding: 16px 18px;
    background: rgba(255, 255, 255, .96);
    border-radius: 8px 8px 0 0;
}
.fh-inline-modal { padding: 22px; }
.fh-inline-modal-backdrop {
    background: rgba(15, 23, 42, .5);
    backdrop-filter: blur(5px);
}
.fh-inline-modal-window {
    border-radius: 8px;
    border-color: rgba(255,255,255,.82);
    box-shadow: var(--shadow-strong);
}
.fh-inline-modal-close {
    border-radius: 8px;
    background: var(--c-surface);
    color: var(--c-text);
}

.meta-grid div, .fh-pr-card-item {
    border-radius: 8px;
    background: var(--c-surface-2);
}
.summary {
    margin-top: 10px;
}
.summary > div {
    padding: 10px;
    border: 1px solid var(--c-line);
    border-radius: 8px;
    background: var(--c-surface-2);
}
.grand-total-display {
    color: var(--c-text);
    font-size: 20px;
}
.items-actions {
    border-color: var(--c-line);
    background: var(--c-surface-2);
}

.alert {
    border-radius: 8px;
    box-shadow: none;
}
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.alert-danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }

.appr-dot {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #64748b;
}
.appr-dot.is-approved {
    background: #2563eb;
    border-color: #2563eb;
}

[data-theme="dark"] body {
    background: var(--c-bg);
}
[data-theme="dark"] .fh-sidebar,
[data-theme="dark"] .fh-topbar,
[data-theme="dark"] .detail-modal > .page-head {
    background: rgba(23, 32, 51, .96);
}
[data-theme="dark"] .fh-sidebar {
    border-right-color: var(--c-line);
}
[data-theme="dark"] .fh-brand {
    color: var(--c-text);
}
[data-theme="dark"] .fh-nav-item.is-active,
[data-theme="dark"] .fh-tab.is-active {
    background: rgba(37, 99, 235, .18);
    color: #93c5fd;
    border-color: rgba(147, 197, 253, .3);
}
[data-theme="dark"] th {
    background: #1f2937;
    color: #cbd5e1;
}
[data-theme="dark"] tbody tr:hover td {
    background: rgba(255,255,255,.03);
}
[data-theme="dark"] .table-wrap,
[data-theme="dark"] .filters,
[data-theme="dark"] .summary > div,
[data-theme="dark"] .meta-grid div,
[data-theme="dark"] .fh-pr-card-item,
[data-theme="dark"] .items-actions {
    background: var(--c-surface);
    border-color: var(--c-line);
}

/* Q&A Thread */
.qa-thread { display: flex; flex-direction: column; gap: 10px; }
.qa-message { max-width: 85%; padding: 10px 14px; border-radius: 10px; font-size: 13px; }
.qa-from-approver { align-self: flex-end; background: #e8f0fe; border: 1px solid #c5d5f7; }
.qa-from-requester { align-self: flex-start; background: #f0f4f0; border: 1px solid #d0ddd0; }
.qa-meta { font-size: 11px; margin-bottom: 4px; }
.qa-body { white-space: pre-wrap; word-break: break-word; }
[data-theme="dark"] .qa-from-approver { background: #1e2d4a; border-color: #2d4070; }
[data-theme="dark"] .qa-from-requester { background: #1e2e1e; border-color: #2d462d; }

/* Workflow page */
.workflow-hero {
    display: grid;
    grid-template-columns: repeat(5, minmax(140px, 1fr));
    gap: 12px;
    align-items: stretch;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
}
.workflow-stage {
    position: relative;
    display: grid;
    gap: 6px;
    min-height: 132px;
    padding: 16px;
    border: 1px solid var(--c-line);
    border-radius: 8px;
    background: var(--c-surface);
    box-shadow: var(--shadow);
}
.workflow-stage span {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    font-weight: 850;
}
.workflow-stage strong {
    font-size: 16px;
    color: var(--c-text);
}
.workflow-stage small {
    color: var(--c-text-2);
    line-height: 1.45;
}
.workflow-stage.is-blue span { background: var(--c-primary); }
.workflow-stage.is-amber span { background: var(--c-amber); }
.workflow-stage.is-teal span { background: var(--c-accent); }
.workflow-stage.is-green span { background: var(--c-green); }
.workflow-stage.is-slate span { background: #475569; }
.workflow-arrow {
    display: none;
}
.workflow-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, .85fr);
    gap: 14px;
    align-items: start;
}
.workflow-panel {
    min-width: 0;
}
.workflow-main {
    grid-row: span 2;
}
.workflow-lane {
    display: grid;
    gap: 12px;
    position: relative;
}
.workflow-lane::before {
    content: "";
    position: absolute;
    left: 17px;
    top: 20px;
    bottom: 20px;
    width: 2px;
    background: var(--c-line);
}
.workflow-node {
    position: relative;
    display: grid;
    gap: 6px;
    margin-left: 42px;
    padding: 12px 14px;
    border: 1px solid var(--c-line);
    border-radius: 8px;
    background: var(--c-surface-2);
}
.workflow-node::before {
    content: "";
    position: absolute;
    left: -34px;
    top: 17px;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: var(--c-primary);
    border: 3px solid var(--c-surface);
    box-shadow: 0 0 0 1px var(--c-line);
}
.workflow-node b {
    color: var(--c-text-3);
    font-size: 11px;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.workflow-node strong,
.workflow-control-list strong {
    color: var(--c-text);
    font-size: 14px;
}
.workflow-node p,
.workflow-control-list p,
.workflow-status-grid p {
    margin: 0;
    color: var(--c-text-2);
}
.workflow-node .badge {
    width: fit-content;
}
.workflow-role-list,
.workflow-control-list {
    display: grid;
    gap: 10px;
}
.workflow-role-list div,
.workflow-control-list div {
    display: grid;
    gap: 4px;
    padding: 11px 12px;
    border: 1px solid var(--c-line);
    border-radius: 8px;
    background: var(--c-surface-2);
}
.workflow-role-list b {
    color: var(--c-text);
}
.workflow-role-list span {
    color: var(--c-text-2);
}
.workflow-status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.workflow-status-grid div {
    display: grid;
    gap: 8px;
    padding: 11px;
    border: 1px solid var(--c-line);
    border-radius: 8px;
    background: var(--c-surface-2);
}
.workflow-status-grid .badge {
    width: fit-content;
}

@media (max-width: 1180px) {
    .workflow-hero {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .workflow-grid {
        grid-template-columns: 1fr;
    }
    .workflow-main {
        grid-row: auto;
    }
}
@media (max-width: 720px) {
    .workflow-hero,
    .workflow-status-grid {
        grid-template-columns: 1fr;
    }
    .workflow-node {
        margin-left: 32px;
    }
    .workflow-lane::before {
        left: 12px;
    }
    .workflow-node::before {
        left: -27px;
    }
}
