/* Programator săli de curs – Institutul de Pneumoftiziologie „Marius Nasta” */

:root {
  --primary: #0f4c81;
  --primary-600: #0b3c66;
  --primary-50: #eef4fa;
  --primary-100: #dce9f5;
  --accent: #2bb3a3;
  --accent-50: #e7f7f4;
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-2: #f3f6fa;
  --text: #142433;
  --muted: #5f6f7e;
  --soft: #8a99a7;
  --border: #e4eaf0;
  --grid-line: #eef2f6;
  --danger: #c2412d;
  --danger-50: #fdeeea;
  --success: #17805a;
  --success-50: #e4f5ed;
  --warning: #8f5c00;
  --warning-50: #fdf4e2;
  --radius-lg: 22px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 40, 70, .05);
  --shadow: 0 1px 2px rgba(15, 40, 70, .04), 0 12px 32px -14px rgba(15, 40, 70, .16);
  --shadow-lg: 0 30px 60px -24px rgba(15, 40, 70, .28);
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
body > main { flex: 1; width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.015em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 650; }
a { color: var(--primary); }
img { max-width: 100%; display: block; }
.muted { color: var(--muted); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
[hidden] { display: none !important; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(228, 234, 240, .8);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; min-width: 0; }
.brand-mark {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(140deg, var(--primary), var(--accent));
  display: grid; place-items: center;
  box-shadow: 0 6px 16px -6px rgba(15, 76, 129, .55);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.brand-text strong { font-size: .95rem; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text span { font-size: .8rem; color: var(--muted); }
.main-nav { display: flex; align-items: center; gap: 2px; }
.main-nav a:not(.btn) {
  text-decoration: none;
  color: var(--muted);
  font-weight: 550;
  font-size: .92rem;
  padding: 8px 14px;
  border-radius: 999px;
  transition: color .15s, background .15s;
}
.main-nav a:not(.btn):hover { color: var(--primary); background: var(--primary-50); }
.main-nav .nav-admin { margin-left: 8px; border: 1px solid var(--border); color: var(--text) !important; }

/* ---------- Buttons & controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: .93rem; font-weight: 600;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .15s;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 8px 20px -10px rgba(15, 76, 129, .7); }
.btn-primary:hover { background: var(--primary-600); border-color: var(--primary-600); color: #fff; }
.btn-lg { padding: 14px 26px; font-size: 1rem; }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--danger); }
.btn-danger:hover { border-color: var(--danger); background: var(--danger); color: #fff; }
.btn-sm { padding: 6px 13px; font-size: .84rem; }
.btn-icon { width: 40px; height: 40px; padding: 0; font-size: 1.15rem; line-height: 1; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

input, select, textarea {
  font: inherit;
  font-size: .94rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  min-height: 40px;
  max-width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
select { cursor: pointer; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-100); }
button:focus-visible, a:focus-visible { outline: 3px solid var(--primary-100); outline-offset: 2px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 80px;
  background:
    radial-gradient(900px 420px at 85% 10%, rgba(43, 179, 163, .13), transparent 60%),
    radial-gradient(700px 400px at 5% 90%, rgba(15, 76, 129, .09), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}
.hero-grid { display: grid; grid-template-columns: 1.02fr 1fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: currentColor; }
.hero .eyebrow { color: var(--primary); }
.hero h1 {
  margin: 18px 0 18px;
  font-size: clamp(2.3rem, 5vw, 3.7rem);
  font-weight: 750;
  letter-spacing: -.03em;
  line-height: 1.04;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--primary), var(--accent));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero-lead { font-size: 1.12rem; color: var(--muted); max-width: 34rem; margin: 0 0 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 0; margin-top: 44px; flex-wrap: wrap; }
.hero-stats div { padding: 0 28px; border-left: 1px solid var(--border); }
.hero-stats div:first-child { padding-left: 0; border-left: 0; }
.hero-stats b { display: block; font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; }
.hero-stats span { font-size: .85rem; color: var(--muted); }
.hero-visual { position: relative; }
.hero-visual img {
  width: 100%;
  aspect-ratio: 900 / 680;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
  background: var(--surface-2);
}
.float-card {
  position: absolute;
  display: flex; align-items: center; gap: 12px;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: var(--shadow);
  font-size: .86rem;
  line-height: 1.35;
}
.float-card b { display: block; font-size: .95rem; }
.float-card span { color: var(--muted); }
.float-card .dot { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.float-card .dot svg { width: 20px; height: 20px; }
.float-a { left: -28px; bottom: 36px; }
.float-a .dot { background: var(--success-50); color: var(--success); }
.float-b { right: -18px; top: 28px; }
.float-b .dot { background: var(--primary-50); color: var(--primary); }

/* ---------- Sections ---------- */
.section { padding: 72px 0 0; }
.section:last-of-type { padding-bottom: 80px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head h2 { margin-top: 8px; }
.section-head p { margin: 8px 0 0; color: var(--muted); max-width: 40rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.card-head h3 { font-size: 1.25rem; }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hint { font-size: .86rem; color: var(--muted); margin: 16px 0 0; }

/* ---------- Room cards ---------- */
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px; }
.room-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.room-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.room-media { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.room-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.room-card:hover .room-media img { transform: scale(1.03); }
.room-media .status { position: absolute; top: 14px; left: 14px; box-shadow: var(--shadow-sm); }
.room-media .seats {
  position: absolute; right: 14px; bottom: 14px;
  background: rgba(20, 36, 51, .72); color: #fff;
  font-size: .8rem; font-weight: 600;
  padding: 4px 11px; border-radius: 999px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.room-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.room-body h3 { display: flex; align-items: center; gap: 10px; }
.room-body h3::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--primary)); flex: none; }
.room-meta { font-size: .88rem; color: var(--muted); margin: -6px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: .77rem; font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
}
.status { font-size: .8rem; font-weight: 650; padding: 5px 11px; border-radius: 999px; white-space: nowrap; background: #fff; }
.status::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 7px; vertical-align: 1px; }
.status.free { color: var(--success); }
.status.busy { color: var(--danger); }
.status.closed { color: var(--soft); }
.room-next { font-size: .86rem; color: var(--muted); margin: 0; }
.occ { display: flex; align-items: center; gap: 10px; font-size: .84rem; color: var(--muted); }
.occ b { color: var(--text); font-weight: 650; min-width: 36px; text-align: right; }
.occ-bar { flex: 1; height: 6px; background: var(--grid-line); border-radius: 999px; overflow: hidden; }
.occ-bar i { display: block; height: 100%; width: var(--p, 0%); background: var(--c, var(--primary)); border-radius: inherit; }
.room-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 6px; flex-wrap: wrap; }
.room-actions .btn { flex: 1; }

/* ---------- Month calendar ---------- */
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.dow { text-align: center; font-size: .76rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); padding: 4px 2px 8px; }
.day {
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 14px;
  font: inherit;
  color: inherit;
  text-align: left;
  padding: 8px 9px 10px;
  min-height: 112px;
  display: flex; flex-direction: column; gap: 6px;
  cursor: pointer;
  min-width: 0;
  transition: background .15s, border-color .15s;
}
.day:hover { background: var(--primary-50); border-color: var(--primary-100); }
.day.other { background: transparent; color: #b3bfca; }
.day.other .occ-bar { opacity: .4; }
.day.weekend:not(.other) { background: #f7f9fb; }
.day.today .day-num { background: var(--primary); color: #fff; }
.day.selected { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px var(--primary-100); }
.day-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.day-num { font-weight: 650; font-size: .9rem; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; }
.day-pct { font-size: .72rem; font-weight: 600; color: var(--muted); }
.day .occ-bar { flex: none; height: 4px; }
.day-events { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.day-events li {
  font-size: .72rem; line-height: 1.35;
  padding: 2px 7px;
  border-radius: 6px;
  background: #fff;
  border-left: 3px solid var(--c);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.day-events li.more { border-left-color: transparent; background: none; color: var(--muted); padding-left: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 20px; font-size: .84rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); display: inline-block; }

/* ---------- Timeline ---------- */
.segmented { display: inline-flex; padding: 4px; background: var(--surface-2); border-radius: 999px; gap: 2px; }
.segmented button {
  font: inherit; font-size: .86rem; font-weight: 600;
  border: 0; background: transparent; color: var(--muted);
  padding: 7px 14px; border-radius: 999px; cursor: pointer;
}
.segmented button.active { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm), 0 2px 8px -2px rgba(15, 40, 70, .12); }
.schedule-title { font-weight: 650; font-size: 1.05rem; margin: 0 0 14px; }
.timeline-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.timeline { min-width: 920px; }
.tl-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); border-bottom: 1px solid var(--grid-line); }
.tl-row:last-child { border-bottom: 0; }
.tl-row.is-today .tl-label { background: var(--primary-50); }
.tl-label {
  padding: 10px 14px;
  border-right: 1px solid var(--grid-line);
  display: flex; flex-direction: column; justify-content: center;
  font-size: .87rem;
  position: relative;
}
.tl-label::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c, transparent); }
.tl-label strong { font-weight: 650; }
.tl-label span { color: var(--muted); font-size: .78rem; }
.tl-track { display: grid; grid-template-columns: repeat(var(--slots, 24), minmax(0, 1fr)); min-height: 62px; }
.tl-head { background: var(--surface-2); }
.tl-head .tl-label { color: var(--soft); font-size: .76rem; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; }
.tl-head .tl-track { min-height: 0; }
.tl-hour { font-size: .75rem; color: var(--muted); padding: 9px 6px; }
.tl-slot { grid-row: 1; border: 0; border-left: 1px dashed var(--grid-line); background: transparent; padding: 0; cursor: pointer; min-width: 0; transition: background .12s; }
.tl-slot.hour { border-left: 1px solid var(--grid-line); }
.tl-slot:hover:not(:disabled) { background: var(--accent-50); }
.tl-slot:disabled { cursor: default; background: repeating-linear-gradient(135deg, transparent 0 7px, #f4f6f9 7px 9px); }
.tl-booking {
  grid-row: 1;
  z-index: 1;
  margin: 7px 3px;
  min-width: 0;
  border: 0;
  border-radius: 10px;
  background: var(--surface-2);
  background: color-mix(in srgb, var(--c) 14%, #fff);
  box-shadow: inset 3px 0 0 var(--c);
  color: var(--text);
  font: inherit; font-size: .76rem; line-height: 1.3;
  text-align: left;
  padding: 4px 8px 4px 10px;
  overflow: hidden;
  cursor: pointer;
  display: flex; flex-direction: column; justify-content: center;
  transition: box-shadow .15s, transform .15s;
}
.tl-booking strong, .tl-booking span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-booking strong { font-weight: 650; }
.tl-booking span { color: var(--muted); }
.tl-booking:hover { box-shadow: inset 3px 0 0 var(--c), 0 6px 16px -6px rgba(15, 40, 70, .3); transform: translateY(-1px); }
.tl-empty { padding: 24px; color: var(--muted); }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; }
.step-num {
  width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center;
  font-weight: 700; color: var(--primary); background: var(--primary-50);
  margin-bottom: 16px;
}
.step:nth-child(2) .step-num { color: var(--accent); background: var(--accent-50); }
.step:nth-child(3) .step-num { color: var(--success); background: var(--success-50); }
.step p { color: var(--muted); margin: 8px 0 0; font-size: .93rem; }

/* ---------- Dialogs ---------- */
dialog.modal {
  border: 0; padding: 0;
  border-radius: var(--radius-lg);
  width: min(660px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  box-shadow: 0 40px 80px -20px rgba(10, 30, 50, .45);
  color: var(--text);
}
dialog.modal.narrow { width: min(480px, calc(100vw - 32px)); }
dialog.modal::backdrop { background: rgba(15, 30, 45, .4); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 26px 6px; }
.modal-head h3 { font-size: 1.25rem; }
.modal-content { padding: 14px 26px 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding: 16px 26px; border-top: 1px solid var(--border); background: var(--surface-2); }
.btn-close {
  border: 0; background: var(--surface-2);
  width: 36px; height: 36px; border-radius: 50%;
  font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--muted);
}
.btn-close:hover { background: var(--primary-50); color: var(--primary); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid label, .form-stack label { display: flex; flex-direction: column; gap: 6px; font-size: .84rem; font-weight: 600; color: var(--muted); }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-stack { display: flex; flex-direction: column; gap: 16px; }
.time-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.req::after { content: " *"; color: var(--danger); }
.room-info { font-size: .86rem; background: var(--primary-50); border-radius: var(--radius-sm); padding: 10px 14px; color: var(--muted); }
.room-info b { color: var(--primary); }
.room-info:empty { display: none; }
.availability { font-size: .86rem; color: var(--muted); margin: 16px 0 0; }
.form-error { color: var(--danger); background: var(--danger-50); border-radius: var(--radius-sm); padding: 10px 14px; margin: 14px 0 0; font-size: .9rem; }
.form-error:empty { display: none; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 16px; }
.check-grid label, label.check { flex-direction: row; align-items: center; gap: 9px; font-weight: 500; color: var(--text); }
.check-grid input, label.check input { min-height: 0; width: 17px; height: 17px; accent-color: var(--primary); }
.image-field { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center; }
.image-field img { width: 120px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); }
.image-field small { font-weight: 400; color: var(--soft); }
dl.details { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; font-size: .93rem; }
dl.details dt { color: var(--muted); }
dl.details dd { margin: 0; white-space: pre-wrap; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  background: var(--text); color: #fff;
  padding: 12px 20px; border-radius: 999px;
  font-size: .92rem; font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 100;
  max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); }
.toast.ok { background: var(--success); }

/* ---------- Footer ---------- */
footer { background: var(--surface); border-top: 1px solid var(--border); padding: 32px 0; font-size: .88rem; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; align-items: center; }
.footer-inner strong { color: var(--text); display: block; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--primary); }

