/* ============================================================
   HyperCharge Admin Panel — v3.0 Premium
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ─── Design tokens ─────────────────────────────────────── */
:root {
  --bg:          #07080C;
  --bg-card:     rgba(16, 18, 27, 0.7);
  --surface:     rgba(28, 32, 46, 0.6);
  --surface-hi:  rgba(40, 46, 65, 0.7);
  --border:      rgba(255, 255, 255, 0.07);
  --border-hi:   rgba(255, 255, 255, 0.13);

  --blue:        #0A84FF;
  --blue-light:  #38BDF8;
  --green:       #30D158;
  --orange:      #FF9F0A;
  --red:         #FF453A;
  --purple:      #BF5AF2;

  --text:        #F5F5F7;
  --text-sub:    #A1A1A6;
  --text-muted:  #636366;

  --grad:        linear-gradient(135deg, #0A84FF 0%, #38BDF8 100%);
  --grad-warm:   linear-gradient(135deg, #FF9F0A 0%, #FF6B00 100%);
  --grad-green:  linear-gradient(135deg, #30D158 0%, #25A244 100%);

  --r-sm:  10px;
  --r-md:  16px;
  --r-lg:  22px;
  --r-xl:  28px;
  --r-2xl: 36px;
  --r-full: 9999px;

  --ease:  cubic-bezier(0.25, 1, 0.2, 1);
  --shadow-sm: 0 4px 16px rgba(0,0,0,0.25);
  --shadow-md: 0 12px 40px rgba(0,0,0,0.4);
  --shadow-lg: 0 24px 80px rgba(0,0,0,0.6);
}

/* ─── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 15% 0%, rgba(10,132,255,0.14) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 100%, rgba(94,92,230,0.14) 0%, transparent 55%);
  background-attachment: fixed;
  color: var(--text);
  letter-spacing: -0.013em;
  overflow-x: hidden;
}

input, textarea, select, button { font-family: inherit; }
button { -webkit-tap-highlight-color: transparent; cursor: pointer; }
a { color: var(--blue); text-decoration: none; }
img { display: block; }

/* ─── LOGIN ─────────────────────────────────────────────── */
#login-overlay {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  transition: opacity 0.4s var(--ease);
  padding: 24px;
}
#login-overlay.hidden { opacity: 0; pointer-events: none; }

.login-box {
  width: 100%; max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-2xl);
  padding: 48px 40px;
  display: flex; flex-direction: column; gap: 20px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(32px); -webkit-backdrop-filter: blur(32px);
}
@media (max-width: 480px) {
  .login-box { padding: 36px 28px; }
}

.login-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.login-icon {
  width: 64px; height: 64px; font-size: 2.4rem;
  background: var(--grad);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 32px rgba(10,132,255,0.4);
}
.login-logo { font-size: 1.6rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.login-subtitle { font-size: 0.9rem; color: var(--text-sub); font-weight: 500; }

.login-input {
  width: 100%; padding: 16px 20px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--r-lg); color: var(--text); font-size: 1rem;
  outline: none; letter-spacing: 0.08em;
  transition: border-color 0.2s;
}
.login-input:focus { border-color: var(--blue); }
.login-input::placeholder { letter-spacing: 0; }

.login-btn {
  width: 100%; padding: 16px;
  background: var(--grad); border: none;
  border-radius: var(--r-full); color: #000; font-weight: 700; font-size: 1rem;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all 0.25s var(--ease); box-shadow: 0 6px 20px rgba(10,132,255,0.35);
}
.login-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(10,132,255,0.5); }
.login-btn:active { transform: scale(0.97); }

.login-error { color: var(--red); font-size: 0.85rem; display: none; font-weight: 600; }
.login-error.show { display: block; }

/* ─── ADMIN PANEL ───────────────────────────────────────── */
#admin-panel { display: none; flex-direction: column; min-height: 100svh; }
#admin-panel.visible { display: flex; }

