/**
 * Small fixes on top of the Metronic static CSS this app self-hosts
 * (there's no live Tailwind build, so our own classes are added here,
 * not in .tsx files).
 */

/* Panel page content — full width of the main area, without demo6's fixed max-width */
.admin-page-container {
  width: 100%;
  max-width: none !important;
  margin-inline: 0 !important;
  padding-inline: clamp(0.75rem, 1.5vw, 1.25rem);
}

/*
 * Main area scrolling — body has overflow:hidden on desktop; only
 * #scrollable_content should scroll. Without min-h-0 along the flex chain,
 * the scroll container grows with its content and nothing scrolls.
 */
#root {
  min-height: 0;
}

#scrollable_content {
  min-height: 0;
  overscroll-behavior: contain;
}

/* Sidebar menu — active indicator (right-hand bar in RTL) */
#sidebar_primary_menu .kt-menu-item.active > .kt-menu-link {
  position: relative;
  background: var(--background);
  border-color: var(--border);
  font-weight: 600;
}

#sidebar_primary_menu .kt-menu-item.active > .kt-menu-link::before {
  content: '';
  position: absolute;
  top: 0.35rem;
  bottom: 0.35rem;
  inset-inline-start: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--primary);
}

#sidebar_primary_menu .kt-menu-item.here > .kt-menu-link,
#sidebar_primary_menu .kt-menu-item.show > .kt-menu-link {
  background: color-mix(in oklab, var(--primary) 6%, var(--background));
  border-color: color-mix(in oklab, var(--primary) 18%, var(--border));
}

#sidebar_primary_menu .kt-menu-accordion .kt-menu-item.active > .kt-menu-link::before {
  inset-inline-start: 0.25rem;
  width: 2px;
}
@media (min-width: 1024px) {
  .admin-page-container {
    padding-inline: clamp(1rem, 2vw, 1.5rem);
  }
}

/* Table column dividers — Metronic zeroes the border when a table sits in
   kt-card-table (KTUI datatables add dividers via JS); we don't use that
   script, so this override restores dividers for all panel tables. */
.kt-card-table .kt-table-border {
  border-width: 1px;
}
.kt-card-table .kt-table-border td,
.kt-card-table .kt-table-border th {
  border-inline-end-style: solid;
  border-inline-end-width: 1px;
  border-color: var(--border);
}
.kt-card-table .kt-table-border td:last-child,
.kt-card-table .kt-table-border th:last-child {
  border-inline-end-width: 0;
}

/* Rich-text editor body (RichTextEditor.tsx) — deliberately not kt-input,
   which is a fixed-height (34px) single-line input without overflow:hidden,
   so block content (paragraphs, large images) spilled out. This class looks
   like kt-input but is a real block box with a minimum height. */
.rich-text-editor-body {
  display: block;
  width: 100%;
  min-height: 260px;
  border: 1px solid var(--input);
  border-radius: calc(var(--radius) - 2px);
  background-color: var(--background);
  color: var(--foreground);
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  line-height: 1.6;
}
.rich-text-editor-body:focus {
  outline: none;
  border-color: var(--primary);
}
.rich-text-editor-body img,
.rich-text-editor-body video {
  max-width: 100%;
}
.rich-text-editor-body p.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  color: var(--muted-foreground);
  float: right;
  height: 0;
  pointer-events: none;
}

/* Tailwind's reset zeroes heading size/weight; restore them, otherwise
   choosing "Heading 1..6" has no visible effect. */
.rich-text-editor-body h1 { font-size: 1.875rem; font-weight: 700; margin: 0.6em 0 0.3em; }
.rich-text-editor-body h2 { font-size: 1.5rem; font-weight: 700; margin: 0.6em 0 0.3em; }
.rich-text-editor-body h3 { font-size: 1.25rem; font-weight: 600; margin: 0.6em 0 0.3em; }
.rich-text-editor-body h4 { font-size: 1.125rem; font-weight: 600; margin: 0.6em 0 0.3em; }
.rich-text-editor-body h5 { font-size: 1rem; font-weight: 600; margin: 0.6em 0 0.3em; }
.rich-text-editor-body h6 { font-size: 0.9rem; font-weight: 600; margin: 0.6em 0 0.3em; }
.rich-text-editor-body p { margin: 0.4em 0; }
.rich-text-editor-body ul { list-style: disc; padding-inline-start: 1.5rem; margin: 0.4em 0; }
.rich-text-editor-body ol { list-style: decimal; padding-inline-start: 1.5rem; margin: 0.4em 0; }
.rich-text-editor-body blockquote {
  border-inline-start: 3px solid var(--border);
  padding-inline-start: 0.75rem;
  color: var(--secondary-foreground);
  margin: 0.5em 0;
}
.rich-text-editor-body a { color: var(--primary); text-decoration: underline; }
.rich-text-editor-body strong { font-weight: 700; }
.rich-text-editor-body em { font-style: italic; }
.rich-text-editor-body u { text-decoration: underline; }
.rich-text-editor-body s { text-decoration: line-through; }
.rich-text-editor-body mark { background: #fef08a; padding: 0 0.15em; }
/* Floated images/videos must not overflow the editor box */
.rich-text-editor-body::after { content: ''; display: block; clear: both; }

/* Upload progress bar (video/file) — HotelMediaTab */
.upload-progress-track {
  height: 8px;
  border-radius: 999px;
  background-color: var(--border);
  overflow: hidden;
}
.upload-progress-fill {
  height: 100%;
  border-radius: 999px;
  background-color: var(--primary);
  transition: width 0.15s ease;
}
.upload-progress-fill.is-indeterminate {
  width: 35% !important;
  animation: upload-progress-slide 1.1s ease-in-out infinite;
}
@keyframes upload-progress-slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

/* Hotel warning banner — preview for the warning tab in the admin panel */
.hotel-warning-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: #fff9f0;
  border-inline-end: 4px solid #a0522d;
  border-radius: 0.5rem;
  color: #8b4513;
  font-size: 0.875rem;
  line-height: 1.75;
  text-align: start;
}
.hotel-warning-alert svg {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
  color: #a0522d;
}

.neshan-map-picker {
  height: 360px;
  width: 100%;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--border);
}

/* Hotel gallery image previews — HotelMediaTab
   Metronic has no object-cover class; without object-fit the image stretches. */
.hotel-media-preview {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background-color: var(--muted);
}
.hotel-media-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hotel-media-preview__remove {
  position: absolute;
  top: 0.25rem;
  inset-inline-start: 0.25rem;
  z-index: 1;
}

.hotel-media-upload-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.75rem;
}
.hotel-media-upload-row__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.hotel-media-upload-row__remove {
  flex-shrink: 0;
  margin-top: 0.125rem;
}
.hotel-media-upload-modal {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.hotel-media-upload-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 420px;
  overflow-y: auto;
}
.hotel-media-upload-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}
.hotel-media-upload-thumb {
  flex-shrink: 0;
  overflow: hidden;
  width: 120px;
  aspect-ratio: 4 / 3;
  border-radius: 0.375rem;
  border: 1px solid var(--border);
  background-color: var(--muted);
}
.hotel-media-upload-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hotel-media-upload-filename {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  color: var(--secondary-foreground);
  font-family: ui-monospace, monospace;
}

