/* =========================================================
   Marhabo Admin Dashboard — admin.css
   Light theme · green minimalist accents
   ========================================================= */

:root {
  --a-bg:        #FAFBF9;             /* page background */
  --a-surface:   #FFFFFF;             /* cards / panels */
  --a-surface2:  #F1F7F2;             /* subtle alt surface (table-row hover, inputs) */
  --a-border:    rgba(47, 133, 90, 0.14);
  --a-gold:      #2F855A;             /* primary green (kept var name) */
  --a-gold-d:    #1F5A3F;             /* deep forest */
  --a-gold-soft: #5BAA84;             /* mid sage */
  --a-gold-pale: #E6EFE9;             /* pale mint (active-pill tint) */
  --a-text:      #162820;             /* deep ink with green tint */
  --a-muted:     #6B7C73;             /* gray-green */
  --a-danger:    #C04A4A;
  --a-success:   #2F855A;
  --a-warning:   #C49245;
  --a-radius:    12px;
  --a-sidebar-w: 240px;
  --a-shadow-sm: 0 1px 2px rgba(22, 40, 32, .04), 0 0 0 1px rgba(22, 40, 32, .03);
  --a-shadow-md: 0 4px 14px rgba(22, 40, 32, .05);
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font: inherit; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--a-bg);
  color: var(--a-text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ============================================================
   LOGIN SCREEN
   ============================================================ */
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(47,133,90,.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(91,170,132,.06) 0%, transparent 50%),
    var(--a-bg);
  padding: 24px;
}
.login-card {
  background: var(--a-surface);
  border: 1px solid var(--a-border);
  border-radius: 20px;
  padding: 48px 40px 44px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(22, 40, 32, .08), 0 0 0 1px rgba(22, 40, 32, .04);
}
.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
}
.login-logo__mark {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--a-gold) 0%, var(--a-gold-d) 100%);
  display: grid; place-items: center;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: #FFFFFF;
  box-shadow: 0 6px 18px rgba(47, 133, 90, .28);
}
.login-logo__text strong {
  display: block;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  color: var(--a-text);
}
.login-logo__text span {
  font-size: .72rem;
  color: var(--a-muted);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.login-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.55rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--a-text);
}
.login-subtitle { font-size: .88rem; color: var(--a-muted); margin-bottom: 32px; }

.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--a-muted);
  margin-bottom: 7px;
}
.form-input {
  width: 100%;
  background: var(--a-surface2);
  border: 1.5px solid var(--a-border);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--a-text);
  font-size: .96rem;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.form-input:focus {
  border-color: var(--a-gold);
  box-shadow: 0 0 0 3px rgba(47, 133, 90, .12);
}
.form-input::placeholder { color: var(--a-muted); opacity: .6; }

.form-select {
  width: 100%;
  background: var(--a-surface2);
  border: 1.5px solid var(--a-border);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--a-text);
  font-size: .96rem;
  outline: none;
  transition: border-color .2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7C73' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
.form-select:focus { border-color: var(--a-gold); }
.form-select option { background: var(--a-surface2); }

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

.login-btn {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--a-gold) 0%, var(--a-gold-d) 100%);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: .02em;
  transition: opacity .2s, transform .2s, box-shadow .2s;
  box-shadow: 0 6px 18px rgba(47, 133, 90, .25);
  margin-top: 8px;
}
.login-btn:hover { opacity: .94; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(47, 133, 90, .32); }

.login-error {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(192, 74, 74, .08);
  border: 1px solid rgba(192, 74, 74, .22);
  color: var(--a-danger);
  font-size: .88rem;
  display: none;
}
.login-error.is-visible { display: block; }

/* ============================================================
   DASHBOARD LAYOUT
   ============================================================ */
.dashboard { display: none; min-height: 100vh; }
.dashboard.is-visible { display: flex; }

