/* ═══════════════════════════════════════════════════════════════
   KateringKing — Admin Portal Styles
   Matches the site's navy + gold + cream design system.
   All selectors are prefixed with .kk-admin to avoid collisions
   with the public site's styles.css.
═══════════════════════════════════════════════════════════════ */

/* ─── Reset inside portal ────────────────────────────────────── */
.kk-admin *, .kk-admin *::before, .kk-admin *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ─── CSS variables (mirrors styles.css palette) ─────────────── */
.kk-admin {
  --navy:        #0D1B2A;
  --navy-mid:    #152233;
  --navy-soft:   #1E2F45;
  --gold:        #C9A84C;
  --gold-light:  #E2C47A;
  --gold-dim:    #9A7A2E;
  --cream:       #F0EBE0;
  --ivory:       #F5F0EA;
  --silver:      #B8C0CC;
  --red:         #E05252;
  --green:       #4CAF7D;
  --text-muted:  rgba(240,235,224,0.55);
  --border:      rgba(201,168,76,0.18);
  --radius:      6px;
  --font-sans:   'Inter', system-ui, sans-serif;
  --font-serif:  'Cormorant Garamond', Georgia, serif;
  --dur:         0.22s;
}

/* ═══════════════════════════════════════════════════════════════
   OVERLAY — full-screen backdrop
═══════════════════════════════════════════════════════════════ */
#kk-admin-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(8, 14, 22, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
}
#kk-admin-overlay.open { display: flex; }

/* ═══════════════════════════════════════════════════════════════
   LOGIN CARD
═══════════════════════════════════════════════════════════════ */
.kk-login-card {
  background: var(--navy-mid);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.8rem 2.4rem;
  width: min(420px, 92vw);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}

.kk-login-logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.8rem;
}
.kk-login-logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--navy);
  font-weight: 700;
}
.kk-login-brand {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--cream);
  letter-spacing: 0.04em;
}
.kk-login-brand span {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 1px;
}

.kk-login-title {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  color: var(--cream);
  margin-bottom: 0.3rem;
}
.kk-login-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1.8rem;
}

/* ─── Form controls ──────────────────────────────────────────── */
.kk-form-group {
  margin-bottom: 1rem;
}
.kk-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--silver);
  margin-bottom: 0.4rem;
}
.kk-input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.7rem 0.9rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--cream);
  transition: border-color var(--dur);
  outline: none;
}
.kk-input:focus { border-color: var(--gold); }
.kk-input::placeholder { color: var(--text-muted); }

textarea.kk-input { resize: vertical; min-height: 80px; }

select.kk-input {
  background: var(--navy-soft);
  color: var(--cream);
  cursor: pointer;
}
select.kk-input option {
  background: var(--navy-soft);
  color: var(--cream);
}
select.kk-input option:hover,
select.kk-input option:checked {
  background: var(--navy-mid);
  color: var(--gold-light);
}

.kk-error {
  background: rgba(224, 82, 82, 0.12);
  border: 1px solid rgba(224,82,82,0.4);
  border-radius: var(--radius);
  color: #f28b82;
  font-size: 0.8rem;
  padding: 0.6rem 0.9rem;
  margin-bottom: 1rem;
  display: none;
}
.kk-error.show { display: block; }

.kk-success-msg {
  background: rgba(76,175,125,0.12);
  border: 1px solid rgba(76,175,125,0.4);
  border-radius: var(--radius);
  color: #81c995;
  font-size: 0.8rem;
  padding: 0.6rem 0.9rem;
  margin-bottom: 1rem;
  display: none;
}
.kk-success-msg.show { display: block; }

/* ─── Buttons ────────────────────────────────────────────────── */
.kk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background var(--dur), opacity var(--dur), transform var(--dur);
  outline: none;
  white-space: nowrap;
}
.kk-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.kk-btn:not(:disabled):hover { opacity: 0.88; transform: translateY(-1px); }
.kk-btn:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px; }

.kk-btn-primary  { background: var(--gold);   color: var(--navy); }
.kk-btn-ghost    { background: rgba(255,255,255,0.07); color: var(--cream); border: 1px solid var(--border); }
.kk-btn-danger   { background: rgba(224,82,82,0.15);  color: #f28b82; border: 1px solid rgba(224,82,82,0.35); }
.kk-btn-success  { background: rgba(76,175,125,0.15); color: #81c995; border: 1px solid rgba(76,175,125,0.35); }
.kk-btn-sm       { font-size: 0.68rem; padding: 0.45rem 0.9rem; }
.kk-btn-full     { width: 100%; }

.kk-forgot-link {
  background: none;
  border: none;
  color: var(--gold);
  font-size: 0.75rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  margin-top: 0.5rem;
}

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD SHELL
═══════════════════════════════════════════════════════════════ */
#kk-dashboard {
  display: none;
  width: min(1200px, 97vw);
  height: min(88vh, 860px);
  background: var(--navy);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  flex-direction: column;
}
#kk-dashboard.open { display: flex; }

/* ─── Top bar ────────────────────────────────────────────────── */
.kk-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.4rem;
  background: var(--navy-mid);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.kk-topbar-brand {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--cream);
}
.kk-topbar-brand span {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-left: 0.5rem;
}
.kk-topbar-actions { display: flex; gap: 0.6rem; align-items: center; }
.kk-admin-email {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-right: 0.5rem;
}

