html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: #111827;
  background: #ffffff;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 0 8px;
  position: relative;
}

.brand img {
  max-height: 90px;
  max-width: 90%;
  object-fit: contain;
}

.lang-flags {
  position: absolute;
  right: 24px;
  top: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-flag {
  font-size: 20px;
  line-height: 1;
  text-decoration: none;
  border-radius: 8px;
  padding: 6px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.55);
}

.lang-flag.is-active {
  border-color: #111827;
  background: rgba(255, 255, 255, 0.9);
}

.lang-flag:focus-visible {
  outline: 3px solid rgba(0, 0, 0, 0.35);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .lang-flags {
    right: 12px;
    top: 18px;
    gap: 6px;
  }
  .lang-flag {
    font-size: 18px;
    padding: 5px;
  }
}

.hero {
  min-height: calc(100vh - 130px);
  display: flex;
  align-items: center;
  position: relative;
  background: #ffffff;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: center;
  opacity: 0.8;
}

.hero > .container {
  position: relative;
  z-index: 1;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  width: 100%;
}

.route-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
  justify-content: center;
  align-items: stretch;
  width: 100%;
}

.route-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  height: auto;
  aspect-ratio: 1 / 1;
  min-height: 160px;
  background: rgba(17, 24, 39, 0.55);
  border: 2px solid #000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  text-decoration: none;
  flex: 1 1 0;
  min-width: 0;
}

.route-card:focus-visible {
  outline: 3px solid rgba(0, 0, 0, 0.5);
  outline-offset: 3px;
}

.route-card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 100%;
  text-align: center;
}

.route-card-title {
  color: #fff;
  font-size: clamp(14px, 1.4vw, 18px);
  letter-spacing: 0.2px;
  font-weight: 700;
}

.route-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 1;
}

.route-card-icon svg {
  width: clamp(64px, 10vw, 120px);
  height: clamp(64px, 10vw, 120px);
}

