.admin-main { padding: 2rem 0 4rem; }
.admin-head-actions { display: flex; align-items: center; gap: 1rem; }
.head-link { color: var(--white); font-weight: 700; text-decoration: none; }
.head-link:hover { color: var(--white); text-decoration: underline; }
.muted { color: var(--muted); }
.mt { margin-top: 2rem; }
.login { max-width: 420px; margin: 3rem auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 2rem; }
.login h1 { font-size: var(--step-3); }
.btn-wide { width: 100%; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; margin-bottom: 1.2rem; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1rem 1.2rem; text-align: left; font: inherit; color: var(--ink); }
button.stat { cursor: pointer; }
button.stat:hover { border-color: var(--green); }
.stat strong { display: block; font: 800 var(--step-3)/1.1 var(--display); color: var(--green); }
.stat span { color: var(--muted); font-size: var(--step--1); }
.stat--alert.has-items { background: var(--marigold-soft); border-color: var(--marigold); }
.stat--alert.has-items strong { color: var(--ink); }
@media (max-width: 800px) { .stats { grid-template-columns: 1fr 1fr; } }

.today { background: var(--green); color: var(--white); border-radius: var(--radius-lg); padding: 1rem 1.2rem; margin-bottom: 1.5rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: baseline; }
.today h2 { font-size: var(--step-1); color: var(--white); margin: 0; }
.today span { color: #e1ebe5; }
.today b { color: var(--marigold); }

.tabs { display: flex; gap: .3rem; border-bottom: 2px solid var(--line); margin-bottom: 1.5rem; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: .8rem 1rem; font: 700 var(--step-0) var(--body); color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--green); border-bottom-color: var(--green); }
.tabs button:hover { color: var(--ink); }

.filters { display: grid; grid-template-columns: 2fr 1.3fr 1fr 1fr 1fr auto; gap: .8rem; align-items: end; }
.filters .field { margin: 0; }
.filters label { font-size: var(--step--1); }
.filter-actions { display: flex; gap: .4rem; padding-bottom: 4px; }
@media (max-width: 1000px) { .filters { grid-template-columns: 1fr 1fr; } .filters .field:first-child { grid-column: 1 / -1; } .filter-actions { grid-column: 1 / -1; } }
.result-count { color: var(--muted); font-size: var(--step--1); margin: 1rem 0 .5rem; }

.table-wrap { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
table.bookings { width: 100%; border-collapse: collapse; font-size: .95rem; }
.bookings th { text-align: left; font-size: var(--step--1); color: var(--muted); padding: .8rem 1rem; background: var(--paper); border-bottom: 1px solid var(--line); }
.bookings td { padding: .85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.bookings tr:last-child td { border-bottom: 0; }
.bookings tr.is-past td { opacity: .6; }
.bookings .when strong { display: block; }
.bookings small { color: var(--muted); display: block; }
.bookings .ref { font-size: .8rem; color: var(--muted); }
.row-actions { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: flex-end; }
.empty { padding: 2.5rem 1rem; text-align: center; color: var(--muted); }
@media (max-width: 760px) {
  .bookings thead { display: none; }
  .bookings, .bookings tbody, .bookings tr, .bookings td { display: block; width: 100%; }
  .bookings tr { padding: .9rem 1rem; border-bottom: 1px solid var(--line); }
  .bookings td { border: 0; padding: .2rem 0; }
  .row-actions { justify-content: flex-start; margin-top: .5rem; }
}

.pill { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.pill--pending { background: var(--marigold-soft); color: #7a5600; border: 1px solid var(--marigold); }
.pill--confirmed { background: var(--green-soft); color: var(--green-deep); }
.pill--cancelled { background: #eceeed; color: #6b7570; text-decoration: line-through; }
.pill--paid { background: var(--green); color: var(--white); }
.pill--unpaid { background: var(--danger-soft); color: var(--danger); }
.pill--blocked { background: #e4e7e5; color: #4d5752; }

.acal-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.acal-head h2 { margin: 0; font-size: var(--step-2); min-width: 9ch; }
.cal-nav { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line); background: var(--white); font: 700 1.5rem/1 var(--display); cursor: pointer; color: var(--green); }
.acal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.acal .dow { font-size: .8rem; font-weight: 700; color: var(--muted); padding: .2rem; }
.acal .cell { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .35rem; min-height: 110px; display: flex; flex-direction: column; gap: 3px; }
.acal .cell.is-today { border: 2px solid var(--green); }
.acal .cell.is-past { background: var(--paper); }
.acal .num { font: 700 .9rem var(--display); }
.acal .s { font-size: .74rem; border-radius: 4px; padding: .15rem .3rem; text-align: left; border: 0; font-family: var(--body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: #f3f5f4; color: #9aa5a0; }
.acal button.s { cursor: pointer; }
.acal .s.pending { background: var(--marigold-soft); color: #6d4d00; font-weight: 700; }
.acal .s.confirmed { background: var(--green-soft); color: var(--green-deep); font-weight: 700; }
.acal .s.blocked { background: #e4e7e5; color: #4d5752; }
.acal-key { display: flex; gap: .6rem; margin-top: 1rem; }
@media (max-width: 760px) { .acal .cell { min-height: 74px; } .acal .s { font-size: 0; height: 8px; padding: 0; } .acal .dow { font-size: .7rem; } }

.admin-form { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.5rem; max-width: 900px; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 1rem; }
@media (max-width: 700px) { .row-3 { grid-template-columns: 1fr; } }
.checks { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; }
.checks .check { font-weight: 400; align-items: center; }
.block-list { list-style: none; padding: 0; margin: 0; max-width: 900px; }
.block-list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }

dialog { border: 0; border-radius: var(--radius-lg); padding: 0; width: min(720px, calc(100% - 1.5rem)); max-height: calc(100vh - 2rem); color: var(--ink); }
dialog::backdrop { background: rgba(20, 51, 38, .55); }
dialog form { padding: 1.5rem; }
.dlg-head { display: flex; justify-content: space-between; align-items: start; gap: 1rem; }
.dlg-head h2 { font-size: var(--step-2); }
.dlg-close { background: none; border: 0; font-size: 2rem; line-height: 1; cursor: pointer; color: var(--muted); }
.detail { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.2rem; margin: 0 0 1.4rem; padding: 1rem; background: var(--paper); border-radius: var(--radius-sm); }
.detail dt { color: var(--muted); font-size: var(--step--1); font-weight: 700; padding-top: .1rem; }
.detail dd { margin: 0; word-break: break-word; }
.dlg-actions { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.dlg-actions .spacer { flex: 1; }

.toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--white); padding: .8rem 1.3rem; border-radius: 999px; font-weight: 700; z-index: 200; box-shadow: 0 6px 24px rgba(0,0,0,.2); }
section.panel { padding: 0; }
section.login { padding: 2rem; }
.filters label { min-height: 1.6em; }
