/* ===================================================================
   Raumbuchung – Hauptstylesheet  (Dark Theme – Grüne München)
   Farbwelt: tuer.grnmuc.de
   =================================================================== */

/* --- GrueneType Webfont ------------------------------------------ */
@font-face {
  font-display: swap;
  font-family: 'GrueneType';
  font-style: normal;
  font-weight: 600;
  src: url('fonts/GrueneType-Regular.woff') format('woff');
}

/* --- CSS Custom Properties --------------------------------------- */
:root {
  /* Exakte Farben von tuer.grnmuc.de */
  --bg:       #1a4543;
  --surface:  #235c59;
  --border:   #2f6f6c;
  --accent:   #32ff74;
  --accent2:  #00b8ff;
  --text:     #ffffff;
  --muted:    #c6c6c6;
  --danger:   #f06060;

  /* Aliase für Kompatibilität mit bestehendem Code */
  --primary:       #235c59;
  --primary-dark:  #1a4543;
  --primary-light: rgba(50,255,116,.15);

  --success:       #32ff74;
  --success-dark:  #1acc55;
  --success-light: rgba(50,255,116,.18);
  --warning:       #f59e0b;
  --warning-dark:  #b37710;
  --warning-light: rgba(245,158,11,.18);
  --danger-dark:   #c04040;
  --danger-light:  rgba(240,96,96,.18);
  --info:          #00b8ff;
  --info-light:    rgba(0,184,255,.18);

  /* Gray-Scale auf Dark-Basis */
  --gray-50:  #1a4543;   /* = --bg */
  --gray-100: #1a4543;   /* Seiten-BG */
  --gray-200: #235c59;   /* Karten-BG = --surface */
  --gray-300: #2f6f6c;   /* Borders = --border */
  --gray-400: #3d8a87;   /* Stärkere Akzente */
  --gray-500: #8aafad;   /* Gedämpft = zwischen muted/border */
  --gray-600: #c6c6c6;   /* Muted = --muted */
  --gray-700: #dde8e8;   /* Heller Nebentext */
  --gray-800: #f0f8f8;   /* Primärer Fließtext */
  --gray-900: #ffffff;   /* Überschriften = --text */

  --white: #ffffff;
  --black: #000000;

  --font:      system-ui, sans-serif;
  --font-head: 'GrueneType', sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, monospace;

  --radius-sm:  4px;
  --radius:     8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-pill: 100vw;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / .3);
  --shadow:    0 1px 4px 0 rgb(0 0 0 / .35);
  --shadow-md: 0 4px 10px -1px rgb(0 0 0 / .4);
  --shadow-lg: 0 10px 20px -3px rgb(0 0 0 / .5);

  --sidebar-width: 260px;
  --header-height: 68px;
}

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

html { font-size: 14px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { opacity: .8; text-decoration: none; }

img { max-width: 100%; height: auto; }
ul  { list-style: none; }

/* --- Typography -------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
}
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ===================================================================
   PUBLIC LAYOUT
   =================================================================== */

/* --- Site Header ------------------------------------------------- */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgb(0 0 0 / .4);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px 20px;
  height: var(--header-height);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-head);
  font-size: 23px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}

.site-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.site-logo:hover { opacity: .85; }

.header-admin-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: 8px 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  transition: border-color .15s, color .15s;
}
.header-admin-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
  opacity: 1;
}

/* --- Container --------------------------------------------------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* --- Page Navigation (Räume / Ausleihe) -------------------------- */
.page-nav {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.page-nav .container {
  display: flex;
  gap: 0;
  padding-top: 0;
  padding-bottom: 0;
}
.page-nav-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .7rem 1.25rem;
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
  text-decoration: none;
}
.page-nav-link:hover { color: var(--text); opacity: 1; text-decoration: none; }
.page-nav-link.active { color: var(--accent); border-bottom-color: var(--accent); }

/* --- Hero Section ------------------------------------------------ */
.hero {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 3rem 0 2.5rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.2rem;
  color: var(--text);
  margin-bottom: .6rem;
}

.hero p {
  font-size: 1rem;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto;
}

