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

:root {
  --camel: #B08D57;
  --camel-light: #E8D9B8;
  --camel-pale: #F5EDE0;
  --camel-dark: #7A6238;
  --ink: #1A1714;
  --ink-mid: #4A4540;
  --ink-muted: #8A857F;
  --ink-faint: #C8C3BC;
  --parchment: #FAF8F5;
  --surface: #FFFFFF;
  --border: #E2DDD6;
  --border-mid: #C8C3BC;
  --success: #2D6A2D;
  --success-bg: #F0F7F0;
  --warning-bg: #FDF5E8;
  --warning: #7A5A1A;
  --danger: #8A3A3A;
  --danger-bg: #FFF0F0;
  --info-bg: #E8F0F7;
  --info: #1A4A7A;
}

html, body {
  height: 100%;
  font-family: 'DM Sans', sans-serif;
  background: var(--ink);
  color: var(--ink);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

/* ── SCREENS ── */
.screen { min-height: 100vh; }

/* ── LOGIN ── */
.screen-login {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  padding: 24px;
}

.login-box {
  width: 380px;
  background: var(--surface);
  border-radius: 14px;
  padding: 40px 36px;
  border: 1px solid var(--border);
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin-bottom: 6px;
}

.login-logo-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 34px;
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.login-tagline {
  text-align: center;
  font-size: 10px;
  color: var(--camel);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 28px;
}

.login-event {
  background: var(--camel-pale);
  border: 1px solid var(--camel-light);
  border-radius: 8px;
  padding: 14px 16px;
  text-align: center;
  margin-bottom: 22px;
}

.login-event-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-style: italic;
  color: var(--ink);
  margin-bottom: 3px;
}

.login-event-meta {
  font-size: 11px;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.login-error {
  font-size: 12px;
  color: var(--danger);
  background: var(--danger-bg);
  border: 1px solid #F0C0C0;
  border-radius: 6px;
  padding: 9px 12px;
  margin-bottom: 14px;
}

.login-input {
  display: block;
  width: 100%;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--border-mid);
  border-radius: 8px;
  padding: 11px 12px;
  margin-bottom: 12px;
  transition: border-color 0.15s;
}
.login-input:focus { outline: none; border-color: var(--camel); }

