/* غياث الشمال — Admin dashboard (RTL-first, same brand tokens as the store) */
:root {
  --brown: #4A2E1F; --brown-dark: #2B1B14; --orange: #D07A3F; --orange-dark: #B8652D;
  --sand: #DCC9B1; --sand-soft: #E9DDCC; --cream: #F8F6EF; --white: #fff;
  --green: #3F6B4F; --red: #B84A42; --amber: #B7791F; --text: #2B1B14; --muted: #6B5648; --border: #E6DBCA;
  --font: "Tajawal", system-ui, "Segoe UI", sans-serif;
  --radius: 14px; --shadow: 0 1px 3px rgba(43,27,20,.06), 0 6px 18px rgba(43,27,20,.06);
  --side-w: 250px; --top-h: 68px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--cream); line-height: 1.6; font-size: 15px; }
a { color: inherit; text-decoration: none; }
h1,h2,h3 { margin: 0; color: var(--brown); font-weight: 800; line-height: 1.3; }
p { margin: 0 0 .75rem; } ul { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 6px; }
.ui { width: 20px; height: 20px; flex-shrink: 0; }
.muted { color: var(--muted); } .num { direction: ltr; unicode-bidi: plaintext; font-variant-numeric: tabular-nums; }

/* Shell */
.shell { min-height: 100vh; }
.sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--side-w); background: var(--brown-dark); color: var(--sand); display: flex; flex-direction: column; padding: 1.1rem .85rem; z-index: 60; }
.side-brand { display: flex; align-items: center; gap: .7rem; padding: .25rem .5rem 1.25rem; border-bottom: 1px solid rgba(220,201,177,.15); margin-bottom: 1rem; }
.side-brand img { border-radius: 11px; }
.side-brand strong { display: block; color: #fff; font-size: 1.05rem; line-height: 1.2; }
.side-brand small { color: var(--sand); opacity: .8; font-size: .75rem; }
.side-nav, .side-foot { display: grid; gap: .2rem; }
.side-nav a, .side-foot a { display: flex; align-items: center; gap: .75rem; padding: .7rem .85rem; border-radius: 10px; font-weight: 700; transition: background .15s, color .15s; }
.side-nav a:hover, .side-foot a:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-nav a.active { background: var(--orange); color: #fff; }
.side-foot { margin-top: auto; padding-top: 1rem; border-top: 1px solid rgba(220,201,177,.15); }
.main { margin-inline-start: var(--side-w); min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 40; height: var(--top-h); display: flex; align-items: center; gap: .85rem; padding-inline: 1.5rem; background: rgba(248,246,239,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.page-title { font-size: 1.35rem; margin-inline-end: auto; }
.top-search { display: flex; align-items: center; gap: .5rem; background: #fff; border: 1.5px solid var(--border); border-radius: 10px; padding-inline: .8rem; height: 42px; width: min(340px, 36vw); color: var(--muted); }
.top-search input { border: 0; outline: 0; background: transparent; width: 100%; height: 100%; }
.top-search:focus-within { border-color: var(--orange); }
.icon-btn { position: relative; width: 42px; height: 42px; display: grid; place-items: center; border: 1.5px solid var(--border); background: #fff; border-radius: 10px; cursor: pointer; color: var(--brown); }
.icon-btn:hover { background: var(--sand-soft); }
.icon-btn .dot { position: absolute; top: 8px; inset-inline-end: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); border: 2px solid #fff; }
.menu-btn { display: none; }
.me { display: flex; align-items: center; gap: .6rem; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--brown); color: #fff; display: grid; place-items: center; font-weight: 800; }
.me-text { display: grid; line-height: 1.2; } .me-text small { color: var(--muted); font-size: .75rem; }
.content { padding: 1.5rem; max-width: 1400px; }
.demo-note { background: #FFF6E8; border: 1px dashed var(--orange); color: var(--orange-dark); padding: .5rem .9rem; border-radius: 10px; font-size: .85rem; font-weight: 700; margin-bottom: 1.25rem; }

@media (max-width: 960px) {
  .sidebar { transform: translateX(100%); transition: transform .25s; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  [dir="ltr"] .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; }
  .side-backdrop { position: fixed; inset: 0; background: rgba(43,27,20,.5); z-index: 55; }
  .main { margin-inline-start: 0; }
  .menu-btn { display: grid; }
  .me-text, .top-search { display: none; }
  .topbar { padding-inline: 1rem; }
  .content { padding: 1rem; }
}

/* Buttons & chips */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; font-weight: 700; padding: .55rem 1.1rem; min-height: 42px; border-radius: 10px; border: 1.5px solid transparent; cursor: pointer; transition: background .15s, color .15s; white-space: nowrap; }
.btn--primary { background: var(--orange); color: #fff; } .btn--primary:hover { background: var(--orange-dark); }
.btn--brown { background: var(--brown); color: #fff; } .btn--brown:hover { background: var(--brown-dark); }
.btn--outline { background: #fff; border-color: var(--border); color: var(--brown); } .btn--outline:hover { background: var(--sand-soft); }
.btn--sm { min-height: 34px; padding: .25rem .7rem; font-size: .88rem; }
.btn--danger { color: var(--red); }
.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .7rem; border-radius: 99px; font-size: .8rem; font-weight: 700; background: var(--sand-soft); color: var(--brown); white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.ok { background: #E3F0E8; color: var(--green); } .badge.warn { background: #FCEFD8; color: var(--amber); }
.badge.bad { background: #F8E2E0; color: var(--red); } .badge.info { background: #E6EAF5; color: #3C5A99; }

/* Page head */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head p { color: var(--muted); margin: 0; }
.crumb { display: flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .9rem; margin-bottom: .75rem; }
.crumb a:hover { color: var(--orange-dark); }

/* Cards */
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.card-head h2 { font-size: 1.05rem; }
.card-body { padding: 1.25rem; }
.grid { display: grid; gap: 1rem; }
.grid > * { min-width: 0; }   /* wide tables scroll inside their card instead of stretching the page */
.cols-2 { grid-template-columns: 1.6fr 1fr; } .cols-3 { grid-template-columns: repeat(3, 1fr); } .cols-2e { grid-template-columns: 1fr 1fr; }
@media (max-width: 1100px) { .cols-2, .cols-3 { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .cols-2e { grid-template-columns: 1fr; } }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.kpi { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.1rem; }
.kpi-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--sand-soft); color: var(--brown); flex-shrink: 0; }
.kpi-ico .ui { width: 24px; height: 24px; }
.kpi.brand { background: var(--brown); color: #fff; border-color: var(--brown); } .kpi.brand .kpi-ico { background: rgba(255,255,255,.14); color: #fff; } .kpi.brand small { color: var(--sand); }
.kpi.warn .kpi-ico { background: #FCEFD8; color: var(--amber); } .kpi.ok .kpi-ico { background: #E3F0E8; color: var(--green); } .kpi.bad .kpi-ico { background: #F8E2E0; color: var(--red); }
.kpi strong { display: block; font-size: 1.4rem; line-height: 1.2; } .kpi small { color: var(--muted); }
.kpi .lbl { font-weight: 700; font-size: .9rem; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .8rem 1.1rem; text-align: start; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { font-size: .82rem; color: var(--muted); font-weight: 700; background: #FBF8F2; }
tbody tr:hover { background: #FDFBF6; } tbody tr:last-child td { border-bottom: 0; }
td.actions { text-align: end; } td.actions .btn { margin-inline-start: .25rem; }
.cell-prod { display: flex; align-items: center; gap: .75rem; }
.thumb { width: 44px; height: 44px; border-radius: 11px; background: var(--sand-soft); color: var(--brown); display: grid; place-items: center; flex-shrink: 0; }
.thumb .ico { width: 28px; height: 28px; } .ico .a { stroke: var(--orange); }
.cell-prod small { color: var(--muted); display: block; line-height: 1.2; }
.old { color: var(--muted); text-decoration: line-through; font-size: .85rem; margin-inline-start: .4rem; }
.empty-row td { text-align: center; color: var(--muted); padding: 2rem; }

/* Toolbar / forms */
.toolbar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.input, select.input, textarea.input { width: 100%; min-height: 42px; padding: .5rem .85rem; background: #fff; border: 1.5px solid var(--border); border-radius: 10px; }
.input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(208,122,63,.2); }
.toolbar .input { width: auto; min-width: 180px; flex: 1; max-width: 320px; }
.toolbar select.input { flex: 0 0 auto; min-width: 150px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 1.25rem; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: grid; gap: .3rem; align-content: start; } .field label { font-weight: 700; font-size: .9rem; } .field small { color: var(--muted); }
.switch { display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; font-weight: 700; }
.switch input { width: 40px; height: 22px; accent-color: var(--green); }
.form-actions { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1.25rem; flex-wrap: wrap; }

/* Charts */
.chart { width: 100%; }
.chart svg { width: 100%; height: auto; max-height: 280px; display: block; overflow: visible; }
.chart text { font-family: var(--font); fill: var(--muted); font-size: 11px; }
.chart .bar { fill: var(--brown); transition: fill .15s; } .chart .bar:hover { fill: var(--orange); }
.chart .grid-line { stroke: var(--border); stroke-dasharray: 3 3; }
.chart .line { fill: none; stroke: var(--orange); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart .area { fill: rgba(208,122,63,.14); } .chart .pt { fill: #fff; stroke: var(--orange); stroke-width: 2.5; }
.hbars { display: grid; gap: .8rem; }
.hbar-row { display: grid; gap: .25rem; } .hbar-top { display: flex; justify-content: space-between; font-size: .9rem; font-weight: 700; }
.hbar-track { height: 9px; border-radius: 99px; background: var(--sand-soft); overflow: hidden; } .hbar-fill { height: 100%; border-radius: 99px; background: var(--orange); }
.donut-wrap { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; justify-content: center; }
.donut-wrap svg { width: 150px; height: 150px; flex-shrink: 0; }
.legend { display: grid; gap: .45rem; font-size: .9rem; } .legend li { display: flex; align-items: center; gap: .5rem; }
.legend i { width: 11px; height: 11px; border-radius: 3px; flex-shrink: 0; } .legend b { margin-inline-start: auto; padding-inline-start: .75rem; }

/* Order details */
.timeline { display: grid; gap: 0; }
.tl { display: grid; grid-template-columns: 22px 1fr; gap: .75rem; padding-bottom: 1rem; position: relative; }
.tl::before { content: ""; position: absolute; inset-inline-start: 10px; top: 20px; bottom: 0; width: 2px; background: var(--border); } .tl:last-child::before { display: none; }
.tl .pin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--sand); background: #fff; }
.tl.done .pin { background: var(--green); border-color: var(--green); } .tl.now .pin { border-color: var(--orange); background: var(--orange); }
.tl small { color: var(--muted); display: block; }
.kv { display: grid; gap: .6rem; } .kv div { display: flex; justify-content: space-between; gap: 1rem; } .kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 700; text-align: end; }
.kv .total { border-top: 1px dashed var(--border); padding-top: .6rem; font-size: 1.15rem; color: var(--brown); }
dl.kv { margin: 0; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: linear-gradient(160deg, var(--sand-soft), var(--cream) 55%); }
.login-card { width: min(420px, 100%); background: #fff; border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 20px 50px rgba(43,27,20,.15); padding: 2rem; }
.login-card img { display: block; margin: 0 auto 1rem; border-radius: 16px; }
.login-card h1 { text-align: center; font-size: 1.5rem; } .login-card p.sub { text-align: center; color: var(--muted); margin-bottom: 1.5rem; }
.err { color: var(--red); font-weight: 700; margin-bottom: 1rem; text-align: center; }

/* Toast */
.toast { position: fixed; bottom: 1.25rem; inset-inline: 0; margin-inline: auto; width: max-content; max-width: 92vw; background: var(--brown-dark); color: #fff; padding: .75rem 1.3rem; border-radius: 99px; box-shadow: 0 10px 30px rgba(0,0,0,.25); z-index: 100; font-weight: 700; }

@media print { .sidebar, .topbar, .demo-note, .page-head .btn, .toast { display: none !important; } .main { margin: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- additions: sidebar button, toast error, map, small forms ---- */
.side-btn { display: flex; align-items: center; gap: .75rem; width: 100%; padding: .7rem .85rem; border: 0; border-radius: 10px; background: transparent; color: inherit; font-weight: 700; cursor: pointer; text-align: start; }
.side-btn:hover { background: rgba(255,255,255,.07); color: #fff; }
.toast--bad { background: var(--red); }
.map { height: 340px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--sand-soft); }
.inline-form { display: inline-flex; gap: .35rem; align-items: center; }
.inline-form .input { width: 80px; min-height: 34px; padding: .2rem .5rem; }
.field .err { color: var(--red); font-size: .85rem; }
.alert { background: #F8E2E0; color: var(--red); border-radius: 10px; padding: .6rem .9rem; font-weight: 700; margin-bottom: 1rem; }
.tag { display: inline-block; padding: .05rem .5rem; border-radius: 6px; background: var(--sand-soft); font-size: .78rem; font-weight: 700; color: var(--brown); }
.tag--pickup { background: #E6EAF5; color: #3C5A99; } .tag--delivery { background: #FCEFD8; color: #B7791F; }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }

/* service requests */
.wrap-cell { white-space: normal; min-width: 260px; max-width: 420px; line-height: 1.6; }
.req-form { flex-wrap: wrap; }
.req-form .input { width: auto; min-width: 130px; }
.req-form input[name=note] { min-width: 160px; }
/* live alerts: menu counters + new-order banner */
.nav-badge { margin-inline-start: auto; min-width: 22px; height: 22px; padding: 0 .4rem; border-radius: 99px; background: var(--orange); color: #fff; font-size: .78rem; display: inline-grid; place-items: center; font-weight: 800; }
.nav-badge[hidden] { display: none; }
.side-nav a.active .nav-badge { background: #fff; color: var(--orange-dark); }
.alert-pop { position: fixed; top: 1rem; inset-inline-end: 1rem; z-index: 120; display: flex; align-items: center; gap: .75rem; background: #fff; border: 1px solid var(--border); border-inline-start: 5px solid var(--orange); border-radius: 12px; padding: .8rem 1rem; box-shadow: 0 14px 34px rgba(43,27,20,.18); max-width: min(92vw, 380px); }
.alert-pop strong { display: block; color: var(--brown); }
.alert-pop small { color: var(--muted); }
.alert-pop[hidden] { display: none; }
/* product size / color options preview */
.option-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.option-chips:empty { display: none; }
.option-chips span { background: var(--sand-soft); color: var(--brown); border-radius: 99px; padding: .1rem .65rem; font-size: .82rem; font-weight: 700; }
/* server-side paging + filter bar */
.pager-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; padding: .85rem 1.25rem; border-top: 1px solid var(--border); }
.pager { display: flex; flex-wrap: wrap; gap: .3rem; }
.pg { min-width: 38px; height: 36px; padding: 0 .7rem; display: inline-grid; place-items: center; border: 1px solid var(--border); border-radius: 9px; background: #fff; color: var(--brown); font-weight: 700; font-size: .9rem; }
a.pg:hover { background: var(--sand-soft); }
.pg--on { background: var(--orange); border-color: var(--orange); color: #fff; }
.pg--off { opacity: .45; }
.pg--gap { border: 0; background: none; min-width: 20px; padding: 0; }
.toolbar .btn { flex-shrink: 0; }
.clear-filters { font-weight: 700; color: var(--orange-dark); align-self: center; white-space: nowrap; }
tr.row-editing td { background: #FFF7F0; }
/* product photos + specifications */
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .75rem; margin-bottom: .75rem; }
.img-grid:empty { display: none; }
.img-tile { margin: 0; background: #fff; border: 1.5px solid var(--border); border-radius: 12px; padding: .4rem; display: grid; gap: .4rem; }
.img-tile.is-main { border-color: var(--green); }
.img-tile img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; border-radius: 8px; background: #fff; display: block; }
.img-tile figcaption { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: center; font-size: .8rem; font-weight: 700; color: var(--muted); }
.upload-drop { display: flex; gap: .75rem; align-items: center; border: 2px dashed var(--sand); border-radius: 12px; padding: 1rem; cursor: pointer; background: #FFFCF7; color: var(--brown); }
.upload-drop:hover, .upload-drop:focus-within { border-color: var(--orange); }
.upload-drop small { display: block; color: var(--muted); font-weight: 500; }
.prop-rows { display: grid; gap: .5rem; margin-bottom: .5rem; }
.prop-row { display: grid; grid-template-columns: 1fr 1.4fr 42px; gap: .5rem; align-items: center; }
.prod-thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: contain; background: #fff; border: 1px solid var(--border); }
.head-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.help-list { margin: 0; padding-inline-start: 1.2rem; display: grid; gap: .5rem; line-height: 1.8; }

/* ---- coupon form: grouped fields, all inputs the same height ---- */
.coupon-form { display: grid; gap: 1rem; }
.form-group { border: 1px solid var(--border); border-radius: 12px; padding: .9rem 1rem 1rem; margin: 0; min-width: 0; }
.form-group legend { padding: 0 .4rem; font-weight: 800; font-size: .9rem; color: var(--brown, inherit); }
.coupon-form .input { height: 42px; }
.field .opt { font-weight: 500; color: var(--muted); font-size: .8rem; }
.input-unit { position: relative; }
.input-unit .input { padding-inline-start: 3rem; }
.input-unit span { position: absolute; inset-block: 0; inset-inline-start: 0; display: grid; place-items: center; width: 2.6rem;
  color: var(--muted); font-weight: 700; font-size: .85rem; border-inline-end: 1px solid var(--border); pointer-events: none; }
.coupon-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: .25rem; }
.field .err:empty { display: none; }

/* ---- row actions (edit + delete) and a delete button set apart in a form's actions ---- */
.row-actions { display: inline-flex; align-items: center; gap: .4rem; flex-wrap: nowrap; }
.row-actions form { margin: 0; }
.form-actions .push-start { margin-inline-end: auto; }
.btn--danger:hover { background: #F8E2E0; border-color: #E8B9B4; }
.btn--icon { padding-inline: .5rem; min-width: 34px; justify-content: center; }

/* ---- SweetAlert2 confirmation dialogs in the admin's look ---- */
.gs-swal { font-family: inherit; border-radius: 18px; padding: 1.4rem 1.25rem 1.25rem; color: var(--text); }
.gs-swal .swal2-title { color: var(--brown); font-size: 1.25rem; font-weight: 800; line-height: 1.5; padding-top: .4rem; }
.gs-swal .swal2-html-container { color: var(--muted); font-size: .98rem; line-height: 1.8; margin-top: .5rem; }
.gs-swal .swal2-icon.swal2-warning { border-color: #E9B26F; color: var(--orange); }
.gs-swal .swal2-actions { gap: .6rem; margin-top: 1.4rem; }
.gs-swal .swal2-actions .btn { min-width: 120px; }
.btn--red { background: var(--red); color: #fff; } .btn--red:hover { background: #9C3B34; }

/* ---- categories page ---- */
.cat-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; margin-bottom: 1.25rem; }
.cat-stat { display: flex; align-items: center; gap: .8rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: .85rem 1rem; }
.cat-stat .thumb svg { width: 22px; height: 22px; }
.cat-stat.ok .thumb { background: #E3F0E8; color: var(--green); }
.cat-stat.warn .thumb { background: #FCEFD8; color: var(--amber); }
.cat-stat b { display: block; font-size: 1.45rem; line-height: 1.1; color: var(--brown); }
.cat-stat small { color: var(--muted); }
.cat-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.cat-form-card { position: sticky; top: 84px; }
.cat-list { display: grid; }
.cat-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto auto; align-items: center; gap: .85rem; padding: .7rem 1rem; border-top: 1px solid var(--border); transition: background .15s; }
.cat-row:first-child { border-top: 0; }
.cat-row:hover { background: #FCFAF6; }
.cat-row.is-editing { background: #FFF7F0; box-shadow: inset -3px 0 0 var(--orange); }
.cat-row.is-hidden .cat-disc, .cat-row.is-hidden .cat-info strong { opacity: .5; }
.cat-order { display: grid; justify-items: center; color: var(--muted); font-size: .78rem; font-weight: 700; }
.cat-order form { margin: 0; line-height: 0; }
.cat-order button { width: 26px; height: 20px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--brown); cursor: pointer; display: grid; place-items: center; }
.cat-order button:hover:not(:disabled) { background: var(--sand-soft); }
.cat-order button:disabled { opacity: .25; cursor: default; }
.cat-order svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.cat-disc { width: 50px; height: 50px; border-radius: 50%; background: var(--sand-soft); color: var(--brown); display: grid; place-items: center; flex: none; }
.cat-disc .ico { width: 30px; height: 30px; }
.cat-info { min-width: 0; display: grid; gap: .1rem; }
.cat-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--brown); }
.cat-info small { color: var(--muted); }
.cat-info small a { color: var(--orange-dark); font-weight: 700; }
.cat-empty { padding: 2rem 1rem; text-align: center; margin: 0; }
.cat-form { display: grid; gap: 1rem; }
.cat-preview { display: grid; justify-items: center; gap: .55rem; padding: 1rem; border-radius: 12px; background: linear-gradient(180deg, var(--sand-soft), var(--cream)); }
.cat-preview > small { color: var(--muted); font-weight: 700; font-size: .78rem; }
.cat-preview-chip { display: grid; justify-items: center; gap: .4rem; min-width: 118px; max-width: 100%; padding: .8rem .9rem; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); font-weight: 800; color: var(--brown); text-align: center; overflow-wrap: anywhere; }
.cat-icons { border: 0; padding: 0; margin: 0; min-width: 0; }
.cat-icons legend { padding: 0; margin-bottom: .4rem; font-weight: 700; font-size: .9rem; }
.cat-icon-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: .45rem; }
.cat-icon { cursor: pointer; position: relative; }
.cat-icon input { position: absolute; opacity: 0; pointer-events: none; }
.cat-icon span { display: grid; place-items: center; aspect-ratio: 1; border: 1.5px solid var(--border); border-radius: 12px; background: #fff; color: var(--brown); transition: border-color .15s, background .15s; }
.cat-icon span .ico { width: 62%; height: 62%; }
.cat-icon:hover span { background: var(--sand-soft); }
.cat-icon input:checked + span { border-color: var(--orange); background: #FFF7F0; box-shadow: 0 0 0 3px rgba(208,122,63,.18); }
.cat-icon input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }
.cat-note { margin: -.4rem 0 0; font-size: .85rem; }
.gs-swal select.input { width: auto; min-width: 70%; max-width: 86%; margin: 1rem auto 0; display: block; }
@media (max-width: 1100px) { .cat-layout { grid-template-columns: 1fr; } .cat-form-card { position: static; } }
@media (max-width: 720px) {
  .cat-stats { grid-template-columns: repeat(2, 1fr); }
  .cat-row { grid-template-columns: auto auto minmax(0, 1fr) auto; }
  .cat-row .row-actions { grid-column: 1 / -1; justify-content: flex-end; }
}
