:root {
  --bg: #080a0b;
  --panel: #121517;
  --panel-2: #1a1e21;
  --line: rgba(255, 255, 255, 0.13);
  --text: #f8f4ec;
  --muted: #b8b4ad;
  --gold: #e5b557;
  --gold-soft: #f4cf7a;
  --danger: #ff8b7f;
  --success: #8ee59d;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(229, 181, 87, 0.16), transparent 28%),
    linear-gradient(180deg, #101315, #080a0b);
  font-family: Arial, Helvetica, sans-serif;
}

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

button,
a {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.admin-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 46px;
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.login-card {
  width: min(440px, 100%);
  padding: 30px;
  background: rgba(18, 21, 23, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.login-card img {
  width: 190px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

h1 {
  font-size: clamp(34px, 4vw, 48px);
}

h2 {
  font-size: 28px;
}

.muted,
#ownerEmailLabel {
  color: var(--muted);
}

form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

label {
  display: grid;
  gap: 7px;
}

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

input,
select {
  min-height: 48px;
  padding: 0 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: 0;
}

input:focus,
select:focus {
  border-color: rgba(229, 181, 87, 0.72);
  box-shadow: 0 0 0 3px rgba(229, 181, 87, 0.12);
}

select option {
  color: #111;
  background: #fff;
}

button,
.header-actions a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

form button,
.booking-actions button[data-status="approved"] {
  color: #111;
  background: var(--gold);
  border-color: var(--gold);
}

.message {
  min-height: 22px;
  margin: 16px 0 0;
  color: var(--danger);
  font-weight: 800;
}

.admin-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  padding-top: 18px;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.stats-grid article,
.toolbar,
.calendar-panel,
.price-panel,
.booking-card {
  background: rgba(18, 21, 23, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.stats-grid article {
  min-height: 104px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 18px;
}

.stats-grid span {
  color: var(--gold-soft);
  font-size: 34px;
  font-weight: 900;
}

.stats-grid strong {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px;
}

.calendar-panel {
  margin-bottom: 18px;
  padding: 18px;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.calendar-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.calendar-item {
  padding: 13px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
}

.calendar-item strong,
.calendar-item span {
  display: block;
}

.calendar-item strong {
  color: var(--gold-soft);
}

.calendar-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.price-panel {
  margin-bottom: 18px;
  padding: 18px;
}

.price-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.price-actions button {
  color: #111;
  background: var(--gold);
  border-color: var(--gold);
}

#priceMessage {
  min-height: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

#priceMessage.success {
  color: var(--success);
}

#priceMessage.error {
  color: var(--danger);
}

.price-editor-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 14px;
  align-items: start;
}

.price-editor-column {
  min-width: 0;
}

.price-editor-column h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.price-editor-list {
  display: grid;
  gap: 10px;
  max-height: 560px;
  overflow: auto;
  padding-right: 4px;
}

.price-card {
  padding: 13px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
}

.price-card h4 {
  margin: 0 0 4px;
  font-size: 16px;
}

.price-card p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.rate-editor {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) 110px;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.rate-editor span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.rate-editor input {
  min-height: 40px;
  text-align: right;
}

.booking-list {
  display: grid;
  gap: 14px;
}

.booking-card {
  padding: 18px;
}

.booking-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.booking-top h3 {
  margin: 0 0 5px;
  color: #fff;
  font-size: 22px;
}

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

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.badge {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: #111;
  background: var(--gold);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.badge.pending {
  background: var(--gold);
}

.badge.approved,
.badge.completed {
  background: var(--success);
}

.badge.declined,
.badge.cancelled {
  background: var(--danger);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.detail-panel {
  padding: 13px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
}

.detail-panel h4 {
  margin: 0 0 10px;
  color: var(--gold-soft);
  font-size: 13px;
  text-transform: uppercase;
}

.detail-row {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-row:first-of-type {
  border-top: 0;
}

.detail-row span {
  color: var(--muted);
  font-size: 12px;
}

.detail-row strong {
  color: #fff;
  font-size: 13px;
  word-break: break-word;
}

.booking-message {
  margin-top: 12px;
  padding: 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  white-space: pre-wrap;
}

.booking-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.booking-actions .danger-action {
  color: #fff;
  background: linear-gradient(135deg, #c43131, #852020);
  border-color: rgba(255, 120, 120, 0.4);
}

.booking-actions .danger-action:hover {
  border-color: rgba(255, 180, 180, 0.65);
  box-shadow: 0 14px 28px rgba(196, 49, 49, 0.22);
}

.payment-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  padding: 0 12px;
  color: #111;
  background: var(--gold);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.action-link {
  margin-top: 0;
}

.payment-create {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.payment-create input {
  width: 150px;
  min-height: 44px;
}

.auto-payment-amount {
  min-height: 44px;
  display: grid;
  gap: 2px;
  padding: 8px 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
}

.auto-payment-amount span,
.auto-payment-amount small,
.manual-payment-note {
  color: var(--muted);
  font-size: 12px;
}

.auto-payment-amount strong {
  color: var(--gold-soft);
  font-size: 15px;
}

.manual-payment-note {
  width: 100%;
  text-align: right;
}

.payment-hint {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.empty-state {
  padding: 28px;
  text-align: center;
  color: var(--muted);
  background: rgba(18, 21, 23, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

@media (max-width: 900px) {
  .admin-header,
  .booking-top,
  .section-title {
    align-items: stretch;
    flex-direction: column;
  }

  .stats-grid,
  .calendar-list,
  .price-editor-grid,
  .detail-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .price-editor-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .admin-shell {
    width: min(100% - 22px, 1200px);
    padding-top: 12px;
  }

  .stats-grid,
  .toolbar,
  .calendar-list,
  .price-editor-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .price-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .rate-editor {
    grid-template-columns: 1fr;
  }
}
