/* Panel recepcji - stylistyka Hotelu Amaryllis (stalowo-niebieski antracyt + złoto) */
:root {
  --primary: #14202e;
  --primary-2: #232b36;
  --accent: #2f5e8c;
  --gold: #c6a15b;
  --bg: #f5f7f9;
  --surface: #ffffff;
  --text: #10161d;
  --muted: #5a6674;
  --line: #d8dee5;
  --open: #1c7a4c;
  --open-bg: #e4f3ea;
  --closed: #b3362b;
  --closed-bg: #f9e2df;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(16, 22, 29, 0.10);
  font-size: 15px;
}
* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
body { font-family: "Segoe UI", system-ui, sans-serif; background: var(--bg); color: var(--text); }
button { font: inherit; cursor: pointer; }
input, select { font: inherit; }

.btn { border: 0; border-radius: 999px; padding: 0.55rem 1.2rem; font-weight: 600; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: #24496e; }
.btn--ghost { background: transparent; border: 1.5px solid var(--line); color: inherit; }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--danger { background: var(--closed); color: #fff; }
.btn--success { background: var(--open); color: #fff; }
.input { border: 1.5px solid var(--line); border-radius: 8px; padding: 0.5rem 0.7rem; background: #fff; }

/* ── Logowanie ── */
.login { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg, var(--primary), var(--primary-2)); }
.login__card { background: var(--surface); border-radius: 16px; padding: 2.5rem; width: min(92vw, 380px); box-shadow: var(--shadow); display: grid; gap: 0.8rem; }
.login__brand { color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.72rem; }
.login__brand span { color: var(--gold); }
.login__card h1 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.login__card input { border: 1.5px solid var(--line); border-radius: 8px; padding: 0.7rem; }
.login__error { color: var(--closed); font-size: 0.85rem; }

/* ── Topbar ── */
.topbar { display: flex; align-items: center; gap: 1.5rem; padding: 0.7rem 1.3rem; background: var(--primary); color: #eef3f8; position: sticky; top: 0; z-index: 20; }
.topbar__brand { font-weight: 700; letter-spacing: 0.04em; }
.topbar__brand span { color: var(--gold); font-weight: 400; }
.topbar__nav { display: flex; gap: 0.4rem; margin-right: auto; }
.tab { background: transparent; border: 0; color: #c7d2dd; padding: 0.5rem 1rem; border-radius: 999px; font-weight: 600; }
.tab.is-active { background: rgba(255,255,255,0.14); color: #fff; }
.topbar .btn--ghost { border-color: rgba(255,255,255,0.3); color: #eef3f8; }
.badge { background: var(--gold); color: #241b06; border-radius: 999px; padding: 0.05rem 0.5rem; font-size: 0.75rem; margin-left: 0.3rem; }

.page { padding: 1.2rem; max-width: 1500px; margin-inline: auto; }
.toolbar { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: space-between; margin-bottom: 1rem; }
.toolbar__group { display: flex; align-items: center; gap: 0.5rem; }
.toolbar__range { font-weight: 700; margin-left: 0.6rem; }

/* ── Kalendarz ── */
.calendar { overflow-x: auto; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.cal-table { border-collapse: collapse; min-width: 100%; }
.cal-table th, .cal-table td { border: 1px solid #eceff3; padding: 0; text-align: center; min-width: 46px; }
.cal-table .rowlabel { text-align: left; padding: 0.3rem 0.8rem; font-size: 0.75rem; color: var(--muted); white-space: nowrap; position: sticky; left: 0; background: var(--surface); z-index: 2; min-width: 190px; border-right: 2px solid var(--line); }
.cal-head th { font-size: 0.72rem; padding: 0.35rem 0.2rem; color: var(--muted); background: #fafbfc; position: sticky; top: 0; }
.cal-head .day-num { display: block; font-size: 0.95rem; font-weight: 700; color: var(--text); }
.cal-head .is-weekend { background: #f0e9db; }
.cat-header td { background: var(--primary-2); color: #fff; text-align: left; padding: 0.45rem 0.8rem; font-weight: 700; position: sticky; left: 0; }
.cat-header .cat-bulk { float: right; background: transparent; border: 1px solid rgba(255,255,255,0.35); color: #fff; border-radius: 999px; padding: 0.1rem 0.7rem; font-size: 0.75rem; }
.cell { padding: 0.3rem 0.15rem; font-size: 0.85rem; cursor: pointer; }
.cell:hover { outline: 2px solid var(--accent); outline-offset: -2px; }
.cell--status { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.02em; }
.cell--status.open { background: var(--open-bg); color: var(--open); }
.cell--status.closed { background: var(--closed); color: #fff; }
.cell--missing { background: #f2f4f6; color: #b6bec8; }
.cell--closed-tint { background: var(--closed-bg); }
.cell--rooms { font-weight: 700; }
.cell--rooms.zero { color: var(--closed); }
.net-pill { display: inline-block; background: #3a4552; color: #fff; border-radius: 999px; padding: 0 0.45rem; font-size: 0.72rem; font-weight: 700; }
.cell--price { font-size: 0.78rem; color: var(--muted); }
.cell--price.special { background: var(--closed-bg); color: var(--closed); font-weight: 700; }

/* ── Rezerwacje ── */
.res-list { display: grid; gap: 0.5rem; }
.res-row { display: grid; grid-template-columns: 150px 1fr 170px 1fr 110px; gap: 0.8rem; align-items: center; background: var(--surface); border-radius: 10px; padding: 0.7rem 1rem; box-shadow: 0 2px 8px rgba(16,22,29,0.06); cursor: pointer; }
.res-row:hover { outline: 2px solid var(--accent); outline-offset: -2px; }
.res-row .num { font-weight: 700; font-size: 0.85rem; }
.res-row .who { font-weight: 600; }
.res-row .meta { color: var(--muted); font-size: 0.85rem; }
.status { display: inline-block; border-radius: 999px; padding: 0.15rem 0.7rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.03em; }
.status--NEW { background: #fdf3dd; color: #8a6420; }
.status--PENDING { background: #e8ecf5; color: #3c5788; }
.status--CONFIRMED { background: var(--open-bg); color: var(--open); }
.status--CANCELLED { background: var(--closed-bg); color: var(--closed); }
.status--CHECKED_IN { background: #e0edf8; color: #1f5d94; }
.status--CHECKED_OUT { background: #e9eaec; color: #5a6674; }
.status--NO_SHOW { background: #efe3ef; color: #7c3f77; }

/* ── Modale ── */
.modal { border: 0; border-radius: 16px; box-shadow: var(--shadow); padding: 0; width: min(94vw, 430px); }
.modal--wide { width: min(94vw, 640px); }
.modal::backdrop { background: rgba(16, 22, 29, 0.55); }
.modal form, .modal > div { padding: 1.6rem; display: grid; gap: 0.9rem; }
.modal h2 { font-size: 1.2rem; }
.modal__subtitle { color: var(--muted); margin-top: -0.6rem; }
.modal label { display: grid; gap: 0.3rem; font-size: 0.85rem; font-weight: 600; }
.modal input, .modal select { border: 1.5px solid var(--line); border-radius: 8px; padding: 0.55rem 0.7rem; }
.modal__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.modal__row:has(> :nth-child(3)) { grid-template-columns: 1fr 1fr 1fr; }
.modal__actions { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 0.4rem; }
fieldset { border: 1.5px solid var(--line); border-radius: 10px; padding: 0.7rem 0.9rem; }
legend { font-size: 0.8rem; font-weight: 700; color: var(--muted); padding-inline: 0.3rem; }
.checks { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; }
.checks label { display: flex; align-items: center; gap: 0.35rem; font-weight: 500; font-size: 0.85rem; }
.checks--week label { flex-direction: column; gap: 0.15rem; }
.switch { display: flex; align-items: center; gap: 0.5rem; font-weight: 500 !important; }
.stepper { display: flex; align-items: center; gap: 0.4rem; }
.stepper button { width: 2.2rem; height: 2.2rem; border-radius: 8px; border: 1.5px solid var(--line); background: #fff; font-size: 1.1rem; }
.stepper input { width: 5rem; text-align: center; }

/* Szczegół rezerwacji */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem 1.2rem; font-size: 0.92rem; }
.detail-grid dt { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.5rem; }
.detail-grid dd { font-weight: 600; }
.detail-log { font-size: 0.8rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 0.7rem; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; border-top: 1px solid var(--line); padding-top: 1rem; }
textarea.notes { width: 100%; min-height: 70px; border: 1.5px solid var(--line); border-radius: 8px; padding: 0.55rem 0.7rem; font: inherit; }

.toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); background: var(--primary); color: #fff; border-radius: 999px; padding: 0.6rem 1.4rem; box-shadow: var(--shadow); z-index: 50; }
.toast.err { background: var(--closed); }

@media (max-width: 800px) {
  .res-row { grid-template-columns: 1fr 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
}