/* ─── HEADER ────────────────────────────────────────────── */
.app-header {
  position: sticky; top: 0; z-index: 200;
  height: 64px;
  display: flex; align-items: center; gap: 16px;
  padding: 0 20px;
  background: rgba(7, 8, 12, 0.85);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
}
.header-brand {
  display: flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 1.1rem;
}
.header-bolt { font-size: 1.3rem; }
@media (max-width: 480px) { .header-name { display: none; } }

.header-title-center {
  flex: 1; text-align: center;
  font-size: 1rem; font-weight: 700; color: var(--text-sub);
}

.header-right { display: flex; align-items: center; gap: 12px; }
.header-site-link {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-sub); transition: all 0.2s;
}
.header-site-link:hover { background: var(--surface-hi); color: var(--text); }

.profile-avatar-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid var(--blue); padding: 2px;
  background: none; position: relative;
  transition: transform 0.2s;
}
.profile-avatar-btn:hover { transform: scale(1.08); }
.profile-avatar-btn img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.online-dot {
  position: absolute; bottom: 0px; right: 0px;
  width: 10px; height: 10px;
  background: var(--green); border-radius: 50%; border: 2px solid var(--bg);
}

/* ─── TAB VIEWS ─────────────────────────────────────────── */
.tab-view {
  display: none; flex: 1;
  padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px));
}
.tab-view.active { display: block; animation: fadeSlideIn 0.3s var(--ease) both; }
@keyframes fadeSlideIn { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:translateY(0); } }

.page-scroll { max-width: 780px; margin: 0 auto; padding: 24px 20px; display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 480px) { .page-scroll { padding: 16px 14px; gap: 16px; } }

/* ─── STATS STRIP ───────────────────────────────────────── */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.stat-pill {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  display: flex; align-items: center; gap: 12px;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  transition: border-color 0.2s, transform 0.2s;
}
.stat-pill:hover { border-color: var(--border-hi); transform: translateY(-2px); }

.stat-pill-icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.stat-pill-icon.blue   { background: rgba(10,132,255,0.18); }
.stat-pill-icon.green  { background: rgba(48,209,88,0.18); }
.stat-pill-icon.orange { background: rgba(255,159,10,0.18); }
.stat-pill-icon.red    { background: rgba(255,69,58,0.18); }
.stat-pill-icon.purple { background: rgba(191,90,242,0.18); }

.stat-pill-num { font-size: 1.5rem; font-weight: 900; line-height: 1; background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-pill-lbl { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; margin-top: 3px; text-transform: uppercase; letter-spacing: 0.04em; }

/* ─── SECTION TOOLBAR ───────────────────────────────────── */
.section-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.toolbar-search {
  flex: 1; min-width: 160px;
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--r-full); padding: 0 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.toolbar-search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(10,132,255,0.12); }
.toolbar-search svg { flex-shrink: 0; color: var(--text-muted); }
.toolbar-search input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-size: 0.9rem; padding: 12px 0;
}
.toolbar-search input::placeholder { color: var(--text-muted); }

