:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-alt: #eef2f8;
  --ink: #111827;
  --muted: #667085;
  --line: #d9e0ea;
  --brand: #0f766e;
  --brand-strong: #115e59;
  --accent: #2563eb;
  --danger: #dc2626;
  --warning: #d97706;
  --success: #0f766e;
  --radius-sm: 8px;
  --radius: 8px;
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.1);
  --container: 1280px;
  --nav-height: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Tahoma, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: 0; }
button, input, select, textarea { font: inherit; }

button, .btn {
  border: 0;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}
button:hover, .btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn.light {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn.accent {
  background: linear-gradient(135deg, var(--brand), var(--accent));
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: var(--surface);
  color: var(--ink);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
textarea { min-height: 120px; resize: vertical; }
label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(244, 246, 251, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(217, 224, 234, 0.9);
}
.site-header-inner,
.section-inner,
.hero-inner,
.footer-inner,
.flash-stack {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
}
.site-header-inner {
  display: grid;
  grid-template-columns: 180px minmax(220px, 1fr) auto;
  gap: 20px;
  align-items: center;
  min-height: 76px;
}
.header-top-row { display: contents; }
.mobile-nav-toggle { display: none; }
.brand {
  font-size: 26px;
  font-weight: 800;
  color: var(--ink);
}
.search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}
.search input { background: var(--surface); }
.search button { border-radius: var(--radius-sm); }
nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 14px;
  font-weight: 700;
}
nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--muted);
}
nav a:hover {
  background: var(--surface);
  color: var(--ink);
}
nav span {
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  text-align: center;
}

main { min-height: 70vh; }
.hero {
  padding: 28px 0 0;
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  gap: 22px;
  align-items: stretch;
}
.hero-copy,
.hero-side,
.panel,
.auth-box,
.table-wrap,
.product-card,
.stat,
.category-tile,
.order-summary-line,
.info-strip {
  background: var(--surface);
  border: 1px solid rgba(217, 224, 234, 0.85);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.hero-copy {
  padding: 34px;
  display: grid;
  gap: 18px;
}
.hero-copy h1 {
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.15;
}
.hero-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  max-width: 60ch;
}
.hero-actions,
.hero-metrics,
.section-head,
.catalog-toolbar,
.product-meta,
.auth-switches,
.checkout-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.hero-metrics {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.metric {
  min-width: 120px;
  padding: 10px 12px;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
}
.metric strong {
  display: block;
  font-size: 18px;
  color: var(--ink);
}
.metric span {
  color: var(--muted);
  font-size: 12px;
}
.hero-side {
  overflow: hidden;
  position: relative;
  min-height: 480px;
}
.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.08), rgba(17, 24, 39, 0.6)),
    url('../uploads/products/boutique-dress.jpg') center/cover no-repeat;
}
.hero-overlay {
  position: absolute;
  right: 24px;
  left: 24px;
  bottom: 24px;
  display: grid;
  gap: 10px;
  color: #fff;
}
.hero-note {
  width: fit-content;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(8px);
  font-size: 13px;
  font-weight: 700;
}
.hero-overlay h2 {
  font-size: 28px;
  line-height: 1.3;
}
.hero-overlay p {
  margin: 0;
  max-width: 34ch;
  color: rgba(255,255,255,.88);
}

.section { padding: 22px 0; }
.section-inner { display: grid; gap: 18px; }
.section-head {
  justify-content: space-between;
  margin-bottom: 4px;
}
.section-head h2 { font-size: 24px; }
.section-head p,
.muted { color: var(--muted); }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #e6fffb;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 700;
}
.info-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
}
.info-strip > div {
  padding: 18px 20px;
  border-left: 1px solid var(--line);
}
.info-strip > div:last-child { border-left: 0; }
.info-strip strong { display: block; margin-bottom: 4px; }
.info-strip span { color: var(--muted); font-size: 13px; }

