:root {
  --bg: #f5f8fd;
  --panel: #ffffff;
  --line: #dfe7f3;
  --text: #081b3f;
  --muted: #64748b;
  --blue: #075bea;
  --green: #15944f;
  --amber: #f59f14;
  --red: #e7394d;
  --violet: #6b4be8;
  --cyan: #0095a8;
  --shadow: 0 14px 34px rgba(17, 42, 80, 0.08);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-family: Inter, Segoe UI, Roboto, Arial, sans-serif; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.login { min-height: 100vh; display: grid; grid-template-columns: minmax(460px, 1.15fr) minmax(390px, .85fr); background: #fff; }
.loginHero { position: relative; overflow: hidden; padding: 58px 7vw; color: #fff; display: flex; flex-direction: column; justify-content: flex-start; gap: 100px; background: linear-gradient(90deg, rgba(4, 18, 42, .98), rgba(5, 30, 67, .86)), radial-gradient(circle at 74% 40%, rgba(31, 117, 255, .24), transparent 28%), linear-gradient(135deg, #06152c, #0a356f); }
.brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.brand img { display: block; width: 247px; max-width: 100%; height: auto; object-fit: contain; }
.brand.compact img { width: 205px; }
.brandFallback { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.heroText { position: relative; z-index: 1; max-width: 740px; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; color: #7ee5ee; font-size: 12px; font-weight: 800; }
.heroText h1 { margin: 0 0 18px; font-size: clamp(42px, 5.5vw, 76px); line-height: 1.03; letter-spacing: 0; }
.heroText p { max-width: 650px; color: #d9e7fb; font-size: 20px; line-height: 1.55; }
.miniGrid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 14px; }
.mini, .card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.mini { padding: 17px; background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.18); }
.mini b { display: block; font-size: 30px; }
.mini span { color: #d7e4f7; }
.loginPanel { display: grid; place-items: center; padding: 42px; }
.loginCard { width: min(480px, 100%); display: grid; gap: 16px; }
.loginCard h2 { margin: 0; font-size: 40px; }
.muted, small { color: var(--muted); }

.field { display: grid; gap: 7px; color: #435475; font-size: 12px; font-weight: 800; }
.field input, .field textarea, .field select, .fakeSelect { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--text); padding: 0 13px; outline: 0; }
.field textarea { min-height: 92px; padding: 12px; resize: vertical; }
.fakeSelect { display: flex; align-items: center; justify-content: space-between; }
.fakeSelect:after { content: "v"; color: var(--muted); }
.between { display: flex; justify-content: space-between; gap: 12px; }

.primary, .secondary, .pill, .icon, .rowBtn { border: 1px solid var(--line); border-radius: 7px; min-height: 42px; padding: 0 15px; background: #fff; color: var(--text); }
.primary { background: linear-gradient(90deg, #04377f, var(--blue)); border-color: var(--blue); color: #fff; font-weight: 800; }
.primary:hover, .secondary:hover, .pill:hover, .icon:hover, .rowBtn:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.wide { width: 100%; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 270px minmax(0, 1fr); }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; color: #fff; background: linear-gradient(180deg, #06172f, #082a58); }
.sideTop { padding: 24px 18px 18px; border-bottom: 1px solid rgba(255,255,255,.1); }
.sideTop small { display: block; margin-top: 14px; color: #d7e4f7; text-align: center; }
.nav { display: grid; gap: 4px; padding: 14px; overflow: auto; }
.nav button { height: 43px; border: 0; border-radius: 7px; display: flex; align-items: center; gap: 10px; color: #fff; background: transparent; text-align: left; padding: 0 10px; }
.nav button.active, .nav button:hover { background: linear-gradient(90deg, #075bea, #0b6cff); }
.navIcon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; background: rgba(255,255,255,.12); font-size: 11px; font-weight: 800; }
.system, .profile { margin: 14px; display: flex; align-items: center; gap: 10px; border: 1px solid rgba(255,255,255,.12); border-radius: 8px; padding: 13px; background: rgba(255,255,255,.04); }
.profile { margin-top: auto; }
.profile small, .system small { display: block; color: #b8c9df; }
.avatar { width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; color: #fff; font-weight: 900; background: linear-gradient(135deg, #ff1744, #01b7c5); }

.main { min-width: 0; padding: 24px; }
.top { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 22px; }
.top h1 { margin: 0 0 6px; font-size: 30px; }
.top p { margin: 0; color: var(--muted); }
.topActions, .tools, .toolbar, .filterRow, .rowActions, .formActions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bell { position: relative; }
.bell span { position: absolute; top: -8px; right: -8px; min-width: 18px; height: 18px; display: grid; place-items: center; border-radius: 999px; color: #fff; background: var(--red); font-size: 10px; }

.page, .stack { display: grid; gap: 16px; }
.card { padding: 18px; min-width: 0; }
.card.noPad { padding: 0; }
.card.flat { box-shadow: none; }
.kpis { display: grid; grid-template-columns: repeat(6, minmax(145px, 1fr)); gap: 14px; }
.kpi { display: flex; align-items: center; gap: 14px; }
.kpi span { display: block; color: var(--muted); font-size: 13px; }
.kpi strong { display: block; margin: 3px 0; font-size: 28px; }
.kicon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 999px; color: #fff; font-weight: 900; }
.blue { background: #1769ff; }
.green { background: #15944f; }
.amber { background: #f59f14; }
.red { background: #e7394d; }
.violet { background: #6b4be8; }
.cyan { background: #0095a8; }

.dash { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.simpleDash { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.cardHead, .tableTop { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 14px; }
.card h2, .tableTop h2 { margin: 0; font-size: 17px; }
.chartBlock { display: grid; grid-template-columns: 180px 1fr; gap: 18px; align-items: center; }
.donut { width: 170px; height: 170px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--green) 0 56%, var(--blue) 56% 98%, var(--red) 98%); }
.donut:before { content: attr(data-label); width: 104px; height: 104px; display: grid; place-items: center; border-radius: 50%; background: #fff; white-space: pre; text-align: center; font-weight: 900; }
.legendRow, .sum { display: grid; grid-template-columns: auto 1fr auto; gap: 9px; align-items: center; margin: 10px 0; }
.dot { width: 10px; height: 10px; display: inline-block; border-radius: 50%; }
.dot.green { background: var(--green); }
.dot.blue { background: var(--blue); }
.dot.red { background: var(--red); }
.bars { grid-column: 1 / -1; height: 132px; display: flex; align-items: end; gap: 12px; }
.bars span { flex: 1; min-width: 20px; display: flex; align-items: end; justify-content: center; border-radius: 7px 7px 0 0; color: #fff; background: linear-gradient(180deg, var(--blue), #053b91); }
.bars small { color: #fff; padding-bottom: 6px; }
.simpleStats { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 12px; }
.statBox { min-height: 120px; display: grid; align-content: center; gap: 8px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: #f8fbff; }
.statBox b { font-size: 34px; line-height: 1; }
.statBox span { color: var(--muted); font-weight: 800; }
.list { display: grid; }
.listItem { display: grid; grid-template-columns: 80px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.listItem:last-child { border-bottom: 0; }
.listItem small { display: block; }
.time { color: var(--blue); }

.tableWrap { overflow: auto; }
table { width: 100%; min-width: 930px; border-collapse: collapse; }
th, td { padding: 13px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; vertical-align: middle; }
th { background: #f8fbff; color: #465977; font-weight: 800; }
.badge { display: inline-flex; padding: 5px 9px; border-radius: 6px; font-size: 12px; font-weight: 800; }
.active, .available, .approved, .confirmed, .checkedin, .ready { color: var(--green); background: #e8f8ef; }
.booked, .requested, .pending, .pendingapproval { color: #b36a00; background: #fff4df; }
.occupied { color: var(--blue); background: #eaf2ff; }
.draft, .checkedout, .cancelled, .noshow, .inactive { color: var(--muted); background: #eef2f7; }
.maintenance, .undermaintenance, .blocked, .rejected { color: var(--red); background: #ffe9ee; }
.rowBtn { min-height: 31px; padding: 0 9px; margin-right: 5px; }
.toolbar { justify-content: space-between; }
.toolbar > .field { width: min(420px, 100%); }

.quickActions, .employeeTiles, .checkGrid, .legend { display: flex; flex-wrap: wrap; gap: 10px; }
.actionTile { display: grid; gap: 10px; align-content: start; }
.employeeTiles { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); }
.clickable { cursor: pointer; }
.linkBtn { border: 0; padding: 0; min-height: auto; color: var(--blue); background: transparent; font-weight: 800; }
.empty { padding: 20px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); background: #f8fbff; }
.selectText { color: var(--blue); font-weight: 900; }
.ruleList { margin: 0; padding-left: 20px; color: var(--muted); line-height: 1.8; }
.checkItem { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: #f8fbff; font-weight: 800; }
.legend { margin-bottom: 12px; }
.legendBadge { display: inline-flex; min-height: 30px; align-items: center; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 900; }
.document { display: grid; gap: 16px; max-width: 900px; margin: 0 auto; padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.document .brand img { width: 230px; }
.infoBlock { border: 0; }

.formLayout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; }
.formGrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.wideField { margin-top: 14px; }
.formActions { justify-content: flex-end; margin-top: 16px; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(160px, 1fr)); gap: 14px; }
.step { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.step span { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #aebbd0; border-radius: 999px; font-weight: 900; }
.step.active, .step.done { color: var(--text); }
.step.active span, .step.done span { color: #fff; background: var(--blue); border-color: var(--blue); }
.summaryCard { align-self: start; display: grid; gap: 8px; }
.notice { margin-top: 8px; padding: 12px; color: var(--blue); background: #eaf2ff; border: 1px solid #cfe0ff; border-radius: 7px; font-weight: 700; }
.roomGrid { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)); gap: 12px; margin-top: 14px; }
.roomCard { display: grid; gap: 6px; min-height: 130px; text-align: left; border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: #fff; }
.roomCard.selected { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(7, 91, 234, .14); }
.roomCard.available { background: #f3fff7; }
.roomCard.occupied { background: #f3f8ff; }
.roomCard.booked { background: #fff9ed; }
.roomCard.maintenance { background: #fff3f5; }
.reviewGrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

.bookingHeader { display: grid; grid-template-columns: 145px repeat(5, minmax(0, 1fr)); gap: 16px; align-items: center; padding: 18px; }
.roomPhoto { height: 92px; border-radius: 8px; background: linear-gradient(135deg, rgba(8,27,63,.1), rgba(8,27,63,.15)), linear-gradient(135deg, #f4dfbd, #fff6df); }
.bookingHeader h3 { margin: 5px 0; font-size: 16px; }
.tabs { display: flex; gap: 22px; padding: 0 18px; border-top: 1px solid var(--line); overflow: auto; }
.tabs button { border: 0; background: transparent; padding: 15px 0; color: var(--text); }
.tabs button.active { color: var(--blue); border-bottom: 3px solid var(--blue); }

.calendarGrid { display: grid; grid-template-columns: 140px repeat(7, minmax(110px, 1fr)); overflow: auto; border: 1px solid var(--line); }
.calHead, .calRoom, .calCell { min-height: 62px; padding: 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.calHead { background: #f8fbff; text-align: center; font-weight: 900; }
.calRoom { font-weight: 900; background: #fff; }
.calCell { text-align: center; font-weight: 800; }
.calCell.available { color: var(--green); background: #effbf4; }
.calCell.occupied { color: var(--blue); background: #edf4ff; }
.calCell.booked { color: #b36a00; background: #fff4df; }
.calCell.maintenance { color: var(--red); background: #fff0f2; }
.appFooter { padding: 12px 4px; color: var(--muted); text-align: right; font-size: 12px; }

@media (max-width: 1260px) {
  .shell { grid-template-columns: 86px minmax(0, 1fr); }
  .brand.compact img { width: 54px; height: 54px; object-fit: cover; object-position: left center; }
  .sideTop small, .nav span:not(.navIcon), .system div, .profile div:not(.avatar) { display: none; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .dash, .simpleDash { grid-template-columns: repeat(2, 1fr); }
  .formLayout { grid-template-columns: 1fr; }
  .bookingHeader { grid-template-columns: repeat(2, 1fr); }
  .employeeTiles { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
}

@media (max-width: 760px) {
  .login, .shell { grid-template-columns: 1fr; }
  .loginHero { min-height: 520px; }
  .miniGrid, .kpis, .dash, .simpleDash, .simpleStats, .formGrid, .steps, .roomGrid, .reviewGrid, .employeeTiles { grid-template-columns: 1fr; }
  .side { position: static; height: auto; }
  .nav { grid-template-columns: repeat(2, 1fr); }
  .top, .topActions, .between, .toolbar { flex-direction: column; align-items: stretch; }
  .span2 { grid-column: auto; }
  .main { padding: 14px; }
  .chartBlock { grid-template-columns: 1fr; }
  .calendarGrid { grid-template-columns: 120px repeat(7, 120px); }
}