/* ---------- Admin ---------- */
.admin-main { padding-top: 40px; padding-bottom: 64px; }
.page-title { margin-bottom: 28px; }
.page-title h1 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); font-weight: 750; letter-spacing: -.025em; margin-top: 8px; }
.login-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 0; max-width: 920px; margin: 32px auto; overflow: hidden; padding: 0; }
.login-art { background: var(--primary-50); }
.login-art img { width: 100%; height: 100%; object-fit: cover; }
.login-form-side { padding: 44px 40px; }
.login-form-side h2 { margin: 10px 0 6px; }
.login-form-side p { margin: 0 0 24px; }
.tabs { display: inline-flex; gap: 2px; padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; margin-bottom: 24px; flex-wrap: wrap; }
.tabs button {
  font: inherit; font-weight: 600; font-size: .92rem;
  border: 0; background: none; color: var(--muted);
  padding: 9px 18px; border-radius: 999px; cursor: pointer;
}
.tabs button.active { background: var(--primary); color: #fff; }
.notice { border-radius: var(--radius); padding: 12px 18px; margin-bottom: 20px; font-size: .92rem; background: var(--warning-50); color: var(--warning); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat { background: var(--surface-2); border-radius: var(--radius); padding: 14px 18px; position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c, var(--primary)); }
.stat b { display: block; font-size: 1.3rem; font-weight: 700; letter-spacing: -.01em; }
.stat span { font-size: .82rem; color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--grid-line); vertical-align: middle; }
th { background: var(--surface-2); font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; color: var(--soft); font-weight: 650; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafcfe; }
td.actions { white-space: nowrap; text-align: right; }
td.nowrap { white-space: nowrap; }
td .swatch { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); margin-right: 8px; }
td .thumb { width: 72px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.room-cell { display: flex; align-items: center; gap: 14px; }
tr.past td { color: var(--soft); }
.badge { white-space: nowrap; font-size: .76rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.badge.on { background: var(--success-50); color: var(--success); }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 20px; }
.filters label { display: flex; flex-direction: column; gap: 5px; font-size: .8rem; font-weight: 600; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero { padding: 48px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 620px; }
  .float-a { left: 12px; bottom: -18px; }
  .float-b { right: 12px; top: 12px; }
  .steps { grid-template-columns: 1fr; }
  .login-wrap { grid-template-columns: 1fr; max-width: 460px; }
  .login-art { max-height: 220px; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 76px; }
  .wrap { padding: 0 16px; }
  .header-inner { height: 64px; }
  .main-nav a:not(.nav-admin) { display: none; }
  .brand-text strong { font-size: .8rem; white-space: normal; line-height: 1.25; }
  .brand-text span { display: none; }
  .hero { padding-top: 36px; }
  .hero h1 { margin: 14px 0; }
  .hero-actions .btn-lg { padding: 12px 18px; font-size: .95rem; }
  .hero-stats { display: grid; grid-template-columns: auto 1fr auto; margin-top: 32px; }
  .hero-stats div { padding: 0 12px; }
  .hero-stats div:last-child { padding-right: 0; }
  .hero-stats b { font-size: 1.15rem; white-space: nowrap; }
  .hero-stats span { font-size: .78rem; display: block; line-height: 1.3; }
  .float-b { display: none; }
  .section { padding-top: 56px; }
  .card { padding: 18px; border-radius: 18px; }
  .month-grid { gap: 3px; }
  .day { min-height: 60px; padding: 5px; border-radius: 10px; }
  .day-events, .day-pct { display: none; }
  .day-num { width: 24px; height: 24px; font-size: .8rem; }
  .form-grid { grid-template-columns: 1fr; }
  .tl-row { grid-template-columns: 116px minmax(0, 1fr); }
  .login-form-side { padding: 28px 22px; }
}

/* ---------- Sala principală (card evidențiat) ---------- */
.room-card.featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.35fr 1fr; }
.room-card.featured .room-media { aspect-ratio: auto; min-height: 340px; }
.room-card.featured .room-body { padding: 32px 34px; gap: 14px; justify-content: center; }
.room-card.featured h3 { font-size: 1.7rem; letter-spacing: -.02em; }
.room-card.featured h3::before { width: 12px; height: 12px; }
.room-card.featured .room-actions .btn { flex: 0 0 auto; }
.main-badge {
  align-self: flex-start;
  font-size: .76rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--primary); background: var(--primary-50);
  padding: 5px 12px; border-radius: 999px;
}
.room-desc { margin: 0; color: var(--muted); font-size: .95rem; }
@media (max-width: 860px) {
  .room-card.featured { grid-template-columns: 1fr; }
  .room-card.featured .room-media { aspect-ratio: 16 / 9; min-height: 0; }
  .room-card.featured .room-body { padding: 22px; }
  .room-card.featured h3 { font-size: 1.4rem; }
}

