@font-face {
    font-family: "Yekan Bakh";
    src: url("../fonts/Yekan Bakh/woff2/YekanBakh-Regular.woff2") format("woff2"),
         url("../fonts/Yekan Bakh/woff/YekanBakh-Regular.woff") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Yekan Bakh";
    src: url("../fonts/Yekan Bakh/woff2/YekanBakh-SemiBold.woff2") format("woff2"),
         url("../fonts/Yekan Bakh/woff/YekanBakh-SemiBold.woff") format("woff");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Yekan Bakh";
    src: url("../fonts/Yekan Bakh/woff2/YekanBakh-Bold.woff2") format("woff2"),
         url("../fonts/Yekan Bakh/woff/YekanBakh-Bold.woff") format("woff");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Yekan Bakh";
    src: url("../fonts/Yekan Bakh/woff2/YekanBakh-ExtraBold.woff2") format("woff2"),
         url("../fonts/Yekan Bakh/woff/YekanBakh-ExtraBold.woff") format("woff");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Yekan Bakh";
    src: url("../fonts/Yekan Bakh/woff2/YekanBakh-Black.woff2") format("woff2"),
         url("../fonts/Yekan Bakh/woff/YekanBakh-Black.woff") format("woff");
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Morabba";
    src: url("../fonts/morabba/woff2/Morabba-Regular.woff2") format("woff2"),
         url("../fonts/morabba/woff/Morabba-Regular.woff") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Morabba";
    src: url("../fonts/morabba/woff2/Morabba-Bold.woff2") format("woff2"),
         url("../fonts/morabba/woff/Morabba-Bold.woff") format("woff");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Morabba";
    src: url("../fonts/morabba/woff2/Morabba-Heavy.woff2") format("woff2"),
         url("../fonts/morabba/woff/Morabba-Heavy.woff") format("woff");
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "IRANSans";
    src: url("../fonts/iransans/IRANSans-web.woff2") format("woff2"),
         url("../fonts/iransans/IRANSans-web.woff") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "IRANSans";
    src: url("../fonts/iransans/IRANSans-Medium-web.woff2") format("woff2"),
         url("../fonts/iransans/IRANSans-Medium-web.woff") format("woff");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "IRANSans";
    src: url("../fonts/iransans/IRANSans-Bold-web.woff2") format("woff2"),
         url("../fonts/iransans/IRANSans-Bold-web.woff") format("woff");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Material Symbols Outlined";
    src: url("../fonts/material-symbols/MaterialSymbolsOutlined-400.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: block;
}

* { box-sizing: border-box; }
html {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}
:root {
    color-scheme: light;
    --bg: #f3f6fb;
    --sidebar: #ffffff;
    --panel: #ffffff;
    --panel-2: #f8fafc;
    --line: #d9e2ef;
    --line-soft: rgba(15, 23, 42, .08);
    --text: #172033;
    --muted: #5f718a;
    --faint: #8a99ad;
    --primary: #2563eb;
    --primary-2: #0f766e;
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
}
body {
    margin: 0;
    font-family: "Yekan Bakh", "IRANSans", Tahoma, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.8;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
.password-field {
    position: relative;
}
.password-field input {
    padding-right: 45px;
}
.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    padding: 6px;
    display: grid;
    place-items: center;
    border-radius: 999px;
}
.password-toggle:hover {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.08);
}
img, svg, video, canvas { max-width: 100%; }
.material-symbols-outlined {
    font-family: "Material Symbols Outlined";
    font-weight: 400;
    font-style: normal;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    text-transform: none;
    direction: ltr;
    font-size: 21px;
    font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
    line-height: 1;
}
.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }

.admin-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 288px;
    grid-template-areas: "main sidebar";
    direction: ltr;
    min-height: 100vh;
    overflow: hidden;
}
.admin-sidebar {
    grid-area: sidebar;
    direction: rtl;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 16px;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    border-left: 1px solid var(--line);
    box-shadow: 8px 0 30px rgba(15, 23, 42, .04);
    overflow-y: auto;
}
.brand-card {
    display: flex;
    gap: 12px;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line-soft);
}
.brand-avatar {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--primary);
    background: rgba(37, 99, 235, .09);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, .1);
}
.brand-card strong { display: block; font-size: 14px; }
.brand-card small { display: block; color: var(--muted); font-size: 11px; }
.side-nav { display: grid; gap: 24px; }
.side-nav__group { display: grid; gap: 8px; }
.side-nav__group h3 {
    margin: 0 8px 2px;
    color: var(--faint);
    font-size: 10px;
    font-weight: 900;
}
.side-nav a,
.side-link {
    width: 100%;
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 12px;
    border: 0;
    border-radius: 12px;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, transform .2s ease;
    font-size: 13px;
    font-weight: 700;
}
.side-nav a:hover,
.side-link:hover {
    color: var(--primary);
    background: #eef4ff;
    transform: translateX(-3px);
}
.side-nav a.is-active {
    color: #fff;
    background: var(--primary);
    box-shadow: 0 16px 30px rgba(37, 99, 235, .18);
}
.sidebar-footer {
    margin-top: auto;
    display: grid;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--line-soft);
}
.sidebar-footer form { margin: 0; }
.side-link--danger:hover { color: #fb7185; background: rgba(239, 68, 68, .1); }
.admin-main {
    grid-area: main;
    direction: rtl;
    min-width: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, .08), transparent 32rem),
        var(--bg);
}
.admin-header {
    width: min(1440px, calc(100% - 32px));
    margin: 16px auto 0;
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, .86);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.notification-menu {
    position: relative;
}
.notification-menu summary {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    position: relative;
    list-style: none;
    cursor: pointer;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    color: var(--text);
    background: #f8fafc;
}
.notification-menu summary::-webkit-details-marker { display: none; }
.notification-menu summary b {
    min-width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    position: absolute;
    top: -3px;
    left: -3px;
    padding: 0 5px;
    border-radius: 999px;
    color: #fff;
    background: var(--danger);
    font-size: 10px;
}
.notification-popover {
    width: min(340px, calc(100vw - 28px));
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 20;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
    box-shadow: 0 20px 60px rgba(15, 23, 42, .14);
}
.notification-popover header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.notification-popover ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}
.notification-popover li a {
    display: grid;
    gap: 3px;
    padding: 9px;
    border: 1px solid var(--line-soft);
    border-radius: 9px;
    background: rgba(255, 255, 255, .03);
}
.notification-popover li.is-unread a {
    border-color: rgba(59, 130, 246, .35);
    background: rgba(59, 130, 246, .12);
}
.notification-popover strong { color: var(--text); font-size: 12px; }
.notification-popover span,
.notification-popover p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.admin-header span { display: block; color: var(--muted); font-size: 12px; }
.admin-header strong { display: block; font-size: 16px; }
.version-pill {
    width: fit-content;
    padding: 5px 12px;
    border-radius: 999px;
    color: #fff !important;
    background: rgba(37, 99, 235, .9);
    font-weight: 800;
}
.page {
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 56px;
    min-width: 0;
}

