/* =======================================================
   ROOM BOOKING — DARK GLASS UI (Vanta-ready)
   2025-09 — Manrope font, merged booking ribbons, tidy header
   ======================================================= */

/* ---------- Manrope (Google Fonts) ---------- */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700;800&display=swap');

/* ---------- Vanta background host ---------- */
#vanta-bg{
  position:fixed;
  inset:0;
  z-index:0;     
  pointer-events: none;         /* IMPORTANT: body-н ард биш, контентын доор */
}

/* ---------- Color system (dark only) ---------- */
:root{
  --bg:#0b0f14;
  --panel:#0f141c;
  --panel-a: rgba(15,20,28,.62);
  --ghost:#0d131b;
  --text:#e7eef5;
  --muted:#9aaac0;
  --line:#263041;

  --acc:#2fd066;
  --acc-ink:#0b130d;

  --danger:#ff5a5a;

  --radius:20px;
  --radius-sm:12px;

  --shadow:0 14px 40px rgba(0,0,0,.40);
  --shadow-sm:0 8px 18px rgba(0,0,0,.28);
}

/* ---------- Base ---------- */
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  background:var(--bg); color:var(--text);
  font:16px/1.6 "Manrope", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}
a{color:var(--acc);text-decoration:none}
.container{
  max-width:1300px;
  margin:8px auto;           /* дээд хоосон зайг багасгав */
  padding:0 16px;
  position:relative; z-index:1;        /* Vanta-гийн дээр */
}

/* ---------- Topbar ---------- */
.topbar-outer{
  background:var(--panel-a);
  backdrop-filter: blur(10px) saturate(120%);
  border-bottom:1px solid rgba(255,255,255,.06);
  position:sticky; top:0; z-index:2;   /* Vanta-гаас дээр */
}
.topbar-inner{
  max-width:1280px; margin:0 auto; padding:10px 14px;
  display:flex; align-items:center; justify-content:space-between; gap:12px;
}
.brand{display:flex; align-items:center; gap:12px; font-weight:800}
.brand img{height:26px; width:auto}
.main-nav{display:flex; align-items:center; gap:10px}
.main-nav a{
  padding:8px 12px; border-radius:12px; color:var(--text); font-weight:800;
}
.main-nav a:hover{background:rgba(255,255,255,.06)}
.main-nav a.active{color:var(--acc)}
/* Меню дотор “Захиалах” давхардвал нуух */
.main-nav a[href*="/book"]{ display:none; }

/* ---------- Buttons ---------- */
.btn{
  --bg-btn:var(--acc); --fg-btn:var(--acc-ink);
  display:inline-flex; align-items:center; justify-content:center;
  height:42px; padding:0 18px; gap:8px; font-weight:900;
  color:var(--fg-btn); background:var(--bg-btn);
  border:1px solid transparent; border-radius:16px; cursor:pointer;
  box-shadow:var(--shadow-sm);
  transition:transform .12s ease, filter .12s ease;
}
.btn:hover{filter:brightness(1.04)}
.btn:active{transform:translateY(1px); box-shadow:none}
.btn.ghost{
  --bg-btn:rgba(255,255,255,.06); --fg-btn:var(--text);
  border-color:rgba(255,255,255,.08);
}

/* ---------- Flash ---------- */
.flash-wrap{max-width:1120px;margin:12px auto 0;padding:0 16px; position:relative; z-index:1}
.flash{
  padding:14px 18px;border-radius:14px;margin:10px 0;
  background:var(--panel-a);
  border:1px solid rgba(255,255,255,.07); box-shadow:var(--shadow-sm)
}
.flash.ok{border-color:rgba(47,208,102,.45); background:rgba(47,208,102,.10)}
.flash.error{border-color:rgba(255,90,90,.4); background:rgba(255,255,255,.10)}
.muted{color:var(--muted)}

/* =======================================================
   CALENDAR (rb-*)
   ======================================================= */

