/* ── RESET & ROOT ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --purple: #534AB7; --purple-light: #EEEDFE; --purple-mid: #AFA9EC;
  --teal: #0F6E56;   --teal-light: #E1F5EE;
  --coral: #993C1D;  --coral-light: #FAECE7;
  --pink: #993556;   --pink-light: #FBEAF0;
  --amber: #854F0B;  --amber-light: #FAEEDA;
  --blue-light: #E6F1FB; --green-light: #EAF3DE;
  --text: #1a1a2e; --text-m: #6b6b8a; --text-f: #a0a0b8;
  --bg: #f5f4fc; --card: #ffffff;
  --border: rgba(83,58,183,0.12); --border-h: rgba(83,58,183,0.3);
}
html, body { min-height: 100%; }
body { font-family: 'DM Sans', sans-serif; background: var(--bg); color: var(--text); }

/* ── DARK MODE ── */
body.dark {
  --purple: #7B72D8; --purple-light: #2a2650; --purple-mid: #5a53a0;
  --teal: #1D9E75; --teal-light: #0d2e24;
  --coral: #D85A30; --coral-light: #2e1a10;
  --pink: #D4537E; --pink-light: #2e1020;
  --amber: #EF9F27; --amber-light: #2e2008;
  --blue-light: #0d1e30; --green-light: #0e2010;
  --text: #e8e6f8; --text-m: #9990cc; --text-f: #5a5480;
  --bg: #12111e; --card: #1c1a2e;
  --border: rgba(123,114,216,0.18); --border-h: rgba(123,114,216,0.4);
}

/* ── ROOM COLOR CLASSES ── */
.ri-purple { background: var(--purple-light); }
.ri-teal   { background: var(--teal-light); }
.ri-coral  { background: var(--coral-light); }
.ri-pink   { background: var(--pink-light); }
.ri-blue   { background: var(--blue-light); }
.ri-amber  { background: var(--amber-light); }
.ri-green  { background: var(--green-light); }