.toolbar-btn {
  width: 44px; height: 44px; flex-shrink: 0;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 12px; color: var(--text-sub);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.toolbar-btn:hover { background: var(--surface-hi); color: var(--text); border-color: var(--border-hi); }

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 20px; height: 44px;
  background: var(--grad); border: none;
  border-radius: var(--r-full); color: #000; font-weight: 700; font-size: 0.88rem;
  white-space: nowrap;
  transition: all 0.25s var(--ease); box-shadow: 0 4px 16px rgba(10,132,255,0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(10,132,255,0.45); }

/* ─── ORDERS LIST ───────────────────────────────────────── */
.orders-list { display: flex; flex-direction: column; gap: 12px; }

.order-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.order-card:hover { border-color: var(--border-hi); box-shadow: var(--shadow-sm); }

.order-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.order-id { font-size: 0.85rem; font-weight: 800; color: var(--blue); background: rgba(10,132,255,0.1); padding: 3px 10px; border-radius: var(--r-full); }
.order-date { font-size: 0.8rem; color: var(--text-muted); }

.order-items-list { display: flex; flex-direction: column; gap: 6px; }
.order-item {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 0.9rem; color: var(--text-sub);
}
.order-item strong { color: var(--text); font-weight: 600; }
.order-item-price { color: var(--text-muted); font-size: 0.82rem; }
.order-item-badge { font-size: 0.72rem; font-weight: 700; color: var(--blue); background: rgba(10,132,255,0.12); padding: 1px 7px; border-radius: 6px; }
.order-email-line { font-size: 0.78rem; color: var(--text-muted); padding-left: 26px; margin-top: 2px; }

.order-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.order-total { font-size: 1.15rem; font-weight: 800; }

.status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 12px; height: 34px;
  border-radius: var(--r-full);
  font-size: 0.78rem; font-weight: 700;
  border: 1.5px solid transparent;
  white-space: nowrap; cursor: pointer;
  outline: none; appearance: none; -webkit-appearance: none;
  transition: all 0.2s;
  background: var(--surface);
  color: var(--text-sub);
}
.status-badge[data-status="not fulfilled"] { background: rgba(255,159,10,0.15); color: var(--orange); border-color: rgba(255,159,10,0.3); }
.status-badge[data-status="fulfilled"]     { background: rgba(48,209,88,0.15); color: var(--green); border-color: rgba(48,209,88,0.3); }
.status-badge[data-status="cancelled"]     { background: rgba(255,69,58,0.15); color: var(--red); border-color: rgba(255,69,58,0.3); }
.status-badge[data-status="refunded"]      { background: rgba(100,116,139,0.12); color: var(--text-muted); border-color: rgba(100,116,139,0.2); }

@media (max-width: 540px) {
  .order-card { grid-template-columns: 1fr; }
  .order-actions { flex-direction: row; justify-content: space-between; align-items: center; }
}

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); font-size: 0.95rem; }

/* ─── SERVICES LIST ─────────────────────────────────────── */
.services-list { display: flex; flex-direction: column; gap: 12px; }

.service-pill {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  transition: border-color 0.25s;
}
.service-pill:hover { border-color: var(--border-hi); }

