:root {
  color-scheme: light;
  --bg: #f6f4f1;
  --surface: #ffffff;
  --surface-soft: #fbfaf8;
  --text: #151515;
  --muted: #6f6a64;
  --line: #e2ddd6;
  --blue: #151515;
  --blue-dark: #111111;
  --blue-soft: #f2eee9;
  --orange: #ff7a1a;
  --orange-dark: #c84f00;
  --orange-soft: #fff2e5;
  --red: #c9342b;
  --green: #126b49;
  --shadow: 0 10px 26px rgba(21, 21, 21, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, #151515 0, #241f1a 210px, #f6f4f1 211px, #f6f4f1 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
}

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

button {
  -webkit-tap-highlight-color: transparent;
}

.app {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 16px 14px 42px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 176px;
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 122, 26, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 122, 26, 0.24), transparent 42%),
    linear-gradient(135deg, #111111 0%, #1f1d1b 58%, #332416 100%);
  color: #fff;
  box-shadow: var(--shadow);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--orange);
}

.heroNav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  width: 214px;
  min-height: 58px;
}

.logo {
  display: block;
  width: 214px;
  height: auto;
  max-height: 58px;
  object-fit: contain;
}

.logoFallback {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
}

.heroText {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  padding-top: 24px;
}

.eyebrow {
  margin: 0 0 6px;
  color: #ffd0aa;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: 0;
}

h2 {
  font-size: 18px;
  line-height: 1.3;
}

h3 {
  margin-bottom: 10px;
  color: var(--text);
  font-size: 15px;
}

.heroSub {
  margin-top: 10px;
  width: min(600px, 100%);
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
  line-height: 1.55;
}

.heroSlogan {
  margin-top: 12px;
  padding: 10px 12px;
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(255, 122, 26, 0.42);
  border-radius: 8px;
  background: rgba(255, 122, 26, 0.16);
  color: #ffd0aa;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.45;
}

.panel {
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
  padding: 4px;
  border-radius: 8px;
  background: #f2eee9;
}

