:root {
  --bg: #eef1ef;
  --panel: #ffffff;
  --panel-soft: #f7f9f7;
  --ink: #142124;
  --muted: #667174;
  --line: #dce3df;
  --accent: #0d6b6f;
  --accent-dark: #08484c;
  --gold: #b17b30;
  --danger: #b94b4b;
  --success: #24745b;
  --warning: #8a5b15;
  --shadow: 0 18px 50px rgba(22, 37, 40, 0.1);
  --shadow-soft: 0 8px 24px rgba(22, 37, 40, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(13, 107, 111, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(177, 123, 48, 0.1), transparent 34%),
    var(--bg);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

a {
  color: inherit;
  text-decoration: none;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.76rem 0.8rem;
  color: var(--ink);
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(20, 33, 36, 0.02);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #c4d0cc;
}

input:focus,
select:focus,
textarea:focus {
  outline: 0;
  border-color: rgba(13, 107, 111, 0.6);
  box-shadow: 0 0 0 4px rgba(13, 107, 111, 0.12);
}

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

input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 0.7rem;
  text-align: left;
  vertical-align: middle;
}

th {
  color: #718083;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  background: #fbfcfb;
}

td {
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.6);
}

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

[hidden] {
  display: none !important;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.auth-card {
  width: min(100%, 440px);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.35rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.auth-logo {
  width: min(100%, 300px);
  height: 92px;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 1rem;
}

.auth-card h1 {
  font-size: 2rem;
}

.auth-form,
.user-form {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.auth-form label,
.user-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.user-form {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  padding: 1rem;
  margin-top: 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 1.15rem;
  color: #edf8f6;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 18%),
    #102d32;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.75rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.panel-logo {
  width: min(100%, 210px);
  height: 64px;
  flex: 0 0 auto;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.28));
}

.panel-brand-copy {
  min-width: 0;
}

.panel-brand-copy small {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 0.28rem 0.5rem;
  color: rgba(237, 248, 246, 0.78);
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(145deg, #177985, #0c4b52);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: rgba(237, 248, 246, 0.68);
  margin-top: 0.15rem;
}

.side-nav {
  display: grid;
  gap: 0.4rem;
  margin: 1.5rem 0;
}

.side-nav a {
  border-radius: 9px;
  padding: 0.78rem 0.9rem;
  color: rgba(237, 248, 246, 0.78);
  font-size: 0.92rem;
  font-weight: 750;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.side-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transform: translateX(2px);
}

.sidebar-note {
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-note p {
  color: rgba(237, 248, 246, 0.72);
  line-height: 1.5;
  margin: 0.45rem 0 0;
}

.workspace {
  padding: 1.35rem;
}

.top-panel,
.module,
.metric {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.top-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.55rem;
  overflow: hidden;
  position: relative;
}

.top-panel::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -90px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13, 107, 111, 0.12), transparent 68%);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 0.55rem;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

h2 {
  margin-bottom: 0;
  font-size: 1.1rem;
}

.lead {
  max-width: 820px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0;
}

.status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.status-strip span {
  border: 1px solid rgba(13, 107, 111, 0.16);
  border-radius: 999px;
  padding: 0.42rem 0.64rem;
  color: var(--accent-dark);
  background: rgba(13, 107, 111, 0.08);
  font-size: 0.78rem;
  font-weight: 850;
}

.top-actions,
.module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.top-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.primary-button,
.ghost-button,
.small-button,
.danger-button {
  border: 0;
  border-radius: 8px;
  min-height: 42px;
  padding: 0.75rem 1rem;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: 0 10px 24px rgba(13, 107, 111, 0.22);
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(13, 107, 111, 0.26);
}

.ghost-button,
.small-button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.small-button {
  min-height: 36px;
  padding: 0.55rem 0.75rem;
  white-space: nowrap;
}

.danger-button {
  min-height: 34px;
  padding: 0.45rem 0.65rem;
  color: #fff;
  background: var(--danger);
}

.full {
  width: 100%;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 1rem 0;
}

.metric {
  padding: 1rem;
  box-shadow: var(--shadow-soft);
}

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

.metric strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.7rem;
  letter-spacing: -0.03em;
}

.layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.75fr);
  gap: 1rem;
  align-items: start;
}

.admin-column,
.preview-column {
  display: grid;
  gap: 1rem;
}

.preview-column {
  position: sticky;
  top: 1rem;
}

.module {
  overflow: hidden;
}

.module-header {
  padding: 1rem;
  background: linear-gradient(180deg, #fbfcfb, var(--panel-soft));
  border-bottom: 1px solid var(--line);
}

.table-wrap {
  overflow-x: auto;
}

.day-settings,
.module-help,
.rate-plan-card,
.discount-card,
.stop-sale-card,
.min-stay-card {
  border-bottom: 1px solid var(--line);
  padding: 1rem;
}

.day-settings {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(0, 1.2fr);
  gap: 1rem;
  align-items: start;
  background: #fff;
}

.day-settings p,
.module-help {
  color: var(--muted);
  line-height: 1.5;
}

.day-settings p {
  margin: 0.25rem 0 0;
}

.module-help {
  background: #fff;
}

.day-toggle-grid,
.room-check-grid,
.discount-day-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.45rem;
}

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

.check-tile {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem;
  color: var(--muted);
  background: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}

.check-tile:hover {
  border-color: rgba(13, 107, 111, 0.32);
  background: rgba(13, 107, 111, 0.04);
}

.check-tile input {
  flex: 0 0 auto;
}

.rate-plan-list,
.discount-list,
.stop-sale-list,
.min-stay-list {
  display: grid;
  gap: 0;
}

.rate-plan-card,
.discount-card,
.stop-sale-card,
.min-stay-card {
  background: #fff;
  transition: background 160ms ease;
}

.rate-plan-card:hover,
.discount-card:hover,
.stop-sale-card:hover,
.min-stay-card:hover {
  background: #fcfdfc;
}

.rate-plan-card:last-child,
.discount-card:last-child,
.stop-sale-card:last-child,
.min-stay-card:last-child {
  border-bottom: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.card-grid label,
.multiplier-grid label,
.rate-price-grid label,
.discount-card label,
.stop-sale-card label,
.min-stay-card label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.rate-price-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.rate-price-row {
  display: contents;
}

.rate-price-row strong {
  align-self: center;
}

.field-heading {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.multiplier-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  padding: 1rem;
  background: #fff;
}

.discount-layout,
.stop-sale-layout,
.min-stay-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.discount-layout .wide,
.stop-sale-layout .wide,
.min-stay-layout .wide {
  grid-column: 1 / -1;
}

.campaign-designer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  padding: 1rem;
  background: #fff;
}

.campaign-designer label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.campaign-active,
.campaign-preview-wrap {
  grid-column: 1 / -1;
}

.campaign-preview-wrap {
  display: grid;
  gap: 0.5rem;
}