/* ─── Body split ─────────────────────────────────────────────── */
.kk-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ─── Sidebar nav ────────────────────────────────────────────── */
.kk-sidebar {
  width: 200px;
  flex-shrink: 0;
  background: var(--navy-mid);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 0.8rem 0;
  overflow-y: auto;
}
.kk-nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 1.2rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--silver);
  cursor: pointer;
  border: none;
  background: none;
  text-align: left;
  width: 100%;
  transition: background var(--dur), color var(--dur);
  border-left: 3px solid transparent;
}
.kk-nav-item:hover { background: rgba(255,255,255,0.04); color: var(--cream); }
.kk-nav-item.active {
  background: rgba(201,168,76,0.08);
  color: var(--gold-light);
  border-left-color: var(--gold);
}
.kk-nav-item svg { flex-shrink: 0; opacity: 0.7; }
.kk-nav-item.active svg { opacity: 1; }

.kk-sidebar-footer {
  margin-top: auto;
  padding: 0.8rem;
  border-top: 1px solid var(--border);
}

/* ─── Main content area ──────────────────────────────────────── */
.kk-main {
  flex: 1;
  overflow-y: auto;
  padding: 1.6rem;
  background: var(--navy);
}

/* ─── Pane ───────────────────────────────────────────────────── */
.kk-pane { display: none; }
.kk-pane.active { display: block; }

.kk-pane-title {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  color: var(--cream);
  margin-bottom: 0.25rem;
}
.kk-pane-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1.6rem;
}

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD OVERVIEW
═══════════════════════════════════════════════════════════════ */
.kk-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.8rem;
}
.kk-stat-card {
  background: var(--navy-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.1rem;
}
.kk-stat-num {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--gold-light);
  line-height: 1;
}
.kk-stat-label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.kk-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9rem;
}

/* ═══════════════════════════════════════════════════════════════
   MENU MANAGEMENT PANES
═══════════════════════════════════════════════════════════════ */
.kk-toolbar {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}
.kk-search {
  flex: 1;
  min-width: 180px;
  max-width: 320px;
}

/* ─── Category accordion ─────────────────────────────────────── */
.kk-cat-block {
  background: var(--navy-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.8rem;
  overflow: hidden;
}
.kk-cat-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
  user-select: none;
}
.kk-cat-header:hover { background: rgba(255,255,255,0.03); }
.kk-cat-name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--cream);
  flex: 1;
}
.kk-cat-count {
  font-size: 0.68rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.06);
  border-radius: 20px;
  padding: 2px 8px;
}
.kk-cat-chevron {
  color: var(--text-muted);
  transition: transform var(--dur);
}
.kk-cat-block.open .kk-cat-chevron { transform: rotate(90deg); }

.kk-cat-body { display: none; border-top: 1px solid var(--border); }
.kk-cat-block.open .kk-cat-body { display: block; }

/* ─── Dish rows ──────────────────────────────────────────────── */
.kk-dish-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background var(--dur);
}
.kk-dish-row:last-child { border-bottom: none; }
.kk-dish-row:hover { background: rgba(255,255,255,0.03); }

.kk-dish-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  background: var(--navy-soft);
}
.kk-dish-thumb-placeholder {
  width: 44px;
  height: 44px;
  border-radius: 4px;
  background: var(--navy-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 1rem;
}
.kk-dish-info { flex: 1; min-width: 0; }
.kk-dish-name-text {
  font-size: 0.88rem;
  color: var(--cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kk-dish-meta {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.kk-dish-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }

/* Status badges */
.kk-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 20px;
}
.kk-badge-published { background: rgba(76,175,125,0.15); color: #81c995; }
.kk-badge-draft     { background: rgba(201,168,76,0.12); color: var(--gold-light); }

/* ═══════════════════════════════════════════════════════════════
   MODAL (Add / Edit dish)
═══════════════════════════════════════════════════════════════ */
.kk-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(8,14,22,0.8);
  align-items: center;
  justify-content: center;
}
.kk-modal-backdrop.open { display: flex; }

.kk-modal {
  background: var(--navy-mid);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: min(620px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
}
.kk-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.4rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--navy-mid);
  z-index: 1;
}
.kk-modal-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--cream);
}
.kk-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color var(--dur);
}
.kk-modal-close:hover { color: var(--cream); }

