/* ═══════════════════════════════════════════════════════════════════════
   G-Agenda — Stylesheet
   Visual identity: GoldenHub / Golden Fox
   ═══════════════════════════════════════════════════════════════════════ */

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

:root {
  --gold:         #C59C5A;
  --gold-light:   #F8E7BE;
  --gold-dim:     #B17C3F;
  --gold-bright:  #E8C070;
  --bg:           #060608;
  --surface:      #0d0d10;
  --surface-2:    #161619;
  --surface-3:    #1e1e22;
  --border:       rgba(177, 124, 63, 0.18);
  --border-active:rgba(197, 156, 90, 0.45);
  --text:         #F0EDE8;
  --text-muted:   #9A9490;
  --text-dim:     #6a6560;
  --success:      #4ade80;
  --error:        #f87171;
  --warning:      #fbbf24;
  --radius:       16px;
  --radius-sm:    10px;
  --radius-xs:    6px;
  --shadow:       0 8px 32px rgba(0,0,0,.45);
  --shadow-sm:    0 2px 12px rgba(0,0,0,.3);
  --metal-grad:   linear-gradient(90deg, #e8c45b 0%, #9f7f2f 28%, #f8e7be 52%, #e8c45b 76%, #9f7f2f 100%);
  --glow:         0 0 20px rgba(197, 156, 90, 0.15);
  --transition:   .25s cubic-bezier(.4,0,.2,1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Raleway', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-bright); }

/* ─── Layout ───────────────────────────────────────────────────────── */
.container {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 16px;
}

.container--wide { max-width: 900px; }

/* ─── Header ───────────────────────────────────────────────────────── */
.header {
  text-align: center;
  padding: 40px 0 24px;
}

.header__logo {
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 12px rgba(197, 156, 90, 0.3));
}

.header__title {
  font-size: 1.5rem;
  background: var(--metal-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.header__subtitle {
  color: var(--text-muted);
  font-size: .95rem;
  font-weight: 400;
}

/* ─── Card ─────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.card--glow {
  box-shadow: var(--shadow), var(--glow);
}

.card__title {
  font-size: 1.1rem;
  color: var(--gold-light);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card__title i { color: var(--gold); font-size: 1rem; }

/* ─── Steps Indicator ──────────────────────────────────────────────── */
.steps {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
}

.steps__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.steps__dot--active {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 8px rgba(197, 156, 90, 0.4);
}

.steps__dot--done {
  background: var(--gold-dim);
  border-color: var(--gold-dim);
}

/* ─── Calendar ─────────────────────────────────────────────────────── */
.calendar { user-select: none; }

.calendar__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.calendar__month {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  text-transform: capitalize;
}

.calendar__btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  font-size: .85rem;
}

.calendar__btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(197, 156, 90, 0.08);
}

.calendar__btn:disabled {
  opacity: .3;
  cursor: not-allowed;
}

.calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar__weekday {
  text-align: center;
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 4px 0 8px;
  font-family: 'Montserrat', sans-serif;
}

.calendar__day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  font-size: .88rem;
  font-weight: 500;
  cursor: default;
  color: var(--text-dim);
  transition: all var(--transition);
  position: relative;
  border: 1px solid transparent;
}

.calendar__day--empty { visibility: hidden; }

.calendar__day--available {
  color: var(--text);
  cursor: pointer;
  background: var(--surface-2);
  border-color: var(--border);
}

.calendar__day--available:hover {
  border-color: var(--gold);
  background: rgba(197, 156, 90, 0.1);
  color: var(--gold-light);
}

.calendar__day--selected {
  background: var(--gold) !important;
  color: var(--bg) !important;
  border-color: var(--gold) !important;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(197, 156, 90, 0.35);
}

.calendar__day--today::after {
  content: '';
  position: absolute;
  bottom: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
}

/* ─── Time Slots ───────────────────────────────────────────────────── */
.slots { display: flex; flex-direction: column; gap: 8px; }

.slots__empty {
  text-align: center;
  color: var(--text-muted);
  padding: 32px 0;
  font-size: .9rem;
}

.slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.slot:hover {
  border-color: var(--gold);
  background: rgba(197, 156, 90, 0.06);
}

.slot--selected {
  border-color: var(--gold) !important;
  background: rgba(197, 156, 90, 0.12) !important;
  box-shadow: 0 0 12px rgba(197, 156, 90, 0.15);
}

.slot__time {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}

.slot__duration {
  font-size: .78rem;
  color: var(--text-muted);
}

.slot__arrow {
  color: var(--gold);
  opacity: 0;
  transition: opacity var(--transition);
  font-size: .85rem;
}

.slot:hover .slot__arrow,
.slot--selected .slot__arrow { opacity: 1; }

/* ─── Form ─────────────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.form-group label .required {
  color: var(--gold);
  margin-left: 2px;
}

.form-control {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text);
  font-family: 'Raleway', sans-serif;
  font-size: .92rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(197, 156, 90, 0.12);
}

.form-control::placeholder { color: var(--text-dim); }

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

/* ─── Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.btn--primary {
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
}

.btn--primary:hover {
  background: var(--gold-bright);
  box-shadow: 0 4px 20px rgba(197, 156, 90, 0.3);
}

.btn--primary:active { transform: scale(.98); }

.btn--primary:disabled {
  opacity: .4;
  cursor: not-allowed;
  box-shadow: none;
}

.btn--outline {
  background: transparent;
  color: var(--gold);
  border-color: var(--border);
}

.btn--outline:hover {
  border-color: var(--gold);
  background: rgba(197, 156, 90, 0.06);
}

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 8px 16px;
}

.btn--ghost:hover { color: var(--gold); }

.btn--sm { padding: 8px 16px; font-size: .8rem; }

.btn--block { width: 100%; }

.btn--danger {
  background: transparent;
  color: var(--error);
  border-color: rgba(248, 113, 113, 0.3);
}
.btn--danger:hover { background: rgba(248, 113, 113, 0.08); }

/* ─── Confirmation ─────────────────────────────────────────────────── */
.confirmation {
  text-align: center;
  padding: 20px 0;
}

.confirmation__icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.1);
  border: 2px solid var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 2rem;
  color: var(--success);
}

