:root {
    --gold: #c9a227;
    --gold-bright: #f4d27a;
    --ink: #2b1d2f;
    --page: #f6f3f7;
    --muted: #8a7385;
    --line: #efe4ea;
    --brand-mid: color-mix(in srgb, var(--brand) 68%, #fff);
    --brand-deep: color-mix(in srgb, var(--brand) 55%, #140910);
}
* { box-sizing: border-box; }
body.panel {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: "Cairo", "Segoe UI", Tahoma, sans-serif;
}
button, input, select, textarea { font: inherit; }
a { color: inherit; }
img { max-width: 100%; }

.sidebar-backdrop {
    position: fixed; inset: 0; z-index: 1040;
    background: rgba(43, 29, 47, .18);
    opacity: 0; pointer-events: none; transition: opacity .28s ease;
}
body.sidebar-expanded .sidebar-backdrop { opacity: 1; pointer-events: auto; }
.sidebar-spacer { width: 68px; flex: none; transition: width .45s cubic-bezier(.22,1,.36,1); }
body.sidebar-expanded .sidebar-spacer { width: 272px; }
.app-shell { display: flex; min-height: 100vh; }
.app-main {
    flex: 1; min-width: 0;
    background:
        radial-gradient(circle at 100% 0, rgba(201, 162, 39, .12), transparent 26%),
        radial-gradient(circle at 0 18%, rgba(var(--brand-rgb), .06), transparent 22%),
        var(--page);
}
.app-sidebar {
    width: 68px; height: 100vh; position: fixed; top: 0; right: 0; z-index: 1050;
    display: flex; flex-direction: column; overflow: visible;
    background: linear-gradient(180deg, var(--brand) 0%, var(--brand-mid) 100%);
    box-shadow: -8px 0 28px rgba(43, 29, 47, .18);
    transition: width .45s cubic-bezier(.22,1,.36,1);
}
body.sidebar-expanded .app-sidebar { width: 272px; box-shadow: -16px 0 48px rgba(43, 29, 47, .28); }
.brand { display: flex; flex-direction: column; align-items: center; padding: 18px 10px 8px; text-decoration: none; color: #fff; }
.brand-mark {
    width: 42px; height: 42px; border-radius: 50%; background: var(--gold); color: #fff;
    display: grid; place-items: center; font-weight: 800; overflow: hidden; flex: none;
    box-shadow: 0 0 0 4px rgba(201,162,39,.2);
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-copy { max-height: 0; opacity: 0; overflow: hidden; text-align: center; transition: .25s ease; }
body.sidebar-expanded .brand-copy { max-height: 64px; opacity: 1; margin-top: 8px; }
.brand-copy strong { display: block; font-size: 15px; }
.brand-copy small { color: rgba(255,255,255,.65); font-size: 11px; }
.sidebar-edge {
    position: absolute; top: 86px; left: -14px; width: 28px; height: 28px; border-radius: 50%;
    border: 0; background: #fff; color: var(--brand); box-shadow: 0 6px 16px rgba(43,29,47,.18); cursor: pointer;
}
body.sidebar-expanded .sidebar-edge i { transform: rotate(180deg); }
.sidebar-nav { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; overflow: auto; flex: 1; }
.sidebar-nav a, .sidebar-nav button.nav-link {
    position: relative; width: 44px; height: 44px; border-radius: 14px; border: 0; background: transparent;
    color: rgba(255,255,255,.86); display: grid; place-items: center; text-decoration: none; cursor: pointer;
}
.sidebar-nav a span, .sidebar-nav button.nav-link span {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0);
}
body.sidebar-expanded .sidebar-nav { align-items: stretch; padding: 8px 12px 16px; }
body.sidebar-expanded .sidebar-nav a,
body.sidebar-expanded .sidebar-nav button.nav-link {
    width: auto; height: auto; min-height: 44px; display: flex; align-items: center; gap: 10px;
    justify-content: flex-start; padding: 8px 12px; border-radius: 12px;
}
body.sidebar-expanded .sidebar-nav a span,
body.sidebar-expanded .sidebar-nav button.nav-link span {
    position: static; width: auto; height: auto; overflow: visible; clip: auto; font-weight: 700;
}
.sidebar-nav a:hover, .sidebar-nav a.is-on, .sidebar-nav button.nav-link:hover {
    background: rgba(201,162,39,.22); color: #fff;
}
body.sidebar-collapsed .sidebar-nav a::after {
    content: attr(data-label);
    position: absolute; top: 50%; left: -10px; transform: translate(-100%, -50%);
    background: #2b1d2f; color: #fff; font-size: 12px; font-weight: 700;
    padding: 6px 10px; border-radius: 8px; white-space: nowrap; opacity: 0; pointer-events: none;
    box-shadow: 0 8px 20px rgba(43,29,47,.25);
}
body.sidebar-collapsed .sidebar-nav a:hover::after { opacity: 1; }
.sidebar-count {
    position: absolute; top: 4px; left: 4px; min-width: 16px; height: 16px; padding: 0 4px;
    border-radius: 999px; background: var(--gold); color: var(--brand-deep); font-size: 10px; font-weight: 800;
    display: grid; place-items: center;
}
body.sidebar-expanded .sidebar-count { position: static; margin-inline-start: auto; }
.side-foot { display: grid; gap: 8px; padding: 10px; }
body.sidebar-collapsed .side-foot .btn span { display: none; }
body.sidebar-collapsed .side-foot .btn { width: 44px; height: 44px; padding: 0; margin-inline: auto; }

.app-header {
    position: sticky; top: 0; z-index: 30; min-height: 76px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 22px;
    background: linear-gradient(#fff, #fff) padding-box, linear-gradient(90deg, var(--brand), var(--gold), var(--brand)) border-box;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 28px rgba(var(--brand-rgb), .06);
}
.app-header::before {
    content: ""; position: absolute; top: 0; right: 0; left: 0; height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-bright), var(--gold));
}
.app-header { position: sticky; }
.app-header__brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.app-header__logo {
    width: 46px; height: 46px; border-radius: 50%; overflow: hidden; border: 2px solid var(--gold);
    box-shadow: 0 0 0 4px rgba(201,162,39,.16); background: #fff; display: grid; place-items: center;
    color: var(--brand); font-size: 20px;
}
.app-header__logo img { width: 100%; height: 100%; object-fit: cover; }
.app-header__page-icon {
    width: 42px; height: 42px; border-radius: 14px; flex: none;
    display: grid; place-items: center; font-size: 18px; color: var(--gold-bright);
    background: linear-gradient(160deg, var(--brand-deep), var(--brand));
    box-shadow: 0 8px 16px rgba(var(--brand-rgb), .18);
}
.app-header__shop { font-size: 12px; font-weight: 800; color: var(--gold); letter-spacing: .04em; }
.app-header h1 { margin: 0; font-size: 18px; font-weight: 800; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-link, .header-user {
    display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px;
    border-radius: 999px; border: 1px solid #f0e2c8; background: linear-gradient(180deg, #fffaf0, #fff);
    color: var(--brand); font-weight: 800; text-decoration: none; cursor: pointer;
}
.menu-btn { display: none; }

.app-main > main { padding: 22px; }

.dash-hero {
    position: relative; overflow: hidden; border-radius: 18px; padding: 18px 20px; color: #fff;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
    background:
        radial-gradient(circle at 88% 18%, rgba(201,162,39,.38), transparent 36%),
        linear-gradient(135deg, var(--brand-deep) 0%, var(--brand) 46%, var(--brand-mid) 100%);
    box-shadow: 0 12px 28px rgba(var(--brand-rgb), .18);
    border: 1px solid rgba(201,162,39,.28); margin-bottom: 18px;
}
.dash-hero::after {
    content: ""; position: absolute; top: 0; right: 18px; left: 18px; height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-bright), var(--gold));
}
.dash-hero__lead { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; min-width: 0; }
.dash-hero__mark, .block-head__mark {
    width: 58px; height: 58px; border-radius: 18px; flex: none;
    display: grid; place-items: center; font-size: 26px; color: var(--gold-bright);
    background: rgba(255,255,255,.12); border: 1px solid rgba(244,210,122,.5);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.dash-hero__shop { font-family: "Aref Ruqaa", "Cairo", serif; font-size: 28px; color: var(--gold-bright); margin: 0; }
.dash-hero p { margin: 6px 0 0; color: rgba(255,255,255,.78); }
.dash-hero__hello { color: var(--gold-bright); font-size: 12px; font-weight: 800; letter-spacing: .14em; }

.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.kpi {
    position: relative; overflow: hidden; min-height: 104px; border-radius: 16px; padding: 14px;
    color: #fff; text-decoration: none; box-shadow: 0 10px 24px rgba(var(--brand-rgb), .12);
}
.kpi i { position: absolute; left: 12px; bottom: 8px; font-size: 36px; opacity: .18; }
.kpi span { display: block; font-size: 13px; font-weight: 700; opacity: .9; }
.kpi b { display: block; margin-top: 8px; font-size: 28px; position: relative; z-index: 1; }
.kpi:nth-child(1) { background: linear-gradient(145deg, #8a6a12, #c9a227 55%, #e0bc4a); }
.kpi:nth-child(2) { background: linear-gradient(145deg, var(--brand-deep), var(--brand) 60%, var(--brand-mid)); }
.kpi:nth-child(3) { background: linear-gradient(145deg, #7a4a10, #d4922a 60%, #e8b04a); }
.kpi:nth-child(4) { background: linear-gradient(145deg, #145a48, #2d8a6e 60%, #45b089); }
.kpi:nth-child(5) { background: linear-gradient(145deg, #7a1f35, #c43d5b 60%, #e05a78); }
.kpi:nth-child(6) { background: linear-gradient(145deg, #2f2a6a, #5b53b8 60%, #7a73d0); }

.block-head, .remain-hero {
    position: relative; overflow: hidden;
    display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
    padding: 18px 20px; border-radius: 18px; color: #fff; margin-bottom: 14px;
    background:
        radial-gradient(circle at 88% 10%, rgba(201,162,39,.38), transparent 34%),
        linear-gradient(135deg, var(--brand-deep) 0%, var(--brand-mid) 55%, var(--brand) 100%);
    box-shadow: 0 8px 18px rgba(var(--brand-rgb), .16);
    border: 1px solid rgba(201,162,39,.28);
}
.block-head::before {
    content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%;
    left: -48px; bottom: -78px; pointer-events: none;
    background: radial-gradient(circle, rgba(244,210,122,.32), transparent 68%);
}
.block-head > * { position: relative; z-index: 1; }
.block-head__copy { flex: 1 1 220px; min-width: 0; }
.block-head h2 {
    margin: 0; font-family: "Aref Ruqaa", "Cairo", serif; font-size: 30px; font-weight: 700; color: #fff;
}
.block-head--products {
    background:
        radial-gradient(circle at 92% 0%, rgba(244,210,122,.42), transparent 32%),
        linear-gradient(145deg, #241018, var(--brand) 58%, #6d3a5c);
}
.block-head--offers {
    background:
        radial-gradient(circle at 10% 90%, rgba(244,210,122,.5), transparent 36%),
        linear-gradient(135deg, #3a2410 0%, #8a5a12 46%, var(--brand) 100%);
}
.block-head--new {
    background:
        radial-gradient(circle at 90% 85%, rgba(120, 200, 255, .32), transparent 36%),
        linear-gradient(135deg, #10263a 0%, #1d5c7a 48%, var(--brand) 100%);
}
.block-head--orders {
    background:
        radial-gradient(circle at 88% 12%, rgba(255,255,255,.16), transparent 30%),
        linear-gradient(135deg, var(--brand-deep), #4a2744 52%, var(--brand-mid));
}
.block-head--wholesale {
    background:
        radial-gradient(circle at 8% 90%, rgba(90, 190, 160, .38), transparent 34%),
        linear-gradient(135deg, #12352c, #1d6552 48%, var(--brand));
}
.block-head--settings {
    background:
        radial-gradient(circle at 90% 80%, rgba(244,210,122,.36), transparent 34%),
        linear-gradient(135deg, #2a1830, var(--brand) 55%, #5c314c);
}
.block-head--branches {
    background:
        radial-gradient(circle at 12% 20%, rgba(120, 190, 170, .34), transparent 32%),
        linear-gradient(135deg, #1a2e2a, #245e52 42%, var(--brand));
}
.block-head--channel {
    background:
        radial-gradient(circle at 90% 20%, rgba(244, 122, 173, .34), transparent 34%),
        linear-gradient(135deg, #2a1830 0%, #7a3d5c 52%, #c94f8f 100%);
}
.block-head .lead, .remain-hero p, .block-head p { color: rgba(255,255,255,.8); margin: 4px 0 0; }
.page-kicker { display: inline-flex; align-items: center; gap: 6px; color: var(--gold-bright); font-size: 12px; font-weight: 800; letter-spacing: .08em; }

.cards { display: grid; gap: 12px; }
.card, .row-card, .settings, .login-card {
    background: #fff; border-radius: 20px; padding: 14px 16px;
    box-shadow: 0 10px 26px rgba(var(--brand-rgb), .07); border: 1px solid rgba(var(--brand-rgb), .06);
}
.card { display: grid; grid-template-columns: 92px 1fr auto; gap: 14px; align-items: center; }
.card img, .card .mark {
    width: 92px; height: 92px; object-fit: cover; border-radius: 16px;
    background: linear-gradient(160deg, #fff8e8, #f3e4ef); display: grid; place-items: center;
    color: var(--brand); font-size: 1.6rem; font-weight: 800;
}
.card strong { font-size: 16px; }
.card small, .row-card small { display: block; color: var(--muted); }
.card b { color: #8a6a12; }
.product-card { grid-template-columns: 92px 1fr auto; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row-card { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 10px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.badge { border-radius: 999px; padding: 3px 10px; background: #f6f1f4; font-size: 12px; font-weight: 800; }
.badge.ok { background: #e7f6f3; color: #0d6b60; }
.badge.bad { background: #fff1f3; color: #9b1b30; }
.badge.wait { background: #fff6e0; color: #8a6a12; }
.empty { padding: 28px; text-align: center; color: var(--muted); background: #fff; border-radius: 18px; }

.btn, .btn-act {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 0; cursor: pointer;
    font-weight: 800; font-size: 13px; text-decoration: none; background: #fff; color: var(--brand);
    box-shadow: inset 0 0 0 1px #eadff0;
}
.btn.primary, .btn-act-add {
    background: linear-gradient(135deg, #e8c56b, #a67c12); color: #3b1f3a;
    box-shadow: 0 8px 18px rgba(201,162,39,.28);
}
.btn.ghost { background: rgba(255,255,255,.14); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.28); }
.side-foot .btn.ghost, .app-sidebar .btn.ghost { color: #fff; }
.card .btn.ghost, .row-card .btn.ghost, .settings .btn.ghost, .sheet .btn.ghost, .pager .btn.ghost {
    background: #3b1f3a; color: #f8e7c4; box-shadow: none;
}
.btn.danger { background: #fff1f3; color: #9b1b30; box-shadow: inset 0 0 0 1px #f3c2cb; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.block-head .btn.primary { flex: none; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filters a {
    display: inline-flex; align-items: center; gap: 6px;
    text-decoration: none; min-height: 38px; padding: 6px 14px; border-radius: 999px;
    background: #fff; border: 1px solid #ead9c0; color: #8a6410; font-weight: 800;
}
.filters a.is-on { background: linear-gradient(135deg, var(--brand), var(--brand-mid)); color: #fff; border-color: transparent; }

.field, .check { display: grid; gap: 6px; margin-bottom: 12px; font-weight: 800; color: var(--ink); }
.field input, .field select, .field textarea, .settings input, .settings select, .t1-line input {
    width: 100%; min-height: 46px; border: 1px solid #eadff0; border-radius: 12px; padding: 10px 12px;
    background: #fffdf9; text-align: center; font-weight: 700;
}
.field textarea { min-height: 90px; text-align: right; }
.field input[type="search"], .search input { text-align: right; }
.check { grid-template-columns: auto 1fr; align-items: center; font-weight: 700; }
.check.big { background: #fff; border-radius: 16px; padding: 12px; box-shadow: inset 0 0 0 1px #eadff0; }
.split, .num-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.search { max-width: 360px; }
.settings { display: grid; gap: 4px; max-width: 820px; padding: 18px; }
.field-label { font-weight: 800; margin: 8px 0; }
.hint { color: var(--muted); }
.themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.theme-pick { position: relative; display: block; }
.theme-pick input { position: absolute; opacity: 0; }
.theme-pick > span {
    display: grid; gap: 6px; border: 2px solid #eadff0; border-radius: 18px; padding: 10px; background: #fff; cursor: pointer; min-height: 100%;
    color: #8a6410; font-weight: 800; position: relative;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.theme-pick input:checked + span {
    border-color: #c9a227;
    box-shadow: 0 0 0 4px rgba(201, 162, 39, .32), 0 16px 32px rgba(59, 31, 58, .12);
    background: #fffdf6;
}
.theme-pick input:checked + span strong { color: #3b1f3a; }
.theme-pick input:checked + span::after {
    content: "المختار";
    position: absolute; top: 18px; inset-inline-start: 18px; z-index: 2;
    padding: 3px 9px; border-radius: 999px;
    background: #c9a227; color: #3b1f3a; font-size: 11px; font-weight: 800;
    box-shadow: 0 6px 14px rgba(154, 107, 0, .28);
}
.theme-pick input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }
.theme-pick small { color: var(--muted); font-weight: 600; line-height: 1.45; }
.shot {
    display: grid; gap: 5px; height: 168px; padding: 7px; overflow: hidden;
    border-radius: 12px; border: 1px solid #eadff0; pointer-events: none;
}
.shot b, .shot i, .shot em { display: block; }
.shot-1 { background: #f7f2ea; }
.shot-1 .shot__bar { display: flex; align-items: center; gap: 4px; height: 16px; padding: 0 6px; border-radius: 5px; background: var(--brand, #3b1f3a); }
.shot-1 .shot__bar b { width: 8px; height: 8px; border-radius: 50%; background: #f4d27a; }
.shot-1 .shot__bar i { width: 16px; height: 3px; border-radius: 99px; background: rgba(255,255,255,.55); }
.shot-1 .shot__hero {
    height: 52px; border-radius: 6px;
    background:
        linear-gradient(115deg, rgba(59,31,58,.15), transparent 42%),
        linear-gradient(160deg, #c9a227, #8d5a3a 55%, #3b1f3a);
}
.shot-1 .shot__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.shot-1 .shot__cards b { height: 36px; border-radius: 5px; background: linear-gradient(#fff 0 58%, #efe4d4 58%); box-shadow: inset 0 0 0 1px #ead9c0; }
.shot-2 { background: #fff; }
.shot-2 .shot__bar { display: flex; align-items: center; gap: 4px; height: 14px; }
.shot-2 .shot__bar b { width: 8px; height: 8px; border-radius: 50%; background: var(--brand, #3b1f3a); }
.shot-2 .shot__bar i { width: 14px; height: 3px; border-radius: 99px; background: #ead9c0; }
.shot-2 .shot__hero { height: 58px; border-radius: 7px; background: linear-gradient(120deg, #f4d27a, #d7a15a 40%, #6a3558); }
.shot-2 .shot__chips { display: flex; gap: 4px; }
.shot-2 .shot__chips i { width: 28px; height: 8px; border-radius: 99px; background: #f6efe2; box-shadow: inset 0 0 0 1px #ead9c0; }
.shot-2 .shot__chips i:first-child { background: var(--brand, #3b1f3a); box-shadow: none; }
.shot-2 .shot__cards { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 5px; }
.shot-2 .shot__cards b {
    height: 58px; border-radius: 8px; background: linear-gradient(#fff 0 62%, #f8f1e6 62%);
    box-shadow: 0 4px 8px rgba(59,31,58,.08), inset 0 0 0 1px #f0e4d2;
    position: relative;
}
.shot-2 .shot__cards b::after {
    content: ""; position: absolute; left: 6px; bottom: 5px;
    width: 10px; height: 10px; border-radius: 50%; background: #c9a227;
}
.shot-3 { background: #12100e; border-color: #2a241e; gap: 6px; align-content: start; }
.shot-3 .shot__name {
    height: 22px; margin: 2px auto 0; width: 46%;
    background:
        linear-gradient(#f4efe6, #f4efe6) center 4px / 70% 7px no-repeat,
        linear-gradient(#c9a227, #c9a227) center 16px / 28px 2px no-repeat;
}
.shot-3 .shot__row { display: grid; grid-template-columns: 1.15fr .85fr; height: 58px; overflow: hidden; }
.shot-3 .shot__row.is-flip { direction: ltr; }
.shot-3 .shot__row b { background: linear-gradient(145deg, #8d5a3a, #c9a227 70%, #3b1f3a); }
.shot-3 .shot__row em { background: #1c1916; position: relative; }
.shot-3 .shot__row em::before,
.shot-3 .shot__row em::after {
    content: ""; position: absolute; right: 8px; left: 8px; height: 4px; border-radius: 99px; background: rgba(244,239,230,.35);
}
.shot-3 .shot__row em::before { top: 16px; width: 62%; }
.shot-3 .shot__row em::after { top: 26px; width: 40%; background: #f0c14a; }
.set-form { display: grid; gap: 16px; width: 100%; }
.set-card { background: #fff; border: 1px solid #eadff0; border-radius: 22px; padding: 18px 18px 8px; box-shadow: 0 10px 24px rgba(var(--brand-rgb), .05); }
.set-card h2 { margin: 0 0 14px; font-size: 1.2rem; display: flex; align-items: center; gap: 8px; }
.set-card h2 i { color: var(--gold); font-size: 1.05rem; }
.set-card--soft { background: #fffaf0; }
.set-id { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 18px; align-items: start; }
.set-logo { height: 180px; border-radius: 22px; background: #f6f3f7; border: 1px dashed #d9cbe0; display: grid; place-items: center; overflow: hidden; color: var(--muted); font-weight: 800; }
.set-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.set-form .btn.primary { justify-self: start; min-width: 220px; }
@media (max-width: 800px) {
    .set-id, .set-grid { grid-template-columns: 1fr; }
    .set-logo { height: 140px; }
}
.logo-preview { width: 72px; height: 72px; object-fit: contain; border-radius: 50%; border: 2px solid var(--gold); background: #fff; }
.pager { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.stack { display: grid; gap: 10px; }

.login-body {
    min-height: 100vh; margin: 0; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center;
    background:
        radial-gradient(circle at 15% 20%, rgba(201,162,39,.28), transparent 32%),
        linear-gradient(160deg, #1b1018, var(--brand) 55%, #6a3558);
    color: #fff; font-family: "Cairo", sans-serif; padding: 40px 7vw;
}
.login-story h1 { font-family: "Aref Ruqaa", serif; font-size: clamp(40px, 5vw, 64px); margin: 8px 0; color: var(--gold-bright); }
.login-story p { max-width: 36ch; color: rgba(255,255,255,.82); }
.login-card { width: min(420px, 100%); justify-self: center; background: #fffdf8; color: var(--ink); padding: 28px 26px; border-radius: 28px; box-shadow: 0 24px 60px rgba(0,0,0,.28); }
.login-mark {
    width: 64px; height: 64px; border-radius: 20px; margin-bottom: 12px;
    display: grid; place-items: center; font-size: 28px; color: #3b1f3a;
    background: linear-gradient(160deg, var(--gold-bright), var(--gold));
    box-shadow: 0 12px 24px rgba(0,0,0,.18);
}
.login-card h2 { font-family: "Aref Ruqaa", serif; margin: 0 0 12px; font-size: 34px; display: flex; align-items: center; gap: 10px; }
.login-card h2 i { font-size: 22px; color: var(--gold); }
.login-card .field span { display: inline-flex; align-items: center; gap: 6px; }
.login-card .field span i { color: var(--gold); }
.quiet { display: block; text-align: center; margin-top: 8px; color: var(--muted); font-weight: 700; }

@media (max-width: 991px) {
    .sidebar-spacer { width: 0; }
    .sidebar-edge { display: none; }
    .app-sidebar { display: none; transform: none; width: min(280px, 88vw); }
    body.sidebar-expanded .app-sidebar { display: flex; width: 200px; }
    body.sidebar-expanded .sidebar-count { margin-inline-start: 8px; }
    .menu-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 14px; border: 1px solid #f0e2c8; background: #fff; color: var(--brand); flex: none; }
    .kpis, .themes, .split { grid-template-columns: 1fr 1fr; }
    .card, .product-card, .row-card { grid-template-columns: 72px 1fr; }
    .card .actions, .row-card .actions { grid-column: 1 / -1; }
    .login-body { grid-template-columns: 1fr; padding: 24px 16px; }
    .login-story { display: none; }
}
@media (min-width: 720px) {
    .themes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .themes { grid-template-columns: 1fr; }
    .split, .num-row { grid-template-columns: 1fr 1fr; }
    .kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
    .kpi { min-height: 88px; padding: 10px; }
    .kpi b { font-size: 22px; }
    .kpi span { font-size: 12px; }
    .app-main > main, .app-header { padding-inline: 12px; }
    .app-header { min-height: 64px; gap: 8px; }
    .app-header__logo { width: 36px; height: 36px; box-shadow: none; }
    .app-header h1 { font-size: 15px; }
    .app-header__page-icon { display: none; }
    .header-user { max-width: 7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .block-head, .remain-hero { padding: 14px; }
    .block-head h2 { font-size: 22px; }
    .dash-hero { padding: 14px; }
    .dash-hero__shop { font-size: 22px; }
    .dash-hero__pill { min-width: 0; }
    .dash-hero__pill b { font-size: 24px; }
    .date-row .field { min-width: 0; flex: 1 1 140px; }
    .set-form .btn.primary { min-width: 0; width: 100%; }
    .set-tabs { flex-wrap: wrap; }
    .order-facts { grid-template-columns: 1fr 1fr; }
    .login-card { padding: 22px 16px; }
    .login-card h2 { font-size: 28px; }
}
@media (max-width: 420px) {
    .header-link { width: 40px; padding: 0; font-size: 0; gap: 0; }
    .header-link i { font-size: 18px; }
}

.table-card {
    background: #fff; border-radius: 20px; padding: 16px;
    box-shadow: 0 10px 26px rgba(var(--brand-rgb), .07);
    border: 1px solid rgba(var(--brand-rgb), .06);
}
.table-card { max-width: 100%; min-width: 0; }
.table-card .dataTables_wrapper { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
table.dataTable { width: 100% !important; border-collapse: separate !important; border-spacing: 0; min-width: 640px; }
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate { float: none !important; }
.dataTables_wrapper .dataTables_paginate { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; white-space: normal; }
.dt-toolbar__search { min-width: 0; }
.dt-toolbar__search .dataTables_filter { width: 100%; }
.dt-toolbar__search .dataTables_filter input { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
.table thead th, table.dataTable thead th, table.dataTable thead td {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-mid) 100%) !important;
    color: #fff !important; font-weight: 700; font-size: 13px;
    padding: 13px 14px !important; border: 1px solid rgba(255,255,255,.14) !important;
    white-space: nowrap; text-align: center !important; vertical-align: middle;
}
.table thead th:first-child { border-top-right-radius: 12px; }
.table thead th:last-child { border-top-left-radius: 12px; }
.table tbody td, table.dataTable tbody td {
    padding: 12px 14px !important; text-align: center !important; vertical-align: middle;
    border: 1px solid #eadfe6 !important; background: #fff; color: var(--ink);
}
.table tbody tr:nth-child(even) td { background: #fbf6f8 !important; }
.table tbody tr:hover td { background: #f4eaf0 !important; }
table.dataTable thead .sorting:before,
table.dataTable thead .sorting:after,
table.dataTable thead .sorting_asc:before,
table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:before,
table.dataTable thead .sorting_desc:after { color: #f1d48a !important; opacity: .85 !important; }
.prod-cell { display: flex; align-items: center; justify-content: center; gap: 10px; }
.prod-cell strong { display: block; }
.prod-copy { display: grid; gap: 2px; text-align: right; }
.prod-copy small {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
    max-width: 280px;
}
.thumb-sm, .prod-cell .mark {
    width: 44px; height: 44px; border-radius: 12px; object-fit: cover; flex: none;
    display: grid; place-items: center; background: linear-gradient(160deg, #fff8e8, #f3e4ef);
    color: var(--brand); font-weight: 800;
}
.act-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.act-row form { margin: 0; }
.btn-act {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border: 0; border-radius: 999px; padding: 8px 14px; font-weight: 800; font-size: 13px;
    cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn-act-add { background: linear-gradient(135deg, #e8c56b, #a67c12); color: #3b1f3a; box-shadow: 0 8px 18px rgba(201,162,39,.28); }
.btn-act-edit { background: #3b1f3a; color: #f8e7c4; }
.btn-act-del { background: #fff1f3; color: #9b1b30; box-shadow: inset 0 0 0 1px #f3c2cb; }
.btn-act-move { background: #eef2f7; color: #3b1f3a; width: 34px; min-width: 34px; padding: 0; box-shadow: inset 0 0 0 1px #e2e8f0; }
.btn-act-move:hover { background: #e2e8f0; }
.order-btns { display: inline-flex; gap: 4px; }
.reacts-cell { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.reacts-cell__one { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; background: #fdf2f5; box-shadow: inset 0 0 0 1px #f3c2cb; font-size: .78rem; font-weight: 800; color: #9b1b30; white-space: nowrap; }
.dt-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.dt-toolbar__search { flex: 1 1 220px; display: flex; justify-content: center; }
.dt-toolbar__search .dataTables_filter, .dt-toolbar__len .dataTables_length, .dt-toolbar__btns .dt-buttons { float: none !important; margin: 0; }
.dt-toolbar__search .dataTables_filter input { width: 100%; max-width: 100%; min-width: 0; border: 1px solid #e6d7de; border-radius: 10px; padding: 8px 10px; text-align: center; font-weight: 700; box-sizing: border-box; }
.dt-toolbar__len select { border: 1px solid #e6d7de; border-radius: 10px; padding: 6px 10px; }
.dt-toolbar__btns .dt-buttons { display: flex; gap: 6px; }
.dt-toolbar__btns .dt-button { border-radius: 999px !important; font-weight: 800; padding: 6px 14px; border: 0; }
.dt-toolbar__btns .btn-dt-excel { background: #1f7a4d !important; color: #fff !important; }
.dt-toolbar__btns .btn-dt-print { background: var(--brand) !important; color: #f4d27a !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--gold) !important; color: #3b1f3a !important; border: 0 !important; border-radius: 8px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button { border-radius: 8px !important; }
.filters { margin-bottom: 12px; }
.order-hit { cursor: pointer; }
.date-filter { background: #fff; border-radius: 18px; padding: 14px; margin-bottom: 12px; box-shadow: 0 8px 20px rgba(var(--brand-rgb), .06); }
.date-quick, .date-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.date-quick { margin-bottom: 10px; }
.date-chip {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid #ead9c0; background: #fff; color: #8a6410; border-radius: 999px;
    min-height: 36px; padding: 4px 12px; font-weight: 800; cursor: pointer;
}
.date-chip.is-on, .date-chip:hover { background: var(--brand); color: #fff; border-color: transparent; }
.date-row .field { margin: 0; min-width: 180px; }
.pick { position: relative; }
.pick__native { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }
.pick__btn {
    width: 100%; min-height: 46px; border: 1px solid #eadff0; border-radius: 12px; background: #fffdf9;
    font-weight: 700; cursor: pointer; text-align: center; color: #8a6410;
}
.pick__panel {
    position: absolute; z-index: 30; inset-inline: 0; top: calc(100% + 4px);
    background: #fff; border-radius: 14px; box-shadow: 0 16px 40px rgba(43,29,47,.18); padding: 8px;
}
.pick__search { width: 100%; min-height: 40px; border: 1px solid #eadff0; border-radius: 10px; padding: 8px 10px; margin-bottom: 6px; }
.pick__list { max-height: 220px; overflow: auto; display: grid; }
.pick__opt { border: 0; background: transparent; text-align: right; min-height: 40px; border-radius: 8px; cursor: pointer; font-weight: 700; color: #8a6410; }
.pick__opt.is-on, .pick__opt:hover { background: #f6f1f4; }

.dash-hero__pill {
    position: relative; z-index: 1; min-width: 160px; text-decoration: none; color: #fff;
    background: rgba(255,255,255,.12); border: 1px solid rgba(244,210,122,.45); border-radius: 16px; padding: 12px 16px;
}
.dash-hero__pill span { display: block; font-size: 13px; font-weight: 700; color: var(--gold-bright); }
.dash-hero__pill b { display: block; font-size: 32px; line-height: 1.1; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, .8fr); gap: 14px; align-items: start; }
.dash-side { display: grid; gap: 12px; }
.dash-card { background: #fff; border: 1px solid #eadff0; border-radius: 18px; padding: 14px; box-shadow: 0 8px 20px rgba(var(--brand-rgb), .06); }
.dash-card .page-kicker { color: var(--brand); }
.dash-card__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.dash-card__head p, .dash-card .hint { margin: 4px 0 0; color: var(--muted); }
.dash-card td small { display: block; color: var(--muted); font-weight: 700; margin-top: 2px; }
.dash-card .table-card { box-shadow: none; border: 0; }
.quick-link {
    display: flex; justify-content: space-between; align-items: center; gap: 8px;
    margin-top: 8px; padding: 12px 14px; border-radius: 14px; color: #fff; text-decoration: none; font-weight: 800;
}
.quick-link span { display: inline-flex; align-items: center; gap: 8px; }
.quick-link span i, .quick-link > i { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,.2); color: #fff; }
.quick-link:nth-of-type(1) { background: linear-gradient(135deg, #8a6a12, #c9a227); }
.quick-link:nth-of-type(2) { background: linear-gradient(135deg, var(--brand-deep), var(--brand)); }
.quick-link:nth-of-type(3) { background: linear-gradient(135deg, #145a48, #2d8a6e); }
.quick-link:nth-of-type(4) { background: linear-gradient(135deg, #7a4a10, #d4922a); }
.quick-link:nth-of-type(5) { background: linear-gradient(135deg, #2f2a6a, #5b53b8); }
.stock-row { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid #f3eaf2; font-weight: 800; }
.stock-row b { color: #9b1c1c; }
.set-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.set-tabs > * { flex: 1 1 0; text-align: center; text-decoration: none; }
.set-tabs button, .set-tabs a {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
    min-height: 48px; padding: 8px 16px; border-radius: 14px; border: 1px solid #eadff0; background: #fff;
    font: inherit; font-weight: 800; cursor: pointer; color: #8a6410;
}
.set-tabs button.is-on, .set-tabs a.is-on { background: var(--brand); color: #fff; border-color: transparent; }
.tab-count {
    min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
    background: #c9a227; color: #3b1f3a; font-size: 12px; font-weight: 800;
    display: inline-grid; place-items: center;
}
.set-tabs a.is-on .tab-count { background: #fff; color: var(--brand); }
.zone-tabs {
    display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px;
    overflow-x: auto; padding-bottom: 2px;
}
.zone-tabs__item {
    display: inline-flex; align-items: center; gap: 6px; flex: none;
    text-decoration: none; font-weight: 800; font-size: 13px;
    padding: 8px 12px; border-radius: 999px;
    border: 1px solid rgba(var(--brand-rgb), .18);
    background: #fff; color: var(--brand);
}
.zone-tabs__item.is-on {
    background: linear-gradient(135deg, var(--brand), var(--brand-mid));
    color: #fff; border-color: transparent;
}
.zone-tabs__item .tab-count {
    display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
    border-radius: 999px; background: rgba(var(--brand-rgb), .12); font-size: 11px;
}
.zone-tabs__item.is-on .tab-count { background: #fff; color: var(--brand); }
.orders-filter__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto auto; gap: 10px; align-items: end; }
.orders-filter__row .field select { width: 100%; min-height: 42px; }
@media (max-width: 900px) {
    .orders-filter__row { grid-template-columns: 1fr 1fr; }
    .orders-filter__row .btn-act { grid-column: span 1; }
}
form.settings.settings-wide {
    max-width: none; width: 100%; grid-template-columns: 1fr 1fr; gap: 8px 18px;
    background: #fff; border: 1px solid #eadff0; border-radius: 18px;
    box-shadow: 0 8px 20px rgba(var(--brand-rgb), .06);
}
form.settings.settings-wide > .hint,
form.settings.settings-wide > .check,
form.settings.settings-wide > .themes,
form.settings.settings-wide > .hero-picks,
form.settings.settings-wide > .btn,
form.settings.settings-wide > .field-label { grid-column: 1 / -1; }
.order-sheet .sheet-head h3 a { color: #f4d27a; text-decoration: none; }
.hero-picks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.hero-picks img { width: 100%; height: 120px; object-fit: cover; border-radius: 12px; margin-top: 8px; }
.hero-theme {
    margin-top: 16px;
    padding: 14px 14px 16px;
    border: 1px solid #ecdcc0;
    border-radius: 16px;
    background: linear-gradient(180deg, #fffdf8, #fdf6e9);
}
.hero-theme:first-of-type { margin-top: 12px; }
.hero-theme__title {
    margin: 0 0 12px;
    font-size: .98rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b5320;
}
.hero-theme__title i { color: var(--gold); }
@media (max-width: 991px) {
    .dash-grid, .hero-picks, form.settings.settings-wide { grid-template-columns: 1fr; }
}
html:has(body.panel) { overflow-x: clip; }
.dash-grid > *, .kpis > *, .set-grid > *, .set-id > *, .hero-picks > * { min-width: 0; }
.table-card { overflow-x: auto; }
.table { width: 100%; }
.m-sub { display: none; }
.dash-pending { width: 100%; table-layout: fixed; min-width: 0; }
.dash-pending th:nth-child(1), .dash-pending td:nth-child(1) { width: 46%; }
.dash-pending th:nth-child(2), .dash-pending td:nth-child(2) { width: 34%; }
.dash-pending th:nth-child(3), .dash-pending td:nth-child(3) { width: 20%; }
.dash-pending__order, .dash-pending__who { text-align: right; }
.dash-pending__order small, .dash-pending__who small, .dash-pending__who b { display: block; }
.dash-pending__who small, .dash-pending__order small { color: var(--muted); font-size: 12px; font-weight: 700; }
.dash-pending__sum { font-weight: 800; color: #8a6a12; }

@media (max-width: 640px) {
    .app-header__shop, .block-head p, .block-head .page-kicker, .dash-hero p { display: none; }
    .block-head { flex-wrap: nowrap; align-items: center; gap: 8px; padding: 12px; }
    .block-head__copy { flex: 1 1 auto; }
    .block-head h2 {
        font-family: "Cairo", "Segoe UI", Tahoma, sans-serif;
        font-size: 18px; font-weight: 800; line-height: 1.2;
    }
    .block-head .btn-act-add { margin-inline-start: auto; min-height: 36px; padding: 6px 10px; font-size: 12px; }
    .header-link, .header-user {
        width: 40px; height: 40px; min-height: 40px; padding: 0;
        display: grid; place-items: center; border-radius: 50%; position: relative;
        max-width: none; overflow: visible; white-space: normal; text-overflow: clip;
    }
    .header-link span, .header-user span {
        position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0);
    }
    .header-link i, .header-user i { display: block; font-size: 18px; line-height: 1; margin: 0; }
    .date-chip-last { display: none; }
    .block-head__mark, .dash-hero__mark { width: 44px; height: 44px; font-size: 20px; border-radius: 14px; }
    .set-tabs { flex-wrap: nowrap; gap: 6px; }
    .set-tabs button, .set-tabs a, .filters a, .date-chip { font-size: 12px; padding: 4px 8px; gap: 4px; min-height: 36px; }
    .date-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 6px; align-items: end; }
    .date-row > a { grid-column: 1 / -1; justify-self: start; }
    .date-row .field { min-width: 0; margin: 0; font-size: 11px; }
    .date-row .field input { min-height: 36px; padding: 4px 6px; font-size: 12px; }
    .date-row .btn-act { min-height: 36px; padding: 4px 8px; font-size: 12px; }
    table.dataTable { min-width: 0 !important; width: 100% !important; font-size: 12px; }
    .dash-pending { table-layout: fixed; }
    .table thead th, table.dataTable thead th, .table tbody td, table.dataTable tbody td { padding: 7px 4px !important; font-size: 11px; white-space: normal; }
    .col-fold { display: none; }
    .m-sub { display: block; color: var(--muted); font-size: 11px; font-weight: 700; }
    .prod-copy small:not(.m-sub) { display: none; }
    .thumb-sm, .prod-cell .mark { width: 32px; height: 32px; }
    .prod-cell { gap: 6px; }
    .act-row .btn-act { width: 32px; height: 32px; min-height: 32px; padding: 0; font-size: 0; gap: 0; }
    .act-row .btn-act i { font-size: 14px; }
    .table-card { padding: 8px; }
    .dt-toolbar { gap: 6px; margin-bottom: 8px; }
    .dt-toolbar__search .dataTables_filter label { font-size: 0; }
    .dt-toolbar__search .dataTables_filter input { min-height: 34px; padding: 4px 8px; font-size: 13px; }
    .dt-toolbar__len { font-size: 12px; }
    .dt-toolbar__btns .dt-button { font-size: 0 !important; min-height: 34px; padding: 4px 10px !important; }
    .dt-toolbar__btns .dt-button i { font-size: 16px; }
    .dt-num { width: 24px; }
}
