/* ==========================================================================
   Akkad (أكّد) — Commercial Document Attestation Platform
   Design system inspired by akkad.gov.iq — Iraqi Ministry of Trade
   ========================================================================== */

:root {
    --navy-900: #07182e;
    --navy-800: #0c2340;
    --navy-700: #123257;
    --navy-600: #1b4675;
    --teal-500: #1ba39c;
    --teal-600: #158c86;
    --teal-050: #e7f6f5;
    --gold-500: #c9a227;
    --ink: #1c2733;
    --muted: #5b6b7b;
    --line: #e4e9ef;
    --bg: #f5f7fa;
    --bg-soft: #eef2f7;
    --white: #ffffff;
    --danger: #c0392b;
    --success: #1e8e5a;
    --warn: #c87f0a;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow-sm: 0 1px 2px rgba(7, 24, 46, .06), 0 2px 8px rgba(7, 24, 46, .05);
    --shadow-md: 0 10px 30px rgba(7, 24, 46, .10);
    --maxw: 1180px;
    --font: "Tajawal", "Segoe UI", Tahoma, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container {
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: 22px;
}

.section { padding-block: 72px; }
.section--soft { background: var(--bg-soft); }
.section__head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section__eyebrow {
    color: var(--teal-600);
    font-weight: 700;
    font-size: .92rem;
    letter-spacing: .02em;
    margin-bottom: 10px;
}
.section__title { font-size: 2rem; color: var(--navy-800); font-weight: 800; line-height: 1.3; }
.section__lead { color: var(--muted); margin-top: 14px; font-size: 1.05rem; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    padding: 13px 26px;
    border-radius: 999px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--teal-500); color: #fff; box-shadow: 0 8px 20px rgba(27, 163, 156, .35); }
.btn--primary:hover { background: var(--teal-600); }
.btn--gold { background: var(--gold-500); color: var(--navy-900); box-shadow: 0 8px 20px rgba(201, 162, 39, .35); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.btn--ghost:hover { background: rgba(255, 255, 255, .12); }
.btn--outline { background: #fff; color: var(--navy-700); border-color: var(--line); }
.btn--outline:hover { border-color: var(--teal-500); color: var(--teal-600); }
.btn--block { width: 100%; justify-content: center; }
.btn--lg { padding: 15px 34px; font-size: 1.08rem; }

/* ---------- Top bar ---------- */
.topbar {
    background: var(--navy-900);
    color: #cfdbe8;
    font-size: .85rem;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; height: 38px; }
.topbar a { color: #cfdbe8; opacity: .9; }
.topbar a:hover { opacity: 1; color: #fff; }
.topbar__links { display: flex; gap: 18px; align-items: center; }

/* ---------- Header ---------- */
.site-header {
    background: var(--navy-800);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 14px rgba(7, 24, 46, .25);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 78px; }

.brand { display: flex; align-items: center; gap: 13px; }
.brand__mark {
    width: 46px; height: 46px;
    display: grid; place-items: center;
    border-radius: 12px;
    background: linear-gradient(150deg, var(--teal-500), var(--navy-600));
    color: #fff; font-weight: 800; font-size: 1.5rem;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.15);
}
.brand__text { color: #fff; line-height: 1.2; }
.brand__name { font-size: 1.5rem; font-weight: 800; }
.brand__sub { font-size: .72rem; color: #9fb4cc; font-weight: 500; letter-spacing: .02em; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
    color: #d7e2ee;
    font-weight: 600;
    font-size: .98rem;
    padding: 9px 14px;
    border-radius: 8px;
    transition: background .2s, color .2s;
}
.nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav a.is-active { color: #fff; background: var(--teal-600); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
    display: none;
    background: transparent; border: 0; color: #fff; cursor: pointer;
    font-size: 1.6rem; line-height: 1;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    background:
        linear-gradient(115deg, rgba(7, 24, 46, .95) 35%, rgba(18, 50, 87, .82) 100%),
        radial-gradient(circle at 15% 20%, rgba(27, 163, 156, .35), transparent 45%);
    color: #fff;
    overflow: hidden;
}
.hero::after {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: -10%;
    width: 55%;
    background:
        repeating-linear-gradient(45deg, rgba(255,255,255,.04) 0 2px, transparent 2px 22px);
    transform: skewX(-12deg);
    opacity: .6;
    pointer-events: none;
}
.hero .container { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; padding-block: 90px; }
.hero__badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(27, 163, 156, .18);
    border: 1px solid rgba(27, 163, 156, .5);
    color: #8ee6df;
    padding: 7px 16px; border-radius: 999px;
    font-size: .85rem; font-weight: 600; margin-bottom: 22px;
}
.hero__title { font-size: 3rem; font-weight: 800; line-height: 1.25; margin-bottom: 20px; }
.hero__title span { color: var(--teal-500); }
.hero__lead { font-size: 1.18rem; color: #c8d6e6; max-width: 560px; margin-bottom: 32px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__stats { display: flex; gap: 30px; margin-top: 40px; }
.hero__stat .n { font-size: 1.7rem; font-weight: 800; color: #fff; }
.hero__stat .l { font-size: .85rem; color: #9fb4cc; }

.hero__card {
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 20px;
    padding: 26px;
    backdrop-filter: blur(6px);
}
.hero__card h3 { font-size: 1.1rem; margin-bottom: 18px; color: #fff; }
.hero__check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.hero__check:last-child { border-bottom: 0; }
.hero__check .ic { color: var(--teal-500); flex: none; margin-top: 2px; }
.hero__check b { display: block; color: #fff; font-size: .98rem; }
.hero__check small { color: #aebfd2; }

/* ---------- Page banner (inner pages) ---------- */
.page-banner {
    background:
        linear-gradient(115deg, rgba(7, 24, 46, .96), rgba(18, 50, 87, .85)),
        radial-gradient(circle at 80% 0%, rgba(27, 163, 156, .4), transparent 50%);
    color: #fff;
    padding-block: 64px;
    text-align: center;
}
.page-banner h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 12px; }
.page-banner p { color: #c8d6e6; max-width: 640px; margin-inline: auto; }
.breadcrumb { font-size: .9rem; color: #9fb4cc; margin-bottom: 18px; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb span { margin-inline: 8px; }

/* ---------- Cards grid ---------- */
.grid { display: grid; gap: 26px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #cfe6e4; }
.card__icon {
    width: 56px; height: 56px; border-radius: 14px;
    display: grid; place-items: center;
    background: var(--teal-050); color: var(--teal-600);
    margin-bottom: 18px;
}
.card__icon svg { width: 28px; height: 28px; }
.card h3 { color: var(--navy-800); font-size: 1.25rem; margin-bottom: 10px; }
.card p { color: var(--muted); }
.card__more { display: inline-flex; align-items: center; gap: 6px; color: var(--teal-600); font-weight: 700; margin-top: 16px; }

/* Service card (richer) */
.service-card { display: flex; flex-direction: column; }
.service-card .tag {
    align-self: flex-start;
    background: var(--navy-800); color: #fff;
    font-size: .76rem; font-weight: 700;
    padding: 5px 12px; border-radius: 999px; margin-bottom: 16px;
}
.service-card ul.feat { margin-top: 16px; }
.service-card ul.feat li { display: flex; gap: 10px; color: var(--muted); padding: 6px 0; }
.service-card ul.feat li::before { content: "✓"; color: var(--teal-500); font-weight: 800; }

/* Benefit (small) */
.benefit { text-align: center; padding: 26px 18px; }
.benefit .card__icon { margin-inline: auto; }
.benefit h3 { font-size: 1.1rem; }

/* Steps */
.steps { counter-reset: step; }
.step { position: relative; padding-inline-start: 0; }
.step__num {
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--navy-800); color: #fff;
    display: grid; place-items: center; font-size: 1.4rem; font-weight: 800;
    margin: 0 auto 16px; position: relative; z-index: 2;
    box-shadow: 0 6px 16px rgba(12,35,64,.3);
}
.step { text-align: center; }
.step h3 { color: var(--navy-800); margin-bottom: 8px; }
.step p { color: var(--muted); }

/* ---------- CTA band ---------- */
.cta-band {
    background: linear-gradient(120deg, var(--navy-800), var(--teal-600));
    color: #fff; border-radius: 22px; padding: 50px;
    text-align: center; box-shadow: var(--shadow-md);
}
.cta-band h2 { font-size: 2rem; margin-bottom: 12px; }
.cta-band p { color: #d8e6f2; max-width: 620px; margin: 0 auto 26px; }

/* ---------- Articles ---------- */
.article-card { overflow: hidden; padding: 0; }
.article-card__media { height: 150px; background: linear-gradient(135deg, var(--navy-700), var(--teal-600)); display: grid; place-items: center; color: rgba(255,255,255,.85); }
.article-card__media svg { width: 54px; height: 54px; }
.article-card__body { padding: 22px 24px 26px; }
.article-card__body .meta { color: var(--teal-600); font-size: .82rem; font-weight: 700; margin-bottom: 8px; }
.article-card__body h3 { font-size: 1.12rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #b9c8d8; padding-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; padding-bottom: 44px; }
.site-footer h4 { color: #fff; font-size: 1.05rem; margin-bottom: 18px; }
.site-footer ul li { padding: 6px 0; }
.site-footer ul a:hover { color: var(--teal-500); }
.footer-about p { margin: 16px 0; max-width: 320px; }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,.08); display: grid; place-items: center;
    transition: background .2s;
}
.footer-social a:hover { background: var(--teal-600); color: #fff; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding-block: 22px; text-align: center; font-size: .88rem; color: #8ba0b6;
}

/* ---------- Inline icon sizing ----------
   Most icon SVGs only carry a viewBox, so without an explicit size they fall
   back to their intrinsic dimensions and break alignment beside text. Pin a
   sensible size in every inline context (cards keep their own larger size). */
.dash-side nav a svg,
.hero__check .ic svg,
.auth-aside .pt .ic svg,
.card__more svg,
.nav a svg,
.btn svg { width: 19px; height: 19px; flex: none; }
.dash-side nav a svg,
.hero__check .ic svg,
.auth-aside .pt .ic svg { vertical-align: middle; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: calc(100vh - 78px); display: grid; grid-template-columns: 1fr 1fr; }
.auth-aside {
    background:
        linear-gradient(150deg, rgba(7,24,46,.95), rgba(21,140,134,.85)),
        radial-gradient(circle at 30% 20%, rgba(27,163,156,.5), transparent 50%);
    color: #fff; padding: 60px; display: flex; flex-direction: column; justify-content: center;
}
.auth-aside h2 { font-size: 2rem; margin-bottom: 16px; }
.auth-aside p { color: #d2e0ee; margin-bottom: 28px; }
.auth-aside .pt { display: flex; gap: 12px; padding: 10px 0; align-items: flex-start; }
.auth-aside .pt .ic { color: #8ee6df; flex: none; margin-top: 3px; }
.auth-main { display: grid; place-items: center; padding: 50px 24px; background: #fff; }
.auth-box { width: 100%; max-width: 430px; }
.auth-box h1 { font-size: 1.8rem; color: var(--navy-800); margin-bottom: 6px; }
.auth-box .sub { color: var(--muted); margin-bottom: 28px; }
.auth-switch { margin-top: 22px; text-align: center; color: var(--muted); }
.auth-switch a { color: var(--teal-600); font-weight: 700; }

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; color: var(--navy-800); margin-bottom: 7px; font-size: .95rem; }
.field .req { color: var(--danger); }
.input, .select, .textarea {
    width: 100%;
    font-family: inherit; font-size: 1rem;
    padding: 12px 14px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff; color: var(--ink);
    transition: border-color .2s, box-shadow .2s;
}
.input:focus, .select:focus, .textarea:focus {
    outline: none; border-color: var(--teal-500);
    box-shadow: 0 0 0 3px rgba(27,163,156,.15);
}
.textarea { resize: vertical; min-height: 110px; }
.field__hint { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.field__error { color: var(--danger); font-size: .86rem; margin-top: 6px; }
.has-error .input, .has-error .select, .has-error .textarea { border-color: var(--danger); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.check { display: flex; gap: 9px; align-items: center; color: var(--muted); font-size: .95rem; }

/* ---------- Alerts ---------- */
.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: .96rem; }
.alert--success { background: #e7f6ee; color: #1d6b44; border: 1px solid #b9e3cc; }
.alert--error { background: #fdecea; color: #a13226; border: 1px solid #f3c3bc; }
.alert--info { background: var(--teal-050); color: var(--teal-600); border: 1px solid #bfe6e3; }
.alert ul { margin-top: 6px; padding-inline-start: 18px; list-style: disc; }

/* ---------- Dashboard ---------- */
.dash { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - 78px); }
.dash-side { background: var(--navy-800); color: #cdd9e6; padding: 28px 18px; }
.dash-side .who { padding: 0 8px 20px; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 16px; }
.dash-side .who .nm { color: #fff; font-weight: 700; font-size: 1.05rem; }
.dash-side .who .em { font-size: .82rem; color: #9fb4cc; }
.dash-side nav a { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-radius: 9px; color: #cdd9e6; font-weight: 600; margin-bottom: 4px; }
.dash-side nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.dash-side nav a.is-active { background: var(--teal-600); color: #fff; }
.dash-main { padding: 40px; background: var(--bg); }
.dash-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 16px; }
.dash-head h1 { font-size: 1.7rem; color: var(--navy-800); }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 34px; }
.stat {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 22px; box-shadow: var(--shadow-sm);
}
.stat .n { font-size: 2rem; font-weight: 800; color: var(--navy-800); }
.stat .l { color: var(--muted); font-size: .92rem; }
.stat--accent { border-top: 3px solid var(--teal-500); }
a.stat { text-decoration: none; transition: transform .15s ease, box-shadow .2s ease; }
a.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* ---------- KPI cards ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 26px; }
.kpi {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 20px; box-shadow: var(--shadow-sm);
    display: flex; align-items: center; gap: 16px;
}
.kpi__ic { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.kpi__ic svg { width: 26px; height: 26px; }
.kpi__n { font-size: 1.9rem; font-weight: 800; color: var(--navy-800); line-height: 1.1; }
.kpi__l { color: var(--muted); font-size: .9rem; }
.kpi--teal .kpi__ic { background: var(--teal-050); color: var(--teal-600); }
.kpi--amber .kpi__ic { background: #fff4e0; color: var(--warn); }
.kpi--green .kpi__ic { background: #e7f6ee; color: var(--success); }
.kpi--navy .kpi__ic { background: #e8eef6; color: var(--navy-700); }

/* ---------- Charts layout ---------- */
.charts-grid { display: grid; gap: 22px; margin-bottom: 26px; }
.charts-grid--2 { grid-template-columns: 360px 1fr; }
.charts-grid--3 { grid-template-columns: repeat(3, 1fr); }
.chart-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); padding: 22px 24px;
}
.chart-card h3 { color: var(--navy-800); font-size: 1.08rem; margin-bottom: 18px; }

/* Donut */
.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donut { position: relative; width: 168px; height: 168px; flex: none; }
.donut svg { transform: rotate(-90deg); width: 168px; height: 168px; }
.donut__center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.donut__center .n { font-size: 1.8rem; font-weight: 800; color: var(--navy-800); }
.donut__center .l { font-size: .78rem; color: var(--muted); }
.legend { flex: 1; min-width: 150px; }
.legend li { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: .92rem; color: var(--ink); }
.legend .sq { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.legend .nm { flex: 1; color: var(--muted); }
.legend .val { font-weight: 700; color: var(--navy-800); }

/* Horizontal bars */
.hbar { margin-bottom: 16px; }
.hbar:last-child { margin-bottom: 0; }
.hbar__top { display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: 6px; }
.hbar__top .nm { color: var(--ink); font-weight: 600; }
.hbar__top .val { color: var(--muted); font-weight: 700; }
.hbar__track { height: 9px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; }
.hbar__fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--teal-500), var(--navy-600)); min-width: 4px; transition: width .4s ease; }

/* Day-by-day bar chart */
.daybars { display: flex; align-items: flex-end; gap: 7px; height: 180px; padding-top: 10px; }
.daybar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; }
.daybar__val { font-size: .72rem; font-weight: 700; color: var(--navy-700); }
.daybar__bar {
    width: 70%; max-width: 30px; min-height: 4px; border-radius: 7px 7px 0 0;
    background: linear-gradient(180deg, var(--teal-500), var(--teal-600));
    transition: height .4s ease;
}
.daybar:hover .daybar__bar { background: linear-gradient(180deg, var(--navy-600), var(--navy-800)); }
.daybar__lbl { font-size: .68rem; color: var(--muted); }

/* ---------- Pagination ---------- */
.pager { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; }
.pager__page, .pager__btn, .pager__dots {
    min-width: 40px; height: 40px; padding: 0 12px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm); font-weight: 700; font-size: .92rem;
    border: 1.5px solid var(--line); background: #fff; color: var(--navy-700);
    transition: border-color .18s, color .18s, background .18s;
}
.pager__page:hover, .pager__btn:hover { border-color: var(--teal-500); color: var(--teal-600); }
.pager__page.is-active { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.pager__btn { color: var(--muted); }
.pager .is-disabled { opacity: .45; cursor: not-allowed; }
.pager .is-disabled:hover { border-color: var(--line); color: var(--muted); }
.pager__dots { border-color: transparent; background: transparent; }

/* ---------- Horizontal stepper ---------- */
.stepper { display: flex; align-items: flex-start; }
.stepper__item { flex: 1; text-align: center; position: relative; }
.stepper__item::before {
    content: ""; position: absolute; top: 20px; height: 3px;
    inset-inline-start: 50%; width: 100%; background: var(--line); z-index: 1;
}
.stepper__item:last-child::before { display: none; }
.stepper__item.done::before { background: var(--teal-500); }
.stepper__dot {
    width: 42px; height: 42px; border-radius: 50%; margin: 0 auto 10px;
    display: grid; place-items: center; position: relative; z-index: 2;
    background: #fff; border: 2px solid var(--line); color: var(--muted); font-weight: 800;
}
.stepper__dot svg { width: 18px; height: 18px; }
.stepper__lbl { font-size: .9rem; color: var(--muted); font-weight: 600; }
.stepper__item.done .stepper__dot { background: var(--teal-500); border-color: var(--teal-500); color: #fff; }
.stepper__item.done .stepper__lbl { color: var(--navy-800); }
.stepper__item.current .stepper__dot { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.stepper__item.current .stepper__lbl { color: var(--navy-800); font-weight: 700; }
.stepper__item.is-rejected .stepper__dot { background: var(--danger); border-color: var(--danger); color: #fff; font-size: 1.1rem; }
.stepper__item.is-rejected .stepper__lbl { color: var(--danger); }
.stepper__item.is-returned .stepper__dot { background: #7b4fc0; border-color: #7b4fc0; color: #fff; }
.stepper__item.is-returned .stepper__lbl { color: #7b4fc0; }

/* ---------- Return-to-requester banner ---------- */
.return-banner {
    background: #faf7ff; border: 1px solid #e4d8f7; border-inline-start: 5px solid #7b4fc0;
    border-radius: var(--radius); padding: 22px 24px; margin-bottom: 4px;
}
.return-banner__head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.return-banner__ic { width: 44px; height: 44px; border-radius: 12px; background: #f1eafc; color: #7b4fc0; display: grid; place-items: center; flex: none; }
.return-banner__head h3 { color: var(--navy-800); margin-bottom: 4px; }
.return-banner__head p { color: var(--muted); font-size: .95rem; }
.return-banner__reason { background: #fff; border: 1px solid #e9e0f7; border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 18px; }
.return-banner__reason .k { font-size: .8rem; color: #7b4fc0; font-weight: 700; display: block; margin-bottom: 5px; }
.return-banner__reason p { color: var(--navy-800); }

/* ---------- Change history timeline ---------- */
.history { padding: 22px 24px; }
.history__item { display: flex; gap: 14px; padding-bottom: 22px; position: relative; }
.history__item::before {
    content: ""; position: absolute; inset-inline-start: 13px; top: 32px; bottom: -2px;
    width: 2px; background: var(--line);
}
.history__item:last-child { padding-bottom: 0; }
.history__item:last-child::before { display: none; }
.history__dot { width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; z-index: 1; }
.history__dot svg { width: 15px; height: 15px; }
.history__body { flex: 1; }
.history__top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.history__title { font-weight: 700; color: var(--navy-800); }
.history__time { font-size: .82rem; color: var(--muted); }
.history__meta { font-size: .86rem; color: var(--muted); margin-top: 3px; }
.history__meta .badge { vertical-align: middle; }
.history__note {
    margin-top: 9px; background: var(--bg-soft); border-radius: 9px;
    padding: 10px 13px; color: var(--ink); font-size: .92rem;
    border-inline-start: 3px solid var(--teal-500);
}

/* ---------- Filter chips ---------- */
.filter-chips { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 22px; }
.chip {
    padding: 8px 18px; border-radius: 999px; font-weight: 600; font-size: .92rem;
    background: #fff; border: 1.5px solid var(--line); color: var(--muted);
    transition: all .18s ease;
}
.chip:hover { border-color: var(--teal-500); color: var(--teal-600); }
.chip.is-active { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }

/* ---------- Table ---------- */
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.panel__head { padding: 20px 24px; border-bottom: 1px solid var(--line); font-weight: 700; color: var(--navy-800); display:flex; justify-content:space-between; align-items:center; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 15px 24px; text-align: right; }
.table thead th { background: var(--bg-soft); color: var(--muted); font-size: .85rem; font-weight: 700; }
.table tbody tr { border-top: 1px solid var(--line); }
.table tbody tr:hover { background: #fafcfe; }
.table .ref { font-weight: 700; color: var(--navy-700); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: .82rem; font-weight: 700; }
.badge--pending { background: #fff4e0; color: var(--warn); }
.badge--under_review { background: #e6f0fb; color: #2563a8; }
.badge--approved { background: #e7f6ee; color: var(--success); }
.badge--rejected { background: #fdecea; color: var(--danger); }
.badge--returned { background: #f1eafc; color: #7b4fc0; }
.badge::before { content: "•"; font-size: 1.1rem; line-height: 0; }

/* ---------- Detail ---------- */
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; }
.detail-grid .row { padding: 16px 24px; border-bottom: 1px solid var(--line); }
.detail-grid .row .k { font-size: .82rem; color: var(--muted); margin-bottom: 4px; }
.detail-grid .row .v { font-weight: 600; color: var(--navy-800); }

.empty { text-align: center; padding: 60px 24px; color: var(--muted); }
.empty svg { width: 64px; height: 64px; color: #c7d3e0; margin: 0 auto 18px; }

.timeline { padding: 24px; }
.timeline .ti { display: flex; gap: 14px; padding-bottom: 22px; position: relative; }
.timeline .ti::before { content:""; position:absolute; inset-inline-start: 11px; top: 26px; bottom: -4px; width: 2px; background: var(--line); }
.timeline .ti:last-child::before { display: none; }
.timeline .dot { width: 24px; height: 24px; border-radius: 50%; background: var(--line); flex: none; display:grid; place-items:center; color:#fff; font-size:.7rem; z-index:1; }
.timeline .ti.done .dot { background: var(--teal-500); }
.timeline .ti.current .dot { background: var(--navy-800); }
.timeline .ti .t { font-weight: 700; color: var(--navy-800); }
.timeline .ti .d { color: var(--muted); font-size: .88rem; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .hero .container { grid-template-columns: 1fr; padding-block: 60px; }
    .hero__card { display: none; }
    .grid--4 { grid-template-columns: repeat(2, 1fr); }
    .grid--3 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-aside { display: none; }
    .dash { grid-template-columns: 1fr; }
    .dash-side { display: none; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .nav { display: none; position: absolute; top: 78px; inset-inline: 0; flex-direction: column; background: var(--navy-800); padding: 12px; gap: 2px; box-shadow: var(--shadow-md); }
    .nav.open { display: flex; }
    .nav a { width: 100%; }
    .nav-toggle { display: block; }
    .grid--4, .grid--3, .grid--2 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .hero__title { font-size: 2.2rem; }
    .section__title { font-size: 1.6rem; }
    .form-row { grid-template-columns: 1fr; }
    .table-wrap { overflow-x: auto; }
    .cta-band { padding: 34px 22px; }
    .topbar__links .hide-sm { display: none; }
}
