.auth-body,
.license-body,
.admin-body {
  min-height: 100vh;
  background: #f6f6f6;
  font-family: "Golos Text", sans-serif;
}

.auth-body,
.license-body {
  background: #574640;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.auth-shell,
.license-card {
  width: min(100%, 440px);
}

.auth-brand img,
.license-card img {
  display: block;
  height: 48px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  margin: 0 auto 20px;
}

.auth-card,
.license-card {
  background: #fff;
  border-radius: 16px;
  padding: 28px 22px;
}

.auth-card h1,
.license-card h1,
.admin-title {
  color: #1c1c1d;
  font-family: CalSans, sans-serif;
}

.auth-lead,
.auth-foot,
.license-card p,
.license-meta {
  color: #59585d;
}

.auth-form label,
.admin-form label {
  display: block;
  margin: 12px 0 6px;
  font-weight: 600;
  color: #1c1c1d;
}

.auth-form input,
.admin-form input,
.admin-form select,
.admin-form textarea,
.filter-bar select,
.status-form input,
.status-form select,
.inline-status-form select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #e4ddd6;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  color: #1c1c1d;
}

.auth-form input:focus,
.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus,
.filter-bar select:focus,
.status-form input:focus,
.status-form select:focus,
.inline-status-form select:focus {
  outline: 0;
  border-color: #caa05c;
  box-shadow: 0 0 0 4px rgba(202, 160, 92, 0.16);
}

.admin-form textarea {
  min-height: 120px;
  resize: vertical;
}

.auth-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
}

.auth-check input,
.admin-form .auth-check input {
  width: auto;
  min-height: 0;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.auth-foot {
  text-align: center;
  margin-top: 18px;
}

.auth-foot a,
.auth-links a {
  color: #caa05c;
}

.auth-shell .developer-credit {
  display: flex;
}

.license-card .developer-credit {
  display: flex;
  justify-content: center;
  margin: 4px 0 16px;
}

.license-meta a {
  color: #caa05c;
}

/* Shell: independent sidebar + content scrolling */
.admin-html,
.admin-body {
  height: 100%;
  overflow: hidden;
}

.admin-body {
  margin: 0;
  background:
    radial-gradient(1200px 400px at 100% -10%, rgba(202, 160, 92, 0.12), transparent 55%),
    #f3efe9;
  color: #59585d;
}

.admin-app {
  display: flex;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.admin-backdrop {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(28, 28, 29, 0.46);
  backdrop-filter: blur(4px);
}

.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: min(88vw, 300px);
  height: 100vh;
  height: 100dvh;
  background:
    linear-gradient(180deg, rgba(202, 160, 92, 0.08), transparent 28%),
    #241c1a;
  color: #f7f1ea;
  transform: translateX(-105%);
  transition: transform 0.28s ease;
  box-shadow: 18px 0 40px rgba(28, 20, 16, 0.18);
  padding-left: env(safe-area-inset-left);
}

.admin-app.is-nav-open .admin-sidebar {
  transform: translateX(0);
}

.admin-app.is-nav-open .admin-main {
  overflow: hidden;
}

.admin-sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  padding: 18px 16px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-sidebar-brand a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: #fff;
  text-decoration: none;
}

.admin-sidebar-brand img {
  height: 36px;
  width: auto;
  max-width: 128px;
  object-fit: contain;
}

.admin-sidebar-brand strong,
.admin-sidebar-brand small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-sidebar-brand strong {
  font-family: CalSans, sans-serif;
  font-size: 18px;
  line-height: 1.1;
}

.admin-sidebar-brand small {
  margin-top: 2px;
  color: rgba(247, 241, 234, 0.62);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-sidebar-close,
.admin-menu-btn,
.admin-sidebar-user button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.admin-sidebar-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 12px 12px 20px;
}

.admin-sidebar-foot {
  flex-shrink: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.16);
}

.admin-sidebar-foot .developer-credit {
  padding: 8px 12px 2px;
}

.admin-sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding: 10px 14px calc(14px + env(safe-area-inset-bottom));
}

.admin-sidebar-user-copy {
  min-width: 0;
  flex: 1;
}

.admin-sidebar-user-copy strong,
.admin-sidebar-user-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-sidebar-user-copy strong {
  color: #fff;
  font-size: 14px;
}

.admin-sidebar-user-copy small {
  color: rgba(247, 241, 234, 0.62);
  font-size: 12px;
  text-transform: capitalize;
}