.product-grid,
.stats,
.auth-page {
  display: grid;
  gap: 16px;
}
.product-grid {
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 260px);
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
  scroll-snap-type: x proximity;
}
.product-grid > .product-card {
  scroll-snap-align: start;
}
.stats,
.auth-page {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.category-tile {
  min-height: 240px;
  position: relative;
  overflow: hidden;
}
.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17,24,39,.04), rgba(17,24,39,.82));
}
.category-copy {
  position: absolute;
  right: 0;
  left: 0;
  bottom: 0;
  z-index: 1;
  padding: 18px;
  color: #fff;
}
.category-copy strong {
  display: block;
  font-size: 21px;
  margin-bottom: 4px;
}
.category-copy small {
  display: block;
  font-size: 12px;
  color: rgba(255,255,255,.86);
}

.product-card {
  overflow: hidden;
}
.product-card a.card-media { display: block; }
.product-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--surface-alt);
}
.product-card .body {
  display: grid;
  gap: 10px;
  padding: 14px;
}
.product-card h3 {
  font-size: 15px;
  line-height: 1.5;
  min-height: 46px;
}
.product-summary {
  min-height: 40px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.price {
  font-size: 16px;
  font-weight: 800;
  color: var(--brand-strong);
}
.card-link {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.auth-shell {
  width: min(calc(100% - 32px), 520px);
  margin: 0 auto;
  padding: 36px 0 48px;
}
.auth-shell-compact { width: min(calc(100% - 32px), 390px); padding-top: 42px; }
.auth-card {
  background: var(--surface);
  border: 1px solid rgba(217, 224, 234, 0.85);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  display: grid;
  gap: 16px;
}
.auth-card-center { text-align: center; }
.auth-head { display: grid; gap: 6px; }
.auth-head h1,
.auth-head h2 { font-size: 24px; }
.auth-head p,
.auth-footnote { color: var(--muted); margin: 0; font-size: 13px; }
.auth-switches-simple { justify-content: center; }
.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 12px;
  align-items: end;
}
.captcha-box {
  min-height: 48px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--ink);
}
.auth-panel { display: grid; gap: 14px; }
.auth-panel[hidden] { display: none; }
.auth-compact { gap: 10px; }
.auth-small-link { justify-self: center; color: #2563eb; font-size: 12px; }
.check-label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}
.check-label input { width: auto; }
.account-shell {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
  padding: 22px 0 40px;
  display: grid;
  gap: 18px;
}
.account-grid {
  display: grid;
  grid-template-columns: minmax(320px, .9fr) minmax(280px, .55fr);
  gap: 18px;
  align-items: start;
}
.account-summary {
  display: grid;
  gap: 14px;
}
.account-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.layout {
  grid-template-columns: 280px minmax(0, 1fr);
  padding: 22px 0 36px;
}
.panel, .auth-box, .table-wrap { padding: 22px; }
.filters h3,
.auth-box h2,
.panel h2,
.panel h3 { margin-bottom: 14px; }
.filters-links {
  display: grid;
  gap: 6px;
}
.filters-links a {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
}
.filters-links a:hover,
.filters-links a.active {
  background: var(--surface-alt);
  color: var(--ink);
}
.catalog-toolbar {
  justify-content: space-between;
  margin-bottom: 18px;
}
.catalog-toolbar h1 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.3;
}
.empty-state {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.product-detail {
  grid-template-columns: minmax(320px, .95fr) minmax(0, 1.05fr);
  padding: 22px 0 36px;
}
.gallery-card,
.detail-card {
  background: var(--surface);
  border: 1px solid rgba(217, 224, 234, 0.85);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.gallery-card { padding: 18px; }
.gallery img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.detail-card {
  padding: 28px;
  display: grid;
  gap: 16px;
}
.detail-card h1 {
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.25;
}
.product-meta {
  color: var(--muted);
  font-size: 13px;
}
.product-description {
  color: #243041;
  font-size: 14px;
}
.detail form { display: grid; gap: 14px; max-width: 480px; }
.sizes {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.sizes label {
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: var(--surface);
  text-align: center;
  cursor: pointer;
  color: var(--ink);
}
.sizes input { width: auto; margin: 0 0 0 6px; }
.sizes label:has(input:checked) {
  border-color: var(--accent);
  background: #eff6ff;
}

.flash-stack {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.flash {
  margin: 0;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid #bfe5d9;
  background: #ecfdf5;
  color: #14532d;
  font-size: 14px;
  font-weight: 700;
}
.flash.warning {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #92400e;
}
.flash.error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.auth-page {
  width: min(calc(100% - 32px), 1180px);
  margin: 0 auto;
  grid-template-columns: 1.2fr .9fr .9fr;
  gap: 18px;
  padding: 22px 0 36px;
}
.auth-box {
  display: grid;
  gap: 16px;
  align-content: start;
}
.auth-box.featured {
  background: linear-gradient(180deg, #0f172a, #172033);
  color: #fff;
  border-color: rgba(255,255,255,.08);
}
.auth-box.featured .muted { color: rgba(255,255,255,.72); }
.auth-points {
  display: grid;
  gap: 10px;
}
.auth-points div {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.08);
}
.auth-switches {
  gap: 8px;
}
.auth-switch {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}
.auth-switch.active {
  background: #eff6ff;
  color: var(--accent);
  border-color: #bfdbfe;
}
.auth-panel { display: grid; gap: 14px; }
.auth-panel[hidden] { display: none; }
.inline-link {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}
.helper-text {
  font-size: 12px;
  color: var(--muted);
}
.otp-box {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  border: 1px dashed var(--line);
}

.payment-card {
  width: min(calc(100% - 32px), 640px);
  margin: 0 auto;
}
.payment-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.payment-summary div,
.payment-wallet {
  padding: 12px 14px;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
}
.payment-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}
.payment-summary strong { font-size: 16px; }
.payment-wallet { word-break: break-all; }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: right;
  padding: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  vertical-align: middle;
}
.cart-row-product {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}
.cart-img {
  width: 72px;
  height: 90px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.cart-actions,
.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.summary-total {
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

.checkout {
  grid-template-columns: minmax(0, 1fr) 340px;
  padding: 22px 0 36px;
}
.checkout-grid {
  display: grid;
  gap: 18px;
}
.pay-choice {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px;
  cursor: pointer;
  background: var(--surface);
}
.pay-choice strong { font-size: 14px; }
.pay-choice small { color: var(--muted); }
.pay-choice.active,
.pay-choice:has(input:checked) {
  border-color: var(--accent);
  background: #eff6ff;
}
.order-summary-list {
  display: grid;
  gap: 12px;
}
.order-summary-line {
  padding: 12px 14px;
}
.order-summary-line strong {
  display: block;
  margin-bottom: 4px;
}
.checkout-note {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 13px;
}

.admin-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; background: var(--bg); }
.admin-sidebar {
  background: #111827;
  color: #fff;
  padding: 28px 22px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.admin-sidebar h2 { margin-bottom: 4px; }
.admin-sidebar > span.muted { display: block; margin-bottom: 20px; font-size: 12px; color: #9ca3af; }
.admin-sidebar a {
  display: block;
  padding: 10px 12px;
  color: #d1d5db;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
}
.admin-sidebar a:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-content { padding: 30px; }
.stats { margin-bottom: 24px; }
.stat { padding: 20px; }
.stat h2 { margin-top: 6px; font-size: 24px; }

.site-footer {
  margin-top: 8px;
  background: #111827;
  color: #fff;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 28px 0;
}
.site-footer strong { font-size: 20px; }
.site-footer p,
.site-footer a { color: #cbd5e1; }
.site-footer a {
  display: block;
  margin: 6px 0;
  font-size: 14px;
  font-weight: 700;
}
.site-footer a:hover { color: #fff; }

@media (max-width: 1100px) {
  .hero-inner,
  .layout,
  .product-detail,
  .checkout,
  .site-header-inner,
  .auth-page {
    grid-template-columns: 1fr;
  }
  .auth-page { grid-template-columns: 1fr; width: min(calc(100% - 24px), 520px); }
  .site-header-inner { padding: 10px 0; gap: 10px; }
  .header-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .mobile-nav-toggle {
    display: inline-flex;
    padding: 10px 12px;
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
  }
  nav {
    display: none;
    width: 100%;
    padding: 10px 0 0;
    justify-content: flex-start;
  }
  .site-header.open nav { display: flex; }
  .search { order: 3; }
  .search, .search input { width: 100%; }
  .search button { padding-inline: 14px; }
}
@media (max-width: 820px) {
  .category-grid,
  .stats,
  .info-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .info-strip > div:nth-child(2) { border-left: 0; }
}
@media (max-width: 560px) {
  .category-grid,
  .stats,
  .info-strip,
  .sizes { grid-template-columns: 1fr; }
  .hero-copy,
  .detail-card,
  .panel,
  .auth-box,
  .table-wrap { padding: 18px; }
  .hero-side { min-height: 320px; }
  .cart-row-product { grid-template-columns: 1fr; }
  .product-grid { grid-auto-columns: minmax(210px, 82vw); }
  .captcha-row { grid-template-columns: 1fr; }
  .account-grid,
  .account-stats { grid-template-columns: 1fr; }
}

/* Hamiura 2026 design system: navy, white and restrained gold */
:root {
  --bg: #f5f7fa;
  --surface: #fff;
  --surface-alt: #f0f3f7;
  --ink: #071a33;
  --muted: #647084;
  --line: #dce2ea;
  --brand: #071a33;
  --brand-strong: #06152a;
  --accent: #b58a35;
  --gold-soft: #f5ead2;
  --radius-sm: 6px;
  --radius: 8px;
  --shadow-sm: 0 6px 18px rgba(7, 26, 51, .055);
  --shadow: 0 16px 40px rgba(7, 26, 51, .1);
}
body { font-family: Vazirmatn, IRANSansX, Tahoma, Arial, sans-serif; }
button, .btn { border-radius: 6px; }
.btn.accent { background: var(--brand); box-shadow: inset 0 -2px 0 rgba(181,138,53,.45); }
.btn.accent:hover { background: #0d294d; }
button.danger, .danger { background: var(--danger); color: #fff; }
.badge { background: var(--gold-soft); color: #785a1e; border-radius: 5px; }
.price { color: var(--brand); }
.inline-link, .card-link { color: #8b691f; }
.site-header { background: rgba(255,255,255,.96); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--brand); }
.brand img { width: 38px; height: 38px; object-fit: contain; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.category-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.layout, .product-detail, .checkout { display: grid; width: min(calc(100% - 32px), var(--container)); margin: 0 auto; gap: 22px; }
.hero-copy { border-top: 3px solid var(--accent); }
.hero-module-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.product-card { transition: transform .2s ease, box-shadow .2s ease; }
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.product-card img { transition: transform .35s ease; }
.product-card:hover img { transform: scale(1.025); }
.content-banner { min-height: 190px; padding: 28px; display: flex; align-items: end; justify-content: space-between; gap: 20px; color: #fff; background: linear-gradient(90deg, rgba(7,26,51,.96), rgba(7,26,51,.68)), var(--banner-image) center/cover; border-radius: var(--radius); }
.content-banner p { color: rgba(255,255,255,.78); }
.content-cta { min-height: 150px; align-items: center; }
.home-slider { position: relative; min-height: 380px; overflow: hidden; border-radius: var(--radius); background: var(--brand); }
.home-slide { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .45s ease; }
.home-slide.active { opacity: 1; pointer-events: auto; }
.home-slide img { width: 100%; height: 100%; object-fit: cover; }
.home-slide span { position: absolute; right: 24px; bottom: 24px; color: #fff; background: rgba(7,26,51,.82); padding: 10px 14px; border-right: 3px solid var(--accent); }
.faq-section details { background: #fff; border: 1px solid var(--line); padding: 14px 18px; border-radius: var(--radius-sm); }
.faq-section summary { cursor: pointer; font-weight: 800; }
.faq-section p { color: var(--muted); }
.footer-brand { display: flex; align-items: flex-start; gap: 12px; max-width: 560px; }
.footer-brand img { width: 48px; height: 48px; object-fit: contain; border-radius: 6px; }

/* Professional administration UI */
.admin-shell { grid-template-columns: 272px minmax(0,1fr); }
.admin-sidebar { background: var(--brand); padding: 24px 18px; overflow-y: auto; }
.admin-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 20px; border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: 14px; }
.admin-brand img { width: 44px; height: 44px; border-radius: 6px; object-fit: contain; background: #fff; }
.admin-brand .muted { color: #aeb9c9; font-size: 12px; }
.admin-nav { display: grid; gap: 3px; justify-content: stretch; }
.admin-sidebar .admin-nav a { color: #d6deea; width: 100%; }
.admin-sidebar .admin-nav a:hover { color: #fff; background: rgba(181,138,53,.16); border-right: 2px solid var(--accent); }
.admin-nav-toggle { display: none; width: 100%; }
.admin-content { min-width: 0; padding: 30px; }
.admin-content > h1, .admin-content .section-head h1 { margin-bottom: 20px; }
.admin-two-column { display: grid; grid-template-columns: minmax(280px,.7fr) minmax(320px,1.3fr); gap: 18px; margin-bottom: 18px; }
.role-list { display: grid; gap: 6px; }
.role-list a { padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; }
.role-list a.active { border-color: var(--accent); background: var(--gold-soft); }
.permission-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.permission-item { display: flex; grid-template-columns: none; align-items: flex-start; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); }
.permission-item input, .check-label input { width: auto; }
.permission-item small, .table-sub { display: block; direction: ltr; color: var(--muted); font-size: 11px; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.actions form { display: inline-flex; }
.filter-grid { display: grid; grid-template-columns: repeat(4,minmax(140px,1fr)); gap: 10px; margin-bottom: 18px; }
.log-level { display: inline-block; padding: 3px 7px; border-radius: 4px; background: #eef2f6; font-size: 11px; direction: ltr; }
.log-level.error, .log-level.critical { color: #991b1b; background: #fee2e2; }
.log-level.warning { color: #92400e; background: #fef3c7; }
.table-wrap { overflow-x: auto; }
.table-wrap pre { max-width: 520px; overflow: auto; direction: ltr; text-align: left; font-size: 11px; white-space: pre-wrap; }
.pagination { display: flex; justify-content: center; gap: 8px; margin: 18px; }
.cleanup-form { max-width: 520px; margin-top: 18px; }
.module-editor { margin-bottom: 20px; }
.module-editor textarea { min-height: 260px; font-family: Consolas, monospace; font-size: 12px; }

@media (max-width: 900px) {
  .admin-shell { display: block; }
  .admin-sidebar { position: sticky; height: auto; z-index: 30; padding: 12px 16px; }
  .admin-brand { padding-bottom: 10px; margin-bottom: 8px; }
  .admin-nav-toggle { display: inline-flex; }
  .admin-nav { display: none; max-height: 65vh; overflow-y: auto; padding-top: 8px; }
  .admin-sidebar.open .admin-nav { display: grid; }
  .admin-content { padding: 20px 16px; }
  .permission-grid, .filter-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .admin-two-column { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .category-grid, .permission-grid, .filter-grid { grid-template-columns: 1fr; }
  .content-banner { align-items: flex-start; flex-direction: column; }
  .home-slider { min-height: 260px; }
  .admin-content { padding: 16px 10px; }
  .table-wrap { padding: 12px; }
  th, td { min-width: 120px; padding: 10px 8px; }
}