.login-btn {
  width: 100%;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  background: var(--camel);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s;
}
.login-btn:hover { background: #9A7A48; }

.login-loading {
  text-align: center;
  font-size: 13px;
  color: var(--ink-muted);
  padding: 10px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ── REVOKED ── */
.screen-revoked {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
}

.revoked-box {
  width: 320px;
  background: var(--surface);
  border-radius: 14px;
  padding: 44px 32px;
  text-align: center;
}

.revoked-icon {
  font-size: 40px;
  color: var(--ink-faint);
  margin-bottom: 16px;
  display: block;
}

.revoked-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-style: italic;
  color: var(--ink);
  margin-bottom: 10px;
}

.revoked-sub {
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.7;
}

/* ── APP HEADER ── */
.app-header {
  background: var(--ink);
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.06em;
  color: #fff;
  line-height: 1;
}

.header-byline {
  font-size: 9px;
  color: rgba(176,141,87,0.85);
  letter-spacing: 0.07em;
  margin-top: 1px;
}

.header-center {
  display: flex;
  align-items: center;
  gap: 10px;
}

.event-badge {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 20px;
  padding: 3px 10px;
}

.header-event-name {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.role-badge {
  font-size: 10px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.04em;
}

.role-badge.admin {
  background: rgba(176,141,87,0.22);
  color: #E8C97A;
  border: 1px solid rgba(176,141,87,0.4);
}

.role-badge.client {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.45);
  border: 1px solid rgba(255,255,255,0.14);
}

.btn-header {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  background: var(--camel);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 7px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background 0.15s;
}
.btn-header:hover { background: #9A7A48; }

.btn-logout {
  background: transparent;
  color: rgba(255,255,255,0.4);
  border: 1px solid rgba(255,255,255,0.15);
  font-size: 12px;
}
.btn-logout:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* ── LAYOUT ── */
.app-layout {
  display: flex;
  height: calc(100vh - 58px);
}

/* ── SIDEBAR ── */
.sidebar {
  width: 216px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 18px 0;
}

.sidebar-event-info {
  padding: 0 16px 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}

.sidebar-event-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  font-style: italic;
  color: var(--ink);
  margin-bottom: 3px;
  line-height: 1.3;
}

.sidebar-event-date {
  font-size: 11px;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 10px 16px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  font-size: 13px;
  color: var(--ink-muted);
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: all 0.15s;
  user-select: none;
}
.nav-item:hover { background: #F5F3F0; color: var(--ink); }
.nav-item.active { color: var(--camel); background: var(--camel-pale); border-left-color: var(--camel); font-weight: 500; }
.nav-item i { font-size: 16px; }

/* ADMIN PANEL */
.admin-panel {
  margin: 14px 12px 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.admin-panel-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--camel);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.admin-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  padding: 7px 10px;
  cursor: pointer;
  margin-bottom: 6px;
  border: 1.5px solid;
  transition: background 0.15s;
  text-align: left;
}

.admin-btn-primary { background: var(--camel-pale); color: var(--camel-dark); border-color: var(--camel-light); }
.admin-btn-primary:hover { background: var(--camel-light); }
.admin-btn-warn { background: var(--warning-bg); color: var(--warning); border-color: #E8D0A0; }
.admin-btn-warn:hover { background: #FAF0D8; }
.admin-btn-danger { background: var(--danger-bg); color: var(--danger); border-color: #F0C0C0; }
.admin-btn-danger:hover { background: #FFE8E8; }

/* PROGRESS */
.sidebar-progress {
  margin: auto 16px 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.progress-label {
  font-size: 11px;
  color: var(--ink-muted);
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.progress-pct { font-weight: 500; color: var(--camel); }

.progress-track {
  background: #F0ECE6;
  border-radius: 4px;
  height: 3px;
}

.progress-fill {
  background: var(--camel);
  height: 3px;
  border-radius: 4px;
  transition: width 0.4s ease;
}

/* ── MAIN ── */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
  background: var(--parchment);
}

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

/* ── SECTION HEADER ── */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 22px;
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 300;
  font-style: italic;
  color: var(--ink);
}

.section-sub {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 2px;
}

.btn-add {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--ink-mid);
  border-radius: 6px;
  padding: 7px 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-add:hover { background: #F0EDE8; }

/* ── STATS ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
}

.stat-label { font-size: 11px; color: var(--ink-muted); margin-bottom: 6px; }
.stat-value { font-size: 24px; font-weight: 500; color: var(--ink); line-height: 1; }
.stat-sub { font-size: 11px; color: var(--ink-muted); margin-top: 3px; }

/* ── DASH GRID ── */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}

.card-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

/* ── TIMELINE ── */
.timeline-phase {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}

.phase-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--ink);
}

.phase-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--camel); flex-shrink: 0; }
.phase-name { font-weight: 500; font-size: 13px; color: #fff; flex: 1; letter-spacing: 0.02em; }
.phase-meta { font-size: 12px; color: rgba(255,255,255,0.4); }

.tl-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.tl-item:last-child { border-bottom: none; }

.tl-time {
  width: 44px;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--camel);
  text-align: right;
  padding-top: 2px;
}

.tl-dot-col {
  width: 16px;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.tl-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--camel); }

.tl-body { flex: 1; }

.tl-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cat-tag {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 20px;
}

.tl-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }

.meta-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--ink-muted);
  background: #F5F3F0;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 8px;
}
.meta-chip i { font-size: 12px; color: var(--camel); }

.tl-obs {
  margin-top: 8px;
  background: var(--camel-pale);
  border-left: 2px solid var(--camel);
  border-radius: 0 4px 4px 0;
  padding: 6px 10px;
  font-size: 11px;
  color: var(--ink-mid);
  font-style: italic;
  line-height: 1.55;
}

.tl-obs-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--camel-dark);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 2px;
  font-style: normal;
}

.tl-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.btn-icon {
  background: none;
  border: none;
  color: var(--ink-faint);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  font-size: 16px;
  transition: color 0.15s;
}
.btn-icon:hover { color: var(--ink); background: #F0EDE8; }
.btn-icon.danger:hover { color: var(--danger); background: var(--danger-bg); }

/* ── PROVIDERS ── */
.providers-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.provider-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}

.provider-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}

.provider-info { display: flex; align-items: center; gap: 10px; }

.provider-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--camel-pale);
  flex-shrink: 0;
  font-size: 18px;
  color: var(--camel);
}