/* --- Flash Messages ---------------------------------------------- */
.flash {
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin: 1.5rem 0;
  font-size: .9rem;
  animation: slideDown .3s ease;
  border: 1px solid;
}
.flash-success {
  background: rgba(50,255,116,.12);
  color: var(--accent);
  border-color: rgba(50,255,116,.35);
}
.flash-error {
  background: rgba(240,96,96,.12);
  color: var(--danger);
  border-color: rgba(240,96,96,.35);
}
.flash-warning {
  background: rgba(245,158,11,.12);
  color: #fbbf24;
  border-color: rgba(245,158,11,.35);
}
.flash-info {
  background: rgba(0,184,255,.12);
  color: var(--accent2);
  border-color: rgba(0,184,255,.35);
}

.flash-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: .1rem; }
.flash-close {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  opacity: .5;
  padding: 0;
  line-height: 1;
  color: inherit;
}
.flash-close:hover { opacity: 1; }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Section Layout ---------------------------------------------- */
.section { padding: 2.5rem 0; }

.section-title {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--text);
}

/* ===================================================================
   ROOM CARDS
   =================================================================== */

.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.room-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  cursor: pointer;
  border: 1px solid var(--border);
}

.room-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.room-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(50,255,116,.2);
}

.room-card-header { height: 4px; }

.room-card-body { padding: 1.25rem 1.5rem; }

.room-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: .4rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--text);
}

.room-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.room-meta {
  display: flex;
  gap: 1rem;
  font-size: .78rem;
  color: var(--muted);
  margin-bottom: .75rem;
  flex-wrap: wrap;
  font-family: var(--font-mono);
}

.room-meta span {
  display: flex;
  align-items: center;
  gap: .3rem;
}

.room-description {
  font-size: .875rem;
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* ===================================================================
   BUTTONS
   =================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 500;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s, opacity .15s;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: .08em;
  background: none;
  color: var(--accent);
}

.btn:hover { text-decoration: none; border-color: var(--accent); }

.btn-primary {
  background: none;
  color: var(--accent);
  border-color: var(--border);
}
.btn-primary:hover {
  background: var(--accent);
  color: #0f0f0f;
  border-color: var(--accent);
}

.btn-success {
  background: none;
  color: var(--accent);
  border-color: rgba(50,255,116,.5);
}
.btn-success:hover {
  background: var(--accent);
  color: #0f0f0f;
  border-color: var(--accent);
}

.btn-danger {
  background: none;
  color: var(--danger);
  border-color: rgba(240,96,96,.5);
}
.btn-danger:hover {
  background: var(--danger);
  color: var(--white);
  border-color: var(--danger);
}

.btn-outline {
  background: none;
  color: var(--accent);
  border-color: var(--border);
}
.btn-outline:hover {
  background: var(--accent);
  color: #0f0f0f;
  border-color: var(--accent);
}

.btn-outline-danger {
  background: none;
  color: var(--danger);
  border-color: rgba(240,96,96,.4);
}
.btn-outline-danger:hover {
  background: var(--danger);
  color: var(--white);
  border-color: var(--danger);
}

.btn-ghost {
  background: var(--surface);
  color: var(--muted);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-sm  { padding: 5px 12px; font-size: .7rem; }
.btn-lg  { padding: 10px 24px; font-size: .85rem; }
.btn-full { width: 100%; }

.btn:disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: .3rem;
  color: var(--muted);
  border-radius: var(--radius-sm);
  line-height: 1;
  transition: color .15s;
}
.btn-icon:hover { color: var(--text); }

/* ===================================================================
   AVAILABILITY SECTION
   =================================================================== */

.availability-section {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-top: 2rem;
  overflow: hidden;
  animation: fadeIn .3s ease;
  border: 1px solid var(--border);
}

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

.availability-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.availability-header h2 {
  font-size: 1.1rem;
  color: var(--text);
}

/* --- Date Navigator ---------------------------------------------- */
.date-nav {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.date-nav-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: border-color .15s, color .15s;
}
.date-nav-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

#date-picker {
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: .4rem .9rem;
  font-size: .85rem;
  font-family: var(--font);
  cursor: pointer;
  background: var(--bg);
  color: var(--text);
  transition: border-color .15s;
  color-scheme: dark;
  outline: none;
}
#date-picker:focus { border-color: var(--accent); }

/* --- Day View Grid ----------------------------------------------- */
.day-view-container { padding: 1.5rem; }

.day-view-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  padding: 3rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .8rem;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}

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