/* ---------- Locație & persoană de contact ---------- */
button.room-media { display: block; width: 100%; border: 0; padding: 0; margin: 0; cursor: zoom-in; font: inherit; text-align: left; }
.room-media .photos {
  position: absolute; right: 14px; top: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(20, 36, 51, .66); color: #fff;
  font-size: .76rem; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.room-media .photos svg { width: 14px; height: 14px; }
.info-rows { display: grid; gap: 10px; }
.info-row { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; }
.info-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); }
.info-ico svg { width: 17px; height: 17px; }
.info-row > div { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.info-row small { font-size: .72rem; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--soft); }
.info-row b { font-weight: 600; font-size: .92rem; }
.info-row span { font-size: .84rem; color: var(--muted); }
.info-row .todo { font-style: normal; font-weight: 500; color: var(--soft); }
.info-row .phone {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 4px;
  font-size: .88rem; font-weight: 600;
  color: var(--accent); text-decoration: none;
}
.info-row .phone svg { width: 15px; height: 15px; }
.info-row .phone:hover { text-decoration: underline; }
.info-rows.compact { gap: 8px; padding: 12px 14px; background: var(--surface-2); border-radius: var(--radius); }
.info-rows.compact .info-row { grid-template-columns: 28px 1fr; gap: 10px; }
.info-rows.compact .info-ico { width: 28px; height: 28px; border-radius: 8px; background: #fff; }
.info-rows.compact .info-ico svg { width: 15px; height: 15px; }
.info-rows.compact b { font-size: .86rem; }
.info-rows.compact small { font-size: .68rem; }
.card-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.card-thumbs button, .gallery-thumbs button {
  border: 2px solid transparent; padding: 0; border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--surface-2);
  transition: border-color .15s, transform .15s;
}
.card-thumbs button:hover { transform: translateY(-2px); }
.card-thumbs img, .gallery-thumbs img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