/* Hotel/room form tabs — full-width divider across the card */
.kt-card-header:has(> .hotel-form-tabs) {
  display: block;
  padding: 0;
  border-bottom: none;
  min-height: 0;
}
.hotel-form-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-family: 'IRANSans', ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.hotel-form-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--secondary-foreground);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.hotel-form-tab:hover:not(:disabled):not(.is-active) {
  background: var(--muted);
  color: var(--foreground);
}
.hotel-form-tab.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
  font-weight: 600;
}
.hotel-form-tab:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.hotel-form-tab .ki-filled {
  font-size: 1.05rem;
  line-height: 1;
  opacity: 0.92;
}
.hotel-form-tab span {
  white-space: nowrap;
}

/* Tour form — scrollable tabs, help banner, field sections */
.tour-form-card {
  overflow: hidden;
}
.tour-form-setup-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  margin: 1rem 1rem 0;
  padding: 0.875rem 1rem;
  border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--border));
  border-radius: 0.625rem;
  background: color-mix(in srgb, var(--primary) 8%, var(--card));
  color: var(--foreground);
  font-size: 0.875rem;
  line-height: 1.55;
}
.tour-form-setup-banner > .ki-filled {
  flex-shrink: 0;
  margin-top: 0.125rem;
  font-size: 1.25rem;
  color: var(--primary);
}
.tour-form-setup-banner strong {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
}
.tour-form-setup-banner p {
  margin: 0;
  color: var(--secondary-foreground);
}
.tour-form-tabs-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--card);
}
.tour-form-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.5rem;
}
.tour-form-tab {
  flex-shrink: 0;
  min-height: 2.5rem;
}
.tour-form-tab.is-locked {
  opacity: 0.72;
  border-style: dashed;
  border-color: var(--border);
}
.tour-form-tab.is-locked:not(.is-active):hover {
  background: color-mix(in srgb, var(--muted) 80%, transparent);
}
.tour-form-tab__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 12%, transparent);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1;
}
.tour-form-tab.is-active .tour-form-tab__step {
  background: color-mix(in srgb, var(--primary-foreground) 22%, transparent);
}
.tour-form-tab__label {
  white-space: nowrap;
}
.tour-form-tab__lock {
  font-size: 0.75rem;
  opacity: 0.75;
}
.tour-form-basic {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.25rem 1.25rem 1.5rem;
}
.tour-form-section {
  margin: 0;
  padding: 1rem 1rem 1.125rem;
  border: 1px solid var(--border);
  border-radius: 0.625rem;
  background: color-mix(in srgb, var(--muted) 35%, var(--card));
}
.tour-form-section legend {
  padding: 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
}
.tour-form-basic__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.625rem;
  padding-top: 0.25rem;
}
.tour-form-tab-panel {
  display: flex;
  flex-direction: column;
  min-height: 18rem;
}
.tour-form-tab-panel__header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--muted) 40%, var(--card));
}
.tour-form-tab-panel__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground);
}
.tour-form-tab-panel__desc {
  margin: 0.375rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--secondary-foreground);
}
.tour-form-tab-panel__body {
  padding: 1.25rem;
}
.tour-form-tab-panel__body > .flex.flex-col {
  padding: 0 !important;
}
.tour-form-tab-panel__body .tour-data-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
}
.tour-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.tour-data-table th,
.tour-data-table td {
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: right;
  vertical-align: middle;
}
.tour-data-table th {
  background: var(--muted);
  font-weight: 600;
  color: var(--secondary-foreground);
  white-space: nowrap;
}
.tour-data-table tr:last-child td {
  border-bottom: none;
}
.tour-form-tab-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.jalali-date-picker.is-disabled .jalali-date-picker-trigger {
  opacity: 0.6;
  cursor: not-allowed;
}
.jalali-date-picker-panel {
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.14);
}

/* Toman amount input — LTR number, "Toman" suffix on the left (inline-end in RTL) */
.toman-input-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
}
.toman-input-field {
  flex: 1;
  width: 100%;
  direction: ltr;
  text-align: right;
  font-variant-numeric: tabular-nums;
  /* "Toman" sits visually on the left — pad the left only; right padding left an empty gap */
  padding-left: 4.25rem !important;
  padding-right: 0.75rem !important;
}
.toman-input-suffix {
  position: absolute;
  left: 0.75rem;
  right: auto;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: var(--secondary-foreground);
  pointer-events: none;
  white-space: nowrap;
}

/* Table row actions — grouping and spacing so they're easy to tell apart */
.table-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
}
.table-row-actions-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
}
.table-row-actions-sep {
  flex-shrink: 0;
  width: 1px;
  height: 1.625rem;
  background: var(--border);
  margin-inline: 0.125rem;
}
.table-row-actions .kt-btn-sm {
  gap: 0.375rem;
  white-space: nowrap;
}
.table-row-actions-danger {
  border-color: rgb(254 202 202);
  color: rgb(185 28 28);
  background: rgb(254 242 242);
}
.table-row-actions-danger:hover {
  border-color: rgb(248 113 113);
  background: rgb(254 226 226);
  color: rgb(153 27 27);
}
.table-row-actions-muted {
  color: var(--secondary-foreground);
}