.admin-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(180deg, #d4b57a, #caa05c);
  color: #241c1a;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.admin-avatar-sm {
  width: 34px;
  height: 34px;
  font-size: 11px;
}

.admin-nav-group + .admin-nav-group {
  margin-top: 18px;
}

.admin-nav-label {
  margin: 0 10px 8px;
  color: rgba(247, 241, 234, 0.42);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  color: rgba(247, 241, 234, 0.78);
  text-decoration: none;
  font-weight: 500;
  line-height: 1.3;
}

.admin-nav a i {
  width: 18px;
  text-align: center;
  color: #caa05c;
}

.admin-nav a:hover,
.admin-nav a.is-active {
  background: rgba(202, 160, 92, 0.14);
  color: #fff;
}

.admin-nav a.is-active {
  box-shadow: inset 3px 0 0 #caa05c;
}

.admin-nav-external {
  margin-top: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.admin-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  min-height: 72px;
  padding: 12px 16px;
  background: rgba(255, 252, 248, 0.88);
  border-bottom: 1px solid rgba(87, 70, 64, 0.08);
  backdrop-filter: blur(16px);
  z-index: 5;
}

.admin-topbar.is-stuck {
  box-shadow: 0 10px 24px rgba(87, 70, 64, 0.06);
}

.admin-menu-btn {
  background: #241c1a;
}

.admin-topbar-title {
  min-width: 0;
  flex: 1;
}

.admin-topbar-title p,
.dash-kicker {
  margin: 0 0 2px;
  color: #8a7f78;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.admin-topbar-title h1,
.admin-title {
  margin: 0;
  color: #1c1c1d;
  font-family: CalSans, sans-serif;
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1.15;
}

.admin-topbar-title h1 {
  font-size: 1.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.admin-ghost-btn,
.admin-text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid rgba(87, 70, 64, 0.14);
  border-radius: 999px;
  background: #fff;
  color: #574640;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.admin-text-link {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #caa05c;
}

.admin-topbar-user {
  display: none;
  align-items: center;
  gap: 8px;
  color: #1c1c1d;
  font-weight: 600;
}

.admin-main {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 20px 16px calc(32px + env(safe-area-inset-bottom));
}

.admin-main-inner {
  width: min(100%, 1180px);
  margin: 0 auto;
}

.admin-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 600;
}

.admin-alert-success {
  background: #edf8ef;
  color: #246338;
}

.admin-alert-danger {
  background: #fdeeee;
  color: #8a2a2a;
}

.admin-head,
.stat-row,
.status-form,
.card-actions,
.inline-status-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.admin-head {
  margin-bottom: 18px;
}

.dash-hero,
.admin-card-head,
.detail-grid,
.dash-grid,
.cms-layout,
.detail-list,
.quick-actions {
  display: grid;
  gap: 16px;
}

.dash-hero {
  margin-bottom: 22px;
}

.dash-lead {
  margin: 8px 0 0;
  max-width: 62ch;
  color: #6f6762;
}

.dash-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stat-row {
  display: grid;
  grid-template-columns: 1fr;
  margin-bottom: 20px;
}

.admin-stat,
.admin-card,
.data-card {
  background: #fff;
  border: 1px solid rgba(87, 70, 64, 0.07);
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(87, 70, 64, 0.05);
}

.admin-stat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
}

.admin-stat-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(202, 160, 92, 0.14);
  color: #8d6d38;
  flex-shrink: 0;
}

.admin-stat span,
.admin-stat small {
  display: block;
}

