/* Garena workspace design system - core stylesheet.
   Assembled from the Procure (prochelper) and Manpower portal stylesheets, 2026-09-18.
   Tokens + 6 themes, icon-rail shell, page chrome, and the shared component set.
   App-specific components live in the app's own stylesheet loaded after this one. */

/* ===== Design tokens and themes ===== */

:root {
    --ink: #173b3a;
    --ink-strong: #0d2c2b;
    --ink-soft: #637674;
    --primary: #0f766e;
    --primary-dark: #0b5f59;
    --primary-soft: #e3f3ef;
    --accent: #ef835d;
    --accent-soft: #fff0e9;
    --canvas: #f4f6f2;
    --surface: #ffffff;
    --surface-soft: #f9faf7;
    --border: #dde5df;
    --border-strong: #cbd8d0;
    --divider: #e8eee9;
    --surface-hover: #f7faf7;
    --sidebar-bg: #0d2c2b;
    --dark-panel: #0d2c2b;
    --sidebar-accent: #72d3bd;
    --primary-contrast: #ffffff;
    --page-glow: rgba(225, 242, 236, .85);
    --control-placeholder: #99a7a3;
    --rating: #eba43b;
    --success: #248166;
    --warning: #b36a10;
    --danger: #c64f4f;
    --shadow-sm: 0 1px 2px rgba(17, 54, 51, .04), 0 4px 14px rgba(17, 54, 51, .04);
    --shadow-md: 0 16px 44px rgba(17, 54, 51, .09);
    --radius-sm: .5rem;
    --radius: .7rem;
    --radius-lg: .9rem;
    --sidebar-width: 64px;
}
html[data-theme="blue"] {
    color-scheme: light;
    --ink: #26384f;
    --ink-strong: #10233f;
    --ink-soft: #687b93;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-soft: #eaf2ff;
    --accent: #3b82f6;
    --accent-soft: #eff6ff;
    --canvas: #ffffff;
    --surface: #ffffff;
    --surface-soft: #f6f9fd;
    --surface-hover: #f1f6ff;
    --border: #dbe5f0;
    --border-strong: #c5d3e3;
    --divider: #e8eef5;
    --sidebar-bg: #ffffff;
    --dark-panel: #16345d;
    --sidebar-accent: #2563eb;
    --primary-contrast: #ffffff;
    --page-glow: rgba(219, 234, 254, .7);
    --control-placeholder: #91a0b2;
    --rating: #e5a329;
    --success: #19795b;
    --warning: #a9660c;
    --danger: #c44848;
    --shadow-sm: 0 1px 2px rgba(30, 64, 110, .04), 0 5px 16px rgba(30, 64, 110, .05);
    --shadow-md: 0 18px 46px rgba(30, 64, 110, .11);
}
html[data-theme="red"] {
    color-scheme: light;
    --ink: #242424;
    --ink-strong: #16181a;
    --ink-soft: #757575;
    --primary: #e41e26;
    --primary-dark: #b90f18;
    --primary-soft: #fde7e8;
    --accent: #ff253a;
    --accent-soft: #fff0f1;
    --canvas: #ffffff;
    --surface: #ffffff;
    --surface-soft: #fff7f7;
    --surface-hover: #ffefef;
    --border: #ecdada;
    --border-strong: #dfc2c3;
    --divider: #f0e2e2;
    --sidebar-bg: #ffffff;
    --dark-panel: #681219;
    --sidebar-accent: #e41e26;
    --primary-contrast: #ffffff;
    --page-glow: rgba(255, 209, 211, .82);
    --control-placeholder: #9c8b8c;
    --rating: #df9c24;
    --success: #25765a;
    --warning: #a9660c;
    --danger: #c42828;
    --shadow-sm: 0 1px 2px rgba(92, 28, 38, .035), 0 5px 16px rgba(92, 28, 38, .05);
    --shadow-md: 0 18px 46px rgba(92, 28, 38, .11);
}
html[data-theme="cyberpunk"] {
    color-scheme: dark;
    --ink: #dfe8ff;
    --ink-strong: #f8fbff;
    --ink-soft: #93a4c7;
    --primary: #00e5f0;
    --primary-dark: #68f5ff;
    --primary-soft: #11363f;
    --accent: #ff3bd4;
    --accent-soft: #3b173d;
    --canvas: #080b17;
    --surface: #11162a;
    --surface-soft: #171d34;
    --surface-hover: #1b223d;
    --border: #29324f;
    --border-strong: #3b486c;
    --divider: #242d49;
    --sidebar-bg: #050711;
    --dark-panel: #090c1b;
    --sidebar-accent: #00e5f0;
    --primary-contrast: #061317;
    --page-glow: rgba(255, 59, 212, .14);
    --control-placeholder: #6f7fa3;
    --rating: #ffe45e;
    --success: #22e5a4;
    --warning: #ffd166;
    --danger: #ff667d;
    --shadow-sm: 0 0 0 1px rgba(0, 229, 240, .03), 0 8px 24px rgba(0, 0, 0, .22);
    --shadow-md: 0 18px 48px rgba(0, 0, 0, .4);
    --radius-sm: .25rem;
    --radius: .3rem;
    --radius-lg: .38rem;
}
html[data-theme="sakura"] {
    --ink: #573642;
    --ink-strong: #361c26;
    --ink-soft: #856a74;
    --primary: #c94f7c;
    --primary-dark: #a93c65;
    --primary-soft: #f9e1ea;
    --accent: #e89ab2;
    --accent-soft: #fff0f5;
    --canvas: #fff7f9;
    --surface: #fffefe;
    --surface-soft: #fff8fa;
    --surface-hover: #fff3f7;
    --border: #eed9e1;
    --border-strong: #dfbdca;
    --divider: #f1e0e6;
    --sidebar-bg: #4a2331;
    --dark-panel: #4a2331;
    --sidebar-accent: #ffc3d5;
    --primary-contrast: #ffffff;
    --page-glow: rgba(248, 190, 211, .48);
    --control-placeholder: #b298a2;
    --rating: #d8893c;
    --success: #4d8c70;
    --warning: #b6762f;
    --danger: #c84c65;
    --shadow-sm: 0 1px 2px rgba(92, 43, 61, .035), 0 5px 16px rgba(92, 43, 61, .05);
    --shadow-md: 0 18px 46px rgba(92, 43, 61, .11);
}
html[data-theme="midnight"] {
    color-scheme: dark;
    --ink: #dbe5f5;
    --ink-strong: #f5f8ff;
    --ink-soft: #93a2ba;
    --primary: #899cff;
    --primary-dark: #aebaff;
    --primary-soft: #293458;
    --accent: #55d7c2;
    --accent-soft: #183a3a;
    --canvas: #101624;
    --surface: #192235;
    --surface-soft: #202b40;
    --surface-hover: #253148;
    --border: #303d55;
    --border-strong: #43516b;
    --divider: #2c3850;
    --sidebar-bg: #0b101c;
    --dark-panel: #11192a;
    --sidebar-accent: #55d7c2;
    --primary-contrast: #ffffff;
    --page-glow: rgba(91, 111, 210, .2);
    --control-placeholder: #718098;
    --rating: #f6be61;
    --success: #54c69e;
    --warning: #e1aa55;
    --danger: #ef7b87;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .12), 0 7px 20px rgba(0, 0, 0, .15);
    --shadow-md: 0 18px 48px rgba(0, 0, 0, .3);
}
@media (forced-colors: none) {
    * { scrollbar-width: thin; scrollbar-color: var(--primary) transparent; }
}

/* ===== Base ===== */

* { box-sizing: border-box; }
html { background: var(--canvas); }
body {
    margin: 0;
    background:
        radial-gradient(circle at 92% 2%, var(--page-glow), transparent 24rem),
        var(--canvas);
    color: var(--ink);
    font-family: "DM Sans", system-ui, -apple-system, sans-serif;
    font-size: .9rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 {
    color: var(--ink-strong);
    font-family: "Manrope", "DM Sans", sans-serif;
    font-weight: 750;
    letter-spacing: -.025em;
}
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }

/* ===== App shell: icon-rail sidebar, brand, theme panel ===== */