/* Delete confirmation modal */
.confirm-dialog-root {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  font-family: 'IRANSans', ui-sans-serif, system-ui, sans-serif;
}
.confirm-dialog-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgb(15 23 42 / 0.45);
  backdrop-filter: blur(2px);
  cursor: pointer;
  animation: confirm-dialog-fade-in 0.2s ease-out;
}
.confirm-dialog-card {
  position: relative;
  z-index: 1;
  width: min(100%, 26rem);
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--background);
  box-shadow: 0 24px 48px rgb(15 23 42 / 0.18);
  padding: 1.5rem 1.5rem 1.25rem;
  text-align: center;
  animation: confirm-dialog-scale-in 0.24s ease-out;
}
.confirm-dialog-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  margin-inline: auto;
  margin-bottom: 0.875rem;
  border-radius: 9999px;
  background: rgb(254 242 242);
  color: rgb(220 38 38);
}
.confirm-dialog-icon svg {
  width: 1.625rem;
  height: 1.625rem;
}
.confirm-dialog-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1.5;
}
.confirm-dialog-message {
  margin: 0.625rem 0 0;
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--secondary-foreground);
}
.confirm-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.625rem;
  margin-top: 1.25rem;
}
.confirm-dialog-btn-danger {
  background: rgb(220 38 38);
  border-color: rgb(220 38 38);
  color: #fff;
  gap: 0.375rem;
}
.confirm-dialog-btn-danger:hover {
  background: rgb(185 28 28);
  border-color: rgb(185 28 28);
  color: #fff;
}
@keyframes confirm-dialog-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes confirm-dialog-scale-in {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Operation notice — top-left corner */
.operation-alert {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  max-width: min(22rem, calc(100vw - 2rem));
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  box-shadow: 0 10px 30px rgb(15 23 42 / 0.12);
  font-family: 'IRANSans', ui-sans-serif, system-ui, sans-serif;
  font-size: 0.875rem;
  line-height: 1.6;
  animation: operation-alert-in 0.28s ease-out;
}
.operation-alert--success {
  background: #E6F6EE;
  border-color: #6ee7b7;
  color: #065f46;
}
.operation-alert--error {
  background: #FFF7F7;
  border-color: #fca5a5;
  color: #9A0A0A;
}
.operation-alert-icon {
  display: flex;
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
}
.operation-alert-text {
  margin: 0;
  flex: 1;
  font-weight: 500;
}
.operation-alert-close {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: inherit;
  opacity: 0.65;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.operation-alert-close:hover {
  opacity: 1;
}
@keyframes operation-alert-in {
  from {
    opacity: 0;
    transform: translateY(-0.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Modal — higher z-index and darker backdrop so absolute-positioned page buttons don't show through */
.kt-modal.open {
  z-index: 1000;
}
.kt-modal-backdrop {
  z-index: 0;
  background-color: rgb(0 0 0 / 0.55) !important;
}
.kt-modal-content {
  position: relative;
  z-index: 1;
}

/* ─── Panel loading screen ─── */
#root {
  width: 100%;
  min-height: 100vh;
  flex-direction: column;
}

.panel-page-loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  padding: 2rem 1rem;
  box-sizing: border-box;
  background: color-mix(in oklab, var(--background) 88%, var(--muted));
}
.panel-page-loader-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
  width: min(100%, 320px);
  padding: 2rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--background);
  box-shadow: 0 10px 40px rgb(0 0 0 / 0.06);
  animation: panel-loader-in 0.35s ease;
}
.panel-page-loader-brand {
  position: relative;
  width: 4rem;
  height: 4rem;
  display: grid;
  place-items: center;
}
.panel-page-loader-logo {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 9999px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 1.25rem;
  font-weight: 700;
  z-index: 1;
}
.panel-page-loader-ring {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  border: 2px solid transparent;
  border-top-color: var(--primary);
  border-right-color: color-mix(in oklab, var(--primary) 35%, transparent);
  animation: panel-loader-spin 0.85s linear infinite;
}
.panel-page-loader-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--foreground);
}
.panel-page-loader-sub {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--secondary-foreground);
}
.panel-page-loader-bars {
  display: flex;
  gap: 0.375rem;
  width: 100%;
  margin-top: 0.25rem;
}
.panel-page-loader-bars span {
  flex: 1;
  height: 0.375rem;
  border-radius: 9999px;
  background: var(--muted);
  animation: panel-loader-bar 1.1s ease-in-out infinite;
}
.panel-page-loader-bars span:nth-child(2) {
  animation-delay: 0.15s;
}
.panel-page-loader-bars span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes panel-loader-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes panel-loader-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes panel-loader-bar {
  0%,
  100% {
    opacity: 0.45;
    transform: scaleY(0.85);
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

/* Table skeleton */
.table-skeleton-row td {
  padding-block: 0.875rem !important;
}
.table-skeleton-cell {
  display: block;
  height: 0.75rem;
  border-radius: 0.375rem;
  background: linear-gradient(
    90deg,
    var(--muted) 0%,
    color-mix(in oklab, var(--muted) 65%, var(--background)) 50%,
    var(--muted) 100%
  );
  background-size: 200% 100%;
  animation: table-skeleton-shimmer 1.25s ease-in-out infinite;
}
@keyframes table-skeleton-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

/* Progress bar while refetching after a filter change */
.kt-card-table {
  position: relative;
}
.kt-card-table.is-fetching::before {
  content: '';
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 2px;
  z-index: 2;
  background: linear-gradient(
    90deg,
    transparent,
    var(--primary),
    transparent
  );
  background-size: 200% 100%;
  animation: panel-fetch-bar 1s linear infinite;
  pointer-events: none;
}
@keyframes panel-fetch-bar {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Clear-filters button */
.clear-filters-btn {
  align-self: flex-end;
  white-space: nowrap;
  color: var(--destructive);
  border-color: color-mix(in oklab, var(--destructive) 35%, var(--border));
}
.clear-filters-btn:hover {
  background: color-mix(in oklab, var(--destructive) 8%, var(--background));
  border-color: var(--destructive);
  color: var(--destructive);
}

/* ── Room form — aligned with the hotel form (standard Metronic / kt-input) ── */
.room-form-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
  width: 100%;
  box-sizing: border-box;
}

.room-form-section-full {
  width: 100%;
}

.room-form-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .room-form-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}

.room-form-alert {
  margin: 0;
  padding: 0.625rem 0.875rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 40%, var(--background));
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--secondary-foreground);
}

.room-form-section {
  border: 1px solid var(--border);
  border-radius: 0.625rem;
  background: var(--background);
  overflow: hidden;
}

.room-form-section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 45%, var(--background));
}

.room-form-section-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  border-radius: 0.375rem;
  background: var(--background);
  border: 1px solid var(--border);
  color: var(--primary);
}

.room-form-section-icon .ki-filled {
  font-size: 0.875rem;
  line-height: 1;
}

.room-form-section-heading {
  min-width: 0;
  flex: 1;
}

.room-form-section-title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--foreground);
}

.room-form-section-desc {
  margin: 0.15rem 0 0;
  font-size: 0.8438rem;
  line-height: 1.7;
  color: var(--secondary-foreground);
}

.room-form-section-body {
  padding: 1rem;
}

.room-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: 100%;
}

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

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

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

@media (min-width: 1024px) {
  .room-form-grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .room-form-grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.room-form-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 0;
}

.room-form-field-full {
  grid-column: 1 / -1;
}

.room-form-control {
  width: 100%;
}

.room-form-control .kt-input,
.room-form-control select.kt-input,
.room-form-control .toman-input-wrap {
  width: 100%;
}

.room-form-label {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--secondary-foreground);
  line-height: 1.35;
}

.room-form-required {
  margin-inline-start: 0.15rem;
  color: var(--destructive);
}

.room-form-hint {
  margin: 0;
  font-size: 0.8438rem;
  line-height: 1.7;
  color: var(--secondary-foreground);
}

.room-form-error {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--destructive);
}

.room-form-check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 35%, var(--background));
}

.room-form-check-row label {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--secondary-foreground);
  cursor: pointer;
}

.room-form-discount-box {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 0.875rem;
  border-radius: 0.5rem;
  border: 1px dashed var(--border);
  background: color-mix(in oklab, var(--muted) 30%, var(--background));
}

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

@media (min-width: 1024px) {
  .room-form-discount-box {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.room-form-preview {
  margin: 0;
  padding: 0.625rem 0.875rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  background: color-mix(in oklab, var(--primary) 8%, var(--background));
  color: var(--primary);
  border: 1px solid color-mix(in oklab, var(--primary) 20%, var(--border));
}

.room-form-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--background);
}

.room-form-footer-error {
  flex: 1;
  align-self: center;
  margin: 0;
  font-size: 0.8125rem;
  color: var(--destructive);
}

.hotel-context-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.625rem;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 30%, var(--background));
  font-size: 0.875rem;
  line-height: 1.45;
}

.hotel-context-bar-muted {
  color: var(--secondary-foreground);
  background: var(--muted);
  border-color: var(--border);
}

.hotel-context-bar-main {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  min-width: 0;
  flex: 1;
}