/* Sidebar */
.sidebar {
  width: var(--a-sidebar-w);
  background: var(--a-surface);
  border-right: 1px solid var(--a-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 30;
  transition: transform .3s ease;
}
.sidebar__logo {
  padding: 22px 20px;
  border-bottom: 1px solid var(--a-border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar__logo-mark {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--a-gold) 0%, var(--a-gold-d) 100%);
  display: grid; place-items: center;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: #FFFFFF;
}
.sidebar__logo-text strong {
  display: block;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: .98rem;
  line-height: 1;
  color: var(--a-text);
}
.sidebar__logo-text span {
  font-size: .65rem;
  color: var(--a-muted);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.sidebar__nav {
  flex: 1;
  padding: 20px 12px;
  overflow-y: auto;
}
.sidebar__section-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--a-muted);
  padding: 0 10px;
  margin: 18px 0 8px;
}
.sidebar__section-label:first-child { margin-top: 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--a-muted);
  cursor: pointer;
  transition: background .2s, color .2s;
  margin-bottom: 2px;
}
.nav-item:hover { background: var(--a-gold-pale); color: var(--a-gold-d); }
.nav-item.is-active {
  background: var(--a-gold-pale);
  color: var(--a-gold-d);
  border: 1px solid rgba(47, 133, 90, .18);
  font-weight: 600;
}
.nav-item__icon { font-size: 1.1rem; width: 22px; text-align: center; }
.nav-item__badge {
  margin-left: auto;
  background: var(--a-surface);
  color: var(--a-gold-d);
  border: 1px solid rgba(47, 133, 90, .18);
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}

.sidebar__footer {
  padding: 16px 12px;
  border-top: 1px solid var(--a-border);
}
.sidebar__user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 6px;
}
.sidebar__user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--a-gold-pale);
  border: 1px solid rgba(47, 133, 90, .22);
  display: grid; place-items: center;
  font-size: .85rem;
  color: var(--a-gold-d);
  font-weight: 700;
}
.sidebar__user-name { font-size: .85rem; font-weight: 600; color: var(--a-text); }
.sidebar__user-role { font-size: .72rem; color: var(--a-muted); }

.logout-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  width: 100%;
  font-size: .88rem;
  font-weight: 500;
  color: var(--a-muted);
  transition: background .2s, color .2s;
}
.logout-btn:hover { background: rgba(192, 74, 74, .08); color: var(--a-danger); }

/* Main content */
.main-content {
  margin-left: var(--a-sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.topbar {
  height: 64px;
  border-bottom: 1px solid var(--a-border);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--a-surface);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--a-text);
}
.topbar__actions { display: flex; align-items: center; gap: 10px; }

/* Panel content */
.panel {
  padding: 32px 28px;
  flex: 1;
  display: none;
}
.panel.is-active { display: block; }

/* ---------- Stat cards ---------- */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--a-surface);
  border: 1px solid var(--a-border);
  border-radius: var(--a-radius);
  padding: 22px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.stat-card__icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--a-gold-pale);
  border: 1px solid rgba(47, 133, 90, .14);
  display: grid; place-items: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.stat-card__num {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--a-text);
  line-height: 1;
}
.stat-card__label { font-size: .8rem; color: var(--a-muted); margin-top: 3px; }

/* ---------- Section header ---------- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.section-header h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--a-text);
}
.section-header p { font-size: .88rem; color: var(--a-muted); }

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--a-gold) 0%, var(--a-gold-d) 100%);
  color: #FFFFFF;
  font-weight: 600;
  font-size: .88rem;
  transition: opacity .2s, transform .2s, box-shadow .2s;
  box-shadow: 0 4px 12px rgba(47, 133, 90, .22);
}
.btn-primary:hover { opacity: .94; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(47, 133, 90, .28); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--a-surface);
  border: 1px solid var(--a-border);
  color: var(--a-text);
  font-weight: 500;
  font-size: .88rem;
  transition: border-color .2s, color .2s, background .2s;
}
.btn-ghost:hover { border-color: var(--a-gold); color: var(--a-gold-d); background: var(--a-gold-pale); }

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(192, 74, 74, .08);
  border: 1px solid rgba(192, 74, 74, .2);
  color: var(--a-danger);
  font-weight: 500;
  font-size: .82rem;
  transition: background .2s;
}
.btn-danger:hover { background: rgba(192, 74, 74, .14); }

.btn-edit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--a-gold-pale);
  border: 1px solid rgba(47, 133, 90, .18);
  color: var(--a-gold-d);
  font-weight: 500;
  font-size: .82rem;
  transition: background .2s;
}
.btn-edit:hover { background: rgba(47, 133, 90, .14); }

/* ---------- Table ---------- */
.table-wrap {
  background: var(--a-surface);
  border: 1px solid var(--a-border);
  border-radius: var(--a-radius);
  overflow: hidden;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  background: var(--a-surface2);
  padding: 12px 18px;
  text-align: left;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--a-muted);
  border-bottom: 1px solid var(--a-border);
  white-space: nowrap;
}
.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--a-border);
  font-size: .88rem;
  color: var(--a-text);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(47, 133, 90, .035); }

