@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=Inter:wght@400;500;600;700&display=swap');

/* ── Light (default) ── */
:root, [data-theme="light"] {
    --primary: #5b7ec9;
    --primary-light: #f0f4fa;
    --primary-dark: #4a6aad;
    --primary-gradient: linear-gradient(135deg, #6b8fd4 0%, #5b7ec9 100%);
    --accent: #7eb8da;
    --accent-soft: #eef6fb;
    --secondary: #6ba3a0;
    --bg: #ffffff;
    --bg-subtle: #f9fafb;
    --bg-page: #ffffff;
    --card: #ffffff;
    --card-header: #fafbfc;
    --border: #eef1f5;
    --border-soft: #f5f7fa;
    --text: #3d4f63;
    --text-secondary: #6b7c93;
    --text-muted: #94a3b8;
    --input-bg: #ffffff;
    --sidebar-bg: #ffffff;
    --sidebar-surface: #fafbfc;
    --sidebar-text: #111827;
    --sidebar-text-active: #1d4ed8;
    --sidebar-icon-bg: #f3f4f6;
    --sidebar-icon-color: #374151;
    --sidebar-border: #eef1f5;
    --topbar-bg: rgba(255, 255, 255, .95);
    --shadow-sm: 0 1px 2px rgba(61, 79, 99, .03);
    --shadow: 0 2px 8px rgba(61, 79, 99, .05);
    --shadow-md: 0 8px 24px rgba(61, 79, 99, .06);
    --shadow-lg: 0 16px 40px rgba(61, 79, 99, .07);
    --shadow-input-focus: 0 0 0 3px rgba(91, 126, 201, .12);
    --table-row-hover: #f8fafc;
    --table-header-bg: #fafbfc;
    --success-bg: #f0fdf8; --success-text: #3d8b6e; --success-border: #c6ede0;
    --warn-bg: #fffbf5; --warn-text: #b8893a; --warn-border: #f5e6c8;
    --error-bg: #fef8f8; --error-text: #c45c5c; --error-border: #f5d5d5;
    --info-bg: #f5f9ff; --info-text: #5b7ec9; --info-border: #dce8f8;
    --login-bg: #f9fafb;
    --login-card: #ffffff;
    --login-border: #eef1f5;
    --overlay: rgba(61, 79, 99, .35);
    --sidebar-w: 252px;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --ease-out: cubic-bezier(.22, 1, .36, 1);
}

/* ── Custom (variabel di-set via theme.js) ── */
[data-theme="custom"] {
    --primary: #5b7ec9;
    --primary-light: #f0f4fa;
    --primary-dark: #4a6aad;
    --primary-gradient: linear-gradient(135deg, #6b8fd4 0%, #5b7ec9 100%);
    --accent: #7eb8da;
    --accent-soft: #eef6fb;
    --secondary: #6ba3a0;
    --bg: #ffffff;
    --bg-subtle: #f9fafb;
    --bg-page: #ffffff;
    --card: #ffffff;
    --card-header: #fafbfc;
    --border: #eef1f5;
    --border-soft: #f5f7fa;
    --text: #3d4f63;
    --text-secondary: #6b7c93;
    --text-muted: #94a3b8;
    --input-bg: #ffffff;
    --sidebar-bg: #ffffff;
    --sidebar-surface: #fafbfc;
    --sidebar-text: #111827;
    --sidebar-text-active: #1d4ed8;
    --sidebar-icon-bg: #f3f4f6;
    --sidebar-icon-color: #374151;
    --sidebar-border: #eef1f5;
    --topbar-bg: rgba(255, 255, 255, .95);
    --shadow-sm: 0 1px 2px rgba(61, 79, 99, .03);
    --shadow: 0 2px 8px rgba(61, 79, 99, .05);
    --shadow-md: 0 8px 24px rgba(61, 79, 99, .06);
    --shadow-lg: 0 16px 40px rgba(61, 79, 99, .07);
    --shadow-input-focus: 0 0 0 3px rgba(91, 126, 201, .12);
    --table-row-hover: #f8fafc;
    --table-header-bg: #fafbfc;
    --success-bg: #f0fdf8; --success-text: #3d8b6e; --success-border: #c6ede0;
    --warn-bg: #fffbf5; --warn-text: #b8893a; --warn-border: #f5e6c8;
    --error-bg: #fef8f8; --error-text: #c45c5c; --error-border: #f5d5d5;
    --info-bg: #f5f9ff; --info-text: #5b7ec9; --info-border: #dce8f8;
    --login-bg: #f9fafb;
    --login-card: #ffffff;
    --login-border: #eef1f5;
    --overlay: rgba(61, 79, 99, .35);
}

/* ── Soft (abu lembut) ── */
[data-theme="soft"] {
    --primary: #5b7ec9;
    --primary-light: #eef2f8;
    --primary-dark: #4a6aad;
    --primary-gradient: linear-gradient(135deg, #6b8fd4 0%, #5b7ec9 100%);
    --accent: #7eb8da;
    --accent-soft: #e8f2f8;
    --secondary: #6ba3a0;
    --bg: #f3f4f6;
    --bg-subtle: #e5e7eb;
    --bg-page: #f3f4f6;
    --card: #ffffff;
    --card-header: #f9fafb;
    --border: #e5e7eb;
    --border-soft: #eceff3;
    --text: #374151;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --input-bg: #ffffff;
    --sidebar-bg: #ffffff;
    --sidebar-surface: #f9fafb;
    --sidebar-text: #111827;
    --sidebar-text-active: #1d4ed8;
    --sidebar-border: #e5e7eb;
    --topbar-bg: rgba(255, 255, 255, .92);
    --shadow-sm: 0 1px 2px rgba(55, 65, 81, .04);
    --shadow: 0 2px 8px rgba(55, 65, 81, .06);
    --shadow-md: 0 8px 24px rgba(55, 65, 81, .07);
    --shadow-lg: 0 16px 40px rgba(55, 65, 81, .08);
    --shadow-input-focus: 0 0 0 3px rgba(91, 126, 201, .14);
    --table-row-hover: #f9fafb;
    --table-header-bg: #f9fafb;
    --success-bg: #ecfdf5; --success-text: #047857; --success-border: #a7f3d0;
    --warn-bg: #fffbeb; --warn-text: #b45309; --warn-border: #fde68a;
    --error-bg: #fef2f2; --error-text: #b91c1c; --error-border: #fecaca;
    --info-bg: #eff6ff; --info-text: #1d4ed8; --info-border: #bfdbfe;
    --login-bg: #f3f4f6;
    --login-card: #ffffff;
    --login-border: #e5e7eb;
    --overlay: rgba(55, 65, 81, .4);
}

/* ── Dark ── */
[data-theme="dark"] {
    --primary: #60a5fa;
    --primary-light: #1e3a5f;
    --primary-dark: #93c5fd;
    --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --accent: #38bdf8;
    --accent-soft: #0c4a6e;
    --secondary: #2dd4bf;
    --bg: #0c1017;
    --bg-subtle: #111827;
    --card: #151c28;
    --card-header: #1a2332;
    --border: #2a3548;
    --border-soft: #1f2a3d;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --input-bg: #1a2332;
    --sidebar-bg: #0a0e14;
    --sidebar-surface: #151c28;
    --sidebar-text: #94a3b8;
    --sidebar-text-active: #f1f5f9;
    --sidebar-border: rgba(255,255,255,.05);
    --topbar-bg: rgba(21,28,40,.88);
    --shadow-sm: 0 1px 2px rgba(0,0,0,.25);
    --shadow: 0 1px 4px rgba(0,0,0,.3);
    --shadow-md: 0 4px 16px rgba(0,0,0,.35);
    --shadow-input-focus: 0 0 0 2px rgba(96,165,250,.25);
    --success-bg: #14532d40; --success-text: #86efac; --success-border: #166534;
    --warn-bg: #78350f40; --warn-text: #fcd34d; --warn-border: #92400e;
    --error-bg: #7f1d1d40; --error-text: #fca5a5; --error-border: #991b1b;
    --info-bg: #1e3a8a40; --info-text: #93c5fd; --info-border: #1d4ed8;
    --login-bg: linear-gradient(145deg, #0c1017 0%, #111827 50%, #0f172a 100%);
    --login-card: #151c28;
    --login-border: #2a3548;
    --overlay: rgba(0,0,0,.6);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; }
body {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 1rem;
    color: var(--text);
    background: var(--bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary-dark); }

/* ── Layout ── */
.app { display: flex; height: 100vh; background: var(--bg); }

/* ── Sidebar ── */
.sidebar {
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    overflow-x: hidden; overflow-y: auto;
    z-index: 100; flex-shrink: 0;
}

@media (min-width: 1025px) {
    .sidebar {
        width: 0;
        min-width: 0;
        border-right: none;
        transition: width .25s ease, min-width .25s ease;
    }
    html.sb-open .sidebar,
    .sidebar.sidebar-open {
        width: var(--sidebar-w);
        min-width: var(--sidebar-w);
        border-right: 1px solid var(--border);
    }
    html.sb-init .sidebar,
    html.sb-init .main-content {
        transition: none !important;
    }
    .app.sidebar-open #sbOv { display: none !important; }
}

.sidebar-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    min-height: 52px;
}
.sidebar-header h1 { font-size: 1.05rem; color: var(--primary); font-weight: 700; letter-spacing: .5px; }
.sidebar-header p { font-size: .58rem; color: var(--text-muted); letter-spacing: 1.5px; font-weight: 600; margin-top: 1px; }
.brand-mini { display: none; }

.nav-item {
    display: flex; align-items: center;
    padding: 6px 12px 6px 10px;
    color: var(--sidebar-text); font-size: .92rem; font-weight: 500;
    border-left: 2px solid transparent;
    transition: all .15s; white-space: nowrap;
}
.nav-item:hover { background: var(--border-soft); color: #0f172a; border-left-color: var(--border); }
.nav-item.active { background: var(--primary-light); color: var(--sidebar-text-active); border-left-color: var(--primary); font-weight: 600; }
.nav-item-warn { color: #d97706; }
.nav-item-warn:hover { color: #b45309; }
.nav-item-warn.active { color: #d97706; }
.nav-item-accent { color: #7c3aed; }
.nav-item-accent:hover { color: #6d28d9; }
.nav-item-accent.active { color: #7c3aed; }
.nav-item-link { color: #2563eb; }
.nav-item-link:hover { color: #1d4ed8; }
.nav-item-link.active { color: #2563eb; }

.nav-icon {
    width: 32px; height: 32px; flex-shrink: 0; margin-right: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px; background: var(--border-soft);
    color: #374151; transition: background .15s, color .15s, transform .15s;
}
.nav-icon svg { width: 18px; height: 18px; display: block; }
.nav-item:hover .nav-icon { background: var(--primary-light); color: var(--primary); }
.nav-item.active .nav-icon { background: var(--primary); color: #fff; }
.nav-item-warn .nav-icon { color: #d97706; background: #fff7ed; }
.nav-item-warn:hover .nav-icon, .nav-item-warn.active .nav-icon { background: #f59e0b; color: #fff; }
.nav-item-accent .nav-icon { color: #7c3aed; background: #f5f3ff; }
.nav-item-accent:hover .nav-icon, .nav-item-accent.active .nav-icon { background: #7c3aed; color: #fff; }
.nav-item-link .nav-icon { color: #2563eb; background: var(--primary-light); }
.nav-item-link:hover .nav-icon, .nav-item-link.active .nav-icon { background: #2563eb; color: #fff; }

[data-theme="dark"] .nav-item-warn .nav-icon { background: #78350f40; }
[data-theme="dark"] .nav-item-accent .nav-icon { background: #4c1d9540; }

.nav-section {
    padding: 10px 16px 3px;
    font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px;
    color: var(--text-muted); font-weight: 700;
}

.nav-group { margin-top: 2px; }
.nav-section-toggle {
    width: 100%; display: flex; align-items: center; justify-content: space-between;
    gap: 8px; padding: 10px 16px 6px; background: none; border: none; cursor: pointer;
    font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px;
    color: var(--text-muted); font-weight: 700; text-align: left;
    transition: color .15s, background .15s;
}
.nav-section-toggle:hover { color: var(--text); background: var(--border-soft); }
.nav-section-chevron {
    font-size: .7rem; line-height: 1; opacity: .7; flex-shrink: 0;
    transition: transform .2s ease;
}
.nav-group-collapsed .nav-section-chevron { transform: rotate(-90deg); }
.nav-group-collapsed .nav-group-items { display: none; }
.nav-group-open .nav-group-items { display: block; }

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: transparent; border-radius: 4px; }
.sidebar:hover::-webkit-scrollbar-thumb { background: var(--border); }

@media (max-width: 1024px) {
    .sidebar {
        position: fixed; top: 0; left: 0; height: 100%;
        width: var(--sidebar-w) !important; min-width: var(--sidebar-w) !important;
        transform: translateX(-100%);
        transition: transform .25s ease;
        box-shadow: var(--shadow-md);
        z-index: 1000;
    }
    .sidebar.mob-open { transform: translateX(0); }
}
#sbOv { display: none; position: fixed; inset: 0; background: var(--overlay); z-index: 999; }
#sbOv.show { display: block; }

/* ── Main & Topbar ── */
.main-content {
    flex: 1; display: flex; flex-direction: column;
    overflow-y: auto; background: var(--bg); min-width: 0;
    transition: width .25s ease;
}

.topbar {
    background: var(--topbar-bg); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    padding: 0 20px; min-height: 48px;
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 50;
}
.topbar-title { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-company {
    display: flex; align-items: center; gap: 6px; margin-right: 4px;
}
.topbar-company select,
.topbar-company-name {
    font-size: .8125rem; font-weight: 600; color: var(--text);
    max-width: min(220px, 38vw);
}
.topbar-company select {
    padding: 5px 28px 5px 10px; border-radius: 8px;
    border: 1px solid var(--border); background: var(--card);
    cursor: pointer;
}
.topbar-company-name {
    padding: 5px 12px; border-radius: 8px;
    background: var(--primary-light); color: var(--primary-dark);
    border: 1px solid color-mix(in srgb, var(--primary) 25%, var(--border));
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.hamburger {
    background: none; border: 1px solid transparent; font-size: 1.2rem;
    cursor: pointer; color: var(--text-muted); padding: 4px 8px; border-radius: var(--radius-sm); transition: .15s;
}
.hamburger:hover { background: var(--primary-light); color: var(--primary); }

.topbar-user { display: flex; align-items: center; gap: 8px; }
.user-avatar {
    width: 30px; height: 30px; background: var(--primary-light); color: var(--primary);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .85rem; border: 1px solid var(--border);
}
.user-name { font-size: .92rem; font-weight: 600; color: var(--text); line-height: 1.2; }
.user-role { font-size: .75rem; color: var(--text-muted); }

.theme-toggle, .btn-logout {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: var(--card);
    color: var(--text-muted); cursor: pointer; transition: .15s; text-decoration: none;
}
.theme-toggle:hover, .btn-logout:hover { background: var(--border-soft); color: var(--text); text-decoration: none; }
.btn-logout:hover { background: var(--error-bg); border-color: var(--error-border); color: var(--error-text); }

.content { padding: 20px; flex: 1; max-width: 100%; }
.app-footer {
    text-align: center; padding: 10px 20px; font-size: .72rem;
    color: var(--text-muted); border-top: 1px solid var(--border);
    background: var(--card); flex-shrink: 0;
}

/* ── Page header ── */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.page-title { font-size: 1.15rem; font-weight: 700; color: var(--text); }
.page-subtitle { font-size: .85rem; color: var(--text-muted); margin-top: 2px; }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; border-radius: var(--radius-sm);
    font-size: .85rem; font-weight: 600;
    border: none; cursor: pointer; transition: all .15s; font-family: inherit;
    text-decoration: none; white-space: nowrap;
}
.btn:hover { opacity: .92; text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { color: #fff; }
.btn-success { background: #059669; color: #fff; }
.btn-warning { background: #d97706; color: #fff; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-outline { background: var(--card); color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.btn-sm { padding: 5px 10px; font-size: .78rem; }
.btn-xs { padding: 3px 8px; font-size: .72rem; border-radius: 4px; }

/* ── Cards & tables ── */
.card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow-sm);
    margin-bottom: 14px; overflow: hidden;
}
.card-header {
    padding: 10px 16px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    font-size: .92rem; font-weight: 600; background: var(--card-header);
    color: var(--text);
}
.card-body { padding: 16px; }
.table-wrapper { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 1rem; }
th {
    background: var(--card-header); padding: 8px 12px; text-align: left;
    font-weight: 600; font-size: .72rem; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--border);
}
td { padding: 9px 12px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; color: var(--text); }
tbody tr { transition: background .1s; }
tbody tr:hover td { background: var(--border-soft); }

/* ── Forms ── */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.form-group { margin-bottom: 14px; }
.form-label {
    display: block; font-size: .72rem; font-weight: 600;
    color: var(--text-muted); margin-bottom: 5px;
    text-transform: uppercase; letter-spacing: .04em;
}
.form-control {
    width: 100%; padding: 8px 11px; background: var(--input-bg);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 1rem; font-family: inherit; color: var(--text);
    transition: border-color .15s, box-shadow .15s;
}
.form-control:hover { border-color: var(--text-muted); }
.form-control:focus { outline: none; background: var(--card); border-color: var(--primary); box-shadow: var(--shadow-input-focus); }
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center; background-size: 14px; padding-right: 32px; cursor: pointer;
}
textarea.form-control { resize: vertical; min-height: 72px; }
.form-control-sm { padding: 6px 9px; font-size: .85rem; }

/* ── Details & badges ── */
.detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.detail-label { font-size: .72rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.detail-value { font-size: .92rem; font-weight: 600; margin-top: 3px; color: var(--text); }
.badge-status {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 8px; border-radius: 99px;
    font-size: .72rem; font-weight: 600; letter-spacing: .02em;
}
.badge-status-text {
    display: inline;
    padding: 0;
    border-radius: 0;
    background: none !important;
    font-size: .82rem;
    font-weight: 600;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

/* ── Alerts & flash ── */
.alert, .flash-msg {
    padding: 9px 12px; border-radius: var(--radius-sm);
    font-size: .85rem; margin-bottom: 12px; border: 1px solid transparent;
}
.flash-ok, .flash-err, .flash-warn, .flash-info {
    padding: 9px 12px; border-radius: var(--radius-sm);
    font-size: .85rem; margin-bottom: 12px; border: 1px solid transparent;
}
.flash-ok, .alert-success { background: var(--success-bg); color: var(--success-text); border-color: var(--success-border); }
.flash-err, .alert-error { background: var(--error-bg); color: var(--error-text); border-color: var(--error-border); }
.flash-warn, .alert-warn { background: var(--warn-bg); color: var(--warn-text); border-color: var(--warn-border); }
.flash-info, .alert-info { background: var(--info-bg); color: var(--info-text); border-color: var(--info-border); }

/* ── Dashboard stats ── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat-card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 12px 14px; display: flex; align-items: center; gap: 10px;
    box-shadow: var(--shadow-sm); transition: box-shadow .15s;
}
.stat-card:hover { box-shadow: var(--shadow); }
.stat-icon {
    width: 34px; height: 34px; border-radius: var(--radius-sm);
    background: var(--primary-light); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: .95rem; flex-shrink: 0;
}
.stat-value { font-size: 1.2rem; font-weight: 700; color: var(--text); line-height: 1.2; }
.stat-label { font-size: .75rem; color: var(--text-muted); margin-top: 1px; }

/* ── List table (template bidding.php) ── */
.table-scroll, .table-wrapper { overflow-x: auto; margin-bottom: 14px; -webkit-overflow-scrolling: touch; }

table.list-table,
table.rfq-table,
.card > .table-wrapper > table,
.card > .table-scroll > table,
.card > table:not(.po-items-table):not(.form-table),
.table-scroll > table:not(.po-items-table),
.table-wrapper > table:not(.po-items-table) {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
}

table.list-table thead,
table.rfq-table thead,
.card > .table-wrapper > table thead,
.card > .table-scroll > table thead,
.card > table:not(.po-items-table) thead,
.table-scroll > table thead,
.table-wrapper > table:not(.po-items-table) thead {
    background: var(--card-header);
}

table.list-table th,
table.rfq-table th,
.card > .table-wrapper > table th,
.card > .table-scroll > table th,
.card > table:not(.po-items-table) th,
.table-scroll > table th,
.table-wrapper > table:not(.po-items-table) th {
    padding: 10px 12px;
    text-align: left;
    color: var(--text-muted);
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 1px solid var(--border);
    background: var(--card-header);
    white-space: nowrap;
}

table.list-table td,
table.rfq-table td,
.card > .table-wrapper > table td,
.card > .table-scroll > table td,
.card > table:not(.po-items-table) td,
.table-scroll > table td,
.table-wrapper > table:not(.po-items-table) td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--border-soft);
    font-size: .92rem;
    color: var(--text);
    vertical-align: middle;
}

table.list-table tbody tr:hover td,
table.rfq-table tbody tr:hover td,
.card > .table-wrapper > table tbody tr:hover td,
.card > .table-scroll > table tbody tr:hover td,
.card > table:not(.po-items-table) tbody tr:hover td,
.table-scroll > table tbody tr:hover td,
.table-wrapper > table:not(.po-items-table) tbody tr:hover td {
    background: var(--border-soft);
}

table.list-table tbody tr:last-child td,
table.rfq-table tbody tr:last-child td,
.card > .table-wrapper > table tbody tr:last-child td,
.card > table:not(.po-items-table) tbody tr:last-child td {
    border-bottom: none;
}

table.list-table td strong,
table.rfq-table td strong,
.card > .table-wrapper > table td strong,
.card > table:not(.po-items-table) td strong {
    color: var(--primary);
    font-weight: 600;
}

/* Card hanya berisi tabel list — tanpa double border */
.card:not(:has(.card-header)):not(:has(.card-body)) {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin-bottom: 0;
    overflow: visible;
}
.card:not(:has(.card-header)):not(:has(.card-body)) > .table-wrapper,
.card:not(:has(.card-header)):not(:has(.card-body)) > .table-scroll {
    margin-bottom: 0;
}

/* Aksi dalam tabel — gaya link seperti bidding */
.list-table .action-link,
.rfq-table .action-link,
table.list-table a.action-link { color: var(--primary); font-size: .85rem; font-weight: 600; text-decoration: none; }
.list-table .action-link:hover,
.rfq-table .action-link:hover { text-decoration: underline; }

.list-table .btn-xs.btn-outline,
.rfq-table .btn-xs.btn-outline,
.card > .table-wrapper > table .btn-xs.btn-outline,
.card > table .btn-xs.btn-outline {
    background: transparent; border: none; box-shadow: none;
    color: var(--primary); padding: 0 6px 0 0; font-size: .85rem; font-weight: 600;
}
.list-table .btn-xs.btn-primary,
.rfq-table .btn-xs.btn-primary,
.card > .table-wrapper > table .btn-xs.btn-primary { background: transparent; border: none; box-shadow: none; color: var(--primary); padding: 0 6px; font-size: .85rem; font-weight: 600; }
.list-table .btn-xs.btn-success,
.rfq-table .btn-xs.btn-success { background: transparent; border: none; box-shadow: none; color: #059669; padding: 0 6px; font-size: .85rem; font-weight: 600; }
.list-table .btn-xs.btn-danger,
.rfq-table .btn-xs.btn-danger { background: transparent; border: none; box-shadow: none; color: #dc2626; padding: 0 6px; font-size: .85rem; font-weight: 600; }

.approver-line { display: inline-flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.approver-meta { font-size: .72rem; color: var(--text-muted); font-weight: 500; }
.approval-log-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.approval-log-item { padding: 10px 12px; background: var(--border-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.approval-log-level { font-size: .68rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); letter-spacing: .04em; margin-bottom: 4px; }

/* Enterprise Invoice Document */
.inv-document{padding:24px;background:var(--card-bg,#fff);color:var(--text,#1e293b)}
.inv-doc-header{display:flex;flex-wrap:wrap;justify-content:space-between;gap:20px;margin-bottom:24px;padding-bottom:20px;border-bottom:2px solid var(--border,#e2e8f0)}
.inv-doc-from{flex:1;min-width:220px}
.inv-doc-entity-label,.inv-doc-party-label{font-size:.68rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--text-muted,#64748b);margin-bottom:6px}
.inv-doc-company{font-size:1.25rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:var(--text,#1e293b)}
.inv-doc-muted{font-size:.82rem;color:var(--text-muted,#64748b);line-height:1.45;margin-top:4px}
.inv-doc-meta{text-align:right;min-width:240px}
.inv-doc-title{font-size:1.5rem;font-weight:800;color:var(--primary,#2563eb);letter-spacing:.08em}
.inv-doc-title-sub{font-size:.78rem;color:var(--text-muted);margin-bottom:10px}
.inv-doc-meta-table{font-size:.82rem;border-collapse:collapse;margin-left:auto}
.inv-doc-meta-table td{padding:3px 0 3px 12px;vertical-align:top}
.inv-doc-meta-table td:first-child{color:var(--text-muted);text-align:right;padding-right:8px;white-space:nowrap}
.inv-doc-parties{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px;margin-bottom:20px}
.inv-doc-party{padding:14px;background:var(--border-soft,#f8fafc);border:1px solid var(--border,#e2e8f0);border-radius:var(--radius-sm,8px);font-size:.88rem;line-height:1.5}
.inv-doc-lines{width:100%;font-size:.82rem;margin-bottom:20px}
.inv-doc-lines th{background:var(--border-soft,#f1f5f9);font-size:.72rem;text-transform:uppercase;letter-spacing:.03em}
.inv-doc-lines td,.inv-doc-lines th{padding:10px 8px;border-bottom:1px solid var(--border,#e2e8f0)}
.inv-doc-item-code{font-family:ui-monospace,Consolas,monospace;font-size:.75rem;color:var(--primary)}
.inv-doc-summary{display:flex;justify-content:flex-end;margin-bottom:16px}
.inv-doc-summary-box{min-width:280px;border:1px solid var(--border);border-radius:var(--radius-sm);padding:12px 16px;background:var(--border-soft)}
.inv-doc-sum-row{display:flex;justify-content:space-between;gap:16px;padding:5px 0;font-size:.88rem}
.inv-doc-sum-row.inv-doc-grand{font-size:1rem;font-weight:800;color:var(--primary);border-top:2px solid var(--border);margin-top:8px;padding-top:10px}
.inv-doc-notes{font-size:.82rem;padding:12px 14px;background:#fffbeb;border:1px solid #fde68a;border-radius:var(--radius-sm);margin-bottom:16px;line-height:1.5}
.inv-doc-footer{font-size:.72rem;color:var(--text-muted);border-top:1px dashed var(--border);padding-top:12px;line-height:1.6}
.inv-doc-footer-legal{margin-top:8px;font-style:italic}
.inv-print-body{background:#fff;padding:16px}
@media print{
    .sidebar,.page-header,.module-head,.quick-actions,.card-header,.no-print{display:none!important}
    .inv-document{padding:0;box-shadow:none}
    .inv-print-body{padding:0}
}

/* 3-Way Match panel */
.inv-match-panel{border:1px solid var(--border,#e2e8f0);border-radius:var(--radius-sm,8px);padding:16px;background:var(--border-soft,#f8fafc)}
.inv-match-pass{border-color:#86efac;background:#f0fdf4}
.inv-match-fail{border-color:#fca5a5;background:#fef2f2}
.inv-match-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.inv-match-desc{font-size:.82rem;color:var(--text-muted);margin:0 0 10px}
.inv-match-msg{font-size:.85rem;margin-bottom:8px}
.inv-match-badge{font-size:.72rem;font-weight:700;padding:4px 10px;border-radius:999px}
.inv-match-badge-ok{background:#dcfce7;color:#166534}
.inv-match-badge-bad{background:#fee2e2;color:#991b1b}
.inv-match-table{font-size:.82rem;margin-top:10px}
.inv-match-table .match-ok td{background:rgba(34,197,94,.06)}
.inv-match-table .match-fail td{background:rgba(239,68,68,.06)}
.inv-match-line-ok{color:#059669;font-weight:600;font-size:.78rem}
.inv-match-line-fail{color:#dc2626;font-size:.78rem}

/* PO receipt progress (list) */
.po-receipt-cell { display: flex; flex-direction: column; gap: 4px; min-width: 120px; }
.po-receipt-bar { height: 4px; background: var(--border-soft); border-radius: 99px; overflow: hidden; }
.po-receipt-bar span { display: block; height: 100%; border-radius: 99px; transition: width .2s; }
.po-receipt-qty { font-size: .72rem; line-height: 1.2; }
.po-invoice-cell .badge-status { font-size: .68rem; }
.po-progress-link { display: block; text-decoration: none; color: inherit; border-radius: var(--radius-sm, 8px); transition: background .15s; }
.po-progress-link:hover { background: var(--border-soft, #f8fafc); }
.po-action-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 88px; }
.po-act-next { display: inline-block; font-size: .72rem; font-weight: 600; padding: 4px 10px; border-radius: 6px; text-decoration: none; white-space: nowrap; }
.po-act-gr { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.po-act-gr:hover { background: #d1fae5; }
.po-act-inv { background: #f5f3ff; color: #5b21b6; border: 1px solid #ddd6fe; }
.po-act-inv:hover { background: #ede9fe; }
.list-table .btn-xs.btn-warning,
.rfq-table .btn-xs.btn-warning { background: transparent; border: none; box-shadow: none; color: #d97706; padding: 0 6px; font-size: .85rem; font-weight: 600; }
.list-table .btn-xs:hover,
.rfq-table .btn-xs:hover { opacity: .85; text-decoration: underline; transform: none; }

.status-badge {
    display: inline-block; padding: 3px 10px; border-radius: 6px;
    font-size: .75rem; font-weight: 600; white-space: nowrap;
}
.type-badge {
    display: inline-block; padding: 2px 8px; border-radius: 4px;
    font-size: .72rem; font-weight: 600;
}

.filter-bar {
    background: var(--card); border-radius: var(--radius); padding: 12px 14px;
    margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
    border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.filter-bar input, .filter-bar select {
    background: var(--input-bg); border: 1px solid var(--border);
    color: var(--text); padding: 7px 11px; border-radius: var(--radius-sm);
    font-size: .85rem; font-family: inherit;
}
.filter-bar input:focus, .filter-bar select:focus {
    outline: none; border-color: var(--primary); box-shadow: var(--shadow-input-focus);
}
.btn-filter {
    background: var(--primary); color: #fff; border: none;
    padding: 7px 16px; border-radius: var(--radius-sm); font-weight: 600;
    cursor: pointer; font-family: inherit; font-size: .85rem;
}
.btn-reset {
    background: transparent; color: var(--text-muted); border: 1px solid var(--border);
    padding: 7px 14px; border-radius: var(--radius-sm); cursor: pointer;
    font-family: inherit; text-decoration: none; font-size: .85rem;
}
.btn-reset:hover { color: var(--text); border-color: var(--text-muted); text-decoration: none; }

.list-stats, .rfq-stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px; margin-bottom: 16px;
}
.list-stat, .rfq-stat {
    background: var(--card); border-radius: var(--radius); padding: 12px;
    text-align: center; border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.list-stat .num, .rfq-stat .num { font-size: 1.4rem; font-weight: 700; margin-bottom: 2px; color: var(--text); }
.list-stat .lbl, .rfq-stat .lbl { font-size: .65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.s-total .num { color: var(--primary); }
.s-draft .num { color: var(--text-muted); }
.s-pub .num { color: var(--primary); }
.s-eval .num { color: #ea580c; }
.s-award .num { color: #059669; }
.s-cancel .num { color: #dc2626; }

.quick-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.qa-btn {
    background: var(--card); border: 1px solid var(--border); color: var(--text-secondary, var(--text-muted));
    padding: 6px 14px; border-radius: var(--radius-sm); font-size: .78rem;
    text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
    box-shadow: var(--shadow-sm);
}
.qa-btn:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.qa-btn.primary { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

.pagination { display: flex; justify-content: center; gap: 5px; margin-top: 16px; flex-wrap: wrap; }
.pagination a, .pagination span {
    padding: 5px 11px; border-radius: var(--radius-sm); font-size: .85rem; text-decoration: none;
}
.pagination a { background: var(--card); color: var(--text-muted); border: 1px solid var(--border); }
.pagination a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.pagination .current { background: var(--primary); color: #fff; border: 1px solid var(--primary); }

.empty-state, .list-empty {
    text-align: center; padding: 48px 20px; color: var(--text-muted);
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
}
.empty-state h3, .list-empty h3 { font-size: 1rem; color: var(--text); margin-bottom: 6px; font-weight: 600; }
.empty-state p, .list-empty p { font-size: .85rem; }

.btn-create {
    background: var(--primary); color: #fff; border: none;
    padding: 8px 18px; border-radius: var(--radius-sm); font-weight: 600;
    font-size: .85rem; cursor: pointer; font-family: inherit;
    display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
}
.btn-create:hover { opacity: .92; color: #fff; text-decoration: none; }

.module-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.module-head h1 { font-size: 1.15rem; font-weight: 700; color: var(--text); }
.module-head p { color: var(--text-muted); font-size: .85rem; margin-top: 2px; }

/* ── RFQ module (shared rfq_*.php) ── */
.rfq-panel {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 16px 18px; margin-bottom: 14px; box-shadow: var(--shadow-sm);
}
.rfq-panel.compact { padding: 12px 14px; }
.rfq-panel.info { background: var(--primary-light); border-color: var(--primary-border, var(--border)); }
.rfq-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.rfq-panel h3, .rfq-panel h4, .rfq-card h3, .rfq-card h4 { font-size: .95rem; font-weight: 600; color: var(--text); margin: 0 0 10px; }

.form-section { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.form-section h3 { font-size: .95rem; font-weight: 600; color: var(--text); margin: 0 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border-soft); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 10px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

.rfq-meta-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px 16px; margin-top: 12px;
}
.rfq-meta-grid .lbl { font-size: .68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.rfq-meta-grid .val { font-size: .88rem; font-weight: 600; color: var(--text); margin-top: 2px; }

.rfq-workflow, .rfq-steps {
    display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; font-size: .68rem;
}
.rfq-workflow .wf-step, .rfq-steps span {
    padding: 4px 10px; border-radius: 20px; background: var(--border-soft); color: var(--text-muted);
}
.rfq-workflow .wf-step.done, .rfq-steps span.done { background: var(--success-bg); color: var(--success-text); }
.rfq-workflow .wf-step.current, .rfq-steps span.current { background: var(--primary-light); color: var(--primary); font-weight: 700; }

.rfq-tabs, .rfq-subnav {
    display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px;
    background: var(--border-soft); border-radius: var(--radius); padding: 4px; border: 1px solid var(--border);
}
.rfq-tabs button, .rfq-subnav a {
    padding: 8px 14px; border-radius: var(--radius-sm); border: none; background: transparent;
    color: var(--text-muted); cursor: pointer; font-family: inherit; font-size: .82rem; font-weight: 600;
    text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.rfq-tabs button.active, .rfq-subnav a.active, .company-tabs a.active { background: var(--primary); color: #fff; }
.rfq-subnav a .tab-badge, .company-tabs a .tab-badge {
    background: var(--error-text, #ef4444); color: #fff; font-size: .65rem;
    padding: 2px 6px; border-radius: 99px; margin-left: 6px;
}
.rfq-subnav a.active .tab-badge, .company-tabs a.active .tab-badge { background: #fff; color: var(--error-text, #ef4444); }
.company-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; background: var(--border-soft); border-radius: var(--radius); padding: 4px; border: 1px solid var(--border); }
.company-tabs a {
    padding: 8px 14px; border-radius: var(--radius-sm); border: none; background: transparent;
    color: var(--text-muted); cursor: pointer; font-family: inherit; font-size: .82rem; font-weight: 600;
    text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.rfq-tab-panel { display: none; }
.rfq-tab-panel.active { display: block; }

.rfq-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }

.btn-rfq, .btn-rfq-sm {
    padding: 7px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border);
    background: var(--card); color: var(--text); text-decoration: none;
    display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 600;
    cursor: pointer; font-family: inherit; box-shadow: var(--shadow-sm);
}
.btn-rfq-sm { padding: 4px 10px; font-size: .75rem; }
.btn-rfq:hover, .btn-rfq-sm:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.btn-rfq.primary, .btn-rfq-sm.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-rfq.primary:hover { opacity: .92; color: #fff; }
.btn-rfq.success { background: var(--success-bg); border-color: var(--success-border, #86efac); color: var(--success-text); }
.btn-rfq.warning { background: var(--warn-bg); border-color: var(--warn-border, #fde68a); color: var(--warn-text); }
.btn-rfq.danger { background: var(--error-bg); border-color: var(--error-border, #fecaca); color: var(--error-text); }

.rfq-pick-card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 12px 14px; margin-bottom: 8px; cursor: pointer; transition: border-color .15s;
}
.rfq-pick-card:hover { border-color: var(--primary); }
.rfq-pick-card.selected { border-color: var(--success-text, #059669); background: var(--success-bg); }

.rfq-chip {
    display: inline-flex; align-items: center; gap: 6px; background: var(--card);
    border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 12px;
    margin: 3px; font-size: .8rem; cursor: pointer; color: var(--text-muted);
}
.rfq-chip:hover { border-color: var(--primary); }
.rfq-chip.selected { border-color: var(--success-text, #059669); background: var(--success-bg); color: var(--success-text); }

.rfq-pr-badge {
    display: inline-block; background: var(--primary-light); color: var(--primary);
    padding: 3px 10px; border-radius: 6px; font-size: .78rem; font-weight: 700;
}

.score-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; }
.score-grid input { text-align: center; }

/* Comparison matrix */
.matrix-wrap { overflow-x: auto; margin-bottom: 14px; -webkit-overflow-scrolling: touch; }
.cmp-table { border-collapse: separate; border-spacing: 0; min-width: 100%; width: 100%; }
.cmp-table th, .cmp-table td {
    border: 1px solid var(--border); padding: 9px 11px; font-size: .82rem; vertical-align: top;
    background: var(--card); color: var(--text);
}
.cmp-table thead th { background: var(--card-header); position: sticky; top: 0; z-index: 2; }
.cmp-table .col-item { min-width: 160px; position: sticky; left: 0; z-index: 1; background: var(--card); }
.cmp-table thead .col-item { z-index: 3; }
.cmp-table .col-vendor { min-width: 200px; }
.cmp-table thead .col-vendor { text-align: center; }
.vendor-head strong { display: block; font-size: .88rem; }
.vendor-head .rfq-tag { font-size: .68rem; color: var(--text-muted); font-weight: 600; margin-top: 2px; }
.cell-price .unit { color: var(--text-muted); font-size: .78rem; }
.cell-price .total { font-weight: 700; color: var(--success-text, #059669); margin-top: 2px; }
.cell-meta { font-size: .72rem; color: var(--text-muted); margin-top: 4px; line-height: 1.45; }
.highlight-lowest { background: var(--success-bg) !important; box-shadow: inset 0 0 0 2px var(--success-border, #86efac); }
.criteria-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; font-size: .72rem; color: var(--text-muted); }
.criteria-legend span { background: var(--border-soft); border: 1px solid var(--border); padding: 3px 8px; border-radius: 6px; }
.merge-banner {
    background: var(--primary-light); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 10px 14px; margin-bottom: 12px; font-size: .85rem; color: var(--primary);
}
.status-pill { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: .72rem; font-weight: 700; }
.status-pill.pending, .status-pending { background: var(--warn-bg); color: var(--warn-text); }
.status-pill.approved, .status-approved { background: var(--success-bg); color: var(--success-text); }
.status-pill.rejected, .status-rejected { background: var(--error-bg); color: var(--error-text); }
.status-pill.vendor, .status-vendor { background: var(--primary-light); color: var(--primary); }
.split-table input[type=number] { width: 68px; padding: 5px; text-align: center; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--input-bg); color: var(--text); }
.award-section { border-top: 2px solid var(--success-text, #10b981); margin-top: 24px; padding-top: 20px; }
.award-section h2 { font-size: 1.05rem; color: var(--success-text, #065f46); margin-bottom: 8px; }
.summary-table .rank-badge { display: inline-block; background: var(--primary-light); color: var(--primary); padding: 2px 8px; border-radius: 4px; font-size: .72rem; font-weight: 700; }
.neg-table .line-total { font-weight: 700; color: var(--success-text, #059669); white-space: nowrap; }
.neg-table .line-before { color: var(--text-muted); font-size: .8rem; }

/* Negotiation */
.neg-table, .nego-items { width: 100%; border-collapse: collapse; font-size: .85rem; }
.neg-table th, .nego-items th {
    background: var(--card-header); padding: 9px 10px; text-align: left;
    font-size: .72rem; text-transform: uppercase; color: var(--text-muted); border-bottom: 1px solid var(--border);
}
.neg-table td, .nego-items td { padding: 8px 10px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.neg-table input[type=number] { width: 110px; padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .85rem; background: var(--input-bg); color: var(--text); }
.neg-summary {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px;
    margin: 14px 0; padding: 14px; background: var(--warn-bg); border: 1px solid var(--warn-border, #fde68a); border-radius: var(--radius);
}
.neg-summary .lbl { font-size: .68rem; color: var(--warn-text); text-transform: uppercase; }
.neg-summary .val { font-size: 1.05rem; font-weight: 700; color: var(--text); margin-top: 4px; }
.neg-summary .val.save { color: var(--success-text, #059669); }
.vendor-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.vendor-chips a {
    padding: 5px 12px; border-radius: 99px; font-size: .78rem; text-decoration: none;
    border: 1px solid var(--border); color: var(--text-muted); background: var(--card);
}
.vendor-chips a.active { background: var(--primary-light); border-color: var(--primary); color: var(--primary); font-weight: 600; }
.nego-round { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; background: var(--card); }
.nego-round-hdr {
    background: var(--card-header); padding: 10px 14px; display: flex; justify-content: space-between;
    align-items: center; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid var(--border);
}
.nego-msg { padding: 12px 14px; border-top: 1px solid var(--border-soft); font-size: .85rem; }
.nego-msg.company { border-left: 4px solid var(--primary); background: var(--border-soft); }
.nego-msg.vendor { border-left: 4px solid var(--success-text, #059669); background: var(--success-bg); }
.nego-msg.vendor.counter { border-left-color: var(--warn-text, #d97706); background: var(--warn-bg); }
.nego-msg.vendor.reject { border-left-color: var(--error-text, #dc2626); background: var(--error-bg); }
.nego-msg .who { font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 6px; color: var(--text-muted); }
.nego-wait { color: var(--warn-text); font-style: italic; padding: 10px 14px; background: var(--warn-bg); border-top: 1px solid var(--warn-border, #fde68a); font-size: .85rem; }
.view-panel { display: none; }
.view-panel.active { display: block; }
.vendor-panel { display: none; }
.vendor-panel.active { display: block; }

table.rfq-table tr.lowest td { background: var(--success-bg) !important; font-weight: 600; }

/* ── Utilities ── */
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.fw-bold { font-weight: 700; }
.fs-sm { font-size: .85rem; }
.mt-2 { margin-top: 8px; }
.mb-4 { margin-bottom: 14px; }
.flex { display: flex; }
.gap-4 { gap: 8px; }
.w-100 { width: 100%; }

/* ── Login ── */
.login-page {
    min-height: 100vh; display: flex; flex-direction: column;
    background: var(--login-bg); position: relative; overflow-x: hidden;
}
.login-top {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 24px; border-bottom: 1px solid var(--login-border);
    background: var(--topbar-bg); position: relative; z-index: 2;
}
.login-brand { font-size: .95rem; font-weight: 700; color: var(--primary); }
.login-brand span { display: block; font-size: .65rem; color: var(--text-muted); font-weight: 500; letter-spacing: 1px; margin-top: 1px; }

.login-body {
    flex: 1; display: flex; align-items: stretch; min-height: 0;
}
.login-hero {
    flex: 1 1 52%; display: flex; align-items: center; justify-content: center;
    padding: 32px 40px; position: relative; overflow: hidden;
    border-right: 1px solid var(--login-border);
    background: linear-gradient(145deg, var(--login-card) 0%, var(--login-bg) 55%, var(--bg-subtle, #f3f4f6) 100%);
}
.login-hero-inner {
    position: relative; width: 100%; max-width: 560px; z-index: 1;
}
.login-hero-bg { position: absolute; inset: -20%; pointer-events: none; z-index: 0; }
.login-orb {
    position: absolute; border-radius: 50%; filter: blur(48px); opacity: .45;
    animation: loginOrbDrift 14s ease-in-out infinite;
}
.login-orb--1 { width: 280px; height: 280px; top: 5%; left: -8%; background: var(--primary, #5b7ec9); animation-delay: 0s; }
.login-orb--2 { width: 200px; height: 200px; bottom: 10%; right: -5%; background: var(--primary-light, #7ba3e8); animation-delay: -4s; }
.login-orb--3 { width: 140px; height: 140px; top: 45%; left: 40%; background: #22c55e; opacity: .2; animation-delay: -8s; }
.login-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(var(--border-soft, rgba(0,0,0,.04)) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-soft, rgba(0,0,0,.04)) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 100%);
    opacity: .6;
}
.login-hero-copy { position: relative; z-index: 1; margin-bottom: 20px; }
.login-hero-eyebrow {
    font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: var(--primary); margin: 0 0 8px;
}
.login-hero-title {
    font-size: clamp(1.35rem, 2.5vw, 1.85rem); font-weight: 800; line-height: 1.2;
    color: var(--text); margin: 0 0 10px; letter-spacing: -.02em;
}
.login-hero-desc {
    font-size: .82rem; line-height: 1.55; color: var(--text-secondary); margin: 0 0 14px; max-width: 420px;
}
.login-hero-features {
    list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 16px;
}
.login-hero-features li {
    font-size: .72rem; font-weight: 600; color: var(--text-muted);
    display: flex; align-items: center; gap: 6px;
}
.login-hero-feat-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; border-radius: 50%;
    background: rgba(34, 197, 94, .15); color: #16a34a; font-size: .62rem;
}
.login-scene { position: relative; z-index: 1; margin-top: 8px; }
.login-scene-svg { width: 100%; height: auto; max-height: 320px; display: block; filter: drop-shadow(0 12px 28px rgba(0,0,0,.06)); }
.login-node { animation: loginNodeFloat 5s ease-in-out infinite; transform-origin: center; }
.login-node--dashboard { animation-duration: 6s; filter: url(#loginGlow); }
.login-node--1 { animation-delay: 0s; }
.login-node--2 { animation-delay: -.8s; }
.login-node--3 { animation-delay: -1.6s; }
.login-node--4 { animation-delay: -2.4s; }
.login-node--5 { animation-delay: -3.2s; }
.login-node--6 { animation-delay: -4s; }
.login-flow-path { animation: loginFlowDash 2.5s linear infinite; opacity: .55; }
.login-flow-path--delay { animation-delay: -.5s; }
.login-flow-path--delay2 { animation-delay: -1s; }
.login-flow-path--delay3 { animation-delay: -1.5s; }
.login-flow-path--delay4 { animation-delay: -2s; }
.login-bar { transform-origin: bottom center; animation: loginBarPulse 2.8s ease-in-out infinite; }
.login-bar--1 { animation-delay: 0s; }
.login-bar--2 { animation-delay: .2s; }
.login-bar--3 { animation-delay: .4s; }
.login-bar--4 { animation-delay: .6s; }
.login-bar--5 { animation-delay: .8s; }
.login-sparkline { stroke-dasharray: 60; stroke-dashoffset: 60; animation: loginSparkDraw 3s ease-in-out infinite; }
.login-particle { opacity: .7; animation: loginParticleMove 4s ease-in-out infinite; }
.login-particle--1 { animation-delay: 0s; }
.login-particle--2 { animation-delay: -1s; }
.login-particle--3 { animation-delay: -2s; }
.login-particle--4 { animation-delay: -3s; }
.login-scene-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; justify-content: center; }
.login-scene-badge {
    font-size: .62rem; font-weight: 700; letter-spacing: .04em; padding: 5px 10px; border-radius: 999px;
    background: var(--login-card); border: 1px solid var(--border);
    color: var(--text-secondary); box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,.06));
    animation: loginBadgePop 6s ease-in-out infinite;
}
.login-scene-badge--1 { animation-delay: 0s; }
.login-scene-badge--2 { animation-delay: -1.5s; }
.login-scene-badge--3 { animation-delay: -3s; }
.login-scene-badge--4 { animation-delay: -4.5s; }
.login-hero-foot {
    margin: 16px 0 0; text-align: center; font-size: .68rem; color: var(--text-muted);
    letter-spacing: .04em; position: relative; z-index: 1;
}

.login-side {
    flex: 0 1 48%; display: flex; align-items: center; justify-content: center;
    padding: 24px; min-width: 0;
}
.login-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 0; width: 100%; }
.login-card {
    background: var(--login-card); border: 1px solid var(--login-border);
    border-radius: var(--radius); padding: 28px 32px;
    width: 100%; max-width: 380px; box-shadow: var(--shadow-md);
}
.login-logo h1 { font-size: 1.4rem; font-weight: 800; color: var(--primary); text-align: center; letter-spacing: 2px; }
.login-logo p { font-size: .65rem; color: var(--text-muted); letter-spacing: 2px; margin-top: 4px; text-align: center; font-weight: 600; }
.login-card .form-control { background: var(--input-bg); }
.login-footer { text-align: center; padding: 12px; font-size: .72rem; color: var(--text-muted); border-top: 1px solid var(--border); background: var(--card); }
.login-vendor-link { display: block; text-align: center; margin-top: 12px; font-size: .78rem; color: var(--text-muted); }
.login-vendor-link a { font-weight: 600; }

.login-wrap--with-demo {
    flex-wrap: wrap; gap: 20px; align-items: flex-start; justify-content: center;
    max-width: 920px; margin: 0 auto;
}
.login-wrap--with-demo .login-card { flex: 0 1 380px; }
.login-demo-panel {
    flex: 1 1 320px; max-width: 420px; max-height: min(72vh, 640px); overflow: auto;
    background: var(--login-card); border: 1px solid var(--login-border);
    border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-md);
}
.login-demo-head {
    display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px;
}
.login-demo-head strong { font-size: .92rem; color: var(--primary); }
.login-demo-badge {
    font-size: .62rem; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
    padding: 3px 8px; border-radius: 999px; background: rgba(245, 158, 11, .15); color: #b45309;
}
.login-demo-intro, .login-demo-security {
    font-size: .72rem; line-height: 1.45; color: var(--text-muted); margin: 0 0 8px;
}
.login-demo-intro code, .login-demo-security code {
    font-size: .68rem; padding: 1px 5px; border-radius: 4px; background: var(--input-bg);
}
.login-demo-security { margin-bottom: 12px; padding-top: 8px; border-top: 1px dashed var(--border); }
.login-demo-group { margin-bottom: 12px; }
.login-demo-group h3 {
    font-size: .68rem; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
    color: var(--text-muted); margin: 0 0 6px;
}
.login-demo-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.login-demo-user {
    width: 100%; text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px;
    background: var(--input-bg); cursor: pointer; font: inherit; color: inherit;
    transition: border-color .15s, background .15s;
}
.login-demo-user:hover { border-color: var(--primary); background: var(--card); }
.login-demo-user-name { font-size: .78rem; font-weight: 600; font-family: ui-monospace, monospace; }
.login-demo-user-role { font-size: .68rem; color: var(--text-muted); text-align: right; }

@media (max-width: 720px) {
    .login-wrap--with-demo { flex-direction: column; align-items: stretch; }
    .login-wrap--with-demo .login-card, .login-demo-panel { max-width: none; }
    .login-demo-panel { max-height: none; }
}
@media (max-width: 960px) {
    .login-body { flex-direction: column; }
    .login-hero {
        flex: none; border-right: none; border-bottom: 1px solid var(--login-border);
        padding: 24px 20px 16px;
    }
    .login-hero-inner { max-width: none; }
    .login-scene-svg { max-height: 220px; }
    .login-hero-title { font-size: 1.25rem; }
    .login-hero-foot { display: none; }
    .login-side { flex: 1; padding: 20px 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .login-orb, .login-node, .login-flow-path, .login-bar, .login-sparkline,
    .login-particle, .login-scene-badge { animation: none !important; }
    .login-sparkline { stroke-dashoffset: 0; }
}

@keyframes loginOrbDrift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(12px, -18px) scale(1.05); }
    66% { transform: translate(-8px, 10px) scale(.95); }
}
@keyframes loginNodeFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
@keyframes loginFlowDash {
    to { stroke-dashoffset: -28; }
}
@keyframes loginBarPulse {
    0%, 100% { transform: scaleY(1); opacity: .85; }
    50% { transform: scaleY(1.12); opacity: 1; }
}
@keyframes loginSparkDraw {
    0%, 100% { stroke-dashoffset: 60; opacity: .4; }
    40%, 60% { stroke-dashoffset: 0; opacity: 1; }
}
@keyframes loginParticleMove {
    0%, 100% { transform: translate(0, 0); opacity: .5; }
    50% { transform: translate(8px, -10px); opacity: 1; }
}
@keyframes loginBadgePop {
    0%, 100% { transform: translateY(0); box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,.06)); }
    50% { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(91, 126, 201, .15); }
}

/* ── User org & approval trees (Settings → Users) ── */
@keyframes uiFadeUp {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes uiSoftPulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: .92; }
}
.dept-org-panel:hover .dept-org-head {
    animation: uiSoftPulse 2s ease-in-out infinite;
}
.org-animate-panel {
    animation: uiFadeUp 0.42s ease both;
    animation-delay: calc(var(--anim-d, 0) * 0.06s);
}
.org-animate-node {
    animation: uiFadeUp 0.38s ease both;
    animation-delay: calc(var(--anim-d, 0) * 0.04s);
}
@media (prefers-reduced-motion: reduce) {
    .org-animate-panel, .org-animate-node { animation: none; opacity: 1; transform: none; }
    .dept-org-head::after { animation: none; }
    .dept-org-panel:hover .dept-org-head { animation: none; }
    .flow-tree-phase:not(:last-child)::before { animation: none; }
}

.org-chart-legend {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 8px; margin-bottom: 12px; font-size: .8125rem;
}
.dept-org-intro { margin: 0 0 16px; }
.org-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }

/* Department org grid */
.dept-org-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 14px;
}
.dept-org-panel {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.dept-org-panel:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.dept-org-panel-muted { opacity: .92; }
.dept-org-head {
    position: relative; overflow: hidden;
    padding: 12px 14px 10px;
    background: var(--card);
    border-bottom: 2px solid var(--dept-accent);
}
.dept-org-head::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.35) 50%, transparent 60%);
    animation: deptShimmer 4s ease-in-out infinite;
    pointer-events: none;
}
@keyframes deptShimmer {
    0%, 100% { transform: translateX(-120%); opacity: 0; }
    45%, 55%  { opacity: .5; }
    100%      { transform: translateX(120%); opacity: 0; }
}
.dept-org-code {
    display: inline-block; font-size: .62rem; font-weight: 800; letter-spacing: .06em;
    padding: 2px 7px; border-radius: 4px;
    background: var(--dept-accent); color: #fff; margin-bottom: 4px;
}
.dept-org-title { font-size: .9375rem; font-weight: 700; color: var(--text); line-height: 1.25; }
.dept-org-count { font-size: .68rem; color: var(--text-muted); margin-top: 2px; display: block; }
.dept-org-body { padding: 12px 10px 14px; }
.dept-org-chart { padding: 4px 0 0; }
.dept-org-empty {
    margin: 0; font-size: .8125rem; color: var(--text-muted); text-align: center; padding: 16px 8px;
}
.dept-org-flat {
    display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
}

.org-chart-wrap {
    overflow-x: auto;
    overflow-y: visible;
    padding: 4px 0 8px;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scroll-padding-inline: 48px;
    background: linear-gradient(180deg, rgba(248, 250, 252, .55) 0%, transparent 100%);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.card-org-hierarchy { overflow: visible; }
.card-body-org { overflow: visible; padding-left: 10px; padding-right: 10px; }
.org-chart-canvas {
    display: block;
    width: max-content;
    min-width: 100%;
    padding: 18px 52px 22px;
    box-sizing: border-box;
}
.org-chart, .org-chart ul {
    list-style: none; margin: 0; padding: 0;
    display: flex; justify-content: center; flex-wrap: nowrap;
    --org-line: #94a3b8;
    --org-v: 22px;
}
.org-chart-apex {
    flex-direction: column; align-items: center; width: 100%;
}
.org-apex-root {
    display: flex; flex-direction: column; align-items: center;
    padding: 0 !important;
}
.org-apex-root > .org-chart {
    padding-top: var(--org-v);
}
.org-chart ul {
    position: relative;
    padding-top: var(--org-v);
}
/* Vertical stem: parent node → horizontal rail */
.org-chart ul::before {
    content: '';
    position: absolute; top: 0; left: 50%;
    width: 0; height: var(--org-v);
    border-left: 2px solid var(--org-line);
    transform: translateX(-50%);
}
.org-chart li {
    position: relative; text-align: center; list-style: none;
    padding: var(--org-v) 8px 0;
    vertical-align: top;
}
.org-chart > li { padding-top: 0; }
/* Horizontal rail + vertical drop (classic T-junction) */
.org-chart li::before,
.org-chart li::after {
    content: '';
    position: absolute; top: 0; width: 50%; height: var(--org-v);
    border-top: 2px solid var(--org-line);
    box-sizing: border-box;
}
.org-chart li::before { right: 50%; }
.org-chart li::after  { left: 50%; border-left: 2px solid var(--org-line); }
/* First / last: open ends of horizontal rail */
.org-chart li:first-child::before { border: none; }
.org-chart li:last-child::after   { border: none; }
.org-chart li:last-child::before  { border-right: 2px solid var(--org-line); }
/* Only child: straight vertical, no horizontal rail */
.org-chart li:only-child::before { display: none; }
.org-chart li:only-child::after {
    display: block;
    left: 50%; width: 0;
    border: none;
    border-left: 2px solid var(--org-line);
}
.org-chart-apex > .org-apex-root::before,
.org-chart-apex > .org-apex-root::after { display: none; }

.org-system-row {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
    margin-bottom: 16px; padding: 10px 12px;
    background: var(--input-bg, #f8fafc); border: 1px dashed var(--border);
    border-radius: 10px;
}
.org-system-label {
    font-size: .68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .05em; color: var(--text-muted); margin-right: 4px;
}
.org-node-manager {
    box-shadow: 0 2px 10px rgba(15, 23, 42, .07);
}
.org-node {
    position: relative; z-index: 1;
    width: 128px;
    height: 94px;
    box-sizing: border-box;
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    background: var(--card, #fff);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 8px 8px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 3px 10px rgba(15, 23, 42, .04);
    text-align: center;
    vertical-align: top;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.org-node-bar {
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    border-radius: 10px 10px 0 0;
    background: var(--org-role, var(--primary));
}
.org-node:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(15, 23, 42, .09);
    border-color: color-mix(in srgb, var(--org-role, var(--primary)) 35%, var(--border));
}
.org-node-inactive { opacity: .55; }
.org-node-role {
    flex: 0 0 26px;
    height: 26px;
    font-size: .56rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    color: var(--org-role, var(--primary)); margin: 0 0 3px; line-height: 1.2;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.org-node-name {
    flex: 1 1 auto;
    min-height: 20px;
    max-height: 32px;
    font-size: .76rem; font-weight: 700; color: var(--text); line-height: 1.2;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.org-node-meta {
    flex: 0 0 13px;
    height: 13px;
    font-size: .58rem; color: var(--text-muted); margin-top: auto;
    font-family: ui-monospace, monospace;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.org-node-dept {
    flex: 0 0 14px;
    height: 14px;
    line-height: 14px;
    display: inline-block; font-size: .52rem; font-weight: 800; letter-spacing: .05em;
    padding: 0 7px; border-radius: 999px; margin: 0 0 3px;
    background: color-mix(in srgb, var(--dept-accent, #64748b) 14%, transparent);
    color: var(--dept-accent, #64748b);
    border: 1px solid color-mix(in srgb, var(--dept-accent, #64748b) 28%, transparent);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.org-node-dept-muted { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }
.org-node-dept-empty {
    visibility: hidden;
    border-color: transparent;
    background: transparent;
}
.org-tree-single { padding: 0; }
.org-dept-legend {
    display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px;
    padding-top: 12px; border-top: 1px dashed var(--border);
    font-size: .75rem; color: var(--text-muted);
}
.org-dept-legend-item { white-space: nowrap; }
.org-node-badge {
    position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
    display: inline-block; font-size: .55rem; font-weight: 600;
    padding: 1px 6px; border-radius: 999px; white-space: nowrap;
}
.org-node-badge-off { background: #fef2f2; color: #991b1b; }
.org-node-edit {
    position: absolute; top: 4px; right: 6px; font-size: .75rem; text-decoration: none;
    opacity: 0; transition: opacity .15s;
}
.org-node:hover .org-node-edit { opacity: .7; }
.user-chain-preview { line-height: 1.6; }

/* Flow-tree — alur approval P2P (Tab 2) */
.flow-tree-legend {
    display: flex; flex-wrap: wrap; gap: 12px 20px; margin-bottom: 12px; font-size: .8125rem;
}
.flow-tree-wrap {
    overflow-x: auto; padding: 8px 4px 16px;
    -webkit-overflow-scrolling: touch;
}
.flow-tree-v {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; align-items: center;
}
.flow-tree-phase {
    position: relative; display: flex; flex-direction: column; align-items: center;
    padding-bottom: 28px; width: 100%;
}
.flow-tree-phase:not(:last-child)::after {
    content: ''; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
    width: 2px; height: 20px; background: var(--border, #cbd5e1);
}
.flow-tree-phase:not(:last-child)::before {
    content: '↓'; position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%);
    font-size: .75rem; color: var(--text-muted); line-height: 1; z-index: 1;
    background: var(--card, #fff); padding: 0 4px;
}
.flow-tree-branch-label {
    font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
    color: var(--text-muted); margin: 10px 0 6px; text-align: center;
}
.flow-tree-h {
    list-style: none; margin: 0; padding: 16px 0 0; position: relative;
    display: flex; justify-content: center; flex-wrap: nowrap;
}
.flow-tree-h::before {
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 2px; height: 16px; background: var(--border, #cbd5e1);
}
.flow-tree-h > li {
    position: relative; list-style: none; padding: 0 8px; text-align: center;
}
.flow-tree-h > li::before,
.flow-tree-h > li::after {
    content: ''; position: absolute; top: 0; width: 50%; height: 16px;
    border-top: 2px solid var(--border, #cbd5e1);
}
.flow-tree-h > li::before { right: 50%; border-right: 1px solid var(--border, #cbd5e1); }
.flow-tree-h > li::after  { left: 50%; border-left: 1px solid var(--border, #cbd5e1); }
.flow-tree-h > li:only-child::before,
.flow-tree-h > li:only-child::after { display: none; }
.flow-tree-h > li:first-child::before { border: none; }
.flow-tree-h > li:last-child::after  { border: none; }
.flow-node {
    position: relative; display: inline-block; min-width: 160px; max-width: 220px;
    background: var(--card, #fff); border: 2px solid var(--flow-color, var(--border));
    border-radius: 10px; padding: 12px 14px 10px; box-shadow: var(--shadow-sm);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.flow-node:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.flow-tree-phase:not(:last-child)::before {
    animation: flowArrowBounce 2.2s ease-in-out infinite;
}
@keyframes flowArrowBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: .7; }
    50%      { transform: translateX(-50%) translateY(2px); opacity: 1; }
}
.flow-node-sm { min-width: 120px; max-width: 160px; padding: 8px 10px 8px; }
.flow-node-step {
    font-size: .65rem; font-weight: 800; color: var(--flow-color); margin-bottom: 4px;
}
.flow-node-title { font-size: .8125rem; font-weight: 700; color: var(--text); line-height: 1.3; }
.flow-node-role { font-size: .72rem; color: var(--text-muted); margin-top: 4px; }
.flow-node-note { font-size: .65rem; color: var(--text-muted); margin-top: 4px; line-height: 1.35; }
.flow-node-type {
    display: inline-block; margin-top: 8px; font-size: .58rem; font-weight: 700;
    padding: 2px 7px; border-radius: 999px; text-transform: uppercase;
}
.flow-node-link {
    display: block; margin-top: 8px; font-size: .68rem; font-weight: 600;
    color: var(--primary); text-decoration: none;
}
.flow-node-link:hover { text-decoration: underline; }
@media (max-width: 640px) {
    .org-chart-canvas { padding: 14px 28px 18px; }
    .org-chart li { padding-left: 5px; padding-right: 5px; }
    .org-node { width: 118px; height: 90px; padding: 9px 7px 7px; }
    .flow-tree-h { flex-wrap: wrap; justify-content: center; }
    .flow-tree-h > li::before, .flow-tree-h > li::after { display: none; }
    .flow-node { min-width: 140px; }
}

/* ── Dashboard analytics ── */
.dash-hero {
    background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 55%, #0d9488 100%);
    border-radius: 12px; padding: 22px 24px; margin-bottom: 16px; color: #fff;
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    box-shadow: var(--shadow-md);
}
.dash-hero h2 { font-size: 1.35rem; font-weight: 700; margin: 0 0 4px; color: #fff; }
.dash-hero p,
.dash-hero-lead { margin: 0; font-size: .875rem; color: rgba(255,255,255,.92); }
.dash-hero-meta { color: rgba(255,255,255,.88); }
.dash-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dash-hero .btn { background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.35); color: #fff; }
.dash-hero .btn:hover { background: rgba(255,255,255,.25); color: #fff; }
.dash-hero .btn-primary { background: #fff; color: var(--primary); border-color: #fff; font-weight: 600; }

.dash-kpi-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px; margin-bottom: 16px;
}
.dash-kpi {
    background: var(--card); border: 1px solid var(--border); border-radius: 10px;
    padding: 14px 16px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.dash-kpi::after {
    content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; border-radius: 10px 0 0 10px;
}
.dash-kpi.kpi-blue::after { background: #2563eb; }
.dash-kpi.kpi-teal::after { background: #0d9488; }
.dash-kpi.kpi-amber::after { background: #f59e0b; }
.dash-kpi.kpi-purple::after { background: #8b5cf6; }
.dash-kpi.kpi-green::after { background: #22c55e; }
.dash-kpi.kpi-red::after { background: #ef4444; }
.dash-kpi.kpi-slate::after { background: #64748b; }
.dash-kpi-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.dash-kpi-icon {
    width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
    font-size: .75rem; font-weight: 800; flex-shrink: 0;
}
.dash-kpi.kpi-blue .dash-kpi-icon { background: #eff6ff; color: #2563eb; }
.dash-kpi.kpi-teal .dash-kpi-icon { background: #f0fdfa; color: #0d9488; }
.dash-kpi.kpi-amber .dash-kpi-icon { background: #fffbeb; color: #d97706; }
.dash-kpi.kpi-purple .dash-kpi-icon { background: #f5f3ff; color: #7c3aed; }
.dash-kpi.kpi-green .dash-kpi-icon { background: #f0fdf4; color: #16a34a; }
.dash-kpi.kpi-red .dash-kpi-icon { background: #fef2f2; color: #dc2626; }
.dash-kpi.kpi-slate .dash-kpi-icon { background: #f1f5f9; color: #475569; }
.dash-kpi-value { font-size: 1.45rem; font-weight: 800; line-height: 1.1; color: var(--text); }
.dash-kpi-label { font-size: .75rem; color: var(--text-muted); margin-top: 2px; }
.dash-kpi-sub { font-size: .7rem; color: var(--text-muted); margin-top: 6px; }

.dash-charts {
    display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; margin-bottom: 16px;
}
.dash-chart-card {
    background: var(--card); border: 1px solid var(--border); border-radius: 10px;
    padding: 14px 16px; box-shadow: var(--shadow-sm); grid-column: span 4; min-height: 280px;
    display: flex; flex-direction: column;
}
.dash-chart-card.span-8 { grid-column: span 8; }
.dash-chart-card.span-6 { grid-column: span 6; }
.dash-chart-card.span-12 { grid-column: span 12; }
.dash-chart-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.dash-chart-title { font-size: .875rem; font-weight: 700; color: var(--text); }
.dash-chart-sub { font-size: .7rem; color: var(--text-muted); }
.dash-chart-body { flex: 1; position: relative; min-height: 200px; }
.dash-chart-body canvas { max-height: 240px; }

.dash-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dash-panel { background: var(--card); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-sm); overflow: hidden; }
.dash-panel-head {
    padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--card-header);
    display: flex; justify-content: space-between; align-items: center;
}
.dash-panel-head span { font-weight: 700; font-size: .875rem; }
.dash-panel-body { padding: 0; }
.dash-mini-table { width: 100%; border-collapse: collapse; font-size: .8125rem; }
.dash-mini-table th, .dash-mini-table td { padding: 10px 14px; border-bottom: 1px solid var(--border-soft); text-align: left; }
.dash-mini-table th { font-size: .7rem; text-transform: uppercase; letter-spacing: .03em; color: var(--text-muted); font-weight: 600; }
.dash-mini-table tr:last-child td { border-bottom: none; }
.dash-type-pill {
    display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .65rem; font-weight: 700;
    background: var(--primary-light); color: var(--primary);
}

@media (max-width: 1200px) {
    .dash-chart-card, .dash-chart-card.span-8, .dash-chart-card.span-6 { grid-column: span 6; }
}
@media (max-width: 768px) {
    .dash-chart-card, .dash-chart-card.span-8, .dash-chart-card.span-6, .dash-chart-card.span-12 { grid-column: span 12; }
    .dash-bottom { grid-template-columns: 1fr; }
    .dash-hero { padding: 16px; }
    .content { padding: 14px; }
    .topbar { padding: 0 14px; }
    .topbar-user .user-meta { display: none; }
}

/* === Reports module === */
.rpt-page { max-width: 1400px; }
.rpt-head {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
    margin-bottom: 16px; flex-wrap: wrap;
}
.rpt-title { font-size: 1.35rem; font-weight: 800; margin: 0 0 4px; color: var(--text); }
.rpt-sub { margin: 0; font-size: .8125rem; color: var(--text-muted); }
.rpt-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.rpt-filter-bar {
    display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px;
    padding: 12px 14px; margin-bottom: 16px;
    background: var(--card); border: 1px solid var(--border);
    border-radius: 10px; box-shadow: var(--shadow-sm);
}
.rpt-filter-group { display: flex; flex-direction: column; gap: 4px; min-width: 120px; }
.rpt-filter-group label { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.rpt-custom-dates { flex-direction: row; align-items: center; gap: 8px; flex-wrap: wrap; }
.rpt-custom-dates label { text-transform: none; font-size: .75rem; }

.rpt-layout { display: grid; grid-template-columns: 200px 1fr; gap: 14px; align-items: start; }
.rpt-nav {
    display: flex; flex-direction: column; gap: 2px;
    background: var(--card); border: 1px solid var(--border);
    border-radius: 10px; padding: 6px; box-shadow: var(--shadow-sm);
    position: sticky; top: 12px;
}
.rpt-nav-item {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 10px; border-radius: 8px;
    font-size: .8125rem; font-weight: 500; color: var(--text-muted);
    text-decoration: none; transition: background .15s, color .15s;
}
.rpt-nav-item:hover { background: var(--bg-soft); color: var(--text); }
.rpt-nav-item.active {
    background: var(--primary-soft, #eff6ff); color: var(--primary);
    font-weight: 700;
}
.rpt-nav-icon { font-size: .9rem; opacity: .85; width: 18px; text-align: center; }

.rpt-body { min-width: 0; }
.rpt-kpi-grid { margin-bottom: 14px; }

.rpt-funnel {
    display: flex; flex-wrap: wrap; align-items: stretch; gap: 0;
    margin-bottom: 16px; padding: 4px 0;
}
.rpt-funnel-step { display: flex; align-items: center; flex: 1; min-width: 140px; }
.rpt-funnel-arrow { color: var(--text-muted); font-size: 1.1rem; padding: 0 6px; flex-shrink: 0; opacity: .5; }
.rpt-funnel-card {
    flex: 1; background: var(--card); border: 1px solid var(--border);
    border-radius: 10px; padding: 14px 12px; text-align: center;
    box-shadow: var(--shadow-sm);
}
.rpt-funnel-num { font-size: 1.5rem; font-weight: 800; color: var(--primary); line-height: 1.1; }
.rpt-funnel-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--text-muted); margin-top: 4px; }
.rpt-funnel-val { font-size: .8125rem; font-weight: 700; color: var(--text); margin-top: 6px; }
.rpt-funnel-sub { font-size: .65rem; color: var(--text-muted); margin-top: 4px; }

.rpt-table-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: 10px; box-shadow: var(--shadow-sm);
    overflow: hidden; margin-top: 14px;
}
.rpt-table-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 14px; border-bottom: 1px solid var(--border-soft);
    font-weight: 700; font-size: .875rem;
}
.rpt-table .rpt-empty { text-align: center; padding: 28px; color: var(--text-muted); }
.rpt-overdue { font-size: .65rem; color: #dc2626; font-weight: 700; margin-left: 4px; }

@media (max-width: 900px) {
    .rpt-layout { grid-template-columns: 1fr; }
    .rpt-nav { flex-direction: row; flex-wrap: wrap; position: static; }
    .rpt-nav-item { flex: 1 1 auto; min-width: 140px; }
    .rpt-funnel-step { flex: 1 1 100%; }
    .rpt-funnel-arrow { display: none; }
}

@media print {
    .sidebar, .topbar, .rpt-nav, .rpt-filter-bar, .rpt-head-actions { display: none !important; }
    .main-content { margin: 0 !important; }
    .content { padding: 0 !important; }
    .rpt-layout { display: block; }
    .dash-chart-body { min-height: 180px !important; page-break-inside: avoid; }
    .rpt-table-card { page-break-inside: avoid; }
}


/* ═══════════════════════════════════════════════════════════════
   DeveApps ERP — Clean white UI (calm text, soft tables)
   ═══════════════════════════════════════════════════════════════ */

/* ── Page shell ── */
.app { background: var(--bg); }
.main-content {
    background: var(--bg-page);
}
.content {
    padding: 24px 28px;
    background: transparent;
}

/* ── Sidebar: white, airy ── */
.sidebar {
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    box-shadow: none;
}
.sidebar-header {
    padding: 20px 18px 18px;
    border-bottom: 1px solid var(--border-soft);
    background: var(--sidebar-bg);
    min-height: auto;
}
.sidebar-header h1 {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--sidebar-text);
    background: none;
    -webkit-text-fill-color: unset;
}
.sidebar-header p {
    font-size: .58rem;
    color: var(--text-muted);
    letter-spacing: .16em;
    font-weight: 500;
    margin-top: 5px;
    opacity: 1;
}
.sidebar-nav { padding: 10px 0 20px; }

.nav-section-toggle {
    padding: 14px 18px 6px;
    font-size: 10px;
    letter-spacing: .12em;
    color: var(--text-muted);
    font-weight: 700;
    opacity: 1;
}
.nav-section-toggle:hover {
    color: var(--sidebar-text);
    background: transparent;
}
.nav-group-items { padding: 0 10px 6px; }

.nav-item {
    margin: 3px 0;
    padding: 9px 12px 9px 10px;
    border-left: none;
    border-radius: 10px;
    color: var(--sidebar-text);
    font-size: .88rem;
    font-weight: 500;
    transition: background .18s var(--ease-out), color .18s;
}
.nav-item:hover {
    background: var(--bg-subtle);
    color: var(--sidebar-text);
}
.nav-item.active {
    background: var(--primary-light);
    color: var(--sidebar-text-active);
    font-weight: 600;
    box-shadow: none;
}
.nav-item-warn { color: #b45309; }
.nav-item-warn:hover, .nav-item-warn.active { color: #92400e; background: #fff7ed; }
.nav-item-accent { color: #6d28d9; }
.nav-item-accent:hover, .nav-item-accent.active { color: #5b21b6; background: #f5f3ff; }
.nav-item-link { color: #1d4ed8; }
.nav-item-link:hover, .nav-item-link.active { color: #1e40af; background: var(--primary-light); }

.nav-icon {
    width: 32px;
    height: 32px;
    margin-right: 10px;
    border-radius: 9px;
    background: var(--sidebar-icon-bg, #f3f4f6);
    color: var(--sidebar-icon-color, #374151);
    transition: background .18s, color .18s;
}
.nav-item:hover .nav-icon {
    background: var(--bg-subtle);
    color: var(--sidebar-text);
    transform: none;
}
.nav-item.active .nav-icon {
    background: var(--card);
    color: var(--sidebar-text-active);
    box-shadow: 0 1px 3px rgba(29, 78, 216, .15);
}
.nav-item-warn .nav-icon { background: #fff7ed; color: #d97706; }
.nav-item-warn.active .nav-icon { background: #fff; color: #b45309; }
.nav-item-accent .nav-icon { background: #f5f3ff; color: #7c3aed; }
.nav-item-link .nav-icon { background: #eff6ff; color: #2563eb; }

/* ── Topbar: clean white bar ── */
.topbar {
    min-height: 56px;
    padding: 0 28px;
    background: var(--topbar-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-soft);
    box-shadow: none;
}
.topbar-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -.01em;
}
.hamburger {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--input-bg);
    box-shadow: none;
    color: var(--text-muted);
}
.hamburger:hover {
    border-color: var(--border);
    background: var(--bg-subtle);
    color: var(--text);
    transform: none;
}
.user-avatar {
    width: 34px;
    height: 34px;
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--border);
    box-shadow: none;
    font-weight: 600;
}
.user-name { font-weight: 600; color: var(--text); }
.user-role { color: var(--text-muted); }
.theme-toggle, .btn-logout {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid var(--border);
    box-shadow: none;
    background: var(--input-bg);
}
.theme-toggle:hover, .btn-logout:hover {
    background: var(--bg-subtle);
    transform: none;
    box-shadow: none;
}

/* ── Cards: minimal border, white ── */
.card,
.form-section,
.rfq-panel,
.rfq-card,
.stat-card,
.list-stat,
.rfq-stat,
.dash-kpi,
.dash-chart-card,
.dash-panel,
.rpt-table-card,
.rpt-funnel-card,
.empty-state,
.list-empty {
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: none;
}
.card:hover,
.dash-kpi:hover,
.stat-card:hover {
    box-shadow: var(--shadow-sm);
}
.card-header,
.dash-panel-head {
    padding: 14px 20px;
    font-weight: 600;
    font-size: .88rem;
    color: var(--text);
    background: var(--card-header);
    border-bottom: 1px solid var(--border-soft);
}
.card-body { padding: 20px; }

/* ── Tables: soft, breathable (not rigid grid) ── */
.table-scroll,
.table-wrapper {
    margin-bottom: 18px;
}

table.list-table,
table.rfq-table,
.card > .table-wrapper > table,
.card > .table-scroll > table,
.table-scroll > table:not(.po-items-table),
.table-wrapper > table:not(.po-items-table) {
    border: none;
    border-radius: var(--radius);
    background: transparent;
    box-shadow: none;
    border-collapse: separate;
    border-spacing: 0 6px;
    font-size: .9rem;
}

table.list-table thead,
table.rfq-table thead,
.card > .table-wrapper > table thead,
.table-scroll > table thead {
    background: transparent;
}

table.list-table thead th,
table.rfq-table th,
.card > .table-wrapper > table th,
.table-scroll > table:not(.po-items-table) th,
.table-wrapper > table:not(.po-items-table) th {
    padding: 10px 16px;
    font-size: .72rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: .02em;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-bottom: none;
    white-space: nowrap;
}

table.list-table tbody tr,
table.rfq-table tbody tr,
.table-scroll > table:not(.po-items-table) tbody tr {
    transition: transform .12s var(--ease-out);
}

table.list-table tbody tr td,
table.rfq-table tbody tr td,
.card > .table-wrapper > table tbody tr td,
.table-scroll > table:not(.po-items-table) tbody tr td,
.table-wrapper > table:not(.po-items-table) tbody tr td {
    padding: 13px 16px;
    color: var(--text);
    font-size: .88rem;
    font-weight: 450;
    border: none;
    background: var(--card);
    vertical-align: middle;
}

table.list-table tbody tr td:first-child,
table.rfq-table tbody tr td:first-child,
.table-scroll > table:not(.po-items-table) tbody tr td:first-child {
    border-radius: 10px 0 0 10px;
    border: 1px solid var(--border-soft);
    border-right: none;
}
table.list-table tbody tr td:last-child,
table.rfq-table tbody tr td:last-child,
.table-scroll > table:not(.po-items-table) tbody tr td:last-child {
    border-radius: 0 10px 10px 0;
    border: 1px solid var(--border-soft);
    border-left: none;
}
table.list-table tbody tr td:first-child:last-child,
.table-scroll > table:not(.po-items-table) tbody tr td:first-child:last-child {
    border-radius: 10px;
    border: 1px solid var(--border-soft);
}
table.list-table tbody tr td:not(:first-child):not(:last-child),
.table-scroll > table:not(.po-items-table) tbody tr td:not(:first-child):not(:last-child) {
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
}
table.list-table tbody tr:hover td,
table.rfq-table tbody tr:hover td,
.table-scroll > table:not(.po-items-table) tbody tr:hover td {
    background: var(--table-row-hover);
    border-color: var(--border);
}

/* Generic tables inside cards (non list-table) */
.card table:not(.list-table):not(.po-items-table) th {
    text-transform: none;
    letter-spacing: .02em;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--table-header-bg);
    padding: 11px 14px;
    border-bottom: 1px solid var(--border-soft);
}
.card table:not(.list-table):not(.po-items-table) td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-soft);
    color: var(--text);
}
.card table:not(.list-table):not(.po-items-table) tbody tr:last-child td {
    border-bottom: none;
}
.card table:not(.list-table):not(.po-items-table) tbody tr:hover td {
    background: var(--table-row-hover);
}

table th { text-transform: none; letter-spacing: .02em; }

/* ── Forms ── */
.form-control {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--input-bg);
    color: var(--text);
    box-shadow: none;
}
.form-control:hover { border-color: #dde3ea; }
.form-control:focus {
    border-color: var(--primary);
    box-shadow: var(--shadow-input-focus);
}
.form-label {
    font-size: .72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: .01em;
}

/* ── Buttons: calm, not loud ── */
.btn {
    padding: 9px 16px;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: none;
    transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { transform: none; box-shadow: none; opacity: 1; }
.btn-primary {
    background: var(--primary);
    color: #fff;
    border: 1px solid var(--primary);
}
.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}
.btn-outline {
    background: var(--input-bg);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}
.btn-outline:hover {
    background: var(--bg-subtle);
    border-color: #dde3ea;
    color: var(--text);
}
.btn-create {
    padding: 10px 18px;
    background: var(--primary);
    box-shadow: none;
    font-weight: 600;
}
.btn-create:hover {
    background: var(--primary-dark);
    transform: none;
    box-shadow: none;
    opacity: 1;
}

/* ── Quick actions ── */
.qa-btn {
    padding: 8px 14px;
    border-radius: 10px;
    font-size: .8rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--input-bg);
    border: 1px solid var(--border);
    box-shadow: none;
}
.qa-btn:hover {
    background: var(--bg-subtle);
    border-color: var(--border);
    color: var(--text);
    transform: none;
}
.qa-btn.primary {
    background: var(--primary-light);
    border-color: transparent;
    color: var(--primary-dark);
}

/* ── Module headers ── */
.module-head {
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-soft);
}
.module-head h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -.02em;
}
.module-head p {
    color: var(--text-muted);
    font-size: .86rem;
}
.page-title { font-weight: 700; color: var(--text); }

/* ── Badges: soft pills ── */
.badge-status {
    padding: 4px 11px;
    font-size: .72rem;
    font-weight: 600;
    box-shadow: none;
}
.badge-status-text {
    padding: 0;
    background: none !important;
    box-shadow: none;
}

/* ── Tabs ── */
.rfq-tabs, .rfq-subnav, .company-tabs {
    background: var(--bg-subtle);
    border: 1px solid var(--border-soft);
    padding: 4px;
    border-radius: 12px;
}
.rfq-tabs button, .rfq-subnav a, .company-tabs a {
    border-radius: 8px;
    color: var(--text-muted);
    font-weight: 500;
}
.rfq-tabs button.active, .rfq-subnav a.active, .company-tabs a.active {
    background: var(--card);
    color: var(--primary-dark);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}

/* ── Dashboard: KPI/panel cards (hero styled in dashboard.css.php) ── */
.dash-kpi,
.dash-chart-card,
.dash-panel {
    border: 1px solid var(--border);
    box-shadow: none;
}
.dash-kpi-value { color: var(--text); font-weight: 700; }
.dash-kpi-label, .dash-kpi-sub { color: var(--text-muted); }

.dash-mini-table th {
    text-transform: none;
    color: var(--text-muted);
    font-weight: 600;
}
.dash-mini-table td { color: var(--text); }

/* ── Footer ── */
.app-footer {
    background: var(--card);
    border-top: 1px solid var(--border-soft);
    color: var(--text-muted);
}

/* ── Login ── */
.login-page { background: var(--login-bg); }
.login-card {
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}
.login-logo h1 {
    color: var(--text);
    background: none;
    -webkit-text-fill-color: unset;
}

/* ── Pagination ── */
.pagination a {
    border: 1px solid var(--border);
    color: var(--text-muted);
    background: var(--input-bg);
}
.pagination a:hover {
    background: var(--bg-subtle);
    color: var(--primary);
    border-color: var(--border);
}
.pagination .current {
    background: var(--primary);
    box-shadow: none;
}

/* ── List stats ── */
.list-stat, .rfq-stat {
    border: 1px solid var(--border);
    box-shadow: none;
}
.list-stat .lbl, .rfq-stat .lbl { color: var(--text-muted); text-transform: none; }
.list-stat .num { color: var(--text); font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
    .btn, .nav-item, .qa-btn, .btn-create { transition: none !important; }
}

/* ── Theme picker ── */
.theme-picker { position: relative; }
.theme-picker-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 200;
    min-width: 240px;
    max-width: min(300px, calc(100vw - 24px));
    max-height: min(80vh, 560px);
    overflow-y: auto;
    padding: 8px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}
.theme-picker-menu-wide { min-width: 280px; }
.theme-picker-divider {
    height: 1px;
    margin: 8px 6px;
    background: var(--border-soft);
}
.theme-picker-sublabel {
    padding: 4px 10px 6px;
    font-size: .68rem;
    font-weight: 600;
    color: var(--text-muted);
}
.theme-custom-panel { padding: 0 4px 4px; }
.theme-color-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 8px;
}
.theme-color-row:hover { background: var(--bg-subtle); }
.theme-color-label {
    font-size: .78rem;
    font-weight: 500;
    color: var(--text);
    flex: 1;
    min-width: 0;
    cursor: pointer;
}
.theme-color-input {
    width: 36px;
    height: 28px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
}
.theme-color-input::-webkit-color-swatch-wrapper { padding: 2px; }
.theme-color-input::-webkit-color-swatch { border: none; border-radius: 5px; }
.theme-quick-palettes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 8px 10px;
}
.theme-palette-chip {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid var(--card);
    box-shadow: 0 0 0 1px var(--border);
    cursor: pointer;
    padding: 0;
    transition: transform .12s, box-shadow .12s;
}
.theme-palette-chip:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 2px var(--primary-light), 0 0 0 3px var(--primary);
}
.theme-custom-actions {
    display: flex;
    gap: 8px;
    padding: 8px 6px 4px;
    border-top: 1px solid var(--border-soft);
    margin-top: 4px;
}
.theme-custom-actions .btn { flex: 1; justify-content: center; }
.theme-picker-custom-active .theme-custom-panel {
    outline: 2px solid var(--primary-light);
    outline-offset: -2px;
    border-radius: 10px;
}
.theme-picker-label {
    padding: 6px 10px 8px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.theme-picker-opt {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    color: var(--text);
    transition: background .15s;
}
.theme-picker-opt:hover { background: var(--bg-subtle); }
.theme-picker-opt.is-active { background: var(--primary-light); }
.theme-swatch {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid var(--border);
    flex-shrink: 0;
}
.sw-light { background: linear-gradient(135deg, #fff 50%, #f0f4fa 50%); }
.sw-soft { background: linear-gradient(135deg, #fff 40%, #e5e7eb 60%); }
.sw-dark { background: linear-gradient(135deg, #1a2332 50%, #0a0e14 50%); }
.sw-auto { background: linear-gradient(135deg, #fff 50%, #1a2332 50%); }
.theme-opt-text { flex: 1; min-width: 0; }
.theme-opt-text strong {
    display: block;
    font-size: .84rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.25;
}
.theme-opt-text small {
    display: block;
    font-size: .72rem;
    color: var(--text-muted);
    margin-top: 2px;
    line-height: 1.3;
}
.theme-opt-check {
    font-size: .85rem;
    font-weight: 700;
    color: var(--primary);
    opacity: 0;
    flex-shrink: 0;
}
.theme-picker-opt.is-active .theme-opt-check { opacity: 1; }

.login-top .theme-picker-menu { right: 0; }

/* ── Dark theme: sidebar readability ── */
[data-theme="dark"] .sidebar-header h1 { color: var(--sidebar-text-active); }
[data-theme="dark"] .sidebar-header p { color: var(--text-muted); }
[data-theme="dark"] .nav-section-toggle { color: var(--text-muted); }
[data-theme="dark"] .nav-section-toggle:hover { color: var(--text); }
[data-theme="dark"] .nav-item:hover { color: var(--text); }
[data-theme="dark"] .nav-icon {
    background: var(--border-soft);
    color: var(--sidebar-text);
}
[data-theme="dark"] .nav-item:hover .nav-icon {
    background: var(--primary-light);
    color: var(--primary);
}
[data-theme="dark"] .nav-item.active .nav-icon {
    background: var(--primary);
    color: #fff;
    box-shadow: none;
}
[data-theme="dark"] .nav-item-warn:hover,
[data-theme="dark"] .nav-item-warn.active { background: var(--warn-bg); }
[data-theme="dark"] .nav-item-accent:hover,
[data-theme="dark"] .nav-item-accent.active { background: #4c1d9540; }

[data-theme="custom"] .sidebar-header h1 { color: var(--sidebar-text); }
[data-theme="custom"] .nav-item.active .nav-icon {
    background: var(--card);
    color: var(--sidebar-text-active);
}
[data-theme="custom"] .nav-item.active .nav-icon {
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}

/* ═══════════════════════════════════════════════════════════════
   PROCUREMENT — modern P2P UI (scoped: body.proc-module)
   ═══════════════════════════════════════════════════════════════ */

.proc-module .content {
    max-width: 1440px;
}

/* ── P2P flow strip ── */
.proc-flow {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 6px;
    margin-bottom: 22px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.proc-flow::-webkit-scrollbar { display: none; }
.proc-flow-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-muted);
    white-space: nowrap;
    transition: background .18s, color .18s;
    flex-shrink: 0;
}
.proc-flow-step:hover {
    background: var(--bg-subtle);
    color: var(--text);
    text-decoration: none;
}
.proc-flow-step.is-active {
    background: var(--primary-light);
    color: var(--primary-dark, var(--primary));
    box-shadow: inset 0 0 0 1px rgba(91, 126, 201, .15);
}
.proc-flow-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 9px;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .04em;
    background: var(--bg-subtle);
    color: var(--text-muted);
}
.proc-flow-step.is-active .proc-flow-num {
    background: var(--primary);
    color: #fff;
}
.proc-flow-label {
    font-size: .82rem;
    font-weight: 600;
}
.proc-flow-line {
    width: 20px;
    height: 2px;
    background: linear-gradient(90deg, var(--border), transparent);
    flex-shrink: 0;
    margin: 0 -2px;
}

/* ── Page hero (module-head) ── */
.proc-module .module-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
    padding: 22px 26px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow-sm);
}
.proc-module .module-head h1 {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -.03em;
    color: var(--text);
    line-height: 1.25;
}
.proc-module .module-head p {
    font-size: .88rem;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.45;
    max-width: 52ch;
}
.proc-module .module-head .btn-create,
.proc-module .module-head .btn-reset {
    flex-shrink: 0;
    padding: 10px 20px;
    border-radius: 11px;
    font-size: .84rem;
    box-shadow: none;
}
.proc-module .module-head .btn-reset {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    color: var(--text-secondary, var(--text-muted));
}

/* ── KPI stats ── */
.proc-module .list-stats,
.proc-module .rfq-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.proc-module .list-stat,
.proc-module .rfq-stat {
    position: relative;
    text-align: left;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--card);
    overflow: hidden;
    transition: transform .15s var(--ease-out), box-shadow .15s;
}
.proc-module .list-stat:hover,
.proc-module .rfq-stat:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}
.proc-module .list-stat::before,
.proc-module .rfq-stat::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--border);
    border-radius: 3px 0 0 3px;
}
.proc-module .list-stat .num,
.proc-module .rfq-stat .num {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -.03em;
    margin-bottom: 4px;
    line-height: 1.1;
}
.proc-module .list-stat .lbl,
.proc-module .rfq-stat .lbl {
    font-size: .72rem;
    text-transform: none;
    letter-spacing: .01em;
    font-weight: 500;
    color: var(--text-muted);
}
.proc-module .s-total::before { background: var(--primary); }
.proc-module .s-draft::before { background: #94a3b8; }
.proc-module .s-pub::before { background: #3b82f6; }
.proc-module .s-eval::before { background: #f59e0b; }
.proc-module .s-award::before { background: #10b981; }
.proc-module .s-cancel::before { background: #ef4444; }

/* ── Quick actions ── */
.proc-module .quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 14px;
    margin-bottom: 18px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
}
.proc-module .qa-btn {
    padding: 8px 16px;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
    border: 1px solid transparent;
    background: var(--card);
    box-shadow: none;
}
.proc-module .qa-btn:hover {
    background: var(--card);
    border-color: var(--primary);
    transform: none;
}
.proc-module .qa-btn.primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.proc-module .qa-btn.primary:hover {
    background: var(--primary-dark);
    color: #fff;
    border-color: var(--primary-dark);
}

/* ── Filter bar ── */
.proc-module .filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    margin-bottom: 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
}
.proc-module .filter-bar input[type="text"],
.proc-module .filter-bar input[type="date"],
.proc-module .filter-bar select {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--input-bg);
    font-size: .84rem;
    min-height: 40px;
}
.proc-module .filter-bar input[type="text"] {
    flex: 1 1 220px;
    min-width: 180px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l3 3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 12px center;
    padding-left: 38px;
}
.proc-module .filter-bar .btn-filter {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: .84rem;
}
.proc-module .filter-bar .btn-reset {
    padding: 10px 16px;
    border-radius: 10px;
}

/* ── Data table card ── */
.proc-module .table-scroll {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 8px 4px 12px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}
.proc-module .table-scroll > table.list-table,
.proc-module .table-scroll > table.rfq-table {
    border-spacing: 0 4px;
    min-width: 100%;
}
.proc-module table.list-table thead th,
.proc-module table.rfq-table thead th {
    padding: 12px 16px 10px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-soft);
}
.proc-module table.list-table tbody tr td,
.proc-module table.rfq-table tbody tr td {
    padding: 14px 16px;
    font-size: .86rem;
    border-radius: 0 !important;
    border: none !important;
    border-bottom: 1px solid var(--border-soft) !important;
    background: transparent !important;
}
.proc-module table.list-table tbody tr:last-child td,
.proc-module table.rfq-table tbody tr:last-child td {
    border-bottom: none !important;
}
.proc-module table.list-table tbody tr:hover td,
.proc-module table.rfq-table tbody tr:hover td {
    background: var(--table-row-hover) !important;
}
.proc-module table.list-table tbody tr td strong,
.proc-module table.rfq-table tbody tr td strong {
    font-weight: 700;
    color: var(--text);
    font-size: .88rem;
}
.proc-module table.list-table tbody tr td:first-child:not(:only-child) {
    color: var(--text-muted);
    font-size: .78rem;
    font-weight: 600;
}

.proc-module .table-scroll > table.list-table,
.proc-module .table-scroll > table.rfq-table,
.proc-module .table-scroll > table:not(.po-items-table) {
    border-collapse: collapse !important;
    border-spacing: 0 !important;
}
.proc-module .table-scroll > table.list-table tbody tr td:first-child,
.proc-module .table-scroll > table.list-table tbody tr td:last-child,
.proc-module .table-scroll > table.rfq-table tbody tr td:first-child,
.proc-module .table-scroll > table.rfq-table tbody tr td:last-child,
.proc-module .table-scroll > table:not(.po-items-table) tbody tr td:not(:first-child):not(:last-child) {
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
}

/* Doc number — teks berwarna saja */
.proc-module .proc-doc-no {
    display: inline;
    padding: 0;
    border-radius: 0;
    background: none;
    color: var(--primary-dark, var(--primary));
    font-weight: 700;
    font-size: .88rem;
    letter-spacing: -.01em;
}

/* Action links — teks berwarna saja */
.proc-module .action-link {
    display: inline;
    padding: 0;
    border-radius: 0;
    font-size: .84rem;
    font-weight: 600;
    color: var(--primary);
    background: none;
    text-decoration: none;
    transition: color .15s;
}
.proc-module .action-link:hover {
    background: none;
    color: var(--primary-dark, var(--primary));
    text-decoration: underline;
}
.proc-module table.list-table td .action-link + .action-link,
.proc-module table.rfq-table td .action-link + .action-link {
    margin-left: 10px;
}

/* Status & label — teks berwarna, tanpa pill background */
.proc-module .type-badge,
.proc-module .status-badge,
.proc-module .badge-status,
.proc-module .badge.badge-info,
.proc-module .badge.badge-secondary,
.proc-module .badge.badge-warning {
    display: inline;
    padding: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    border: none !important;
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .01em;
    box-shadow: none !important;
}
.proc-module .badge-dot {
    display: none !important;
}
.proc-module .badge.badge-info { color: var(--info-text, #1d4ed8) !important; }
.proc-module .badge.badge-secondary { color: var(--text-muted) !important; }
.proc-module .badge.badge-warning { color: var(--warn-text, #b45309) !important; }

/* ── Empty state ── */
.proc-module .empty-state,
.proc-module .list-empty {
    padding: 56px 32px;
    border-radius: 16px;
    border: 2px dashed var(--border);
    background: linear-gradient(180deg, var(--bg-subtle) 0%, var(--card) 100%);
}
.proc-module .empty-state h3,
.proc-module .list-empty h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.proc-module .empty-state p,
.proc-module .list-empty p {
    max-width: 42ch;
    margin: 0 auto;
    line-height: 1.5;
}

/* ── Forms (create/edit/view) ── */
.proc-module .form-section {
    border-radius: 16px;
    padding: 22px 24px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.proc-module .form-section h3 {
    font-size: 1rem;
    font-weight: 700;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.proc-module .form-section h3::before {
    content: '';
    width: 4px;
    height: 18px;
    border-radius: 2px;
    background: var(--primary);
    flex-shrink: 0;
}
.proc-module .rfq-panel,
.proc-module .rfq-card {
    border-radius: 16px;
    padding: 20px 22px;
    box-shadow: var(--shadow-sm);
}
.proc-module .rfq-meta-grid {
    gap: 14px 20px;
}
.proc-module .rfq-meta-grid .val {
    font-size: .92rem;
}

/* ── Pagination ── */
.proc-module .pagination {
    margin-top: 20px;
    padding: 8px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}
.proc-module .pagination a,
.proc-module .pagination span {
    min-width: 36px;
    text-align: center;
    border-radius: 9px;
}

/* ── Flash messages ── */
.proc-module .flash-ok,
.proc-module .flash-err {
    border-radius: 12px;
    margin-bottom: 16px;
    padding: 12px 16px;
    font-size: .88rem;
}

/* ── PO items table (keep structured inside forms) ── */
.proc-module table.po-items-table {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.proc-module table.po-items-table th {
    background: var(--table-header-bg);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 11px 12px;
}
.proc-module table.po-items-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-soft);
}

@media (max-width: 768px) {
    .proc-module .module-head {
        flex-direction: column;
        align-items: stretch;
    }
    .proc-module .module-head .btn-create,
    .proc-module .module-head .btn-reset {
        width: 100%;
        justify-content: center;
    }
    .proc-flow-label {
        display: none;
    }
    .proc-flow-step.is-active .proc-flow-label {
        display: inline;
    }
}

@media (prefers-reduced-motion: reduce) {
    .proc-module .list-stat:hover,
    .proc-module .rfq-stat:hover { transform: none; }
}