@media (max-width: 900px) {
  .route-grid {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .route-card {
    flex: 0 1 clamp(120px, 40vw, 180px);
    max-width: calc(100% - 32px);
    aspect-ratio: 1 / 1;
    height: auto;
    min-height: 120px;
    padding: 8px;
  }

  .route-card-content {
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    text-align: center;
  }

  .route-card-title {
    font-size: 15px;
  }

  .route-card-icon svg {
    width: clamp(56px, 15vw, 78px);
    height: clamp(56px, 15vw, 78px);
  }
}

.panel {
  background: #fff;
  border-radius: 16px;
  padding: 18px;
  border: 1px solid #e5e7eb;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}

.admin-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 0 0 14px;
}

.admin-menu-item {
  text-decoration: none;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #111827;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-menu-item.is-active {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.tab-btn {
  appearance: none;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #111827;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
}

.tab-btn.is-active {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.route-admin-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 14px;
}

.route-admin-item {
  display: flex;
  gap: 12px;
  align-items: stretch;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 12px;
  background: #fff;
}

.route-admin-item.is-dragging {
  opacity: 0.6;
}

.route-admin-handle {
  flex: 0 0 auto;
  width: 34px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  user-select: none;
  color: #6b7280;
  font-weight: 700;
}

.route-admin-form {
  flex: 1 1 auto;
}

.route-admin-fields {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.route-admin-active {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px 10px;
}

.route-admin-actions {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 16px;
  align-items: start;
}

.row-room-bookings {
  align-items: start;
}

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

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

  .row-room-bookings {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.label {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 6px;
}

input[type="text"], select, textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  box-sizing: border-box;
}

input[type="password"],
input[type="date"],
input[type="time"],
input[type="email"],
input[type="number"] {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  box-sizing: border-box;
}

.calendar {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.calendar th {
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
  padding: 10px 6px;
  text-align: center;
}

.calendar td {
  padding: 6px;
  text-align: center;
}

.day {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
}

@media (max-width: 480px) {
  .calendar th {
    padding: 8px 2px;
    font-size: 11px;
  }

  .calendar td {
    padding: 4px 2px;
  }

  .day {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }
}

.day[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}

.day.is-selected {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

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

.time-pill {
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #fff;
  width: 72px;
  height: 72px;
  padding: 0;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
  line-height: 1.1;
}

.time-pill-time {
  font-size: 14px;
  font-weight: 700;
}

.time-pill-avail {
  font-size: 12px;
  color: #6b7280;
}

@media (max-width: 900px) {
  .time-pill {
    width: 66px;
    height: 66px;
  }
}

.time-pill[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}

.time-pill.is-booked {
  border-color: #111827;
  background: rgba(17, 24, 39, 0.06);
}

.time-pill.is-booked[disabled] {
  opacity: 1;
}

.time-pill.is-selected {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.time-pill.is-selected .time-pill-avail {
  color: rgba(255, 255, 255, 0.85);
}

.room-bookings {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 44px;
}

.room-booking-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 8px 10px;
  background: #fff;
}

.room-booking-text {
  font-size: 13px;
  color: #111827;
  line-height: 1.2;
}

.room-booking-cancel {
  appearance: none;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #111827;
  border-radius: 999px;
  width: 34px;
  height: 34px;
  padding: 0;
  cursor: pointer;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.room-booking-cancel svg {
  width: 18px;
  height: 18px;
}

.room-booking-cancel[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

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

.btn {
  appearance: none;
  border: 2px solid #000;
  border-radius: 10px;
  padding: 12px 16px;
  font-weight: 600;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
}

.btn-secondary {
  background: #111827;
}

.btn-danger {
  background: #dc2626;
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.muted {
  color: #6b7280;
  font-size: 13px;
}

.error {
  color: #b91c1c;
  font-size: 13px;
  margin-top: 10px;
}

.confirm-panel {
  max-width: 980px;
  margin: 0 auto;
  padding: 34px;
}

.confirm-top {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 22px;
}

.confirm-title {
  margin: 0;
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 900;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.confirm-info {
  margin-top: 10px;
  color: #111827;
  font-size: 14px;
  font-weight: 700;
}

.confirm-subtitle {
  margin-top: 10px;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.confirm-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 28px;
  align-items: start;
}

.confirm-grid--noimg {
  grid-template-columns: 1fr;
  justify-items: center;
}

.confirm-grid--noimg .confirm-left {
  display: none;
}

.confirm-left {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.confirm-photo {
  width: 100%;
  max-width: 640px;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  object-fit: cover;
  aspect-ratio: 16 / 9;
}

.powered-by {
  text-align: center;
  padding: 16px 24px 24px;
  color: #6b7280;
  font-size: 12px;
}

.powered-by a {
  color: inherit;
  text-decoration: underline;
}

.login-page {
  background-image: url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=1920&q=80");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

@media (max-width: 900px) {
  .login-page {
    background-attachment: scroll;
  }
}

.confirm-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
}

.confirm-qr {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.confirm-qr #qrcode canvas,
.confirm-qr #qrcode img {
  display: block;
}

.confirm-download {
  width: 100%;
  max-width: 240px;
  background: #ffffff;
  border-color: #f43f5e;
  color: #f43f5e;
}

@media (max-width: 900px) {
  .confirm-panel {
    padding: 22px 18px;
  }

  .confirm-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .confirm-right {
    padding-top: 0;
  }
}

.qr-generator {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 900px) {
  .qr-generator {
    grid-template-columns: 1fr;
  }
}

.qr-preview {
  display: flex;
  justify-content: center;
}

.qr-room-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-start;
}

.qr-room-item {
  flex: 0 0 auto;
}

.qr-room-card {
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 12px;
  box-sizing: border-box;
  text-align: center;
}

.qr-room-top {
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  width: 100%;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.qr-room-qr {
  background: #ffffff;
  border-radius: 16px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.qr-room-room {
  color: #ffffff;
  font-weight: 900;
  letter-spacing: 0.5px;
  width: 100%;
  line-height: 1.05;
}
