/* OrdersOnline Admin — RTL teal theme */
:root {
  --brand-500: #117a65;
  --brand-700: #0e5f4f;
  --accent-100: #e9f7f3;
  --bg: #f5f8fa;
  --card-bg: #ffffff;
  --muted: #7b8a8a;
  --text: #0f2b33;
  --danger: #e74c3c;
  --warning: #f39c12;
  --success: #2ecc71;
  --border: #e6eef0;
  --topbar-bg: #0f2b33;
  --sidebar-from: #0f2b33;
  --sidebar-to: #0b2f33;
  --shadow-1: 0 1px 4px rgba(15, 43, 51, 0.06);
  --shadow-2: 0 6px 20px rgba(15, 43, 51, 0.08);
  --font-sans: "Noto Naskh Arabic", Tahoma, system-ui, sans-serif;
  --font-size-base: 16px;
  --line-height-base: 1.45;
  --radius: 8px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --sidebar-width: 240px;
  /* legacy aliases */
  --admin-primary: var(--brand-500);
  --admin-primary-dark: var(--brand-700);
  --primary: var(--brand-500);
  --primary-dark: var(--brand-700);
  --card: var(--card-bg);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html[dir="rtl"] { direction: rtl; }

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

.hidden { display: none !important; }

/* Brand mark */
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #c62828;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Login */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  background: linear-gradient(145deg, var(--sidebar-from) 0%, var(--brand-700) 100%);
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: var(--space-lg);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.login-brand h1 { font-size: 1.35rem; margin-bottom: var(--space-xs); }
.login-brand p { color: var(--muted); font-size: 0.9rem; }

/* Shell layout */
.admin-shell {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--sidebar-from) 0%, var(--sidebar-to) 100%);
  color: #fff;
  padding: var(--space-lg) var(--space-sm);
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 50;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0 var(--space-sm) var(--space-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: var(--space-md);
}

.brand-text { font-weight: 700; font-size: 0.95rem; }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  padding: 0.7rem var(--space-md);
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-align: right;
  transition: background 0.15s, color 0.15s;
  position: relative;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.sidebar-link.active {
  background: var(--brand-500);
  color: #fff;
  box-shadow: var(--shadow-1);
}

.sidebar-link.active::before {
  content: "";
  position: absolute;
  right: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 4px 0 0 4px;
  background: #fff;
}

.nav-icon { font-size: 1.1rem; width: 1.5rem; text-align: center; }

.admin-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Top bar */
.admin-topbar {
  background: var(--topbar-bg);
  color: #fff;
  padding: var(--space-sm) var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: var(--shadow-2);
}

.sidebar-toggle {
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: #fff;
  border-radius: 6px;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
  font-size: 1.1rem;
}

.topbar-search {
  flex: 1;
  min-width: 160px;
  max-width: 360px;
  position: relative;
}

.search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.55;
  font-size: 0.85rem;
  pointer-events: none;
}

.input-search {
  padding-right: 2.25rem !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
}

.input-search::placeholder { color: rgba(255, 255, 255, 0.45); }

.topbar-user {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-inline-start: auto;
}

.user-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.3;
}

.user-name { font-weight: 700; font-size: 0.9rem; }
.user-role { font-size: 0.72rem; opacity: 0.65; }

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.topbar-actions {
  display: flex;
  gap: var(--space-sm);
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }

/* Content */
.admin-content {
  flex: 1;
  padding: var(--space-lg);
  max-width: 1200px;
  width: 100%;
}

.page-header {
  margin-bottom: var(--space-lg);
}

.page-header h1 {
  font-size: 1.35rem;
  font-weight: 700;
}

.container { max-width: none; margin: 0; padding: 0; }

/* Platform dashboard (standalone header) */
.admin-header {
  background: var(--topbar-bg);
  color: #fff;
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
  box-shadow: var(--shadow-1);
  position: sticky;
  top: 0;
  z-index: 40;
}

.admin-header h1 { font-size: 1.2rem; font-weight: 700; }

.header-actions { display: flex; gap: var(--space-sm); flex-wrap: wrap; }

#dashboard > .container { padding: var(--space-lg); }

/* Cards */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
  border: 1px solid var(--border);
}

.card-flush { padding-bottom: var(--space-sm); }

.card-head,
.card-toolbar,
.menu-toolbar,
.menu-categories-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border);
}