.topbar {
    background: #ffffff;
    border-bottom: 1px solid #d9e0e8;
    position: sticky;
    top: 0;
    z-index: 10;
}
.topbar__inner {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: #1f2933;
}
.topbar nav { display: flex; gap: 16px; color: #52606d; font-size: 14px; flex-wrap: wrap; align-items: center; }

.page-head {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 18px;
}
h1, h2, h3 {
    margin: 0 0 12px;
    line-height: 1.5;
    letter-spacing: 0;
    font-family: "Morabba", "Yekan Bakh", "IRANSans", Tahoma, Arial, sans-serif;
}
h1 { font-size: 28px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p { margin: 0; color: var(--muted); }
.button,
button.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    max-width: 100%;
    white-space: normal;
    border: 1px solid rgba(59, 130, 246, .35);
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 12px 28px rgba(37, 99, 235, .16);
}
.button:hover { background: #1d4ed8; }
.button--ghost { background: rgba(255, 255, 255, .06); color: var(--text); border-color: var(--line); box-shadow: none; }
.button--ghost { background: #fff; }
.button--ghost:hover { background: #f1f5f9; }
button:disabled,
.button[disabled] { opacity: .55; cursor: not-allowed; }

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}
.panel {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
    min-width: 0;
}
.panel h2 { color: var(--text); }
.details { display: grid; gap: 10px; margin: 0; }
.details div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line-soft);
}
.details dt { color: var(--muted); }
.details dd { margin: 0; font-weight: 700; color: var(--text); }
.table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--line-soft);
    -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line-soft);
    text-align: right;
    vertical-align: middle;
}
th { color: var(--muted); font-size: 12px; background: #f8fafc; }
td { color: #334155; font-size: 13px; }
tbody tr:hover { background: #f8fafc; }
.progress {
    height: 10px;
    width: 100%;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), #22d3ee); }
.state { text-align: center; padding: 48px 24px; }
.auth-card {
    width: min(440px, 100%);
    margin: 44px auto;
    background: #fff;
    border: 1px solid #d9e0e8;
    border-radius: 14px;
    padding: 24px;
    color: #1f2933;
}
.auth-card p { color: #52606d; }
.form { display: grid; gap: 14px; margin-top: 18px; }
.form--inline {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    align-items: end;
}
.form--grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    align-items: end;
}
.form__wide { grid-column: 1 / -1; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.auth-card label { color: #52606d; }
input, select, textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #ffffff;
    color: var(--text);
    outline: none;
}
.password-field {
    position: relative;
}
.password-field input {
    padding-right: 50px;
}
.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    padding: 6px;
    display: grid;
    place-items: center;
    border-radius: 999px;
}
.password-toggle:hover {
    color: var(--primary);
    background: rgba(37, 99, 235, .08);
}
input, select { min-height: 42px; padding: 0 12px; }
textarea { padding: 10px 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--primary-2); box-shadow: 0 0 0 3px rgba(59, 130, 246, .14); }
.jalali-date-input {
    direction: ltr;
    text-align: left;
    font-variant-numeric: tabular-nums;
}
.jalali-date-input::placeholder {
    color: #64748b;
}

.date-picker-wrap {
    position: relative;
    display: block;
}

.date-picker-wrap .jalali-date-input {
    padding-left: 46px;
}

.native-date-picker {
    position: absolute;
    inset: auto 0 0 auto;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.date-picker-button {
    position: absolute;
    left: 6px;
    top: 50%;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--primary);
    background: #f8fafc;
    cursor: pointer;
}

.jalali-picker {
    position: fixed;
    z-index: 30;
    width: 260px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 18px 38px rgba(15, 23, 42, .18);
}

.jalali-picker[hidden] {
    display: none;
}

.jalali-picker__head {
    display: grid;
    grid-template-columns: 34px 1fr 34px;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.jalali-picker__head button,
.jalali-picker__grid button {
    min-height: 0;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--text);
    cursor: pointer;
    font-weight: 800;
}

.jalali-picker__head strong {
    text-align: center;
    color: var(--text);
    font-size: 13px;
}

.jalali-picker__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.jalali-picker__grid button {
    aspect-ratio: 1;
    padding: 0;
    font-size: 12px;
}

.jalali-picker__grid button.is-selected {
    color: #ffffff;
    border-color: var(--primary);
    background: var(--primary);
}

.jalali-picker__grid button.is-today:not(.is-selected) {
    color: #047857;
    border-color: rgba(4, 120, 87, .35);
    background: #ecfdf5;
}

.location-picker {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.location-picker h3 {
    margin: 0;
}

.location-picker__map {
    min-height: 260px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
}

.location-picker__map:empty::before {
    content: "برای انتخاب روی نقشه نشان، کلید وب نشان را در تنظیمات احراز هویت ثبت کنید.";
    min-height: 260px;
    display: grid;
    place-items: center;
    padding: 16px;
    color: var(--muted);
    text-align: center;
}

.inline-invoice-form {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(100px, 1fr) minmax(120px, 1fr) auto;
    gap: 6px;
    align-items: center;
}
.auth-card input,
.auth-card select,
.auth-card textarea { background: #fff; color: #1f2933; border-color: #cbd5df; }
.alert {
    border-radius: 10px;
    padding: 10px 12px;
    margin: 14px 0;
}
.alert--error { background: rgba(239, 68, 68, .12); color: #fecaca; border: 1px solid rgba(239, 68, 68, .28); }
.alert--success { background: rgba(16, 185, 129, .12); color: #bbf7d0; border: 1px solid rgba(16, 185, 129, .28); }
.alert--warning { background: rgba(245, 158, 11, .13); color: #fde68a; border: 1px solid rgba(245, 158, 11, .28); }
.stats {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.stats--compact { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat {
    position: relative;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    padding: 18px;
}
.stat::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(59, 130, 246, .18), transparent 55%);
    opacity: .8;
}
.stat span,
.stat small { position: relative; z-index: 1; }
.stat span { display: block; font-size: 26px; font-weight: 900; color: #fff; }
.stat span { color: var(--text); }
.stat small { color: var(--muted); }
.stat--live {
    isolation: isolate;
    min-height: 118px;
}
.stat--live i {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, .42);
    opacity: .75;
}
.stat--live.is-live i {
    animation: livePulse 1.55s infinite;
}
.stat--live::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, .08) 45%, transparent 70%);
    transform: translateX(120%);
    pointer-events: none;
}
.stat--live.is-ticking {
    border-color: rgba(34, 197, 94, .26);
}
.stat--live.is-ticking::after {
    animation: statSweep .75s ease;
}
.stat--live.is-ticking span {
    color: #bbf7d0;
    text-shadow: 0 0 18px rgba(34, 197, 94, .22);
}
@keyframes livePulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .42); }
    70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
@keyframes statSweep {
    from { transform: translateX(120%); }
    to { transform: translateX(-120%); }
}
.actions { margin-top: 16px; }
.actions--inline {
    margin-top: 0;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}
.stage-block {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px;
    margin-top: 12px;
    background: rgba(255, 255, 255, .025);
}
.stage-block header,
.stage-columns {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
}
.stage-block header { align-items: center; border-bottom: 1px solid var(--line-soft); padding-bottom: 10px; }
.stage-block header span { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }
.stage-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 10px; }
.stage-columns h3 { font-size: 14px; margin: 0 0 8px; }
.stage-columns ul { margin: 0; padding-right: 18px; color: var(--muted); }
.project-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.user-form {
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    align-items: start;
    margin-top: 0;
}
.span-2 { grid-column: span 2; }
.compact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}
.compact-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line-soft);
    padding-bottom: 8px;
}
.compact-list span { color: var(--muted); white-space: nowrap; }
.mini-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .05);
    color: #e5e7eb;
    border-radius: 10px;
    min-height: 34px;
    padding: 0 12px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
}
.mini-button:hover { border-color: var(--primary-2); color: #fff; }
.row-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.table-input {
    min-width: 110px;
    max-width: 150px;
}
.badge {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    border-radius: 999px;
    padding: 0 10px;
    background: rgba(16, 185, 129, .1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, .2);
    font-size: 12px;
    font-weight: 800;
}
.badge--pending { background: rgba(245, 158, 11, .12); color: #fbbf24; border-color: rgba(245, 158, 11, .25); }
.badge--approved { background: rgba(16, 185, 129, .12); color: #34d399; border-color: rgba(16, 185, 129, .25); }
.badge--inactive { background: rgba(239, 68, 68, .14); color: #fca5a5; border-color: rgba(239, 68, 68, .35); }
.badge--verified { background: rgba(16, 185, 129, .12); color: #34d399; border-color: rgba(16, 185, 129, .25); }
.badge--failed { background: rgba(239, 68, 68, .12); color: #fb7185; border-color: rgba(239, 68, 68, .25); }
.badge--unverified { background: rgba(239, 68, 68, .14); color: #fca5a5; border-color: rgba(239, 68, 68, .35); }
.badge--active { background: rgba(16, 185, 129, .12); color: #34d399; border-color: rgba(16, 185, 129, .25); }
.badge--pending { background: rgba(245, 158, 11, .12); color: #fbbf24; border-color: rgba(245, 158, 11, .25); }
.badge--inactive { background: rgba(239, 68, 68, .14); color: #fca5a5; border-color: rgba(239, 68, 68, .35); }
.status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.status-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    background: rgba(255, 255, 255, .03);
}
.status-item strong { color: #fff; font-size: 13px; }
.cost-compare {
    display: grid;
    gap: 12px;
}
.cost-compare__row {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) 150px;
    align-items: center;
    gap: 12px;
}
.cost-compare__row strong { color: #fff; font-size: 13px; }
.cost-compare__row span { color: var(--muted); font-weight: 800; text-align: left; }
.progress--danger span { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.gantt-total {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f8fafc;
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}
.gantt-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}
.gantt-summary div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}
.gantt-summary strong {
    color: var(--text);
    font-size: 18px;
}
.gantt-summary span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.gantt-help {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}
.gantt-help span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f8fafc;
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
}
.gantt-help i {
    width: 24px;
    height: 9px;
    border-radius: 999px;
    display: inline-block;
}
.gantt-board {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #ffffff;
    overflow-x: auto;
    overflow-y: auto;
    max-height: min(72vh, 760px);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    isolation: isolate;
    --gantt-label-width: 260px;
}
.gantt-detail-panel > summary {
    background: linear-gradient(90deg, #eef6ff, #ffffff);
    border-color: #bfdbfe;
}
.gantt-detail-panel > summary span {
    color: #1d4ed8;
}
.gantt-detail-body {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}
.gantt-head {
    position: sticky;
    top: 0;
    z-index: 8;
    display: grid;
    grid-template-columns: var(--gantt-label-width) var(--gantt-timeline-width, minmax(520px, 1fr));
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--line);
    background: #f8fafc;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    min-width: var(--gantt-board-width, 920px);
}

.gantt-head > span:first-child,
.gantt-row > strong {
    position: sticky;
    right: 0;
    inset-inline-start: 0;
    z-index: 20;
    width: var(--gantt-label-width);
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: inherit;
    padding-inline: 12px;
    box-shadow: -10px 0 18px rgba(15, 23, 42, .10);
}

.gantt-head > span:first-child {
    z-index: 25;
    background: #f8fafc;
}
.gantt-axis {
    position: relative;
    height: 20px;
}
.gantt-axis--calendar {
    height: 58px;
    border-inline: 1px solid var(--line-soft);
    background:
        repeating-linear-gradient(
            90deg,
            transparent 0,
            transparent calc((100% / var(--gantt-days, 10)) - 1px),
            rgba(37, 99, 235, .18) calc((100% / var(--gantt-days, 10)) - 1px),
            rgba(37, 99, 235, .18) calc(100% / var(--gantt-days, 10))
        ),
        linear-gradient(180deg, #ffffff, #f1f5f9);
    border-radius: 8px;
}
.gantt-axis span {
    position: absolute;
    top: 0;
    transform: translateX(50%);
    white-space: nowrap;
}
.gantt-axis--calendar span {
    top: 6px;
    display: grid;
    justify-items: center;
    gap: 1px;
    min-width: 78px;
    padding: 2px 6px;
    border: 1px solid rgba(37, 99, 235, .12);
    border-radius: 8px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 6px 14px rgba(15, 23, 42, .06);
}
.gantt-axis--calendar span::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 50%;
    width: 1px;
    height: 12px;
    background: rgba(37, 99, 235, .38);
}
.gantt-axis--calendar strong {
    color: var(--primary);
    font-size: 10px;
    line-height: 1.4;
}
.gantt-axis--calendar b {
    color: var(--text);
    font-size: 11px;
    line-height: 1.4;
}
.gantt-axis--calendar small {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.4;
}
.gantt-chart {
    display: grid;
    gap: 10px;
    padding: 10px;
    min-width: var(--gantt-board-width, 920px);
}
.gantt-group {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    overflow: visible;
}
.gantt-group__head {
    position: sticky;
    top: 77px;
    z-index: 6;
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(170px, 240px);
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    background: linear-gradient(90deg, #f8fafc, #eef6ff);
    border-bottom: 1px solid var(--line);
}
.gantt-group__head strong {
    display: block;
    color: var(--text);
    font-size: 13px;
}
.gantt-group__head span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}
.gantt-stage-progress {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px;
    align-items: center;
    gap: 8px;
}
.gantt-stage-progress::before {
    content: "";
    height: 10px;
    border-radius: 999px;
    background: #dbe4ee;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .12);
}
.gantt-stage-progress i {
    position: absolute;
    right: 0;
    width: var(--stage-progress);
    max-width: calc(100% - 80px);
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, #0f766e, #22c55e);
    box-shadow: 0 4px 10px rgba(15, 118, 110, .18);
}
.gantt-stage-progress b {
    color: var(--text);
    font-size: 11px;
    text-align: left;
    white-space: nowrap;
}
.gantt-group__rows {
    display: grid;
}
.gantt-row {
    display: grid;
    grid-template-columns: var(--gantt-label-width) var(--gantt-timeline-width, minmax(520px, 1fr));
    align-items: center;
    gap: 12px;
    min-height: 32px;
    padding: 5px 12px;
    border-bottom: 1px solid #edf2f7;
    background: #ffffff;
}
.gantt-row:last-child {
    border-bottom: 0;
}
.gantt-row:nth-child(even) {
    background: #fbfdff;
}
.gantt-row:hover {
    background: #eef4ff;
}
.gantt-row strong {
    color: var(--text);
    font-size: 12px;
    white-space: normal;
    overflow: hidden;
    line-height: 1.55;
}
.gantt-row strong span {
    display: block;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}
.gantt-track {
    position: relative;
    height: 18px;
    border-radius: 999px;
    border: 1px solid var(--line-soft);
    background:
        repeating-linear-gradient(
            90deg,
            transparent 0,
            transparent calc((100% / var(--gantt-days, 10)) - 1px),
            rgba(37, 99, 235, .18) calc((100% / var(--gantt-days, 10)) - 1px),
            rgba(37, 99, 235, .18) calc(100% / var(--gantt-days, 10))
        ),
        #e8eef5;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .08);
}
.gantt-today-column {
    position: absolute;
    top: 0;
    bottom: 0;
    right: calc(var(--gantt-today-offset, -1000) * 100% / var(--gantt-days, 1));
    width: calc(100% / var(--gantt-days, 1));
    background: rgba(22, 163, 74, .20);
    border-inline: 1px solid rgba(22, 163, 74, .38);
    pointer-events: none;
    z-index: 0;
}
.gantt-bar {
    position: relative;
    z-index: 1;
    display: block;
    height: 100%;
    min-width: 12px;
    border-radius: 999px;
    background: var(--primary-2);
    box-shadow: 0 4px 10px rgba(15, 23, 42, .14);
    overflow: hidden;
    background-image: linear-gradient(90deg, rgba(255, 255, 255, .20), rgba(255, 255, 255, 0));
}
.gantt-bar em {
    display: block;
    padding: 2px 8px;
    color: #ffffff;
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
    line-height: 16px;
    white-space: nowrap;
}
.gantt-bar--completed { background: var(--success); }
.gantt-bar--delayed { background: var(--danger); }
.gantt-bar--running { background: var(--warning); }
.gantt-bar--not_started,
.gantt-bar--not-started { background: var(--primary-2); }
.muted-text { color: var(--muted); font-size: 12px; }
.project-plan-panel {
    display: grid;
    gap: 14px;
}
.plan-panel-body {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}
.plan-upload-box {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f8fafc;
}
.plan-upload-box h3 {
    margin: 0;
    color: var(--text);
    font-size: 15px;
}
.plan-upload-box p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
}
.plan-empty {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
}
.plan-empty > .material-symbols-outlined {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #e0f2fe;
    color: #0369a1;
}
.plan-empty strong {
    color: var(--text);
}
.plan-empty p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
}
.plan-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 14px;
    align-items: start;
}
.plan-canvas {
    --draft-x: 50%;
    --draft-y: 50%;
    position: relative;
    min-height: 260px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f8fafc;
    overflow: hidden;
    cursor: default;
}
.plan-canvas::after {
    content: "";
    display: none;
    position: absolute;
    right: var(--draft-x);
    top: var(--draft-y);
    width: 18px;
    height: 18px;
    border: 3px solid #2563eb;
    border-radius: 999px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 8px 20px rgba(37, 99, 235, .25);
    transform: translate(50%, -50%);
    pointer-events: none;
}
.plan-canvas.has-draft-point::after {
    display: block;
}
.plan-canvas object {
    display: block;
    width: 100%;
    min-height: 620px;
    border: 0;
    background: #ffffff;
}
.plan-workspace--viewer {
    grid-template-columns: minmax(0, 1fr);
}
.plan-canvas img {
    display: block;
    width: 100%;
    max-height: 560px;
    object-fit: contain;
    background: #ffffff;
}
.plan-pin {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 190px;
    min-height: 28px;
    padding: 5px 8px;
    border: 2px solid #ffffff;
    border-radius: 999px;
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(15, 23, 42, .22);
    transform: translate(50%, -50%);
    cursor: pointer;
    z-index: 1;
}
.plan-pin .material-symbols-outlined {
    font-size: 18px;
}
.plan-pin small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
}
.plan-pin--text {
    border-radius: 8px;
    transform: translate(10%, -50%);
}
.plan-pin--text small {
    display: block;
}
.plan-pin--icon small:empty,
.plan-pin--marker small:empty {
    display: none;
}
.plan-pin--blue { background: #2563eb; }
.plan-pin--teal { background: #0f766e; }
.plan-pin--amber { background: #d97706; }
.plan-pin--rose { background: #e11d48; }
.plan-pin--slate { background: #475569; }
.plan-tools {
    display: grid;
    gap: 12px;
}
.plan-tools form {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f8fafc;
}
.plan-tools label {
    display: grid;
    gap: 6px;
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
}
.plan-tools input,
.plan-tools select {
    width: 100%;
}
.plan-point-preview {
    padding: 9px 10px;
    border-radius: 8px;
    background: #ffffff;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.plan-point-preview b {
    color: var(--text);
}
.plan-annotation-list {
    display: grid;
    gap: 8px;
}
.plan-annotation-list form {
    grid-template-columns: minmax(0, 1fr) 34px;
    align-items: center;
    padding: 8px 10px;
}
.plan-annotation-list span {
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.plan-annotation-list button {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 1px solid #fecdd3;
    border-radius: 8px;
    background: #fff1f2;
    color: #be123c;
    cursor: pointer;
}
.plan-annotation-list .material-symbols-outlined {
    font-size: 18px;
}
.activity-tabs-panel {
    display: grid;
    gap: 14px;
}
.activity-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.activity-tab {
    min-width: 150px;
    display: grid;
    gap: 3px;
    text-align: right;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f8fafc;
    color: var(--text);
    cursor: pointer;
    transition: .2s ease;
}
.activity-tab:hover,
.activity-tab.is-active {
    border-color: #bfdbfe;
    background: #eef6ff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .10);
}
.activity-tab strong {
    color: var(--text);
    font-size: 13px;
}
.activity-tab span,
.activity-tab small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.activity-tab.is-active small {
    color: #2563eb;
}
.activity-tab-page {
    display: none;
}
.activity-tab-page.is-visible {
    display: grid;
    gap: 10px;
}
.activity-stage-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #ffffff;
}
.activity-stage-head strong {
    color: var(--text);
    font-size: 13px;
}
.activity-stage-head span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.activity-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
}
.activity-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 86px 150px;
    align-items: end;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f8fafc;
}
.activity-card__title {
    min-width: 0;
}
.activity-card__title strong {
    display: block;
    color: var(--text);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.activity-card__title span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}
.activity-card label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}
.activity-card .table-input,
.activity-card select {
    min-height: 38px;
}
.document-archive-upload {
    gap: 12px;
}
.archive-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}
.archive-stats div {
    display: grid;
    gap: 3px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f8fafc;
}
.archive-stats strong {
    color: var(--text);
    font-size: 24px;
}
.archive-stats span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.archive-search {
    align-items: end;
}
.document-archive-grid {
    display: grid;
    gap: 10px;
}
.document-archive-card {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f8fafc;
}
.document-archive-card__icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #eef6ff;
    color: #2563eb;
}
.document-archive-card h3 {
    margin: 0;
    color: var(--text);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.document-archive-card p {
    margin: 4px 0;
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
}
.document-archive-card small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
}
.document-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}
.document-archive-card__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}
.empty-state {
    padding: 18px;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}
.mini-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    display: grid;
    gap: 8px;
}
.mini-list li {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    border-bottom: 1px solid var(--line-soft);
    padding-bottom: 8px;
    color: var(--text);
    font-weight: 700;
}
.mini-list span {
    width: 28px;
    min-width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    border-radius: 9px;
    color: var(--primary);
    background: #eef4ff;
    border: 1px solid #dbeafe;
    font-weight: 900;
}

.dashboard-hero {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 18px;
    margin-bottom: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(90deg, rgba(37, 99, 235, .24), rgba(17, 26, 46, .8));
}
.dashboard-hero h1 { margin-bottom: 4px; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.chart-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
    gap: 16px;
    margin-bottom: 16px;
}
.bar-chart { display: grid; gap: 14px; }
.bar-row {
    display: grid;
    grid-template-columns: 100px 1fr 44px;
    gap: 12px;
    align-items: center;
}
.bar-row label,
.bar-row strong { color: #dbeafe; font-size: 12px; }
.bar-track {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #0b1220;
}
.bar-track span {
    display: block;
    height: 100%;
    min-width: 4px;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #22d3ee);
}
.donut-card { display: grid; place-items: center; gap: 14px; text-align: center; }
.donut {
    width: 190px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(var(--primary) var(--donut), #162033 0);
}
.donut__inner {
    width: 126px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--panel);
    border: 1px solid var(--line);
    font-size: 28px;
    font-weight: 900;
}
.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
    margin-top: 16px;
}
.quick-grid .button { justify-content: flex-start; gap: 8px; }

.guide-hero {
    background: linear-gradient(90deg, rgba(16, 185, 129, .18), rgba(37, 99, 235, .2), rgba(17, 26, 46, .86));
}
.guide-intro > div {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 4px 14px;
    align-items: start;
}
.guide-intro .material-symbols-outlined {
    width: 48px;
    height: 48px;
    display: grid;
    grid-row: span 2;
    place-items: center;
    border-radius: 14px;
    color: #34d399;
    background: rgba(16, 185, 129, .12);
    border: 1px solid rgba(16, 185, 129, .22);
}
.guide-timeline {
    display: grid;
    gap: 12px;
}
.guide-step {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    background: rgba(255, 255, 255, .03);
}
.guide-step__marker {
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 8px;
}
.guide-step__marker span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: var(--primary);
    font-weight: 900;
}
.guide-step__marker i {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #bfdbfe;
    background: rgba(59, 130, 246, .12);
    border: 1px solid rgba(59, 130, 246, .2);
}
.guide-step__body {
    min-width: 0;
    display: grid;
    gap: 8px;
    align-content: start;
}
.guide-step__body h3 { margin: 0; color: #fff; }
.guide-step__body .mini-button { width: fit-content; }
.guide-section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
}
.guide-section-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    padding: 13px;
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    background: rgba(255, 255, 255, .03);
}
.guide-section-card > .material-symbols-outlined {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #93c5fd;
    background: rgba(37, 99, 235, .12);
}
.guide-section-card h3 {
    margin-bottom: 4px;
    color: #fff;
}
.guide-section-card p,
.guide-step__body p {
    font-size: 13px;
}
.user-edit-hero {
    background: linear-gradient(90deg, rgba(14, 165, 233, .18), rgba(37, 99, 235, .2), rgba(17, 26, 46, .86));
}
.user-editor { margin-bottom: 16px; }
.user-profile-panel {
    display: grid;
    gap: 14px;
    margin-bottom: 0;
}
.user-avatar-large {
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: #bfdbfe;
    background: rgba(37, 99, 235, .16);
    border: 1px solid rgba(59, 130, 246, .25);
}
.user-avatar-large .material-symbols-outlined { font-size: 36px; }
.user-profile-panel h2,
.permission-picker h2 { margin-bottom: 2px; }
.user-access-summary {
    display: grid;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--line-soft);
}
.user-access-summary div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .035);
}
.user-access-summary span {
    color: var(--muted);
    font-size: 12px;
}
.user-access-summary strong {
    color: #fff;
    font-size: 13px;
}
.permission-picker {
    display: grid;
    gap: 16px;
    margin-bottom: 0;
}
.permission-picker__head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}
.permission-picker__head .badge { white-space: nowrap; }
.user-admin-note { margin: 0; }
.permission-groups {
    display: grid;
    gap: 14px;
}
.permission-group {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    background: rgba(255, 255, 255, .025);
}
.permission-group h3 {
    margin: 0;
    color: #dbeafe;
    font-size: 13px;
}
.permission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
}
.permission-card {
    position: relative;
    min-height: 96px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 22px;
    grid-template-rows: auto auto;
    gap: 2px 10px;
    align-items: start;
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    background: rgba(255, 255, 255, .03);
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.permission-card:hover {
    transform: translateY(-2px);
    border-color: rgba(59, 130, 246, .42);
    background: rgba(37, 99, 235, .08);
}
.permission-card input {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: center;
    width: 18px;
    min-height: 18px;
    accent-color: var(--primary);
}
.permission-card .material-symbols-outlined {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #bfdbfe;
    background: rgba(59, 130, 246, .12);
}
.permission-card strong {
    grid-column: 2;
    color: #fff;
    font-size: 13px;
}
.permission-card small {
    grid-column: 2;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6;
}
.permission-card:has(input:checked) {
    border-color: rgba(16, 185, 129, .38);
    background: rgba(16, 185, 129, .08);
}
.permission-card:has(input:checked) .material-symbols-outlined {
    color: #86efac;
    background: rgba(16, 185, 129, .14);
}
.user-form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    padding-top: 2px;
}
.user-form-actions .button { gap: 8px; }