/* ---------- Fereastra de detalii sală / galerie ---------- */
dialog.modal.wide { width: min(1080px, calc(100vw - 32px)); }
.room-detail { display: grid; grid-template-columns: 1.45fr 1fr; gap: 28px; padding: 14px 26px 26px; }
.gallery { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.gallery-main { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.gallery-main img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.gal-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .9); color: var(--text);
  font-size: 1.5rem; line-height: 1; cursor: pointer;
  box-shadow: var(--shadow);
}
.gal-nav:hover { background: #fff; color: var(--primary); }
.gal-nav.prev { left: 12px; }
.gal-nav.next { right: 12px; }
.gal-count { position: absolute; right: 12px; bottom: 12px; background: rgba(20, 36, 51, .7); color: #fff; font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.gallery-thumbs button.active { border-color: var(--primary); }
.room-detail-info { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.room-detail-info .room-actions { margin-top: auto; }
.mini-title { margin: 0 0 8px; font-size: .74rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); }
.chip.strong { background: var(--primary-50); color: var(--primary); font-weight: 650; }
.modal-head .main-badge { display: inline-block; margin-bottom: 6px; }

/* ---------- Administrare: secțiuni formular sală ---------- */
.form-section {
  grid-column: 1 / -1;
  margin: 8px 0 -4px; padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--primary);
}
.gallery-fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 16px; }
.gallery-fields label { display: grid !important; grid-template-columns: 88px 1fr; gap: 10px; align-items: center; }
.gallery-fields img { width: 88px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); }
.gallery-fields span { grid-column: 2; font-size: .78rem; }
.gallery-fields input { grid-column: 2; }
.gallery-fields img { grid-row: 1 / span 2; }
td .small { font-size: .82rem; color: var(--muted); display: block; }