.tab,
.ghost,
.primary,
.slot,
.statusBtn {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

.tab {
  border-color: transparent;
  background: transparent;
  font-weight: 800;
}

.tab.active {
  border-color: #e6d6c7;
  background: #fff;
  color: var(--blue-dark);
  box-shadow: 0 4px 12px rgba(255, 122, 26, 0.14);
}

.primary {
  width: 100%;
  border-color: var(--orange);
  background: var(--orange);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(255, 122, 26, 0.24);
}

.primary.compact {
  width: auto;
  min-width: 86px;
  padding: 0 16px;
}

.primary:hover {
  background: #ff7d12;
}

.ghost {
  width: auto;
  padding: 0 14px;
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
}

.statusBtn {
  min-height: 34px;
  padding: 0 10px;
  border-color: #e6d6c7;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 800;
}

.primary:active,
.ghost:active,
.slot:active,
.statusBtn:active {
  transform: translateY(1px);
}

.form {
  display: grid;
  gap: 12px;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.inlineForm {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 12px;
}

.contentTypeForm {
  grid-template-columns: 1fr auto auto;
}

.adminForm {
  grid-template-columns: 1fr 1fr 1fr auto;
}

label {
  display: grid;
  gap: 6px;
  color: #2a241f;
  font-size: 14px;
  font-weight: 800;
}

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

textarea {
  min-height: 92px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #a7a09a;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 122, 26, 0.14);
}

.checkLabel {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #ded8d0;
  border-radius: 8px;
  background: #fff;
  color: #2a241f;
  white-space: nowrap;
}

.checkLabel input {
  width: 18px;
  min-height: 18px;
  margin: 0;
}

.confirmPolicy {
  justify-content: flex-start;
  background: var(--orange-soft);
  color: #6c3607;
  white-space: normal;
}

.notice {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid #ffd7b5;
  border-left: 4px solid var(--orange);
  border-radius: 8px;
  background: #fff8f1;
  color: #5d310b;
}

.notice.admin {
  border-color: #e6d6c7;
  border-left-color: #151515;
  background: #fbfaf8;
  color: #151515;
}

.sectionHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.sectionHead h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.sectionHead h2::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 999px;
  background: var(--orange);
}

.sectionHead span {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.policyPanel {
  border-color: #ffd9ba;
}

.policyBody {
  display: grid;
  gap: 10px;
  color: #2a241f;
  font-size: 14px;
  line-height: 1.62;
}

.policyLead {
  padding: 11px 12px;
  border-radius: 8px;
  background: var(--orange-soft);
  color: #6c3607;
  font-weight: 900;
}

.policyGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.policyGrid > div,
.policyDetails {
  border: 1px solid #e2ddd6;
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.policyBody h3 {
  color: var(--blue-dark);
}

.policyBody ul {
  margin: 0;
  padding-left: 18px;
}

.policyBody li + li {
  margin-top: 5px;
}

.policyDetails summary {
  color: var(--blue-dark);
  cursor: pointer;
  font-weight: 900;
}

.policyDetails p,
.policyDetails ul,
.policyDetails .policyGrid {
  margin-top: 10px;
}

.schedule {
  display: grid;
  gap: 14px;
}

.day {
  display: grid;
  gap: 9px;
  padding-top: 12px;
  border-top: 1px solid #e8e0d8;
}

.day:first-child {
  padding-top: 0;
  border-top: 0;
}

.dayTitle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #1b1815;
  font-weight: 900;
}

.slotGrid {
  display: grid;
  grid-template-columns: repeat(5, minmax(116px, 1fr));
  gap: 8px;
}

.slot {
  min-height: 60px;
  padding: 8px;
  display: grid;
  align-content: center;
  gap: 4px;
  border-color: #e6d6c7;
  background: #fbfaf8;
  color: var(--text);
  font-weight: 850;
}

.slot span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.slot.selected {
  border-color: var(--orange);
  background: #fff4e8;
  color: var(--orange-dark);
}

.slot.full {
  border-color: #e5ded6;
  background: #f2efeb;
  color: #98a5b5;
  cursor: not-allowed;
}

.slot.full span {
  color: var(--red);
}

.slot.closed {
  border-color: #f1bdb7;
  background: #fff0ee;
  color: var(--red);
}

.dashboard {
  display: grid;
  gap: 14px;
}

.metricGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.metric {
  min-height: 84px;
  padding: 14px;
  border: 1px solid #e2ddd6;
  border-radius: 8px;
  background: var(--surface-soft);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  margin-top: 8px;
  color: var(--blue-dark);
  font-size: 30px;
  line-height: 1;
}

.dashGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.dashGrid.oneCol {
  grid-template-columns: 1fr;
}

.barList {
  display: grid;
  gap: 9px;
}

.barRow {
  display: grid;
  grid-template-columns: 76px 1fr 28px;
  align-items: center;
  gap: 9px;
  color: #2a241f;
  font-size: 13px;
}

.barTrack {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #ece5de;
}

.barTrack i {
  display: block;
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
  background: #151515;
}

.accentBar i {
  background: var(--orange);
}

.dashRecent,
.bookingList,
.topicList {
  display: grid;
  gap: 8px;
}

.recentRow {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid #e2ddd6;
  border-radius: 8px;
  background: var(--surface-soft);
  font-size: 13px;
}

.recentRow span,
.recentRow em {
  color: var(--muted);
  font-style: normal;
}

.topicItem,
.booking {
  border: 1px solid #e2ddd6;
  border-radius: 8px;
  background: var(--surface-soft);
}

.topicItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  padding: 9px 10px;
  color: #2a241f;
  font-weight: 850;
}

.miniTag {
  margin-left: auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #151515;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.booking {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.bookingTop {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.bookingTitle {
  color: var(--text);
  font-weight: 900;
}

.bookingMeta {
  display: grid;
  gap: 5px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.badge {
  align-self: start;
  border-radius: 999px;
  padding: 4px 8px;
  background: #151515;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.badge.confirmed,
.badge.completed {
  background: #e8f7ef;
  color: var(--green);
}

.badge.cancelled,
.badge.rejected {
  background: #fff0ee;
  color: var(--red);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.empty {
  padding: 16px;
  border: 1px dashed #d7cec4;
  border-radius: 8px;
  color: var(--muted);
  background: #fbfaf8;
  text-align: center;
}

.compactEmpty {
  padding: 12px;
}

.hidden {
  display: none !important;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 20;
  transform: translateX(-50%);
  width: min(520px, calc(100% - 28px));
  padding: 12px 14px;
  border-radius: 8px;
  background: #151515;
  color: #fff;
  text-align: center;
  box-shadow: 0 12px 28px rgba(22, 35, 59, 0.24);
}

@media (max-width: 760px) {
  body {
    background: linear-gradient(180deg, #151515 0, #241f1a 150px, #f6f4f1 151px, #f6f4f1 100%);
  }

  .app {
    padding: 10px 10px 34px;
  }

  .hero {
    min-height: 158px;
    padding: 14px;
  }

  .heroText {
    padding-top: 22px;
  }

  .brand {
    width: 186px;
    min-height: 50px;
  }

  .logo {
    width: 186px;
    max-height: 50px;
  }

  h1 {
    font-size: 26px;
  }

  h2 {
    font-size: 17px;
  }

  .heroSub {
    font-size: 13px;
  }

  .heroSlogan {
    font-size: 15px;
  }

  .panel {
    padding: 14px;
  }

  .grid2,
  .inlineForm,
  .contentTypeForm,
  .adminForm,
  .policyGrid {
    grid-template-columns: 1fr;
  }

  .slotGrid {
    grid-template-columns: 1fr 1fr;
  }

  .metricGrid {
    grid-template-columns: 1fr 1fr;
  }

  .dashGrid,
  .dashGrid.oneCol {
    grid-template-columns: 1fr;
  }

  .recentRow {
    grid-template-columns: 1fr;
  }

  .sectionHead {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .sectionHead span {
    text-align: left;
  }

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

  .miniTag {
    margin-left: 0;
  }

  .primary.compact {
    width: 100%;
  }
}