.hotel-context-bar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border-radius: 0.375rem;
  background: var(--background);
  border: 1px solid var(--border);
  color: var(--primary);
}

.hotel-context-bar-icon .ki-filled {
  font-size: 0.9375rem;
  line-height: 1;
}

.hotel-context-bar-text {
  min-width: 0;
}

.hotel-context-bar-name {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--foreground);
}

.hotel-context-bar-caption {
  margin: 0.2rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--secondary-foreground);
}

.hotel-context-bar-id-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  flex-shrink: 0;
  padding: 0.5rem 0.875rem;
  border-radius: 0.625rem;
  background: var(--background);
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px color-mix(in oklab, var(--foreground) 5%, transparent);
}

.hotel-context-bar-id-label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--secondary-foreground);
  white-space: nowrap;
}

.hotel-context-bar-id {
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.1;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  color: var(--foreground);
  unicode-bidi: plaintext;
  padding-inline: 0.125rem;
}

.hotel-context-bar-loading {
  justify-content: center;
}

.hotel-context-bar-skeleton {
  display: block;
  width: min(100%, 28rem);
  height: 2.75rem;
  margin-inline: auto;
  border-radius: 0.5rem;
  background: color-mix(in oklab, var(--muted) 80%, var(--background));
  animation: pulse 1.5s ease-in-out infinite;
}

.room-page-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 14rem;
  padding: 3rem 1.5rem;
}

.room-page-loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.875rem;
  width: 100%;
  max-width: 24rem;
  margin-inline: auto;
  text-align: center;
}

.room-page-loading-spinner {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  border: 3px solid color-mix(in oklab, var(--primary) 18%, var(--border));
  border-top-color: var(--primary);
  animation: room-page-spin 0.75s linear infinite;
}

.room-context-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  border-radius: 0.625rem;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 30%, var(--background));
}

.room-context-bar-name {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--foreground);
}

@keyframes room-page-spin {
  to {
    transform: rotate(360deg);
  }
}

.room-list-search {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.room-list-search .kt-input {
  max-width: none;
}

/* Description editor — full width */
.room-form-section-full .room-form-section-body > .flex.flex-col {
  width: 100%;
}

.room-form-section-full .rich-text-editor-body,
.room-form-section-full .ProseMirror {
  min-height: 10rem;
  font-size: 0.875rem;
  line-height: 1.6;
}

/* Green button — approve a hotel submitted by an owner. Metronic ships no success variant. */
.kt-btn-success {
  border-color: var(--color-green-500);
  background-color: var(--color-green-500);
  color: var(--color-white);
}
.kt-btn-success:hover {
  background-color: var(--color-green-600, var(--color-green-500));
  border-color: var(--color-green-600, var(--color-green-500));
}

.room-form-tab-panel {
  min-height: 8rem;
  padding: 0 1.25rem 1.25rem;
}

/* ══════════════════════════════════════════════════════════════
   Minimum text size — Persian legibility
   ──────────────────────────────────────────────────────────────
   Persian script looks smaller than Latin at the same size; dots and
   strokes get lost at small heights. Tailwind's default 12px and 14px
   steps are too small here, so the small steps are raised and given
   a looser line height.
   ══════════════════════════════════════════════════════════════ */
.text-\[10px\],
.text-\[11px\],
.text-2xs {
  font-size: 0.8125rem !important; /* 13px */
  line-height: 1.7 !important;
}

.text-xs {
  font-size: 0.8438rem !important; /* 13.5px */
  line-height: 1.7 !important;
}

.text-sm {
  font-size: 0.9375rem !important; /* 15px */
  line-height: 1.65 !important;
}

/* Text size for Metronic's small component variants — 11/12px is too small for Persian */
.kt-badge-sm,
.kt-btn-sm,
.kt-menu-item-sm .kt-menu-title {
  font-size: 0.8125rem !important; /* 13px */
  line-height: 1.5 !important;
}

.kt-badge-xs,
.kt-btn-xs {
  font-size: 0.78rem !important; /* 12.5px */
  line-height: 1.45 !important;
}

/*
 * Shared panel components ported from the admin panel stylesheet: DataTable
 * (desktop table / mobile cards), form alerts and fields, the profile layout,
 * reservation detail and dropdown panels. Without these, the shared
 * components rendered unstyled (both table and card views at once).
 */

.admin-profile-layout {
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.admin-profile-sidebar {
  position: sticky;
  top: 1rem;
}

.admin-profile-sidebar .kt-card {
  overflow: hidden;
}

.admin-profile-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 !important;
}

.admin-profile-nav__hero {
  padding: 1.25rem 1rem 1rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, color-mix(in oklab, var(--primary) 6%, transparent) 0%, transparent 100%);
}

.admin-profile-nav__avatar {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 0.75rem;
  border-radius: 9999px;
  background: color-mix(in oklab, var(--primary) 14%, var(--background));
  color: var(--primary);
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1;
}

.admin-profile-nav__name {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--foreground);
  word-break: break-word;
}

.admin-profile-nav__meta {
  margin: 0.375rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--secondary-foreground);
}

.admin-profile-nav__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.375rem;
  margin-top: 0.625rem;
}

.admin-profile-nav__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
}

.admin-profile-nav__stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.5rem 0.625rem;
  border-radius: 0.5rem;
  background: var(--muted);
  min-width: 0;
}

.admin-profile-nav__stat-label {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  line-height: 1.45;
  font-weight: 500;
}

.admin-profile-nav__stat-value {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1.45;
  word-break: break-word;
}

.admin-profile-nav__actions {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding: 0.5rem;
  max-height: min(52vh, 28rem);
  overflow-y: auto;
}

.admin-profile-nav__tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 2.5rem;
  padding: 0.5625rem 0.875rem;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--secondary-foreground);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.45;
  text-align: start;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.admin-profile-nav__tab i {
  font-size: 1rem;
  opacity: 0.85;
  flex-shrink: 0;
}

.admin-profile-nav__tab:hover {
  background: var(--muted);
  color: var(--foreground);
}

.admin-profile-nav__tab.is-active {
  background: color-mix(in oklab, var(--primary) 12%, var(--background));
  color: var(--primary);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--primary);
}

.admin-profile-main .kt-card {
  min-height: 100%;
}

.admin-profile-panel {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.admin-profile-panel__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.admin-profile-panel__title {
  margin: 0;
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--foreground);
}

.admin-profile-panel__desc {
  margin: 0.375rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--secondary-foreground);
}

.admin-profile-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-profile-panel__body {
  flex: 1;
  min-width: 0;
}

.admin-form-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 0;
}

.admin-form-field.span-2 {
  grid-column: 1 / -1;
}

.admin-form-field__label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--secondary-foreground);
  line-height: 1.45;
}

.admin-form-field__required {
  color: var(--destructive);
}

.admin-form-field__hint {
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--muted-foreground);
}

.admin-form .kt-input:not(textarea) {
  min-height: 2.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0.625rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-form .kt-input:focus {
  outline: none;
  border-color: color-mix(in oklab, var(--primary) 55%, var(--border));
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 12%, transparent);
}