.kk-modal-body { padding: 1.4rem; }
.kk-modal-footer {
  padding: 1rem 1.4rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.7rem;
  justify-content: flex-end;
}

/* ─── 2-col form grid ────────────────────────────────────────── */
.kk-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

/* ─── Image upload area ──────────────────────────────────────── */
.kk-img-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  text-align: center;
  cursor: pointer;
  position: relative;   /* confines the absolute file input to this box only */
  overflow: hidden;
  transition: border-color var(--dur);
}
.kk-img-upload-area:hover { border-color: var(--gold); }
.kk-img-upload-area p { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.4rem; }

.kk-img-preview-wrap { position: relative; display: inline-block; }
.kk-img-preview {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 4px;
  display: none;
}
.kk-img-preview.show { display: block; }
.kk-img-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 0.75rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}
.kk-img-remove.show { display: flex; }

.kk-progress-wrap {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  margin-top: 0.5rem;
  overflow: hidden;
  display: none;
}
.kk-progress-wrap.show { display: block; }
.kk-progress-bar {
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
  transition: width 0.3s ease;
  width: 0%;
}

/* ═══════════════════════════════════════════════════════════════
   CATEGORY MANAGEMENT
═══════════════════════════════════════════════════════════════ */
.kk-cat-manage-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.kk-cat-manage-row:last-child { border-bottom: none; }
.kk-cat-manage-name { flex: 1; font-size: 0.88rem; color: var(--cream); }
.kk-cat-edit-input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--gold);
  border-radius: 4px;
  padding: 0.35rem 0.6rem;
  color: var(--cream);
  font-size: 0.85rem;
  outline: none;
}

/* ═══════════════════════════════════════════════════════════════
   BACKUP & RESTORE
═══════════════════════════════════════════════════════════════ */
.kk-backup-card {
  background: var(--navy-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  margin-bottom: 1rem;
}
.kk-backup-card-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 0.4rem;
}
.kk-backup-card-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
  line-height: 1.55;
}
.kk-restore-preview {
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.8rem;
  font-size: 0.72rem;
  color: var(--silver);
  font-family: monospace;
  white-space: pre-wrap;
  max-height: 200px;
  overflow-y: auto;
  margin-top: 0.7rem;
  display: none;
}
.kk-restore-preview.show { display: block; }

/* ═══════════════════════════════════════════════════════════════
   CONTENT EDITOR (About / Site text)
═══════════════════════════════════════════════════════════════ */
.kk-content-field {
  background: var(--navy-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  margin-bottom: 1rem;
}
.kk-content-field-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
}
.kk-content-field-note {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* ═══════════════════════════════════════════════════════════════
   SETTINGS / SECURITY
═══════════════════════════════════════════════════════════════ */
.kk-settings-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.kk-settings-row:last-child { border-bottom: none; }
.kk-settings-key {
  font-size: 0.8rem;
  color: var(--cream);
  font-weight: 500;
}
.kk-settings-val {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
  word-break: break-all;
}

/* ═══════════════════════════════════════════════════════════════
   TOAST NOTIFICATION
═══════════════════════════════════════════════════════════════ */
#kk-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 9999;
  background: var(--navy-mid);
  border: 1px solid var(--border);
  border-radius: 60px;
  padding: 0.65rem 1.4rem;
  font-size: 0.82rem;
  color: var(--cream);
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  white-space: nowrap;
}
#kk-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
#kk-toast.toast-error {
  border-color: rgba(224,82,82,0.4);
  color: #f28b82;
}
#kk-toast.toast-success {
  border-color: rgba(76,175,125,0.4);
  color: #81c995;
}

/* ═══════════════════════════════════════════════════════════════
   SPINNER / LOADING
═══════════════════════════════════════════════════════════════ */
.kk-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.15);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: kk-spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes kk-spin { to { transform: rotate(360deg); } }

.kk-loading-state {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  justify-content: center;
}

.kk-empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.kk-empty-state svg { opacity: 0.3; margin-bottom: 0.8rem; }