.app-shell { min-height: 100vh; }
.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1030;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    align-items: center;
    padding: .8rem .5rem;
    background: var(--sidebar-bg);
    color: white;
}
.brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: inherit;
    text-decoration: none;
}
.brand:hover { color: inherit; }
.brand-mark {
    display: inline-grid;
    width: 2.65rem;
    height: 2.65rem;
    flex: 0 0 2.65rem;
    place-items: center;
    border-radius: .62rem;
    background: var(--accent);
    color: white;
    box-shadow: 0 8px 20px rgba(239, 131, 93, .22);
    font-size: 1.1rem;
    transform: rotate(-2deg);
}
.brand-mark-garena {
    position: relative;
    overflow: hidden;
    min-width: 0;
    min-height: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
}
.brand-mark-garena img {
    position: absolute;
    inset: -7.5%;
    display: block;
    width: 115%;
    height: 115%;
    max-width: none;
    object-fit: contain;
}
.brand strong {
    display: block;
    color: white;
    font: 800 1.06rem/1.2 "Manrope", sans-serif;
    letter-spacing: -.02em;
}
.brand small {
    display: block;
    margin-top: .12rem;
    color: rgba(255,255,255,.52);
    font-size: .72rem;
}
.app-sidebar .brand > span:not(.brand-mark),
.app-sidebar .sidebar-label { display: none; }
.app-sidebar .brand-mark {
    width: 2.25rem;
    height: 2.25rem;
    flex-basis: 2.25rem;
    border-radius: .5rem;
    font-size: .95rem;
}
.app-sidebar .sidebar-nav {
    width: 100%;
    justify-items: center;
}
.app-sidebar > .sidebar-nav { margin-top: 1.5rem; }
.app-sidebar .sidebar-link {
    position: relative;
    width: 2.5rem;
    min-height: 2.5rem;
    justify-content: center;
    padding: 0;
}
.app-sidebar .sidebar-link i {
    width: auto;
    font-size: 1.05rem;
}
.app-sidebar .sidebar-link:hover { transform: none; }
.app-sidebar .sidebar-link span,
.app-sidebar .sidebar-tooltip {
    position: absolute;
    z-index: 1080;
    top: 50%;
    left: calc(100% + .7rem);
    display: block;
    padding: .42rem .62rem;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: .4rem;
    background: var(--sidebar-bg);
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
    color: white;
    font-size: .72rem;
    font-weight: 650;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    transform: translate(.2rem, -50%);
    transition: transform .14s ease;
    visibility: hidden;
    white-space: nowrap;
}
.app-sidebar .sidebar-link:hover span,
.app-sidebar .sidebar-link:focus span,
.app-sidebar .theme-select-wrap:hover .sidebar-tooltip,
.app-sidebar .theme-select-wrap:focus-within .sidebar-tooltip {
    opacity: 1;
    transform: translate(0, -50%);
    visibility: visible;
}
.sidebar-label {
    margin: 2.5rem .7rem .7rem;
    color: rgba(255,255,255,.42);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
}
.sidebar-nav { display: grid; gap: .35rem; }
.sidebar-link {
    display: flex;
    min-height: 2.7rem;
    align-items: center;
    gap: .85rem;
    padding: .62rem .78rem;
    border-radius: .58rem;
    color: rgba(255,255,255,.65);
    font-weight: 600;
    text-decoration: none;
    transition: background .16s ease, color .16s ease, transform .16s ease;
}
.sidebar-link i { width: 1.25rem; font-size: 1.05rem; text-align: center; }
.sidebar-link:hover { background: rgba(255,255,255,.07); color: white; transform: translateX(2px); }
.sidebar-link.active { background: rgba(255,255,255,.11); color: white; }
.sidebar-link.active i { color: var(--sidebar-accent); }
.theme-panel { margin-top: auto; }
.app-sidebar .theme-panel { width: 2.5rem; }
.app-sidebar .theme-select-wrap {
    position: relative;
    width: 2.5rem;
    min-height: 2.5rem;
    justify-content: center;
    padding: 0;
}
.app-sidebar .theme-select-wrap > i { font-size: 1rem; }
.app-sidebar .theme-select {
    position: absolute;
    inset: 0;
    height: 100%;
    opacity: 0;
}
.app-sidebar .theme-panel + .sidebar-label + .sidebar-nav { margin-top: .75rem; }
.app-sidebar .sidebar-nav form {
    display: grid;
    width: 100%;
    place-items: center;
}
.app-sidebar .sidebar-logout {
    display: grid;
    width: 2.5rem;
    height: 2.5rem;
    min-height: 2.5rem;
    margin: 0;
    place-items: center;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    line-height: 1;
    appearance: none;
}
.app-sidebar .sidebar-logout i {
    display: grid;
    width: 1.25rem;
    height: 1.25rem;
    place-items: center;
    line-height: 1;
    text-align: center;
}
.theme-panel .sidebar-label { margin-top: 1.5rem; }
.theme-select-wrap {
    display: flex;
    min-height: 2.45rem;
    align-items: center;
    gap: .3rem;
    padding: 0 .45rem 0 .7rem;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,.05);
    color: var(--sidebar-accent);
}
.theme-select-wrap:focus-within { border-color: var(--sidebar-accent); outline: 2px solid color-mix(in srgb, var(--sidebar-accent) 25%, transparent); }
.theme-select-wrap > i { flex: 0 0 auto; font-size: .9rem; }
.theme-select {
    width: 100%;
    min-width: 0;
    height: 2.3rem;
    border: 0;
    outline: 0;
    background: transparent;
    color: rgba(255,255,255,.62);
    font: 650 .72rem "DM Sans", sans-serif;
    cursor: pointer;
}
.theme-select option { background: var(--sidebar-bg); color: white; }
.mobile-theme-panel { margin-top: 1.5rem; }
.app-main { position: relative; isolation: isolate; min-height: 100vh; margin-left: var(--sidebar-width); }
.app-main > .mobile-header,
.app-main > .page-content { position: relative; z-index: 1; }
.garena-watermark { position: fixed; z-index: 0; top: 50%; left: calc(50% + (var(--sidebar-width) / 2)); width: min(52vw, 46rem); max-height: 76vh; object-fit: contain; opacity: .05; transform: translate(-50%, -50%); pointer-events: none; user-select: none; }
.page-content { width: min(100%, 1480px); margin: 0 auto; padding: 2.15rem 2.35rem 3.75rem; }
.page-content-wide { width: min(100%, 1760px); padding-right: clamp(1.25rem, 2vw, 2rem); padding-left: clamp(1.25rem, 2vw, 2rem); }
.mobile-header { display: none; }

/* ===== Page headings ===== */

/* Page headings */
.page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.75rem;
}
.page-eyebrow {
    margin-bottom: .35rem;
    color: var(--primary);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .105em;
    text-transform: uppercase;
}
.page-title { margin: 0; font-size: clamp(1.5rem, 1.8vw, 1.9rem); line-height: 1.2; }
.page-subtitle { max-width: 42rem; margin: .4rem 0 0; color: var(--ink-soft); font-size: .86rem; }
.page-heading-actions { display: flex; align-items: center; gap: .65rem; }
.back-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: .65rem;
    color: var(--ink-soft);
    font-size: .82rem;
    font-weight: 650;
    text-decoration: none;
}
.back-link:hover { color: var(--primary); }

/* ===== Cards ===== */