.admin-form-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.admin-form-alert {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.admin-form-alert.is-error {
  color: var(--destructive);
}

.admin-form-alert.is-success {
  color: var(--success, #16a34a);
}

.reservation-detail-code {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  word-break: break-all;
}

.reservation-detail-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

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

.reservation-detail-section-title {
  margin: 0 0 1rem;
  padding-bottom: 0.625rem;
  border-bottom: 2px solid var(--border);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--foreground);
}

.reservation-detail-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 0.875rem;
  padding: 1.125rem 1.25rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: color-mix(in oklab, var(--primary) 6%, var(--background));
}

.reservation-detail-summary__item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.reservation-detail-summary__label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--secondary-foreground);
  line-height: 1.4;
}

.reservation-detail-summary__value {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--foreground);
  word-break: break-word;
}

.reservation-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.reservation-detail-row {
  display: grid;
  grid-template-columns: minmax(6.5rem, 38%) 1fr;
  gap: 0.75rem 1rem;
  align-items: baseline;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.reservation-detail-row:last-child {
  border-bottom: 0;
}

.reservation-detail-row__label {
  color: var(--secondary-foreground);
  font-size: 0.875rem;
  font-weight: 500;
}

.reservation-detail-row__value {
  text-align: start;
  font-weight: 600;
  color: var(--foreground);
  word-break: break-word;
}

.reservation-detail-postal {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.reservation-detail-postal:last-child {
  border-bottom: 0;
}

.reservation-detail-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.reservation-detail-timeline__item {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 0.375rem);
}

.reservation-detail-timeline__time {
  font-size: 0.875rem;
  color: var(--secondary-foreground);
}

@media (max-width: 640px) {
  .reservation-detail-timeline__item {
    grid-template-columns: 1fr;
    gap: 0.375rem;
  }
}

@media (max-width: 991px) {
  .admin-profile-layout {
    grid-template-columns: minmax(0, 1fr); /* 1fr would grow to the nowrap tab row and overflow narrow screens */
  }

  .admin-profile-sidebar {
    position: static;
  }

  .admin-profile-nav__actions {
    flex-direction: row;
    flex-wrap: nowrap;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.625rem;
    scrollbar-width: thin;
  }

  .admin-profile-nav__tab {
    flex-shrink: 0;
    width: auto;
    white-space: nowrap;
    box-shadow: none;
  }

  .admin-profile-nav__tab.is-active {
    box-shadow: none;
    border: 1px solid color-mix(in oklab, var(--primary) 35%, transparent);
  }
}

@media (max-width: 639px) {
  .admin-form-field.span-2 {
    grid-column: auto;
  }

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

.admin-data-table .admin-data-table-el {
  border-collapse: collapse !important;
  width: 100%;
}

.admin-data-table .admin-data-table-el th,
.admin-data-table .admin-data-table-el td {
  border-inline-end: 1px solid var(--border, #DDDDDD) !important;
  border-block-end: 1px solid var(--border, #DDDDDD) !important;
  vertical-align: middle;
}

.admin-data-table .admin-data-table-el th:last-child,
.admin-data-table .admin-data-table-el td:last-child {
  border-inline-end-width: 0 !important;
}

.admin-data-table .admin-data-table-el tbody tr:last-child td {
  border-block-end-width: 0 !important;
}

.admin-data-table .admin-data-table-el thead th {
  background: color-mix(in oklab, var(--muted, #F4F4F4) 70%, transparent);
  font-weight: 600;
}

.admin-data-table-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.admin-data-table-mobile {
  display: none;
}

.admin-data-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--background);
}

.admin-data-card + .admin-data-card {
  margin-top: 0.75rem;
}

.admin-data-card-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1.5;
}

.admin-data-card-fields {
  display: grid;
  gap: 0.625rem;
  margin: 0;
}

.admin-data-card-field {
  display: grid;
  gap: 0.2rem;
}

.admin-data-card-field dt {
  margin: 0;
  font-size: 0.75rem;
  color: var(--secondary-foreground);
}

.admin-data-card-field dd {
  margin: 0;
  font-size: 0.875rem;
  color: var(--foreground);
  line-height: 1.5;
  word-break: break-word;
}

.admin-data-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--border);
}

.admin-data-card--skeleton {
  gap: 0.625rem;
}

.admin-data-table-mobile-status {
  margin: 0;
  padding: 1.5rem 0.5rem;
  text-align: center;
  font-size: 0.875rem;
}

.admin-data-table-mobile-skeleton {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem;
}

@media (max-width: 767px) {
  .admin-data-table--cards .admin-data-table-desktop {
    display: none;
  }

  .admin-data-table--cards .admin-data-table-mobile {
    display: block;
    padding: 0.75rem;
  }
}

#scrollable_content .admin-data-table-el {
  font-size: 0.875rem !important;
}

#scrollable_content .admin-data-table-el th,
#scrollable_content .admin-data-table-el td {
  font-size: inherit !important;
}

#scrollable_content .admin-data-card-title {
  font-size: 1rem !important;
}

#scrollable_content .admin-data-card-field dt {
  font-size: 0.8125rem !important;
}

#scrollable_content .admin-data-card-field dd {
  font-size: 0.9375rem !important;
}

@media (max-width: 639px) {
  .reservation-detail-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .reservation-detail-row__value {
    padding-inline-start: 0.25rem;
  }
}

.admin-dropdown-panel,
.searchable-select-dropdown {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  background: var(--popover, var(--background));
  color: var(--popover-foreground, var(--foreground));
  box-shadow:
    0 4px 6px -1px rgb(0 0 0 / 0.1),
    0 2px 4px -2px rgb(0 0 0 / 0.1);
  max-height: min(400px, calc(100vh - 16px));
  overflow-y: auto;
}

.searchable-select-dropdown .kt-menu-link:hover {
  background: var(--muted);
}

.searchable-select-dropdown .kt-menu-link {
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

/*
 * Reservation edit form fields and the printable sales invoice, ported from
 * the admin panel stylesheet together with the pages that use them.
 */

#scrollable_content textarea.admin-textarea--compact {
  min-height: 3.25rem;
}

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

.admin-form-grid--single {
  grid-template-columns: 1fr;
  max-width: 36rem;
}

.admin-form-field__error {
  margin: 0;
  font-size: 0.8438rem;
  line-height: 1.45;
  color: var(--destructive);
}

.admin-form-control {
  width: 100%;
  min-width: 0;
}

.admin-form-control .kt-input,
.admin-form-control textarea.kt-input,
.admin-form-control .toman-input-wrap,
.admin-form-control .searchable-select {
  width: 100%;
}

.admin-form-control .kt-input:not(textarea) {
  min-height: 2.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0.625rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-form-control .kt-input:focus {
  outline: none;
  border-color: color-mix(in oklab, var(--primary) 55%, var(--border));
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 12%, transparent);
}

@media (max-width: 639px) {
  .admin-form-grid {
    grid-template-columns: 1fr;
  }
}

.no-print {
  /* Hidden when printing via @media print */
}

.invoice-viewport {
  min-height: 100vh;
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

html.invoice-page-active,
html.invoice-page-active body {
  overflow: auto !important;
  height: auto !important;
  min-height: 100%;
}

html.invoice-page-active #root {
  min-height: 100vh;
  height: auto;
}

.invoice-toolbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--background) 92%, transparent);
  backdrop-filter: blur(8px);
}