.contract-hero {
    background: linear-gradient(90deg, rgba(245, 158, 11, .16), rgba(37, 99, 235, .18), rgba(17, 26, 46, .86));
}
.contract-show-hero {
    background: linear-gradient(90deg, rgba(15, 118, 110, .18), rgba(37, 99, 235, .18), rgba(17, 26, 46, .86));
}
.project-contract-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.contract-content-input {
    min-height: 420px;
    direction: rtl;
    line-height: 2;
}
.contract-workspace {
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}
.contract-side,
.contract-editor-panel {
    margin-bottom: 16px;
}
.contract-sign-list {
    display: grid;
    gap: 10px;
}
.contract-sign-list article {
    display: grid;
    gap: 7px;
    padding: 10px;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    background: rgba(255, 255, 255, .03);
}
.contract-sign-list strong {
    color: #fff;
}
.contract-sign-list span {
    color: #86efac;
    font-size: 12px;
}
.contract-sign-list form {
    display: grid;
    gap: 8px;
}
.contract-inline-editor {
    min-height: 620px;
    padding: 18px;
    border-radius: 12px;
    background: #fff;
    color: #111827;
    border-color: #d1d5db;
    line-height: 2.15;
    font-size: 15px;
    resize: vertical;
}
.contract-print-sheet {
    max-width: 980px;
    margin: 0 auto 18px;
    padding: 34px;
    background: #fff;
    color: #111827;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .24);
}
.official-contract-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 18px;
    align-items: start;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 2px solid #1f2937;
}
.official-contract-header h2 {
    margin: 0 0 4px;
    color: #111827;
    font-size: 25px;
}
.official-contract-header p {
    color: #475569;
}
.official-contract-header dl {
    display: grid;
    gap: 6px;
    margin: 0;
}
.official-contract-header dl div {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 8px;
}
.official-contract-header dt {
    color: #64748b;
    font-size: 12px;
}
.official-contract-header dd {
    margin: 0;
    color: #111827;
    font-weight: 900;
}
.official-meta-table,
.official-signature-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}
.official-meta-table th,
.official-meta-table td {
    border: 1px solid #94a3b8;
    padding: 9px 10px;
    color: #111827;
    text-align: right;
    vertical-align: top;
}
.official-meta-table th {
    width: 16%;
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
}
.official-contract-body {
    min-height: 520px;
    color: #111827;
    font-size: 15px;
    line-height: 2.25;
    text-align: justify;
}
.official-signature-table {
    margin-top: 42px;
}
.official-signature-table td {
    width: 33.33%;
    height: 148px;
    border: 1px solid #94a3b8;
    padding: 14px;
    color: #111827;
    text-align: center;
    vertical-align: top;
}
.official-signature-table strong,
.official-signature-table span,
.official-signature-table small,
.official-signature-table em {
    display: block;
}
.official-signature-table span {
    margin-top: 8px;
}
.official-signature-table small {
    min-height: 20px;
    margin-top: 4px;
    color: #64748b;
}
.official-signature-table em {
    margin-top: 28px;
    color: #64748b;
    font-style: normal;
}
.contract-sign-list input {
    background: #fff;
    color: #111827;
    border-color: #cbd5e1;
}