.pill-header {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; cursor: pointer;
}
.pill-icon { font-size: 1.8rem; flex-shrink: 0; }
.pill-main { flex: 1; min-width: 0; }
.pill-name { font-size: 1rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill-price-info { font-size: 0.88rem; font-weight: 700; color: var(--blue); margin-top: 2px; }
.pill-sub-price { font-size: 0.78rem; color: var(--text-sub); }
.pill-right { display: flex; align-items: center; gap: 10px; }
.pill-toggle { color: var(--text-muted); transition: transform 0.3s var(--ease); }
.service-pill.expanded .pill-toggle { transform: rotate(180deg); }

.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 8px; font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.badge-ok   { background: rgba(48,209,88,0.15); color: var(--green); }
.badge-sold { background: rgba(255,69,58,0.15); color: var(--red); }
.badge-pop  { background: rgba(10,132,255,0.15); color: var(--blue); }

.pill-body { max-height: 0; overflow: hidden; transition: max-height 0.4s var(--ease), padding 0.3s; background: rgba(0,0,0,0.2); }
.service-pill.expanded .pill-body { max-height: 400px; border-top: 1px solid var(--border); }

.pill-details { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.pill-detail-item { font-size: 0.85rem; display: flex; justify-content: space-between; gap: 8px; }
.pill-detail-item span:first-child { color: var(--text-muted); font-weight: 600; }
.pill-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 20px 20px; }

.btn-edit, .btn-del {
  padding: 11px 16px; border-radius: 12px; border: none;
  font-size: 0.85rem; font-weight: 700; cursor: pointer;
  transition: all 0.2s var(--ease); width: 100%;
}
.btn-edit { background: rgba(10,132,255,0.1); color: var(--blue); }
.btn-edit:hover { background: var(--blue); color: #fff; }
.btn-del  { background: rgba(255,69,58,0.1); color: var(--red); }
.btn-del:hover  { background: var(--red); color: #fff; }

/* ─── PROFILE TAB ───────────────────────────────────────── */
.profile-hero-card {
  border-radius: var(--r-xl);
  overflow: hidden; position: relative;
  min-height: 160px;
}
.profile-hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #0A84FF 0%, #5E5CE6 50%, #BF5AF2 100%);
  opacity: 0.85;
}
.profile-hero-content {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 20px;
  padding: 28px 24px;
}
.profile-avatar-wrap { position: relative; flex-shrink: 0; }
.profile-avatar-wrap img {
  width: 80px; height: 80px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.35);
  object-fit: cover;
}
.profile-avatar-edit {
  position: absolute; bottom: 0; right: 0;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(0,0,0,0.7); border: 2px solid rgba(255,255,255,0.2);
  color: #fff; display: flex; align-items: center; justify-content: center;
}
.profile-hero-info h2 { font-size: 1.3rem; font-weight: 800; color: #fff; }
.profile-hero-info p  { font-size: 0.9rem; color: rgba(255,255,255,0.7); margin-top: 4px; }

.profile-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex; flex-direction: column; gap: 18px;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.section-label { font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--blue); }

.form-field { display: flex; flex-direction: column; gap: 7px; }
.form-field label { font-size: 0.82rem; font-weight: 700; color: var(--text-sub); }
.form-field input {
  width: 100%; padding: 14px 16px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--r-md); color: var(--text); font-size: 0.95rem;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.form-field input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(10,132,255,0.12); }
.field-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: -2px; }

.btn-save-profile {
  width: 100%; padding: 16px;
  background: var(--grad); border: none;
  border-radius: var(--r-full); color: #000; font-weight: 700; font-size: 1rem;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: all 0.25s var(--ease); box-shadow: 0 6px 20px rgba(10,132,255,0.3);
}
.btn-save-profile:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(10,132,255,0.45); }

.btn-logout-profile {
  width: 100%; padding: 16px;
  background: rgba(255,69,58,0.08); border: 1.5px solid rgba(255,69,58,0.2);
  border-radius: var(--r-full); color: var(--red); font-weight: 700; font-size: 1rem;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: all 0.2s;
}
.btn-logout-profile:hover { background: rgba(255,69,58,0.15); }