.table-empty {
  text-align: center;
  color: var(--a-muted);
  padding: 48px 0;
  font-size: .9rem;
}

/* Badge status */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.badge--active    { background: rgba(47, 133, 90, .10); color: var(--a-success);    border: 1px solid rgba(47, 133, 90, .22); }
.badge--inactive  { background: rgba(107, 124, 115, .10); color: var(--a-muted);     border: 1px solid rgba(107, 124, 115, .22); }
.badge--restaurant { background: rgba(47, 133, 90, .10); color: var(--a-gold-d);     border: 1px solid rgba(47, 133, 90, .22); }
.badge--playground { background: rgba(91, 170, 132, .14); color: #1F5A3F;            border: 1px solid rgba(91, 170, 132, .28); }
.badge--birthday   { background: rgba(196, 146, 69, .12); color: var(--a-warning);   border: 1px solid rgba(196, 146, 69, .25); }
.badge--hero       { background: rgba(196, 146, 69, .12); color: var(--a-warning);   border: 1px solid rgba(196, 146, 69, .25); }
.badge--event      { background: rgba(91, 170, 132, .14); color: #1F5A3F;            border: 1px solid rgba(91, 170, 132, .28); }

/* ---------- Modal ---------- */
.a-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 31, 24, .42);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease;
}
.a-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: all;
}
.a-modal {
  background: var(--a-surface);
  border: 1px solid var(--a-border);
  border-radius: 18px;
  max-width: 600px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 28px 72px rgba(22, 40, 32, .18), 0 0 0 1px rgba(22, 40, 32, .04);
  transform: translateY(20px) scale(.97);
  transition: transform .28s cubic-bezier(.2,.7,.2,1);
}
.a-modal-backdrop.is-open .a-modal {
  transform: translateY(0) scale(1);
}
.a-modal__header {
  padding: 22px 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.a-modal__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--a-text);
}
.a-modal__close {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--a-surface2);
  border: 1px solid var(--a-border);
  display: grid; place-items: center;
  font-size: 1rem;
  color: var(--a-muted);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.a-modal__close:hover { background: rgba(192, 74, 74, .10); color: var(--a-danger); }
.a-modal__body { padding: 22px 24px 26px; }
.a-modal__footer {
  padding: 16px 24px;
  border-top: 1px solid var(--a-border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Form row */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

/* Tabs inside modal */
.lang-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--a-border);
  padding-bottom: 0;
}
.lang-tab {
  padding: 8px 16px;
  border-radius: 8px 8px 0 0;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--a-muted);
  cursor: pointer;
  transition: color .2s, background .2s;
  border: 1px solid transparent;
  border-bottom: none;
  margin-bottom: -1px;
}
.lang-tab:hover { color: var(--a-gold); }
.lang-tab.is-active {
  color: var(--a-gold);
  background: var(--a-surface2);
  border-color: var(--a-border);
}
.lang-panel { display: none; }
.lang-panel.is-active { display: block; }

/* Delete confirmation modal */
.confirm-modal .a-modal__body {
  text-align: center;
  padding-top: 30px;
}
.confirm-modal__icon {
  font-size: 2.8rem;
  margin-bottom: 14px;
}
.confirm-modal__msg {
  font-size: 1rem;
  color: var(--a-text);
  line-height: 1.6;
  margin-bottom: 6px;
}
.confirm-modal__sub {
  font-size: .85rem;
  color: var(--a-muted);
}