.campaign-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  border-radius: 12px;
  padding: 1rem;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-soft);
}

.campaign-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.24), transparent 38%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 12px);
  pointer-events: none;
}

.campaign-preview > * {
  position: relative;
}

.campaign-preview span {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.campaign-preview strong {
  display: block;
  margin-top: 0.22rem;
  font-size: 1.2rem;
}

.campaign-preview p {
  margin: 0.32rem 0 0;
  color: rgba(255, 255, 255, 0.78);
}

.campaign-preview-code {
  min-width: 120px;
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  text-align: center;
  color: #102124;
  background: rgba(255, 255, 255, 0.88);
}

.campaign-preview-code small,
.campaign-preview-code b {
  display: block;
}

.campaign-preview-gold {
  color: #fff;
  background: linear-gradient(135deg, #6c4619, #bd8b42 50%, #153b3e);
}

.campaign-preview-aqua {
  color: #fff;
  background: linear-gradient(135deg, #0d6b6f, #1f9ea4 48%, #d1a55f);
}

.campaign-preview-dark {
  color: #fff;
  background: linear-gradient(135deg, #101d20, #244247 54%, #b17b30);
}

.calendar-note {
  margin: 0.35rem 0 0.75rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.multi-calendar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  align-items: start;
}

.calendar-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.calendar-panel h3 {
  margin: 0;
  padding: 0.9rem 1rem 0.45rem;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.calendar-head,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-head span {
  padding: 0.4rem 0.35rem 0.6rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.calendar-grid {
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
}

.calendar-day {
  min-height: 42px;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  background: #eef8ff;
  font-weight: 800;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.calendar-day:hover {
  background: #dff0ff;
  transform: translateY(-1px);
}

.calendar-day.is-selected {
  color: #fff;
  background: linear-gradient(135deg, var(--danger), #8f3838);
}

.calendar-day.is-disabled {
  pointer-events: none;
  color: #a7b0b2;
  background: #f3f5f4;
}

.calendar-day.is-outside-month {
  color: #9aa5a8;
}

.calendar-day.is-open:not(.is-selected) {
  color: #075985;
  background: #e0f2fe;
}

.currency-note {
  border-top: 1px solid var(--line);
  padding: 0.85rem 1rem;
  color: var(--muted);
  background: #fff;
  font-size: 0.82rem;
  line-height: 1.45;
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.search-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  padding: 1rem;
}

.search-form label,
.request-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.search-form button {
  grid-column: 1 / -1;
}

.request-form {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
}

.selected-summary {
  border: 1px solid rgba(15, 106, 115, 0.18);
  border-radius: 8px;
  padding: 0.85rem;
  color: var(--accent-dark);
  background: rgba(15, 106, 115, 0.08);
  line-height: 1.45;
}

.selected-summary strong {
  display: block;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.results {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
}

.result-card,
.empty-state {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.95rem;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.result-card {
  display: grid;
  gap: 0.8rem;
}

.result-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.price {
  color: var(--accent-dark);
  font-size: 1.55rem;
  font-weight: 900;
  white-space: nowrap;
  letter-spacing: -0.04em;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  border-radius: 999px;
  padding: 0.28rem 0.5rem;
  color: var(--accent-dark);
  background: rgba(15, 106, 115, 0.1);
  font-size: 0.78rem;
  font-weight: 800;
}

.tag.warning {
  color: #7a531b;
  background: rgba(181, 138, 66, 0.14);
}

.tag.success {
  color: var(--success);
  background: rgba(36, 116, 91, 0.12);
}

.result-detail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.result-detail span {
  display: grid;
  gap: 0.15rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.result-detail strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.review-list {
  margin: 0;
  padding: 1rem 1rem 1rem 2rem;
  color: var(--muted);
  line-height: 1.55;
}

.empty-state {
  color: var(--muted);
}

.empty-state strong {
  display: block;
  color: var(--ink);
  margin-bottom: 0.3rem;
}

.empty-state p {
  margin-bottom: 0;
  line-height: 1.5;
}

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

  .sidebar {
    position: relative;
    height: auto;
  }

  .side-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .preview-column {
    position: static;
  }
}

@media (max-width: 760px) {
  .workspace {
    padding: 0.75rem;
  }

  .top-panel,
  .module-header {
    display: grid;
  }

  .top-actions {
    justify-content: stretch;
  }

  .top-actions button {
    width: 100%;
  }

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

  .side-nav,
  .search-form,
  .result-detail,
  .day-settings,
  .card-grid,
  .rate-price-grid,
  .multiplier-grid,
  .discount-layout,
  .stop-sale-layout,
  .min-stay-layout,
  .campaign-designer,
  .campaign-preview,
  .user-form {
    grid-template-columns: 1fr;
  }

  .day-toggle-grid,
  .discount-day-grid,
  .room-check-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .brand {
    align-items: flex-start;
  }
}


/* PMS entegrasyonu sonrası: sıkışık sol menü yerine üst sekme barı */
.app-shell {
  display: block;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: auto;
  min-height: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  background: rgba(16, 45, 50, 0.98);
  border-right: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 32px rgba(16, 45, 50, 0.18);
}

.brand {
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.6rem;
  min-width: 210px;
}

.panel-logo {
  width: 150px;
  height: 42px;
}

.panel-brand-copy small {
  font-size: 0.68rem;
}

.side-nav {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  overflow-x: auto;
  padding: 0.25rem;
  scrollbar-width: thin;
}

.side-nav a {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 0.58rem 0.78rem;
  background: rgba(255, 255, 255, 0.055);
  white-space: nowrap;
}

.side-nav a:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.13);
}

.sidebar-note {
  width: min(360px, 24vw);
  margin: 0;
  padding: 0.7rem 0.85rem;
}

.sidebar-note p {
  display: none;
}

.workspace {
  padding: 1.15rem;
}

.top-panel {
  align-items: center;
  margin-bottom: 1rem;
}

.top-panel h1 {
  font-size: clamp(1.45rem, 2.3vw, 2.35rem);
}

.metrics-grid {
  margin-bottom: 1rem;
}

.layout-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 1.1rem;
}

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

.admin-column > .module {
  min-width: 0;
}

.admin-column > #prices,
.admin-column > #availability,
.admin-column > #booking-requests {
  grid-column: 1 / -1;
}

.preview-column {
  position: static;
  grid-template-columns: minmax(320px, 0.75fr) minmax(0, 1fr);
  align-items: start;
}

.preview-column > .request-module {
  grid-column: 1 / -1;
}

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

  .brand {
    min-width: 0;
  }

  .sidebar-note {
    display: none;
  }

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


/* Hata düzeltmesi: üst bar ve modül yerleşimi kayar bar/boşluk oluşturmadan çalışır */
html,
body {
  overflow-x: hidden;
}

.sidebar {
  grid-template-columns: minmax(220px, auto) minmax(0, 1fr) minmax(220px, 360px);
}

.side-nav {
  flex-wrap: wrap;
  overflow-x: visible;
  align-content: center;
}

.side-nav a {
  padding: 0.52rem 0.72rem;
}

.sidebar-note {
  width: auto;
  min-width: 220px;
}

.table-wrap {
  overflow-x: visible;
}

table {
  min-width: 0;
  table-layout: fixed;
}

th,
td {
  overflow-wrap: anywhere;
}

#rooms,
#prices,
#availability,
#booking-requests {
  grid-column: 1 / -1;
}

#rooms input[data-field="description"] {
  min-width: 0;
}

.admin-column {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-auto-flow: dense;
}

#campaign-designer {
  grid-column: 1;
  grid-row: span 2;
}

#discounts {
  grid-column: 2;
  grid-row: span 3;
}

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

#campaign-designer .campaign-preview-wrap {
  grid-column: 1 / -1;
}

#multipliers {
  align-self: start;
}

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

  .side-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .table-wrap {
    overflow-x: auto;
  }

  table {
    min-width: 720px;
  }

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

  #campaign-designer,
  #discounts {
    grid-column: auto;
    grid-row: auto;
  }
}

