/* Venecia Admin — professional dashboard */
:root {
  --sidebar-w: 260px;
  --bg: #f1f5f9;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #b8860b;
  --primary-dark: #8b6914;
  --primary-light: #fef3c7;
  --sidebar: #0f172a;
  --sidebar-text: #94a3b8;
  --sidebar-active: #ffffff;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 40px rgba(15, 23, 42, 0.1);
}

* { box-sizing: border-box; }
body { margin: 0; font-family: 'Inter', system-ui, sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--primary-dark); text-decoration: none; }
a:hover { color: var(--primary); }

/* Shell */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform 0.25s ease;
}
.admin-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.admin-sidebar__logo {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--primary), #d4a017);
  color: #1a1508;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
}
.admin-sidebar__brand strong { display: block; color: #fff; font-size: 1rem; }
.admin-sidebar__brand small { font-size: 0.7rem; opacity: 0.7; }

.admin-nav { flex: 1; padding: 1rem 0.75rem; overflow-y: auto; }
.admin-nav__label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.75rem 0.75rem 0.35rem;
  color: #475569;
}
.admin-nav__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  color: var(--sidebar-text);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 2px;
  transition: background 0.15s, color 0.15s;
}
.admin-nav__link i { font-size: 1.1rem; opacity: 0.85; }
.admin-nav__link:hover { background: rgba(255,255,255,0.06); color: #e2e8f0; text-decoration: none; }
.admin-nav__link.active { background: rgba(184, 134, 11, 0.2); color: var(--sidebar-active); }
.admin-nav__link--logout { color: #f87171; margin-top: 0.5rem; }

.admin-sidebar__footer {
  padding: 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.admin-user-mini { display: flex; gap: 10px; align-items: center; margin-bottom: 0.75rem; }
.admin-user-mini__avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #1a1508;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}
.admin-user-mini__meta strong { display: block; color: #fff; font-size: 0.8rem; }
.admin-user-mini__meta small { font-size: 0.7rem; opacity: 0.65; display: block; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }

/* Header */
.admin-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
}
.admin-header__toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  font-size: 1.25rem;
  cursor: pointer;
}
.admin-header__titles h1 { margin: 0; font-size: 1.25rem; font-weight: 700; }
.admin-header__titles p { margin: 0.15rem 0 0; font-size: 0.85rem; color: var(--muted); }
.admin-header__actions { margin-left: auto; display: flex; align-items: center; gap: 0.75rem; }
.admin-header__pill {
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
}

.admin-content { flex: 1; padding: 1.5rem; }
.admin-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}

/* KPI */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  box-shadow: var(--shadow);
}
.kpi-card--primary {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: none;
  color: #fff;
}
.kpi-card--primary .kpi-card__label { color: #94a3b8; }
.kpi-card--primary .kpi-card__value { color: #fbbf24; }
.kpi-card__icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.kpi-card--primary .kpi-card__icon { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
.kpi-card__icon--blue { background: #dbeafe; color: #1d4ed8; }
.kpi-card__icon--green { background: #d1fae5; color: #047857; }
.kpi-card__icon--purple { background: #ede9fe; color: #6d28d9; }
.kpi-card__label { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 0.25rem; }
.kpi-card__value { display: block; font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.kpi-card__hint { display: block; font-size: 0.75rem; color: var(--muted); margin-top: 0.25rem; }

/* Panels */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.panel__head {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.panel__head h2 { margin: 0; font-size: 1rem; font-weight: 600; }
.panel__head--row { flex-wrap: wrap; }
.panel__meta { font-size: 0.8rem; color: var(--muted); }
.panel__body { padding: 1.25rem; }
.panel__body--flush { padding: 0; }
.panel__body--chart { height: 280px; padding: 1rem 1.25rem 1.25rem; position: relative; }

.grid-2 {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.grid-span-2 { grid-column: 1 / -1; }

/* Tables */
.table-responsive { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.data-table th {
  text-align: left;
  padding: 0.75rem 1.25rem;
  background: #f8fafc;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tbody tr:hover { background: #f8fafc; }
.data-table tfoot td { background: #f8fafc; font-weight: 600; }
.empty-cell, .empty-state { text-align: center; color: var(--muted); padding: 2rem !important; }

.text-muted { color: var(--muted); }
.text-right { text-align: right; }
.text-lg { font-size: 1.15rem; }

/* Status */
.status-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.status-badge--lg { font-size: 0.85rem; padding: 0.35rem 0.75rem; }
.status-badge--success { background: #d1fae5; color: #065f46; }
.status-badge--info { background: #dbeafe; color: #1e40af; }
.status-badge--warning { background: #fef3c7; color: #92400e; }
.status-badge--danger { background: #fee2e2; color: #991b1b; }
.status-badge--neutral { background: #f1f5f9; color: #475569; }

.status-list { list-style: none; margin: 0; padding: 0; }
.status-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}
.status-list li:last-child { border-bottom: none; }

.status-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.status-tabs__item {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
}
.status-tabs__item span {
  background: var(--bg);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  margin-left: 0.35rem;
  font-size: 0.75rem;
}
.status-tabs__item:hover { border-color: var(--primary); text-decoration: none; color: var(--text); }
.status-tabs__item.is-active { background: var(--primary); border-color: var(--primary); color: #1a1508; }
.status-tabs__item.is-active span { background: rgba(0,0,0,0.15); color: inherit; }

/* Toolbar */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.toolbar__search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  max-width: 520px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.35rem 0.5rem 0.35rem 0.75rem;
  box-shadow: var(--shadow);
}
.toolbar__search i { color: var(--muted); }
.toolbar__search input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.5rem;
  font-size: 0.9rem;
  outline: none;
  min-width: 120px;
}
.toolbar__select {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.5rem;
  font-size: 0.85rem;
  background: var(--bg);
}
.toolbar__count { font-size: 0.85rem; color: var(--muted); font-weight: 500; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: filter 0.15s, background 0.15s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; filter: brightness(1.05); }
.btn--primary { background: var(--primary); color: #1a1508; }
.btn--primary:hover,
.btn--primary:focus { color: #1a1508; }
.btn--outline { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.btn--outline:hover,
.btn--outline:focus { color: var(--text); }
.btn--ghost { background: transparent; color: var(--primary-dark); }
.btn--ghost:hover,
.btn--ghost:focus { color: var(--primary-dark); }
.btn--sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.btn--block { width: 100%; }

/* Cells */
.cell-product, .cell-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.cell-product > div:last-child {
  min-width: 0;
  flex: 1;
}
.cell-product__thumb, .cell-user__avatar {
  width: 48px;
  height: 48px;
  min-width: 48px;
  max-width: 48px;
  min-height: 48px;
  max-height: 48px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  flex: 0 0 48px;
  overflow: hidden;
  position: relative;
}
.cell-product__thumb--img {
  padding: 0;
  line-height: 0;
}
.data-table .cell-product__thumb--img img,
.cell-product__thumb--img img {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  max-width: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 7px;
}
.cell-user__avatar { border-radius: 50%; background: var(--primary-light); color: var(--primary-dark); font-size: 0.75rem; font-weight: 700; }
.cell-product small { display: block; color: var(--muted); font-size: 0.75rem; }
.data-table td:first-child {
  min-width: 220px;
  max-width: 360px;
}

/* Detail */
.page-actions { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.detail-list { display: grid; grid-template-columns: 140px 1fr; gap: 0.5rem 1rem; margin: 0; }
.detail-list dt { color: var(--muted); font-size: 0.8rem; font-weight: 500; margin: 0; }
.detail-list dd { margin: 0; }

.order-summary-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}
.order-summary-bar__label { display: block; font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.order-summary-bar__total { font-size: 1.5rem; color: var(--primary-dark); }

.address-card {
  padding: 1rem;
  background: var(--bg);
  border-radius: 8px;
  margin-bottom: 0.75rem;
}
.address-card:last-child { margin-bottom: 0; }

.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  background: #fafbfc;
}
.pagination-bar__info { font-size: 0.85rem; color: var(--muted); }
.pagination-bar__actions { display: flex; gap: 0.5rem; }

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.settings-card__value { margin: 0; font-size: 0.9rem; word-break: break-word; }
.settings-note { margin-top: 1rem; font-size: 0.85rem; }

code { font-size: 0.85em; background: #f1f5f9; padding: 0.15rem 0.4rem; border-radius: 4px; }

/* Login */
.login-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
}
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1100px;
  margin: 0 auto;
  align-items: center;
  padding: 2rem;
  gap: 3rem;
}
.login-brand { color: #fff; }
.login-brand__logo {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--primary), #d4a017);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: #1a1508;
  margin-bottom: 1.5rem;
}
.login-brand h1 { font-size: 2rem; margin: 0 0 0.75rem; }
.login-brand p { color: #94a3b8; font-size: 1.05rem; line-height: 1.6; margin: 0; max-width: 360px; }

.login-card-pro {
  background: var(--surface);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}
.login-foot { margin: 1.25rem 0 0; font-size: 0.8rem; color: var(--muted); text-align: center; }

.form-field { margin-bottom: 1.25rem; }
.form-field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.4rem; }
.form-field__icon {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  overflow: hidden;
}
.form-field__icon i { padding: 0 0.75rem; color: var(--muted); }
.form-field__icon input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.7rem 0.75rem 0.7rem 0;
  font-size: 1rem;
  outline: none;
  width: 100%;
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.alert--error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert--success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }

/* Catalog forms (bilingual) */
.bilingual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.form-control {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.form-control--tall { min-height: 140px; resize: vertical; }
.form-field--max { max-width: 420px; }
.form-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1rem;
}
.catalog-form { margin-bottom: 2rem; }

.lang-pill {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-right: 0.35rem;
  vertical-align: middle;
}
.lang-pill--ar { background: #dbeafe; color: #1e40af; }
.lang-pill--en { background: #fef3c7; color: #92400e; }

.text-muted-en { display: block; color: var(--muted); font-size: 0.8rem; }
.table-actions { white-space: nowrap; }
.table-actions .btn { margin-left: 0.25rem; }

.btn--danger {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.btn--danger:hover { background: #fee2e2; color: #991b1b; }

.page-actions {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.detail-html { font-size: 0.9rem; line-height: 1.6; max-height: 280px; overflow: auto; }

@media (max-width: 992px) {
  .bilingual-grid { grid-template-columns: 1fr; }
}

/* Admin actions */
.panel--highlight { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary-light); }
.admin-inline-form .form-field { margin-bottom: 0.75rem; }
.form-hint { font-size: 0.8rem; color: var(--muted); margin: 0.5rem 0 0; }
.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
  cursor: pointer;
}
.form-check input { margin: 0; }

.product-image-field { margin-bottom: 1rem; }
.product-image-field__preview {
  width: 220px;
  max-width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-image-field__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-image-field__preview--empty {
  flex-direction: column;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.product-image-field__preview--empty i { font-size: 2rem; opacity: 0.45; }

.product-images-upload__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.product-images-upload__actions .form-control {
  flex: 1 1 200px;
  min-width: 0;
}
.product-images-upload__count {
  font-weight: 600;
  color: var(--primary, #1e3a5f);
}

.product-image-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.product-image-gallery--new {
  margin-top: 0.5rem;
}
.product-image-gallery__item {
  position: relative;
  width: 88px;
  flex: 0 0 88px;
}
.product-image-gallery__item img {
  width: 88px !important;
  height: 88px !important;
  max-width: 88px !important;
  max-height: 88px !important;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: block;
}
.product-image-gallery__drop {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-image-gallery__drop:hover {
  background: #b42318;
}
.product-image-gallery__badge {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--primary, #1e3a5f);
  color: #fff;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
}
.product-image-gallery__remove {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--muted);
  cursor: pointer;
}
.product-image-gallery__caption {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.62rem;
  color: var(--muted);
  word-break: break-all;
  line-height: 1.15;
  max-width: 88px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-detail-image .panel__body { padding: 1rem; }
.product-detail-image-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.product-detail-image-grid img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.product-detail-image img {
  max-width: 280px;
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.settings-foot { margin-top: 1rem; }
.form-grid--settings { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.form-field--wide { grid-column: 1 / -1; }
.form-control--sm { padding: 0.35rem 0.5rem; font-size: 0.85rem; min-width: 140px; }
.form-control--code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.45;
  min-height: 420px;
}
.form-stack { display: flex; flex-direction: column; gap: 0.75rem; }
.panel__header--split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.btn-group { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.btn--lg { padding: 0.65rem 1.35rem; font-size: 0.95rem; }
.btn--icon {
  padding: 0.45rem 0.55rem;
  min-width: auto;
  color: var(--muted);
  border: 1px solid var(--border);
  background: var(--surface);
}
.btn--icon:hover { color: #dc2626; border-color: #fecaca; background: #fef2f2; }

/* CMS content editor */
.cms-editor { display: flex; flex-direction: column; gap: 1.25rem; }
.cms-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.cms-toolbar__meta { display: flex; align-items: center; gap: 0.75rem; }
.cms-toolbar__group { font-weight: 600; color: var(--text); }
.cms-lang-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: var(--primary-light);
  color: var(--primary-dark);
}
.cms-lang-pill--ar { background: #e0f2fe; color: #0369a1; }

.cms-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.cms-card {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.cms-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-lg);
}
.cms-card__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-light), #fff7ed);
  color: var(--primary-dark);
  font-size: 1.35rem;
}
.cms-card__body h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.cms-card__body p { margin: 0 0 0.85rem; font-size: 0.85rem; color: var(--muted); line-height: 1.5; }
.cms-card__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cms-empty-banner { margin-bottom: 1rem; }
.cms-foot-hint { margin-top: 1rem; }

.cms-sections { display: flex; flex-direction: column; gap: 1rem; }
.cms-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
}
.cms-section__head {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin-bottom: 1.1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}
.cms-section__head i {
  font-size: 1.25rem;
  color: var(--primary);
  margin-top: 0.15rem;
}
.cms-section__head h3 { margin: 0 0 0.2rem; font-size: 1rem; }
.cms-section__head p { margin: 0; font-size: 0.82rem; color: var(--muted); }
.cms-section__head--clickable { cursor: pointer; list-style: none; }
.cms-section__body { padding-top: 0.5rem; }
.cms-subheading {
  margin: 1.1rem 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.cms-card-editor {
  margin-top: 0.85rem;
  padding: 1rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px dashed var(--border);
}
.cms-stat-card {
  padding: 0.85rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--border);
}

.cms-tabs__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
  padding: 0.35rem;
  background: #e2e8f0;
  border-radius: 12px;
}
.cms-tabs__btn {
  border: none;
  background: transparent;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.cms-tabs__btn:hover { color: var(--text); }
.cms-tabs__btn.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}
.cms-tabs__panel { display: none; }
.cms-tabs__panel.is-active { display: block; }

.cms-repeater { margin-top: 0.5rem; }
.cms-repeater__items { display: flex; flex-direction: column; gap: 0.65rem; }
.cms-repeater__row {
  display: grid;
  gap: 0.65rem;
  align-items: end;
  padding: 0.85rem;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.cms-repeater__row--link {
  grid-template-columns: 1fr 1fr auto;
}
.cms-repeater__row--stack {
  grid-template-columns: 1fr auto;
}
.cms-repeater__row--stack .form-field--wide { grid-column: 1 / -1; }
.cms-repeater__add { margin-top: 0.65rem; }

.cms-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  position: sticky;
  bottom: 1rem;
  z-index: 5;
}
.cms-advanced {
  margin-top: 0.5rem;
  padding: 1rem 1.25rem;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.cms-advanced summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
  list-style: none;
}
.cms-advanced summary::-webkit-details-marker { display: none; }
.cms-advanced__form { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }

.form-grid--3 { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

@media (max-width: 768px) {
  .cms-repeater__row--link { grid-template-columns: 1fr; }
  .cms-form__actions { position: static; }
}
.inline-status-form { display: inline-block; min-width: 150px; }
.data-table--orders select { max-width: 160px; }
.status-badge--lg { font-size: 0.9rem; padding: 0.35rem 0.75rem; }
.cell-user--lg { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.cell-user__avatar--lg {
  width: 56px; height: 56px;
  font-size: 1.25rem;
}

@media (max-width: 992px) {
  .grid-2 { grid-template-columns: 1fr; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-brand { text-align: center; }
  .login-brand p { margin: 0 auto; }
  .login-brand__logo { margin: 0 auto 1.5rem; }
}

@media (max-width: 768px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.is-open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .admin-header__toggle { display: block; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .admin-content { padding: 1rem; }
}