/* ─── BOTTOM NAV ────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  left: 50%; transform: translateX(-50%);
  width: min(92%, 500px);
  height: 68px;
  background: rgba(16, 18, 27, 0.85);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 34px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.08);
  backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  display: flex; align-items: center; justify-content: space-around;
  padding: 0 20px;
  z-index: 300;
}

.nav-btn {
  background: none; border: none;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--text-muted); font-size: 0.68rem; font-weight: 700;
  flex: 1; padding: 8px 0;
  transition: color 0.2s;
}
.nav-btn:hover { color: var(--text-sub); }
.nav-btn.active { color: var(--blue); }
.nav-icon { transition: transform 0.25s var(--ease); }
.nav-btn.active .nav-icon { transform: translateY(-2px); }

.nav-action-btn {
  width: 54px; height: 54px;
  border-radius: 50%; border: none;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  color: #000; flex-shrink: 0;
  margin-top: -20px;
  box-shadow: 0 6px 20px rgba(10,132,255,0.45);
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.nav-action-btn:hover  { transform: scale(1.12); }
.nav-action-btn:active { transform: scale(0.9); }

/* ─── SERVICE MODAL ─────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 8000;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  width: 100%; max-width: 640px;
  max-height: 90dvh;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: translateY(60px);
  transition: transform 0.4s var(--ease);
}
.modal-overlay.open .modal { transform: translateY(0); }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-header h3 { font-size: 1.3rem; font-weight: 800; }
.modal-close-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface); border: none; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.modal-close-btn:hover { background: var(--surface-hi); color: var(--text); }

.modal-form-container {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 20px 24px; display: flex; flex-direction: column; gap: 18px;
}
.form-row { display: flex; flex-direction: column; gap: 8px; }
.form-row label { font-size: 0.82rem; font-weight: 700; color: var(--text-sub); }
.form-row.split { flex-direction: row; gap: 14px; }
.form-col { display: flex; flex-direction: column; gap: 8px; flex: 1; }
@media (max-width: 520px) { .form-row.split { flex-direction: column; } }

.modal input, .modal textarea, .modal select {
  width: 100%; padding: 13px 16px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--r-md); color: var(--text); font-size: 0.92rem;
  outline: none; font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.modal input:focus, .modal textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(10,132,255,0.12); }
.modal select { cursor: pointer; }

.cat-chip-container { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chip-container label {
  display: flex; align-items: center; gap: 7px;
  background: var(--surface); border: 1.5px solid var(--border);
  padding: 7px 14px; border-radius: var(--r-full);
  font-size: 0.82rem; font-weight: 700; cursor: pointer;
  transition: all 0.2s;
}
.cat-chip-container label:hover { border-color: rgba(10,132,255,0.4); }
.cat-chip-container input[type="checkbox"] { width: 15px; height: 15px; margin: 0; accent-color: var(--blue); cursor: pointer; }

.switch-col { justify-content: center; gap: 12px; }
.switch-label { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 0.9rem !important; color: var(--text) !important; }
.switch-input { width: 20px !important; height: 20px !important; accent-color: var(--blue); }

.plans-box {
  background: rgba(10,132,255,0.04); border: 1.5px dashed rgba(10,132,255,0.25);
  border-radius: var(--r-lg); padding: 20px;
}
.btn-add-plan { background: rgba(10,132,255,0.14); color: var(--blue); border: none; padding: 6px 14px; border-radius: 8px; font-size: 0.78rem; font-weight: 800; transition: all 0.2s; }
.btn-add-plan:hover { background: var(--blue); color: #fff; }

.modal-btns {
  display: flex; gap: 12px;
  padding: 16px 24px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border); flex-shrink: 0;
}
.btn-cancel { flex: 1; padding: 14px; background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-full); color: var(--text-sub); font-weight: 700; transition: all 0.2s; }
.btn-cancel:hover { background: var(--surface-hi); }
.btn-save   { flex: 2; padding: 14px; background: var(--grad); border: none; border-radius: var(--r-full); color: #000; font-weight: 700; transition: all 0.2s; box-shadow: 0 4px 16px rgba(10,132,255,0.3); }
.btn-save:hover { box-shadow: 0 8px 24px rgba(10,132,255,0.45); }

/* ─── TOAST ─────────────────────────────────────────────── */
.admin-toast {
  position: fixed; bottom: calc(100px + env(safe-area-inset-bottom, 0px)); left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(28,32,46,0.95); color: var(--text);
  border: 1px solid var(--border-hi);
  padding: 12px 24px; border-radius: var(--r-full);
  font-size: 0.88rem; font-weight: 600;
  box-shadow: var(--shadow-md);
  white-space: nowrap; z-index: 5000;
  opacity: 0; transition: all 0.35s var(--ease);
}
.admin-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ─── Focus accessibility ────────────────────────────────── */
.nav-btn:focus-visible, .nav-action-btn:focus-visible, .btn-primary:focus-visible, .btn-save:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* ─── Owner Tab ──────────────────────────────────────────── */
.owner-header-card {
  display: flex; align-items: flex-start; gap: 16px;
  background: linear-gradient(135deg, rgba(191,90,242,0.15) 0%, rgba(10,132,255,0.1) 100%);
  border: 1px solid rgba(191,90,242,0.2);
  border-radius: var(--r-lg); padding: 20px;
}
.owner-header-icon { font-size: 2rem; flex-shrink: 0; margin-top: 2px; }
.owner-header-title { font-size: 1.1rem; font-weight: 800; }
.owner-header-sub { font-size: 0.83rem; color: var(--text-sub); margin-top: 4px; line-height: 1.5; }