.invoice-toolbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  max-width: 860px;
  margin-inline: auto;
  padding: 0.75rem 1rem;
}

.invoice-stage {
  padding: 1.5rem 1rem 2.5rem;
}

.invoice-paper {
  max-width: 210mm;
  margin-inline: auto;
}

.tax-invoice-sheet {
  color: #111827;
  background: #ffffff;
  border: 1px solid #C7C7C7;
  border-radius: 0.75rem;
  box-shadow: 0 8px 30px rgb(15 23 42 / 0.08);
  font-family: 'IRANSans', Tahoma, ui-sans-serif, system-ui, sans-serif;
  font-size: 11px;
  line-height: 1.65;
  overflow: visible;
}

.tax-invoice-sheet--loading {
  padding: 3rem;
  text-align: center;
  color: #727272;
}

.tax-invoice-sheet__header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 2px solid #246BAA;
  background: linear-gradient(180deg, #F8F8F8 0%, #ffffff 100%);
}

.tax-invoice-sheet__brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.tax-invoice-sheet__logo {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.85rem;
  background: #246BAA;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
}

.tax-invoice-sheet__company {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #333333;
}

.tax-invoice-sheet__subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  color: #727272;
}

.tax-invoice-sheet__site-url {
  margin: 0.25rem 0 0;
  font-size: 0.68rem;
  color: #727272;
}

.tax-invoice-sheet__meta {
  text-align: end;
}

.tax-invoice-sheet__meta h1 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: #333333;
}

.tax-invoice-sheet__meta dl {
  display: grid;
  gap: 0.25rem;
  margin: 0;
}

.tax-invoice-sheet__meta dl > div {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.tax-invoice-sheet__meta dt {
  margin: 0;
  color: #727272;
}

.tax-invoice-sheet__meta dd {
  margin: 0;
  font-weight: 700;
  color: #333333;
}

.tax-invoice-sheet__parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid #DDDDDD;
}

.tax-invoice-sheet__party {
  padding: 1rem 1.25rem;
}

.tax-invoice-sheet__party:first-child {
  border-inline-end: 1px solid #DDDDDD;
}

.tax-invoice-sheet__party h2,
.tax-invoice-sheet__lines h2,
.tax-invoice-sheet__settlements h2,
.tax-invoice-sheet__payment h2,
.tax-invoice-sheet__reservation h2 {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #727272;
  text-transform: uppercase;
}

.tax-invoice-sheet__party dl,
.tax-invoice-sheet__reservation dl,
.tax-invoice-sheet__payment dl {
  display: grid;
  gap: 0.35rem;
  margin: 0;
}

.tax-invoice-sheet__party dl > div,
.tax-invoice-sheet__reservation dl > div,
.tax-invoice-sheet__payment dl > div {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.5rem;
}

.tax-invoice-sheet__party dt,
.tax-invoice-sheet__reservation dt,
.tax-invoice-sheet__payment dt {
  margin: 0;
  color: #727272;
}

.tax-invoice-sheet__party dd,
.tax-invoice-sheet__reservation dd,
.tax-invoice-sheet__payment dd {
  margin: 0;
  font-weight: 600;
  color: #333333;
  word-break: break-word;
}

.tax-invoice-sheet__party-wide {
  grid-column: 1 / -1;
  display: grid !important;
  grid-template-columns: 5.5rem 1fr !important;
}

.tax-invoice-sheet__reservation {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #DDDDDD;
  background: #F8F8F8;
}

.tax-invoice-sheet__reservation dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem 1rem;
}

.tax-invoice-sheet__reservation dl > div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.tax-invoice-sheet__reservation .tax-invoice-sheet__party-wide {
  grid-column: 1 / -1;
  flex-direction: row;
  gap: 0.5rem;
}

.tax-invoice-sheet__lines,
.tax-invoice-sheet__settlements {
  padding: 1rem 1.25rem;
}

.tax-invoice-sheet__table-wrap {
  overflow-x: auto;
}

.tax-invoice-sheet table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #C7C7C7;
}

.tax-invoice-sheet th,
.tax-invoice-sheet td {
  border: 1px solid #C7C7C7;
  padding: 0.5rem 0.45rem;
  vertical-align: top;
  text-align: start;
}

.tax-invoice-sheet thead th {
  background: #F4F4F4;
  font-size: 0.72rem;
  font-weight: 700;
  color: #334155;
}

.tax-invoice-sheet .col-row { width: 2.5rem; }

.tax-invoice-sheet .col-qty { width: 3.5rem; }

.tax-invoice-sheet .col-unit { width: 3.5rem; }

.tax-invoice-sheet .col-pct { width: 3.75rem; }

.tax-invoice-sheet .col-money { width: 6.75rem; white-space: nowrap; }

.tax-invoice-sheet__line-title {
  margin: 0;
  font-weight: 700;
  color: #333333;
}

.tax-invoice-sheet__line-meta {
  margin: 0.2rem 0 0;
  font-size: 0.68rem;
  color: #727272;
  line-height: 1.55;
}

.tax-invoice-sheet__line-total {
  font-weight: 800;
}

.tax-invoice-sheet__bottom {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid #DDDDDD;
  align-items: start;
}

.tax-invoice-sheet__legal {
  font-size: 0.72rem;
  color: #727272;
  line-height: 1.75;
}

.tax-invoice-sheet__legal p {
  margin: 0 0 0.45rem;
}

.tax-invoice-sheet__totals {
  margin: 0;
  border: 1px solid #C7C7C7;
  border-radius: 0.5rem;
  overflow: hidden;
}

.tax-invoice-sheet__totals > div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid #DDDDDD;
}

.tax-invoice-sheet__totals > div:last-child {
  border-bottom: 0;
}

.tax-invoice-sheet__totals dt {
  margin: 0;
  color: #475569;
}

.tax-invoice-sheet__totals dd {
  margin: 0;
  font-weight: 700;
  text-align: end;
  color: #333333;
}

.tax-invoice-sheet__discount {
  color: #C10D0D !important;
}

.tax-invoice-sheet__payable {
  background: #F7FBFF;
}

.tax-invoice-sheet__payable dt,
.tax-invoice-sheet__payable dd {
  color: #246BAA;
  font-size: 0.9rem;
  font-weight: 800;
}

.tax-invoice-sheet__words {
  flex-direction: column !important;
  align-items: flex-start !important;
  background: #F8F8F8;
}

.tax-invoice-sheet__words dd {
  text-align: start !important;
  font-weight: 700;
  line-height: 1.7;
}

.tax-invoice-sheet__payment {
  padding: 0.85rem 1.25rem 1rem;
  border-top: 1px solid #DDDDDD;
}

.tax-invoice-sheet__payment dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem 1rem;
}

.tax-invoice-sheet__payment dl > div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.tax-invoice-sheet__voucher {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid #DDDDDD;
  background: #F5FCF9;
}

.tax-invoice-sheet__voucher-title {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 800;
  color: #088949;
}

.tax-invoice-sheet__voucher-text {
  margin: 0.35rem 0 0;
  max-width: 34rem;
  font-size: 0.72rem;
  line-height: 1.7;
  color: #088949;
}