/* Cards */
.card {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.card-header {
    display: flex;
    min-height: 3.3rem;
    align-items: center;
    gap: .55rem;
    padding: .78rem 0;
    border-bottom: 1px solid var(--divider);
    background: transparent;
    color: var(--ink-strong);
    font-family: "Manrope", sans-serif;
    font-size: .85rem;
    font-weight: 750;
}
.card-header > i { color: var(--primary); }
.card-body { padding: 1.15rem 0; }
.card-footer { padding: 1rem 0; border-top: 1px solid var(--divider); background: transparent; }
.card.border-success { border-color: #b9decf; }
.card-header.text-bg-success { background: var(--primary-soft) !important; color: var(--success) !important; }
.section-title { margin: 0; font-size: .93rem; }
.section-caption { margin: .18rem 0 0; color: var(--ink-soft); font-size: .74rem; }
.section-icon {
    display: inline-grid;
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    place-items: center;
    border-radius: .5rem;
    background: var(--primary-soft);
    color: var(--primary);
}

/* ===== Buttons ===== */

/* Buttons */
.btn {
    display: inline-flex;
    min-height: 2.4rem;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: .5rem .85rem;
    border-radius: .55rem;
    font-size: .84rem;
    font-weight: 700;
    line-height: 1.2;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { box-shadow: 0 0 0 .25rem rgba(15, 118, 110, .18); }
.btn-sm { min-height: 1.95rem; padding: .32rem .62rem; border-radius: .48rem; font-size: .74rem; }
.btn-lg { min-height: 2.65rem; padding: .58rem 1rem; font-size: .88rem; }
.btn-primary {
    --bs-btn-bg: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--primary-dark);
    --bs-btn-hover-border-color: var(--primary-dark);
    --bs-btn-active-bg: var(--primary-dark);
    --bs-btn-active-border-color: var(--primary-dark);
    --bs-btn-color: var(--primary-contrast);
    --bs-btn-hover-color: var(--primary-contrast);
    --bs-btn-active-color: var(--primary-contrast);
    box-shadow: 0 8px 18px rgba(15, 118, 110, .15);
}
.btn-success {
    --bs-btn-bg: var(--success);
    --bs-btn-border-color: var(--success);
    --bs-btn-hover-bg: #1b6c55;
    --bs-btn-hover-border-color: #1b6c55;
}
.btn-info {
    --bs-btn-bg: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-color: var(--primary-contrast);
    --bs-btn-hover-bg: var(--primary-dark);
    --bs-btn-hover-border-color: var(--primary-dark);
    --bs-btn-hover-color: var(--primary-contrast);
}
.btn-warning {
    --bs-btn-bg: #f4b860;
    --bs-btn-border-color: #f4b860;
    --bs-btn-color: #58370c;
    --bs-btn-hover-bg: #e8aa50;
    --bs-btn-hover-border-color: #e8aa50;
    --bs-btn-hover-color: #58370c;
}
.btn-outline-primary { --bs-btn-color: var(--primary); --bs-btn-border-color: var(--border-strong); --bs-btn-hover-bg: var(--primary); --bs-btn-hover-border-color: var(--primary); --bs-btn-hover-color: var(--primary-contrast); }
.btn-outline-success { --bs-btn-color: var(--success); --bs-btn-border-color: var(--border-strong); --bs-btn-hover-bg: var(--success); --bs-btn-hover-border-color: var(--success); }
.btn-outline-info { --bs-btn-color: var(--primary); --bs-btn-border-color: var(--border-strong); --bs-btn-hover-bg: var(--primary-soft); --bs-btn-hover-border-color: var(--border-strong); --bs-btn-hover-color: var(--primary-dark); }
.btn-outline-warning { --bs-btn-color: #996018; --bs-btn-border-color: #e6c992; --bs-btn-hover-bg: #f4b860; --bs-btn-hover-border-color: #f4b860; --bs-btn-hover-color: #58370c; }
.btn-outline-secondary { --bs-btn-color: var(--ink-soft); --bs-btn-border-color: var(--border-strong); --bs-btn-hover-bg: var(--surface-soft); --bs-btn-hover-border-color: var(--border-strong); --bs-btn-hover-color: var(--ink); }
.btn-outline-dark { --bs-btn-color: var(--ink); --bs-btn-border-color: var(--border-strong); --bs-btn-hover-bg: var(--ink); --bs-btn-hover-border-color: var(--ink); }
.btn-dark { --bs-btn-bg: var(--dark-panel); --bs-btn-border-color: var(--dark-panel); --bs-btn-color: #fff; }
.btn-outline-danger { --bs-btn-color: var(--danger); --bs-btn-border-color: #e7baba; --bs-btn-hover-bg: var(--danger); --bs-btn-hover-border-color: var(--danger); }

/* ===== Blocking overlay for long server-side (AI) actions ===== */

/* Blocking state for server-side AI actions */
.ai-loading-overlay { position: fixed; z-index: 2000; inset: 0; display: grid; place-items: center; padding: 1.25rem; background: rgba(7, 20, 18, .68); backdrop-filter: blur(4px); }
.ai-loading-overlay[hidden] { display: none; }
.ai-loading-card { width: min(25rem, 100%); padding: 1.6rem; border: 1px solid rgba(255,255,255,.16); border-radius: 1rem; background: var(--surface); box-shadow: 0 24px 70px rgba(0,0,0,.32); text-align: center; }
.ai-loading-card h2 { margin: 1rem 0 .35rem; color: var(--ink-strong); font-size: 1.05rem; }
.ai-loading-card p { margin: 0; color: var(--ink); font-size: .84rem; font-weight: 650; }
.ai-loading-card small { display: block; margin-top: .45rem; color: var(--ink-soft); font-size: .7rem; }
.ai-loading-spinner { display: flex; height: 1.2rem; align-items: center; justify-content: center; gap: .32rem; }
.ai-loading-spinner span { width: .55rem; height: .55rem; border-radius: 50%; background: var(--primary); animation: ai-loading-pulse .9s ease-in-out infinite; }
.ai-loading-spinner span:nth-child(2) { animation-delay: .12s; }
.ai-loading-spinner span:nth-child(3) { animation-delay: .24s; }
html.ai-action-busy, html.ai-action-busy body { overflow: hidden; }
@keyframes ai-loading-pulse { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-.3rem); } }

/* ===== Metric tiles ===== */

/* Dashboard metrics */
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem; margin-bottom: 1.35rem; }
.metric-card {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: .9rem;
    padding: .95rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.metric-icon {
    display: grid;
    width: 2.5rem;
    height: 2.5rem;
    flex: 0 0 2.5rem;
    place-items: center;
    border-radius: .6rem;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 1rem;
}
.metric-icon.orange { background: var(--accent-soft); color: #d36742; }
.metric-icon.gold { background: #fff5da; color: #a96b16; }
.metric-icon.blue { background: #e9f1fb; color: #4275a7; }
.metric-value { color: var(--ink-strong); font: 800 1.3rem/1.1 "Manrope", sans-serif; }
.metric-label { overflow: hidden; margin-top: .15rem; color: var(--ink-soft); font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }

/* ===== Filters and search ===== */

/* Filters */
.filter-panel { margin-bottom: 1rem; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.search-control { position: relative; }
.search-control > i { position: absolute; z-index: 2; top: 50%; left: .9rem; color: #82928f; transform: translateY(-50%); }
.search-control .form-control { padding-left: 2.55rem; }
.filter-chips { display: flex; gap: .45rem; margin-bottom: 1rem; overflow-x: auto; padding: .12rem .05rem .2rem; scrollbar-width: none; }
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chip {
    display: inline-flex;
    min-height: 2.05rem;
    flex: 0 0 auto;
    align-items: center;
    gap: .45rem;
    padding: .36rem .68rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink-soft);
    font-size: .72rem;
    font-weight: 650;
    text-decoration: none;
}
.filter-chip:hover { border-color: #aecbc3; color: var(--primary); }
.filter-chip.active { border-color: var(--primary); background: var(--primary); color: var(--primary-contrast); }
.filter-count { display: inline-grid; min-width: 1.35rem; height: 1.35rem; place-items: center; padding: 0 .3rem; border-radius: 999px; background: rgba(99,118,116,.11); font-size: .65rem; }
.filter-chip.active .filter-count { background: rgba(255,255,255,.14); }

/* ===== Record list (request queue rows) ===== */

/* Request queue */
.request-list { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.request-list-header, .request-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.65fr) minmax(145px, 1fr) minmax(130px, .9fr) 145px 120px 28px;
    gap: 1rem;
    align-items: center;
}
.request-list-header { padding: .75rem 1.2rem; border-bottom: 1px solid var(--border); background: var(--surface-soft); color: #73827f; font-size: .67rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.request-row { min-height: 5rem; padding: .85rem 1.1rem; border-bottom: 1px solid var(--divider); color: inherit; text-decoration: none; transition: background .15s ease; }
.request-row:last-child { border-bottom: 0; }
.request-row:hover { background: var(--surface-hover); }
.request-row:hover .request-name { color: var(--primary); }
.request-primary { min-width: 0; }
.request-number { display: block; margin-bottom: .2rem; color: var(--primary); font-size: .69rem; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; }
.request-name { display: block; overflow: hidden; color: var(--ink-strong); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.request-quantity, .cell-subtext { margin-top: .15rem; color: var(--ink-soft); font-size: .74rem; }
.cell-main { overflow: hidden; color: var(--ink); font-size: .84rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.request-arrow { color: #a5b3ae; font-size: 1rem; transition: color .15s, transform .15s; }
.request-row:hover .request-arrow { color: var(--primary); transform: translateX(2px); }
/* Flat request workspace */
.request-list-page .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid var(--divider);
    border-bottom: 1px solid var(--divider);
}
.request-list-page .metric-card {
    padding: 1rem 1.25rem;
    border: 0;
    border-right: 1px solid var(--divider);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.request-list-page .metric-card:last-child { border-right: 0; }
.request-list-page .metric-icon {
    width: 2rem;
    height: 2rem;
    flex-basis: 2rem;
    border-radius: 0;
    background: transparent;
}
.request-list-page .filter-chips {
    gap: 1.15rem;
    margin-bottom: 0;
    border-bottom: 1px solid var(--divider);
    padding: 0;
}
.request-list-page .filter-chip {
    min-height: 2.75rem;
    gap: .35rem;
    padding: .55rem .1rem;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
}
.request-list-page .filter-chip:hover { border-color: var(--border-strong); background: transparent; }
.request-list-page .filter-chip.active {
    border-color: var(--primary);
    background: transparent;
    color: var(--primary);
}
.request-list-toolbar {
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: center;
    gap: 1.5rem;
    border-bottom: 1px solid var(--divider);
}
.request-list-toolbar .filter-chips { min-width: 0; flex: 1 1 0; border-bottom: 0; }
.request-list-create { flex: 0 0 auto; margin-left: auto; margin-bottom: .35rem; white-space: nowrap; }
.request-list-search .search-control { width: 100%; }
.request-list-search .form-control { min-height: 3.25rem; padding-left: .9rem; padding-right: 6rem; }
.request-search-actions { position: absolute; top: 50%; right: .4rem; display: flex; gap: .25rem; transform: translateY(-50%); }
.request-search-actions .btn { display: grid; width: 2.35rem; height: 2.35rem; place-items: center; padding: 0; }
.request-list-page .filter-count,
.request-list-page .filter-chip.active .filter-count {
    min-width: auto;
    height: auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
}
.request-list-page .filter-panel {
    padding: .9rem 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.request-list-page .request-list {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none !important;
}
.request-list-page .request-list-header { border-top: 1px solid var(--divider); }

/* ===== Empty state ===== */

.empty-state { padding: 3.5rem 1.5rem; text-align: center; }
.empty-state-icon { display: grid; width: 4rem; height: 4rem; margin: 0 auto 1rem; place-items: center; border-radius: .7rem; background: var(--primary-soft); color: var(--primary); font-size: 1.55rem; transform: rotate(-2deg); }
.empty-state h3 { margin-bottom: .4rem; font-size: 1.05rem; }
.empty-state p { max-width: 29rem; margin: 0 auto 1.25rem; color: var(--ink-soft); }

/* ===== Forms ===== */

/* Forms */
.form-control, .form-select {
    min-height: 2.5rem;
    border-color: var(--border-strong);
    border-radius: .52rem;
    background-color: var(--surface);
    color: var(--ink);
    padding: .52rem .75rem;
    font-size: .83rem;
}
.form-control::placeholder { color: var(--control-placeholder); }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 .22rem rgba(15, 118, 110, .11); }
textarea.form-control { min-height: 5.4rem; }
.form-select[multiple] { min-height: 8.5rem; }
.form-label { margin-bottom: .4rem; color: var(--ink); font-size: .78rem; font-weight: 700; }
.form-text { margin-top: .35rem; color: var(--ink-soft); font-size: .7rem; }
.form-check-input:checked { border-color: var(--primary); background-color: var(--primary); }
.required-mark { margin-left: .15rem; color: var(--accent); }
.field-error { display: flex; align-items: center; gap: .3rem; margin-top: .3rem; color: var(--danger); font-size: .72rem; }
.form-card { overflow: visible; }
.form-section { padding: 1.35rem; border-bottom: 1px solid var(--divider); }
.form-section:last-child { border-bottom: 0; }
.form-section-heading { display: flex; align-items: flex-start; gap: .7rem; margin-bottom: 1.25rem; }
.form-section-number { display: grid; width: 1.75rem; height: 1.75rem; flex: 0 0 1.75rem; place-items: center; border-radius: .45rem; background: var(--primary-soft); color: var(--primary); font: 750 .72rem "Manrope", sans-serif; }
.form-section-title { margin: .05rem 0 0; font-size: .86rem; }
.form-section-description { margin: .15rem 0 0; color: var(--ink-soft); font-size: .72rem; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: .65rem; padding: 1.2rem 1.5rem; border-top: 1px solid var(--divider); background: var(--surface-soft); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.guidance-card { position: sticky; top: 2rem; padding: 1.2rem; border: 0; background: var(--dark-panel); color: white; box-shadow: var(--shadow-md); }
.guidance-card h3 { color: white; font-size: .92rem; }
.guidance-card > p { color: rgba(255,255,255,.56); font-size: .78rem; }
.guidance-step { display: flex; gap: .75rem; padding: .85rem 0; border-top: 1px solid rgba(255,255,255,.09); }
.guidance-step-icon { display: grid; width: 1.85rem; height: 1.85rem; flex: 0 0 1.85rem; place-items: center; border-radius: .48rem; background: rgba(255,255,255,.09); color: #79d5c0; }
.guidance-step strong { display: block; color: white; font-size: .76rem; }
.guidance-step small { display: block; margin-top: .15rem; color: rgba(255,255,255,.5); font-size: .68rem; line-height: 1.4; }

/* ===== Modal forms with numbered sections and AI extraction status (from Manpower) ===== */

.onboarding-modal .modal-content { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-md); }
.onboarding-modal .modal-header { padding: 1rem 1.25rem; border-bottom-color: var(--divider); background: var(--surface-soft); }
.onboarding-modal .modal-title { margin-top: .15rem; color: var(--ink-strong); font: 800 1.2rem "Manrope", sans-serif; }
.onboarding-modal .modal-footer { gap: .65rem; padding: .85rem 1.25rem; border-top-color: var(--divider); background: var(--surface-soft); }
.onboarding-form-alert { margin: 1rem 1.25rem 0; }
.form-alert { display: flex; align-items: flex-start; gap: .55rem; margin-bottom: 1rem; padding: .7rem .85rem; border: 0; border-radius: .55rem; font-size: .84rem; }
.form-alert > i { line-height: 1.45; }
.alert .errorlist { margin: 0; padding-left: 1.1rem; }
.onboarding-section { padding: 1.15rem 1.25rem 1.3rem; border-bottom: 1px solid var(--divider); transition: background-color .2s ease, box-shadow .2s ease; }
.onboarding-section:last-child { border-bottom: 0; }
.onboarding-section.is-complete { background: color-mix(in srgb, var(--success) 8%, var(--surface)); box-shadow: inset 3px 0 0 var(--success); }
.onboarding-section.is-complete .onboarding-section-icon { background: var(--success); color: var(--primary-contrast); }
.onboarding-section.is-complete .onboarding-section-heading h3 { color: var(--success); }
.onboarding-section-heading { display: flex; align-items: center; gap: .7rem; margin-bottom: .85rem; }
.onboarding-section-icon { display: grid; width: 2.15rem; height: 2.15rem; flex: 0 0 2.15rem; place-items: center; border-radius: .5rem; background: var(--primary-soft); color: var(--primary); }
.onboarding-section-heading span:not(.onboarding-section-icon):not(.ai-extraction-status) { display: block; color: var(--ink-soft); font-size: .62rem; font-weight: 750; text-transform: uppercase; }
.onboarding-section-heading h3 { margin: .08rem 0 0; color: var(--ink-strong); font-size: .9rem; }
.onboarding-upload-field { display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: 0 .8rem; align-items: center; padding: .7rem .8rem; border: 1px dashed var(--border-strong); border-radius: .5rem; background: var(--surface-soft); }
.onboarding-upload-field .form-label { margin: 0; }
.onboarding-upload-field .field-error { grid-column: 2; }
.ai-extraction-status { display: inline-flex; max-width: 22rem; align-items: center; gap: .35rem; margin-left: auto; color: var(--ink-soft); font-size: .7rem; font-weight: 700; text-align: right; }
.ai-extraction-status.is-loading { color: var(--primary); }
.ai-extraction-status.is-loading i { animation: onboarding-spin .8s linear infinite; }
.ai-extraction-status.is-success { color: var(--success); }
.ai-extraction-status.is-warning { color: var(--warning); }
.ai-extraction-status.is-error { color: var(--danger); }
.onboarding-footer-status { display: inline-flex; align-items: center; gap: .35rem; margin-right: auto; color: var(--ink-soft); font-size: .7rem; }
.onboarding-footer-status i { color: var(--success); }
@keyframes onboarding-spin { to { transform: rotate(360deg); } }

/* ===== Badges ===== */

/* Status */
.badge { border-radius: 999px; padding: .45em .72em; font-size: .68rem; font-weight: 750; letter-spacing: .005em; }
.status-badge { display: inline-flex; align-items: center; gap: .35rem; font-weight: 400; letter-spacing: 0; }
.status-badge::before { width: .4rem; height: .4rem; border-radius: 50%; background: currentColor; content: ""; opacity: .8; }
.badge.text-bg-secondary { background: #edf1ee !important; color: #60736e !important; }
.badge.text-bg-info { background: #e1f2f2 !important; color: #237277 !important; }
.badge.text-bg-primary { background: #e1f1ed !important; color: #126c62 !important; }
.badge.text-bg-warning { background: #fff2d8 !important; color: #95601c !important; }
.badge.text-bg-success { background: #dff1e9 !important; color: #247158 !important; }
.badge.text-bg-danger { background: #fbe8e6 !important; color: #a54a48 !important; }
.badge.text-bg-light { background: #f0f3f0 !important; color: #637672 !important; border: 0 !important; }

/* ===== Tables ===== */

/* Tables */
.table { --bs-table-bg: transparent; --bs-table-color: var(--ink); margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .9rem 1rem; border-bottom-color: var(--divider); }
.table > thead.table-light > tr > th, .table .table-light th { --bs-table-bg: var(--surface-soft); background: var(--surface-soft); color: var(--ink-soft); font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.table-hover > tbody > tr:hover > * { --bs-table-accent-bg: var(--surface-hover); }
.table-sm > :not(caption) > * > * { padding: .72rem .85rem; }
tr.table-success > * { --bs-table-bg: #edf8f3; }
tr.table-secondary > * { --bs-table-bg: #f4f5f3; color: #75837f; }
td.numeric, th.numeric { text-align: right; }
/* long unbroken tokens (review/tracking URLs) must wrap instead of
   stretching the table into a horizontal scroll */

/* ===== Progress stepper ===== */

/* Progress */
.progress-card .card-body { padding: .75rem; }
.stepper {
    display: flex;
    overflow-x: auto;
    border-radius: .55rem;
    scrollbar-width: thin;
}
.step {
    position: relative;
    display: flex;
    min-height: 3.15rem;
    flex: 1 0 8.75rem;
    align-items: center;
    padding: .7rem 1.8rem;
    margin-left: -13px;
    clip-path: polygon(0 0, calc(100% - 17px) 0, 100% 50%, calc(100% - 17px) 100%, 0 100%, 17px 50%);
    background: var(--surface-soft);
    color: var(--ink-soft);
}
.step:first-child {
    margin-left: 0;
    padding-left: 1.15rem;
    clip-path: polygon(0 0, calc(100% - 17px) 0, 100% 50%, calc(100% - 17px) 100%, 0 100%);
}
.step:last-child {
    padding-right: 1.15rem;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 17px 50%);
}
.step.done { background: var(--primary-soft); color: var(--primary); }
.step.current { background: var(--primary); color: var(--primary-contrast); }
.step-label { font-size: .72rem; font-weight: 650; line-height: 1.25; }
.step.current .step-label { font-weight: 800; }
.step.done .step-label { font-weight: 750; }

/* ===== Detail pages: section tabs, meta line, info grid, flat cards ===== */

/* Detail */
.detail-section-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.detail-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .15rem .25rem;
    min-width: 0;
}
.detail-tabs[hidden], .detail-page [data-detail-panel][hidden] { display: none !important; }
.detail-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 2.85rem;
    max-width: 100%;
    padding: .7rem .9rem;
    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: var(--ink-soft);
    font: inherit;
    font-size: .8rem;
    font-weight: 650;
    line-height: 1.3;
    text-align: left;
}
.detail-tab:hover { color: var(--ink); background: var(--primary-soft); }
.detail-tab[aria-selected="true"] { color: var(--primary); border-bottom-color: var(--primary); }
.detail-tab:focus-visible, [data-detail-panel]:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.detail-tab-badge {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    min-width: 1.2rem;
    height: 1.2rem;
    padding: 0 .25rem;
    border-radius: 50%;
    background: var(--warning);
    color: var(--surface);
    font-size: .65rem;
    font-weight: 800;
}
.detail-action-notice {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem 1.5rem;
    margin-bottom: 1.25rem;
    padding: .8rem 1rem;
    border-left: 3px solid var(--warning);
    background: color-mix(in srgb, var(--warning) 9%, var(--surface));
}
.detail-action-heading { display: flex; align-items: center; gap: .5rem; color: var(--ink); }
.detail-action-heading > .bi { color: var(--warning); }
.detail-action-heading h2 { margin: 0; font-size: .8rem; font-weight: 750; }
.detail-action-links { display: flex; flex-wrap: wrap; gap: .45rem 1.5rem; }
.detail-action-links a { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); font-size: .8rem; font-weight: 600; text-underline-offset: .2rem; }
.detail-action-links a > .bi { flex: 0 0 auto; color: var(--primary); }
.detail-download-toolbar { display: flex; justify-content: flex-end; margin-left: auto; padding: .35rem 0; }
@media (max-width: 575.98px) {
    .detail-tabs { gap: 0 .15rem; }
    .detail-tab { min-height: 2.75rem; padding: .7rem .65rem; font-size: .75rem; }
    .detail-tab > .bi { display: none; }
    .detail-action-notice { align-items: flex-start; flex-direction: column; }
    .detail-action-links { flex-direction: column; }
}
@media print {
    .detail-tabs, .detail-action-notice { display: none; }
    .detail-page [data-detail-panel][hidden] { display: block !important; }
}
/* Dark "next action" panel: the single next step for the viewer's role (see screenshots/detail-page.png). */
.next-action-panel { margin-bottom: 1.25rem; padding: 1.25rem 1.35rem 1.35rem; border-radius: var(--radius-lg); background: var(--dark-panel); color: #fff; box-shadow: var(--shadow-md); }
.next-action-panel .next-action-eyebrow { display: block; margin-bottom: .45rem; color: rgba(255, 255, 255, .62); font-size: .72rem; font-weight: 600; }
.next-action-panel h2 { margin: 0 0 .9rem; color: #fff; font-size: 1rem; }
.next-action-panel p { margin: -.5rem 0 .9rem; color: rgba(255, 255, 255, .72); font-size: .78rem; }
.next-action-panel .btn-primary { --bs-btn-bg: var(--primary-soft); --bs-btn-border-color: var(--primary-soft); --bs-btn-color: var(--primary-dark); --bs-btn-hover-bg: #fff; --bs-btn-hover-border-color: #fff; --bs-btn-hover-color: var(--primary-dark); width: 100%; }
.next-action-panel .next-action-secondary { display: block; margin-top: .75rem; color: #ff9d80; font-size: .76rem; font-weight: 600; text-align: center; text-decoration: none; }
.next-action-panel .next-action-secondary:hover { color: #fff; text-decoration: underline; }
html[data-theme="blue"] .next-action-panel .btn-primary, html[data-theme="red"] .next-action-panel .btn-primary { --bs-btn-bg: #fff; --bs-btn-border-color: #fff; }
.detail-page > .progress-card,
.detail-page > .row > [class*="col-"] > .card {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.detail-page > .progress-card > .card-body { padding: 0; }
.detail-page > .row > [class*="col-"] > .card > .card-header {
    padding: .85rem 0;
    background: transparent;
}
.detail-page > .row > [class*="col-"] > .card > .card-body {
    padding: 1.15rem 0 1.75rem;
}
.detail-page > .row > [class*="col-"] > .card > .card-footer {
    padding-right: 0;
    padding-left: 0;
    background: transparent;
}
.detail-meta { display: flex; flex-wrap: wrap; gap: .55rem 1.25rem; margin-top: .75rem; color: var(--ink-soft); font-size: .76rem; }
.detail-meta span { display: inline-flex; align-items: center; gap: .35rem; }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2.5rem; }
.info-row { display: grid; grid-template-columns: 8.2rem 1fr; gap: 1rem; padding: .67rem 0; border-bottom: 1px solid var(--divider); }
.info-row:nth-last-child(-n+2) { border-bottom: 0; }
.info-label { color: var(--ink-soft); font-size: .73rem; }
.info-value { color: var(--ink-strong); font-size: .83rem; font-weight: 600; }
.notes-box { margin-top: 1rem; padding: .8rem .9rem; border-radius: .55rem; background: var(--surface-soft); color: var(--ink-soft); font-size: .75rem; }

/* ===== Action panels (next step call-to-action) ===== */

.review-action-panel {
    border: 1px solid var(--border);
    border-radius: .75rem;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.review-action-heading { display: flex; align-items: center; gap: .75rem; padding: .9rem 1rem; }
.review-action-icon { display: grid; width: 2rem; height: 2rem; flex: 0 0 2rem; place-items: center; border-radius: .55rem; background: var(--primary-soft); color: var(--primary); }
.review-action-copy { min-width: 0; }
.review-action-copy h2 { margin: 0; color: var(--ink-strong); font: 750 .82rem/1.35 "Manrope", sans-serif; }
.review-action-copy p { margin: .12rem 0 0; color: var(--ink-soft); font-size: .68rem; line-height: 1.4; }
.review-action-button { flex: 0 0 auto; margin-left: auto; }
.review-action-form { padding: 1rem; border-top: 1px solid var(--divider); }
.review-form-label { padding-top: 1rem; color: var(--ink-soft); font-size: .63rem; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
/* Action panels: each workflow step sits in the card that holds its data
   (place the order under the quotations, arrival/pickup under delivery photos). */
.action-panel { display: grid; gap: .8rem; }
.action-panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; }
.action-panel-title { display: inline-flex; align-items: center; gap: .45rem; color: var(--ink); font: 750 .95rem/1.3 "Manrope", sans-serif; }
.action-status { display: inline-flex; align-items: center; gap: .55rem; padding: .45rem .75rem; border: 1px solid color-mix(in srgb, var(--success) 35%, transparent); border-radius: .55rem; background: color-mix(in srgb, var(--success) 10%, var(--surface)); color: var(--ink); font-size: .74rem; }
.action-status > .bi { color: var(--success); }
.action-status.warning { border-color: color-mix(in srgb, var(--warning) 45%, transparent); background: color-mix(in srgb, var(--warning) 12%, var(--surface)); }
.action-status.warning > .bi { color: color-mix(in srgb, var(--warning) 80%, black); }
.action-status-copy { display: grid; min-width: 0; gap: .1rem; line-height: 1.3; }
.action-status-copy strong { font-size: .74rem; font-weight: 750; }
.action-status-copy small { color: var(--ink-soft); font-size: .66rem; font-weight: 500; }
.action-panel-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .6rem 1rem; }
.action-panel-controls form { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin: 0; }
.rating-stars { color: var(--rating); white-space: nowrap; letter-spacing: .02em; }
.stat-card { padding: 1.1rem; text-align: left; }
.stat-card .stat-icon { display: grid; width: 2rem; height: 2rem; margin-bottom: .8rem; place-items: center; border-radius: .6rem; background: var(--primary-soft); color: var(--primary); }
.stat-card .stat-value { color: var(--ink-strong); font: 800 1.2rem "Manrope", sans-serif; }
.stat-card .stat-label { margin-top: .15rem; color: var(--ink-soft); font-size: .69rem; }

/* ===== Activity toggle and timeline ===== */

/* Timeline */
.activity-toggle {
    display: flex;
    width: 100%;
    align-items: center;
    gap: .75rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
}
.activity-toggle .section-title,
.activity-toggle .section-caption { display: block; }
.activity-toggle-icon { margin-left: auto; color: var(--ink-soft); transition: transform .2s ease; }
.activity-toggle[aria-expanded="true"] .activity-toggle-icon { transform: rotate(180deg); }
.timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.timeline::before { position: absolute; top: 8px; bottom: 8px; left: 7px; width: 2px; background: var(--border); content: ""; }
.timeline-item { position: relative; padding: 0 0 1.2rem 1.9rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { position: absolute; top: 3px; left: 1px; width: 13px; height: 13px; border: 3px solid var(--surface); border-radius: 50%; background: #aebbb7; box-shadow: 0 0 0 1px #ccd8d1; content: ""; }
.timeline-item.done::before { background: var(--primary); }
.timeline-item.cancelled::before { background: var(--danger); }
.timeline-title { color: var(--ink-strong); font-size: .76rem; font-weight: 700; }
.timeline-date { color: var(--ink-soft); font-size: .65rem; }

/* ===== Alerts and utilities ===== */

/* Alerts and utility */
.message-stack { position: relative; z-index: 5; }
.alert { display: flex; align-items: center; gap: .7rem; border: 0; border-radius: .62rem; font-size: .78rem; }
.alert .btn-close { margin-left: auto; }
.alert-icon { font-size: 1rem; }
.alert-success { background: #e2f2e9; color: #226c54; }
.alert-info, .alert-primary { background: #e5f1f0; color: #1c6862; }
.alert-warning { background: #fff2d9; color: #8d5c1d; }
.alert-danger { background: #fae8e6; color: #9c4846; }
.alert-light { background: var(--surface-soft); color: var(--ink-soft); }
.text-muted { color: var(--ink-soft) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-primary { color: var(--primary) !important; }
.icon-button { display: inline-grid; width: 2.05rem; height: 2.05rem; place-items: center; border: 1px solid var(--border); border-radius: .48rem; background: var(--surface); color: var(--ink-soft); text-decoration: none; }
.icon-button:hover { border-color: #b8cbc3; color: var(--primary); }
.min-w-0 { min-width: 0; }

/* ===== List options dropdown with a switch (from Manpower) ===== */

.record-list-options { flex: 0 0 2.5rem; width: 2.5rem; }
.record-list-options-button { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; padding: 0; }
.record-list-options-button.is-active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.record-list-options .dropdown-menu { min-width: 12rem; padding: .3rem; border: 1px solid var(--border); border-radius: .4rem; background: var(--surface); box-shadow: var(--shadow-sm); }
.record-archive-toggle { display: flex; align-items: center; gap: 1rem; min-height: 2.5rem; padding: .5rem .65rem; border-radius: .25rem; color: var(--ink); font-size: .8rem; font-weight: 600; line-height: 1.25; white-space: nowrap; cursor: pointer; }
.record-archive-toggle:hover { background: var(--surface-hover); }
.record-archive-toggle:has(:focus-visible) { outline: 2px solid var(--primary); outline-offset: -2px; }
.record-archive-toggle .form-check-label { flex: 1; }
.record-archive-toggle .form-check-input { position: relative; order: 1; float: none; flex: 0 0 1.875rem; width: 1.875rem; height: 1rem; margin: 0; border: 1px solid var(--border-strong); border-radius: 1rem; background: var(--surface-soft); box-shadow: none; cursor: pointer; }
.record-archive-toggle .form-check-input::before { content: ""; position: absolute; top: 2px; left: 2px; width: calc(1rem - 6px); height: calc(1rem - 6px); border-radius: 50%; background: var(--ink-soft); transition: transform .15s ease; }
.record-archive-toggle .form-check-input:checked { border-color: var(--primary); background: var(--primary); }
.record-archive-toggle .form-check-input:checked::before { transform: translateX(.875rem); background: var(--primary-contrast); }

/* ===== Record popup: list row opens the detail page inside an iframe modal (from Manpower) ===== */

.record-modal .modal-dialog { width: min(92vw, 64rem); max-width: none; }
.record-modal.record-modal-wide .modal-dialog { width: min(96vw, 90rem); }
.record-modal .modal-content { max-height: calc(100dvh - 2rem); overflow: hidden; border: 1px solid var(--border); border-radius: .7rem; background: var(--surface); box-shadow: var(--shadow-md); }
.record-modal .modal-header { min-height: 3.6rem; padding: .8rem 1rem; border-color: var(--divider); background: var(--surface-soft); }
.record-modal .modal-title { min-width: 0; flex: 1; overflow: hidden; color: var(--ink-strong); font: 800 1rem "Manrope", sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.record-modal-actions { display: flex; flex: 0 0 auto; align-items: center; gap: .55rem; }
.record-modal-actions .btn-close { margin: 0; }
.record-modal .modal-body { flex: 0 1 auto; min-height: 0; overflow: hidden; }
.record-frame { display: block; width: 100%; height: min(80vh, 40rem); border: 0; background: var(--surface); }
body.popup-page { min-height: 100vh; background: var(--surface); }
body.popup-page .app-sidebar,
body.popup-page .mobile-header,
body.popup-page .garena-watermark { display: none; }
body.popup-page .app-shell,
body.popup-page .app-main { min-height: 0; }
body.popup-page .app-main { margin-left: 0; }
body.popup-page .page-content { width: 100%; padding: .6rem 1rem .85rem; }
body.popup-page .page-heading { margin-bottom: 1rem; }
body.popup-page .page-title { font-size: 1.25rem; letter-spacing: 0; }
.record-modal [hidden] { display: none !important; }
.record-popup-loading { display: flex; align-items: center; justify-content: center; gap: .65rem; min-height: 12rem; color: var(--ink-soft); }
@media (max-width: 575.98px) {
    .record-modal .modal-header { gap: .5rem; }
    .record-modal-actions { gap: .35rem; }
    .record-modal-actions .btn:not(.btn-close) { width: 2rem; padding-right: 0; padding-left: 0; }
    .record-modal-actions .btn span { display: none; }
}

/* ===== Viewer-email watermark (optional, see base.html) ===== */

/* Tiled viewer-email watermark so leaked screenshots identify who viewed the data. */
.email-watermark { position: fixed; z-index: 3000; inset: 0; background-repeat: repeat; pointer-events: none; user-select: none; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
body.modal-open > .email-watermark { filter: brightness(.35); }
html[data-theme="cyberpunk"] body.modal-open > .email-watermark,
html[data-theme="midnight"] body.modal-open > .email-watermark { filter: brightness(2); }

/* ===== Theme character: per-theme component overrides ===== */

/* Theme character */
html[data-theme="cyberpunk"] body {
    background-image:
        linear-gradient(rgba(0, 229, 240, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 240, .025) 1px, transparent 1px),
        radial-gradient(circle at 92% 2%, var(--page-glow), transparent 24rem);
    background-size: 32px 32px, 32px 32px, auto;
}
html[data-theme="cyberpunk"] .garena-watermark,
html[data-theme="midnight"] .garena-watermark { opacity: .08; }
html[data-theme="cyberpunk"] .brand-mark { box-shadow: 0 0 18px rgba(255, 59, 212, .45); }
html[data-theme="cyberpunk"] .page-eyebrow { color: var(--accent); }
html[data-theme="cyberpunk"] .card,
html[data-theme="cyberpunk"] .request-list { box-shadow: 0 0 0 1px rgba(0, 229, 240, .025), var(--shadow-sm); }
html[data-theme="sakura"] body {
    background-image:
        radial-gradient(circle at 8% 15%, rgba(238, 160, 186, .16) 0 5px, transparent 6px),
        radial-gradient(circle at 13% 21%, rgba(238, 160, 186, .1) 0 3px, transparent 4px),
        radial-gradient(circle at 92% 2%, var(--page-glow), transparent 24rem);
    background-size: 180px 180px, 220px 220px, auto;
}
html[data-theme="sakura"] .brand-mark { background: linear-gradient(145deg, #e58faa, #cc557f); }
html[data-theme="blue"] .app-sidebar {
    border-right: 1px solid var(--border);
    color: var(--ink);
}
html[data-theme="blue"] .brand-mark { box-shadow: 0 8px 20px rgba(37, 99, 235, .2); }
html[data-theme="blue"] .brand strong { color: var(--ink-strong); }
html[data-theme="blue"] .brand small,
html[data-theme="blue"] .sidebar-label { color: var(--ink-soft); }
html[data-theme="blue"] .sidebar-link { color: var(--ink-soft); }
html[data-theme="blue"] .sidebar-link:hover {
    background: var(--primary-soft);
    color: var(--primary-dark);
}
html[data-theme="blue"] .sidebar-link.active {
    background: var(--primary-soft);
    color: var(--primary);
}
html[data-theme="blue"] .app-sidebar .sidebar-link span,
html[data-theme="blue"] .app-sidebar .sidebar-tooltip {
    border-color: #214674;
    background: #16345d;
    color: white;
}
html[data-theme="blue"] .theme-select-wrap {
    border-color: var(--border-strong);
    background: var(--surface-soft);
    color: var(--primary);
}
html[data-theme="blue"] .theme-select { color: var(--ink-soft); }
html[data-theme="blue"] .theme-select option { background: white; color: var(--ink); }
html[data-theme="blue"] .offcanvas { background: white; color: var(--ink); }
html[data-theme="blue"] .offcanvas-title,
html[data-theme="blue"] .offcanvas h5 { color: var(--ink-strong); }
html[data-theme="blue"] .offcanvas .btn-close { filter: none; }
html[data-theme="red"] .app-sidebar {
    border-right: 1px solid var(--border);
    color: var(--ink);
}
html[data-theme="red"] .brand-mark {
    background: var(--primary);
    box-shadow: 0 8px 22px rgba(228, 30, 38, .3);
}
html[data-theme="red"] .brand strong { color: var(--ink-strong); }
html[data-theme="red"] .brand small,
html[data-theme="red"] .sidebar-label { color: var(--ink-soft); }
html[data-theme="red"] .sidebar-link { color: var(--ink-soft); }
html[data-theme="red"] .sidebar-link:hover {
    background: var(--primary-soft);
    color: var(--primary-dark);
}
html[data-theme="red"] .sidebar-link.active {
    background: var(--primary);
    color: white;
}
html[data-theme="red"] .sidebar-link.active i { color: white; }
html[data-theme="red"] .app-sidebar .sidebar-link span,
html[data-theme="red"] .app-sidebar .sidebar-tooltip {
    border-color: #8b171e;
    background: #681219;
    color: white;
}
html[data-theme="red"] .theme-select-wrap {
    border-color: var(--border-strong);
    background: var(--surface-soft);
    color: var(--primary);
}
html[data-theme="red"] .theme-select { color: var(--ink-soft); }
html[data-theme="red"] .theme-select option { background: white; color: var(--ink); }
html[data-theme="red"] .offcanvas { background: white; color: var(--ink); }
html[data-theme="red"] .offcanvas-title,
html[data-theme="red"] .offcanvas h5 { color: var(--ink-strong); }
html[data-theme="red"] .offcanvas .btn-close { filter: none; }
html[data-theme="cyberpunk"] .metric-icon.orange,
html[data-theme="midnight"] .metric-icon.orange { background: #42253d; color: #ff7edb; }
html[data-theme="cyberpunk"] .metric-icon.gold,
html[data-theme="midnight"] .metric-icon.gold { background: #413822; color: #f4c967; }
html[data-theme="cyberpunk"] .metric-icon.blue,
html[data-theme="midnight"] .metric-icon.blue { background: #213653; color: #82b7ff; }
html[data-theme="cyberpunk"] .text-dark,
html[data-theme="midnight"] .text-dark { color: var(--ink-strong) !important; }
/* Bootstrap components fall back to its own (black-on-white) palette unless its variables follow the theme. */
html[data-theme="cyberpunk"],
html[data-theme="midnight"] {
    --bs-body-color: var(--ink);
    --bs-body-bg: var(--canvas);
    --bs-emphasis-color: var(--ink-strong);
    --bs-secondary-color: var(--ink-soft);
    --bs-tertiary-color: var(--ink-soft);
    --bs-secondary-bg: var(--surface-soft);
    --bs-tertiary-bg: var(--surface-soft);
    --bs-border-color: var(--border);
    --bs-heading-color: var(--ink-strong);
    --bs-link-color: var(--primary);
    --bs-link-hover-color: var(--primary-dark);
    --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23dee2e6' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}
html[data-theme="cyberpunk"] .form-control,
html[data-theme="cyberpunk"] .form-select,
html[data-theme="cyberpunk"] .form-control-plaintext,
html[data-theme="cyberpunk"] .input-group-text,
html[data-theme="cyberpunk"] .modal-content,
html[data-theme="cyberpunk"] .dropdown-menu,
html[data-theme="cyberpunk"] .dropdown-item,
html[data-theme="cyberpunk"] .list-group-item,
html[data-theme="cyberpunk"] .accordion-body,
html[data-theme="cyberpunk"] .offcanvas,
html[data-theme="cyberpunk"] .ts-control,
html[data-theme="cyberpunk"] .ts-dropdown,
html[data-theme="cyberpunk"] details,
html[data-theme="cyberpunk"] summary,
html[data-theme="midnight"] .form-control,
html[data-theme="midnight"] .form-select,
html[data-theme="midnight"] .form-control-plaintext,
html[data-theme="midnight"] .input-group-text,
html[data-theme="midnight"] .modal-content,
html[data-theme="midnight"] .dropdown-menu,
html[data-theme="midnight"] .dropdown-item,
html[data-theme="midnight"] .list-group-item,
html[data-theme="midnight"] .accordion-body,
html[data-theme="midnight"] .offcanvas,
html[data-theme="midnight"] .ts-control,
html[data-theme="midnight"] .ts-dropdown,
html[data-theme="midnight"] details,
html[data-theme="midnight"] summary { color: var(--ink); }
html[data-theme="cyberpunk"] .form-select option,
html[data-theme="midnight"] .form-select option { background: var(--surface); color: var(--ink); }
html[data-theme="cyberpunk"] .input-group-text,
html[data-theme="cyberpunk"] .dropdown-menu,
html[data-theme="cyberpunk"] .ts-dropdown,
html[data-theme="midnight"] .input-group-text,
html[data-theme="midnight"] .dropdown-menu,
html[data-theme="midnight"] .ts-dropdown { border-color: var(--border-strong); background: var(--surface); }
html[data-theme="cyberpunk"] .text-muted,
html[data-theme="midnight"] .text-muted { color: var(--ink-soft) !important; }
html[data-theme="cyberpunk"] .badge.bg-light,
html[data-theme="midnight"] .badge.bg-light { background: var(--surface-soft) !important; color: var(--ink-soft) !important; }
html[data-theme="cyberpunk"] .form-control,
html[data-theme="cyberpunk"] .form-select,
html[data-theme="midnight"] .form-control,
html[data-theme="midnight"] .form-select { color-scheme: dark; }
html[data-theme="cyberpunk"] .badge.text-bg-secondary,
html[data-theme="midnight"] .badge.text-bg-secondary { background: #29324b !important; color: #c5d0e6 !important; }
html[data-theme="cyberpunk"] .badge.text-bg-info,
html[data-theme="midnight"] .badge.text-bg-info { background: #163b47 !important; color: #72e5f0 !important; }
html[data-theme="cyberpunk"] .badge.text-bg-primary,
html[data-theme="midnight"] .badge.text-bg-primary { background: var(--primary-soft) !important; color: var(--primary) !important; }
html[data-theme="cyberpunk"] .badge.text-bg-warning,
html[data-theme="midnight"] .badge.text-bg-warning { background: #493b22 !important; color: #f5c66f !important; }
html[data-theme="cyberpunk"] .badge.text-bg-success,
html[data-theme="midnight"] .badge.text-bg-success { background: #163c35 !important; color: #68dcb6 !important; }
html[data-theme="cyberpunk"] .badge.text-bg-danger,
html[data-theme="midnight"] .badge.text-bg-danger { background: #482633 !important; color: #ff94a1 !important; }
html[data-theme="cyberpunk"] .badge.text-bg-light,
html[data-theme="midnight"] .badge.text-bg-light { background: var(--surface-soft) !important; color: var(--ink-soft) !important; }
/* Example of per-status badge colours keyed on data-status; define your own statuses.
html .badge.status-badge[data-status="new"] { background: #facc15 !important; color: #1f2328 !important; }
html .badge.status-badge[data-status="completed"] { background: #1a7f37 !important; color: #fff !important; }
html .badge.status-badge[data-status="cancelled"] { background: #cf222e !important; color: #fff !important; } */
html[data-theme="cyberpunk"] .alert-success,
html[data-theme="midnight"] .alert-success { background: #173a32; color: #80d9bc; }
html[data-theme="cyberpunk"] .alert-info,
html[data-theme="cyberpunk"] .alert-primary,
html[data-theme="midnight"] .alert-info,
html[data-theme="midnight"] .alert-primary { background: var(--primary-soft); color: var(--primary); }
html[data-theme="cyberpunk"] .alert-warning,
html[data-theme="midnight"] .alert-warning { background: #45381f; color: #edc275; }
html[data-theme="cyberpunk"] .alert-danger,
html[data-theme="midnight"] .alert-danger { background: #44242e; color: #f49aa6; }
html[data-theme="cyberpunk"] tr.table-success > *,
html[data-theme="midnight"] tr.table-success > * { --bs-table-bg: #16372f; color: var(--ink); }
html[data-theme="cyberpunk"] tr.table-secondary > *,
html[data-theme="midnight"] tr.table-secondary > * { --bs-table-bg: var(--surface-soft); color: var(--ink-soft); }
/* Keep the transparent Garena mark from inheriting each theme's app-icon tile. */
html .brand-mark.brand-mark-garena {
    background: transparent;
    box-shadow: none;
}

/* ===== Responsive ===== */

@media (max-width: 1199.98px) {
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .request-list-page .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .request-list-page .metric-card:nth-child(2) { border-right: 0; }
    .request-list-page .metric-card:last-child { border-top: 1px solid var(--divider); }
    .request-list-header, .request-row { grid-template-columns: minmax(220px, 1.5fr) minmax(140px, 1fr) 135px 115px 28px; }
    .request-category { display: none; }
}
@media (max-width: 991.98px) {
    .app-sidebar { display: none; }
    .app-main { margin-left: 0; }
    .mobile-header { display: flex; height: 4.5rem; align-items: center; justify-content: space-between; padding: .8rem 1.25rem; border-bottom: 1px solid var(--border); background: var(--canvas); backdrop-filter: blur(12px); }
    .mobile-header .brand { color: var(--ink-strong); }
    .mobile-header .brand strong { color: var(--ink-strong); }
    .mobile-header .brand-mark { width: 2.35rem; height: 2.35rem; flex-basis: 2.35rem; }
    .mobile-menu { display: grid; width: 2.35rem; height: 2.35rem; place-items: center; border: 1px solid var(--border); border-radius: .5rem; background: var(--surface); color: var(--ink); font-size: 1.15rem; }
    .offcanvas { background: var(--dark-panel); color: white; }
    .offcanvas-title, .offcanvas h5 { color: white; }
    .offcanvas .btn-close { filter: invert(1); }
    .page-content { padding: 1.75rem 1.25rem 3rem; }
    .guidance-card { position: static; }
    .info-grid { grid-template-columns: 1fr; }
    .info-row:nth-last-child(-n+2) { border-bottom: 1px solid var(--divider); }
    .info-row:last-child { border-bottom: 0; }
}
@media (max-width: 767.98px) {
    .page-heading { align-items: stretch; flex-direction: column; margin-bottom: 1.35rem; }
    .page-heading-actions .btn { width: 100%; }
    .page-title { font-size: 1.4rem; }
    .garena-watermark { left: 50%; width: 86vw; max-height: 70vh; opacity: .045; }
    .page-subtitle { font-size: .78rem; }
    .metric-grid { gap: .65rem; }
    .metric-card { gap: .65rem; padding: .85rem; }
    .metric-icon { width: 2.25rem; height: 2.25rem; flex-basis: 2.25rem; }
    .metric-value { font-size: 1.15rem; }
    .metric-label { font-size: .66rem; }
    .request-list-page .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .request-list-page .metric-card,
        .request-list-page .metric-card:nth-child(2) {
            min-height: 6.5rem;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            gap: .2rem;
            padding: .75rem .3rem;
            border-top: 0;
            border-right: 1px solid var(--divider);
            border-bottom: 0;
            text-align: center;
        }
    .request-list-page .metric-card:last-child { border-top: 0; border-right: 0; }
    .request-list-page .metric-icon { width: 1.8rem; height: 1.8rem; flex-basis: 1.8rem; }
    .request-list-page .metric-label {
            overflow: visible;
            line-height: 1.25;
            text-overflow: clip;
            white-space: normal;
        }
    .request-list-page .filter-chips {
            gap: 1rem;
            margin-right: -1.25rem;
            margin-left: -1.25rem;
            padding-right: 1.25rem;
            padding-left: 1.25rem;
            scroll-padding-inline: 1.25rem;
            scroll-snap-type: x proximity;
        }
    .request-list-page .filter-chip { scroll-snap-align: start; white-space: nowrap; }
    .request-list-toolbar { flex-wrap: wrap; gap: .35rem; }
    .request-list-toolbar .request-list-create { order: -1; }
    .request-list-toolbar .filter-chips { flex-basis: 100%; margin: 0; padding: 0; scroll-padding-inline: 0; }
    .request-list-page .filter-panel { margin-bottom: 1rem; padding: .8rem 0 0; }
    .filter-panel { padding: .8rem; }
    .request-list-header { display: none; }
    .request-list-page .request-list { display: grid; gap: .65rem; }
    .request-row {
            display: grid;
            min-height: 0;
            grid-template-areas: "primary date" "status arrow";
            grid-template-columns: minmax(0, 1fr) auto;
            gap: .75rem 1rem;
            padding: 1rem;
        }
    .request-list-page .request-row {
            border: 1px solid var(--border);
            border-radius: .75rem;
            background: color-mix(in srgb, var(--surface) 88%, transparent);
            box-shadow: var(--shadow-sm);
        }
    .request-primary { grid-area: primary; }
    .request-person, .request-category { display: none; }
    .request-status { grid-area: status; align-self: center; }
    .request-date { grid-area: date; align-self: start; text-align: right; }
    .request-arrow { grid-area: arrow; align-self: center; justify-self: end; }
    .progress-card .card-body { padding: .6rem; }
    .step { min-height: 2.8rem; flex-basis: 7.75rem; padding: .55rem 1.55rem; }
    .step-label { display: block; font-size: .66rem; }
    .info-row { grid-template-columns: 7rem 1fr; }
    .offer-table { overflow: visible; }
    .offer-table .table,
        .offer-table .table tbody,
        .offer-table .table tr,
        .offer-table .table td { display: block; width: 100%; }
    .offer-table .table thead { display: none; }
    .offer-table .table tbody { padding: .35rem 1rem 1rem; }
    .offer-table .table tr {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: .75rem 1rem;
            padding: 1rem 0;
            border-bottom: 1px solid var(--divider);
        }
    .offer-table .table tr:last-child { border-bottom: 0; }
    .offer-table .table td { padding: 0; border: 0; text-align: left !important; white-space: normal !important; }
    .offer-table .table td:first-child,
        .offer-table .table td:last-child { grid-column: 1 / -1; }
    .offer-table .table td::before {
            display: block;
            margin-bottom: .2rem;
            color: var(--ink-soft);
            content: attr(data-label);
            font-size: .59rem;
            font-weight: 800;
            letter-spacing: .055em;
            text-transform: uppercase;
        }
    .offer-table .table td:first-child::before { display: none; }
    .offer-table .table td:last-child .btn { width: 100%; }
    .form-section { padding: 1.2rem; }
    .form-actions { position: sticky; z-index: 10; bottom: 0; padding: .9rem 1.1rem; box-shadow: 0 -8px 24px rgba(17,54,51,.07); }
    .review-action-heading { flex-wrap: wrap; }
    .review-action-button { width: 100%; margin-left: 0; }
    .review-action-button .btn { width: 100%; }
}
@media (max-width: 479.98px) {
    .metric-grid { grid-template-columns: 1fr 1fr; }
    .request-list-page .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .metric-card { align-items: flex-start; flex-direction: column; }
    .request-list-page .metric-card,
        .request-list-page .metric-card:nth-child(2) { align-items: center; }
    .metric-label { white-space: normal; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ===== List variant with a trailing actions column ===== */

/* Requester "My requests" list: the trailing column holds action buttons
   (Track / Duplicate) instead of the hover chevron */
.request-list--actions .request-list-header,
.request-list--actions .request-row {
    grid-template-columns: minmax(200px, 1.5fr) minmax(130px, .9fr) minmax(120px, .8fr) 145px 110px 190px;
}
.request-actions { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; }
.request-actions .btn { white-space: nowrap; }
a.request-name:hover { color: var(--primary); }
@media (max-width: 1199.98px) {
    .request-list--actions .request-list-header,
        .request-list--actions .request-row { grid-template-columns: minmax(200px, 1.5fr) minmax(120px, 1fr) 135px 105px 190px; }
}
@media (max-width: 991.98px) {
    .request-list--actions .request-actions { justify-content: flex-start; }
}