:root {
  --bg:           #000000;
  --surface:      #0f0e0b;
  --card:         #111008;
  --border:       #2a2520;
  --gold:         #C9A05A;
  --gold-dim:     rgba(201,160,90,0.28);
  --gold-bg:      rgba(201,160,90,0.08);
  --white-dim:    rgba(255,255,255,0.15);
  --white-bg:     rgba(255,255,255,0.07);
  --cream:        #F0E2C0;
  --muted:        rgba(240,226,192,0.4);
  --danger:       #cc3333;
  --green:        #4caf76;
  --radius:       10px;
  --font:         'Inter', system-ui, sans-serif;
  --font-display: 'Bebas Neue', sans-serif;
}

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

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font);
  font-size: 14px;
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
  width: 224px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 12px;
  gap: 4px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.logo img {
  width: 42px; height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.2);
}
.logo strong { display: block; font-family: var(--font-display); font-size: 15px; color: var(--cream); letter-spacing: .08em; font-weight: 400; }
.logo span   { font-size: 11px; color: var(--muted); letter-spacing: .04em; }

.nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  font-size: 13px;
  font-family: var(--font);
  font-weight: 600;
  text-align: left;
  transition: all .18s;
}
.nav-btn:hover  { background: var(--white-bg); color: rgba(255,255,255,0.75); }
.nav-btn.active { background: var(--white-bg); color: #fff; border-color: var(--white-dim); }
.nav-btn .icon  { font-size: 15px; flex-shrink: 0; }

.badge {
  margin-left: auto;
  background: var(--border);
  color: var(--muted);
  border-radius: 20px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 600;
}
.badge.pending { background: rgba(204,51,51,.25); color: #ff6666; }

/* ── MAIN ────────────────────────────────────────────────── */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px;
}

.tab { display: none; }
.tab.active { display: block; }

.tab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.tab-header h1 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 400;
  color: var(--cream);
  letter-spacing: .08em;
}

/* ── QUICK CARD ──────────────────────────────────────────── */
.quick-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--white-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 16px;
  gap: 12px;
}
.quick-card strong { color: var(--cream); font-size: 14px; font-weight: 600; }
.quick-card p      { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* ── CARD LIST ───────────────────────────────────────────── */
.card-list { display: flex; flex-direction: column; gap: 10px; }

.item-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: border-color .15s;
}
.item-card:hover   { border-color: rgba(255,255,255,0.1); }
.item-card.pinned  { border-color: var(--gold-dim); background: rgba(201,160,90,.04); }
.item-card.inactive { opacity: .4; }