/* ---------- Toast ---------- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  background: var(--a-surface);
  border: 1px solid var(--a-border);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: .88rem;
  color: var(--a-text);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 240px;
  box-shadow: 0 12px 32px rgba(22, 40, 32, .12), 0 0 0 1px rgba(22, 40, 32, .04);
  animation: toast-in .3s ease forwards;
  pointer-events: all;
}
.toast--success { border-left: 3px solid var(--a-success); }
.toast--error   { border-left: 3px solid var(--a-danger); }
.toast--info    { border-left: 3px solid var(--a-gold); }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ---------- Mobile sidebar toggle ---------- */
.sidebar-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--a-surface2);
  border: 1px solid var(--a-border);
  color: var(--a-muted);
  font-size: .85rem;
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.is-open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .sidebar-toggle { display: flex; }
  .panel { padding: 22px 16px; }
  .topbar { padding: 0 16px; }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(47, 133, 90, .18); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(47, 133, 90, .35); }

/* =========================================================
   ADVANCED ADMIN ADDITIONS
   ========================================================= */

/* ---------- Topbar profile menu + actions ---------- */
.topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--a-surface2);
  border: 1px solid var(--a-border);
  border-radius: 10px;
  color: var(--a-text);
  font-size: .85rem;
  font-weight: 500;
  transition: all .18s ease;
}
.topbar__btn:hover {
  border-color: var(--a-gold);
  color: var(--a-gold);
}
.topbar__btn--ghost { background: transparent; }

.profile-menu { position: relative; }
.profile-menu__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  background: var(--a-surface2);
  border: 1px solid var(--a-border);
  border-radius: 999px;
  color: var(--a-text);
  font-size: .85rem;
  font-weight: 500;
  transition: border-color .18s ease;
}
.profile-menu__btn:hover { border-color: var(--a-gold); }
.profile-menu__avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--a-gold) 0%, var(--a-gold-d) 100%);
  display: grid; place-items: center;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--a-bg);
}
.profile-menu__caret { color: var(--a-muted); font-size: .7rem; }

.profile-menu__dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 240px;
  background: var(--a-surface);
  border: 1px solid var(--a-border);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 16px 40px rgba(0,0,0,.5);
  display: none;
  z-index: 100;
}
.profile-menu.is-open .profile-menu__dropdown { display: block; }
.profile-menu__header {
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--a-border);
  margin-bottom: 6px;
}
.profile-menu__title {
  font-weight: 600;
  font-size: .92rem;
  color: var(--a-text);
}
.profile-menu__sub {
  font-size: .78rem;
  color: var(--a-muted);
  margin-top: 2px;
  word-break: break-all;
}
.profile-menu__item {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--a-text);
  font-size: .88rem;
  transition: background .15s ease;
}
.profile-menu__item:hover { background: var(--a-surface2); }
.profile-menu__item--danger { color: var(--a-danger); }
.profile-menu__item--danger:hover { background: rgba(192, 74, 74, .08); }

/* ---------- Welcome card on overview ---------- */
.welcome-card {
  background:
    radial-gradient(ellipse at 100% 0%, rgba(91, 170, 132, .14) 0%, transparent 55%),
    var(--a-surface);
  border: 1px solid var(--a-border);
  border-radius: var(--a-radius);
  padding: 30px 32px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.welcome-card__eyebrow {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--a-gold);
  margin-bottom: 8px;
}
.welcome-card__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.7rem;
  color: var(--a-text);
  margin-bottom: 6px;
}
.welcome-card__sub {
  color: var(--a-muted);
  font-size: .9rem;
  max-width: 520px;
}
.welcome-card__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---------- Clickable stat cards ---------- */
.stat-card--clickable {
  cursor: pointer;
  text-align: left;
  transition: transform .15s ease, border-color .15s ease;
}
.stat-card--clickable:hover {
  transform: translateY(-2px);
  border-color: var(--a-gold);
}