@media (max-width: 860px) {
  .room-detail { grid-template-columns: 1fr; gap: 20px; padding: 10px 18px 20px; }
  .gallery-fields { grid-template-columns: 1fr; }
}

/* ---------- Conturi de utilizator ---------- */
.avatar {
  flex: none;
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: linear-gradient(140deg, var(--primary), var(--accent));
  color: #fff; font-size: .75rem; font-weight: 700; letter-spacing: .02em;
}
.avatar-lg { width: 56px; height: 56px; font-size: 1.1rem; }
.user-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 4px !important;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text) !important; font-weight: 600; font-size: .9rem; text-decoration: none;
}
.user-chip:hover { background: var(--primary-50) !important; }
.small-text { font-size: .86rem; margin: 0; }
.notice { line-height: 1.45; }
.hero .notice { margin-bottom: 22px; max-width: 36rem; }
.badge.warn { background: var(--warning-50); color: var(--warning); }
.badge.off { background: var(--danger-50); color: var(--danger); }
.count-badge {
  display: inline-grid; place-items: center;
  min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px;
  border-radius: 999px; background: var(--danger); color: #fff;
  font-size: .72rem; font-weight: 700; vertical-align: 1px;
}
.contact-cell a { display: block; white-space: nowrap; text-decoration: none; font-size: .86rem; }
.contact-cell a:hover { text-decoration: underline; }
td .small, td span.small { font-size: .8rem; color: var(--muted); display: block; font-weight: 400; }