.card-toolbar-row {
  border-bottom: none;
  padding-bottom: 0;
}

.section-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

/* Forms */
.form-group { margin-bottom: var(--space-md); }

.form-group label {
  display: block;
  margin-bottom: var(--space-xs);
  font-weight: 600;
  font-size: 0.88rem;
}

.input {
  width: 100%;
  padding: 10px 12px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fbfeff;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand-500) 20%, transparent);
}

/* Buttons */
.btn-primary {
  background: var(--brand-500);
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-primary:hover { background: var(--brand-700); }

.btn-primary-outline {
  background: transparent;
  color: var(--brand-500);
  border: 1px solid var(--brand-500);
}

.btn-primary-outline:hover {
  background: var(--accent-100);
}

.btn-inline { width: auto; }

.btn-outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
}

.btn-small {
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  font-family: inherit;
  white-space: nowrap;
}

.btn-tiny { padding: 0.3rem 0.5rem; font-size: 0.75rem; }

.btn-approve { background: var(--brand-500); color: #fff; border: none; border-radius: 6px; padding: 0.5rem 1rem; font-weight: 700; cursor: pointer; }
.btn-reject { background: #fdecea; color: var(--danger); border: none; border-radius: 6px; padding: 0.5rem 1rem; font-weight: 700; cursor: pointer; }
.btn-config { background: var(--accent-100); color: var(--brand-700); border: none; border-radius: 6px; padding: 0.5rem 1rem; font-weight: 700; cursor: pointer; }

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-md);
}

.stat-card {
  background: var(--accent-100);
  border-radius: var(--radius);
  padding: var(--space-md);
  text-align: center;
  border: 1px solid color-mix(in srgb, var(--brand-500) 15%, var(--border));
}

.stat-card .num {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--brand-700);
}

.stat-card .label {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: var(--space-xs);
}

/* Filters */
.filters { display: flex; gap: var(--space-sm); flex-wrap: wrap; }

.filter-btn {
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border);
  background: var(--card-bg);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
  transition: all 0.12s;
}

.filter-btn:hover { border-color: var(--brand-500); color: var(--brand-700); }

.filter-btn.active {
  background: var(--brand-500);
  color: #fff;
  border-color: var(--brand-500);
}

/* Orders table-like cards */
.order-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
  border: 1px solid var(--border);
  min-height: 56px;
  transition: box-shadow 0.12s;
}

.order-card:hover { box-shadow: var(--shadow-1); }

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-sm);
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.order-id { font-weight: 700; font-size: 1.05rem; color: var(--brand-700); }
.order-meta { font-size: 0.8rem; color: var(--muted); }

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-new { background: #dbeafe; color: #1d4ed8; }
.badge-preparing { background: #fef3c7; color: #b45309; }
.badge-delivering { background: var(--accent-100); color: var(--brand-700); }
.badge-done { background: #d4edda; color: #1e7e34; }
.badge-cancelled { background: #fdecea; color: var(--danger); }

.order-details {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: var(--space-sm);
}

.status-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border);
}

.status-row select {
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.85rem;
  font-family: inherit;
  min-height: 40px;
}

/* Upload */
.upload-split {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-lg);
  align-items: start;
}

.upload-dropzone {
  min-height: 100px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  transition: background 0.15s, border-color 0.15s;
}

.upload-dropzone:hover {
  background: var(--accent-100);
  border-color: var(--brand-500);
}

.drop-icon { font-size: 2rem; }

.upload-row,
.upload-field {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
}

.upload-row input[type="url"],
.upload-field input[type="url"] {
  flex: 1;
  min-width: 100px;
}

.btn-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem;
  background: var(--accent-100);
  color: var(--brand-700);
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid color-mix(in srgb, var(--brand-500) 25%, var(--border));
}

.btn-upload:hover { background: color-mix(in srgb, var(--brand-500) 12%, white); }

.menu-thumb-preview {
  max-width: 220px;
  max-height: 140px;
  border-radius: var(--radius);
  margin-top: var(--space-xs);
}

.thumb-mini {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
}

/* Menu page — mockup layout */
.menu-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.menu-page-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.menu-page-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.input-select {
  min-width: 140px;
  width: auto;
  padding-inline: 0.75rem;
  cursor: pointer;
}