.ev-purple { background: var(--purple-light); color: var(--purple); }
.ev-teal   { background: var(--teal-light);   color: var(--teal); }
.ev-coral  { background: var(--coral-light);  color: var(--coral); }
.ev-pink   { background: var(--pink-light);   color: var(--pink); }
.ev-blue   { background: var(--blue-light);   color: #185FA5; }
.ev-amber  { background: var(--amber-light);  color: var(--amber); }
.ev-green  { background: var(--green-light);  color: var(--teal); }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: #1a1a2e; color: #fff; padding: 9px 22px; border-radius: 30px;
  font-size: 13px; opacity: 0; transition: opacity 0.3s; pointer-events: none;
  z-index: 9999; white-space: nowrap; box-shadow: 0 4px 20px rgba(0,0,0,0.18);
}
.toast.show { opacity: 1; }
.toast.error { background: #8B1A1A; }
.toast.success { background: #1D9E75; }

/* ── DARK TOGGLE ── */
.dark-toggle {
  position: fixed; bottom: 24px; left: 24px; z-index: 998;
  width: 40px; height: 40px; border-radius: 50%; background: var(--card);
  border: 1.5px solid var(--border); cursor: pointer; display: flex;
  align-items: center; justify-content: center; font-size: 18px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1); transition: all 0.2s;
}
.dark-toggle:hover { border-color: var(--purple); transform: scale(1.08); }

/* ── BACK BUTTON ── */
.back-btn {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px;
  font-weight: 500; color: var(--purple); background: var(--purple-light);
  border: 1.5px solid var(--purple-mid); border-radius: 10px; cursor: pointer;
  padding: 8px 16px; margin-bottom: 24px; transition: all 0.15s; font-family: 'DM Sans', sans-serif;
}
.back-btn:hover { background: var(--purple); color: #fff; border-color: var(--purple); }

/* ── FORM ELEMENTS ── */
.fg { margin-bottom: 14px; }
.fl { font-size: 12px; color: var(--text-m); margin-bottom: 5px; display: block; font-weight: 500; }
.fl .req { color: #D85A30; margin-left: 2px; }
.fi {
  width: 100%; border: 1.5px solid var(--border); border-radius: 10px;
  padding: 10px 13px; font-size: 14px; font-family: 'DM Sans', sans-serif;
  color: var(--text); background: var(--card); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.fi:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(83,74,183,0.08); }
.fi::placeholder { color: var(--text-f); }
body.dark .fi { background: #16152a; }
.fta { resize: none; height: 80px; }

/* ── BUTTONS ── */
.btn-primary {
  width: 100%; padding: 13px; background: var(--purple); color: #fff;
  border: none; border-radius: 12px; font-size: 15px; font-weight: 500;
  cursor: pointer; font-family: 'DM Sans', sans-serif;
  transition: opacity 0.15s, transform 0.1s; margin-top: 4px;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ── STEP BAR ── */
.step-bar { display: flex; align-items: center; margin-bottom: 28px; }
.sb-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.sb-circle {
  width: 28px; height: 28px; border-radius: 50%; background: #e8e6f8;
  color: var(--text-f); font-size: 11px; font-weight: 500;
  display: flex; align-items: center; justify-content: center; transition: all 0.3s;
}
.sb-circle.active { background: var(--purple); color: #fff; }
.sb-circle.done   { background: #1D9E75; color: #fff; }
.sb-label { font-size: 10px; color: var(--text-f); white-space: nowrap; }
.sb-label.active  { color: var(--purple); font-weight: 500; }
.sb-line { flex: 1; height: 1px; background: #e8e6f8; margin: 0 6px 14px; transition: background 0.3s; }
.sb-line.done { background: #1D9E75; }

/* ── ROOM CARD ── */
.room-card {
  border: 1.5px solid var(--border); border-radius: 14px; padding: 16px 18px;
  cursor: pointer; position: relative; transition: all 0.18s; background: var(--card);
  display: flex; align-items: center; gap: 16px;
}
.room-card:hover { border-color: var(--border-h); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(83,74,183,0.08); }
.ri {
  width: 42px; height: 42px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0;
}
.rname { font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 2px; }
.rcap  { font-size: 12px; color: var(--text-m); }
.arrow { margin-left: auto; color: var(--text-f); font-size: 18px; flex-shrink: 0; }

/* ── CALENDAR (shared) ── */
.cal-dh { display: grid; grid-template-columns: repeat(7,1fr); }
.cal-dl { font-size: 11px; color: var(--text-f); padding: 8px 0; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 1px; background: var(--border); }
.cal-day {
  background: var(--card); padding: 6px 8px; min-height: 100px;
  position: relative; cursor: pointer; transition: background 0.12s; overflow: hidden;
}
.cal-day:hover:not(.cal-day-empty):not(.cal-day-past) { background: #f8f7ff; }
.cal-day-empty { background: var(--bg); cursor: default; }
.cal-day-past  { opacity: 0.55; cursor: default; }
.cal-day-today .cal-day-num { background: var(--purple); color: #fff; border-radius: 50%; }
.cal-day-num {
  font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px;
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
}
.cal-events { display: flex; flex-direction: column; gap: 2px; }
.ev {
  font-size: 10px; padding: 2px 6px; border-radius: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500;
}
.ev-more { font-size: 10px; color: var(--text-m); padding: 1px 4px; }

/* ── SUMMARY BOX ── */
.summary-box {
  background: var(--purple-light); border-radius: 12px; padding: 14px 16px;
  margin-bottom: 20px; display: flex; align-items: center; gap: 14px;
}
.sum-icon { width: 44px; height: 44px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.sum-info { flex: 1; }
.sum-room { font-size: 14px; font-weight: 500; color: var(--purple); }
.sum-meta { font-size: 12px; color: var(--purple-mid); margin-top: 2px; }

/* ── SECTION TITLE ── */
.page-title { font-family: 'DM Serif Display', serif; font-size: 22px; color: var(--text); margin-bottom: 4px; }
.page-sub   { font-size: 13px; color: var(--text-m); margin-bottom: 24px; }

/* ── MOBILE ── */
@media (max-width: 700px) {
  .cal-day { min-height: 60px; }
  .ev { display: none; }
  .ev:first-child { display: block; }
}
