:root {
    --bg: #f2f0eb;
    --surface: #fff;
    --text: #242424;
    --muted: #6c6c6c;
    --line: #dedbd3;
    --gold: #c2933f;
    --gold-dark: #7b5920;
    --teal: #03484b;
    --teal-dark: #062f31;
    --danger: #a93838;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Segoe UI", Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.admin-header { min-height: 72px; padding: 0 30px; display: flex; align-items: center; justify-content: space-between; gap: 30px; background: #090909; color: #fff; border-bottom: 2px solid var(--gold); }
.admin-brand { display: flex; align-items: center; gap: 14px; color: #e7c878; font-family: Georgia, serif; letter-spacing: .08em; }
.admin-brand img { width: 58px; height: 58px; object-fit: cover; }
.admin-header nav { display: flex; align-items: center; gap: 22px; }
.admin-header nav a, .admin-header nav button { color: #d7d7d7; border: 0; background: transparent; cursor: pointer; }
.admin-header nav a:hover, .admin-header nav button:hover { color: #e7c878; }
.admin-header form { margin: 0; }
.admin-main { width: min(calc(100% - 40px), 1380px); margin: 34px auto 70px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-heading.compact { align-items: center; }
.page-heading p { margin: 0 0 5px; color: var(--gold-dark); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.page-heading h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 400; }
.primary-action, .secondary-action, .danger-action, .filters button, .login-card button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; padding: 0 20px; border: 0; border-radius: 4px; cursor: pointer; font-weight: 700; }
.primary-action, .filters button, .login-card button { background: var(--teal); color: #fff; }
.secondary-action { border: 1px solid var(--teal); color: var(--teal); background: transparent; }
.danger-action { background: #f7e2e2; color: var(--danger); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px; }
.stats-grid article { padding: 22px; border-top: 3px solid var(--gold); background: var(--surface); box-shadow: 0 8px 24px rgba(0,0,0,.06); }
.stats-grid span { display: block; color: var(--muted); font-size: .9rem; }
.stats-grid strong { display: block; margin-top: 8px; font-family: Georgia, serif; font-size: 2.2rem; color: var(--teal); }
.admin-panel { padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 8px 28px rgba(0,0,0,.045); }
.admin-panel h2 { margin: 0 0 22px; font-family: Georgia, serif; font-size: 1.55rem; font-weight: 400; }
.filters { display: grid; grid-template-columns: 1fr 250px auto auto; gap: 12px; margin-bottom: 22px; }
.filters input, .filters select, .update-panel input, .update-panel select, .update-panel textarea { width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid #cfcac0; border-radius: 4px; background: #fff; }
.filters a { display: grid; place-items: center; color: var(--muted); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 12px 14px; background: #f5f3ee; color: #68645d; text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
td { padding: 15px 14px; border-bottom: 1px solid #ece9e2; vertical-align: top; }
td small { display: block; margin-top: 5px; color: var(--muted); font-size: .78rem; }
.row-action { color: var(--teal); font-weight: 700; }
.status { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.status-pending { background: #fff0c9; color: #795800; }
.status-confirmed { background: #d7f2e1; color: #17653a; }
.status-cancelled, .status-rejected { background: #f7dddd; color: #8d2727; }
.status-completed { background: #e4e7eb; color: #4a5159; }
.empty-state { padding: 35px !important; color: var(--muted); text-align: center; }
.pagination { display: flex; gap: 7px; margin-top: 20px; }
.pagination a { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); background: #fff; }
.pagination a.active { background: var(--teal); color: #fff; border-color: var(--teal); }
.details-grid { display: grid; grid-template-columns: 1.45fr .8fr; gap: 24px; align-items: start; }
.blocks-layout { grid-template-columns: .7fr 1.3fr; }
.booking-details dl { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0; }
.booking-details dl div { padding: 14px 0; border-bottom: 1px solid #ece9e2; }
.booking-details dl div:nth-child(odd) { padding-right: 20px; }
.booking-details dl .full { grid-column: 1/-1; }
dt { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
dd { margin: 5px 0 0; }
.update-panel form { display: grid; gap: 17px; }
.update-panel label { display: grid; gap: 7px; font-weight: 600; }
.hint { margin: 18px 0 0; padding: 12px; background: #f5f2e9; color: #68645d; font-size: .85rem; }
.history-panel { margin-top: 24px; }
.timeline { display: grid; gap: 0; }
.timeline article { position: relative; display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding-bottom: 22px; }
.timeline article:not(:last-child)::before { content: ""; position: absolute; left: 6px; top: 12px; bottom: 0; width: 1px; background: #d5c8aa; }
.timeline-dot { position: relative; z-index: 1; width: 13px; height: 13px; margin-top: 5px; border: 3px solid #fff; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.timeline time { margin-left: 10px; color: var(--muted); font-size: .8rem; }
.timeline p { margin: 6px 0; }
.timeline small { color: var(--muted); }
.block-list { display: grid; gap: 12px; }
.block-list article { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px; border: 1px solid #e5e1d9; border-left: 4px solid var(--gold); }
.block-list p { margin: 5px 0; }
.block-list small { color: var(--muted); }
.flash { margin-bottom: 18px; padding: 13px 16px; border-radius: 4px; }
.flash.success { background: #dff2e5; color: #1e653d; }
.flash.error { background: #f8dede; color: #8d2727; }
.back-link { display: inline-block; margin-bottom: 10px; color: var(--teal); }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at center, #075054, #050505 66%); }
.login-card { width: min(430px, 100%); padding: 34px; background: #fff; border-top: 4px solid var(--gold); box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.login-card img { width: 190px; margin: 0 auto 18px; }
.login-card h1 { margin: 0; text-align: center; font-family: Georgia, serif; font-weight: 400; }
.login-card > p { color: var(--muted); text-align: center; }
.login-card form { display: grid; gap: 16px; margin-top: 24px; }
.login-card label { display: grid; gap: 6px; font-weight: 600; }
.login-card input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #cfcac0; }
.login-card .remember { display: flex; grid-template-columns: auto 1fr; align-items: center; font-weight: 400; }
.login-card .remember input { width: auto; min-height: 0; }
.login-card span[field-validation-for] { color: var(--danger); font-size: .8rem; }
.validation-summary { color: var(--danger); }
.back-link { margin-top: 18px; text-align: center; }

@media (max-width: 900px) {
    .admin-header { align-items: flex-start; padding: 10px 18px; }
    .admin-header nav { flex-wrap: wrap; justify-content: flex-end; gap: 12px; }
    .admin-brand span { display: none; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .details-grid, .blocks-layout { grid-template-columns: 1fr; }
    .filters { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 580px) {
    .admin-main { width: calc(100% - 22px); margin-top: 22px; }
    .admin-header { display: block; }
    .admin-header nav { margin-top: 8px; justify-content: flex-start; }
    .page-heading { align-items: flex-start; flex-direction: column; }
    .stats-grid { grid-template-columns: 1fr; }
    .filters { grid-template-columns: 1fr; }
    .booking-details dl { grid-template-columns: 1fr; }
    .booking-details dl div:nth-child(odd) { padding-right: 0; }
    .block-list article { align-items: flex-start; flex-direction: column; }
}
.password-panel { max-width: 650px; }
.update-panel span[field-validation-for] { color: var(--danger); font-size: .82rem; font-weight: 400; }