/* Owner fulfillment card */
.owner-order-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  transition: border-color 0.2s;
}
.owner-order-card.is-done { opacity: 0.55; }
.owner-order-card:hover { border-color: var(--border-hi); }

.owner-order-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.owner-service-name { font-weight: 700; font-size: 0.95rem; }
.owner-customer-email {
  display: flex; align-items: center; gap: 8px;
  background: rgba(10,132,255,0.08); border: 1px solid rgba(10,132,255,0.15);
  border-radius: 10px; padding: 10px 14px;
  font-size: 0.85rem; color: var(--blue);
  font-weight: 600; word-break: break-all;
}
.owner-customer-email svg { flex-shrink: 0; }

.owner-fulfill-row {
  display: flex; gap: 10px;
}
.owner-email-input {
  flex: 1; padding: 12px 16px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--r-md); color: var(--text); font-size: 0.9rem; outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
}
.owner-email-input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(191,90,242,0.12); }
.owner-email-input:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-fulfill {
  padding: 0 20px; height: 46px;
  background: linear-gradient(135deg, #BF5AF2 0%, #9B59D4 100%);
  border: none; border-radius: var(--r-full); color: #fff;
  font-weight: 700; font-size: 0.88rem; white-space: nowrap;
  display: flex; align-items: center; gap: 8px;
  transition: all 0.2s; box-shadow: 0 4px 16px rgba(191,90,242,0.3);
}
.btn-fulfill:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(191,90,242,0.45); }
.btn-fulfill:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.owner-fulfilled-note {
  font-size: 0.82rem; color: var(--green);
  display: flex; align-items: center; gap: 6px; font-weight: 600;
}

/* 4-column flat nav (no FAB) */
.nav-action-btn { display: none !important; }
.bottom-nav { padding: 0 8px; }
.nav-btn { padding: 6px 0; min-width: 0; }
.nav-btn span { font-size: 0.66rem; }
/* ─── Date Filters ─────────────────────────────────────────── */
.date-filters {
  display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto;
  padding-bottom: 4px; padding-top: 4px; 
}
.date-filters::-webkit-scrollbar { display: none; }
.date-filter-btn {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-sub); border-radius: var(--r-full);
  padding: 6px 14px; font-size: 0.8rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.date-filter-btn:hover { border-color: var(--border-hi); color: var(--text); }
.date-filter-btn.active {
  background: var(--purple); border-color: var(--purple); color: #fff;
  box-shadow: 0 4px 12px rgba(191,90,242,0.25);
}

/* ─── Workspace Accordion Details ────────────────────────────── */
details.owner-ws-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); margin-bottom: 12px; transition: border 0.2s;
}
details.owner-ws-box[open] { border-color: var(--purple); }
details.owner-ws-box summary {
  padding: 16px; font-weight: 700; color: var(--purple); cursor: pointer;
  display: flex; align-items: center; gap: 10px; outline: none; list-style: none;
}
details.owner-ws-box summary::-webkit-details-marker { display: none; }
details.owner-ws-box summary::after {
  content: '▼'; margin-left: auto; font-size: 0.7rem; color: var(--text-sub);
  transition: transform 0.2s;
}
details.owner-ws-box[open] summary::after { transform: rotate(180deg); }
.ws-item-count { font-size: 0.7rem; background: rgba(191,90,242,0.1); color: var(--purple); padding: 2px 6px; border-radius: 10px; }
.ws-details-content { padding: 0 16px 16px 16px; max-height: 250px; overflow-y: auto; }