/* ═══════════════════════════════════════════════════════════════
   DIVIDER
═══════════════════════════════════════════════════════════════ */
.kk-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.2rem 0;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — mobile
═══════════════════════════════════════════════════════════════ */
@media (max-width: 700px) {

  /* ── Overlay fills screen ── */
  #kk-admin-overlay {
    align-items: flex-start;
    padding: 0;
  }

  /* ── Login card full-width ── */
  .kk-login-card {
    width: 100vw;
    min-height: 100dvh;
    border-radius: 0;
    border: none;
    padding: 2rem 1.4rem;
    overflow-y: auto;
  }

  /* ── Dashboard full screen ── */
  #kk-dashboard {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
    border: none;
  }

  /* ── Hide sidebar — replaced by mobile tab strip ── */
  .kk-sidebar { display: none; }

  /* ── Topbar — compact on mobile ── */
  .kk-topbar {
    padding: 0.6rem 1rem;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .kk-topbar-brand { font-size: 0.95rem; }
  .kk-topbar-actions { gap: 0.4rem; }
  .kk-topbar-actions .kk-btn { font-size: 0.65rem; padding: 0.45rem 0.8rem; }
  .kk-admin-email { display: none; }

  /* ── Mobile horizontal tab strip ── */
  .kk-mobile-tabs {
    display: flex;
    overflow-x: auto;
    background: var(--navy-mid);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .kk-mobile-tabs::-webkit-scrollbar { display: none; }

  .kk-mobile-tab {
    flex-shrink: 0;
    padding: 0.65rem 0.85rem;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--silver);
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color 0.2s, border-color 0.2s;
  }
  .kk-mobile-tab.active {
    color: var(--gold-light);
    border-bottom-color: var(--gold);
  }

  /* ── Main content area ── */
  .kk-main { padding: 1rem; }

  /* ── Pane headings ── */
  .kk-pane-title { font-size: 1.25rem; }
  .kk-pane-sub   { font-size: 0.72rem; margin-bottom: 1rem; }

  /* ── Toolbar — stack vertically ── */
  .kk-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  .kk-toolbar .kk-search { max-width: 100%; }
  .kk-toolbar .kk-btn    { width: 100%; justify-content: center; }

  /* ── Stat grid — 2 columns ── */
  .kk-stat-grid { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .kk-stat-num  { font-size: 1.6rem; }

  /* ── Dish rows — tighter ── */
  .kk-dish-row { padding: 0.55rem 0.7rem; gap: 0.6rem; }
  .kk-dish-thumb            { width: 38px; height: 38px; }
  .kk-dish-thumb-placeholder { width: 38px; height: 38px; }
  .kk-dish-name-text { font-size: 0.82rem; }
  .kk-dish-meta      { font-size: 0.62rem; }
  .kk-dish-actions   { flex-direction: column; gap: 0.25rem; }
  .kk-dish-actions .kk-btn { font-size: 0.6rem; padding: 0.3rem 0.6rem; }

  /* ── Category block ── */
  .kk-cat-header { padding: 0.7rem 0.8rem; }
  .kk-cat-name   { font-size: 0.95rem; }

  /* ── Section title ── */
  .kk-section-title { font-size: 0.65rem; }

  /* ── Quick action buttons ── */
  #pane-overview > div:last-child {
    flex-direction: column;
  }
  #pane-overview > div:last-child .kk-btn {
    width: 100%;
    justify-content: center;
  }

  /* ── Modal — full screen ── */
  .kk-modal-backdrop {
    align-items: flex-end;
  }
  .kk-modal {
    width: 100vw;
    max-height: 92dvh;
    border-radius: 16px 16px 0 0;
    border-bottom: none;
  }
  .kk-modal-header { padding: 1rem 1.1rem; }
  .kk-modal-body   { padding: 1rem 1.1rem; }
  .kk-modal-footer { padding: 0.8rem 1.1rem; flex-wrap: wrap; }
  .kk-modal-footer .kk-btn { flex: 1; justify-content: center; min-width: 80px; }

  /* ── Form grid — single column ── */
  .kk-grid-2 { grid-template-columns: 1fr; }

  /* ── Backup cards ── */
  .kk-backup-card { padding: 1rem; }
  .kk-backup-card > div:last-child { flex-direction: column; }
  .kk-backup-card > div:last-child .kk-btn { width: 100%; justify-content: center; }

  /* ── Content fields ── */
  .kk-content-field { padding: 1rem; }

  /* ── Settings rows ── */
  .kk-settings-row { flex-direction: column; gap: 0.3rem; }
  .kk-settings-val { text-align: left; }

  /* ── Toast ── */
  #kk-toast {
    width: 90vw;
    text-align: center;
    white-space: normal;
    bottom: 1rem;
  }
}

@media (min-width: 701px) {
  .kk-mobile-tabs { display: none; }
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER DISCREET LINK
═══════════════════════════════════════════════════════════════ */
#kk-footer-cms-link {
  font-size: 0.6rem;
  color: rgba(201,168,76,0.25);
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.1em;
  transition: color 0.2s;
}
#kk-footer-cms-link:hover { color: var(--gold); }
