/* Bare minimum: calendar interactions and final styling belong to the next Codex increment. */
:root { color-scheme: light; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { background: #f8fafc; margin: 0; color: #19212b; }
main { margin: 60px auto; width: min(940px, 92vw); }
.card { background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; padding: 30px; }
h1 { font-size: 1.75rem; margin: 0 0 10px; }
p { line-height: 1.5; color: #465362; }
.rooms { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 28px; }
.room { border: 1px solid #dae1e8; background: #fcfdff; border-radius: 10px; padding: 22px; min-height: 140px; }
.room h2 { margin: 0; font-size: 1.1rem; }
@media (max-width: 600px) { .rooms { grid-template-columns: 1fr; } }

.auth { max-width: 440px; margin: auto; }
form { display: grid; gap: 12px; }
input[type=email], .auth input[type=text] { padding: 12px; border: 1px solid #8795a5; border-radius: 6px; font: inherit; min-width: 0; }
button { padding: 12px 20px; border: 0; border-radius: 6px; background: #2455c7; color: #fff; font: inherit; cursor: pointer; }
button:hover { background: #183f9c; }
:focus-visible { outline: 3px solid #e6a800; outline-offset: 3px; }
[role=alert] { color: #a02020; }

nav { margin-bottom: 18px; }
a { color: #2455c7; }
select { padding: 12px; border: 1px solid #8795a5; border-radius: 6px; font: inherit; background: white; }
.button { display: inline-block; padding: 12px 20px; border-radius: 6px; background: #2455c7; color: white; text-decoration: none; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 12px; border-bottom: 1px solid #e5e7eb; overflow-wrap: anywhere; }
@media (max-width: 600px) { .card { padding: 18px; } th, td { padding: 8px; } }

/* Daily calendar: two pixels per elapsed minute. */
* { box-sizing: border-box; }
main.calendar-page { width: 100%; margin: 0; }
.app-header { min-height: 82px; padding: 18px 32px; display: flex; justify-content: space-between; align-items: center; gap: 20px; background: white; border-bottom: 1px solid #e2e6ec; }
.brand { min-width: 0; overflow-wrap: anywhere; font-size: 24px; font-weight: 750; text-decoration: none; color: #202b41; }
.brand span { display: block; font-size: 12px; font-weight: 400; color: #718096; }
.account { margin: 0; display: flex; align-items: center; gap: 22px; font-size: 14px; }
.account > span { overflow-wrap: anywhere; }
.account button { background: #eef2f7; color: #35435b; padding: 9px 14px; }
.day-calendar { padding: 28px 32px; }
.calendar-toolbar, .calendar-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.eyebrow { font-size: 11px; letter-spacing: .14em; margin: 0 0 8px; font-weight: 700; color: #64748b; }
.calendar-toolbar h1 { font-size: 26px; margin: 0; }
.control { border: 1px solid #d6dce6; border-radius: 7px; padding: 9px 14px; background: white; text-decoration: none; color: #36445c; }
.control:hover { background: #edf2fa; }
.date-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.date-form label { font-size: 13px; color: #56657a; }
.date-form input { font: inherit; padding: 8px; border: 1px solid #d6dce6; border-radius: 6px; background: white; }
.date-form button { padding: 9px 13px; }
.calendar-caption { display: flex; justify-content: space-between; gap: 12px; margin: 24px 0 12px; font-size: 12px; color: #64748b; }
.calendar-scroll { overflow: auto; max-height: calc(100dvh - 255px); min-height: 280px; border: 1px solid #dce2eb; border-radius: 10px; background: white; scroll-behavior: smooth; padding-bottom: 14px; }
.calendar-grid { min-width: 670px; }
.resource-headers { display: grid; grid-template-columns: 74px 1fr 1fr; position: sticky; top: 0; z-index: 5; background: #fff; border-bottom: 1px solid #dce2eb; }
.resource-headers h2 { margin: 0; padding: 21px 20px; border-left: 1px solid #dce2eb; font-size: 15px; font-weight: 650; }
.time-heading { padding: 23px 14px; font-size: 11px; color: #748197; }
.resource-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 10px; background: #5475c3; }
.dot-phonebooth { background: #269b8a; }
.timeline { position: relative; display: grid; grid-template-columns: 74px 1fr 1fr; height: calc(var(--minutes) * 2px); }
.time-axis { position: relative; background: #fcfdff; }
.time-axis > span { position: absolute; right: 12px; font-size: 11px; color: #758198; transform: translateY(-50%); }
.time-axis > span:first-child { transform: none; }
.resource-column { position: relative; border-left: 1px solid #dce2eb; min-width: 0; }
.grid-line { position: absolute; width: 100%; border-top: 1px solid #f0f2f6; pointer-events: none; }
.grid-line.whole-hour { border-color: #dfe5ed; }
.booking { position: absolute; z-index: 1; padding: 2px 5px; min-width: 0; }
.booking-content { height: 100%; border: 1px solid #cbd9f6; border-left: 4px solid #557bce; border-radius: 5px; background: #eaf0fc; padding: 7px 10px; display: flex; flex-direction: column; gap: 4px; overflow: auto; font-size: 12px; color: #28416a; overflow-wrap: anywhere; }
.booking strong { font-size: 14px; }
.booking-phonebooth .booking-content { background: #e5f5f0; border-color: #bce1d6; border-left-color: #27957f; color: #205e52; }
.booking:focus { z-index: 3; }
.now-line { position: absolute; left: 65px; right: 0; border-top: 2px solid #e45c62; z-index: 4; pointer-events: none; }
.now-line span { position: absolute; left: -43px; top: -10px; border-radius: 4px; background: #e45c62; color: white; padding: 2px 5px; font-size: 10px; }
@media (max-width: 700px) { .app-header { padding: 14px 16px; align-items: flex-start; } .account { gap: 10px; flex-wrap: wrap; justify-content: flex-end; font-size: 12px; } .day-calendar { padding: 20px 12px; } .calendar-controls { gap: 8px; } .date-form { width: 100%; } .calendar-caption span:last-child { display: none; } .calendar-scroll { max-height: 65dvh; } }

dialog { border: 1px solid #dce2eb; border-radius: 12px; padding: 24px; width: min(520px, 94vw); max-height: 90dvh; overflow: auto; }
dialog::backdrop { background: #19212b88; }
dialog label { display: grid; gap: 5px; }
dialog input { padding: 10px; font: inherit; border: 1px solid #8795a5; border-radius: 6px; min-width: 0; }
dialog small { color: #a02020; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.danger { background: #a02020; }
button:disabled { opacity: .6; cursor: wait; }
.booking, .resource-column { cursor: pointer; }

.view-switch { display: flex; margin: 0; gap: 4px; }
.view-switch [aria-current=page] { background: #2455c7; color: white; border-color: #2455c7; }
.month-scroll { overflow-x: auto; background: white; border: 1px solid #dce2eb; border-radius: 10px; }
.month-grid { table-layout: fixed; min-width: 840px; }
.month-grid th { font-size: 12px; color: #64748b; background: #f8fafc; }
.month-grid td { vertical-align: top; height: 150px; padding: 8px; border-right: 1px solid #e5e7eb; }
.month-grid td:last-child { border-right: 0; }
.month-grid tr:last-child td { border-bottom: 0; }
.month-date { display: inline-block; padding: 3px 7px; margin-bottom: 7px; font-size: 13px; font-weight: 650; text-decoration: none; border-radius: 5px; }
.outside-month { background: #f8fafc; }
.outside-month .month-date { color: #64748b; }
.is-today .month-date { background: #2455c7; color: white; }
.month-booking { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; padding: 6px 7px; border-radius: 5px; border-left: 3px solid #557bce; background: #eaf0fc; color: #28416a; font-size: 11px; cursor: pointer; overflow-wrap: anywhere; }
.month-booking.booking-phonebooth { border-color: #27957f; background: #e5f5f0; color: #205e52; }
.month-booking time { font-weight: 650; }
.month-booking:hover { filter: brightness(.96); }