/* ─── Delete Order Button ─────────────────────────────────── */
.btn-delete-order {
  background: rgba(255,59,48,0.12); border: 1px solid rgba(255,59,48,0.25);
  color: #ff3b30; border-radius: var(--r-sm); padding: 6px 8px;
  cursor: pointer; transition: all 0.2s; line-height: 0; flex-shrink: 0;
}
.btn-delete-order:hover { background: rgba(255,59,48,0.22); border-color: #ff3b30; }

/* ─── Gift Cards Tab ─────────────────────────────────────── */
.nav-pill {
  background: var(--surface); border: 1px solid var(--border); color: var(--text-sub);
  padding: 8px 16px; border-radius: var(--r-full); font-weight: 600; cursor: pointer;
  transition: all 0.2s; font-size: 0.85rem;
}
.nav-pill.active { background: var(--purple); color: #fff; border-color: var(--purple); }

.gc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 32px; }
.gc-card {
  background: linear-gradient(135deg, #1a0533 0%, #220a3e 100%);
  border: 1px solid rgba(191,90,242,0.3); border-radius: 16px;
  padding: 20px; position: relative; overflow: hidden;
  box-shadow: 0 4px 20px rgba(191,90,242,0.15);
}
.gc-card::before {
  content: ''; position: absolute; top: -40px; right: -40px;
  width: 120px; height: 120px; border-radius: 50%;
  background: rgba(191,90,242,0.1);
}
.gc-card-code {
  font-family: 'Courier New', monospace; font-size: 1.3rem; font-weight: 800;
  letter-spacing: 3px; color: #fff; margin-bottom: 12px;
}
.gc-card-discount { font-size: 1.6rem; font-weight: 900; color: var(--purple); margin-bottom: 8px; }
.gc-card-meta { font-size: 0.78rem; color: rgba(255,255,255,0.5); }
.gc-badge {
  position: absolute; top: 14px; right: 14px; font-size: 0.68rem; font-weight: 700;
  padding: 3px 8px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.5px;
}
.gc-badge.active { background: rgba(52,199,89,0.15); color: #34c759; border: 1px solid rgba(52,199,89,0.3); }
.gc-badge.used { background: rgba(255,159,10,0.15); color: #ff9f0a; border: 1px solid rgba(255,159,10,0.3); }
.gc-badge.expired { background: rgba(255,59,48,0.15); color: #ff3b30; border: 1px solid rgba(255,59,48,0.3); }
.gc-generate-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 20px; margin-bottom: 24px;
}
.gc-generate-box h3 { margin: 0 0 16px; font-size: 1rem; color: var(--text); }
.gc-fields { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.gc-field { display: flex; flex-direction: column; gap: 6px; }
.gc-field label { font-size: 0.75rem; font-weight: 600; color: var(--text-sub); text-transform: uppercase; letter-spacing: 0.5px; }
.gc-field input, .gc-field select {
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--r-sm); padding: 8px 12px; font-size: 0.9rem; width: 140px;
}
.gc-field input:focus, .gc-field select:focus { border-color: var(--purple); outline: none; }
.btn-generate {
  background: linear-gradient(135deg, #7c3aed, var(--purple)); color: #fff;
  border: none; border-radius: var(--r-sm); padding: 10px 20px; font-weight: 700;
  cursor: pointer; font-size: 0.9rem; transition: all 0.2s; white-space: nowrap;
}
.btn-generate:hover { opacity: 0.88; transform: translateY(-1px); }
.gc-filter-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.gc-filter-tab {
  background: var(--surface); border: 1px solid var(--border); color: var(--text-sub);
  border-radius: var(--r-full); padding: 6px 14px; font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.gc-filter-tab.active { background: var(--purple); border-color: var(--purple); color: #fff; }
.gc-copy-btn {
  background: none; border: none; cursor: pointer; color: var(--text-sub);
  padding: 4px; border-radius: 4px; transition: color 0.2s; line-height: 0;
}
.gc-copy-btn:hover { color: var(--purple); }
