:root {
  color-scheme: light;
  --ink: #111111;
  --muted: #6f6f6f;
  --line: #d8d8d8;
  --paper: #f1f1ef;
  --panel: #ffffff;
  --accent: #111111;
  --accent-dark: #000000;
  --gold: #8c8c8c;
  --danger: #b42318;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #ededeb;
}

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

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(340px, 42vw) 1fr;
}

.hero {
  min-height: 100vh;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.82)),
    url("./assets/logo-mariano-martinez.jpeg");
  background-position: center -150px;
  background-size: auto 108%;
  background-repeat: no-repeat;
  background-color: #050505;
  color: #ffffff;
}

.brand-bar {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 8px;
  background: #050505;
  overflow: hidden;
  font-weight: 800;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.eyebrow,
.section-label,
.kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 0.78rem;
  font-weight: 800;
}

.brand-bar h1 {
  margin: 2px 0 0;
  font-size: 1.1rem;
}

.hero-copy {
  max-width: 560px;
}

.hero-copy h2 {
  margin: 8px 0 16px;
  font-size: clamp(2.3rem, 6vw, 5rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-copy p:last-child {
  max-width: 460px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.03rem;
  line-height: 1.6;
}

.workspace {
  padding: 28px;
  overflow: auto;
}

.admin-page .app-shell,
.manage-page .app-shell {
  grid-template-columns: 1fr;
}

.admin-page .hero,
.manage-page .hero {
  display: none;
}

.admin-page .workspace,
.manage-page .workspace {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 28px 32px 42px;
}

.tabs {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #dededc;
}

.tab {
  min-width: 130px;
  border: 0;
  border-radius: 6px;
  padding: 10px 16px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.tab.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.booking-layout,
.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 18px;
  align-items: start;
}

#clientView .booking-layout {
  grid-template-columns: minmax(0, 760px);
}

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

.admin-grid .panel {
  min-width: 0;
}

.admin-grid .panel:first-child,
.admin-grid .panel:nth-child(5) {
  grid-column: 1 / -1;
}

.admin-grid .panel:nth-child(2),
.admin-grid .panel:nth-child(4) {
  grid-column: 1;
}

.admin-grid .panel:nth-child(3),
.admin-grid .panel:nth-child(6) {
  grid-column: 2;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.narrow-panel {
  max-width: 440px;
}

.panel-heading {
  margin-bottom: 18px;
}

.row-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-label {
  color: var(--gold);
}

h3,
h4 {
  margin: 3px 0 0;
}

label,
.field-title {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  color: var(--ink);
  background: #fbfbfa;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
}

form,
.panel,
.hours-editor,
.services-editor,
.month-planner {
  display: grid;
  gap: 16px;
}

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

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

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

.month-nav .secondary-action {
  min-height: 40px;
  padding-inline: 10px;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 9px;
  min-height: 50px;
}

.slot-button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfa;
  color: var(--ink);
  font-weight: 800;
}

.slot-button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.empty-state {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.primary-action,
.secondary-action,
.danger-action {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 11px 16px;
  font-weight: 900;
}

.primary-action {
  background: var(--accent);
  color: white;
}

.primary-action:hover {
  background: var(--accent-dark);
}

.secondary-action {
  border: 1px solid var(--line);
  background: #fbfbfa;
  color: var(--ink);
}

.danger-action {
  background: #fff1ef;
  color: var(--danger);
}

.message,
.hint {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.message.success {
  color: var(--accent-dark);
  font-weight: 800;
}

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

.summary-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.summary-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

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

dd {
  margin: 0;
  text-align: right;
  font-weight: 900;
}

.notice-box,
.cancel-box {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f3f1;
}

.notice-box strong,
.notice-box span {
  display: block;
}

.notice-box span {
  color: var(--muted);
  line-height: 1.45;
}

.cancel-box h4,
.cancel-box p {
  margin: 0;
}

.compact-list,
.reservations-list {
  display: grid;
  gap: 10px;
}

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

.list-item strong {
  display: block;
  margin-bottom: 4px;
}

.list-item span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.reservation-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.planner-head,
.planner-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 72px repeat(4, minmax(118px, 0.8fr));
  gap: 10px;
  align-items: center;
}

.planner-head {
  padding: 0 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.planner-row {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfa;
}

.planner-row strong,
.planner-row span {
  display: block;
}

.planner-row span {
  color: var(--muted);
  font-size: 0.86rem;
}

.compact-check {
  justify-content: center;
}

.hours-row,
.service-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.9fr) repeat(2, minmax(128px, 1fr));
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfa;
}

.service-row {
  grid-template-columns: 1.2fr 110px 110px auto;
}

.hours-row label:nth-child(4),
.hours-row label:nth-child(5) {
  grid-column: span 1;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-label input {
  width: 18px;
  height: 18px;
}

.hidden {
  display: none;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 58vh;
    background-position: center -115px;
    background-size: auto 112%;
  }

  .workspace {
    padding: 20px;
  }

  .admin-page .workspace,
  .manage-page .workspace {
    padding: 20px;
  }

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

  .admin-grid .panel:first-child,
  .admin-grid .panel:nth-child(2),
  .admin-grid .panel:nth-child(3),
  .admin-grid .panel:nth-child(4),
  .admin-grid .panel:nth-child(5),
  .admin-grid .panel:nth-child(6) {
    grid-column: 1;
  }
}

@media (max-width: 760px) {
  .booking-layout,
  .admin-grid,
  .form-grid,
  .form-actions,
  .month-nav {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 22px;
    min-height: 62vh;
    background-position: center -70px;
    background-size: auto 106%;
  }

  .tabs {
    width: 100%;
  }

  .tab {
    min-width: 0;
  }

  .hours-row,
  .service-row,
  .planner-head,
  .planner-row {
    grid-template-columns: 1fr;
  }

  .planner-head {
    display: none;
  }

  .summary-list div,
  .reservation-item {
    grid-template-columns: 1fr;
  }

  dd {
    text-align: left;
  }
}