/* ===== CARD TOP ROW (range + create) ===== */
.rb-card-top{
  display: grid;
  grid-template-columns: 120px repeat(5, 1fr);
  align-items: center;
  gap: 12px;
  padding: 8px 10px 6px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  margin-bottom: 6px;
}
.rb-range-group{
  display:flex; align-items:center; gap:10px;
  grid-column: 1 / 6;
  /* CHANGED: огнооны хэсгийг зүүн талд байрлуулна */
  justify-self: start;
}
.rb-card-top .range{
  font-weight:900; letter-spacing:.3px; color:#cfe6d9; font-size:16px;
}
.nav-btn{ width:44px; padding:0; border-radius:14px; font-size:15px }
.rb-actions{
  /* Баасан (6-р колонк) дээр байрлуулна */
  grid-column: 6;
  /* CHANGED: баруун ирмэгт биш, баганын зүүнээс эхлүүлнэ */
  justify-self: start;
  padding-right: 0;
  padding-left: 30px;
  /* бага зэрэг дотогш—шийдэл тааруулах бол энэ утгыг өөрчилж болно */
  margin-left: -30x;
}

/* Toolbar-ийн хуучин трюкыг идэвхгүй болгоно (байсан бол) */
.rb-toolbar, .rb-toolbar + div{ display:none !important; }

/* OPTIONAL: Жилийн чип (HTML-д .rb-year нэмбэл харагдана) */
.rb-year{
  position:absolute; left:0; top:-30px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.1);
  color:#cfe6d9; font-weight:800; padding:6px 10px; border-radius:10px;
}

/* Glass calendar card */
.rb-calendar-card{
  background:var(--panel-a);
  backdrop-filter: blur(10px) saturate(120%);
  border:1px solid rgba(255,255,255,.06);
  border-radius:26px; padding:10px 12px; box-shadow:var(--shadow);
  margin-top:6px;
  position:relative; z-index:1;   /* Vanta-гаас дээр */
}

/* Header row: time col + 5 days */
.rb-header-row{
  display:grid; grid-template-columns:120px repeat(5,1fr);
  align-items:center; padding:6px 6px 10px;
}
.rb-time-col{width:120px}
.rb-day-head{display:flex; flex-direction:column; align-items:center; gap:6px}
.rb-day-head .rb-dot{
  width:42px; height:42px; border-radius:999px; display:grid; place-items:center;
  background:var(--acc); color:var(--acc-ink); font-weight:900; font-size:18px;
  box-shadow:0 6px 16px rgba(0,0,0,.28);
}
.rb-day-head .rb-date{color:#b9d7c7; font-size:.92rem}

/* Body grid (10:00–19:00 => 18 rows; 18*40=720px) */
.rb-body{
  display:grid; grid-template-columns:120px repeat(5,1fr);
  position:relative; max-height:720px; overflow:auto;
  border-top:1px solid rgba(255,255,255,.06);
  scrollbar-gutter: stable;
}
.rb-time-col .rb-time{
  height:40px;
  display:flex; align-items:center; justify-content:center; /* төвд! */
  padding:0 10px;
  color:#dff7ea; font-weight:900; letter-spacing:.3px;
  border-top:1px dashed rgba(255,255,255,.08);
}

/* Days & cells */
.rb-day-col{
  position:relative; border-left:1px solid rgba(255,255,255,.06); padding:0 6px;
}
.rb-day-col .cell{
  height:40px; border-top:1px dashed rgba(255,255,255,.08);
  cursor:grab; transition:background .1s ease;
  background:transparent;
}
.rb-day-col .cell:hover{background:rgba(47,208,102,.08)}
.rb-day-col .cell.selected{background:rgba(47,208,102,.26); outline:1px solid var(--acc)}
.rb-day-col .cell.is-unavailable{
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.06) 10px, rgba(255,255,255,.03) 10px, rgba(255,255,255,.03) 20px);
}