.item-info  { flex: 1; min-width: 0; }
.item-title { font-weight: 600; font-size: 14px; color: var(--cream); margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-sub   { font-size: 12px; color: var(--muted); }

.item-actions { display: flex; gap: 6px; flex-shrink: 0; align-items: center; }

/* ── FLASH GRID ──────────────────────────────────────────── */
.flash-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}
.stat-pill {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.stat-pill.gold    { background: var(--gold-bg); border: 1px solid var(--gold-dim); color: var(--gold); }
.stat-pill.neutral { background: var(--card); border: 1px solid var(--border); color: var(--muted); }

.flash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.flash-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  transition: border-color .15s;
}
.flash-card:hover    { border-color: rgba(255,255,255,0.12); }
.flash-card.reserved { opacity: .5; }
.flash-card img {
  width: 100%; aspect-ratio: 1/1;
  object-fit: cover; display: block;
}
.flash-card-placeholder {
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  background: #1a1712;
  color: var(--border);
}
.flash-card-body    { padding: 10px 12px; }
.flash-card-title   { font-size: 13px; font-weight: 600; color: var(--cream); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flash-card-sub     { font-size: 11px; color: var(--muted); }
.flash-card-actions { display: flex; gap: 6px; padding: 0 12px 10px; }

.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}
.status-dot.available { background: #4caf76; box-shadow: 0 0 6px rgba(76,175,118,0.5); }
.status-dot.reserved  { background: #555; }

/* ── BOOKINGS ────────────────────────────────────────────── */
.booking-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  transition: border-color .15s;
}
.booking-card:hover     { border-color: rgba(255,255,255,0.1); }
.booking-card.pending   { border-color: rgba(204,51,51,.3); }
.booking-card.confirmed { border-color: rgba(76,175,118,.3); }
.booking-name   { font-weight: 600; font-size: 15px; color: var(--cream); }
.booking-phone  { font-size: 13px; color: var(--gold); margin: 2px 0; }
.booking-design { font-size: 12px; color: var(--muted); }
.booking-msg    { font-size: 12px; color: var(--muted); margin-top: 6px; font-style: italic; }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  padding: 9px 18px;
  border-radius: 9px;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  transition: all .15s;
}
.btn-gold    { background: var(--gold); color: #000; }
.btn-gold:hover { opacity: 0.88; }
.btn-ghost   { background: rgba(255,255,255,0.05); color: var(--muted); border: 1px solid var(--border); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); color: var(--cream); }
.btn-sm      { padding: 5px 11px; font-size: 12px; border-radius: 7px; }
.btn-danger  { background: rgba(204,51,51,.15); color: #ff6666; border: 1px solid rgba(204,51,51,.25); }
.btn-danger:hover  { background: rgba(204,51,51,.28); }
.btn-green   { background: rgba(76,175,118,.15); color: #4caf76; border: 1px solid rgba(76,175,118,.25); }
.btn-green:hover   { background: rgba(76,175,118,.28); }
.btn-outline { background: transparent; color: var(--gold); border: 1px solid var(--gold-dim); }
.btn-outline:hover { background: var(--gold-bg); }

.filter-group { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-btn {
  padding: 6px 14px; border-radius: 20px; border: 1px solid var(--border);
  background: transparent; color: var(--muted); cursor: pointer;
  font-size: 12px; font-weight: 600; font-family: var(--font);
  transition: all .15s;
}
.filter-btn:hover  { border-color: rgba(255,255,255,0.15); color: var(--cream); }
.filter-btn.active { background: var(--white-bg); border-color: var(--white-dim); color: #fff; }

/* ── MODALS ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.85);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  backdrop-filter: blur(4px);
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  width: 520px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
}
.modal h2 { font-family: var(--font-display); font-size: 24px; font-weight: 400; color: var(--cream); letter-spacing: .08em; margin-bottom: 20px; }

.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-row label { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.form-row input, .form-row select, .form-row textarea {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 13px;
  color: var(--cream);
  font-family: var(--font);
  font-size: 13px;
  outline: none;
  transition: border-color .15s;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  border-color: rgba(255,255,255,0.25);
}
.form-row-inline { display: flex; gap: 20px; align-items: center; margin-bottom: 14px; }
.form-row-inline label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; text-transform: none; letter-spacing: 0; }
.form-row-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); }

/* Upload zone */
.upload-zone {
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  transition: all .15s;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  background: var(--card);
}
.upload-zone:hover { border-color: rgba(255,255,255,0.2); color: var(--cream); }
.upload-zone.uploading { border-color: var(--gold); color: var(--gold); }

/* ── TOAST ───────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 20px;
  font-size: 13px;
  color: var(--cream);
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
  transform: translateY(80px);
  opacity: 0;
  transition: all .28s cubic-bezier(0.4,0,0.2,1);
  z-index: 200;
  max-width: 340px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.ok   { border-color: rgba(76,175,118,.4); }
.toast.err  { border-color: rgba(204,51,51,.4); }

/* ── UTILS ───────────────────────────────────────────────── */
.empty { text-align: center; padding: 48px; color: var(--muted); font-size: 13px; }
.tag {
  display: inline-block;
  padding: 2px 8px; border-radius: 20px;
  background: var(--gold-bg); border: 1px solid var(--gold-dim);
  color: var(--gold); font-size: 11px; font-weight: 600;
  margin: 2px;
}
.tag.urgent { background: rgba(204,51,51,.12); border-color: rgba(204,51,51,.25); color: #ff6666; }
.tag.info   { background: rgba(100,100,200,.12); border-color: rgba(100,100,200,.25); color: #8888ff; }
.tag.pinned { background: var(--gold-bg); border-color: var(--gold-dim); color: var(--gold); }

.badge-status { padding: 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-status.pending   { background: rgba(204,51,51,.18); color: #ff6666; }
.badge-status.confirmed { background: rgba(76,175,118,.18); color: #4caf76; }
.badge-status.cancelled { background: var(--border); color: var(--muted); }

.loading { color: var(--muted); font-size: 13px; padding: 24px 0; text-align: center; }

select option { background: var(--card); }

/* ── LOGOUT ──────────────────────────────────────────────── */
.logout-btn {
  margin-top: auto;
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 12px;
  font-family: var(--font);
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: all .15s;
}
.logout-btn:hover { border-color: rgba(204,51,51,.4); color: #ff6666; }

/* ── MOBILE RESPONSIVE ───────────────────────────────────── */
.mobile-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  z-index: 50;
}
.mobile-header img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(255,255,255,0.2); }
.mobile-header-title { flex: 1; font-family: var(--font-display); font-size: 17px; font-weight: 400; color: var(--cream); letter-spacing: .1em; }
.hamburger {
  background: none; border: none; cursor: pointer;
  color: var(--cream); font-size: 22px; padding: 6px; line-height: 1; flex-shrink: 0;
}
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.75); z-index: 80;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.visible { display: block; }

@media (max-width: 767px) {
  body { overflow: auto; height: auto; flex-direction: column; }
  .mobile-header { display: flex; }
  .sidebar {
    position: fixed;
    top: 0; bottom: 0; left: -260px;
    z-index: 90;
    transition: left .22s ease;
    overflow-y: auto;
    width: 224px;
    padding-top: 20px;
  }
  .sidebar.open { left: 0; }
  .content {
    padding: 16px;
    padding-top: calc(56px + 16px);
    width: 100%;
    min-height: 100vh;
    overflow-y: auto;
  }
  .quick-card { flex-direction: column; align-items: stretch; }
  .quick-card .btn { width: 100%; }
  .tab-header { flex-direction: column; align-items: flex-start; gap: 10px; border-bottom: none; padding-bottom: 0; }
  .tab-header h1 { font-size: 24px; }
  .flash-grid { grid-template-columns: repeat(2, 1fr); }
  .booking-card { grid-template-columns: 1fr; }
  .modal { width: 100%; max-width: 100%; margin: 0; border-radius: 16px 16px 0 0; position: fixed; bottom: 0; max-height: 90vh; }
  .modal-overlay { align-items: flex-end; }
  .form-row-cols { grid-template-columns: 1fr; }
}

/* ── PORTFOLIO SLOTS ─────────────────────────────────────── */
.portfolio-slots {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.portfolio-slot {
  width: 90px; height: 90px;
  border-radius: 10px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.portfolio-slot img { width: 100%; height: 100%; object-fit: cover; }
.portfolio-slot.empty {
  display: flex; align-items: center; justify-content: center;
  color: rgba(240,226,192,0.12); font-size: 12px;
  background: var(--card);
}
.portfolio-delete {
  position: absolute; top: 4px; right: 4px;
  background: rgba(0,0,0,0.75); color: var(--cream);
  border: none; border-radius: 50%;
  width: 20px; height: 20px;
  font-size: 10px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.portfolio-delete:hover { background: var(--danger); }
.portfolio-add {
  height: 90px; padding: 0 16px;
  background: var(--gold-bg);
  border: 1px dashed var(--gold-dim);
  border-radius: 10px;
  color: var(--gold); font-size: 12px; font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .15s;
}
.portfolio-add:hover { border-color: var(--gold); }

/* ── DRAG & DROP (order sections) ────────────────────────── */
.sort-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: grab;
  user-select: none;
  transition: opacity 0.2s, border-color 0.15s, background 0.15s;
}
.sort-item:active { cursor: grabbing; }
.sort-item.dragging  { opacity: 0.35; }
.sort-item.drag-over { border-color: var(--gold-dim); background: var(--gold-bg); }
.drag-handle { color: var(--muted); font-size: 20px; line-height: 1; flex-shrink: 0; }
.sort-item-label { font-size: 14px; font-weight: 600; color: var(--cream); flex: 1; }
.sort-item-desc  { font-size: 12px; color: var(--muted); margin-top: 1px; }

/* Toggle switch */
.toggle-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--border); border-radius: 26px;
  transition: background 0.25s;
}
.toggle-slider:before {
  content: ''; position: absolute;
  width: 20px; height: 20px; left: 3px; bottom: 3px;
  background: var(--muted); border-radius: 50%;
  transition: transform 0.25s, background 0.25s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--gold); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(20px); background: #000; }