/* Rezervasyon Motoru — onaylı koyu premium tema uygulaması.
   Sadece görsel CSS override; HTML, JS, PMS kaynak fiyat ve dispatch akışı değişmez. */
:root {
  --bg: #06111f;
  --panel: #0b192d;
  --panel-soft: #081525;
  --ink: #f8fafc;
  --muted: #aebdd2;
  --line: rgba(245, 210, 138, 0.17);
  --accent: #d7b56e;
  --accent-dark: #b88a44;
  --gold: #d7b56e;
  --danger: #f87171;
  --success: #8df0b0;
  --warning: #ffcf7a;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  --shadow-soft: 0 14px 34px rgba(0, 0, 0, 0.18);
}

body {
  color: #f8fafc;
  background:
    radial-gradient(circle at 18% -12%, rgba(215, 181, 110, 0.20), transparent 28rem),
    radial-gradient(circle at 88% 18%, rgba(59, 130, 246, 0.10), transparent 24rem),
    linear-gradient(135deg, #07111f 0%, #0b1728 46%, #13243d 100%);
}

input,
select,
textarea {
  border-color: rgba(245, 210, 138, 0.22);
  color: #f8fafc;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.045));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

input::placeholder,
textarea::placeholder {
  color: rgba(174, 189, 210, 0.68);
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(245, 210, 138, 0.38);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(245, 210, 138, 0.62);
  box-shadow: 0 0 0 4px rgba(215, 181, 110, 0.16);
}

option {
  color: #132033;
  background: #fffdf8;
}

.app-shell {
  background: transparent;
}

.auth-card,
.top-panel,
.module,
.metric {
  border-color: rgba(255, 255, 255, 0.10);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.045));
  color: #f8fafc;
  box-shadow: var(--shadow);
}

.auth-card {
  background: linear-gradient(180deg, rgba(13, 29, 52, 0.96), rgba(8, 18, 33, 0.98));
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 18%),
    linear-gradient(180deg, #07111f, #0f1d33 58%, #07111f);
}

.brand,
.sidebar-note,
.side-nav a:hover {
  border-color: rgba(215, 181, 110, 0.24);
  background: rgba(255, 255, 255, 0.055);
}

.side-nav a {
  color: #b8c5d8;
}

.side-nav a:hover {
  color: #ffffff;
}

.panel-brand-copy small,
.eyebrow,
.field-heading {
  color: #f2d99b;
}

h1,
h2,
.metric strong,
.module-header h2,
.module-header h3,
.rate-price-row strong {
  color: #ffffff;
}

.lead,
.module-help,
.day-settings p,
.calendar-note,
.currency-note,
.metric span,
.auth-form label,
.user-form label,
.campaign-designer label,
.search-form label,
.request-form label,
.card-grid label,
.multiplier-grid label,
.rate-price-grid label,
.discount-card label,
.stop-sale-card label,
.min-stay-card label {
  color: #aebdd2;
}

.status-strip span,
.selected-summary {
  border-color: rgba(215, 181, 110, 0.22);
  color: #f5d28a;
  background: rgba(215, 181, 110, 0.12);
}

.module-header,
.day-settings,
.module-help,
.user-form,
.multiplier-grid,
.campaign-designer,
.rate-plan-card,
.discount-card,
.stop-sale-card,
.min-stay-card,
.calendar-panel,
.currency-note {
  border-color: rgba(245, 210, 138, 0.16);
  background: linear-gradient(180deg, rgba(11, 25, 45, 0.98), rgba(7, 17, 31, 0.99));
  color: #edf4ff;
}

.rate-plan-card:hover,
.discount-card:hover,
.stop-sale-card:hover,
.min-stay-card:hover {
  background: rgba(255, 255, 255, 0.075);
}

.table-wrap {
  border-color: rgba(245, 210, 138, 0.16);
  background: transparent;
  scrollbar-color: rgba(215, 181, 110, 0.42) rgba(6, 14, 25, 0.9);
}

table {
  border-collapse: separate;
  border-spacing: 0 8px;
}

th {
  border-bottom: 0;
  color: #aebfd6;
  background: transparent;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
}

td {
  border-top: 1px solid rgba(245, 210, 138, 0.13);
  border-bottom: 1px solid rgba(245, 210, 138, 0.13);
  color: #f8fafc;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.045));
}

td:first-child {
  border-left: 1px solid rgba(245, 210, 138, 0.13);
  border-radius: 14px 0 0 14px;
}

td:last-child {
  border-right: 1px solid rgba(245, 210, 138, 0.13);
  border-radius: 0 14px 14px 0;
}

.check-tile,
.ghost-button,
.small-button,
.campaign-preview-code {
  border-color: rgba(245, 210, 138, 0.22);
  color: #edf4ff;
  background: rgba(255, 255, 255, 0.065);
  box-shadow: var(--shadow-soft);
}

.check-tile:hover,
.ghost-button:hover,
.small-button:hover {
  border-color: rgba(245, 210, 138, 0.40);
  background: rgba(215, 181, 110, 0.12);
}