.provider-name { font-size: 13px; font-weight: 500; color: var(--ink); margin-bottom: 2px; }
.provider-cat { font-size: 11px; color: var(--ink-muted); }

.status-pill {
  font-size: 10px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
}

.s-confirmed { background: var(--success-bg); color: var(--success); }
.s-pending { background: var(--warning-bg); color: var(--warning); }
.s-contacted { background: var(--info-bg); color: var(--info); }

.provider-detail {
  font-size: 11px;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 3px;
}

.provider-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.price-label { font-size: 11px; font-weight: 400; color: var(--ink-muted); }

/* ── GUESTS ── */
.guests-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.guests-filters { display: flex; gap: 7px; flex-wrap: wrap; }

.filter-chip {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1.5px solid var(--border-mid);
  background: var(--surface);
  color: var(--ink-mid);
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 5px;
}
.filter-chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.rsvp-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.rsvp-dot.confirmed { background: #4A8A4A; }
.rsvp-dot.pending { background: #C4882A; }
.rsvp-dot.declined { background: var(--danger); }

.csv-actions { display: flex; gap: 8px; }

.btn-import {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-import:hover { background: #F0EDE8; }

.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  background: var(--camel);
  color: #fff;
  border: 2px solid var(--camel);
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-export:hover { background: #9A7A48; border-color: #9A7A48; }

.guests-count {
  font-size: 12px;
  color: var(--ink-muted);
  margin-bottom: 12px;
}
.guests-count strong { color: var(--ink); }

.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.guests-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.guests-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: #F8F6F2;
  border-bottom: 1px solid var(--border);
}

.guests-table td {
  padding: 10px 14px;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
}

.guests-table tr:last-child td { border-bottom: none; }
.guests-table tr:hover td { background: #FAF8F5; }

.mesa-tag {
  font-size: 10px;
  background: #F0EDE8;
  color: var(--ink-mid);
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid var(--border-mid);
}

/* ── EMPTY STATE ── */
.empty-state {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 56px;
  text-align: center;
  color: var(--ink-muted);
}
.empty-state i { font-size: 32px; display: block; margin-bottom: 12px; opacity: 0.3; }

/* ── MODAL ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,23,20,0.55);
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 16px;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 28px;
  width: 460px;
  max-width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 300;
  font-style: italic;
  color: var(--ink);
  margin-bottom: 20px;
}

.modal-body {
  font-size: 13px;
  color: var(--ink-mid);
  line-height: 1.65;
  margin-bottom: 20px;
}

.form-row { margin-bottom: 14px; }

.form-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-muted);
  margin-bottom: 5px;
  display: block;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.form-input {
  width: 100%;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--border-mid);
  border-radius: 6px;
  padding: 9px 11px;
  transition: border-color 0.15s;
}
.form-input:focus { outline: none; border-color: var(--camel); }

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

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.form-sep {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--camel);
  border-top: 1px solid var(--camel-light);
  padding-top: 12px;
  margin: 16px 0 12px;
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 20px;
}

.btn-cancel {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  background: transparent;
  color: var(--ink-muted);
  border: 1.5px solid var(--border-mid);
  border-radius: 6px;
  padding: 9px 18px;
  cursor: pointer;
}
.btn-cancel:hover { background: #F5F3F0; }

.btn-save {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  background: var(--camel);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 9px 18px;
  cursor: pointer;
}
.btn-save:hover { background: #9A7A48; }

.btn-danger-confirm {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 9px 18px;
  cursor: pointer;
}
.btn-danger-confirm:hover { background: #6A2A2A; }

/* EVENTS LIST IN MODAL */
.events-list { display: flex; flex-direction: column; gap: 8px; }

.event-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #F8F6F2;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}

.event-row-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 2px;
}

.event-row-meta { font-size: 11px; color: var(--ink-muted); }

.event-row-actions { display: flex; gap: 6px; }

/* ── TOAST ── */
.toast {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  padding: 11px 22px;
  border-radius: 8px;
  z-index: 999;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  display: none;
  align-items: center;
  gap: 8px;
}

/* ── AUTOSAVE INDICATOR ── */
.autosave {
  position: fixed;
  bottom: 16px;
  right: 16px;
  font-size: 11px;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  opacity: 0;
  transition: opacity 0.3s;
}
.autosave.visible { opacity: 1; }
.autosave i { font-size: 14px; color: var(--success); }

/* ── UTILITIES ── */
.spin {
  display: inline-block;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.saving-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--camel);
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ── PHOTO UPLOAD ── */
.photo-upload-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: var(--camel-pale);
  border: 1.5px dashed var(--camel);
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--camel-dark);
  justify-content: center;
  transition: background 0.15s;
}
.photo-upload-btn:hover { background: var(--camel-light); }

/* ── EVENT ROW ACTION BUTTONS ── */
.event-row { align-items: center; }
.event-row-actions { display: flex; gap: 6px; flex-shrink: 0; }

.btn-event-open {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 6px; border: 1.5px solid #B08D57;
  background: #F5EDE0; color: #B08D57; cursor: pointer; font-size: 16px;
}
.btn-event-open:hover { background: #B08D57; color: #fff; }

.btn-event-revoke {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 6px; border: 1.5px solid #C4882A;
  background: #FDF5E8; color: #C4882A; cursor: pointer; font-size: 16px;
}
.btn-event-revoke:hover { background: #C4882A; color: #fff; }

.btn-event-delete {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 6px; border: 1.5px solid #8A3A3A;
  background: #FFF0F0; color: #8A3A3A; cursor: pointer; font-size: 16px;
}
.btn-event-delete:hover { background: #8A3A3A; color: #fff; }

/* ── RESPONSIVE MÓVIL ── */
@media (max-width: 768px) {

  /* Header */
  .app-header { padding: 0 14px; height: 52px; }
  .header-logo-text { font-size: 22px; }
  .header-byline { display: none; }
  .header-center { display: none; }
  .btn-header { font-size: 11px; padding: 6px 10px; }
  .btn-logout span { display: none; }

  /* Layout: sidebar se convierte en barra inferior */
  .app-layout { flex-direction: column; height: auto; min-height: calc(100vh - 52px); }

  .sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 0;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 40;
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: none;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
  }

  .sidebar-event-info { display: none; }
  .nav-section-label { display: none; }
  .admin-panel { display: none !important; }
  .sidebar-progress { display: none; }
  .sidebar-photo-wrap { display: none !important; }

  .nav-item {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 8px 12px;
    font-size: 10px;
    border-left: none;
    border-top: 2px solid transparent;
    flex-shrink: 0;
    min-width: 64px;
  }
  .nav-item i { font-size: 20px; }
  .nav-item.active {
    border-left: none;
    border-top-color: var(--camel);
    background: var(--camel-pale);
  }

  /* Main content */
  .main-content {
    padding: 16px;
    padding-bottom: 80px; /* espacio para nav bar */
    height: auto;
    overflow-y: auto;
  }

  /* Stats: 2 columnas en móvil */
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-value { font-size: 20px; }

  /* Dashboard grid: 1 columna */
  .dash-grid { grid-template-columns: 1fr; }

  /* Providers: 1 columna */
  .providers-grid { grid-template-columns: 1fr; }

  /* Section header: stack */
  .section-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .section-title { font-size: 20px; }

  /* Guests toolbar: stack */
  .guests-toolbar { flex-direction: column; align-items: flex-start; }
  .csv-actions { width: 100%; justify-content: stretch; }
  .btn-import, .btn-export { flex: 1; justify-content: center; }

  /* Table: scroll horizontal */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .guests-table { min-width: 480px; }

  /* Modal: full width en móvil */
  .modal { width: 100%; max-width: 100%; border-radius: 12px 12px 0 0; position: fixed; bottom: 0; left: 0; max-height: 90vh; }
  .modal-overlay { align-items: flex-end; padding: 0; }

  /* Login */
  .login-box { width: 100%; max-width: 400px; padding: 32px 24px; }

  /* Hero photo */
  #dash-photo { max-height: 160px; }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .header-right { gap: 6px; }
  .btn-header { padding: 5px 8px; font-size: 11px; }
  .event-badge { display: none; }
}

/* ── COUNTDOWN ── */
.countdown-unit {
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 12px 6px 10px;
}
.countdown-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 42px;
  font-weight: 300;
  color: #B08D57;
  line-height: 1;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}
.countdown-lbl {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}

@media (max-width: 480px) {
  .countdown-num { font-size: 32px; }
  .countdown-lbl { font-size: 9px; }
  #countdown-active { padding: 16px 10px; }
}
