:root {
  color-scheme: light;
  --bg-1: #f5efe4;
  --bg-2: #edf6f1;
  --surface: #ffffff;
  --ink: #1f2328;
  --muted: #616971;
  --line: #e4d9cc;
  --accent: #13866c;
  --accent-2: #f28c39;
  --free: #1a9d6b;
  --busy: #d4524c;
  --shadow: 0 18px 40px rgba(26, 28, 32, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2));
  min-height: 100vh;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: -20%;
  background:
    radial-gradient(circle at 20% 20%, rgba(242, 140, 57, 0.18), transparent 55%),
    radial-gradient(circle at 85% 10%, rgba(19, 134, 108, 0.16), transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(26, 62, 98, 0.12), transparent 55%);
  z-index: -1;
}

.app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  display: grid;
  gap: 28px;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 28px;
  align-items: center;
  animation: fadeUp 0.7s ease both;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

h1 {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(42px, 5vw, 68px);
  letter-spacing: 0.04em;
  margin: 12px 0 16px;
}

.lead {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 560px;
}

.hero__actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

.primary-btn,
.ghost-btn,
.chip,
.slot__btn {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(19, 134, 108, 0.3);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(19, 134, 108, 0.35);
}

.ghost-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}

.ghost-btn:hover {
  background: rgba(19, 134, 108, 0.08);
  border-color: rgba(19, 134, 108, 0.2);
}

.hero__card {
  background: var(--surface);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(228, 217, 204, 0.6);
  display: grid;
  gap: 18px;
}

.hero__card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hero__card-top h2 {
  font-family: "Bebas Neue", sans-serif;
  font-size: 36px;
  margin-top: 6px;
}

.badge {
  background: rgba(19, 134, 108, 0.15);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 700;
}

.hero__meta {
  font-size: 14px;
  color: var(--muted);
}

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

.hero__info strong {
  display: block;
  margin-top: 4px;
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  animation: fadeUp 0.7s ease 0.08s both;
}

.stat-card {
  background: var(--surface);
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(228, 217, 204, 0.8);
  box-shadow: 0 10px 24px rgba(24, 24, 24, 0.06);
  display: grid;
  gap: 8px;
}

.stat-card strong {
  font-size: 24px;
}

.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeUp 0.7s ease 0.16s both;
}

.chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chip {
  background: rgba(31, 35, 40, 0.05);
  color: var(--ink);
}

.chip[aria-pressed="true"] {
  background: rgba(242, 140, 57, 0.2);
  color: #8a3e00;
}

.chip--active {
  background: rgba(242, 140, 57, 0.2);
  color: #8a3e00;
}

.legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}

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

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.dot--free {
  background: var(--free);
}

.dot--busy {
  background: var(--busy);
}

.dot--prime {
  background: var(--accent-2);
}

.schedule {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 28px;
  padding: 22px;
  border: 1px solid rgba(228, 217, 204, 0.7);
  box-shadow: 0 12px 28px rgba(26, 28, 32, 0.08);
  animation: fadeUp 0.7s ease 0.24s both;
}

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

.schedule__head h2 {
  font-size: 24px;
}

.table-wrap {
  overflow-x: auto;
  padding-bottom: 8px;
}

.schedule-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 14px;
  min-width: 760px;
}

.schedule-table th {
  text-align: left;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  padding: 8px 12px;
}

.schedule-table th:not(.time-col),
.schedule-table td:not(.time-col) {
  text-align: center;
}

.schedule-table td {
  padding: 0 8px;
  vertical-align: top;
}

.time-col {
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  width: 120px;
  min-width: 120px;
  padding-left: 0;
  text-align: center;
}

.schedule-table th.time-col,
.schedule-table td.time-col {
  text-align: center;
  padding-left: 0;
  padding-right: 0;
  white-space: nowrap;
}

.schedule-table td.time-col {
  vertical-align: middle;
  padding-top: 12px;
}

.slot-card {
  background: var(--surface);
  border-radius: 18px;
  padding: 14px;
  border: 1px solid rgba(228, 217, 204, 0.9);
  display: grid;
  gap: 10px;
  min-width: 220px;
  box-shadow: 0 10px 22px rgba(26, 28, 32, 0.06);
}

.slot__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.slot__status {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(26, 157, 107, 0.12);
  color: #177756;
}

.slot--busy .slot__status {
  background: rgba(212, 82, 76, 0.15);
  color: #a53b36;
}

.slot__price {
  font-weight: 700;
  font-size: 13px;
}

.slot__title {
  font-size: 16px;
  font-weight: 600;
}

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

.slot__pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(31, 35, 40, 0.06);
  font-size: 12px;
  color: var(--muted);
}

.slot__pill--prime {
  background: rgba(242, 140, 57, 0.2);
  color: #8a3e00;
}

.slot__btn {
  background: var(--accent);
  color: #ffffff;
  width: 100%;
  text-align: center;
}

.slot__btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.slot__btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.slot__btn:hover {
  transform: translateY(-1px);
}

.info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  animation: fadeUp 0.7s ease 0.32s both;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 20;
}