/* Autentificare / cont nou */
.auth { min-height: calc(100vh - 72px); display: flex; align-items: center; }
.auth .hero-grid { align-items: start; width: 100%; }
.auth-art { width: 100%; max-width: 520px; margin-top: 8px; border-radius: 24px; box-shadow: var(--shadow-lg); }
.auth-card { padding: 30px; }
.auth-tabs { display: flex; margin-bottom: 24px; }
.auth-tabs button { flex: 1; }
.auth-card h3 { font-size: 1.35rem; }
.auth-card p.muted { margin: 6px 0 0; font-size: .92rem; }
.pw-rules { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .82rem; color: var(--soft); }
.pw-rules li::before { content: "○"; margin-right: 6px; }
.pw-rules li.ok { color: var(--success); }
.pw-rules li.ok::before { content: "✓"; }

/* Persoana care face rezervarea (din cont) */
.booker {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: center;
  background: var(--primary-50); border-radius: var(--radius); padding: 14px 16px;
}
.booker .avatar { grid-row: 1 / span 2; width: 42px; height: 42px; font-size: .9rem; }
.booker div { display: flex; flex-direction: column; line-height: 1.4; }
.booker small { font-size: .7rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); }
.booker b { font-size: .98rem; }
.booker div span { font-size: .85rem; color: var(--muted); }
.booker em { grid-column: 2; font-style: normal; font-size: .78rem; color: var(--soft); }
.tl-booking.mine { box-shadow: inset 3px 0 0 var(--c), inset 0 0 0 2px var(--c); }