.confirmation__title {
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: var(--gold-light);
}

.confirmation__subtitle {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: .92rem;
}

.confirmation__detail {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 0;
  color: var(--text);
  font-size: .92rem;
}

.confirmation__detail i { color: var(--gold); width: 18px; }

.confirmation__meet {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.25);
  border-radius: var(--radius-sm);
  color: var(--success);
  font-weight: 600;
  margin-top: 16px;
  transition: all var(--transition);
  font-family: 'Montserrat', sans-serif;
}

.confirmation__meet:hover {
  background: rgba(74, 222, 128, 0.14);
}

/* ─── Back Link ────────────────────────────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: .85rem;
  margin-bottom: 16px;
  cursor: pointer;
  transition: color var(--transition);
}

.back-link:hover { color: var(--gold); }

/* ─── Selected Info Bar ────────────────────────────────────────────── */
.selected-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(197, 156, 90, 0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: .88rem;
}

.selected-info i { color: var(--gold); }
.selected-info strong { color: var(--gold-light); font-family: 'Montserrat', sans-serif; }

/* ─── Loading Spinner ──────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(197, 156, 90, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}

.spinner--lg { width: 40px; height: 40px; border-width: 3px; }

@keyframes spin { to { transform: rotate(360deg); } }

.loading-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 0;
  color: var(--text-muted);
  font-size: .9rem;
}

/* ─── Step Panels (show/hide) ──────────────────────────────────────── */
.step-panel {
  display: none;
  animation: fadeSlideUp .35s ease;
}

.step-panel--active { display: block; }

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Footer ───────────────────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 32px 0 20px;
  color: var(--text-dim);
  font-size: .75rem;
}

.footer a { color: var(--gold-dim); }

/* ─── Toast Notification ───────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  color: var(--text);
  font-size: .88rem;
  box-shadow: var(--shadow);
  z-index: 9999;
  opacity: 0;
  transition: all .3s ease;
  pointer-events: none;
}

.toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast--error { border-color: rgba(248, 113, 113, 0.4); }
.toast--success { border-color: rgba(74, 222, 128, 0.4); }

/* ═══════════════════════════════════════════════════════════════════════
   ADMIN STYLES
   ═══════════════════════════════════════════════════════════════════════ */