.modal.is-active {
  opacity: 1;
  pointer-events: auto;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(16, 18, 20, 0.45);
  backdrop-filter: blur(4px);
}

.modal__panel {
  position: relative;
  background: var(--surface);
  border-radius: 20px;
  padding: 24px;
  width: min(520px, 92vw);
  box-shadow: var(--shadow);
  border: 1px solid rgba(228, 217, 204, 0.8);
  display: grid;
  gap: 16px;
  animation: fadeUp 0.3s ease;
}

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

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  font-weight: 700;
  cursor: pointer;
}

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

.confirm-body {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.modal__summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  background: rgba(31, 35, 40, 0.04);
  padding: 12px;
  border-radius: 14px;
}

.form-field {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.form-field input {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(228, 217, 204, 0.9);
  font-size: 14px;
  background: #ffffff;
}

.form-field input:focus {
  outline: 2px solid rgba(19, 134, 108, 0.35);
  border-color: rgba(19, 134, 108, 0.4);
}

.form-status {
  min-height: 18px;
  font-size: 13px;
  color: #a53b36;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: var(--ink);
  color: #ffffff;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 30;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  body::before {
    display: none;
  }

  .hero__actions,
  .controls,
  .slot__btn,
  .modal,
  .toast {
    display: none !important;
  }

  .app {
    padding: 0;
  }

  .hero,
  .stats,
  .info {
    display: none;
  }

  .schedule {
    border: none;
    box-shadow: none;
    background: transparent;
    padding: 0;
  }

  .schedule-table {
    border-spacing: 0 8px;
  }

  .slot-card {
    box-shadow: none;
    border: 1px solid #d8d8d8;
  }
}

.info h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.admin {
  gap: 24px;
}

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

.admin-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.admin-panel {
  background: var(--surface);
  border-radius: 20px;
  padding: 20px;
  border: 1px solid rgba(228, 217, 204, 0.9);
  box-shadow: 0 12px 24px rgba(24, 24, 24, 0.06);
  display: grid;
  gap: 16px;
}

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

.admin-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.admin-filters select {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(228, 217, 204, 0.9);
  font-size: 14px;
  background: #ffffff;
}

.admin-alert {
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 14px;
}

.admin-alert--success {
  background: rgba(26, 157, 107, 0.12);
  color: #177756;
}

.admin-alert--error {
  background: rgba(212, 82, 76, 0.15);
  color: #a53b36;
}

.admin-table-wrap {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 22px;
  padding: 16px;
  border: 1px solid rgba(228, 217, 204, 0.7);
  box-shadow: 0 12px 26px rgba(26, 28, 32, 0.08);
}

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

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}

.admin-table th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 1px solid rgba(228, 217, 204, 0.8);
}

.admin-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(228, 217, 204, 0.6);
  font-size: 14px;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.empty-cell {
  text-align: center;
  padding: 20px;
  color: var(--muted);
}

.admin-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-actions form {
  margin: 0;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.danger-btn {
  border-color: rgba(212, 82, 76, 0.4);
  color: #a53b36;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pill--free {
  background: rgba(26, 157, 107, 0.12);
  color: #177756;
}

.pill--busy {
  background: rgba(212, 82, 76, 0.15);
  color: #a53b36;
}

.pill--muted {
  background: rgba(31, 35, 40, 0.08);
  color: var(--muted);
}

.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.login-wrap {
  width: min(980px, 100%);
}

.login-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  background: rgba(255, 255, 255, 0.85);
  border-radius: 26px;
  border: 1px solid rgba(228, 217, 204, 0.8);
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.login-card__media {
  background: linear-gradient(150deg, rgba(19, 134, 108, 0.9), rgba(26, 62, 98, 0.85));
  color: #ffffff;
  padding: 36px;
  display: grid;
  gap: 16px;
  align-content: center;
}

.login-avatar {
  width: 140px;
  height: 140px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  position: relative;
}

.login-avatar__ring {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.7);
  position: relative;
}

.login-avatar__ring::after {
  content: "";
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.7);
  left: 50%;
  top: 50%;
  transform: translate(-50%, 38%);
}

.login-brand {
  font-family: "Bebas Neue", sans-serif;
  font-size: 30px;
  letter-spacing: 0.08em;
}

.login-sub {
  font-size: 14px;
  opacity: 0.8;
}

.login-card__form {
  padding: 36px;
  display: grid;
  gap: 16px;
}

.login-head h1 {
  font-family: "Bebas Neue", sans-serif;
  font-size: 42px;
  letter-spacing: 0.04em;
  margin: 8px 0;
}

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

.remember-field {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
}

.login-btn {
  width: 100%;
  justify-content: center;
}

.login-back {
  width: 100%;
  text-align: center;
}

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

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

  .schedule-table {
    min-width: 680px;
  }

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

  .admin-table {
    min-width: 720px;
  }

  .login-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .hero__actions {
    flex-direction: column;
    align-items: flex-start;
  }

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

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

  .schedule-table {
    min-width: 620px;
  }

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

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

  .login-card__form,
  .login-card__media {
    padding: 24px;
  }
}