/* Pagina „Contul meu” */
.account-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.account-main { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.account-side { display: flex; flex-direction: column; gap: 24px; }
.account-stats { margin-bottom: 0; }
.account-stats .stat { background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.account-stats .stat b { font-size: 1.5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.profile-head h3 { margin-bottom: 6px; }
.booking-list { display: flex; flex-direction: column; gap: 10px; }
.booking-item {
  display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center;
  padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2);
  border-left: 4px solid var(--c);
}
.date-badge { width: 52px; text-align: center; background: #fff; border-radius: 12px; padding: 6px 0; line-height: 1.1; box-shadow: var(--shadow-sm); }
.date-badge b { display: block; font-size: 1.3rem; }
.date-badge span { font-size: .72rem; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.booking-info { display: flex; flex-direction: column; min-width: 0; }
.booking-info strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.booking-info span { font-size: .86rem; color: var(--muted); }
.chart-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; }
.hbars { display: flex; flex-direction: column; gap: 12px; }
.hbar { display: grid; grid-template-columns: 120px 1fr auto; gap: 12px; align-items: center; font-size: .86rem; }
.hbar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { height: 10px; background: var(--grid-line); border-radius: 999px; overflow: hidden; }
.hbar-track i { display: block; height: 100%; background: var(--c); border-radius: inherit; }
.hbar-val { color: var(--muted); white-space: nowrap; font-size: .8rem; }
.vbars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; height: 170px; align-items: end; }
.vbar { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.vbar-track { flex: 1; width: 100%; max-width: 34px; display: flex; align-items: flex-end; background: var(--grid-line); border-radius: 8px; overflow: hidden; }
.vbar-track i { display: block; width: 100%; background: linear-gradient(180deg, var(--accent), var(--primary)); border-radius: 8px; min-height: 0; }
.vbar-val { font-size: .78rem; font-weight: 650; height: 16px; }
.vbar-label { font-size: .76rem; color: var(--muted); }

@media (max-width: 980px) {
  .account-grid { grid-template-columns: 1fr; }
  .auth { min-height: 0; }
  .auth-art { display: none; }
}
@media (max-width: 760px) {
  .chart-grid { grid-template-columns: 1fr; gap: 24px; }
  .booking-item { grid-template-columns: auto 1fr; }
  .booking-item .btn { grid-column: 1 / -1; }
  .auth-card { padding: 20px; }
  .user-chip span:last-child { display: none; }
  .user-chip { padding: 4px !important; }
}
@media (max-width: 760px) {
  .main-nav a.user-chip { display: inline-flex; }
  .user-chip:not([hidden]) ~ .nav-admin { display: none; }
}
.account-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .account-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Logo institut ---------- */
:root { --accent: #2f9fb1; --accent-50: #e6f5f8; }
.brand { gap: 14px; }
.brand-logo { height: 46px; width: auto; flex: none; }
.brand-app {
  padding-left: 14px; border-left: 1px solid var(--border);
  font-size: .9rem; font-weight: 650; line-height: 1.25; color: var(--text);
  max-width: 190px;
}
.auth-logo { height: 92px; width: auto; margin: 0 0 6px -6px; }
.admin-logo { height: 52px; width: auto; margin-bottom: 18px; }
.footer-brand { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.footer-logo { height: 46px; width: auto; }
.footer-brand span { padding-left: 18px; border-left: 1px solid var(--border); }
@media (max-width: 760px) {
  .brand-logo { height: 36px; }
  .brand-app { display: none; }
  .auth-logo { height: 68px; }
  .footer-brand span { padding-left: 0; border-left: 0; }
}

/* ---------- Regulament ---------- */
.rules-card { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: start; }
.rules-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-50); color: var(--accent); }
.rules-ico svg { width: 26px; height: 26px; }
.rules-text p { margin: 0 0 10px; }
.rules-text ul { margin: 0 0 10px; padding: 0; list-style: none; display: grid; gap: 10px; }
.rules-text li { position: relative; padding-left: 30px; }
.rules-text li::before {
  content: "✓"; position: absolute; left: 0; top: 1px;
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-50); color: var(--accent); font-size: .72rem; font-weight: 700;
}
.rules-note { font-size: .84rem; color: var(--muted); margin: 10px 0 0; }
.rules-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 16px; }
.rules-editor textarea { font-size: .92rem; line-height: 1.5; }
.rules-preview { background: var(--surface-2); border-radius: var(--radius); padding: 16px 18px; font-size: .93rem; }

/* ---------- Wi-Fi ---------- */
.wifi-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .86rem; color: var(--muted); }
.wifi-line code {
  font-family: Consolas, "SF Mono", Menlo, monospace; font-size: .86rem; color: var(--text);
  background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 1px 7px;
}
.info-rows.compact .wifi-line code { background: #fff; }
.copy-btn {
  font: inherit; font-size: .74rem; font-weight: 600; color: var(--primary);
  background: var(--primary-50); border: 0; border-radius: 999px; padding: 2px 9px; cursor: pointer;
}
.copy-btn:hover { background: var(--primary-100); }
.wifi-dd { display: flex; flex-direction: column; gap: 4px; }
.booking-wifi { display: flex; gap: 8px; align-items: flex-start; margin-top: 6px; color: var(--accent); }
.booking-wifi > svg { width: 16px; height: 16px; flex: none; margin-top: 3px; }
.booking-wifi > div { display: flex; flex-direction: column; gap: 3px; }
@media (max-width: 760px) {
  .rules-card { grid-template-columns: 1fr; gap: 14px; }
  .rules-editor { grid-template-columns: 1fr; }
}
/* Antet alb opac, ca fundalul alb al logo-ului să nu se vadă ca un dreptunghi. */
.site-header { background: #fff; }
/* Fundalul alb al logo-ului se „topește” în fundalul colorat al paginii. */
.auth-logo, .admin-logo, .footer-logo, .brand-logo { mix-blend-mode: multiply; }
