:root {
  --red: #8f211b;
  --red-dark: #641612;
  --ink: #261f1a;
  --muted: #746b61;
  --line: #e4d8c9;
  --paper: #fffdf9;
  --surface: #f7f4ee;
  --green: #2f7d51;
  --amber: #a96f17;
  --danger: #b8322a;
  --blue: #2f5f8f;
  --shadow: 0 18px 50px rgba(38, 31, 26, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding: 12px clamp(18px, 5vw, 56px);
  background: rgba(255, 253, 249, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
}

.top-nav,
.hero-actions,
.inline-actions,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.top-nav a {
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

.top-nav a:hover {
  color: var(--red);
}

main {
  width: 100%;
}

.hero {
  position: relative;
  min-height: min(680px, calc(100vh - 72px));
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #fff;
  background: #1e1713;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.74;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(24, 18, 14, 0.88),
    rgba(24, 18, 14, 0.38)
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  padding: clamp(38px, 8vw, 96px) clamp(20px, 6vw, 72px);
}

.hero h1 {
  margin: 0;
  max-width: 680px;
  font-size: clamp(44px, 7vw, 86px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero p {
  max-width: 560px;
  font-size: 18px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffd7c6;
}

.button,
button.text-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.button:hover,
button.text-link:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--red);
  color: #fff;
}

.button.primary:hover {
  background: var(--red-dark);
}

.button.secondary {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

.button.ghost,
.button.ghost-light {
  background: transparent;
  border-color: var(--line);
}

.button.ghost-light,
.button.light {
  color: #fff;
}

.button.light {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.4);
}

.button.danger {
  background: var(--danger);
  color: #fff;
}

.button.success {
  background: var(--green);
  color: #fff;
}

.button.small {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 14px;
}

.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.content-grid,
.admin-grid {
  width: min(1160px, calc(100% - 32px));
  margin: 32px auto;
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.18fr);
  gap: 24px;
  align-items: start;
}

.first-screen {
  margin-top: 24px;
}

.side-photo {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 18px;
}

.info-panel h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
  letter-spacing: 0;
}

.info-panel .hero-actions {
  margin: 18px 0 24px;
}

.content-grid.compact,
.admin-grid.wide-left {
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
}

.narrow {
  width: min(850px, calc(100% - 32px));
  margin: 32px auto;
}

.panel,
.form-panel,
.info-panel,
.reservation-summary {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(20px, 3vw, 30px);
  box-shadow: var(--shadow);
}

.info-panel {
  position: sticky;
  top: 92px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.panel-heading h1,
.panel-heading h2,
.panel h2,
.info-panel h2 {
  margin: 0;
  line-height: 1.15;
}

.pill,
.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.pill {
  color: var(--red);
  background: #fff1ec;
}

.status.warning {
  color: #6f4309;
  background: #fff2c7;
}

.status.success {
  color: #185f38;
  background: #dff4e8;
}

.status.danger {
  color: #8c2019;
  background: #ffe2df;
}

.status.muted {
  color: #5f6570;
  background: #eceff3;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #d7c8b7;
  border-radius: 8px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47, 95, 143, 0.15);
}

.form-panel .button,
.panel .button {
  margin-top: 16px;
}

.error {
  color: var(--danger);
  font-weight: 800;
}

.alert,
.flash {
  width: min(1160px, calc(100% - 32px));
  margin: 18px auto;
  padding: 13px 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-weight: 800;
}

.alert {
  width: 100%;
  margin: 0 0 16px;
}

.success {
  color: #185f38;
  background: #e3f5ea;
  border-color: #bde2cc;
}

.danger {
  color: #8c2019;
  background: #ffe8e5;
  border-color: #ffc9c2;
}

.warning {
  color: #6f4309;
  background: #fff2c7;
  border-color: #f2d889;
}

.hp-field {
  position: absolute;
  left: -9999px;
}

.check-list {
  padding-left: 18px;
  color: var(--muted);
}

.check-list li + li {
  margin-top: 10px;
}

.details-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.details-list.single {
  grid-template-columns: 1fr;
}

.details-list div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

dd {
  margin: 2px 0 0;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.note {
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.timeline,
.request-list,
.notification-list {
  display: grid;
  gap: 12px;
}

.timeline article,
.request-card,
.notification-list a {
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
}

.notification-list a {
  display: grid;
  gap: 3px;
}

.notification-list a.unread {
  border-color: #c58a31;
  background: #fff9e8;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 5vw, 56px);
  color: #fff;
  background: #211914;
}

.site-footer div {
  display: grid;
  gap: 5px;
}

.site-footer a {
  color: #fff;
}

.admin-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
  padding: 20px;
  color: #fff;
  background: #211914;
}

.admin-brand {
  color: #fff;
}

.admin-nav {
  display: grid;
  align-content: start;
  gap: 8px;
}

.admin-nav a,
.admin-user a {
  padding: 10px 12px;
  color: #f8eee5;
  text-decoration: none;
  border-radius: 8px;
}

.admin-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.admin-user {
  display: grid;
  gap: 8px;
}

.admin-shell {
  min-width: 0;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 82px;
  padding: 18px 28px;
  background: rgba(247, 244, 238, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.admin-topbar h1 {
  margin: 0;
}

.admin-content {
  padding: 24px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.metric {
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric span {
  color: var(--muted);
  font-weight: 900;
}

.metric strong {
  font-size: 38px;
  line-height: 1;
}

.admin-grid {
  width: 100%;
  margin: 0 0 24px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 740px;
}

th,
td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 190px 180px auto auto;
  gap: 12px;
  align-items: end;
}

.blackout-form {
  display: grid;
  grid-template-columns: 180px minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.text-link {
  min-height: auto;
  padding: 0;
  color: var(--red);
  background: transparent;
  border: 0;
  font-weight: 900;
  text-decoration: none;
}

.notification-pill,
.icon-button {
  min-width: 42px;
  min-height: 42px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: var(--red);
  border: 0;
  border-radius: 8px;
  font-weight: 900;
  text-decoration: none;
}

.icon-button[hidden] {
  display: none;
}

.empty {
  color: var(--muted);
  font-weight: 800;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-row input {
  width: auto;
  min-height: auto;
}

.decision-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  margin-top: 14px;
}

code {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 3px 6px;
  background: #f1ece4;
  border-radius: 6px;
}

/* Modal */
.modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 1000 !important;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(38, 31, 26, 0.8) !important;
  backdrop-filter: blur(4px);
}

.modal.active {
  display: flex !important;
}

.modal-content {
  position: relative;
  width: min(800px, 100%);
  max-height: 90vh;
  background: var(--paper);
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h2 {
  margin: 0;
}

.modal-close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  background: var(--surface);
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px;
}

.menu-section h3 {
  color: var(--red);
  border-bottom: 2px solid var(--red);
  padding-bottom: 8px;
  margin-top: 0;
}

.menu-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}

.menu-item:last-child {
  border-bottom: 0;
}

.menu-item span:last-child {
  font-weight: 800;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .content-grid,
  .content-grid.compact,
  .admin-grid,
  .admin-grid.wide-left {
    grid-template-columns: 1fr;
  }

  .info-panel {
    position: static;
  }

  .admin-page {
    display: block;
  }

  .admin-sidebar {
    position: static;
    height: auto;
    grid-template-rows: auto auto auto;
  }

  .admin-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters,
  .blackout-form,
  .decision-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header,
  .admin-topbar,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    min-height: 620px;
  }

  .hero h1 {
    font-size: 44px;
  }

  .form-grid,
  .details-list,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .admin-content {
    padding: 16px;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-nav {
    width: 100%;
    justify-content: space-between;
  }
}