/* Login */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 380px;
}

/* Admin Layout */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  display: flex;
  flex-direction: column;
}

.admin-sidebar__logo {
  padding: 0 20px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.admin-sidebar__logo h2 {
  font-size: 1rem;
  background: var(--metal-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.admin-sidebar__logo small { color: var(--text-dim); font-size: .72rem; }

.admin-nav { list-style: none; flex: 1; }

.admin-nav__item {
  padding: 11px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: .88rem;
  cursor: pointer;
  transition: all var(--transition);
  border-left: 3px solid transparent;
}

.admin-nav__item:hover {
  color: var(--text);
  background: rgba(197, 156, 90, 0.04);
}

.admin-nav__item--active {
  color: var(--gold-light);
  background: rgba(197, 156, 90, 0.06);
  border-left-color: var(--gold);
}

.admin-nav__item i { width: 18px; text-align: center; font-size: .9rem; }

.admin-sidebar__footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.admin-main {
  padding: 32px;
  overflow-y: auto;
}

.admin-main__title {
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.admin-main__subtitle {
  color: var(--text-muted);
  font-size: .88rem;
  margin-bottom: 28px;
}

/* Admin Cards */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
}

.stat-card__label {
  font-size: .75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  margin-bottom: 8px;
}

.stat-card__value {
  font-size: 1.6rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: var(--gold-light);
}

.stat-card__value--sm { font-size: 1rem; }

/* Admin Table */
.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  text-align: left;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: .75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 12px 14px;
  font-size: .88rem;
  border-bottom: 1px solid rgba(255,255,255,.04);
  color: var(--text);
}

.admin-table tr:hover td {
  background: rgba(197, 156, 90, 0.03);
}

/* Status badge */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.badge--confirmed { background: rgba(74, 222, 128, 0.12); color: var(--success); }
.badge--cancelled { background: rgba(248, 113, 113, 0.12); color: var(--error); }

/* Config Form */
.config-section {
  margin-bottom: 28px;
}

.config-section__title {
  font-size: .95rem;
  color: var(--gold-light);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.config-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 12px;
}

.config-row--full { grid-template-columns: 1fr; }

/* Google Status */
.google-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.google-status__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.google-status__dot--on  { background: var(--success); box-shadow: 0 0 8px rgba(74, 222, 128, 0.4); }
.google-status__dot--off { background: var(--error); }

/* Day Toggles */
.day-toggles {
  display: flex;
  gap: 6px;
}

.day-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: .78rem;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.day-toggle:hover { border-color: var(--gold); }

.day-toggle--active {
  background: rgba(197, 156, 90, 0.15);
  border-color: var(--gold);
  color: var(--gold-light);
}

/* Blocked date item */
.blocked-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  margin-bottom: 8px;
  font-size: .88rem;
}

.blocked-item__date {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  color: var(--gold-light);
}

.blocked-item__reason { color: var(--text-muted); margin-left: 12px; }

/* ─── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: fixed;
    top: 0;
    left: -260px;
    width: 260px;
    height: 100vh;
    z-index: 1000;
    transition: left .3s ease;
  }

  .admin-sidebar--open { left: 0; }

  .admin-sidebar__overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 999;
  }

  .admin-sidebar--open ~ .admin-sidebar__overlay { display: block; }

  .admin-main { padding: 20px 16px; }

  .config-row { grid-template-columns: 1fr; }

  .admin-grid { grid-template-columns: 1fr 1fr; }

  .mobile-menu-btn {
    display: flex !important;
  }
}

@media (max-width: 480px) {
  .container { padding: 16px 12px; }
  .header { padding: 24px 0 16px; }
  .header__title { font-size: 1.25rem; }
  .card { padding: 20px 16px; }
  .admin-grid { grid-template-columns: 1fr; }
}

/* ─── Mobile menu btn (hidden by default) ──────────────────────────── */
.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 998;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-xs);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
}

/* ─── Utility ──────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.text-gold   { color: var(--gold); }
.text-sm     { font-size: .82rem; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.gap-8 { gap: 8px; }
.flex  { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.hidden { display: none !important; }