.menu-editor-card { margin-bottom: var(--space-lg); }

.menu-editor-split,
.menu-media-split {
  display: grid;
  grid-template-columns: minmax(180px, 220px) 1fr;
  gap: var(--space-lg);
  align-items: start;
}

.menu-editor-upload {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.upload-dropzone-lg {
  min-height: 120px;
  cursor: pointer;
}

.upload-dropzone-lg:hover { background: var(--accent-100); }

.drop-sub {
  font-size: 0.75rem;
  color: var(--muted);
}

.item-editor-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius);
}

.menu-editor-fields { min-width: 0; }

.menu-editor-head-actions {
  display: flex;
  gap: var(--space-sm);
}

.btn-ghost-dark {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
}

.menu-editor-flags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fbfeff;
  font-size: 0.85rem;
  cursor: pointer;
  user-select: none;
}

.checkbox-pill input { width: auto; margin: 0; }

.menu-media-preview { min-width: 0; }

.menu-image-preview-wrap {
  margin-top: var(--space-sm);
  min-height: 100px;
}

.menu-preview-placeholder {
  min-height: 100px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.85rem;
  background: #fbfeff;
}

.menu-table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
}

.menu-table-search {
  position: relative;
  min-width: 220px;
  flex: 1;
  max-width: 320px;
}

.menu-table-search .search-icon {
  position: absolute;
  inset-inline-start: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  opacity: 0.55;
  pointer-events: none;
}

.menu-table-search .input-search {
  padding-inline-start: 2rem;
  min-height: 40px;
}

.menu-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.menu-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.menu-data-table thead th {
  background: #f0f4f6;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: start;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.menu-data-table tbody td {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.menu-data-table tbody tr:last-child td { border-bottom: none; }

.menu-table-row {
  min-height: 64px;
  transition: background 0.12s;
}

.menu-table-row:hover { background: #fbfeff; }

.menu-table-row.is-selected {
  background: var(--accent-100);
}

.menu-table-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.menu-table-thumb-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f0f4f6;
  font-size: 1.2rem;
}

.col-thumb { width: 56px; }
.col-check { width: 44px; text-align: center; }
.col-actions { width: 88px; white-space: nowrap; }

.menu-item-name {
  display: block;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.menu-item-id {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
}

.menu-cat-badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--accent-100);
  color: var(--brand-700);
  white-space: nowrap;
}

.menu-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  margin-inline-end: 4px;
}

.menu-badge-popular {
  background: color-mix(in srgb, var(--warning) 18%, white);
  color: #b45309;
}

.menu-badge-new {
  background: var(--accent-100);
  color: var(--brand-700);
}

.menu-badge-muted {
  background: #f0f4f6;
  color: var(--muted);
}

.col-price {
  white-space: nowrap;
  min-width: 100px;
}

.input-price-inline {
  width: 72px;
  min-height: 36px;
  padding: 0.35rem 0.5rem;
  display: inline-block;
  vertical-align: middle;
}

.price-suffix {
  font-size: 0.8rem;
  color: var(--muted);
  margin-inline-start: 4px;
}

.menu-icon-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0.35rem;
  border-radius: 6px;
  font-size: 1rem;
  line-height: 1;
  opacity: 0.75;
  transition: opacity 0.12s, background 0.12s;
}

.menu-icon-btn:hover {
  opacity: 1;
  background: #f0f4f6;
}

.menu-icon-danger:hover { background: #fdecea; }

.menu-table-empty {
  text-align: center;
  padding: var(--space-xl) !important;
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Menu editor (legacy rows — hidden) */
.menu-cat-card { margin-bottom: var(--space-md); }

.menu-item-row {
  display: grid;
  grid-template-columns: 72px 1fr 72px auto auto minmax(120px, 1fr) auto;
  gap: var(--space-sm);
  align-items: center;
  margin-bottom: var(--space-sm);
  padding: var(--space-sm);
  background: #fbfeff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  min-height: 56px;
}

.item-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  user-select: none;
}

.item-flag input { margin: 0; width: auto; }

.checkbox-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
  font-size: 0.9rem;
  cursor: pointer;
}

.checkbox-row input { width: auto; margin: 0; }

.suggest-items-picker {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-sm);
  background: #fbfeff;
}

.suggest-pick-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 4px;
}