.tax-invoice-sheet__voucher-code {
  min-width: 8.5rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid #bbf7d0;
  border-radius: 0.65rem;
  background: #ffffff;
  text-align: center;
}

.tax-invoice-sheet__voucher-code span {
  display: block;
  font-size: 0.68rem;
  color: #727272;
}

.tax-invoice-sheet__voucher-code strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1rem;
  color: #333333;
}

.tax-invoice-sheet__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid #DDDDDD;
}

.tax-invoice-sheet__footer-main {
  flex: 1;
  min-width: 14rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tax-invoice-sheet__site-contact h2 {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #727272;
  text-transform: uppercase;
}

.tax-invoice-sheet__site-contact dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 1rem;
  margin: 0;
}

.tax-invoice-sheet__site-contact dl > div {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 0.35rem;
}

.tax-invoice-sheet__site-contact dt {
  margin: 0;
  color: #727272;
  font-size: 0.68rem;
}

.tax-invoice-sheet__site-contact dd {
  margin: 0;
  font-weight: 600;
  color: #333333;
  font-size: 0.72rem;
  word-break: break-word;
}

.tax-invoice-sheet__footer-main > p {
  max-width: 28rem;
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.7;
  color: #AAAAAA;
}

.tax-invoice-sheet__stamp {
  text-align: center;
}

.tax-invoice-sheet__stamp span {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.72rem;
  color: #727272;
}

.tax-invoice-sheet__stamp div {
  width: 8rem;
  height: 4rem;
  border: 1px dashed #AAAAAA;
  border-radius: 0.5rem;
}

.tax-invoice-sheet__closing {
  display: flex;
  flex-direction: column;
}

@media (max-width: 767px) {
  .tax-invoice-sheet__parties,
  .tax-invoice-sheet__bottom {
    grid-template-columns: 1fr;
  }

  .tax-invoice-sheet__party:first-child {
    border-inline-end: 0;
    border-bottom: 1px solid #DDDDDD;
  }

  .tax-invoice-sheet__reservation dl,
  .tax-invoice-sheet__payment dl {
    grid-template-columns: 1fr;
  }

  .tax-invoice-sheet__reservation dl > div,
  .tax-invoice-sheet__payment dl > div {
    flex-direction: row;
    display: grid;
    grid-template-columns: 5.5rem 1fr;
  }
}