.section-title-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 12px;
}
.stage-admin-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.stage-admin-actions .panel {
    margin-bottom: 0;
}
.stage-suggestions {
    padding-bottom: 14px;
}
.suggestion-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 280px);
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.suggestion-card {
    min-height: 104px;
    display: grid;
    align-content: start;
    gap: 5px;
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    background: rgba(255, 255, 255, .035);
}
.suggestion-card small {
    color: var(--muted);
    font-size: 11px;
}
.suggestion-card strong {
    color: #fff;
    font-size: 14px;
}
.suggestion-card span {
    color: #bfdbfe;
    font-size: 12px;
}
.stage-compact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 10px;
}
.stage-block--compact {
    margin-top: 0;
    margin-bottom: 0;
    padding: 0;
    overflow: hidden;
}
.stage-block--compact > summary {
    min-height: 64px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    cursor: pointer;
    list-style: none;
}
.stage-block--compact > summary::-webkit-details-marker { display: none; }
.stage-block--compact > summary strong {
    display: block;
    overflow: hidden;
    color: #fff;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.stage-block--compact > summary span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}
.stage-block--compact > summary form {
    margin: 0;
}
.stage-block--compact .stage-columns {
    max-height: 260px;
    overflow-y: auto;
    margin: 0;
    padding: 12px;
    border-top: 1px solid var(--line-soft);
}
.stage-block--compact .stage-columns ul {
    max-height: 180px;
    overflow-y: auto;
    display: grid;
    gap: 5px;
    padding-right: 16px;
}
.stage-block--compact .stage-columns li {
    font-size: 12px;
}
.stage-editor {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-top: 1px solid var(--line-soft);
}
.stage-edit-form,
.editable-row__form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 8px;
    align-items: end;
}
.stage-edit-form label,
.editable-row__form label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}
.stage-edit-form input,
.editable-row__form input,
.editable-row__form select {
    width: 100%;
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0 10px;
    background: #fff;
    color: var(--text);
    font: inherit;
}
.stage-delete-form {
    margin: 0;
}
.stage-columns--editable {
    max-height: none !important;
    overflow: visible !important;
    align-items: start;
}
.editable-list {
    display: grid;
    gap: 8px;
}
.editable-row {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    background: rgba(255, 255, 255, .04);
}
.editable-row .row-actions form {
    margin: 0;
}
.mini-button--danger {
    border-color: rgba(220, 38, 38, .25);
    color: var(--danger);
    background: #fff1f2;
}
.mini-button--danger:hover {
    border-color: var(--danger);
    color: #b91c1c;
    background: #ffe4e6;
}
.empty-note {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.project-visual {
    display: grid;
    gap: 10px;
    margin: 10px 0 16px;
}
.project-visual__summary {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    background: rgba(255, 255, 255, .025);
}
.project-ring {
    width: 112px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    justify-self: center;
    border-radius: 50%;
    background: conic-gradient(var(--primary-2) var(--project-progress), #162033 0);
}
.project-ring > div {
    width: 78px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    align-content: center;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--panel);
}
.project-ring strong { display: block; font-size: 21px; line-height: 1.2; }
.project-ring span { display: block; color: var(--muted); font-size: 10px; }
.project-ring--compact {
    width: 72px;
}
.project-ring--compact > div {
    width: 52px;
}
.project-ring--compact strong {
    font-size: 15px;
}
.project-ring--compact span {
    font-size: 9px;
}
.project-visual__meta h3 { margin-bottom: 6px; }
.project-visual__meta .progress-pair {
    display: none;
}
.progress-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 160px));
    gap: 10px;
    margin-top: 10px;
}
.progress-pair div {
    padding: 8px 10px;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    background: rgba(0, 0, 0, .14);
}
.progress-pair span { display: block; color: var(--muted); font-size: 11px; }
.progress-pair strong { display: block; color: #fff; font-size: 16px; }
.stage-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 8px;
}
.stage-board--compact {
    max-height: 220px;
    overflow-y: auto;
    padding-left: 4px;
}
.stage-node {
    position: relative;
    width: 100%;
    min-height: 70px;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: start;
    padding: 10px;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    background: rgba(255, 255, 255, .035);
    color: var(--text);
    text-align: right;
    cursor: pointer;
    box-shadow: none;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.stage-node:hover,
.stage-node.is-selected {
    border-color: rgba(59, 130, 246, .55);
    background: rgba(37, 99, 235, .12);
    transform: translateY(-2px);
}
.stage-node__number {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #fff;
    background: rgba(59, 130, 246, .22);
    font-weight: 900;
}
.stage-node__body {
    min-width: 0;
    display: grid;
    gap: 2px;
}
.stage-node__body strong {
    overflow: hidden;
    color: #fff;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.stage-node__body small,
.stage-node__stats small {
    color: var(--muted);
    font-size: 10px;
}
.stage-node__stats {
    display: grid;
    justify-items: end;
    gap: 2px;
}
.stage-node__stats span { color: #fff; font-weight: 900; }
.stage-node__bar {
    position: absolute;
    right: 12px;
    left: 12px;
    bottom: 8px;
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: #0b1220;
}
.stage-node__bar i {
    display: block;
    height: 100%;
    min-width: 4px;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), #22d3ee);
}
.stage-detail-grid { display: grid; }
.stage-detail {
    display: none;
    padding: 12px;
    border: 1px solid rgba(59, 130, 246, .28);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(17, 26, 46, .98), rgba(11, 18, 32, .95));
}
.stage-detail.is-visible {
    display: grid;
    gap: 10px;
    max-height: 320px;
    overflow-y: auto;
}
.stage-detail header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}
.stage-detail h3 { margin-bottom: 2px; }
.stage-status {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid var(--line-soft);
    color: #dbeafe;
    background: rgba(255, 255, 255, .045);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}