.suggest-pick-row:hover { background: var(--accent-100); }
.suggest-pick-row small { color: var(--muted); }

/* Theme */
.theme-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-lg);
  align-items: start;
}

.color-grid {
  display: grid;
  gap: var(--space-md);
}

.color-grid label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.85rem;
  font-weight: 600;
}

.color-grid input[type="color"] {
  width: 42px;
  height: 36px;
  border: none;
  padding: 0;
  background: none;
  cursor: pointer;
}

.theme-preview-frame {
  overflow: hidden;
  padding: 0 !important;
}

.tp-header {
  background: linear-gradient(135deg, var(--header-from, #1e293b), var(--header-to, #0f172a));
  color: #fff;
  padding: var(--space-md);
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.tp-logo img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  object-fit: cover;
  background: #fff;
}

.tp-name { font-weight: 700; font-size: 0.95rem; }
.tp-hours { font-size: 0.75rem; opacity: 0.85; }

.tp-chip-row { display: flex; gap: var(--space-xs); padding: var(--space-sm); }

.tp-chip {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  background: #fff;
  border: 1px solid var(--border);
}

.tp-chip.active {
  background: var(--brand-500);
  color: #fff;
  border-color: var(--brand-500);
}

.tp-card {
  margin: 0 var(--space-sm) var(--space-sm);
  background: #fff;
  border-radius: var(--radius);
  padding: var(--space-sm);
  border: 1px solid var(--border);
}

.tp-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: var(--space-sm);
}

.tp-btn {
  width: 100%;
  padding: 0.45rem;
  border: none;
  border-radius: 6px;
  background: var(--accent-100);
  color: var(--brand-700);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
}

.tp-cart {
  margin: 0 var(--space-sm) var(--space-sm);
  padding: var(--space-sm);
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: #fff;
  border-radius: var(--radius);
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
}

/* Messages */
.error-msg { color: var(--danger); font-size: 0.85rem; text-align: center; margin-top: var(--space-sm); }
.success-msg { color: var(--success); font-size: 0.9rem; text-align: center; margin-top: var(--space-sm); }
.hint-msg { font-size: 0.8rem; color: var(--muted); margin-top: var(--space-xs); }
.empty-state,
.loading {
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  color: var(--muted);
}

.refresh-note {
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: var(--space-md);
}

.footer-link { text-align: center; margin-top: var(--space-lg); font-size: 0.85rem; }
.footer-link a { color: var(--brand-700); font-weight: 600; text-decoration: none; }
.footer-link a:hover { text-decoration: underline; }

.tab-panel.hidden { display: none !important; }

/* Modals (platform) */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: var(--space-md); overflow-y: auto; }
.modal.hidden { display: none !important; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); }
.modal-card {
  position: relative;
  background: var(--card-bg);
  border-radius: var(--radius);
  width: 100%;
  max-width: 640px;
  margin: 2rem auto;
  padding: var(--space-md);
  box-shadow: var(--shadow-2);
  z-index: 1;
}

/* Signup extras */
.signup-card { max-width: 480px; }
.slug-row { display: flex; align-items: center; gap: var(--space-xs); }
.slug-prefix { font-size: 0.85rem; color: var(--muted); white-space: nowrap; direction: ltr; }
.form-divider { border: none; border-top: 1px solid var(--border); margin: var(--space-lg) 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }

/* Responsive */
@media (max-width: 900px) {
  .theme-layout { grid-template-columns: 1fr; }
  .upload-split,
  .menu-editor-split,
  .menu-media-split { grid-template-columns: 1fr; }

  .menu-page-actions { width: 100%; }
  .menu-page-actions .input-select { flex: 1; min-width: 0; }

  .menu-data-table { font-size: 0.82rem; }
  .col-badges { display: none; }
}

@media (max-width: 768px) {
  .sidebar-toggle { display: inline-block; }

  .admin-sidebar {
    position: fixed;
    right: 0;
    top: 0;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    box-shadow: var(--shadow-2);
  }

  .admin-shell.sidebar-open .admin-sidebar {
    transform: translateX(0);
  }

  .topbar-user .user-meta { display: none; }

  .admin-content { padding: var(--space-md); }

  .menu-item-row { grid-template-columns: 1fr 1fr; }
  .menu-item-row input[type="url"] { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
  .topbar-actions { width: 100%; justify-content: flex-end; }
}