.day-view {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.day-view-time {
  font-size: .7rem;
  color: var(--muted);
  font-family: var(--font-mono);
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  border-right: 1px solid var(--border);
  background: var(--bg);
  height: 36px;
}

.day-view-slot {
  height: 36px;
  border-bottom: 1px solid rgba(47,111,108,.4);
  cursor: pointer;
  position: relative;
  transition: filter .1s;
  display: flex;
  align-items: center;
  padding: 0 .6rem;
  font-size: .75rem;
  font-weight: 500;
  font-family: var(--font-mono);
}

.day-view-slot:last-child { border-bottom: none; }
.day-view-time:last-child { border-bottom: none; }

.day-view-slot.free {
  background: transparent;
  color: transparent;
}
.day-view-slot.free:hover {
  background: rgba(50,255,116,.06);
}

.day-view-slot.busy {
  background: rgba(240,96,96,.15);
  color: var(--danger);
  cursor: default;
}

.day-view-slot.pending {
  background: rgba(245,158,11,.15);
  color: #fbbf24;
  cursor: default;
}

.day-view-slot.confirmed {
  background: rgba(50,255,116,.15);
  color: var(--accent);
  cursor: default;
}

.slot-label {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: .72rem;
}

/* --- Legend ------------------------------------------------------ */
.availability-legend {
  display: flex;
  gap: 1rem;
  padding: 0 1.5rem 1rem;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .75rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  flex-shrink: 0;
}
.legend-dot.free      { background: rgba(50,255,116,.1);  border: 1px solid rgba(50,255,116,.3); }
.legend-dot.busy      { background: rgba(240,96,96,.18);  border: 1px solid rgba(240,96,96,.5); }
.legend-dot.pending   { background: rgba(245,158,11,.18); border: 1px solid rgba(245,158,11,.5); }
.legend-dot.confirmed { background: rgba(50,255,116,.2);  border: 1px solid rgba(50,255,116,.6); }

/* ===================================================================
   BOOKING FORM
   =================================================================== */

.booking-form-section {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-top: 2rem;
  overflow: hidden;
  animation: fadeIn .3s ease;
  border: 1px solid var(--border);
}

.booking-form-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.booking-form-header h2 {
  font-size: 1.1rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: .5rem;
}

.booking-form-header p {
  color: var(--accent);
}

.booking-form-body { padding: 1.75rem 1.5rem; }

/* --- Form Layout ------------------------------------------------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.form-group.full-width { grid-column: 1 / -1; }

label {
  font-size: .78rem;
  font-weight: 500;
  color: var(--muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .06em;
}

label .required {
  color: var(--danger);
  margin-left: .15rem;
}

label .optional {
  font-weight: 400;
  color: var(--muted);
  font-size: .72rem;
  margin-left: .2rem;
  opacity: .7;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .9rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
  color-scheme: dark;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(50,255,116,.1);
}

input::placeholder { color: var(--muted); opacity: .6; }
textarea::placeholder { color: var(--muted); opacity: .6; }

input.error,
select.error,
textarea.error { border-color: var(--danger); }

input.error:focus,
select.error:focus,
textarea.error:focus { box-shadow: 0 0 0 3px rgba(240,96,96,.15); }

textarea { resize: vertical; min-height: 90px; }

select option {
  background: var(--surface);
  color: var(--text);
}

.form-hint {
  font-size: .72rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

.field-error {
  font-size: .78rem;
  color: var(--danger);
  display: flex;
  align-items: center;
  gap: .25rem;
}

/* --- Duration Display -------------------------------------------- */
.duration-display {
  font-size: .8rem;
  color: var(--muted);
  font-family: var(--font-mono);
  padding: .35rem .7rem;
  background: var(--bg);
  border-radius: var(--radius);
  margin-top: .3rem;
  border: 1px solid var(--border);
}

/* --- Form Submit Area -------------------------------------------- */
.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

/* ===================================================================
   ADMIN LAYOUT
   =================================================================== */

.admin-body {
  background: var(--bg);
  min-height: 100vh;
}

/* --- Sidebar ----------------------------------------------------- */
.admin-sidebar {
  width: var(--sidebar-width);
  background: var(--bg);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 200;
  overflow-y: auto;
  transition: transform .25s ease;
}

.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo a {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--accent);
  text-decoration: none;
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 500;
}

.sidebar-logo .logo-icon {
  width: 34px;
  height: 34px;
  background: var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  color: var(--accent);
}

.sidebar-nav { flex: 1; padding: .75rem 0; }

.nav-label {
  font-size: .65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  opacity: .6;
  padding: .75rem 1.25rem .3rem;
  font-family: var(--font-mono);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .65rem 1.25rem;
  color: var(--muted);
  text-decoration: none;
  font-size: .85rem;
  transition: background .15s, color .15s;
  position: relative;
}