.stage-status--completed { color: #34d399; background: rgba(16, 185, 129, .1); border-color: rgba(16, 185, 129, .22); }
.stage-status--running { color: #60a5fa; background: rgba(59, 130, 246, .1); border-color: rgba(59, 130, 246, .22); }
.stage-status--delayed { color: #fbbf24; background: rgba(245, 158, 11, .1); border-color: rgba(245, 158, 11, .22); }
.stage-progress-bars {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.stage-progress-bars > div {
    display: grid;
    gap: 8px;
}
.stage-progress-bars span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.material-chip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
}
.material-chip {
    display: grid;
    gap: 4px;
    padding: 9px 10px;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    background: rgba(255, 255, 255, .035);
}
.material-chip strong {
    color: #fff;
    font-size: 12px;
}
.material-chip span {
    color: var(--muted);
    font-size: 11px;
}
.sms-status-card {
    display: grid;
    align-content: start;
    gap: 14px;
}
.sms-balance-box {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    border: 1px solid rgba(59, 130, 246, .25);
    border-radius: 14px;
    background: rgba(37, 99, 235, .1);
}
.sms-balance-box .material-symbols-outlined {
    color: #60a5fa;
    font-size: 30px;
}
.sms-balance-box strong {
    display: block;
    color: #fff;
    margin-bottom: 2px;
}
.sms-balance-box p {
    color: #bfdbfe;
    font-size: 13px;
}
.collapse-panel {
    margin-top: 14px;
}
.collapse-panel > summary {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 14px;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    background: rgba(255, 255, 255, .035);
    color: #fff;
    cursor: pointer;
    font-weight: 900;
    list-style: none;
}
.collapse-panel > summary::-webkit-details-marker { display: none; }
.collapse-panel > summary::after {
    content: "expand_more";
    font-family: "Material Symbols Outlined";
    direction: ltr;
    font-size: 22px;
    color: var(--muted);
}
.collapse-panel[open] > summary::after { content: "expand_less"; }
.collapse-panel > summary small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}
.collapse-panel[open] > form,
.collapse-panel[open] > ul {
    margin-top: 12px;
}

.sidebar-toggle,
.sidebar-backdrop,
.mobile-menu-button { display: none; }

@media (max-width: 980px) {
    .admin-shell {
        display: block;
        min-height: 100svh;
        overflow: visible;
    }
    .admin-sidebar {
        position: fixed;
        inset: 0 0 0 auto;
        width: min(86vw, 312px);
        z-index: 30;
        transform: translateX(105%);
        transition: transform .24s ease;
        box-shadow: -30px 0 70px rgba(15, 23, 42, .28);
        border-left: 1px solid var(--line);
    }
    .sidebar-toggle:checked ~ .admin-sidebar { transform: translateX(0); }
    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 25;
        background: rgba(15, 23, 42, .42);
        backdrop-filter: blur(2px);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
    }
    .sidebar-toggle:checked ~ .sidebar-backdrop {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }
    .mobile-menu-button {
        position: fixed;
        top: 16px;
        right: 16px;
        z-index: 40;
        width: 42px;
        height: 42px;
        display: grid;
        place-items: center;
        border-radius: 12px;
        border: 1px solid var(--line);
        background: var(--sidebar);
        color: var(--text);
        box-shadow: 0 12px 28px rgba(15, 23, 42, .12);
    }
    .admin-main {
        height: auto;
        min-height: 100svh;
        overflow: visible;
    }
    .admin-header { padding-right: 66px; }
    .chart-grid { grid-template-columns: 1fr; }
    .stage-admin-actions { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    body {
        min-width: 320px;
    }
    input,
    select,
    textarea,
    button {
        max-width: 100%;
    }
    .shell { width: min(100% - 24px, 1180px); }
    .topbar__inner, .page-head, .dashboard-hero, .section-title-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .topbar__inner { padding: 10px 0; }
    .topbar nav {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .grid, .stats, .stage-columns, .project-form, .user-form, .project-contract-form, .status-grid { grid-template-columns: 1fr; }
    .grid > *,
    .stats > *,
    .project-form > *,
    .user-form > *,
    .project-contract-form > *,
    .status-grid > *,
    .panel,
    .form,
    .form label {
        min-width: 0;
    }
    .span-2 { grid-column: auto; }
    h1 { font-size: 23px; }
    .page, .admin-header { width: min(100% - 20px, 1440px); }
    .page { padding-bottom: 36px; }
    .admin-header {
        position: sticky;
        top: 8px;
        z-index: 15;
        min-height: auto;
        align-items: stretch;
        padding: 10px 12px 10px 58px;
        border-radius: 12px;
    }
    .header-actions {
        justify-content: space-between;
        flex-wrap: wrap;
    }
    .notification-popover {
        position: fixed;
        top: 66px;
        left: 10px;
        right: 10px;
        width: auto;
        max-height: min(70svh, 460px);
        overflow-y: auto;
    }
    .panel {
        padding: 14px;
        border-radius: 12px;
    }
    .form--inline,
    .form--grid,
    .stage-edit-form,
    .editable-row__form {
        grid-template-columns: 1fr;
    }
    .actions--inline,
    .row-actions {
        justify-content: stretch;
    }
    .actions--inline .button,
    .row-actions .mini-button,
    .row-actions form {
        width: 100%;
    }
    .table-wrap {
        margin-inline: -4px;
        border-radius: 10px;
        max-width: calc(100vw - 12px);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    table {
        min-width: 680px;
    }
    th, td {
        padding: 10px;
    }
    .bar-row { grid-template-columns: 84px 1fr 34px; }
    .project-visual__summary,
    .plan-workspace,
    .stage-progress-bars { grid-template-columns: 1fr; }
    .cost-compare__row { grid-template-columns: 1fr; }
    .cost-compare__row span { text-align: right; }
    .gantt-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gantt-group__head { grid-template-columns: 1fr; }
    .gantt-stage-progress { grid-template-columns: minmax(0, 1fr) 72px; }
    .gantt-total { width: fit-content; }
    .activity-stage-head,
    .activity-card,
    .document-archive-card { grid-template-columns: 1fr; }
    .document-archive-card__actions { justify-content: stretch; }
    .project-ring { width: 132px; }
    .stage-detail header { flex-direction: column; }
    .progress-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stage-compact-grid { grid-template-columns: 1fr; }
    .stage-block--compact .stage-columns { grid-template-columns: 1fr; }
    .guide-intro > div,
    .guide-step,
    .guide-section-card { grid-template-columns: 1fr; }
    .guide-step__marker {
        grid-template-columns: 34px 44px;
        justify-content: start;
        align-items: center;
    }
    .permission-picker__head { flex-direction: column; }
    .permission-card { grid-template-columns: 42px minmax(0, 1fr) 22px; }
    .user-form-actions { justify-content: stretch; }
    .user-form-actions .button { width: 100%; }
    .contract-workspace,
    .official-contract-header { grid-template-columns: 1fr; }
    .contract-print-sheet { padding: 18px; }
    .official-meta-table,
    .official-meta-table tbody,
    .official-meta-table tr,
    .official-meta-table th,
    .official-meta-table td { display: block; width: 100%; }
    .plan-canvas object {
        min-height: 320px;
        height: 62svh;
    }
    .plan-panel-body,
    .project-plan-panel,
    .contract-workspace,
    .activity-card-grid,
    .activity-card,
    .storefront-hero,
    .store-filters,
    .store-grid {
        min-width: 0;
    }
}

.row-actions form {
    margin: 0;
}

@media (max-width: 480px) {
    .page,
    .admin-header {
        width: calc(100% - 16px);
    }
    .mobile-menu-button {
        top: 12px;
        right: 10px;
    }
    .admin-header {
        margin-top: 10px;
        padding-left: 10px;
        padding-right: 56px;
    }
    .version-pill {
        width: 100%;
        text-align: center;
    }
    h1 { font-size: 21px; }
    h2 { font-size: 17px; }
    .button,
    .mini-button {
        width: 100%;
        min-width: 0;
        white-space: normal;
    }
    .actions,
    .hero-actions,
    .row-actions,
    .store-toolbar__actions,
    .document-archive-card__actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }
    .details div,
    .compact-list li {
        display: grid;
        grid-template-columns: 1fr;
        gap: 4px;
    }
    .progress-pair {
        grid-template-columns: 1fr;
    }
    .stage-block--compact > summary {
        grid-template-columns: 1fr;
    }
    .stage-block--compact > summary form,
    .stage-block--compact > summary .mini-button {
        width: 100%;
    }
    .notification-menu summary,
    .version-pill {
        min-height: 38px;
    }
    .table-edit .form {
        left: 8px;
        right: 8px;
        top: 76px;
        width: auto;
        max-height: calc(100svh - 96px);
    }
}

@media print {
    @page supplier-dashboard {
        size: A4 landscape;
        margin: 10mm;
    }
    body {
        background: #fff;
        color: #000;
    }
    .admin-sidebar,
    .admin-header,
    .mobile-menu-button,
    .sidebar-toggle,
    .no-print {
        display: none !important;
    }
    .admin-shell,
    .admin-main,
    .page {
        display: block;
        width: 100%;
        height: auto;
        margin: 0;
        padding: 0;
        overflow: visible;
        background: #fff;
    }
    .contract-workspace {
        display: none !important;
    }
    .contract-print-sheet {
        max-width: none;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }
    .official-contract-header,
    .official-meta-table th,
    .official-meta-table td,
    .official-signature-table td {
        break-inside: avoid;
    }
    .supplier-dashboard {
        page: supplier-dashboard;
        width: 100%;
    }
    .supplier-dashboard .supplier-section[hidden],
    .supplier-dashboard .supplier-section:not(.is-visible),
    .supplier-dashboard .no-print,
    .supplier-dashboard .print-hidden,
    .supplier-dashboard .table-edit,
    .supplier-dashboard button,
    .supplier-dashboard .button,
    .supplier-dashboard .mini-button {
        display: none !important;
    }
    .supplier-dashboard .supplier-section.is-visible {
        display: block !important;
        width: 100% !important;
    }
    .supplier-dashboard .page-head,
    .supplier-dashboard .panel,
    .supplier-dashboard .stats,
    .supplier-dashboard .stat,
    .supplier-dashboard .table-wrap {
        width: 100% !important;
        max-width: none !important;
        margin: 0 0 8mm !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: #fff !important;
    }
    .supplier-dashboard .panel h2,
    .supplier-dashboard h1 {
        color: #000 !important;
        margin-bottom: 4mm;
    }
    .supplier-dashboard .section-title-row {
        display: block !important;
        margin-bottom: 5mm;
    }
    .supplier-dashboard .section-title-row p,
    .supplier-dashboard .page-head p,
    .supplier-dashboard .muted-text {
        color: #333 !important;
    }
    .supplier-dashboard .table-wrap {
        overflow: visible !important;
    }
    .supplier-dashboard table {
        width: 100% !important;
        min-width: 0 !important;
        table-layout: fixed;
        border-collapse: collapse;
        direction: rtl;
    }
    .supplier-dashboard th,
    .supplier-dashboard td {
        padding: 6px 5px !important;
        border: 1px solid #d0d7de !important;
        color: #000 !important;
        font-size: 9px !important;
        line-height: 1.6 !important;
        vertical-align: top;
        white-space: normal !important;
        overflow-wrap: anywhere;
    }
    .supplier-dashboard th {
        background: #f1f5f9 !important;
        font-weight: 900;
    }
    .supplier-dashboard .badge {
        min-height: 0;
        padding: 0;
        border: 0;
        background: transparent !important;
        color: #000 !important;
        font-size: inherit;
        font-weight: 800;
    }
    .supplier-dashboard .details div,
    .supplier-dashboard .compact-list li {
        border-color: #d0d7de !important;
    }
    .supplier-dashboard .stats {
        display: grid !important;
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 4mm !important;
    }
    .supplier-dashboard .stat {
        padding: 4mm !important;
        border: 1px solid #d0d7de !important;
        break-inside: avoid;
    }
    .supplier-dashboard .stat::before {
        display: none;
    }
    .supplier-dashboard .stat span {
        color: #000 !important;
        font-size: 18px !important;
    }
    .supplier-dashboard .stat small {
        color: #333 !important;
    }
}

/* Light admin theme refinements */
.brand-card strong,
.admin-header strong,
h1,
h2,
h3,
.compact-list li,
.bar-row label,
.bar-row strong,
.stage-block--compact > summary strong,
.suggestion-card strong,
.guide-step__body h3,
.guide-section-card h3,
.permission-card strong,
.user-access-summary strong,
.permission-group h3,
.status-item strong,
.cost-compare__row strong,
.gantt-row strong,
.project-ring strong,
.progress-pair strong,
.stage-node__body strong,
.stage-node__stats span,
.stage-detail h3,
.material-chip strong,
.sms-balance-box strong,
.collapse-panel > summary,
.details dd {
    color: var(--text);
}

.notification-popover li a,
.stage-block,
.status-item,
.suggestion-card,
.guide-step,
.guide-section-card,
.permission-picker,
.permission-group,
.permission-card,
.user-access-summary div,
.stage-block--compact,
.project-visual__summary,
.progress-pair div,
.stage-node,
.stage-detail,
.material-chip,
.sms-balance-box,
.collapse-panel > summary,
.contract-sign-list article {
    background: #f8fafc;
    border-color: var(--line);
}

.stage-detail,
.panel .stage-detail {
    background: #ffffff;
}

.stage-node:hover,
.stage-node.is-selected,
.permission-card:hover {
    background: #eef4ff;
}

.stage-node {
    position: relative;
}

.stage-node__activities {
    display: none;
    grid-column: 1 / -1;
    gap: 4px;
    margin-top: 8px;
    padding: 8px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #ffffff;
}

.stage-node:hover .stage-node__activities,
.stage-node:focus .stage-node__activities,
.stage-node.is-selected .stage-node__activities {
    display: grid;
}

.stage-node__activities small {
    color: var(--text);
    font-size: 11px;
    line-height: 1.6;
}

.bar-track,
.gantt-track,
.stage-node__bar {
    background: #e2e8f0;
}

.gantt-axis--calendar span.is-today {
    color: #047857;
}

.gantt-axis--calendar span.is-today::before {
    background: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, .16);
}

.dashboard-hero,
.admin-header,
.guide-hero,
.contract-hero,
.contract-show-hero {
    background: linear-gradient(90deg, #ffffff, #eef4ff);
    border-color: var(--line);
}

.dashboard-hero p,
.page-head p,
.panel p,
.muted-text,
.material-chip span,
.stage-node__body small,
.stage-node__stats small,
.suggestion-card small,
.suggestion-card span,
.guide-section-card p,
.guide-step__body p,
.permission-card small,
.sms-balance-box p,
.collapse-panel > summary small {
    color: var(--muted);
}

.mini-button {
    background: #ffffff;
    color: var(--text);
    border-color: var(--line);
}

.mini-button:hover {
    background: #eef4ff;
    color: var(--primary);
}

.mini-button--danger {
    border-color: rgba(220, 38, 38, .25);
    color: var(--danger);
    background: #fff1f2;
}

.mini-button--danger:hover {
    border-color: var(--danger);
    color: #b91c1c;
    background: #ffe4e6;
}

.side-link--danger:hover {
    color: var(--danger);
    background: #fff1f2;
}

.table-wrap {
    border-color: var(--line);
}

.contract-inline-editor,
.contract-sign-list input,
.signature-box input {
    background: #ffffff;
    color: #111827;
}

.alert--error {
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
}

.alert--success {
    color: #166534;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.alert--warning {
    color: #92400e;
    background: #fffbeb;
    border-color: #fde68a;
}

.badge,
.badge--active,
.badge--approved,
.badge--verified {
    color: #047857;
}

.badge--pending {
    color: #a16207;
}

.badge--inactive,
.badge--unverified {
    color: #475569;
}

.badge--failed {
    color: #be123c;
}

.stat span,
.status-item strong,
.cost-compare__row strong,
.bar-row label,
.bar-row strong,
.donut__inner,
.guide-step__body h3,
.guide-section-card h3,
.permission-card strong,
.user-access-summary strong,
.suggestion-card strong,
.permission-group h3,
.stage-node__body strong,
.stage-node__stats span,
.stage-detail h3,
.material-chip strong,
.sms-balance-box strong,
.collapse-panel > summary,
.project-ring strong,
.progress-pair strong,
.stage-status,
.stage-progress-bars span {
    color: var(--text) !important;
}

.stage-status--completed { color: #047857 !important; }
.stage-status--running { color: #1d4ed8 !important; }
.stage-status--delayed { color: #a16207 !important; }

.bar-track,
.stage-node__bar {
    background: #e2e8f0 !important;
}

.donut__inner {
    background: #ffffff;
}

.stage-node__number {
    color: #ffffff;
}

.sms-balance-box .material-symbols-outlined,
.permission-card .material-symbols-outlined,
.guide-section-card > .material-symbols-outlined,
.guide-step__marker i {
    color: var(--primary);
}

.stat--live.is-ticking span {
    color: #047857 !important;
    text-shadow: none;
}

.contract-side .contract-sign-list article {
    background: #f8fafc !important;
    border-color: #d9e2ef !important;
}

.contract-side .contract-sign-list strong {
    color: #172033 !important;
}

.contract-side .contract-sign-list span {
    color: #334155 !important;
}

.contract-side .contract-sign-list span:has(+ form),
.contract-side .contract-sign-list article > span {
    color: #475569 !important;
}

.contract-side .contract-sign-list article > span:first-of-type:not(:only-child) {
    color: #475569 !important;
}

.contract-side .contract-sign-list article > span:not(:first-child) {
    color: #047857 !important;
    font-weight: 800;
}

.contract-side .contract-sign-list input {
    background: #ffffff !important;
    color: #172033 !important;
    border-color: #cbd5df !important;
}

.contract-side .contract-sign-list input::placeholder {
    color: #64748b;
}

.contract-side .contract-sign-list .mini-button {
    background: #ffffff;
    color: #334155;
}

@media (max-width: 980px) {
    .mobile-menu-button {
        background: #ffffff;
        color: var(--text);
    }
}

.plan-canvas object {
    display: block;
    width: 100%;
    height: min(76vh, 720px);
    min-height: 420px;
    background: #ffffff;
}

.plan-tab-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.plan-tab-list .mini-button.is-active {
    color: #ffffff;
    background: var(--primary);
    border-color: var(--primary);
}

.plan-workspace[hidden] {
    display: none;
}

.zoom-date {
    display: inline-block;
    transform-origin: center;
    transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}

.zoom-date:hover {
    position: relative;
    z-index: 3;
    transform: scale(1.35);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(15, 23, 42, .16);
}

.activity-card-grid {
    grid-template-columns: 1fr;
}

.activity-card {
    grid-template-columns: minmax(0, 1fr) 96px 160px;
}

.badge--inactive {
    background: rgba(239, 68, 68, .12);
    color: #ef4444;
    border-color: rgba(239, 68, 68, .28);
}

.live-search {
    display: grid;
    gap: 6px;
    max-width: 360px;
    margin: 12px 0;
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
}

.table-edit {
    position: relative;
}

.table-edit summary {
    cursor: pointer;
    list-style: none;
}

.table-edit summary::-webkit-details-marker {
    display: none;
}

.table-edit[open] {
    z-index: 5;
}

.table-edit .form {
    position: fixed;
    left: 24px;
    top: 96px;
    width: min(760px, calc(100vw - 48px));
    max-height: calc(100vh - 128px);
    overflow: auto;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .18);
}

.inline-formula {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.stage-group-heading {
    margin: 14px 0 8px;
    padding: 8px 10px;
    border-right: 3px solid var(--primary);
    color: var(--text);
    font-size: 15px;
    font-weight: 900;
}

.inline-order-form {
    display: grid;
    grid-template-columns: minmax(90px, 1fr) auto;
    gap: 6px;
    align-items: center;
}

.inline-order-form input {
    min-width: 90px;
}

.shop-invoice-shell {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    margin-block: 18px;
}

.shop-invoice-flow {
    display: grid;
    gap: 8px;
    position: sticky;
    top: 86px;
}

.shop-invoice-flow__step {
    min-height: 92px;
    display: grid;
    place-items: center;
    gap: 3px;
    padding: 10px;
    text-align: center;
    color: var(--primary);
    border: 2px solid #0f4a95;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .75);
}

.shop-invoice-flow__step.is-active {
    color: #082f5f;
    background: linear-gradient(180deg, #dcecff, #7fa6ce);
}

.shop-invoice-flow__step.is-done {
    color: #059669;
}

.shop-invoice-flow__step .material-symbols-outlined {
    font-size: 26px;
}

.shop-invoice-flow__step strong {
    font-size: 13px;
    color: inherit;
}

.shop-invoice-flow__step small {
    color: inherit;
    font-size: 10px;
    line-height: 1.7;
}

.shop-invoice {
    min-width: 0;
    padding: 14px;
    border: 2px solid #0f4a95;
    background: #ffffff;
    color: #11325f;
}

.shop-invoice__head,
.shop-invoice__meta,
.shop-invoice-paybar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.shop-invoice__head {
    margin-bottom: 12px;
}

.shop-invoice__head h2 {
    margin: 0 0 4px;
    color: #123f80;
}

.shop-invoice__head p,
.shop-invoice__summary span,
.shop-invoice__meta span {
    color: #315985;
    font-size: 12px;
    font-weight: 800;
}

.shop-invoice__summary {
    display: grid;
    gap: 6px;
    justify-items: end;
    white-space: nowrap;
}

.shop-invoice__summary strong {
    color: #0f4a95;
}

.shop-invoice__meta {
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.shop-invoice__meta div {
    min-width: 150px;
    min-height: 38px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    padding: 0 14px;
    border-radius: 999px;
    background: linear-gradient(180deg, #dcecff, #8fb1d1);
    box-shadow: inset 0 1px 4px rgba(15, 74, 149, .22);
}

.shop-invoice__meta strong {
    color: #0d3b75;
    text-align: left;
}

.shop-invoice-table {
    display: grid;
    gap: 8px;
    overflow-x: auto;
}

.shop-invoice-table__header,
.shop-invoice-item__grid {
    display: grid;
    grid-template-columns: 42px 118px minmax(150px, 1.3fr) 68px 96px 72px minmax(120px, 1fr) minmax(122px, 1fr) minmax(110px, 1fr) 98px 112px;
    gap: 4px;
    align-items: stretch;
}

.shop-invoice-table__header {
    min-height: 36px;
    align-items: center;
    padding-inline: 10px;
    color: #ffffff;
    background: linear-gradient(180deg, #5f9cc6, #08499e);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
}

.shop-invoice-item {
    position: relative;
    padding: 6px 44px 6px 6px;
    border: 3px solid #0f4a95;
    border-radius: 14px;
    background: #ffffff;
}

.shop-invoice-item--supplier {
    padding: 6px;
}

.shop-invoice-item__actions {
    position: absolute;
    top: 10px;
    right: 8px;
    display: grid;
    gap: 14px;
    z-index: 2;
}

.shop-icon-button {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(15, 74, 149, .32);
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(180deg, #6da3d0, #0f4a95);
    cursor: pointer;
}

.shop-icon-button--danger {
    background: linear-gradient(180deg, #6da3d0, #0f4a95);
}

.shop-icon-button .material-symbols-outlined {
    font-size: 18px;
}

.shop-invoice-edit {
    position: relative;
}

.shop-invoice-edit summary {
    list-style: none;
}

.shop-invoice-edit summary::-webkit-details-marker {
    display: none;
}

.shop-invoice-edit__form {
    position: absolute;
    z-index: 5;
    top: 32px;
    right: 0;
    width: min(540px, calc(100vw - 54px));
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
    border: 2px solid #0f4a95;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .18);
}

.shop-invoice-edit__form label {
    font-size: 12px;
    font-weight: 800;
}

.shop-invoice-edit__wide {
    grid-column: 1 / -1;
}

.shop-invoice-cell {
    min-width: 0;
    min-height: 86px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 4px;
    padding: 8px;
    text-align: center;
    color: #0d3b75;
    border: 1px solid rgba(15, 74, 149, .18);
    border-radius: 8px;
    background: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.shop-invoice-cell small {
    display: block;
    color: #315985;
    font-size: 10px;
    line-height: 1.7;
}

.shop-invoice-cell strong {
    color: #0b3f83;
}

.shop-invoice-cell--index {
    font-size: 20px;
    color: #0f4a95;
}

.shop-invoice-cell--image {
    color: #ffffff;
    background: linear-gradient(180deg, #b9cce1, #7f9fbe);
}

.shop-invoice-cell--image .material-symbols-outlined {
    font-size: 36px;
}

.shop-invoice-cell--image small {
    color: #ffffff;
}

.shop-invoice-cell--product {
    justify-items: start;
    text-align: right;
}

.shop-invoice-cell--total strong {
    color: #16a34a;
    font-size: 15px;
}

.shop-invoice-item__footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(15, 74, 149, .22);
    color: #315985;
    font-size: 11px;
    font-weight: 800;
}

.shop-invoice-item__payments {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.shop-invoice-item__payments .mini-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.shop-invoice-item__payments .material-symbols-outlined {
    font-size: 18px;
}

.shop-invoice-empty {
    min-height: 96px;
    display: grid;
    place-items: center;
    border: 2px dashed rgba(15, 74, 149, .32);
    border-radius: 8px;
    color: #315985;
    font-weight: 900;
}

.shop-invoice-paybar {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 5px double #2f78a9;
}

.shop-invoice-paybar span {
    color: #123f80;
    font-weight: 900;
}

.shop-invoice-paybar strong {
    min-width: 190px;
    min-height: 34px;
    display: inline-grid;
    place-items: center;
    padding-inline: 16px;
    border: 3px solid #0f4a95;
    border-radius: 999px;
    color: #0f4a95;
    background: #ffffff;
}

.shop-invoice-paybar .button {
    min-width: 170px;
    min-height: 40px;
    background: linear-gradient(180deg, #dcecff, #7fa6ce);
    color: #082f5f;
    border-color: rgba(15, 74, 149, .35);
}

.shop-invoice-paybar .button:disabled {
    opacity: .65;
    cursor: not-allowed;
}

.shop-invoice-paybar__hint {
    color: #315985;
    font-size: 11px;
    font-weight: 800;
}

.badge--cart,
.badge--new,
.badge--seen,
.badge--pending_shipping {
    background: rgba(245, 158, 11, .12);
    color: #b45309;
    border-color: rgba(245, 158, 11, .28);
}

.badge--ready_to_pay,
.badge--paid,
.badge--supplier_sent,
.badge--delivered,
.badge--fulfilled {
    background: rgba(16, 185, 129, .12);
    color: #047857;
    border-color: rgba(16, 185, 129, .28);
}

.badge--cancelled,
.badge--rejected {
    background: rgba(239, 68, 68, .12);
    color: #b91c1c;
    border-color: rgba(239, 68, 68, .26);
}

.storefront-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
    align-items: stretch;
    margin-bottom: 18px;
}

.storefront-hero__content,
.storefront-hero__stats,
.store-toolbar,
.store-product {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
}

.storefront-hero__content {
    display: grid;
    align-content: center;
    gap: 14px;
    min-height: 260px;
    padding: 28px;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, .12), rgba(15, 118, 110, .08)),
        #ffffff;
}

.storefront-kicker {
    width: fit-content;
    padding: 4px 10px;
    border: 1px solid rgba(37, 99, 235, .18);
    border-radius: 999px;
    color: var(--primary);
    background: #eef4ff;
    font-size: 12px;
    font-weight: 900;
}

.storefront-hero h1 {
    margin: 0;
    font-size: 34px;
}

.storefront-hero p {
    max-width: 760px;
}

.storefront-search {
    width: min(620px, 100%);
    min-height: 54px;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.storefront-search input {
    min-height: 48px;
    border: 0;
    padding: 0;
    box-shadow: none;
}

.storefront-search input:focus {
    box-shadow: none;
}

.storefront-search .material-symbols-outlined {
    color: var(--primary);
}

.storefront-hero__stats {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.storefront-hero__stats article {
    display: grid;
    align-content: center;
    gap: 4px;
    padding: 16px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #f8fafc;
}

.storefront-hero__stats strong {
    color: var(--text);
    font-size: 28px;
    line-height: 1.1;
}

.storefront-hero__stats span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.store-project-order {
    min-height: 68px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 32px;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
    padding: 12px 16px;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .04);
    text-decoration: none;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.store-project-order:hover,
.store-project-order:focus-visible {
    color: var(--primary);
    border-color: rgba(37, 99, 235, .45);
    box-shadow: 0 16px 36px rgba(37, 99, 235, .1);
    transform: translateY(-1px);
}

.store-project-order__icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border-radius: 8px;
    background: var(--primary);
}

.store-project-order strong {
    font-size: 16px;
    text-align: center;
}

.store-project-order__arrow {
    color: var(--primary);
}

.project-order-flow {
    display: grid;
    gap: 14px;
    margin-block: 18px;
    scroll-margin-top: 86px;
}

.project-order-flow__head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.project-order-flow__head h2 {
    margin: 8px 0 0;
}

.project-order-steps {
    min-width: min(520px, 52%);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.project-order-steps li {
    min-height: 54px;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 5px;
    align-items: center;
    padding: 7px;
    color: var(--muted);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #f8fafc;
    font-size: 11px;
    font-weight: 900;
}

.project-order-steps li span,
.project-order-block__title > span {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: #94a3b8;
}

.project-order-steps li.is-active {
    color: var(--primary);
    border-color: rgba(37, 99, 235, .28);
    background: #eef4ff;
}

.project-order-steps li.is-active span,
.project-order-block__title > span {
    background: var(--primary);
}

.project-order-block {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.project-order-block__title {
    display: flex;
    gap: 10px;
    align-items: center;
}

.project-order-block__title h3,
.project-supplier-card h4 {
    margin: 0;
}

.project-order-block__title small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
}

.project-order-project-form,
.project-order-stage-form {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(150px, 260px);
    gap: 10px;
    align-items: end;
    padding: 14px;
    background: #f8fafc;
}

.project-order-project-form label,
.project-order-stage-form label,
.project-material-toolbar label,
.project-supplier-card__order label {
    gap: 5px;
    font-size: 12px;
    font-weight: 900;
}

.project-material-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: end;
    margin-bottom: 12px;
}

.project-material-toolbar label {
    width: min(520px, 100%);
}

.project-material-toolbar span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.project-material-toolbar strong {
    color: var(--primary);
    font-size: 16px;
}

.project-material-table input[type="checkbox"] {
    width: 22px;
    height: 22px;
    min-height: 22px;
    accent-color: var(--primary);
}

.project-material-table input[type="number"] {
    width: 130px;
    min-height: 40px;
}

.project-material-table tr[hidden] {
    display: none;
}

.project-order-search-action {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

.project-order-search-action .button {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    min-width: 240px;
}

.project-order-search-action .material-symbols-outlined {
    font-size: 20px;
}

.project-supplier-results {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.project-supplier-card {
    min-width: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.project-supplier-card__head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: start;
    padding: 14px;
    background: #f1f6fc;
}

.project-supplier-card__head span:first-child {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.project-supplier-card dl {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 14px;
}

.project-supplier-card dl div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line-soft);
}

.project-supplier-card dt {
    color: var(--muted);
    font-size: 11px;
}

.project-supplier-card dd {
    margin: 0;
    color: var(--text);
    font-size: 11px;
    font-weight: 900;
    text-align: left;
}

.project-supplier-card__order {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 8px;
    align-items: end;
    padding: 14px;
    border-top: 1px solid var(--line);
    background: #f8fafc;
}

.project-supplier-card__order .button {
    min-height: 42px;
}

.project-order-empty {
    min-height: 120px;
    display: grid;
    place-items: center;
    gap: 8px;
    padding: 18px;
    color: var(--muted);
    border: 1px dashed var(--line);
    text-align: center;
}

.project-order-empty .material-symbols-outlined {
    color: var(--primary);
    font-size: 36px;
}

.project-supplier-recommendation {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(37, 99, 235, .24);
    border-radius: 8px;
    background: #f8fbff;
}

.project-supplier-recommendation__head,
.builder-supplier-recommendations .section-title-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.project-supplier-recommendation__head h3,
.project-supplier-recommendation__head p {
    margin: 0;
}

.project-supplier-recommendation__head p {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.project-supplier-recommendation__head .material-symbols-outlined,
.builder-supplier-recommendations .section-title-row > .material-symbols-outlined {
    color: var(--primary);
    font-size: 32px;
}

.project-supplier-recommendation__list,
.builder-supplier-recommendations__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.project-supplier-recommendation__item {
    min-width: 0;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
}

.project-supplier-recommendation__item:has(input:checked) {
    border-color: var(--primary);
    background: #eef4ff;
}

.project-supplier-recommendation__item input {
    width: 20px;
    height: 20px;
    min-height: 20px;
    accent-color: var(--primary);
}

.project-supplier-recommendation__item strong,
.project-supplier-recommendation__item small {
    display: block;
}

.project-supplier-recommendation__item small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
}

.builder-supplier-recommendations__grid article {
    min-width: 0;
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.builder-supplier-recommendations__grid article > div:first-child {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: start;
}

.builder-supplier-recommendations__grid h3 {
    margin: 0;
    font-size: 15px;
}

.builder-supplier-recommendations__grid dl {
    display: grid;
    gap: 6px;
    margin: 0;
}

.builder-supplier-recommendations__grid dl div {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--line-soft);
}

.builder-supplier-recommendations__grid dt,
.builder-supplier-recommendations__grid dd,
.builder-supplier-recommendations__grid p {
    margin: 0;
    font-size: 11px;
}

.builder-supplier-recommendations__grid dt,
.builder-supplier-recommendations__grid p {
    color: var(--muted);
}

.builder-supplier-recommendations__grid dd {
    color: var(--text);
    font-weight: 900;
}

.store-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    margin-bottom: 14px;
    padding: 14px 16px;
}

.store-toolbar h2 {
    margin-bottom: 2px;
}

.store-toolbar__actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.store-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 1fr)) auto;
    gap: 10px;
    align-items: end;
    margin-bottom: 14px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .04);
}

.store-filters label {
    gap: 4px;
    font-size: 12px;
    font-weight: 800;
}

.store-filters input {
    min-height: 40px;
}

.store-filters .mini-button {
    min-height: 40px;
}

.store-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.store-product {
    min-width: 0;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.store-product[hidden] {
    display: none;
}

.store-product__media {
    min-height: 104px;
    display: grid;
    place-items: center;
    background:
        linear-gradient(135deg, rgba(15, 118, 110, .16), rgba(37, 99, 235, .1)),
        #f8fafc;
}

.store-product__media .material-symbols-outlined {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #ffffff;
    background: var(--primary);
    font-size: 32px;
}

.store-product__body {
    display: grid;
    gap: 12px;
    padding: 14px;
}

.store-product__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
}

.store-product__head h3 {
    margin-bottom: 2px;
    font-size: 16px;
}

.store-product__head p {
    font-size: 12px;
}

.store-product__meta {
    display: grid;
    gap: 7px;
    margin: 0;
}

.store-product__meta div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line-soft);
}

.store-product__meta dt {
    color: var(--muted);
    font-size: 12px;
}

.store-product__meta dd {
    margin: 0;
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
    text-align: left;
}

.store-product__order {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-top: 1px solid var(--line);
    background: #f8fafc;
}

.store-product__order > strong {
    color: var(--text);
    font-size: 17px;
    font-weight: 900;
}

.store-order-form {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 8px;
    align-items: end;
}

.store-order-form label {
    gap: 4px;
    font-size: 11px;
    font-weight: 800;
}

.store-order-form input {
    min-height: 40px;
}

.store-order-form .button {
    min-height: 40px;
    padding-inline: 10px;
}

@media (max-width: 1100px) {
    .shop-invoice-shell {
        grid-template-columns: 1fr;
    }
    .shop-invoice-flow {
        position: static;
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
    .shop-invoice-shell--supplier .shop-invoice-flow {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .shop-invoice-flow__step {
        min-height: 84px;
    }
    .shop-invoice-table__header {
        display: none;
    }
    .shop-invoice-item {
        padding: 46px 8px 8px;
    }
    .shop-invoice-item--supplier {
        padding: 8px;
    }
    .shop-invoice-item__actions {
        top: 8px;
        right: 8px;
        grid-auto-flow: column;
    }
    .shop-invoice-item__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .shop-invoice-cell {
        min-height: 72px;
        align-content: start;
        justify-items: start;
        text-align: right;
    }
    .shop-invoice-cell::before {
        content: attr(data-label);
        color: #6b86a7;
        font-size: 10px;
        font-weight: 900;
    }
    .shop-invoice-cell--image {
        justify-items: center;
        text-align: center;
    }
    .shop-invoice-cell--image::before {
        color: rgba(255, 255, 255, .78);
    }
    .storefront-hero {
        grid-template-columns: 1fr;
    }
    .storefront-hero__stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .store-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .project-order-flow__head {
        display: grid;
    }
    .project-order-steps {
        width: 100%;
        min-width: 0;
    }
    .project-supplier-results {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .project-supplier-recommendation__list,
    .builder-supplier-recommendations__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .shop-invoice {
        padding: 10px;
    }
    .shop-invoice__head,
    .shop-invoice__summary,
    .shop-invoice-paybar {
        display: grid;
        justify-items: stretch;
    }
    .shop-invoice__meta {
        display: grid;
        grid-template-columns: 1fr;
    }
    .shop-invoice-flow {
        grid-template-columns: 1fr;
    }
    .shop-invoice-shell--supplier .shop-invoice-flow {
        grid-template-columns: 1fr;
    }
    .shop-invoice-flow__step {
        min-height: 68px;
    }
    .shop-invoice-item__grid,
    .shop-invoice-edit__form {
        grid-template-columns: 1fr;
    }
    .shop-invoice-item__footer {
        display: grid;
    }
    .shop-invoice-paybar strong,
    .shop-invoice-paybar .button,
    .shop-invoice-item__payments,
    .shop-invoice-item__payments .mini-button {
        width: 100%;
    }
    .storefront-hero__content {
        min-height: auto;
        padding: 18px;
    }
    .storefront-hero h1 {
        font-size: 26px;
    }
    .storefront-hero__stats,
    .store-grid,
    .store-filters,
    .store-toolbar {
        grid-template-columns: 1fr;
    }
    .project-order-steps,
    .project-order-project-form,
    .project-order-stage-form,
    .project-supplier-results,
    .project-supplier-card__order {
        grid-template-columns: 1fr;
    }
    .project-supplier-recommendation__list,
    .builder-supplier-recommendations__grid {
        grid-template-columns: 1fr;
    }
    .project-order-flow__head,
    .project-order-block {
        padding: 12px;
    }
    .project-material-toolbar {
        display: grid;
        align-items: stretch;
    }
    .project-material-table input[type="number"],
    .project-order-search-action .button {
        width: 100%;
    }
    .project-order-search-action {
        display: grid;
    }
    .store-toolbar {
        display: grid;
        align-items: stretch;
    }
    .store-toolbar__actions,
    .store-toolbar__actions .mini-button {
        width: 100%;
    }
    .store-product__head,
    .store-order-form {
        grid-template-columns: 1fr;
    }
    .store-product__meta div {
        display: grid;
        grid-template-columns: 1fr;
    }
    .store-product__meta dd {
        text-align: right;
    }
}