.primary-button {
  color: #091422;
  background: linear-gradient(135deg, #f3d794, #b88a44);
  box-shadow: 0 14px 28px rgba(184, 138, 68, 0.25);
}

.primary-button:hover {
  box-shadow: 0 18px 34px rgba(184, 138, 68, 0.30);
}

.danger-button {
  background: linear-gradient(135deg, #ef4444, #991b1b);
}

.calendar-grid {
  background: rgba(245, 210, 138, 0.14);
  border-color: rgba(245, 210, 138, 0.16);
}

.calendar-day {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
}

.calendar-day:hover,
.calendar-day.is-open:not(.is-selected) {
  color: #f5d28a;
  background: rgba(215, 181, 110, 0.16);
}

.calendar-day.is-disabled {
  color: #708199;
  background: rgba(255, 255, 255, 0.035);
}

.calendar-day.is-outside-month {
  color: #8593a8;
}

.selected-summary,
.selected-summary strong {
  color: #f5d28a;
}

.result-card,
.empty-state {
  border-color: rgba(245, 210, 138, 0.16);
  color: #dce6f6;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.045));
  box-shadow: var(--shadow-soft);
}

.result-card h3,
.result-card strong,
.empty-state strong,
.result-detail strong {
  color: #ffffff;
}

.result-card p,
.empty-state p,
.review-list,
.result-detail span {
  color: #aebdd2;
}

.price {
  color: #f5d28a;
}

.tag {
  border: 1px solid rgba(215, 181, 110, 0.20);
  color: #f5d28a;
  background: rgba(215, 181, 110, 0.12);
}

.tag.warning {
  color: #ffcf7a;
  background: rgba(217, 119, 6, 0.16);
}

.tag.success {
  color: #8df0b0;
  background: rgba(22, 163, 74, 0.16);
}

.campaign-preview-code {
  color: #f5d28a;
}

/* Rezervasyon Motoru — Dark Mode hero/summary readability fix. */
html[data-theme="dark"] .top-panel,
html.theme-dark .top-panel,
body.theme-dark .top-panel {
  background:
    radial-gradient(circle at 12% 0%, rgba(215, 181, 110, 0.15), transparent 30%),
    radial-gradient(circle at 92% 16%, rgba(76, 139, 245, 0.10), transparent 34%),
    linear-gradient(145deg, rgba(8, 20, 38, 0.98), rgba(4, 12, 24, 0.995)) !important;
  border-color: rgba(215, 181, 110, 0.18) !important;
  color: #f8fafc !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 28px 72px rgba(0,0,0,.30) !important;
}

html[data-theme="dark"] .top-panel::after,
html.theme-dark .top-panel::after,
body.theme-dark .top-panel::after {
  background: radial-gradient(circle, rgba(215, 181, 110, 0.16), transparent 68%) !important;
}

html[data-theme="dark"] .top-panel h1,
html.theme-dark .top-panel h1,
body.theme-dark .top-panel h1 {
  color: #fff7dc !important;
  text-shadow: 0 12px 34px rgba(0,0,0,.30);
}

html[data-theme="dark"] .top-panel .lead,
html.theme-dark .top-panel .lead,
body.theme-dark .top-panel .lead {
  color: rgba(218, 230, 247, 0.78) !important;
}

html[data-theme="dark"] .top-panel .status-strip span,
html.theme-dark .top-panel .status-strip span,
body.theme-dark .top-panel .status-strip span {
  color: #f5d28a !important;
  background: rgba(215, 181, 110, 0.12) !important;
  border-color: rgba(215, 181, 110, 0.24) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .top-panel .ghost-button,
html.theme-dark .top-panel .ghost-button,
body.theme-dark .top-panel .ghost-button {
  color: #f8fafc !important;
  background: rgba(255,255,255,.075) !important;
  border-color: rgba(215, 181, 110, 0.24) !important;
}

html[data-theme="dark"] .top-panel .primary-button,
html.theme-dark .top-panel .primary-button,
body.theme-dark .top-panel .primary-button {
  color: #091421 !important;
  background: linear-gradient(135deg, #f3d794, #b88a44) !important;
  border-color: transparent !important;
}

/* Rezervasyon Motoru — PMS Light Mode geri yükleme.
   Koyu premium blok korunur; parent PMS light seçiliyken iframe içi yüzeyler light premium görünür. */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #eef1ef;
  --panel: #ffffff;
  --panel-soft: #f7f9f7;
  --ink: #142124;
  --muted: #667174;
  --line: #dce3df;
  --accent: #0d6b6f;
  --accent-dark: #08484c;
  --gold: #b17b30;
  --danger: #b94b4b;
  --success: #24745b;
  --warning: #8a5b15;
  --shadow: 0 18px 50px rgba(22, 37, 40, 0.10);
  --shadow-soft: 0 8px 24px rgba(22, 37, 40, 0.08);
}

html[data-theme="light"] body {
  color: var(--ink);
  background:
    radial-gradient(circle at 16% -10%, rgba(13, 107, 111, 0.10), transparent 26rem),
    radial-gradient(circle at 92% 12%, rgba(177, 123, 48, 0.12), transparent 24rem),
    linear-gradient(135deg, #f6f1e8 0%, #eef1ef 48%, #f8fbf8 100%);
}

html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  border-color: var(--line);
  color: var(--ink);
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(20, 33, 36, 0.02);
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {
  color: rgba(102, 113, 116, 0.72);
}

html[data-theme="light"] input:hover,
html[data-theme="light"] select:hover,
html[data-theme="light"] textarea:hover {
  border-color: #c4d0cc;
}

html[data-theme="light"] input:focus,
html[data-theme="light"] select:focus,
html[data-theme="light"] textarea:focus {
  border-color: rgba(13, 107, 111, 0.62);
  box-shadow: 0 0 0 4px rgba(13, 107, 111, 0.12);
}

html[data-theme="light"] option {
  color: var(--ink);
  background: #ffffff;
}

html[data-theme="light"] .app-shell {
  background: transparent;
}

html[data-theme="light"] .auth-card,
html[data-theme="light"] .top-panel,
html[data-theme="light"] .module,
html[data-theme="light"] .metric {
  border-color: rgba(20, 33, 36, 0.10);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  box-shadow: var(--shadow);
}

html[data-theme="light"] .auth-card {
  background: rgba(255, 255, 255, 0.96);
}

html[data-theme="light"] .sidebar {
  color: #142124;
  background: linear-gradient(180deg, #fffaf1, #f0dfc2 58%, #eef1ef);
  border-right-color: rgba(20, 33, 36, 0.12);
}

html[data-theme="light"] .brand,
html[data-theme="light"] .sidebar-note,
html[data-theme="light"] .side-nav a:hover {
  border-color: rgba(20, 33, 36, 0.12);
  background: rgba(255, 255, 255, 0.64);
}

html[data-theme="light"] .side-nav a {
  color: #34464a;
}

html[data-theme="light"] .side-nav a:hover {
  color: #0d3b40;
}

html[data-theme="light"] .panel-brand-copy small,
html[data-theme="light"] .eyebrow,
html[data-theme="light"] .field-heading {
  color: #0d6b6f;
}

html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] .metric strong,
html[data-theme="light"] .module-header h2,
html[data-theme="light"] .module-header h3,
html[data-theme="light"] .rate-price-row strong,
html[data-theme="light"] .result-card h3,
html[data-theme="light"] .result-card strong,
html[data-theme="light"] .empty-state strong,
html[data-theme="light"] .result-detail strong {
  color: var(--ink);
}

html[data-theme="light"] .lead,
html[data-theme="light"] .module-help,
html[data-theme="light"] .day-settings p,
html[data-theme="light"] .calendar-note,
html[data-theme="light"] .currency-note,
html[data-theme="light"] .metric span,
html[data-theme="light"] .auth-form label,
html[data-theme="light"] .user-form label,
html[data-theme="light"] .campaign-designer label,
html[data-theme="light"] .search-form label,
html[data-theme="light"] .request-form label,
html[data-theme="light"] .card-grid label,
html[data-theme="light"] .multiplier-grid label,
html[data-theme="light"] .rate-price-grid label,
html[data-theme="light"] .discount-card label,
html[data-theme="light"] .stop-sale-card label,
html[data-theme="light"] .min-stay-card label,
html[data-theme="light"] .result-card p,
html[data-theme="light"] .empty-state p,
html[data-theme="light"] .review-list,
html[data-theme="light"] .result-detail span {
  color: var(--muted);
}

html[data-theme="light"] .status-strip span,
html[data-theme="light"] .selected-summary,
html[data-theme="light"] .tag,
html[data-theme="light"] .campaign-preview-code {
  border-color: rgba(13, 107, 111, 0.16);
  color: #0d6b6f;
  background: rgba(13, 107, 111, 0.08);
}

html[data-theme="light"] .module-header,
html[data-theme="light"] .day-settings,
html[data-theme="light"] .module-help,
html[data-theme="light"] .user-form,
html[data-theme="light"] .multiplier-grid,
html[data-theme="light"] .campaign-designer,
html[data-theme="light"] .rate-plan-card,
html[data-theme="light"] .discount-card,
html[data-theme="light"] .stop-sale-card,
html[data-theme="light"] .min-stay-card,
html[data-theme="light"] .calendar-panel,
html[data-theme="light"] .currency-note,
html[data-theme="light"] .result-card,
html[data-theme="light"] .empty-state {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}

html[data-theme="light"] .rate-plan-card:hover,
html[data-theme="light"] .discount-card:hover,
html[data-theme="light"] .stop-sale-card:hover,
html[data-theme="light"] .min-stay-card:hover {
  background: rgba(255, 255, 255, 0.96);
}

html[data-theme="light"] .table-wrap {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
  scrollbar-color: rgba(13, 107, 111, 0.28) rgba(238, 241, 239, 0.9);
}

html[data-theme="light"] th {
  color: #718083;
  background: #fbfcfb;
}

html[data-theme="light"] td {
  border-color: var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
}

html[data-theme="light"] .check-tile,
html[data-theme="light"] .ghost-button,
html[data-theme="light"] .small-button {
  border-color: var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
}

html[data-theme="light"] .check-tile:hover,
html[data-theme="light"] .ghost-button:hover,
html[data-theme="light"] .small-button:hover {
  border-color: rgba(13, 107, 111, 0.28);
  background: rgba(13, 107, 111, 0.08);
}

html[data-theme="light"] .primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: 0 14px 28px rgba(13, 107, 111, 0.20);
}

html[data-theme="light"] .calendar-grid {
  background: rgba(13, 107, 111, 0.08);
  border-color: var(--line);
}

html[data-theme="light"] .calendar-day {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
}

html[data-theme="light"] .calendar-day:hover,
html[data-theme="light"] .calendar-day.is-open:not(.is-selected) {
  color: #0d6b6f;
  background: rgba(13, 107, 111, 0.10);
}

html[data-theme="light"] .calendar-day.is-disabled,
html[data-theme="light"] .calendar-day.is-outside-month {
  color: #8b989a;
}

html[data-theme="light"] .price {
  color: #8a5b15;
}

html[data-theme="light"] .tag.warning {
  color: #8a5b15;
  background: rgba(177, 123, 48, 0.12);
}

html[data-theme="light"] .tag.success {
  color: #24745b;
  background: rgba(36, 116, 91, 0.12);
}

@media (max-width: 760px) {
  .workspace {
    padding: 0.9rem;
  }
}


/* 20260617: Booking Engine segmented workspace tabs */
.app-shell {
  display: block;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(220px, 0.78fr) minmax(420px, 1.6fr) minmax(210px, 0.62fr);
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 1rem;
  color: #f4fbf8;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.10), transparent 22%),
    linear-gradient(135deg, rgba(177, 123, 48, 0.18), transparent 38%),
    #102d32;
  border-right: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 16px 40px rgba(16, 45, 50, 0.18);
}

.brand {
  flex-direction: row;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
  min-height: 58px;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.075);
  backdrop-filter: blur(14px);
}

.panel-logo {
  width: 118px;
  height: 42px;
  object-fit: contain;
  object-position: left center;
}

.panel-brand-copy strong {
  display: block;
  color: #ffffff;
  font-size: 0.96rem;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.panel-brand-copy small {
  margin-top: 0.28rem;
  color: rgba(237, 248, 246, 0.78);
  background: rgba(255, 255, 255, 0.08);
}

.side-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.48rem;
  margin: 0;
}

.side-nav button {
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  min-height: 42px;
  padding: 0.62rem 0.5rem;
  color: rgba(244, 251, 248, 0.84);
  background: rgba(255, 255, 255, 0.065);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1.1;
  text-align: center;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.side-nav button:hover,
.side-nav button:focus-visible {
  outline: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.side-nav button.active {
  color: #102d32;
  border-color: rgba(255, 255, 255, 0.84);
  background: linear-gradient(135deg, #fffaf0, #d7efe9);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
}

.sidebar-note {
  margin-top: 0;
  align-self: stretch;
  display: grid;
  align-content: center;
  min-width: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.085);
}

.sidebar-note strong {
  font-size: 0.9rem;
}

.sidebar-note p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.78rem;
  line-height: 1.35;
}

.workspace {
  padding: 1.1rem 1.25rem 1.35rem;
}

.workspace-panel[hidden],
.layout-grid[hidden] {
  display: none !important;
}

body[data-active-panel="preview"] .layout-grid {
  grid-template-columns: minmax(0, 1fr);
}

body[data-active-panel="preview"] .preview-column {
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1fr) minmax(280px, 0.72fr);
  align-items: start;
}

body:not([data-active-panel="preview"]) .layout-grid {
  grid-template-columns: minmax(0, 1fr);
}

body:not([data-active-panel="preview"]) .admin-column {
  max-width: 1180px;
  width: 100%;
}

body:not([data-active-panel="preview"]) .module.workspace-panel {
  min-height: calc(100vh - 150px);
}

.top-panel {
  align-items: center;
  min-height: 210px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(247, 250, 248, 0.93)),
    radial-gradient(circle at top right, rgba(13, 107, 111, 0.16), transparent 40%);
}

.top-panel h1 {
  max-width: 900px;
  font-size: clamp(2rem, 3.2vw, 3.35rem);
}

.metrics-grid {
  margin-top: 1rem;
}

.module.workspace-panel {
  border-radius: 16px;
  overflow: hidden;
}

.module.workspace-panel > .module-header {
  padding: 1.15rem 1.2rem;
  background: linear-gradient(135deg, rgba(13, 107, 111, 0.08), rgba(177, 123, 48, 0.08));
  border-bottom: 1px solid var(--line);
}

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

  .side-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sidebar-note p {
    -webkit-line-clamp: 3;
  }

  body[data-active-panel="preview"] .preview-column {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .workspace {
    padding: 0.85rem;
  }

  .brand {
    align-items: flex-start;
  }

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

  .side-nav button {
    min-height: 40px;
    font-size: 0.8rem;
  }

  .top-panel,
  .module-header {
    flex-direction: column;
    align-items: flex-start;
  }

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


/* 20260617: Light-mode readability for booking-engine segment bar */
html[data-theme="light"] .sidebar {
  color: #142124;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.88), rgba(255, 250, 240, 0.78)),
    linear-gradient(135deg, rgba(13, 107, 111, 0.10), transparent 42%),
    #eef1ef;
  border-bottom-color: rgba(13, 107, 111, 0.14);
  box-shadow: 0 14px 34px rgba(16, 45, 50, 0.12);
}

html[data-theme="light"] .brand,
html[data-theme="light"] .sidebar-note,
html[data-theme="light"] .side-nav button {
  border-color: rgba(13, 107, 111, 0.13);
  background: rgba(255, 255, 255, 0.72);
}

html[data-theme="light"] .panel-brand-copy strong,
html[data-theme="light"] .sidebar-note strong,
html[data-theme="light"] .side-nav button {
  color: #142124;
}

html[data-theme="light"] .panel-brand-copy small {
  color: #0d6b6f;
  background: rgba(13, 107, 111, 0.08);
  border-color: rgba(13, 107, 111, 0.16);
}

html[data-theme="light"] .sidebar-note p {
  color: #536164;
}

html[data-theme="light"] .side-nav button:hover,
html[data-theme="light"] .side-nav button:focus-visible {
  color: #08484c;
  background: rgba(13, 107, 111, 0.10);
  border-color: rgba(13, 107, 111, 0.28);
}

html[data-theme="light"] .side-nav button.active {
  color: #ffffff;
  border-color: rgba(13, 107, 111, 0.55);
  background: linear-gradient(135deg, #0d6b6f, #08484c);
  box-shadow: 0 12px 26px rgba(13, 107, 111, 0.22);
}
/* 20260617: Final dark override for dashboard hero after segment-tab layout rules. */
html[data-theme="dark"] .top-panel,
html.theme-dark .top-panel,
body.theme-dark .top-panel {
  background:
    radial-gradient(circle at 12% 0%, rgba(215, 181, 110, 0.15), transparent 30%),
    radial-gradient(circle at 92% 16%, rgba(76, 139, 245, 0.10), transparent 34%),
    linear-gradient(145deg, rgba(8, 20, 38, 0.98), rgba(4, 12, 24, 0.995)) !important;
  border-color: rgba(215, 181, 110, 0.18) !important;
  color: #f8fafc !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 28px 72px rgba(0,0,0,.30) !important;
}

html[data-theme="dark"] .top-panel h1,
html.theme-dark .top-panel h1,
body.theme-dark .top-panel h1 {
  color: #fff7dc !important;
  text-shadow: 0 12px 34px rgba(0,0,0,.30);
}

html[data-theme="dark"] .top-panel .lead,
html.theme-dark .top-panel .lead,
body.theme-dark .top-panel .lead {
  color: rgba(218, 230, 247, 0.78) !important;
}

html[data-theme="dark"] .top-panel .status-strip span,
html.theme-dark .top-panel .status-strip span,
body.theme-dark .top-panel .status-strip span {
  color: #f5d28a !important;
  background: rgba(215, 181, 110, 0.12) !important;
  border-color: rgba(215, 181, 110, 0.24) !important;
}

html[data-theme="dark"] .top-panel .ghost-button,
html.theme-dark .top-panel .ghost-button,
body.theme-dark .top-panel .ghost-button {
  color: #f8fafc !important;
  background: rgba(255,255,255,.075) !important;
  border: 1px solid rgba(215, 181, 110, 0.24) !important;
}

html[data-theme="dark"] .top-panel .primary-button,
html.theme-dark .top-panel .primary-button,
body.theme-dark .top-panel .primary-button {
  color: #091421 !important;
  background: linear-gradient(135deg, #f3d794, #b88a44) !important;
  border-color: transparent !important;
}
/* 20260617: Dark-mode booking-engine brand card polish. */
html[data-theme="dark"] .brand,
html.theme-dark .brand,
body.theme-dark .brand {
  border: 1px solid rgba(215, 181, 110, 0.22) !important;
  background:
    linear-gradient(135deg, rgba(255,255,255,.085), rgba(255,255,255,.035)),
    radial-gradient(circle at 10% 0%, rgba(215,181,110,.14), transparent 38%) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 18px 42px rgba(0,0,0,.24) !important;
}

html[data-theme="dark"] .panel-logo,
html.theme-dark .panel-logo,
body.theme-dark .panel-logo {
  width: 150px !important;
  height: 46px !important;
  padding: 7px 10px !important;
  border-radius: 13px !important;
  background: linear-gradient(135deg, rgba(255,250,238,.94), rgba(232,218,190,.86)) !important;
  object-fit: contain !important;
  object-position: center !important;
  filter: contrast(1.10) saturate(1.08) drop-shadow(0 10px 18px rgba(0,0,0,.22)) !important;
}

html[data-theme="dark"] .panel-brand-copy strong,
html.theme-dark .panel-brand-copy strong,
body.theme-dark .panel-brand-copy strong {
  color: #fff7dc !important;
  text-shadow: 0 10px 26px rgba(0,0,0,.34);
}

html[data-theme="dark"] .panel-brand-copy small,
html.theme-dark .panel-brand-copy small,
body.theme-dark .panel-brand-copy small {
  color: #f9e5ad !important;
  background: linear-gradient(135deg, rgba(215,181,110,.22), rgba(255,255,255,.08)) !important;
  border-color: rgba(215,181,110,.34) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
/* 20260617: Dark-mode booking-engine segment active tab polish. */
html[data-theme="dark"] .side-nav button,
html.theme-dark .side-nav button,
body.theme-dark .side-nav button {
  color: rgba(237, 248, 246, 0.82) !important;
  background: rgba(255,255,255,.055) !important;
  border-color: rgba(255,255,255,.14) !important;
}

html[data-theme="dark"] .side-nav button.active,
html[data-theme="dark"] .side-nav button[aria-selected="true"],
html.theme-dark .side-nav button.active,
html.theme-dark .side-nav button[aria-selected="true"],
body.theme-dark .side-nav button.active,
body.theme-dark .side-nav button[aria-selected="true"] {
  color: #081522 !important;
  background: linear-gradient(135deg, #f3d794, #b88a44) !important;
  border-color: rgba(215,181,110,.55) !important;
  box-shadow: 0 12px 26px rgba(184,138,68,.22) !important;
}
/* 20260617: Booking-engine brand card fit fix. */
html[data-theme="dark"] .brand,
html.theme-dark .brand,
body.theme-dark .brand {
  min-width: 360px !important;
  max-width: 390px !important;
  gap: 0.85rem !important;
}

html[data-theme="dark"] .panel-brand-copy,
html.theme-dark .panel-brand-copy,
body.theme-dark .panel-brand-copy {
  display: grid !important;
  align-content: center !important;
  gap: 0.24rem !important;
  min-width: 0 !important;
}

html[data-theme="dark"] .panel-brand-copy small,
html.theme-dark .panel-brand-copy small,
body.theme-dark .panel-brand-copy small {
  width: max-content !important;
  max-width: 100% !important;
  padding-inline: 0.56rem !important;
  font-size: 0.66rem !important;
  line-height: 1.25 !important;
}
/* 20260617: Booking-engine brand card final no-clip sizing. */
html[data-theme="dark"] .brand,
html.theme-dark .brand,
body.theme-dark .brand {
  min-width: 410px !important;
  max-width: 430px !important;
}

html[data-theme="dark"] .panel-logo,
html.theme-dark .panel-logo,
body.theme-dark .panel-logo {
  width: 138px !important;
  min-width: 138px !important;
}

html[data-theme="dark"] .panel-brand-copy small,
html.theme-dark .panel-brand-copy small,
body.theme-dark .panel-brand-copy small {
  font-size: 0.64rem !important;
}
/* 20260617: Booking-engine toolbar brand simplified to hotel logo only. */
html[data-theme="dark"] .brand,
html.theme-dark .brand,
body.theme-dark .brand {
  min-width: 172px !important;
  max-width: 184px !important;
  width: 172px !important;
  justify-content: center !important;
  gap: 0 !important;
  padding: 0.45rem 0.55rem !important;
}

html[data-theme="dark"] .brand .panel-brand-copy,
html.theme-dark .brand .panel-brand-copy,
body.theme-dark .brand .panel-brand-copy {
  display: none !important;
}

html[data-theme="dark"] .panel-logo,
html.theme-dark .panel-logo,
body.theme-dark .panel-logo {
  width: 138px !important;
  min-width: 138px !important;
  height: 46px !important;
  margin: 0 auto !important;
}
/* 20260617: Booking-engine discounts panel uses full workspace width. */
body:has(#discounts.active) .workspace,
html[data-theme="dark"] body:has(#discounts.active) .workspace {
  padding-inline: clamp(1rem, 2.2vw, 2rem) !important;
}

body:has(#discounts.active) .layout-grid {
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100% !important;
}

body:has(#discounts.active) .admin-column {
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100% !important;
}

body:has(#discounts.active) .admin-column > .module:not(#discounts),
body:has(#discounts.active) .preview-column {
  display: none !important;
}

body:has(#discounts.active) #discounts {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: none !important;
  margin-inline: 0 !important;
}

body:has(#discounts.active) #discounts .module-header {
  padding-inline: clamp(1.05rem, 2vw, 1.65rem) !important;
}

body:has(#discounts.active) #discounts .discount-list {
  width: 100% !important;
}

body:has(#discounts.active) #discounts .discount-card {
  padding: clamp(1rem, 1.8vw, 1.45rem) !important;
}

body:has(#discounts.active) #discounts .discount-card > .form-grid,
body:has(#discounts.active) #discounts .discount-card > div:first-child {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(190px, 1fr)) !important;
  gap: 0.95rem !important;
  align-items: end !important;
}

body:has(#discounts.active) #discounts .room-type-options,
body:has(#discounts.active) #discounts .weekday-options,
body:has(#discounts.active) #discounts .day-options,
body:has(#discounts.active) #discounts [data-discount-field="rooms"],
body:has(#discounts.active) #discounts [data-discount-field="days"] {
  grid-column: 1 / -1 !important;
}

body:has(#discounts.active) #discounts .discount-card .check-grid,
body:has(#discounts.active) #discounts .discount-card .room-type-options,
body:has(#discounts.active) #discounts .discount-card .weekday-options,
body:has(#discounts.active) #discounts .discount-card .day-options {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
  gap: 0.65rem !important;
}

body:has(#discounts.active) #discounts .check-tile {
  min-height: 52px !important;
}

@media (max-width: 920px) {
  body:has(#discounts.active) #discounts .discount-card > .form-grid,
  body:has(#discounts.active) #discounts .discount-card > div:first-child {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  body:has(#discounts.active) #discounts .discount-card > .form-grid,
  body:has(#discounts.active) #discounts .discount-card > div:first-child {
    grid-template-columns: 1fr !important;
  }
}
/* 20260617: Booking-engine discounts full-width trigger via active segment button. */
body:has(.side-nav [data-panel-target="discounts"][aria-selected="true"]) .workspace {
  padding-inline: clamp(1rem, 2.2vw, 2rem) !important;
}

body:has(.side-nav [data-panel-target="discounts"][aria-selected="true"]) .layout-grid {
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100% !important;
}

body:has(.side-nav [data-panel-target="discounts"][aria-selected="true"]) .admin-column {
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100% !important;
}

body:has(.side-nav [data-panel-target="discounts"][aria-selected="true"]) .admin-column > .module:not(#discounts),
body:has(.side-nav [data-panel-target="discounts"][aria-selected="true"]) .preview-column {
  display: none !important;
}

body:has(.side-nav [data-panel-target="discounts"][aria-selected="true"]) #discounts {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: none !important;
  margin-inline: 0 !important;
}

body:has(.side-nav [data-panel-target="discounts"][aria-selected="true"]) #discounts .discount-card > .form-grid,
body:has(.side-nav [data-panel-target="discounts"][aria-selected="true"]) #discounts .discount-card > div:first-child {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(190px, 1fr)) !important;
  gap: 0.95rem !important;
  align-items: end !important;
}

body:has(.side-nav [data-panel-target="discounts"][aria-selected="true"]) #discounts .discount-card .check-grid,
body:has(.side-nav [data-panel-target="discounts"][aria-selected="true"]) #discounts .discount-card .room-type-options,
body:has(.side-nav [data-panel-target="discounts"][aria-selected="true"]) #discounts .discount-card .weekday-options,
body:has(.side-nav [data-panel-target="discounts"][aria-selected="true"]) #discounts .discount-card .day-options {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
  gap: 0.65rem !important;
}
/* 20260617: Booking-engine campaign bar and minimum-stay panels use full workspace width. */
body:has(.side-nav [data-panel-target="campaign-designer"][aria-selected="true"]) .workspace,
body:has(.side-nav [data-panel-target="minimum-stays"][aria-selected="true"]) .workspace {
  padding-inline: clamp(1rem, 2.2vw, 2rem) !important;
}

body:has(.side-nav [data-panel-target="campaign-designer"][aria-selected="true"]) .layout-grid,
body:has(.side-nav [data-panel-target="minimum-stays"][aria-selected="true"]) .layout-grid {
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100% !important;
}

body:has(.side-nav [data-panel-target="campaign-designer"][aria-selected="true"]) .admin-column,
body:has(.side-nav [data-panel-target="minimum-stays"][aria-selected="true"]) .admin-column {
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100% !important;
}

body:has(.side-nav [data-panel-target="campaign-designer"][aria-selected="true"]) .admin-column > .module:not(#campaign-designer),
body:has(.side-nav [data-panel-target="minimum-stays"][aria-selected="true"]) .admin-column > .module:not(#minimum-stays),
body:has(.side-nav [data-panel-target="campaign-designer"][aria-selected="true"]) .preview-column,
body:has(.side-nav [data-panel-target="minimum-stays"][aria-selected="true"]) .preview-column {
  display: none !important;
}

body:has(.side-nav [data-panel-target="campaign-designer"][aria-selected="true"]) #campaign-designer,
body:has(.side-nav [data-panel-target="minimum-stays"][aria-selected="true"]) #minimum-stays {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: none !important;
  margin-inline: 0 !important;
}

body:has(.side-nav [data-panel-target="campaign-designer"][aria-selected="true"]) #campaign-designer .module-help,
body:has(.side-nav [data-panel-target="minimum-stays"][aria-selected="true"]) #minimum-stays .module-help {
  margin-inline: clamp(1rem, 1.8vw, 1.45rem) !important;
  border-radius: 18px !important;
}

body:has(.side-nav [data-panel-target="campaign-designer"][aria-selected="true"]) #campaign-designer .campaign-designer {
  grid-template-columns: repeat(3, minmax(190px, 1fr)) !important;
  gap: 0.95rem !important;
  padding: clamp(1rem, 1.8vw, 1.45rem) !important;
  width: 100% !important;
}

body:has(.side-nav [data-panel-target="campaign-designer"][aria-selected="true"]) #campaign-designer .campaign-active,
body:has(.side-nav [data-panel-target="campaign-designer"][aria-selected="true"]) #campaign-designer .campaign-preview-wrap {
  grid-column: 1 / -1 !important;
}

body:has(.side-nav [data-panel-target="campaign-designer"][aria-selected="true"]) #campaign-designer .campaign-preview {
  min-height: 132px !important;
  grid-template-columns: minmax(0, 1fr) minmax(160px, auto) !important;
  align-items: center !important;
}

body:has(.side-nav [data-panel-target="minimum-stays"][aria-selected="true"]) #minimum-stays .min-stay-list {
  width: 100% !important;
}

body:has(.side-nav [data-panel-target="minimum-stays"][aria-selected="true"]) #minimum-stays .min-stay-card {
  padding: clamp(1rem, 1.8vw, 1.45rem) !important;
}

body:has(.side-nav [data-panel-target="minimum-stays"][aria-selected="true"]) #minimum-stays .min-stay-layout {
  grid-template-columns: minmax(260px, 1.35fr) minmax(140px, .6fr) minmax(180px, .8fr) minmax(180px, .8fr) !important;
  gap: 0.95rem !important;
  align-items: end !important;
}

body:has(.side-nav [data-panel-target="minimum-stays"][aria-selected="true"]) #minimum-stays .min-stay-layout .wide {
  grid-column: 1 / -1 !important;
}

body:has(.side-nav [data-panel-target="minimum-stays"][aria-selected="true"]) #minimum-stays .room-check-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
  gap: 0.65rem !important;
}

body:has(.side-nav [data-panel-target="minimum-stays"][aria-selected="true"]) #minimum-stays .row-actions {
  display: flex !important;
  justify-content: flex-end !important;
}

@media (max-width: 920px) {
  body:has(.side-nav [data-panel-target="campaign-designer"][aria-selected="true"]) #campaign-designer .campaign-designer,
  body:has(.side-nav [data-panel-target="minimum-stays"][aria-selected="true"]) #minimum-stays .min-stay-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  body:has(.side-nav [data-panel-target="campaign-designer"][aria-selected="true"]) #campaign-designer .campaign-designer,
  body:has(.side-nav [data-panel-target="minimum-stays"][aria-selected="true"]) #minimum-stays .min-stay-layout {
    grid-template-columns: 1fr !important;
  }
}

/* POSTGRES-12P6Z-FIRST-WEB-RATEPLAN-EDITOR-PERSISTENCE-UX-REPAIR-CANDIDATE */
.rate-plan-summary-card {
  border: 1px solid rgba(200, 168, 94, 0.34);
  background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(250,247,240,0.92));
}
.rate-plan-summary-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.rate-plan-summary-header p { margin: 4px 0 0; color: #655b4a; }
.rate-plan-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  margin: 12px 0;
  color: #3f3628;
}
.rate-plan-badge {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.rate-plan-badge.persisted { background: #e8f5e9; color: #1b5e20; }
.rate-plan-badge.unsaved { background: #fff7df; color: #7a4b00; }
.rate-plan-badge.saving { background: #e3f2fd; color: #0d47a1; }
.rate-plan-badge.error { background: #ffebee; color: #b71c1c; }
.rate-plan-edit-card { border-color: rgba(25, 118, 210, 0.35); }
.booking-engine-save-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  margin: 0 0 1rem;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.10);
}

.booking-engine-save-bar[data-booking-save-dirty="true"] {
  border-color: rgba(217, 119, 6, 0.42);
  background: rgba(255, 251, 235, 0.98);
}

.booking-engine-save-bar[data-booking-save-saving="true"] {
  opacity: 0.82;
}

.booking-engine-save-bar p {
  margin: 0.25rem 0 0;
  color: var(--muted-text, #64748b);
}

.booking-engine-save-bar .form-hint.error {
  color: #b91c1c;
}

.safe-booking-config-error-panel {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(220, 38, 38, 0.35);
  border-radius: 14px;
  background: rgba(127, 29, 29, 0.16);
  color: var(--text-primary, #f8fafc);
}
.safe-booking-config-error-panel ul {
  margin: 8px 0;
  padding-left: 18px;
}
.safe-booking-config-error-panel code {
  font-size: 0.86em;
  word-break: break-word;
}
.safe-error-correlation, .safe-error-debt {
  margin: 6px 0 0;
  opacity: 0.9;
}
