/*
 * Vendor Portal — shared admin styles.
 * Extracted from screen-settings-*.html mockups.
 */
:root {
    --navy: #0A1628;
    --navy2: #1D3461;
    --gold: #B8942E;
    --gold-l: #C9A84C;
    --gold-bg: #FBF5E6;
    --bg: #F7F9FC;
    --bg2: #EEF3FA;
    --border: #DDE5F0;
    --text: #0A1628;
    --muted: #4A5E7A;
    --subtle: #8A9BBC;
    --green: #0E6E4A;
    --green-bg: #E6F5ED;
    --green-b: rgba(14, 110, 74, .2);
    --blue: #1565C0;
    --blue-bg: #EBF3FF;
    --blue-b: rgba(21, 101, 192, .2);
    --red: #B91C1C;
    --red-bg: #FEF2F2;
    --orange: #C2410C;
    --orange-bg: #FFF7ED;
    --orange-b: rgba(194, 65, 12, .2);
    --r: 14px;
    --tr: all .22s cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Tajawal', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; display: flex; flex-direction: column; }
input, button, select, textarea { font-family: 'Tajawal', sans-serif; }
a { color: inherit; text-decoration: none; }

.dev-toolbar { background: var(--navy); border-bottom: 2px solid var(--gold-l); padding: 8px 20px; display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 200; }
.dt-badge { padding: 3px 10px; border-radius: 6px; font-size: 11px; font-weight: 800; font-family: 'IBM Plex Mono'; background: rgba(109, 40, 217, .3); color: #C4B5FD; border: 1px solid rgba(109, 40, 217, .4); }
.dt-title { font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, .7); }
.dt-sep { width: 1px; height: 18px; background: rgba(255, 255, 255, .15); }
.dt-btns { display: flex; gap: 8px; margin-right: auto; }
.dt-btn { padding: 6px 16px; border-radius: 8px; font-size: 12px; font-weight: 800; cursor: pointer; border: none; }
.btn-help { background: rgba(21, 101, 192, .3); color: #93C5FD; border: 1px solid rgba(21, 101, 192, .4); }
.btn-screens { background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .6); border: 1px solid rgba(255, 255, 255, .15); }

.layout { display: flex; min-height: calc(100vh - 46px); }
.sidebar { width: 230px; background: var(--navy); flex-shrink: 0; position: sticky; top: 46px; height: calc(100vh - 46px); overflow-y: auto; display: flex; flex-direction: column; }
.sb-logo { padding: 18px 16px 12px; border-bottom: 1px solid rgba(255, 255, 255, .08); display: flex; align-items: center; gap: 10px; }
.sb-logo-ico { width: 38px; height: 38px; border-radius: 11px; background: var(--gold-l); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.sb-logo-name { font-size: 14px; font-weight: 800; color: #fff; }
.sb-logo-role { font-size: 10px; color: rgba(255, 255, 255, .4); font-weight: 600; }
.sb-nav { padding: 12px 10px; flex: 1; overflow-y: auto; }
.sb-section { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: rgba(255, 255, 255, .25); padding: 8px 8px 5px; margin-top: 8px; }
.sb-item { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .55); cursor: pointer; transition: var(--tr); }
.sb-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.sb-item.active { background: rgba(255, 255, 255, .12); color: #fff; font-weight: 700; }
.sb-item .si-ico { font-size: 17px; }
.sb-bottom { padding: 12px 10px; border-top: 1px solid rgba(255, 255, 255, .08); }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 10px; background: rgba(255, 255, 255, .06); border-radius: 10px; }
.sb-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--gold-l); color: var(--navy); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 900; }
.sb-uname { font-size: 13px; font-weight: 700; color: #fff; }
.sb-uemail { font-size: 10px; color: rgba(255, 255, 255, .35); }

.main { flex: 1; display: flex; flex-direction: column; }
.topbar { background: #fff; border-bottom: 1px solid var(--border); padding: 14px 24px; display: flex; align-items: center; gap: 14px; }
.tb-title { font-size: 18px; font-weight: 900; color: var(--navy); flex: 1; }
.tb-sub { font-size: 13px; color: var(--muted); }
.btn { padding: 10px 20px; border-radius: 10px; font-size: 13px; font-weight: 800; cursor: pointer; border: none; display: inline-flex; align-items: center; gap: 6px; transition: var(--tr); text-decoration: none; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy2); }
.btn-secondary { background: #fff; color: var(--navy); border: 1.5px solid var(--border); }
.btn-success { background: var(--green); color: #fff; }
.btn-danger { background: var(--red); color: #fff; }
.btn-ghost-danger { background: #fff; color: var(--red); border: 1.5px solid rgba(185, 28, 28, .3); }
.content { padding: 24px; overflow-y: auto; flex: 1; }

/* SETTINGS NAV */
.set-grid { display: grid; grid-template-columns: 240px 1fr; gap: 20px; }
.set-nav { background: #fff; border: 1.5px solid var(--border); border-radius: var(--r); padding: 10px; height: fit-content; position: sticky; top: 90px; }
.set-nav-item { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 9px; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; transition: var(--tr); }
.set-nav-item:hover { background: var(--bg); color: var(--navy); }
.set-nav-item.active { background: var(--blue-bg); color: var(--blue); }
.set-nav-item.active::before { content: ''; width: 3px; height: 18px; background: var(--blue); border-radius: 2px; margin-left: -12px; margin-right: -2px; }

.card { background: #fff; border: 1.5px solid var(--border); border-radius: var(--r); overflow: hidden; margin-bottom: 16px; }
.card-head { padding: 14px 18px; background: var(--bg); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.ch-ico { font-size: 18px; }
.ch-title { font-size: 14px; font-weight: 900; color: var(--navy); flex: 1; }
.ch-meta { font-size: 11px; color: var(--muted); font-weight: 700; }
.card-body { padding: 20px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid.cols3 { grid-template-columns: 1fr 1fr 1fr; }
.fg { display: flex; flex-direction: column; gap: 6px; }
.fg.full { grid-column: 1/-1; }
.fg-label { font-size: 12px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 5px; }
.fg-req { color: var(--red); font-weight: 900; }
.fg-input, .fg-select, .fg-area { padding: 10px 13px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 13px; background: #fff; outline: none; color: var(--text); width: 100%; }
.fg-input:focus, .fg-select:focus, .fg-area:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-bg); }
.fg-input:disabled { background: var(--bg2); color: var(--muted); }
.fg-area { resize: vertical; min-height: 80px; }
.fg-hint { font-size: 11px; color: var(--muted); }
.fg-error { font-size: 11px; color: var(--red); font-weight: 700; }

.actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding: 18px; border-top: 1px solid var(--border); background: var(--bg); border-radius: 0 0 var(--r) var(--r); }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); padding: 11px 22px; border-radius: 11px; font-size: 13px; font-weight: 700; z-index: 999; display: flex; gap: 8px; align-items: center; box-shadow: 0 8px 36px rgba(10, 22, 40, .18); }
.t-success { background: var(--green); color: #fff; }
.t-info { background: var(--navy); color: #fff; }
.t-error { background: var(--red); color: #fff; }

/* TABLES */
.table-wrap { background: #fff; border: 1.5px solid var(--border); border-radius: var(--r); overflow: hidden; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 12px 14px; text-align: right; border-bottom: 1px solid var(--border); }
.table th { background: var(--bg); font-weight: 800; color: var(--navy); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.table tbody tr:hover { background: var(--bg); }
.table tbody tr:last-child td { border-bottom: none; }
.row-actions { display: inline-flex; gap: 6px; }
.row-actions .btn { padding: 6px 10px; font-size: 11px; }

/* BADGES */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.badge-active { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-b); }
.badge-inactive { background: var(--red-bg); color: var(--red); }
.badge-warning { background: var(--orange-bg); color: var(--orange); border: 1px solid var(--orange-b); }
.badge-info { background: var(--blue-bg); color: var(--blue); border: 1px solid var(--blue-b); }

/* APPROVAL WORKFLOW BADGES (S-06) — short-prefix variants used in the
   approvals mockup. Reuse `.badge` for base shape. */
.b-green { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-b); }
.b-blue { background: var(--blue-bg); color: var(--blue); border: 1px solid var(--blue-b); }
.b-orange { background: var(--orange-bg); color: var(--orange); border: 1px solid var(--orange-b); }
.b-red { background: var(--red-bg); color: var(--red); border: 1px solid rgba(185, 28, 28, .2); }
.b-gray { background: var(--bg2); color: var(--muted); border: 1px solid var(--border); }
.b-purple { background: rgba(109, 40, 217, .12); color: #6D28D9; border: 1px solid rgba(109, 40, 217, .2); }

/* APPROVAL WORKFLOW — stage flow (S-06 mockup) */
.flow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.flow-stage { padding: 10px 16px; border-radius: 10px; text-align: center; min-width: 130px; border: 1px solid var(--border); background: var(--bg2); }
.flow-stage.fs-current { background: var(--blue-bg); border-color: var(--blue-b); }
.flow-stage.fs-done { background: var(--green-bg); border-color: var(--green-b); }
.flow-stage.fs-pending { background: var(--bg2); border-color: var(--border); opacity: .7; }
.fs-num { font-size: 12px; font-weight: 800; color: var(--navy); }
.fs-name { font-size: 13px; font-weight: 700; margin: 4px 0; color: var(--navy); }
.fs-thr { font-size: 10px; color: var(--muted); }
.flow-arrow { font-size: 20px; color: var(--subtle); }

/* APPROVAL — pending widget for sidebar / dashboard */
.sb-badge { background: var(--red); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 10px; font-weight: 800; margin-right: auto; }

/* APPROVAL — request detail panel */
.appr-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 22px; padding: 16px 18px; }
.appr-meta-label { font-size: 11px; color: var(--muted); font-weight: 700; }
.appr-meta-value { font-size: 14px; font-weight: 700; color: var(--navy); margin-top: 2px; }
.appr-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.timeline { padding: 6px 18px 18px; }
.timeline-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.timeline-item:last-child { border-bottom: none; }
.timeline-dot { width: 28px; height: 28px; border-radius: 50%; background: var(--bg2); color: var(--navy); display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.timeline-dot.td-approve { background: var(--green-bg); color: var(--green); }
.timeline-dot.td-reject { background: var(--red-bg); color: var(--red); }
.timeline-dot.td-changes { background: var(--orange-bg); color: var(--orange); }
.timeline-dot.td-cancel { background: var(--bg2); color: var(--muted); }
.timeline-body { flex: 1; font-size: 13px; }
.timeline-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* SUMMARY KPI ROW */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi { background: #fff; border: 1.5px solid var(--border); border-radius: var(--r); padding: 14px 16px; }
.kpi-label { font-size: 12px; color: var(--muted); font-weight: 700; }
.kpi-value { font-size: 24px; font-weight: 900; color: var(--navy); margin-top: 4px; }
.kpi-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* TREE for categories */
.tree-node { padding: 8px 12px; border-radius: 9px; display: flex; align-items: center; gap: 10px; transition: var(--tr); }
.tree-node:hover { background: var(--bg); }
.tree-node-icon { width: 30px; height: 30px; border-radius: 9px; background: var(--blue-bg); color: var(--blue); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.tree-name { flex: 1; font-size: 13px; font-weight: 700; color: var(--navy); }
.tree-meta { font-size: 11px; color: var(--muted); font-weight: 700; }
.tree-children { padding-right: 30px; border-right: 2px dashed var(--border); margin-right: 14px; margin-top: 4px; }

/* ------------------------------------------------------------------ */
/* VENDOR REGISTRATION WIZARD (V-01) — extracted from screen-vendor-register.html */
/* ------------------------------------------------------------------ */
.page-header { background: var(--navy); padding: 32px 28px; display: flex; align-items: center; gap: 20px; }
.page-header h1 { font-size: 22px; font-weight: 900; color: #fff; margin-bottom: 4px; }
.page-header p { font-size: 14px; color: rgba(255, 255, 255, .45); }
.ph-info h1 { color: #fff; font-size: 22px; font-weight: 900; margin-bottom: 3px; }
.ph-steps { display: flex; align-items: center; gap: 0; margin-right: auto; }
.ph-step { display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; }
.ph-step-circle { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 900; border: 2px solid rgba(255, 255, 255, .2); color: rgba(255, 255, 255, .4); transition: var(--tr); }
.ph-step.active .ph-step-circle { border-color: var(--gold-l); background: var(--gold-l); color: var(--navy); }
.ph-step.done .ph-step-circle { border-color: var(--green); background: var(--green); color: #fff; }
.ph-step-label { font-size: 10px; color: rgba(255, 255, 255, .35); font-weight: 700; white-space: nowrap; }
.ph-step.active .ph-step-label { color: var(--gold-l); }
.ph-step.done .ph-step-label { color: rgba(255, 255, 255, .6); }
.ph-line { width: 44px; height: 2px; background: rgba(255, 255, 255, .1); margin-bottom: 14px; transition: var(--tr); }
.ph-line.done { background: var(--green); }

.main-content { max-width: 820px; margin: 0 auto; padding: 32px 28px; flex: 1; }

.form-card { background: #fff; border: 1.5px solid var(--border); border-radius: 20px; overflow: hidden; margin-bottom: 20px; }
.fc-header { background: var(--bg); padding: 16px 22px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); }
.fch-ico { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.fch-title { font-size: 15px; font-weight: 800; color: var(--text); }
.fch-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.fch-badge { margin-right: auto; font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 20px; }
.fc-body { padding: 22px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1/-1; }
.form-input, .form-select, .form-textarea { padding: 10px 13px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 14px; color: var(--text); background: #fff; outline: none; transition: var(--tr); width: 100%; font-family: 'Tajawal', sans-serif; }
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(10, 22, 40, .07); }
.form-input.error { border-color: var(--red); }
.form-textarea { min-height: 90px; resize: vertical; }
.error-hint { font-size: 11px; color: var(--red); margin-top: 2px; font-weight: 700; }

.upload-zone { border: 2px dashed var(--border); border-radius: 12px; padding: 24px; text-align: center; cursor: pointer; transition: var(--tr); background: var(--bg); }
.upload-zone:hover, .upload-zone.dragover { border-color: var(--navy); background: var(--bg2); }
.uz-ico { font-size: 32px; margin-bottom: 8px; }
.uz-title { font-size: 14px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.uz-sub { font-size: 12px; color: var(--muted); }
.uz-formats { font-size: 11px; color: var(--subtle); margin-top: 6px; }
.uploaded-files { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.uf-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--green-bg); border: 1px solid var(--green-b); border-radius: 8px; }
.uf-ico { font-size: 18px; flex-shrink: 0; }
.uf-name { font-size: 13px; font-weight: 700; color: var(--green); flex: 1; }
.uf-size { font-size: 11px; color: var(--muted); }

.categories-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cat-item { border: 1.5px solid var(--border); border-radius: 10px; padding: 10px; cursor: pointer; transition: var(--tr); text-align: center; }
.cat-item:hover { border-color: var(--navy2); background: var(--bg2); }
.cat-item.selected { border-color: var(--navy); background: var(--navy); color: #fff; }
.cat-item.selected .ci-label { color: #fff; }
.ci-ico { font-size: 20px; margin-bottom: 4px; }
.ci-label { font-size: 12px; font-weight: 700; color: var(--navy); }

.bottom-bar { background: #fff; border-top: 2px solid var(--border); padding: 16px 28px; display: flex; align-items: center; justify-content: space-between; position: sticky; bottom: 0; box-shadow: 0 -4px 20px rgba(10, 22, 40, .06); z-index: 10; }
.bb-progress { flex: 1; max-width: 260px; }
.bbp-label { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; display: flex; justify-content: space-between; }
.bbp-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.bbp-fill { height: 100%; background: linear-gradient(90deg, var(--navy), var(--navy2)); border-radius: 3px; transition: width .4s ease; }
.bb-btns { display: flex; gap: 10px; }
.btn-back { padding: 11px 22px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer; background: #fff; color: var(--muted); }
.btn-next { padding: 11px 28px; background: var(--navy); color: #fff; border: none; border-radius: 10px; font-size: 14px; font-weight: 800; cursor: pointer; }
.btn-submit { padding: 11px 28px; background: var(--green); color: #fff; border: none; border-radius: 10px; font-size: 14px; font-weight: 800; cursor: pointer; }
.success-screen { text-align: center; padding: 60px 20px; }

/* ------------------------------------------------------------------ */
/* VENDOR PROFILE (V-02) */
/* ------------------------------------------------------------------ */
.profile-hero { background: linear-gradient(135deg, var(--navy), var(--navy2)); border-radius: var(--r); padding: 22px; display: flex; align-items: center; gap: 18px; color: #fff; margin-bottom: 16px; }
.ph-logo { width: 64px; height: 64px; border-radius: 16px; background: var(--gold-l); color: var(--navy); display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 900; flex-shrink: 0; }
.ph-name { font-size: 19px; font-weight: 900; margin-bottom: 4px; }
.ph-meta { display: flex; gap: 16px; font-size: 12px; color: rgba(255, 255, 255, .65); flex-wrap: wrap; }
.ph-status { margin-right: auto; text-align: left; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.ph-badge { background: var(--green); padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 800; }
.ph-badge.pending { background: var(--orange); }
.ph-badge.suspended { background: var(--red); }
.ph-badge.rejected { background: var(--red); }
.ph-badge.blacklisted { background: #1a1a1a; }
.ph-tier { background: var(--gold); padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 800; }

.alert { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: var(--r); margin-bottom: 14px; font-size: 13px; }
.alert-warn { background: var(--orange-bg); border: 1px solid var(--orange-b); color: var(--orange); }
.alert-info { background: var(--blue-bg); border: 1px solid var(--blue-b); color: var(--blue); }
.alert-ico { font-size: 18px; flex-shrink: 0; }
.alert-btn { margin-right: auto; padding: 6px 14px; background: #fff; border: 1px solid currentColor; border-radius: 8px; font-size: 12px; font-weight: 800; cursor: pointer; color: inherit; }

.tabs { background: #fff; border: 1.5px solid var(--border); border-radius: var(--r); overflow: hidden; }
.tabs-head { display: flex; border-bottom: 1px solid var(--border); background: var(--bg); overflow-x: auto; }
.tab { padding: 13px 18px; font-size: 13px; font-weight: 700; cursor: pointer; color: var(--muted); border: none; background: none; border-bottom: 3px solid transparent; white-space: nowrap; transition: var(--tr); font-family: 'Tajawal', sans-serif; display: inline-flex; align-items: center; gap: 6px; }
.tab.active { color: var(--navy); border-bottom-color: var(--navy); background: #fff; }
.tab-badge { background: var(--red); color: #fff; padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.tab-panel { padding: 22px; display: none; }
.tab-panel.active { display: block; }
.section-title { font-size: 14px; font-weight: 800; color: var(--navy); margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }

/* ------------------------------------------------------------------ */
/* ADMIN VENDORS LIST + DETAIL + EVAL (A-02 / A-03 / A-12) */
/* ------------------------------------------------------------------ */
.vendor-row-name { display: flex; align-items: center; gap: 10px; }
.vendor-avatar { width: 36px; height: 36px; border-radius: 10px; background: var(--bg2); color: var(--navy); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 900; flex-shrink: 0; }
.tier-pill { padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.tier-A { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-b); }
.tier-B { background: var(--blue-bg); color: var(--blue); border: 1px solid var(--blue-b); }
.tier-C { background: var(--bg2); color: var(--muted); border: 1px solid var(--border); }

.criterion-row { background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--r); padding: 16px 18px; margin-bottom: 12px; }
.cr-top { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.cr-ico { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.cr-info { flex: 1; }
.cr-title { font-size: 14px; font-weight: 800; color: var(--navy); margin-bottom: 3px; }
.cr-desc { font-size: 12px; color: var(--muted); }
.cr-weight { background: var(--bg2); padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; color: var(--navy); }
.cr-scoring { display: flex; gap: 12px; align-items: center; }
.score-options { display: flex; gap: 6px; flex: 1; flex-wrap: wrap; }
.score-opt { padding: 7px 13px; border: 1.5px solid var(--border); border-radius: 9px; font-size: 12px; font-weight: 700; cursor: pointer; background: #fff; color: var(--muted); transition: var(--tr); }
.score-opt:hover { border-color: var(--navy2); }
.score-opt.selected { background: var(--navy); color: #fff; border-color: var(--navy); }
.cr-score-display { font-size: 20px; font-weight: 900; min-width: 48px; text-align: center; color: var(--navy); }

.tier-predict { display: flex; gap: 10px; margin-bottom: 16px; }
.tp-item { flex: 1; border: 1.5px solid var(--border); border-radius: var(--r); padding: 14px 10px; text-align: center; background: #fff; transition: var(--tr); }
.tp-item.active { background: var(--navy); color: #fff; border-color: var(--navy); transform: translateY(-2px); }
.tp-tier { font-size: 22px; font-weight: 900; }
.tp-range { font-size: 10px; color: var(--muted); font-weight: 700; margin-top: 2px; }
.tp-item.active .tp-range { color: rgba(255, 255, 255, .7); }

@media (max-width: 900px) { .set-grid { grid-template-columns: 1fr; } .set-nav { position: static; } }
@media (max-width: 768px) { .sidebar { display: none; } .form-grid, .form-grid.cols3, .categories-grid { grid-template-columns: 1fr; } .ph-steps { display: none; } }

/* ------------------------------------------------------------------ */
/* TENDERS — list (A-05) + create (A-04)                              */
/* ------------------------------------------------------------------ */
.status-tabs { display: flex; gap: 0; background: #fff; border: 1.5px solid var(--border); border-radius: var(--r); overflow: hidden; margin-bottom: 18px; }
.stab { flex: 1; padding: 14px 8px; text-align: center; cursor: pointer; transition: var(--tr); border-left: 1px solid var(--border); position: relative; color: inherit; text-decoration: none; }
.stab:first-child { border-left: none; }
.stab:hover { background: var(--bg2); }
.stab.active { background: var(--navy); }
.stab-val { font-size: 22px; font-weight: 900; font-family: 'IBM Plex Mono'; margin-bottom: 3px; color: var(--navy); }
.stab-label { font-size: 11px; font-weight: 700; color: var(--muted); }
.stab.active .stab-val, .stab.active .stab-label { color: #fff; }
.stab-dot { width: 8px; height: 8px; border-radius: 50%; margin: 0 auto 6px; }

.filter-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.search-wrap { flex: 1; min-width: 220px; position: relative; }
.search-ico { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 15px; color: var(--subtle); }
.search-input { width: 100%; padding: 9px 38px 9px 12px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 14px; font-family: 'Tajawal'; outline: none; background: #fff; }
.search-input:focus { border-color: var(--navy); }
.flt-select { padding: 9px 12px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 13px; font-family: 'Tajawal'; background: #fff; outline: none; cursor: pointer; }
.result-info { font-size: 13px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.new-btn { padding: 9px 18px; background: var(--navy); color: #fff; border: none; border-radius: 10px; font-size: 13px; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; text-decoration: none; }
.new-btn:hover { background: var(--navy2); }

.tenders-grid { display: flex; flex-direction: column; gap: 12px; }
.tender-card { background: #fff; border: 1.5px solid var(--border); border-radius: var(--r); overflow: hidden; transition: var(--tr); }
.tender-card:hover { box-shadow: 0 8px 36px rgba(10, 22, 40, .14); }
.tender-card.hidden { display: none; }
.status-bar { height: 4px; }
.sb-draft { background: var(--subtle); }
.sb-pending_approval { background: linear-gradient(90deg, var(--orange), #D97706); }
.sb-published { background: linear-gradient(90deg, var(--blue), #1976D2); }
.sb-evaluation, .sb-under_evaluation { background: linear-gradient(90deg, #6D28D9, #7C3AED); }
.sb-awarded { background: linear-gradient(90deg, var(--green), #0A8A55); }
.sb-cancelled { background: var(--red); }
.sb-closed { background: var(--orange); }

.tc-body { padding: 18px 20px; }
.tc-row1 { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 10px; }
.tc-ico { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; background: var(--bg2); }
.tc-info { flex: 1; }
.tc-header { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 5px; }
.tc-title { font-size: 15px; font-weight: 800; color: var(--navy); flex: 1; line-height: 1.3; }
.status-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 11px; border-radius: 20px; font-size: 11px; font-weight: 800; flex-shrink: 0; white-space: nowrap; }
.sb-s-draft { background: var(--bg2); color: var(--muted); border: 1px solid var(--border); }
.sb-s-pending_approval { background: var(--orange-bg); color: var(--orange); border: 1px solid var(--orange-b); }
.sb-s-published { background: var(--blue-bg); color: var(--blue); border: 1px solid var(--blue-b); }
.sb-s-under_evaluation { background: rgba(109, 40, 217, .12); color: #6D28D9; border: 1px solid rgba(109, 40, 217, .2); }
.sb-s-awarded { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-b); }
.sb-s-cancelled { background: var(--red-bg); color: var(--red); border: 1px solid rgba(185, 28, 28, .2); }
.sb-s-closed { background: var(--orange-bg); color: var(--orange); border: 1px solid var(--orange-b); }

.tc-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.tm-item { display: flex; align-items: center; gap: 4px; }
.tc-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 12px; padding: 12px; background: var(--bg); border-radius: 10px; }
.tcs-item { text-align: center; }
.tcs-val { font-size: 14px; font-weight: 900; font-family: 'IBM Plex Mono'; margin-bottom: 2px; color: var(--navy); }
.tcs-label { font-size: 10px; color: var(--muted); font-weight: 700; }
.tc-actions { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.act-btn { padding: 6px 13px; border-radius: 8px; font-size: 12px; font-weight: 700; border: none; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; text-decoration: none; }
.ab-primary { background: var(--navy); color: #fff; }
.ab-primary:hover { background: var(--navy2); }
.ab-blue { background: var(--blue-bg); color: var(--blue); border: 1px solid var(--blue-b); }
.ab-green { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-b); }
.ab-purple { background: rgba(109, 40, 217, .12); color: #6D28D9; border: 1px solid rgba(109, 40, 217, .2); }
.ab-red { background: var(--red-bg); color: var(--red); border: 1px solid rgba(185, 28, 28, .2); }
.ab-outline { background: #fff; border: 1.5px solid var(--border); color: var(--muted); }

/* CREATE TENDER — A-04 */
.steps-header { background: var(--navy); padding: 20px 24px; display: flex; align-items: center; gap: 0; border-radius: var(--r); margin-bottom: 16px; }
.step-item { display: flex; align-items: center; gap: 0; flex: 1; }
.step-circle { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .2); color: rgba(255, 255, 255, .4); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 900; flex-shrink: 0; transition: var(--tr); }
.step-circle.active { border-color: var(--gold-l); background: var(--gold-l); color: var(--navy); }
.step-circle.done { border-color: var(--green); background: var(--green); color: #fff; }
.step-label { font-size: 11px; color: rgba(255, 255, 255, .35); margin-right: 8px; font-weight: 700; line-height: 1.3; }
.step-label.active { color: var(--gold-l); }
.step-label.done { color: rgba(255, 255, 255, .6); }
.step-line { flex: 1; height: 2px; background: rgba(255, 255, 255, .1); margin: 0 6px; transition: var(--tr); }
.step-line.done { background: var(--green); }

.form-section { background: #fff; border: 1.5px solid var(--border); border-radius: var(--r); overflow: hidden; margin-bottom: 16px; }
.fs-head { padding: 13px 18px; background: var(--bg); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.fsh-ico { font-size: 18px; }
.fsh-title { font-size: 14px; font-weight: 800; color: var(--text); flex: 1; }
.fsh-badge { font-size: 10px; font-weight: 800; padding: 3px 10px; border-radius: 20px; background: var(--blue-bg); color: var(--blue); border: 1px solid var(--blue-b); }
.fs-body { padding: 20px; }

.criteria-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.criteria-table th { background: var(--navy); color: #fff; padding: 9px 12px; text-align: right; font-weight: 700; font-size: 12px; }
.criteria-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.criteria-table tr:last-child td { border-bottom: none; }
.crit-input { width: 90px; padding: 6px 8px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 13px; text-align: center; outline: none; font-family: 'IBM Plex Mono'; }
.crit-input:focus { border-color: var(--navy); }
.total-display { font-size: 14px; font-weight: 900; font-family: 'IBM Plex Mono'; padding: 6px 12px; border-radius: 8px; display: inline-block; }
.total-ok { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-b); }
.total-err { background: var(--red-bg); color: var(--red); border: 1px solid rgba(185, 28, 28, .2); }

.preview-card { background: #fff; border: 1.5px solid var(--border); border-radius: var(--r); overflow: hidden; position: sticky; top: 90px; }
.pc-head { padding: 12px 16px; background: var(--navy); font-size: 13px; font-weight: 800; color: #fff; display: flex; align-items: center; gap: 8px; }
.pc-body { padding: 16px; }
.pr-row { display: flex; gap: 6px; margin-bottom: 8px; font-size: 13px; }
.prr-label { color: var(--muted); font-weight: 600; width: 90px; flex-shrink: 0; }
.prr-val { color: var(--text); font-weight: 700; flex: 1; }
.pr-divider { height: 1px; background: var(--border); margin: 10px 0; }

.publish-checklist { background: var(--bg); border-radius: var(--r); padding: 14px; margin-top: 14px; }
.pclh { font-size: 12px; font-weight: 800; color: var(--navy); margin-bottom: 10px; }
.pcl-item { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-bottom: 6px; }
.pcl-ico { font-size: 14px; flex-shrink: 0; }
.pcl-label { flex: 1; color: var(--muted); }
.pcl-item.ok .pcl-label { color: var(--green); }
.pcl-item.err .pcl-label { color: var(--red); }

.tender-create-grid { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }

/* ------------------------------------------------------------------ */
/* SPRINT 8 — BIDS (V-05) + VENDOR Q&A (V-09) + ADMIN Q&A (A-QNA)    */
/* ------------------------------------------------------------------ */

/* BID SUBMISSION — V-05 */
.tender-info-card { background: var(--navy); border-radius: var(--r); padding: 18px 20px; margin-bottom: 16px; }
.tic-num { font-size: 11px; font-weight: 800; color: var(--gold-l); font-family: IBM Plex Mono; margin-bottom: 6px; }
.tic-title { font-size: 16px; font-weight: 800; color: #fff; margin-bottom: 8px; line-height: 1.3; }
.tic-meta { display: flex; gap: 14px; flex-wrap: wrap; }
.tim-item { font-size: 12px; color: rgba(255,255,255,.65); display: flex; align-items: center; gap: 4px; }
.tim-val { font-weight: 800; color: #fff; }
.amount-wrap { display: flex; align-items: center; border: 1.5px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.amount-currency { padding: 10px 14px; background: var(--bg2); border-right: 1px solid var(--border); font-size: 13px; font-weight: 800; color: var(--muted); flex-shrink: 0; }
.amount-input { flex: 1; padding: 10px 14px; border: none; outline: none; font-size: 16px; font-weight: 900; font-family: IBM Plex Mono; color: var(--navy); background: transparent; }
.amount-words { font-size: 12px; color: var(--blue); margin-top: 6px; font-weight: 600; min-height: 18px; }
.amount-hint { font-size: 11px; color: var(--muted); margin-top: 4px; }
.scoring-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.scoring-table th { background: var(--bg2); padding: 9px 12px; text-align: right; font-weight: 700; font-size: 11px; color: var(--muted); border-bottom: 1px solid var(--border); }
.scoring-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.scoring-table tr:last-child td { border-bottom: none; }
.score-bar-wrap { width: 120px; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 8px; }
.score-bar { height: 100%; border-radius: 4px; transition: width .4s; }
.score-pct { font-size: 12px; font-weight: 800; font-family: IBM Plex Mono; color: var(--navy); }
.upload-zone { border: 2px dashed var(--border); border-radius: 12px; padding: 24px; text-align: center; cursor: pointer; transition: var(--tr); background: var(--bg); }
.upload-zone:hover, .upload-zone.dragover { border-color: var(--navy); background: var(--bg2); }
.uz-ico { font-size: 32px; margin-bottom: 8px; }
.uz-title { font-size: 14px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.uz-sub { font-size: 12px; color: var(--muted); }
.uploaded-files { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.uf-item { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.uf-ico { font-size: 18px; flex-shrink: 0; }
.uf-name { flex: 1; font-weight: 600; color: var(--navy); }
.uf-size { font-size: 11px; color: var(--muted); font-family: IBM Plex Mono; }
.confirm-check { background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--r); padding: 14px 16px; margin-bottom: 8px; display: flex; gap: 12px; align-items: flex-start; cursor: pointer; transition: var(--tr); }
.confirm-check input[type=checkbox] { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: var(--navy); cursor: pointer; }
.confirm-check label { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.5; cursor: pointer; }
.confirm-check.checked { border-color: var(--green); background: var(--green-bg); }
.confirm-check.checked label { color: var(--green); }
.submit-btn { width: 100%; padding: 15px; background: var(--navy); color: #fff; border: none; border-radius: 12px; font-size: 15px; font-weight: 900; cursor: pointer; font-family: Tajawal; display: flex; align-items: center; justify-content: center; gap: 8px; transition: var(--tr); }
.submit-btn:hover:not([disabled]) { background: var(--navy2); transform: translateY(-1px); }
.submit-btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }
.right-panel { position: sticky; top: 90px; }
.rp-card { background: #fff; border: 1.5px solid var(--border); border-radius: var(--r); overflow: hidden; margin-bottom: 14px; }
.rpc-head { padding: 12px 16px; background: var(--navy); color: #fff; font-size: 13px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.rpc-body { padding: 14px 16px; }
.summary-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.summary-row:last-child { border-bottom: none; }
.sr-label { color: var(--muted); font-weight: 600; }
.sr-val { font-weight: 800; color: var(--navy); font-family: IBM Plex Mono; }
.cl-item { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.cl-item:last-child { border-bottom: none; }
.cl-ico { font-size: 16px; flex-shrink: 0; }
.cl-label { flex: 1; color: var(--text); font-weight: 600; }
.cl-status { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 20px; }
.cs-ok { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-b); }
.cs-warn { background: var(--orange-bg); color: var(--orange); border: 1px solid var(--orange-b); }
.cs-req { background: var(--red-bg); color: var(--red); border: 1px solid rgba(185,28,28,.2); }
.clar-item { padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 12px; }
.clar-item:last-child { border-bottom: none; }
.clar-q { font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.clar-a { color: var(--muted); margin-bottom: 3px; }
.clar-date { color: var(--subtle); font-size: 11px; }

/* VENDOR Q&A — V-09 */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.kpi { background: #fff; border: 1.5px solid var(--border); border-radius: var(--r); padding: 16px; text-align: center; }
.kpi-val { font-size: 28px; font-weight: 900; font-family: IBM Plex Mono; margin-bottom: 4px; }
.kpi-lbl { font-size: 12px; color: var(--muted); font-weight: 700; }
.card { background: #fff; border: 1.5px solid var(--border); border-radius: var(--r); overflow: hidden; margin-bottom: 16px; }
.card-head { padding: 14px 18px; background: var(--bg); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.ch-title { font-size: 15px; font-weight: 800; color: var(--navy); }
.card-body { padding: 18px; }
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 800; }
.b-green { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-b); }
.b-orange { background: var(--orange-bg); color: var(--orange); border: 1px solid var(--orange-b); }
.b-blue { background: var(--blue-bg); color: var(--blue); border: 1px solid var(--blue-b); }
.b-red { background: var(--red-bg); color: var(--red); border: 1px solid rgba(185,28,28,.2); }
.b-gray { background: var(--bg2); color: var(--muted); border: 1px solid var(--border); }

/* ADMIN Q&A — A-QNA */
.qna-admin-grid { display: grid; grid-template-columns: 1fr 300px; gap: 18px; align-items: start; }
.tender-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.tender-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; border: 1.5px solid var(--border); border-radius: 10px; cursor: pointer; transition: var(--tr); text-decoration: none; color: inherit; }
.tender-item:hover { border-color: var(--navy); background: var(--bg2); }
.tender-item.active { border-color: var(--navy); background: var(--navy); color: #fff; }
.ti-ico { font-size: 20px; flex-shrink: 0; }
.ti-info { flex: 1; min-width: 0; }
.ti-num { font-size: 10px; font-family: IBM Plex Mono; font-weight: 800; color: var(--muted); }
.tender-item.active .ti-num { color: rgba(255,255,255,.6); }
.ti-title { font-size: 13px; font-weight: 800; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tender-item.active .ti-title { color: #fff; }
.ti-badge { font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 20px; flex-shrink: 0; }
.tb-unans { background: var(--orange-bg); color: var(--orange); border: 1px solid var(--orange-b); }
.tb-all-ans { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-b); }
.qna-section { background: #fff; border: 1.5px solid var(--border); border-radius: var(--r); overflow: hidden; }
.qnas-head { padding: 13px 18px; background: var(--bg); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qnash-title { font-size: 14px; font-weight: 800; color: var(--navy); flex: 1; }
.qnash-badge { font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 20px; }
.qnas-body { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.q-card { border: 1.5px solid var(--border); border-radius: 10px; overflow: hidden; transition: var(--tr); }
.q-card:hover { border-color: var(--navy2); }
.q-header { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; background: #fff; }
.q-header.expanded { background: var(--bg); }
.q-num { font-size: 11px; font-weight: 900; padding: 4px 10px; border-radius: 20px; font-family: IBM Plex Mono; flex-shrink: 0; }
.qn-unans { background: var(--orange-bg); color: var(--orange); border: 1px solid var(--orange-b); }
.qn-ans { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-b); }
.qn-priv { background: var(--blue-bg); color: var(--blue); border: 1px solid var(--blue-b); }
.q-body-text { flex: 1; min-width: 0; }
.q-text { font-size: 13px; font-weight: 700; color: var(--navy); }
.q-meta { font-size: 11px; color: var(--muted); margin-top: 3px; }
.q-toggle { color: var(--muted); font-size: 14px; transition: transform .2s; flex-shrink: 0; display: inline-block; }
.q-toggle.open { transform: rotate(180deg); }
.q-expand { display: none; background: var(--bg); border-top: 1px solid var(--border); }
.q-expand.show { display: block; }
.reply-form { padding: 14px; }
.rf-label { font-size: 12px; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.rf-textarea { width: 100%; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 13px; font-family: Tajawal; resize: vertical; min-height: 80px; outline: none; }
.rf-textarea:focus { border-color: var(--navy); }
.rf-options { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.rf-public { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); cursor: pointer; }
.rf-public input { accent-color: var(--green); }
.rf-btn { padding: 7px 16px; border: none; border-radius: 8px; font-size: 12px; font-weight: 800; cursor: pointer; font-family: Tajawal; background: var(--navy); color: #fff; }
.rf-btn:hover { background: var(--navy2); }
.rf-broadcast { background: var(--green) !important; }
.rf-broadcast:hover { background: #0b5f3f !important; }
.answer-box { padding: 12px 14px; }
.ab-label { font-size: 10px; font-weight: 800; color: var(--muted); text-transform: uppercase; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.ab-text { font-size: 13px; color: var(--text); line-height: 1.6; }
.ab-public { background: var(--green-bg); border: 1px solid var(--green-b); border-radius: 8px; padding: 8px 12px; }
.ab-public .ab-text { color: var(--green); }
.stat-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.stat-row:last-child { border-bottom: none; }
.sr-lbl { color: var(--muted); }
@media (max-width: 900px) { .qna-admin-grid { grid-template-columns: 1fr; } .kpi-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 1024px) { .tender-create-grid { grid-template-columns: 1fr; } .preview-card { position: static; } }

/* ============================================================
   Sprint 9 — Bid Opening, Evaluation, Award
   ============================================================ */
.session-header{background:linear-gradient(135deg,var(--navy),var(--navy2));padding:22px 28px;border-bottom:2px solid var(--gold-l)}
.sh-top{display:flex;align-items:center;gap:16px;margin-bottom:14px}
.sh-ico{width:52px;height:52px;border-radius:14px;background:rgba(201,168,76,.15);border:2px solid var(--gold-l);display:flex;align-items:center;justify-content:center;font-size:26px;flex-shrink:0}
.sh-info{flex:1} .sh-label{font-size:11px;font-weight:800;color:var(--gold-l);letter-spacing:1px;text-transform:uppercase;margin-bottom:4px}
.sh-title{font-size:18px;font-weight:900;color:#fff;margin-bottom:4px} .sh-meta{font-size:12px;color:rgba(255,255,255,.5)}
.sh-status{display:inline-flex;align-items:center;gap:6px;padding:5px 14px;border-radius:20px;font-size:12px;font-weight:800}
.sh-members{display:flex;gap:10px;flex-wrap:wrap}
.sh-member{display:flex;align-items:center;gap:8px;padding:7px 14px;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.12);border-radius:20px}
.shm-avatar{width:28px;height:28px;border-radius:50%;background:var(--gold-l);display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:900;color:var(--navy);flex-shrink:0}
.shm-name{font-size:12px;font-weight:700;color:rgba(255,255,255,.8)} .shm-role{font-size:10px;color:rgba(255,255,255,.4)}
.sh-timer{text-align:center;flex-shrink:0;padding:10px 20px;background:rgba(201,168,76,.15);border:1px solid rgba(201,168,76,.3);border-radius:12px}
.sht-label{font-size:10px;font-weight:700;color:var(--gold-l);margin-bottom:4px;text-transform:uppercase}
.sht-time{font-size:22px;font-weight:900;font-family:'IBM Plex Mono',monospace;color:var(--gold-l)}
.phase-card{background:#fff;border:1.5px solid var(--border);border-radius:var(--r);overflow:hidden;margin-bottom:16px}
.pc-head{padding:13px 18px;display:flex;align-items:center;gap:10px;border-bottom:1px solid var(--border)}
.pch-num{width:28px;height:28px;border-radius:50%;background:var(--navy);color:#fff;font-size:12px;font-weight:900;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.pch-num.done{background:var(--green)} .pch-num.active{background:var(--blue)}
.pch-title{font-size:14px;font-weight:800;color:var(--text);flex:1} .pch-badge{font-size:10px;font-weight:800;padding:3px 10px;border-radius:20px}
.pc-body{padding:18px}
.att-table{width:100%;border-collapse:collapse;font-size:13px}
.att-table th{background:var(--bg2);padding:9px 12px;text-align:right;font-weight:800;color:var(--navy);font-size:12px;border-bottom:2px solid var(--border)}
.att-table td{padding:9px 12px;border-bottom:1px solid var(--border);vertical-align:middle}
.att-table tr:last-child td{border-bottom:none}
.att-sign{padding:5px 12px;border-radius:8px;font-size:11px;font-weight:700;border:none;cursor:pointer;transition:var(--tr)}
.as-signed{background:var(--green-bg);color:var(--green);border:1px solid var(--green-b)}
.as-pending{background:var(--gold-bg);color:var(--gold);border:1px solid var(--gold-b);cursor:pointer}
.as-pending:hover{background:var(--gold);color:#fff}
.bids-reveal-table{width:100%;border-collapse:collapse;font-size:13px}
.bids-reveal-table th{background:var(--navy);color:#fff;padding:10px 14px;text-align:right;font-weight:700;font-size:12px}
.bids-reveal-table td{padding:10px 14px;border-bottom:1px solid var(--border);vertical-align:middle}
.bids-reveal-table tr:last-child td{border-bottom:none} .bids-reveal-table tr:hover td{background:var(--bg2)}
.reveal-btn{padding:5px 12px;border-radius:8px;font-size:11px;font-weight:800;border:none;cursor:pointer;background:var(--blue);color:#fff;transition:var(--tr)}
.reveal-btn.revealed{background:var(--green-bg);color:var(--green);border:1px solid var(--green-b);cursor:default}
.amount-hidden{font-family:'IBM Plex Mono',monospace;font-size:13px;font-weight:800;color:var(--subtle);letter-spacing:4px}
.amount-shown{font-family:'IBM Plex Mono',monospace;font-size:14px;font-weight:900;color:var(--navy)}
.vendor-cell{display:flex;align-items:center;gap:8px}
.vc-av{width:32px;height:32px;border-radius:9px;background:var(--bg2);display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:900;color:var(--navy);border:1px solid var(--border);flex-shrink:0}
.vc-name{font-size:13px;font-weight:700;color:var(--navy)}
.vc-tier{font-size:10px;font-weight:800;padding:2px 6px;border-radius:20px;display:inline-block;margin-top:1px}
.tier-s{background:linear-gradient(135deg,#FFD700,#FFA500);color:#fff}
.tier-a{background:var(--green-bg);color:var(--green);border:1px solid var(--green-b)}
.tier-b{background:var(--blue-bg);color:var(--blue);border:1px solid var(--blue-b)}
.rank-badge{width:26px;height:26px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:900;flex-shrink:0}
.rank-1{background:linear-gradient(135deg,#FFD700,#FFA500);color:#fff}
.rank-2{background:linear-gradient(135deg,#B0B0B0,#888);color:#fff}
.rank-3{background:linear-gradient(135deg,#CD7F32,#A0522D);color:#fff}
.rank-n{background:var(--bg2);color:var(--muted)}
.diff-tag{font-size:11px;font-weight:700;padding:2px 8px;border-radius:20px}
.diff-neg{background:var(--green-bg);color:var(--green)} .diff-pos{background:var(--red-bg);color:var(--red)}
.proceed-bar{background:var(--green);padding:14px 22px;display:flex;align-items:center;gap:14px;border-radius:var(--r);margin-top:16px}
.pb-text{font-size:14px;font-weight:700;color:#fff;flex:1}
.pb-btn{padding:10px 24px;background:#fff;color:var(--green);border:none;border-radius:10px;font-size:14px;font-weight:900;cursor:pointer;text-decoration:none;display:inline-block}
.right-panel{display:flex;flex-direction:column;gap:14px;position:sticky;top:22px}
.rp-card{background:#fff;border:1.5px solid var(--border);border-radius:var(--r);overflow:hidden}
.rpc-head{padding:12px 16px;background:var(--bg);border-bottom:1px solid var(--border);font-size:13px;font-weight:800;color:var(--navy)}
.rpc-body{padding:14px 16px}
.session-steps{display:flex;flex-direction:column;gap:6px}
.ss-step{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:10px;font-size:13px;font-weight:600;transition:var(--tr)}
.ss-step.done{background:var(--green-bg);color:var(--green)} .ss-step.active{background:var(--blue-bg);color:var(--blue);font-weight:800} .ss-step.pending{background:var(--bg);color:var(--muted)}
.ss-ico{font-size:16px;flex-shrink:0}
.lock-phase{position:relative}
.lock-phase::after{content:"🔒";position:absolute;inset:0;background:rgba(247,249,252,.92);display:flex;align-items:center;justify-content:center;font-size:24px;border-radius:var(--r)}
.eval-table-wrap{background:#fff;border:1.5px solid var(--border);border-radius:var(--r);overflow:hidden;margin-bottom:20px}
.etw-head{padding:14px 20px;background:var(--bg);border-bottom:1px solid var(--border);display:flex;align-items:center;gap:10px}
.eth-title{font-size:14px;font-weight:800;color:var(--text);flex:1}
.eth-badge{font-size:11px;font-weight:800;padding:4px 12px;border-radius:20px;background:var(--purple-bg);color:var(--purple);border:1px solid var(--purple-b)}
.eval-table{width:100%;border-collapse:collapse}
.eval-table th{background:var(--navy);color:#fff;padding:11px 14px;text-align:right;font-size:12px;font-weight:700;white-space:nowrap;border-left:1px solid rgba(255,255,255,.1)}
.eval-table th:last-child{border-left:none}
.eval-table td{padding:0;border-bottom:1px solid var(--border);border-left:1px solid var(--border);vertical-align:middle}
.eval-table td:last-child{border-left:none} .eval-table tr:last-child td{border-bottom:none} .eval-table tr:hover td{background:var(--bg2)}
.vc-cell{padding:12px 14px;min-width:180px} .vc-wrap{display:flex;align-items:center;gap:8px}
.score-cell{padding:10px 14px;text-align:center;min-width:90px}
.sc-val{font-size:16px;font-weight:900;font-family:'IBM Plex Mono',monospace;margin-bottom:3px}
.sc-bar{height:4px;border-radius:2px;background:var(--border);overflow:hidden;margin-bottom:3px} .sc-fill{height:100%;border-radius:2px} .sc-max{font-size:10px;color:var(--subtle)}
.score-input-cell{padding:8px 12px;min-width:120px} .si-wrap{display:flex;align-items:center;gap:6px}
.si-input{width:60px;padding:6px 8px;border:1.5px solid var(--border);border-radius:8px;font-size:14px;font-weight:700;text-align:center;outline:none;font-family:'IBM Plex Mono',monospace;transition:var(--tr)}
.si-input:focus{border-color:var(--navy)} .si-input.filled{border-color:var(--green);background:var(--green-bg);color:var(--green)}
.si-max{font-size:11px;color:var(--muted)} .si-error{font-size:10px;color:var(--red);margin-top:2px;display:none} .si-error.show{display:block}
.total-score-cell{padding:12px 14px;text-align:center;min-width:100px}
.ts-val{font-size:20px;font-weight:900;font-family:'IBM Plex Mono',monospace;margin-bottom:4px}
.ts-bar{height:6px;border-radius:3px;background:var(--border);overflow:hidden} .ts-fill{height:100%;border-radius:3px;transition:width .4s}
.summary-card{background:var(--navy);border-radius:var(--r);padding:20px;margin-bottom:20px}
.sc-row{display:flex;align-items:center;gap:14px;padding:12px 0;border-bottom:1px solid rgba(255,255,255,.08)}
.sc-row:last-child{border-bottom:none} .scr-rank{width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:900;flex-shrink:0}
.scr-vendor{flex:1} .scr-name{font-size:14px;font-weight:800;color:#fff} .scr-meta{font-size:11px;color:rgba(255,255,255,.4);margin-top:2px}
.scr-scores{display:flex;gap:10px;flex-shrink:0;flex-wrap:wrap} .scr-pill{font-size:12px;font-weight:700;padding:4px 10px;border-radius:20px}
.sp-green{background:rgba(14,110,74,.25);color:#6EE7B7} .sp-blue{background:rgba(21,101,192,.25);color:#93C5FD} .sp-gold{background:rgba(184,148,46,.25);color:var(--gold-l)}
.proceed-section{background:var(--green-bg);border:2px solid var(--green-b);border-radius:var(--r);padding:18px 22px;display:flex;align-items:center;gap:16px}
.ps-icon{font-size:28px} .ps-text{flex:1} .ps-title{font-size:15px;font-weight:800;color:var(--green);margin-bottom:3px} .ps-sub{font-size:13px;color:var(--muted)}
.ps-btn{padding:11px 24px;background:var(--green);color:#fff;border:none;border-radius:10px;font-size:14px;font-weight:800;cursor:pointer;transition:var(--tr);white-space:nowrap;text-decoration:none;display:inline-block;font-family:'Tajawal',sans-serif}
.winner-card{background:linear-gradient(135deg,var(--gold-bg),#fff);border:2px solid var(--gold-b);border-radius:var(--r);padding:20px;margin-bottom:16px}
.wc-label{font-size:11px;font-weight:800;color:var(--gold);letter-spacing:1px;text-transform:uppercase;margin-bottom:12px}
.wc-vendor{display:flex;align-items:center;gap:14px;margin-bottom:14px}
.wc-avatar{width:48px;height:48px;border-radius:12px;background:var(--gold);color:var(--navy);display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:900;flex-shrink:0}
.wc-name{font-size:16px;font-weight:900;color:var(--navy);margin-bottom:3px} .wc-sub{font-size:12px;color:var(--muted)}
.wc-tier{font-size:11px;font-weight:800;padding:3px 10px;border-radius:20px;background:linear-gradient(135deg,#FFD700,#FFA500);color:#fff;display:inline-block;margin-top:4px}
.wc-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.ws-item{text-align:center;padding:10px;background:#fff;border-radius:10px;border:1px solid var(--gold-b)}
.ws-val{font-size:18px;font-weight:900;font-family:'IBM Plex Mono',monospace;color:var(--navy)} .ws-label{font-size:10px;color:var(--muted);font-weight:700;margin-top:3px}
.ranking-card{background:#fff;border:1.5px solid var(--border);border-radius:var(--r);overflow:hidden;margin-bottom:16px}
.rc-head{padding:14px 18px;background:var(--bg);border-bottom:1px solid var(--border);display:flex;align-items:center;gap:10px} .rch-title{font-size:14px;font-weight:800;color:var(--navy)}
.rank-table{width:100%;border-collapse:collapse;font-size:13px}
.rank-table th{background:var(--navy);color:#fff;padding:10px 14px;text-align:right;font-weight:700;font-size:12px}
.rank-table td{padding:10px 14px;border-bottom:1px solid var(--border);vertical-align:middle} .rank-table tr:last-child td{border-bottom:none}
.winner-row td{background:var(--gold-bg)}
.score-pill{font-size:11px;font-weight:800;padding:4px 10px;border-radius:20px}
.sp-top{background:var(--green-bg);color:var(--green);border:1px solid var(--green-b)}
.sp-mid{background:var(--blue-bg);color:var(--blue);border:1px solid var(--blue-b)} .sp-low{background:var(--bg2);color:var(--muted)}
.savings-tag{font-size:11px;font-weight:700;padding:3px 8px;border-radius:20px;background:var(--green-bg);color:var(--green)}
.award-form-card{background:#fff;border:1.5px solid var(--border);border-radius:var(--r);overflow:hidden;margin-bottom:16px}
.afc-head{padding:13px 18px;background:var(--bg);border-bottom:1px solid var(--border)} .afch-title{font-size:14px;font-weight:800;color:var(--navy)}
.afc-body{padding:18px} .form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.fg{display:flex;flex-direction:column;gap:5px} .fg.full{grid-column:1/-1}
.form-input,.form-select,.form-textarea{padding:9px 12px;border:1.5px solid var(--border);border-radius:9px;font-size:13px;font-family:'Tajawal',sans-serif;outline:none;transition:var(--tr);width:100%}
.form-input:focus,.form-select:focus,.form-textarea:focus{border-color:var(--navy)} .form-select{background:#fff} .form-textarea{resize:vertical}
.override-section{background:var(--orange-bg);border:1.5px solid var(--orange-b);border-radius:10px;padding:14px 16px;margin-top:12px}
.os-head{display:flex;align-items:center;gap:8px;margin-bottom:10px} .os-title{font-size:13px;font-weight:800;color:var(--orange)}
.award-btn{padding:12px 28px;background:var(--gold);color:#fff;border:none;border-radius:10px;font-size:14px;font-weight:900;cursor:pointer;font-family:'Tajawal',sans-serif}
.chain-item{display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid var(--border)}
.chain-item:last-child{border-bottom:none}
.ci-avatar{width:32px;height:32px;border-radius:50%;background:var(--bg2);display:flex;align-items:center;justify-content:center;font-weight:800;font-size:13px;flex-shrink:0;color:var(--muted)}
.ci-avatar.approved{background:var(--green);color:#fff} .ci-name{font-size:13px;font-weight:700;color:var(--navy)}
.cs-approved{background:var(--green-bg);color:var(--green);border:1px solid var(--green-b)}
.cs-pending{background:var(--gold-bg);color:var(--gold);border:1px solid var(--gold-b)}
.success-overlay{position:fixed;inset:0;background:rgba(10,22,40,.85);z-index:600;display:none;align-items:center;justify-content:center}
.success-overlay.show{display:flex}
.success-box{background:#fff;border-radius:20px;padding:40px;max-width:520px;text-align:center;box-shadow:var(--shm)}
.sb-trophy{font-size:72px;margin-bottom:16px;animation:bounce .6s ease infinite alternate}
@keyframes bounce{from{transform:translateY(0)}to{transform:translateY(-10px)}}
@media(max-width:1100px){.right-panel{position:static}.wc-stats{grid-template-columns:repeat(2,1fr)}}
@media(max-width:768px){.sh-members{display:none}.form-grid{grid-template-columns:1fr}}

/* ------ Tenders index — scope toggle (أعمالي / الكل) ------ */
.scope-toggle{display:flex;gap:10px;margin-bottom:14px;align-items:center;flex-wrap:wrap}
.scope-pill{display:flex;align-items:center;gap:10px;padding:10px 16px;border-radius:11px;background:#fff;border:1.5px solid var(--border);color:var(--muted);font-weight:700;font-size:13px;cursor:pointer;transition:var(--tr);text-decoration:none;line-height:1.2}
.scope-pill:hover{border-color:var(--blue);color:var(--blue);background:var(--blue-bg)}
.scope-pill .sp-ico{font-size:18px}
.scope-pill .sp-label{font-size:14px;font-weight:800;color:var(--navy)}
.scope-pill .sp-hint{font-size:11px;font-weight:600;color:var(--muted);margin-right:4px}
.scope-pill.is-active{background:var(--navy);border-color:var(--navy);color:#fff;box-shadow:0 6px 14px rgba(10,22,40,.18)}
.scope-pill.is-active .sp-label{color:#fff}
.scope-pill.is-active .sp-hint{color:rgba(255,255,255,.7)}
.scope-note{font-size:11px;color:var(--muted);background:var(--blue-bg);border:1px solid var(--blue-b);color:var(--blue);padding:6px 12px;border-radius:8px;font-weight:700}

/* ------ Tender detail page (admin) ------ */
.td-grid{display:grid;grid-template-columns:1fr 320px;gap:20px;align-items:start}
@media(max-width:1100px){.td-grid{grid-template-columns:1fr}}
.td-card{background:#fff;border:1.5px solid var(--border);border-radius:var(--r);overflow:hidden;margin-bottom:14px}
.td-card-head{padding:12px 16px;background:var(--bg);border-bottom:1px solid var(--border);display:flex;align-items:center;gap:10px;font-weight:800;color:var(--navy);font-size:14px}
.td-card-body{padding:16px 18px}
.td-row{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px dashed var(--border);gap:10px;font-size:13px}
.td-row:last-child{border-bottom:none}
.td-row .lbl{color:var(--muted);font-weight:700;flex-shrink:0}
.td-row .val{color:var(--text);font-weight:700;text-align:left}
.td-meta-pill{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:8px;font-size:12px;font-weight:700;background:var(--bg2);color:var(--navy)}
.td-criteria-table{width:100%;border-collapse:collapse;font-size:13px}
.td-criteria-table th,.td-criteria-table td{padding:9px 12px;text-align:right;border-bottom:1px solid var(--border)}
.td-criteria-table th{background:var(--bg);color:var(--muted);font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.5px}
.td-criteria-table tr:last-child td{border-bottom:none}
.td-doc-list{display:flex;flex-direction:column;gap:8px}
.td-doc-row{display:flex;align-items:center;gap:10px;padding:10px 12px;background:var(--bg);border:1px solid var(--border);border-radius:9px;font-size:13px}
.td-doc-row .doc-ico{font-size:20px}
.td-doc-row .doc-name{flex:1;font-weight:700;color:var(--navy)}
.td-doc-row .doc-type{font-size:11px;font-weight:700;color:var(--muted);background:#fff;padding:3px 8px;border:1px solid var(--border);border-radius:6px}
.td-team-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px}
.td-team-card{display:flex;align-items:center;gap:10px;padding:10px 12px;background:var(--bg);border:1px solid var(--border);border-radius:9px}
.td-team-card .av{width:34px;height:34px;border-radius:50%;background:var(--gold-l);color:var(--navy);display:flex;align-items:center;justify-content:center;font-weight:900}
.td-team-card .name{font-weight:800;color:var(--navy);font-size:13px}
.td-team-card .role{font-size:11px;color:var(--muted);font-weight:700}

/* ------ Bid opening session — phase title contrast fix ------ */
.phase-card .pc-head{display:flex;align-items:center;gap:12px;padding:14px 18px;background:var(--bg);border-bottom:1px solid var(--border)}
.phase-card .pch-title{flex:1;font-weight:900;color:var(--navy);font-size:14px}
.phase-card .pch-num{width:30px;height:30px;border-radius:50%;background:var(--bg2);color:var(--muted);font-weight:900;display:flex;align-items:center;justify-content:center;font-size:14px}
.phase-card .pch-num.active{background:var(--blue);color:#fff}
.phase-card .pch-num.done{background:var(--green);color:#fff}
.phase-card .pch-badge{font-size:11px;font-weight:800;padding:4px 10px;border-radius:8px}
.phase-card.lock-phase{opacity:.55;pointer-events:none}
.phase-card.lock-phase .pc-body{display:none}

/* Bid detail expansion in opening session */
.bid-expand-row{background:var(--bg);border-top:1px solid var(--border)}
.bid-expand-body{padding:14px 18px;display:grid;gap:10px}
.bid-expand-body h4{font-size:13px;font-weight:800;color:var(--navy);margin-bottom:6px}
.bid-attach-list{display:flex;flex-direction:column;gap:6px}
.bid-attach-row{display:flex;align-items:center;gap:8px;padding:8px 12px;background:#fff;border:1px solid var(--border);border-radius:8px;font-size:12px}
.bid-attach-row a{color:var(--blue);font-weight:700;margin-right:auto}

/* My sessions list */
.session-card{background:#fff;border:1.5px solid var(--border);border-radius:var(--r);overflow:hidden;margin-bottom:14px;display:flex;flex-direction:column}
.session-card .sc-head{padding:14px 18px;background:var(--bg);border-bottom:1px solid var(--border);display:flex;align-items:center;gap:10px}
.session-card .sc-title{font-weight:900;color:var(--navy);font-size:14px;flex:1}
.session-card .sc-body{padding:14px 18px;display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
@media(max-width:768px){.session-card .sc-body{grid-template-columns:repeat(2,1fr)}}
.session-card .sc-cell .lbl{font-size:11px;color:var(--muted);font-weight:700;margin-bottom:3px}
.session-card .sc-cell .val{font-weight:800;color:var(--navy);font-size:13px}
.session-card .sc-foot{padding:10px 18px;border-top:1px solid var(--border);background:var(--bg);display:flex;align-items:center;gap:10px}
.role-pill{display:inline-flex;align-items:center;gap:5px;padding:3px 10px;font-size:11px;font-weight:800;border-radius:7px;background:var(--blue-bg);color:var(--blue);border:1px solid var(--blue-b)}
.role-pill.chair{background:var(--gold-bg);color:var(--gold);border-color:var(--gold-b)}

/* ─── Sprint 9.6 — People panel + authorization hint ─── */
.people-panel{background:#fff;border:1px solid var(--border);border-radius:var(--r);overflow:hidden;margin-bottom:14px}
.people-panel .pp-head{padding:11px 15px;background:var(--bg);border-bottom:1px solid var(--border);font-weight:800;font-size:13px;color:var(--navy)}
.people-panel .pp-body{padding:13px 15px;display:flex;flex-direction:column;gap:13px}
.people-panel .pp-group .pp-group-label{font-size:11px;font-weight:800;color:var(--muted);margin-bottom:7px;text-transform:none}
.people-panel .pp-group-users{display:flex;flex-direction:column;gap:6px}
.people-panel .pp-user{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--text);font-weight:700}
.people-panel .pp-avatar{width:26px;height:26px;border-radius:50%;background:var(--navy);color:#fff;display:inline-flex;align-items:center;justify-content:center;font-size:11px;font-weight:800}
.people-panel .pp-avatar-sup{background:var(--gold);color:var(--navy)}
.people-panel .pp-supervisors{padding-top:11px;border-top:1px dashed var(--border)}

.auth-hint{margin-top:10px;padding:9px 13px;background:var(--bg);border:1px solid var(--border);border-radius:9px;font-size:12px;color:var(--muted);line-height:1.6}
.auth-hint strong{color:var(--navy)}
.auth-hint.is-warn{background:var(--gold-bg);border-color:var(--gold-b);color:var(--gold)}
.auth-hint.is-info{background:var(--blue-bg);border-color:var(--blue-b);color:var(--blue)}

.btn-disabled-wrap{display:inline-block;position:relative}
.btn-disabled-wrap .btn-tip{position:absolute;bottom:calc(100% + 6px);right:0;background:var(--navy);color:#fff;padding:7px 11px;border-radius:7px;font-size:11px;line-height:1.6;white-space:nowrap;opacity:0;pointer-events:none;transition:var(--tr);box-shadow:0 4px 14px rgba(10,22,40,.2);z-index:10;max-width:280px;white-space:normal}
.btn-disabled-wrap:hover .btn-tip{opacity:1}

/* ─── Sprint 9.7 — Phase hint (collapsible "who can do what here" banner) ─── */
.phase-hint{background:#fff;border:1px solid var(--border);border-radius:var(--r);margin-bottom:18px;overflow:hidden;transition:var(--tr)}
.phase-hint.phase-hint--info{border-color:var(--blue-b)}
.phase-hint.phase-hint--warn{border-color:var(--gold-b)}
.phase-hint.phase-hint--success{border-color:var(--green-b)}
.phase-hint > summary{list-style:none;cursor:pointer}
.phase-hint > summary::-webkit-details-marker{display:none}
.phase-hint > summary::marker{display:none}
.phase-hint .ph-toggle{width:100%;display:flex;align-items:center;gap:13px;padding:11px 16px;background:transparent;text-align:right;font-family:inherit;transition:var(--tr)}
.phase-hint .ph-toggle:hover{background:var(--bg)}
.phase-hint--info .ph-toggle{background:linear-gradient(to left,var(--blue-bg),transparent 70%)}
.phase-hint--warn .ph-toggle{background:linear-gradient(to left,var(--gold-bg),transparent 70%)}
.phase-hint--success .ph-toggle{background:linear-gradient(to left,var(--green-bg),transparent 70%)}
.phase-hint .ph-ico{font-size:18px;flex-shrink:0}
.phase-hint .ph-head-text{flex:1;min-width:0}
.phase-hint .ph-phase{font-size:13px;font-weight:800;color:var(--navy);margin-bottom:2px}
.phase-hint .ph-summary{font-size:12px;color:var(--muted);line-height:1.6}
.phase-hint .ph-chevron{font-size:14px;color:var(--muted);transition:transform .2s ease;flex-shrink:0}
.phase-hint[open] .ph-chevron{transform:rotate(180deg)}
.phase-hint .ph-body{padding:14px 18px;border-top:1px dashed var(--border);background:var(--bg);display:flex;flex-direction:column;gap:12px}
.phase-hint .ph-rules-title{font-size:11px;font-weight:800;color:var(--muted);margin-bottom:8px}
.phase-hint .ph-rule{display:flex;align-items:flex-start;gap:9px;padding:7px 0;font-size:12px;line-height:1.7;color:var(--text);border-bottom:1px solid rgba(221,229,240,.5)}
.phase-hint .ph-rule:last-child{border-bottom:0}
.phase-hint .ph-rule-ico{font-size:14px;flex-shrink:0;margin-top:1px}
.phase-hint .ph-rule-text strong{color:var(--navy);font-weight:800}
.phase-hint .ph-team-note{display:flex;align-items:flex-start;gap:9px;padding:9px 12px;background:#fff;border:1px solid var(--border);border-radius:9px;font-size:12px;color:var(--muted);line-height:1.7}
.phase-hint .ph-team-ico{font-size:14px;flex-shrink:0;margin-top:1px}
.phase-hint .ph-footer{font-size:11px;color:var(--gold);background:var(--gold-bg);border:1px solid var(--gold-b);border-radius:8px;padding:7px 11px;line-height:1.6}

/* ─── Sprint 9.8 — Q&A filter pills ─── */
.qna-filter-pill{display:inline-flex;align-items:center;gap:6px;padding:6px 13px;background:#fff;border:1px solid var(--border);border-radius:18px;font-size:12px;font-weight:700;color:var(--muted);text-decoration:none;transition:var(--tr)}
.qna-filter-pill:hover{border-color:var(--navy);color:var(--navy)}
.qna-filter-pill.is-active{background:var(--navy);border-color:var(--navy);color:#fff}
.qna-filter-pill .qfp-count{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:18px;padding:0 6px;background:var(--bg2);color:var(--muted);border-radius:10px;font-size:11px;font-weight:800}
.qna-filter-pill.is-active .qfp-count{background:rgba(255,255,255,.2);color:#fff}

/* Alpine.js — hide x-cloak elements until Alpine initialises */
[x-cloak]{display:none!important}

/* ─── Sprint 10/11 polish — flash banner (success / error / validation) ─── */
.flash-banner{display:flex;align-items:flex-start;gap:11px;padding:12px 16px;border-radius:11px;font-size:13px;font-weight:600;line-height:1.7;margin-bottom:14px;border:1px solid transparent}
.flash-banner .flash-ico{font-size:18px;flex-shrink:0;line-height:1.4}
.flash-banner .flash-msg{flex:1}
.flash-banner .flash-msg strong{display:block;margin-bottom:4px;font-weight:800}
.flash-banner.flash-success{background:var(--green-bg);border-color:var(--green-b);color:var(--green)}
.flash-banner.flash-error{background:var(--red-bg);border-color:var(--red-b);color:var(--red)}
.flash-banner.flash-warn{background:var(--gold-bg);border-color:var(--gold-b);color:var(--gold)}

/* ─── Sprint 10/11 polish — invoice/contract form helpers ─── */
.amount-helper{font-size:12px;margin-top:4px;color:var(--muted);display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}
.amount-helper.is-over{color:var(--red);font-weight:700}
.amount-helper strong{color:var(--navy)}
.amount-helper.is-over strong{color:var(--red)}
.amount-remaining{font-family:'IBM Plex Mono';font-weight:800;color:var(--navy)}
.amount-remaining.is-low{color:var(--orange)}


/* ─── Sprint 10/11 polish — audit timeline panel ─── */
.timeline{list-style:none;padding:0;margin:0;position:relative}
.timeline::before{content:"";position:absolute;top:8px;bottom:8px;right:7px;width:2px;background:var(--border);border-radius:2px}
.tl-row{display:flex;gap:12px;padding:8px 0;position:relative}
.tl-row + .tl-row{border-top:1px dashed var(--border);margin-top:4px}
.tl-dot{width:16px;height:16px;border-radius:50%;background:var(--navy);border:3px solid #fff;outline:2px solid var(--navy);flex-shrink:0;margin-top:3px;position:relative;z-index:1}
.tl-body{flex:1;min-width:0}
.tl-title{font-size:13px;font-weight:800;color:var(--navy)}
.tl-meta{font-size:11px;color:var(--muted);margin-top:2px;line-height:1.6}
.tl-note{margin-top:6px;font-size:12px;color:var(--text);background:var(--bg);border-right:3px solid var(--blue);padding:7px 10px;border-radius:6px;line-height:1.7}

/* ─── Sprint 10/11 polish — payment row void state ─── */
.payment-row.is-voided{opacity:.55;text-decoration:line-through;text-decoration-color:var(--red)}
.payment-row .void-pill{display:inline-block;font-size:10px;font-weight:800;background:var(--red-bg);color:var(--red);padding:2px 7px;border-radius:10px;margin-right:6px}

/* ─── Sprint 10/11 polish — resubmit / withdraw CTAs ─── */
.alt-cta{display:flex;gap:10px;align-items:center;background:var(--blue-bg);border:1px solid var(--blue-b);padding:12px 14px;border-radius:11px;margin-top:14px;font-size:13px;color:var(--blue)}
.alt-cta .alt-cta-ico{font-size:18px}
.alt-cta .alt-cta-btn{margin-right:auto;background:var(--blue);color:#fff;padding:7px 13px;border-radius:8px;text-decoration:none;font-weight:800;font-size:12px}

/* ─── Form validation error block (replaces vague "X fields" banner) ─── */
.form-errors{background:linear-gradient(180deg,#fff5f5 0%,#ffe8e8 100%);border:1px solid #f5a3a3;border-right:5px solid var(--red);border-radius:12px;padding:14px 18px;margin-bottom:16px;box-shadow:0 2px 8px rgba(185,28,28,.08)}
.form-errors .fe-head{display:flex;align-items:center;gap:10px;margin-bottom:8px}
.form-errors .fe-ico{font-size:18px;line-height:1}
.form-errors .fe-title{font-size:14px;font-weight:800;color:#7a1212;line-height:1.6}
.form-errors .fe-title strong{font-family:'IBM Plex Mono';color:var(--red);margin:0 2px}
.form-errors .fe-list{margin:0;padding-right:26px;list-style:none}
.form-errors .fe-list li{position:relative;font-size:13px;color:#5a0e0e;padding:5px 0;line-height:1.75}
.form-errors .fe-list li::before{content:"●";position:absolute;right:-16px;top:5px;color:var(--red);font-size:10px}
.form-errors .fe-list li + li{border-top:1px dashed rgba(185,28,28,.15)}
.form-errors .fe-hint{font-size:12px;color:#7a1212;margin-top:10px;padding-top:8px;border-top:1px dashed rgba(185,28,28,.2);font-style:italic}

/* Inline per-field error (use under any .fg-input) */
.fg-error{display:flex;align-items:center;gap:6px;color:var(--red);font-size:12px;font-weight:700;margin-top:5px;line-height:1.6}
.fg-error::before{content:"⚠";font-size:13px}
.fg-input.is-invalid,.amount-input.is-invalid{border-color:var(--red)!important;background:#fff8f8}

/* ═══════════════════════════════════════════════════════════════════
   SCROLLBAR FIX — body-level scroll removed; only .content scrolls
   ═══════════════════════════════════════════════════════════════════ */
.app-body { overflow: hidden; height: 100vh; }
.app-body .layout { height: calc(100vh - 46px); overflow: hidden; }

/* Slim custom scrollbar — sidebar nav */
.sb-nav::-webkit-scrollbar { width: 3px; }
.sb-nav::-webkit-scrollbar-track { background: transparent; }
.sb-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.13); border-radius: 2px; }

/* Slim custom scrollbar — main content */
.content::-webkit-scrollbar { width: 5px; }
.content::-webkit-scrollbar-track { background: var(--bg); }
.content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.content::-webkit-scrollbar-thumb:hover { background: var(--subtle); }

/* ═══════════════════════════════════════════════════════════════════
   DASHBOARD — greeting banner + KPI variants + quick-action cards
   ═══════════════════════════════════════════════════════════════════ */

/* Greeting card */
.dash-greet {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 100%);
    border-radius: var(--r); padding: 22px 26px; margin-bottom: 20px;
    display: flex; align-items: center; gap: 18px;
    box-shadow: 0 4px 20px rgba(10,22,40,.15);
}
.dg-avatar {
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--gold-l); color: var(--navy);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 900; flex-shrink: 0;
}
.dg-info { flex: 1; min-width: 0; }
.dg-name { font-size: 19px; font-weight: 900; color: #fff; }
.dg-role-label { font-size: 12px; color: rgba(255,255,255,.5); margin-top: 2px; }
.dg-meta { font-size: 11px; color: rgba(255,255,255,.3); margin-top: 7px; direction: ltr; text-align: right; }
.dg-role-pill {
    padding: 6px 16px; border-radius: 999px;
    font-size: 12px; font-weight: 800; white-space: nowrap;
    background: rgba(255,255,255,.12); color: rgba(255,255,255,.85);
    border: 1px solid rgba(255,255,255,.18);
}

/* KPI colour variants */
.kpi.kpi-warn { border-color: var(--orange-b); }
.kpi.kpi-warn .kpi-value { color: var(--orange); }
.kpi.kpi-success { border-color: var(--green-b); }
.kpi.kpi-success .kpi-value { color: var(--green); }
.kpi.kpi-info { border-color: var(--blue-b); }
.kpi.kpi-info .kpi-value { color: var(--blue); }
.kpi.kpi-link { text-decoration: none; transition: var(--tr); display: block; }
.kpi.kpi-link:hover { border-color: var(--navy2); background: var(--bg); box-shadow: 0 2px 10px rgba(10,22,40,.07); }

/* Quick-action card grid */
.quick-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 12px;
}
.qa-card {
    background: var(--bg); border: 1.5px solid var(--border);
    border-radius: var(--r); padding: 16px 14px;
    display: flex; flex-direction: column; gap: 7px;
    transition: var(--tr); text-decoration: none;
}
.qa-card:hover {
    background: #fff; border-color: var(--navy2);
    box-shadow: 0 2px 12px rgba(10,22,40,.09);
    transform: translateY(-1px);
}
.qa-ico { font-size: 26px; line-height: 1; }
.qa-title { font-size: 13px; font-weight: 800; color: var(--navy); }
.qa-sub { font-size: 11px; color: var(--muted); line-height: 1.5; }
.qa-card.qa-urgent { border-color: var(--orange-b); background: var(--orange-bg); }
.qa-card.qa-urgent:hover { border-color: var(--orange); }

/* ───────────── Help Button + Modal (Sprint 11.6) ───────────── */
.help-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: 999px;
    background: var(--gold-bg); color: var(--navy);
    border: 1px solid rgba(184, 148, 46, .35);
    font-family: inherit; font-size: 13px; font-weight: 700;
    cursor: pointer; transition: var(--tr);
}
.help-btn:hover { background: #F6E8B8; border-color: var(--gold); transform: translateY(-1px); box-shadow: 0 2px 8px rgba(184,148,46,.18); }
.help-btn-ico { font-size: 16px; line-height: 1; }
.help-btn-text { line-height: 1; }

body.has-help-open { overflow: hidden; }
.help-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.help-modal[hidden] { display: none; }
.help-backdrop { position: absolute; inset: 0; background: rgba(10,22,40,.55); backdrop-filter: blur(3px); opacity: 0; transition: opacity .18s ease; }
.help-modal.is-open .help-backdrop { opacity: 1; }
.help-panel {
    position: relative; z-index: 1; width: 100%; max-width: 720px;
    max-height: 88vh; display: flex; flex-direction: column;
    background: #fff; border-radius: 18px;
    border: 1px solid var(--border);
    box-shadow: 0 24px 64px rgba(10,22,40,.32), 0 4px 12px rgba(10,22,40,.08);
    opacity: 0; transform: translateY(12px) scale(.985);
    transition: opacity .22s cubic-bezier(.4,0,.2,1), transform .22s cubic-bezier(.4,0,.2,1);
}
.help-modal.is-open .help-panel { opacity: 1; transform: translateY(0) scale(1); }

.help-head {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 20px 24px 16px; border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, #FBF5E6 0%, #fff 100%);
    border-radius: 18px 18px 0 0;
}
.help-head-text { flex: 1; }
.help-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .04em; color: var(--gold); text-transform: uppercase; margin-bottom: 4px; }
.help-title { font-size: 19px; font-weight: 800; color: var(--navy); line-height: 1.35; }
.help-close {
    width: 34px; height: 34px; border-radius: 10px;
    background: #fff; color: var(--muted);
    border: 1px solid var(--border); cursor: pointer;
    font-size: 15px; font-weight: 700; transition: var(--tr);
    display: flex; align-items: center; justify-content: center;
}
.help-close:hover { background: var(--red-bg); color: var(--red); border-color: rgba(185,28,28,.25); }

.help-body { padding: 20px 24px; overflow-y: auto; flex: 1; }
.help-section { margin-bottom: 22px; }
.help-section:last-child { margin-bottom: 0; }
.help-section-head {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 800; color: var(--navy);
    margin-bottom: 10px;
    padding-bottom: 8px; border-bottom: 1px dashed var(--border);
}
.hs-ico { font-size: 16px; line-height: 1; }
.help-text { font-size: 14px; color: var(--text); line-height: 1.85; }
.help-steps { list-style: none; counter-reset: step; padding: 0; margin: 0; }
.help-steps li {
    position: relative; padding: 8px 44px 8px 14px;
    font-size: 13.5px; color: var(--text); line-height: 1.7;
    counter-increment: step;
}
.help-steps li::before {
    content: counter(step);
    position: absolute; top: 8px; right: 0;
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--navy); color: #fff;
    font-size: 12px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
}
.help-who { display: flex; flex-direction: column; gap: 8px; }
.help-who-row {
    display: grid; grid-template-columns: 38% 1fr; gap: 12px;
    padding: 10px 12px; border: 1px solid var(--border);
    border-radius: 10px; background: var(--bg);
}
.help-who-act { font-size: 13px; font-weight: 800; color: var(--navy); }
.help-who-roles { font-size: 13px; color: var(--muted); line-height: 1.6; }
.help-who-note {
    grid-column: 1 / -1; font-size: 12px; color: var(--orange);
    padding-top: 6px; border-top: 1px dashed rgba(194,65,12,.2);
    margin-top: 4px; line-height: 1.6;
}
.help-tip {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 14px; border-radius: 10px;
    background: var(--blue-bg); border: 1px solid var(--blue-b);
    color: var(--navy); font-size: 13px; line-height: 1.7;
}

.help-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 14px 24px; border-top: 1px solid var(--border);
    background: var(--bg); border-radius: 0 0 18px 18px;
}
.help-foot-info { font-size: 12px; color: var(--muted); line-height: 1.6; flex: 1; }

@media (max-width: 640px) {
    .help-btn-text { display: none; }
    .help-panel { max-height: 92vh; }
    .help-head, .help-body, .help-foot { padding-inline: 16px; }
    .help-who-row { grid-template-columns: 1fr; }
    .help-foot { flex-direction: column; align-items: stretch; }
}

/* ──────────────────────────────────────────────────────────────────
   Phone group (country-code selector + local number input)
   dir="ltr" on the container makes select appear on the left
────────────────────────────────────────────────────────────────── */
.phone-group {
    display: flex;
    gap: 0;
}
.phone-group .phone-code {
    border-radius: 8px 0 0 8px;
    border-right: none;
    min-width: 118px;
    flex-shrink: 0;
    font-size: 13px;
}
.phone-group .phone-num {
    border-radius: 0 8px 8px 0;
    flex: 1;
    min-width: 0;
}

/* Character counter for fixed-length fields (CR, ZATCA) */
.fg-counter {
    font-size: 11px;
    color: var(--muted);
    text-align: right;
    margin-top: 4px;
}

/* ── Phone composite input (country-code + local number) ──────────
   Standalone wrapper — does NOT rely on .form-select / .form-input
   so existing base styles cannot interfere with the flex layout.
────────────────────────────────────────────────────────────────── */
.phone-wrap {
    display: flex;
    align-items: stretch;
    height: 46px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.phone-wrap:focus-within {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(30,58,95,.07);
}
.phone-wrap.has-error { border-color: #e74c3c; }

/* Country-code selector */
.pw-code {
    -webkit-appearance: auto;
    appearance: auto;
    border: none;
    border-inline-end: 1.5px solid var(--border);
    border-radius: 0;
    background: var(--bg2, #f7f8fa);
    padding: 0 8px;
    font-size: 13px;
    font-family: inherit;
    width: 116px;
    flex-shrink: 0;
    color: var(--navy);
    cursor: pointer;
    outline: none;
    height: 100%;
}
.pw-code:focus { background: var(--bg); }

/* Local number input */
.pw-num {
    border: none;
    border-radius: 0;
    background: transparent;
    padding: 0 14px;
    font-size: 14px;
    font-family: inherit;
    color: var(--navy);
    flex: 1;
    min-width: 0;
    direction: ltr;
    outline: none;
    height: 100%;
}
.pw-num::placeholder { color: var(--muted); font-size: 13px; }

/* ── Phone field: country select + number input ───────────────────
   Uses dedicated .pf-* classes (not .form-select / .form-input)
   so base width:100% rules cannot break the flex layout.
────────────────────────────────────────────────────────────────── */
.pf-wrap {
    display: flex;
    align-items: stretch;
    height: 46px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.pf-wrap:focus-within {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(30,58,95,.07);
}
.pf-wrap.pf-error { border-color: #e74c3c; }

.pf-country {
    -webkit-appearance: auto;
    appearance: auto;
    flex: 0 0 auto;
    width: 170px;
    height: 100%;
    border: none;
    border-inline-end: 1.5px solid var(--border);
    border-radius: 0;
    background: var(--bg2, #f5f6f8);
    padding: 0 10px;
    font-size: 13px;
    font-family: 'Tajawal', sans-serif;
    color: var(--navy);
    cursor: pointer;
    outline: none;
    direction: rtl;
}
.pf-country:focus { background: var(--bg, #eef0f3); }
.pf-country optgroup { font-size: 11px; color: var(--muted); }

.pf-number {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: none;
    border-radius: 0;
    background: transparent;
    padding: 0 14px;
    font-size: 14px;
    font-family: 'IBM Plex Mono', monospace;
    color: var(--navy);
    direction: ltr;
    outline: none;
}
.pf-number::placeholder {
    font-family: 'Tajawal', sans-serif;
    color: var(--muted);
    font-size: 13px;
}

/* pf-wrap override — match form-input font & size, country on left */
.pf-country {
    direction: ltr;
    font-family: inherit;
}
.pf-number {
    font-family: inherit;
    font-size: 14px;
}