/* Booked block = ONE merged ribbon */
/* — ЦАГИЙГ НУУНА — */
.booking-block{
  position:absolute; left:8px; right:8px; z-index:2;
  background:var(--acc); color:#07130a;
  border-radius:16px;
  padding:12px 14px;
  display:flex; flex-direction:column; gap:6px;
  box-shadow: 0 10px 22px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.18);
  border:1px solid rgba(0,0,0,.20);
  overflow:visible;
}
.booking-block .b-name{font-weight:900; font-size:16px; letter-spacing:.2px}
.booking-block .b-time{display:none !important;} /* ← цагийг бүрмөсөн нуув */

/* =======================================================
   BOOK PAGE — compact (font Manrope)
   ======================================================= */
.booking-grid{
  display:grid; grid-template-columns:380px 1fr 360px; gap:22px; align-items:start;
}
@media (max-width:1180px){ .booking-grid{ grid-template-columns:1fr } }

.date-pane .note{ display:none }  /* Цайны цаг тэмдэглэл хассан */

/* glass cards */
.card{background:var(--panel-a); backdrop-filter: blur(10px) saturate(120%); border:1px solid rgba(255,255,255,.06); border-radius:var(--radius); box-shadow:var(--shadow-sm)}
.card-title{padding:14px 18px;border-bottom:1px solid rgba(255,255,255,.06);font-weight:900}
.card-body{padding:16px 18px}
label{font-weight:900; margin-bottom:6px}
input[type="text"],input[type="date"],input[type="password"]{
  width:100%; padding:12px 14px; border-radius:12px; border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.25); color:var(--text); font-family:"Manrope", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
input:focus{outline:none;border-color:var(--acc);box-shadow:0 0 0 3px rgba(47,208,102,.25)}

.time-pane{display:flex; flex-direction:column; gap:14px}
.time-pane .name-row{order:-1}   /* Нэр талбарыг дээд талд гаргана */

.slot-list{
  border:1px solid rgba(255,255,255,.08); border-radius:14px; background:rgba(0,0,0,.25);
  padding:10px; max-height:460px; overflow:auto;
}
.slot-list.grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(180px, 1fr)); gap:10px}
.check{
  display:flex; align-items:center; gap:10px;
  padding:11px 10px; border:1px solid rgba(255,255,255,.10);
  border-radius:12px; background:rgba(255,255,255,.04); cursor:pointer; user-select:none;
  transition:background .15s ease, border-color .15s ease;
}
.check:hover{background:rgba(255,255,255,.07)}
.check input[type="checkbox"]{
  appearance:none; width:20px; height:20px; border-radius:6px; border:2px solid #6c7c93; display:grid; place-items:center; background:transparent; cursor:pointer;
}
.check input[type="checkbox"]::before{
  content:""; width:12px; height:12px; border-radius:3px; transform:scale(0);
  background:var(--acc); transition:.15s ease;
}
.check input[type="checkbox"]:checked{border-color:var(--acc)}
.check input[type="checkbox"]:checked::before{transform:scale(1)}

.actions{display:flex; justify-content:flex-end; gap:12px; margin-top:6px}

/* =======================================================
   ADMIN TABLE
   ======================================================= */
.list{
  width:100%; border-collapse:separate; border-spacing:0;
  background:var(--panel-a); border:1px solid rgba(255,255,255,.06);
  border-radius:14px; overflow:hidden; box-shadow:var(--shadow-sm);
}
.list th,.list td{border-bottom:1px solid rgba(255,255,255,.06); padding:12px; text-align:left}
.list thead th{background:rgba(255,255,255,.05); color:#d8f2e5}
.list tr:hover{background:rgba(255,255,255,.04)}
.list td.actions{width:130px}

/* ---------- Scrollbar polish ---------- */
.rb-body::-webkit-scrollbar, .slot-list::-webkit-scrollbar, body::-webkit-scrollbar{width:10px;height:10px}
.rb-body::-webkit-scrollbar-thumb, .slot-list::-webkit-scrollbar-thumb, body::-webkit-scrollbar-thumb{
  background:#202a39; border-radius:8px; border:2px solid rgba(15,20,28,.65);
}