/* ---------- Overview "recent items" cards ---------- */
.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}
@media (max-width: 900px) { .overview-grid { grid-template-columns: 1fr; } }

.overview-card {
  background: var(--a-surface);
  border: 1px solid var(--a-border);
  border-radius: var(--a-radius);
  padding: 24px 24px 18px;
}
.overview-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.overview-card__head h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  color: var(--a-text);
}
.link-btn {
  font-size: .82rem;
  color: var(--a-gold);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.link-btn:hover { color: var(--a-gold-soft); }

.overview-list { display: flex; flex-direction: column; }
.overview-list__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--a-border);
}
.overview-list__row:last-child { border-bottom: none; }
.overview-list__thumb {
  width: 38px; height: 38px;
  border-radius: 8px;
  background: var(--a-surface2);
  display: grid; place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}
.overview-list__thumb img { width: 100%; height: 100%; object-fit: cover; }
.overview-list__body { flex: 1; min-width: 0; }
.overview-list__title {
  font-size: .9rem;
  color: var(--a-text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.overview-list__meta {
  font-size: .76rem;
  color: var(--a-muted);
  margin-top: 2px;
}
.overview-list__empty {
  font-size: .85rem;
  color: var(--a-muted);
  text-align: center;
  padding: 16px;
}

/* ---------- Toolbar (search + filter pills) ---------- */
.toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--a-surface);
  border: 1px solid var(--a-border);
  border-radius: var(--a-radius);
  padding: 12px 14px;
  margin-bottom: 16px;
}
.toolbar__search {
  position: relative;
  flex: 1 1 240px;
  min-width: 200px;
}
.toolbar__search-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--a-muted);
  font-size: .9rem;
  pointer-events: none;
}
.toolbar__search-input {
  width: 100%;
  background: var(--a-surface2);
  border: 1px solid var(--a-border);
  border-radius: 10px;
  padding: 10px 14px 10px 36px;
  color: var(--a-text);
  font-size: .88rem;
  transition: border-color .15s ease;
}
.toolbar__search-input:focus {
  outline: none;
  border-color: var(--a-gold);
}
.toolbar__filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  background: var(--a-surface2);
  border: 1px solid var(--a-border);
  border-radius: 999px;
  color: var(--a-muted);
  font-size: .82rem;
  font-weight: 500;
  transition: all .15s ease;
  cursor: pointer;
}
.filter-pill:hover { color: var(--a-text); border-color: var(--a-gold-d); }
.filter-pill.is-active {
  background: var(--a-gold-pale);
  border-color: var(--a-gold);
  color: var(--a-gold-soft);
}
.filter-pill--secondary.is-active {
  background: var(--a-surface);
  border-color: var(--a-gold-d);
  color: var(--a-text);
}
.filter-pill__count {
  background: rgba(47, 133, 90, .12);
  color: var(--a-gold-d);
  padding: 1px 7px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
}
.filter-pill.is-active .filter-pill__count {
  background: var(--a-gold);
  color: #FFFFFF;
}

/* ---------- Sortable column headers ---------- */
.sort-h {
  cursor: pointer;
  user-select: none;
  transition: color .15s ease;
}
.sort-h:hover { color: var(--a-gold); }
.sort-h__caret {
  display: inline-block;
  margin-left: 4px;
  opacity: .3;
  transition: opacity .15s ease;
}
.sort-h.is-sort-asc  .sort-h__caret::after { content: '▲'; opacity: 1; }
.sort-h.is-sort-desc .sort-h__caret::after { content: '▼'; opacity: 1; }
.sort-h.is-sort-asc, .sort-h.is-sort-desc { color: var(--a-gold); }

/* ---------- Product table thumbnails ---------- */
.row-thumb {
  width: 44px; height: 44px;
  border-radius: 8px;
  background: var(--a-surface2);
  display: grid; place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}
.row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.row-thumb__fallback { font-size: 1.4rem; opacity: .7; }