.nav-link:hover {
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  opacity: 1;
}

.nav-link.active {
  background: rgba(50,255,116,.1);
  color: var(--accent);
  border-left: 3px solid var(--accent);
}

.nav-link .nav-icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.nav-badge {
  margin-left: auto;
  background: rgba(245,158,11,.2);
  color: #fbbf24;
  border: 1px solid rgba(245,158,11,.4);
  font-size: .65rem;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: .1rem .4rem;
  border-radius: 999px;
  min-width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
}

.sidebar-user {
  font-size: .75rem;
  color: var(--muted);
  margin-bottom: .5rem;
  font-family: var(--font-mono);
}

/* --- Admin Main -------------------------------------------------- */
.admin-wrapper {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.topbar-title {
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-head);
  color: var(--text);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
  border-radius: var(--radius-sm);
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--muted);
  border-radius: 1px;
  transition: all .2s;
}

.admin-content { flex: 1; padding: 2rem; }

.admin-content .page-header { margin-bottom: 1.5rem; }

.admin-content .page-title {
  font-size: 1.5rem;
  color: var(--text);
  font-family: var(--font-head);
  display: flex;
  align-items: center;
  gap: .5rem;
}

.admin-content .page-subtitle {
  font-size: .82rem;
  color: var(--muted);
  margin-top: .25rem;
  font-family: var(--font-mono);
}

/* --- Admin Cards ------------------------------------------------- */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--border);
}

.card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--bg);
}

.card-title {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-head);
  display: flex;
  align-items: center;
  gap: .5rem;
}

.card-body { padding: 1.5rem; }

/* --- Stat Cards -------------------------------------------------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid var(--border);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.stat-icon.primary  { background: rgba(50,255,116,.1);  color: var(--accent); }
.stat-icon.success  { background: rgba(50,255,116,.15); color: var(--accent); }
.stat-icon.warning  { background: rgba(245,158,11,.15); color: #fbbf24; }
.stat-icon.danger   { background: rgba(240,96,96,.15);  color: var(--danger); }

.stat-info h3 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  font-family: var(--font-head);
}
.stat-info p {
  font-size: .75rem;
  color: var(--muted);
  margin: .2rem 0 0;
  font-family: var(--font-mono);
}

/* --- Filter Tabs ------------------------------------------------- */
.filter-tabs {
  display: flex;
  gap: .25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.filter-tab {
  padding: .6rem 1.1rem;
  font-size: .75rem;
  font-weight: 500;
  font-family: var(--font-mono);
  color: var(--muted);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .4rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  transition: color .15s;
}

.filter-tab:hover { color: var(--text); text-decoration: none; opacity: 1; }

.filter-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.filter-tab .tab-count {
  font-size: .65rem;
  background: rgba(0,0,0,.3);
  color: var(--muted);
  padding: .1rem .4rem;
  border-radius: 999px;
}

.filter-tab.active .tab-count {
  background: rgba(50,255,116,.15);
  color: var(--accent);
}

/* --- Admin Table ------------------------------------------------- */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}

thead th {
  background: var(--bg);
  padding: .7rem 1rem;
  text-align: left;
  font-weight: 500;
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-family: var(--font-mono);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(47,111,108,.3); }

tbody td {
  padding: .75rem 1rem;
  vertical-align: middle;
  color: var(--muted);
}

.table-actions {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}

/* --- Status Badges ----------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: 2px 8px;
  border-radius: 2px;
  font-size: .7rem;
  font-weight: 500;
  font-family: var(--font-mono);
  white-space: nowrap;
  border: 1px solid;
}

.badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.badge-pending {
  background: rgba(245,158,11,.12);
  color: #fbbf24;
  border-color: rgba(245,158,11,.35);
}
.badge-confirmed {
  background: rgba(50,255,116,.12);
  color: var(--accent);
  border-color: rgba(50,255,116,.4);
}
.badge-rejected {
  background: rgba(240,96,96,.12);
  color: var(--danger);
  border-color: rgba(240,96,96,.35);
}

/* --- Booking Detail --------------------------------------------- */
.booking-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 2rem;
}

.detail-label {
  font-size: .65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-family: var(--font-mono);
  margin-bottom: .2rem;
  opacity: .7;
}
.detail-value {
  font-size: .9rem;
  color: var(--text);
}

.booking-notes {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  font-size: .85rem;
  color: var(--muted);
  white-space: pre-wrap;
  font-family: var(--font-mono);
}