@media print {
  html.invoice-page-active,
  html.invoice-page-active body {
    background: #ffffff !important;
    color: #111111 !important;
    height: auto !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  html.invoice-printing .invoice-viewport {
    height: auto !important;
    overflow: visible !important;
  }

  .no-print {
    display: none !important;
  }

  .invoice-viewport,
  .invoice-stage,
  .invoice-paper {
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
    max-width: none !important;
    overflow: visible !important;
    height: auto !important;
  }

  .tax-invoice-sheet,
  .tax-invoice-sheet--fit-page {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    max-width: none !important;
    width: 100% !important;
    font-size: 8.5px !important;
    line-height: 1.35 !important;
    page-break-after: avoid !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .tax-invoice-sheet__header {
    padding: 0.4rem 0.55rem !important;
    gap: 0.35rem !important;
  }

  .tax-invoice-sheet__logo {
    width: 1.75rem !important;
    height: 1.75rem !important;
    font-size: 0.85rem !important;
    border-radius: 0.4rem !important;
  }

  .tax-invoice-sheet__company {
    font-size: 0.82rem !important;
  }

  .tax-invoice-sheet__subtitle,
  .tax-invoice-sheet__site-url {
    font-size: 0.62rem !important;
    margin-top: 0.1rem !important;
  }

  .tax-invoice-sheet__meta h1 {
    font-size: 0.82rem !important;
    margin-bottom: 0.25rem !important;
  }

  .tax-invoice-sheet__meta dl {
    gap: 0.1rem !important;
  }

  .tax-invoice-sheet__party,
  .tax-invoice-sheet__lines,
  .tax-invoice-sheet__settlements,
  .tax-invoice-sheet__payment,
  .tax-invoice-sheet__reservation {
    padding: 0.35rem 0.55rem !important;
  }

  .tax-invoice-sheet__party h2,
  .tax-invoice-sheet__lines h2,
  .tax-invoice-sheet__settlements h2,
  .tax-invoice-sheet__payment h2,
  .tax-invoice-sheet__reservation h2,
  .tax-invoice-sheet__site-contact h2 {
    margin-bottom: 0.3rem !important;
    font-size: 0.62rem !important;
  }

  .tax-invoice-sheet__party dl,
  .tax-invoice-sheet__reservation dl,
  .tax-invoice-sheet__payment dl,
  .tax-invoice-sheet__site-contact dl {
    gap: 0.15rem !important;
  }

  .tax-invoice-sheet__party dl > div,
  .tax-invoice-sheet__reservation dl > div,
  .tax-invoice-sheet__payment dl > div,
  .tax-invoice-sheet__site-contact dl > div {
    grid-template-columns: 4.25rem 1fr !important;
    gap: 0.25rem !important;
  }

  .tax-invoice-sheet__reservation dl {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 0.25rem 0.4rem !important;
  }

  .tax-invoice-sheet__reservation .tax-invoice-sheet__party-wide {
    grid-column: 1 / -1 !important;
  }

  .tax-invoice-sheet__line-meta {
    display: none !important;
  }

  .tax-invoice-sheet th,
  .tax-invoice-sheet td {
    padding: 0.2rem 0.25rem !important;
    font-size: 0.62rem !important;
  }

  .tax-invoice-sheet thead th {
    font-size: 0.6rem !important;
  }

  .tax-invoice-sheet__bottom {
    padding: 0.35rem 0.55rem !important;
    gap: 0.35rem !important;
    grid-template-columns: 1fr 0.9fr !important;
  }

  .tax-invoice-sheet__legal {
    font-size: 0.58rem !important;
    line-height: 1.45 !important;
  }

  .tax-invoice-sheet__legal p {
    margin-bottom: 0.2rem !important;
  }

  .tax-invoice-sheet__totals > div {
    padding: 0.22rem 0.35rem !important;
  }

  .tax-invoice-sheet__totals dt,
  .tax-invoice-sheet__totals dd {
    font-size: 0.62rem !important;
  }

  .tax-invoice-sheet__words dd {
    font-size: 0.58rem !important;
    line-height: 1.4 !important;
  }

  .tax-invoice-sheet__closing {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.25rem 0.45rem !important;
    align-items: start !important;
  }

  .tax-invoice-sheet__payment {
    margin: 0 !important;
    border-bottom: none !important;
  }

  .tax-invoice-sheet__payment dl {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.2rem 0.35rem !important;
  }

  .tax-invoice-sheet__payment dl > div {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.05rem !important;
  }

  .tax-invoice-sheet__settlements {
    grid-column: 1 / -1 !important;
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
  }

  .tax-invoice-sheet__voucher {
    margin: 0 !important;
    padding: 0.35rem 0.55rem !important;
    gap: 0.35rem !important;
  }

  .tax-invoice-sheet__voucher-title {
    font-size: 0.68rem !important;
    margin-bottom: 0.15rem !important;
  }

  .tax-invoice-sheet__voucher-text {
    font-size: 0.58rem !important;
    line-height: 1.4 !important;
  }

  .tax-invoice-sheet__voucher-code {
    min-width: 5.5rem !important;
    padding: 0.25rem 0.35rem !important;
  }

  .tax-invoice-sheet__voucher-code strong {
    font-size: 0.75rem !important;
  }

  .tax-invoice-sheet__footer {
    grid-column: 1 / -1 !important;
    padding: 0.35rem 0.55rem !important;
    gap: 0.35rem !important;
  }

  .tax-invoice-sheet__footer-main {
    gap: 0.25rem !important;
  }

  .tax-invoice-sheet__footer-main > p {
    font-size: 0.56rem !important;
    line-height: 1.4 !important;
    margin: 0 !important;
  }

  .tax-invoice-sheet__site-contact dl {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0.2rem 0.35rem !important;
  }

  .tax-invoice-sheet__site-contact dl > div {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.05rem !important;
  }

  .tax-invoice-sheet__site-contact .tax-invoice-sheet__party-wide {
    grid-column: 1 / -1 !important;
    flex-direction: row !important;
    gap: 0.25rem !important;
  }

  .tax-invoice-sheet__stamp div {
    width: 5rem !important;
    height: 2.5rem !important;
  }

  .tax-invoice-sheet__stamp span {
    font-size: 0.58rem !important;
  }

  .tax-invoice-sheet table {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .tax-invoice-sheet tr {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .tax-invoice-sheet__totals,
  .tax-invoice-sheet__footer,
  .tax-invoice-sheet__voucher,
  .tax-invoice-sheet__parties,
  .tax-invoice-sheet__header,
  .tax-invoice-sheet__bottom {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
}

.reservation-edit-layout {
  display: grid;
  gap: 1.25rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .reservation-edit-layout {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  }

  .reservation-edit-aside {
    position: sticky;
    top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
}

.reservation-edit-summary {
  padding: 0.875rem 1rem;
  border-radius: 0.625rem;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 35%, var(--background));
}

.reservation-edit-section {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--border);
}

.reservation-edit-section__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
}

.reservation-edit-rooms {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 16rem;
  overflow-y: auto;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 0.625rem;
  background: var(--background);
}

.reservation-edit-room {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.375rem;
  border-bottom: 1px solid color-mix(in oklab, var(--border) 80%, transparent);
  cursor: pointer;
  font-size: 0.875rem;
}

.reservation-edit-room:last-child {
  border-bottom: 0;
}

.reservation-edit-reason {
  padding: 1rem;
  border-radius: 0.625rem;
  border: 1px solid color-mix(in oklab, var(--color-orange-500) 35%, var(--border));
  background: color-mix(in oklab, var(--color-orange-500) 8%, var(--background));
}

.reservation-edit-finance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.reservation-edit-log-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.reservation-edit-log-list li {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.reservation-edit-log-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

@page {
  size: A4 portrait;
  margin: 8mm;
}

/* Confirm dialog — non-destructive (primary) variant, as in the admin panel. */
.confirm-dialog-icon-primary {
  background: rgb(236 253 245);
  color: rgb(5 150 105);
}

.confirm-dialog-btn-primary {
  background: rgb(5 150 105);
  border-color: rgb(5 150 105);
  color: #fff;
  gap: 0.375rem;
}

.confirm-dialog-btn-primary:hover {
  background: rgb(4 120 87);
  border-color: rgb(4 120 87);
  color: #fff;
}

/* ============================================================
   Surena palette. Loaded after the Metronic stylesheet so these
   values replace its default theme colours.
   ============================================================ */
:root {
  --primary: #FB373E;
  --primary-foreground: #FFFFFF;
  --ring: #FB373E;
  --destructive: #C10D0D;
  --destructive-foreground: #FFFFFF;

  --background: #FFFFFF;
  --foreground: #333333;
  --border: #DDDDDD;
  --input: #DDDDDD;
  --muted: #F4F4F4;
  --muted-foreground: #727272;
  --accent: #F4F4F4;
  --accent-foreground: #333333;
  --secondary: #F4F4F4;
  --secondary-foreground: #727272;
  --mono: #333333;

  --color-green-50: #F5FCF9;
  --color-green-100: #E6F6EE;
  --color-green-200: #9DDDBD;
  --color-green-500: #11B95F;
  --color-green-600: #0AAB5B;
  --color-green-700: #088949;
  --color-green-800: #06663A;
  --color-green-950: #033A21;

  --color-red-50: #FFF7F7;
  --color-red-100: #FEE5E6;
  --color-red-500: #C10D0D;
  --color-red-600: #C10D0D;
  --color-red-700: #9A0A0A;
  --color-red-800: #740808;
  --color-red-950: #3A0A0B;

  --color-yellow-50: #FEF9F5;
  --color-yellow-100: #FEF5F0;
  --color-yellow-200: #FFDF9E;
  --color-yellow-400: #E9A800;
  --color-yellow-500: #E97000;
  --color-yellow-600: #CD8C0D;
  --color-yellow-700: #B35600;
  --color-yellow-800: #8A4200;
  --color-yellow-950: #3D1E00;

  --color-orange-100: #FEF5F0;
  --color-orange-200: #FFDF9E;
  --color-orange-400: #E97000;
  --color-orange-950: #3D1E00;

  --color-blue-50: #F7FBFF;
  --color-blue-100: #E6F3FE;
  --color-blue-200: #AFD9FD;
  --color-blue-300: #7DC0FC;
  --color-blue-400: #5AB0FB;
  --color-blue-500: #37A0FB;
  --color-blue-600: #2B86D6;
  --color-blue-700: #246BAA;
  --color-blue-800: #1B5080;
  --color-blue-950: #0E2740;

  --color-violet-50: #F6F1FF;
  --color-violet-100: #ECE2FF;
  --color-violet-200: #D3BEFE;
  --color-violet-500: #7535FD;
  --color-violet-600: #7535FD;
  --color-violet-700: #5C24D0;
  --color-violet-800: #451A9E;
  --color-violet-950: #1F0B4A;

  --color-gray-50: #FAFAFA;
  --color-gray-100: #F4F4F4;
  --color-gray-200: #DDDDDD;
  --color-gray-300: #C7C7C7;
  --color-gray-400: #AAAAAA;
  --color-gray-500: #727272;
  --color-gray-600: #5A5A5A;
  --color-gray-700: #444444;
  --color-gray-800: #333333;
  --color-gray-900: #222222;
}

.dark {
  --primary: #FC5F65;
  --ring: #FC5F65;
  --background: #121212;
  --foreground: #F0F0F0;
  --border: #383838;
  --input: #383838;
  --muted: #242424;
  --muted-foreground: #AAAAAA;
  --accent: #242424;
  --accent-foreground: #F0F0F0;
  --secondary: #2E2E2E;
  --secondary-foreground: #AAAAAA;
  --mono: #DDDDDD;
}

/* Primary button hover: darker red background and border. */
.kt-btn-primary:hover,
.kt-btn-primary:focus-visible {
  background-color: #C92C32;
  border-color: #972125;
}
/* Outline button hover: 10% brand red. */
.kt-btn-outline:hover {
  background-color: rgb(251 55 62 / 0.1);
}