/* ---------- Inline active toggle switch ---------- */
.switch {
  position: relative;
  display: inline-block;
  width: 38px; height: 22px;
}
.switch input {
  opacity: 0;
  width: 0; height: 0;
}
.switch__slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: var(--a-surface2);
  border: 1px solid var(--a-border);
  border-radius: 999px;
  transition: .2s ease;
}
.switch__slider::before {
  content: '';
  position: absolute;
  height: 16px; width: 16px;
  left: 2px; top: 50%;
  transform: translateY(-50%);
  background: var(--a-muted);
  border-radius: 50%;
  transition: .2s ease;
}
.switch input:checked + .switch__slider {
  background: rgba(47, 133, 90, .16);
  border-color: var(--a-success);
}
.switch input:checked + .switch__slider::before {
  transform: translate(15px,-50%);
  background: var(--a-success);
}
.switch input:disabled + .switch__slider { opacity: .5; cursor: wait; }

/* ---------- Upload widget (image picker + preview) ---------- */
.upload-widget {
  display: flex;
  gap: 14px;
  align-items: stretch;
}
.upload-widget__preview {
  width: 100px; height: 100px;
  background: var(--a-surface2);
  border: 1px dashed var(--a-border);
  border-radius: 12px;
  display: grid; place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}
.upload-widget__preview img { width: 100%; height: 100%; object-fit: cover; }
.upload-widget__placeholder { font-size: 1.8rem; opacity: .5; }
.upload-widget__controls {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.upload-widget__buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.upload-widget__status {
  font-size: .78rem;
  color: var(--a-muted);
}
.upload-widget__status.is-error { color: var(--a-danger); }
.upload-widget__status.is-ok    { color: var(--a-success); }

.btn-ghost--sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--a-surface2);
  border: 1px solid var(--a-border);
  color: var(--a-text);
  font-size: .82rem;
  cursor: pointer;
  transition: border-color .15s ease;
}
.btn-ghost--sm:hover { border-color: var(--a-gold); }

/* ---------- Settings panel (collapsible blocks) ---------- */
.settings-block {
  background: var(--a-surface);
  border: 1px solid var(--a-border);
  border-radius: var(--a-radius);
  margin-bottom: 14px;
  overflow: hidden;
}
.settings-block__head {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 600;
  font-size: .98rem;
  color: var(--a-text);
  user-select: none;
  transition: background .15s ease;
}
.settings-block__head::-webkit-details-marker { display: none; }
.settings-block__head:hover { background: var(--a-gold-pale); }
.settings-block__icon { font-size: 1.2rem; }
.settings-block__title { flex: 1; }
.settings-block__chev {
  color: var(--a-muted);
  font-size: .9rem;
  transition: transform .2s ease;
}
.settings-block[open] .settings-block__chev { transform: rotate(180deg); }
.settings-block__body {
  padding: 8px 22px 24px;
  border-top: 1px solid var(--a-border);
}
.settings-block__h4 {
  margin: 22px 0 10px;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--a-muted);
}
.settings-block__footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--a-border);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 10px;
}
.gallery-slot .upload-widget__preview { width: 90px; height: 90px; }

.zone-edit-row {
  display: grid;
  grid-template-columns: 80px repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 8px;
  align-items: end;
}
.zone-edit__icon {
  text-align: center;
  font-size: 1.1rem;
}
@media (max-width: 720px) {
  .zone-edit-row { grid-template-columns: 60px 1fr; }
}

.stat-edit-row,
.tariff-edit-row {
  display: grid;
  grid-template-columns: 120px repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 10px;
  align-items: end;
}
.tariff-edit-row {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 720px) {
  .stat-edit-row, .tariff-edit-row { grid-template-columns: 1fr 1fr; }
}

/* ---------- Sidebar bottom logout (kept) + responsive tweaks ---------- */
.hide-sm { display: inline; }
@media (max-width: 600px) {
  .hide-sm { display: none; }
  .welcome-card { padding: 22px; }
  .welcome-card__title { font-size: 1.3rem; }
  .toolbar { padding: 10px; gap: 10px; }
  .upload-widget { flex-direction: column; align-items: flex-start; }
}