.admin-stat span {
  color: #8a7f78;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-stat strong,
.occupancy-ring strong {
  display: block;
  color: #1c1c1d;
  font-family: CalSans, sans-serif;
  font-size: 28px;
  line-height: 1.1;
}

.admin-stat small,
.admin-card-head p {
  color: #8a7f78;
  font-size: 13px;
}

.admin-stat-occupancy {
  background:
    linear-gradient(180deg, rgba(202, 160, 92, 0.12), #fff 58%);
}

.occupancy-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: conic-gradient(#caa05c calc(var(--pct) * 1%), rgba(202, 160, 92, 0.16) 0);
  flex-shrink: 0;
}

.occupancy-ring::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #fff;
}

.occupancy-ring strong {
  position: relative;
  z-index: 1;
  font-size: 18px;
}

.admin-card,
.data-card {
  padding: 18px;
}

.admin-card,
.data-card,
.filter-bar {
  margin-bottom: 14px;
}

.admin-card h2,
.admin-card-head h2 {
  margin: 0;
  color: #1c1c1d;
  font-family: CalSans, sans-serif;
  font-size: 1.25rem;
}

.admin-card-head {
  grid-template-columns: 1fr auto;
  align-items: start;
  margin-bottom: 16px;
}

.data-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.data-card p,
.booking-dates p,
.booking-guest p {
  margin: 4px 0 0;
  color: #6f6762;
  overflow-wrap: anywhere;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid rgba(87, 70, 64, 0.07);
  border-radius: 18px;
}

.filter-bar label {
  display: grid;
  gap: 6px;
  min-width: min(100%, 220px);
  margin: 0;
  font-weight: 600;
  color: #1c1c1d;
}

.booking-list-head {
  display: none;
}

.booking-row .booking-id a,
.data-card a {
  color: #1c1c1d;
  text-decoration: none;
}

.booking-row .booking-id a:hover,
.data-card a:hover,
.admin-text-link:hover,
.admin-ghost-btn:hover {
  color: #caa05c;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  text-transform: capitalize;
  background: #caa05c1a;
  color: #574640;
  border-radius: 999px;
  padding: 6px 10px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}

.status-pending { background: #fff4d6; color: #8a6410; }
.status-confirmed { background: #e8f6ec; color: #246338; }
.status-checked_in { background: #e7eef8; color: #2c4c7c; }
.status-checked_out { background: #f1eeea; color: #6f6762; }
.status-cancelled { background: #fdeeee; color: #8a2a2a; }

.card-actions form,
.card-actions button,
.data-card form button {
  display: inline;
  border: 0;
  background: none;
  color: #574640;
  font-weight: 600;
}

.data-card form button {
  color: #8a2a2a;
}

.quick-actions a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid rgba(87, 70, 64, 0.08);
  border-radius: 14px;
  color: #1c1c1d;
  text-decoration: none;
  font-weight: 600;
}

.quick-actions a i {
  color: #caa05c;
}

.quick-actions a:hover {
  background: #faf6f0;
  border-color: rgba(202, 160, 92, 0.4);
}

.detail-list {
  grid-template-columns: 1fr;
}

.detail-list div {
  padding-top: 12px;
  border-top: 1px solid #f0ebe6;
}

.detail-list dt {
  margin-bottom: 4px;
  color: #8a7f78;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.detail-list dd {
  margin: 0;
  color: #1c1c1d;
  font-weight: 600;
}

.status-form,
.inline-status-form {
  align-items: stretch;
}

.status-form select,
.status-form input,
.inline-status-form select {
  min-width: min(100%, 180px);
  flex: 1;
}

.history-list article {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 12px 0;
  border-top: 1px solid #f0ebe6;
}

.history-list span {
  color: #8a7f78;
  font-size: 13px;
}

.history-list p {
  margin: 0;
  color: #1c1c1d;
  font-weight: 600;
}

.empty-state {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 36px 16px;
  color: #8a7f78;
  text-align: center;
}

.empty-state i {
  font-size: 22px;
  color: #caa05c;
}

.empty-copy {
  margin: 0;
}

.admin-form fieldset {
  margin: 8px 0 16px;
  padding: 14px;
  border: 1px solid #efe8e1;
  border-radius: 16px;
}

.admin-form legend {
  padding: 0 6px;
  color: #1c1c1d;
  font-weight: 700;
}

.admin-form .btn-gold,
.admin-body .btn-gold {
  margin-top: 8px;
  min-height: 46px;
}

.admin-pagination {
  margin-top: 8px;
}

.admin-pagination .pagination {
  margin: 0;
  gap: 6px;
}

.admin-pagination .page-link {
  border: 0;
  border-radius: 10px;
  color: #574640;
}

.admin-pagination .page-item.active .page-link {
  background: #caa05c;
  color: #fff;
}

.admin-sidebar-scroll::-webkit-scrollbar,
.admin-main::-webkit-scrollbar {
  width: 8px;
}

.admin-sidebar-scroll::-webkit-scrollbar-thumb {
  background: rgba(202, 160, 92, 0.35);
  border-radius: 999px;
}

.admin-main::-webkit-scrollbar-thumb {
  background: rgba(87, 70, 64, 0.22);
  border-radius: 999px;
}

@media (min-width: 640px) {
  .stat-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-ghost-btn span {
    display: inline;
  }

  .detail-list {
    grid-template-columns: 1fr 1fr;
  }

  .detail-span {
    grid-column: 1 / -1;
  }
}

@media (min-width: 768px) {
  .admin-main {
    padding: 28px 28px 48px;
  }

  .admin-topbar {
    padding: 14px 28px;
  }

  .admin-form {
    display: grid;
    grid-template-columns: minmax(140px, 220px) 1fr;
    gap: 10px 18px;
    align-items: start;
  }

  .admin-form > label {
    margin: 0;
    padding-top: 12px;
  }

  .admin-form > input,
  .admin-form > select,
  .admin-form > textarea,
  .admin-form > .image-field {
    margin: 0;
  }

  .admin-form > fieldset,
  .admin-form > .btn-gold,
  .admin-form > .auth-check,
  .admin-form > .settings-branding {
    grid-column: 1 / -1;
  }

  .admin-form > .auth-check {
    padding-top: 0;
  }

  .booking-list-head,
  .booking-row {
    display: grid;
    grid-template-columns: 0.9fr 1.2fr 1fr auto;
    gap: 12px;
    align-items: center;
  }

  .booking-list-head {
    padding: 0 18px 10px;
    color: #8a7f78;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .booking-row {
    margin-bottom: 10px;
  }

  .booking-row .status-pill {
    justify-self: end;
  }
}

@media (min-width: 992px) {
  .admin-sidebar {
    position: relative;
    inset: auto;
    width: 272px;
    flex-shrink: 0;
    height: 100%;
    min-height: 0;
    transform: none;
    box-shadow: none;
  }

  .admin-content {
    min-height: 0;
  }

  .admin-menu-btn,
  .admin-sidebar-close,
  .admin-backdrop {
    display: none !important;
  }

  .admin-topbar-user {
    display: flex;
  }

  .stat-row {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .admin-stat:nth-child(-n+3) {
    grid-column: span 2;
  }

  .admin-stat:nth-child(n+4) {
    grid-column: span 3;
  }

  .dash-hero,
  .dash-grid,
  .cms-layout,
  .detail-grid {
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
    align-items: start;
  }

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

@media (min-width: 1200px) {
  .admin-sidebar {
    width: 292px;
  }

  .stat-row {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .admin-stat,
  .admin-stat-occupancy {
    grid-column: auto;
  }
}

@media (max-width: 639.98px) {
  .admin-topbar-actions .admin-ghost-btn span,
  .admin-topbar-user-name {
    display: none;
  }

  .admin-topbar-actions .admin-ghost-btn {
    width: 42px;
    padding: 0;
  }
}

.admin-nav a:focus-visible,
.admin-menu-btn:focus-visible,
.admin-sidebar-close:focus-visible,
.admin-ghost-btn:focus-visible,
.admin-form input:focus-visible,
.admin-sidebar-user button:focus-visible,
.developer-credit:focus-visible {
  outline: 2px solid #caa05c;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .admin-sidebar,
  a {
    transition: none;
  }
}

.settings-branding {
  margin-bottom: 8px;
}

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

.branding-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(87, 70, 64, 0.08);
  border-radius: 16px;
  background: #faf8f5;
}

.branding-card strong {
  color: #1c1c1d;
}

.branding-card small {
  color: #8a7f78;
  line-height: 1.45;
}

.branding-preview {
  display: grid;
  place-items: center;
  min-height: 92px;
  padding: 12px;
  border-radius: 12px;
  overflow: hidden;
}

.branding-preview img {
  max-width: 100%;
  max-height: 64px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.branding-preview-light {
  background: #fff;
  border: 1px solid rgba(87, 70, 64, 0.08);
}

.branding-preview-dark {
  background: #241c1a;
}

.branding-preview-favicon {
  background:
    linear-gradient(45deg, #eee 25%, transparent 25%) 0 0 / 16px 16px,
    linear-gradient(-45deg, #eee 25%, transparent 25%) 0 8px / 16px 16px,
    #fff;
}

.branding-preview-favicon img {
  width: 48px;
  height: 48px;
  max-height: 48px;
  object-fit: contain;
}

.data-card-thumb {
  width: 72px;
  height: 56px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
  background: #f3efe9;
}

.data-card > div:not(.card-actions) {
  flex: 1;
  min-width: 0;
}

.image-field {
  display: grid;
  gap: 10px;
}

.image-current {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(87, 70, 64, 0.08);
  border-radius: 12px;
  background: #faf8f5;
}

.image-current img {
  width: 96px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  background: #fff;
}

.image-current small {
  color: #8a7f78;
  line-height: 1.4;
}

@media (min-width: 768px) {
  .branding-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