/* --- Admin Forms ------------------------------------------------- */
.admin-form-section {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-top: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--border);
}

.admin-form-section .form-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .95rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--bg);
}

.admin-form-section .form-body { padding: 1.5rem; }

/* --- Login Page -------------------------------------------------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.login-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--border);
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo .logo-icon {
  width: 56px;
  height: 56px;
  background: var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--accent);
  margin: 0 auto .75rem;
}

.login-logo h1 {
  font-size: 1.5rem;
  margin-bottom: .3rem;
  color: var(--accent);
}

.login-logo p { font-size: .85rem; color: var(--muted); }

.login-form .form-group { margin-bottom: 1.1rem; }

/* --- Overlay ----------------------------------------------------- */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / .5);
  z-index: 190;
}
.sidebar-overlay.show { display: block; }

/* --- Room Color Swatch ------------------------------------------ */
.color-swatch {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  display: inline-block;
  vertical-align: middle;
  margin-right: .4rem;
  border: 1px solid rgb(255 255 255 / .15);
}

/* --- Toggle Switch ---------------------------------------------- */
.room-active-toggle {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
}
.room-active-toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border);
  border-radius: 22px;
  transition: .2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background: var(--muted);
  border-radius: 50%;
  transition: .2s;
}
.room-active-toggle input:checked + .toggle-slider { background: rgba(50,255,116,.4); }
.room-active-toggle input:checked + .toggle-slider::before {
  transform: translateX(16px);
  background: var(--accent);
}

/* --- Modal ------------------------------------------------------- */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / .65);
  z-index: 300;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-backdrop.show { display: flex; }

.modal {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 500px;
  animation: modalIn .2s ease;
  border: 1px solid var(--border);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(.95) translateY(-12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
}

.modal-title {
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-head);
  color: var(--text);
}
.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--muted);
  padding: .2rem;
  transition: color .15s;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 1.5rem; }
.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: .75rem;
}

/* --- Empty state ------------------------------------------------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  gap: 12px;
  color: var(--muted);
}
.empty-state .empty-icon { font-size: 2rem; opacity: .4; margin-bottom: .25rem; }
.empty-state p { font-size: .82rem; font-family: var(--font-mono); }

/* ===================================================================
   RESPONSIVE – Mobile
   =================================================================== */

@media (max-width: 768px) {
  html { font-size: 14px; }
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }

  .site-header .container { padding: 0 1rem; height: 56px; }
  .hero { padding: 2rem 0 1.5rem; }
  .hero h1 { font-size: 1.5rem; }

  .rooms-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full-width { grid-column: 1; }
  .availability-header { flex-direction: column; align-items: flex-start; }

  .admin-sidebar { transform: translateX(calc(-1 * var(--sidebar-width))); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-wrapper { margin-left: 0; }
  .hamburger { display: flex; }
  .admin-content { padding: 1rem; }
  .admin-topbar { padding: 0 1rem; }

  .stats-grid { grid-template-columns: 1fr 1fr; }
  .booking-detail-grid { grid-template-columns: 1fr; }
  .table-wrapper { font-size: .78rem; }
  thead th, tbody td { padding: .5rem .75rem; }
  .filter-tabs { gap: 0; }
  .filter-tab { padding: .5rem .75rem; }
  .form-actions { flex-direction: column; }
  .form-actions .btn { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .stats-grid { grid-template-columns: 1fr; }
  .login-card { padding: 1.75rem 1.25rem; }
  .availability-legend { gap: .75rem; }
  .day-view-time { font-size: .62rem; width: 44px; }
}

/* ===================================================================
   UTILITY CLASSES
   =================================================================== */
.text-muted       { color: var(--muted); }
.text-small       { font-size: .82rem; }
.text-center      { text-align: center; }
.text-right       { text-align: right; }
.fw-bold          { font-weight: 700; }
.mt-1             { margin-top: .5rem; }
.mt-2             { margin-top: 1rem; }
.mt-3             { margin-top: 1.5rem; }
.mb-1             { margin-bottom: .5rem; }
.mb-2             { margin-bottom: 1rem; }
.mb-3             { margin-bottom: 1.5rem; }
.d-flex           { display: flex; }
.gap-1            { gap: .5rem; }
.gap-2            { gap: 1rem; }
.align-center     { align-items: center; }
.justify-between  { justify-content: space-between; }
.flex-wrap        { flex-wrap: wrap; }
.hidden           { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
