/* ISR GLOBAL DARK / NORMAL MODE */

:root {
  --isr-light-bg: #f4f5f8;
  --isr-light-text: #182033;
  --isr-light-muted: #5f6b7a;
  --isr-light-border: #dfe3ea;

  --isr-dark-bg: #111827;
  --isr-dark-panel: #172033;
  --isr-dark-panel-soft: #1f2937;
  --isr-dark-border: #2b3548;
  --isr-dark-text: #f8fafc;
  --isr-dark-muted: #cbd5e1;
  --isr-purple: #7C6AA6;
  --isr-purple-dark: #6F5F96;
}

.isr-theme-toggle {
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 13px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(255,255,255,.42) !important;
  background: rgba(255,255,255,.14) !important;
  color: #ffffff !important;
  font-weight: 560 !important;
  font-size: 13px !important;
  letter-spacing: -0.01em !important;
  cursor: pointer !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.isr-theme-toggle:hover {
  background: rgba(255,255,255,.22) !important;
  border-color: rgba(255,255,255,.68) !important;
}

.isr-theme-toggle.isr-floating {
  position: fixed !important;
  right: 14px !important;
  bottom: 14px !important;
  z-index: 9999 !important;
  background: #7C6AA6 !important;
  border-color: #7C6AA6 !important;
}

/* DARK BASE */
html[data-isr-theme="dark"] body,
html[data-isr-theme="dark"] .page,
html[data-isr-theme="dark"] .page-wrapper,
html[data-isr-theme="dark"] .page-body,
html[data-isr-theme="dark"] .container-xl,
html[data-isr-theme="dark"] main,
html[data-isr-theme="dark"] .page {
  background: var(--isr-dark-bg) !important;
  color: var(--isr-dark-text) !important;
}

/* DARK TOPBARS */
html[data-isr-theme="dark"] header.navbar,
html[data-isr-theme="dark"] .navbar,
html[data-isr-theme="dark"] .topbar,
html[data-isr-theme="dark"] .iv-topbar,
html[data-isr-theme="dark"] .iv-form-top {
  background: linear-gradient(135deg, var(--isr-purple), var(--isr-purple-dark)) !important;
  color: #ffffff !important;
  border-bottom: 0 !important;
}

html[data-isr-theme="dark"] header.navbar .container-xl,
html[data-isr-theme="dark"] .navbar .container-xl,
html[data-isr-theme="dark"] .topbar-inner,
html[data-isr-theme="dark"] .iv-topbar .container-xl,
html[data-isr-theme="dark"] .iv-form-top > .container-xl,
html[data-isr-theme="dark"] .iv-form-top-inner {
  background: transparent !important;
}

/* DARK TEXT */
html[data-isr-theme="dark"] h1,
html[data-isr-theme="dark"] h2,
html[data-isr-theme="dark"] h3,
html[data-isr-theme="dark"] .iv-page-title,
html[data-isr-theme="dark"] .page-title,
html[data-isr-theme="dark"] .iv-title,
html[data-isr-theme="dark"] .iv-section-title,
html[data-isr-theme="dark"] .reports-title,
html[data-isr-theme="dark"] .iv-settings-title,
html[data-isr-theme="dark"] .iv-subsettings-title {
  color: var(--isr-dark-text) !important;
}

html[data-isr-theme="dark"] .iv-muted,
html[data-isr-theme="dark"] .text-secondary,
html[data-isr-theme="dark"] .text-muted,
html[data-isr-theme="dark"] .page-subtitle,
html[data-isr-theme="dark"] .iv-dashboard-subtitle,
html[data-isr-theme="dark"] .reports-count,
html[data-isr-theme="dark"] .iv-settings-desc,
html[data-isr-theme="dark"] .iv-subsettings-desc,
html[data-isr-theme="dark"] .iv-help,
html[data-isr-theme="dark"] .field-label,
html[data-isr-theme="dark"] .form-label {
  color: var(--isr-dark-muted) !important;
}

/* DARK PANELS / CARDS */
html[data-isr-theme="dark"] .card,
html[data-isr-theme="dark"] .iv-card,
html[data-isr-theme="dark"] .iv-field,
html[data-isr-theme="dark"] .iv-field-box,
html[data-isr-theme="dark"] .filter-panel,
html[data-isr-theme="dark"] .summary-card,
html[data-isr-theme="dark"] .reports-shell,
html[data-isr-theme="dark"] .reports-header,
html[data-isr-theme="dark"] .iv-settings-card,
html[data-isr-theme="dark"] .iv-subsettings-card,
html[data-isr-theme="dark"] .iv-section-box,
html[data-isr-theme="dark"] .iv-upload-box,
html[data-isr-theme="dark"] .iv-card-balance-panel,
html[data-isr-theme="dark"] .iv-auto-checkout-card,
html[data-isr-theme="dark"] .iv-total-persons-panel,
html[data-isr-theme="dark"] .iv-selected-room-banner,
html[data-isr-theme="dark"] .iv-checkout-selected-room-banner {
  background: var(--isr-dark-panel) !important;
  border-color: var(--isr-dark-border) !important;
  color: var(--isr-dark-text) !important;
  box-shadow: none !important;
}

html[data-isr-theme="dark"] .card-body {
  background: transparent !important;
}

/* DARK INPUTS */
html[data-isr-theme="dark"] input,
html[data-isr-theme="dark"] select,
html[data-isr-theme="dark"] textarea,
html[data-isr-theme="dark"] .form-control,
html[data-isr-theme="dark"] .form-select {
  background: var(--isr-dark-panel) !important;
  border-color: var(--isr-dark-border) !important;
  color: var(--isr-dark-text) !important;
}

html[data-isr-theme="dark"] input::placeholder,
html[data-isr-theme="dark"] textarea::placeholder,
html[data-isr-theme="dark"] .form-control::placeholder {
  color: #94a3b8 !important;
}

html[data-isr-theme="dark"] input:focus,
html[data-isr-theme="dark"] select:focus,
html[data-isr-theme="dark"] textarea:focus,
html[data-isr-theme="dark"] .form-control:focus,
html[data-isr-theme="dark"] .form-select:focus {
  border-color: var(--isr-purple) !important;
  box-shadow: 0 0 0 3px rgba(124,106,166,.22) !important;
}

/* DARK TABLES */
html[data-isr-theme="dark"] table,
html[data-isr-theme="dark"] thead,
html[data-isr-theme="dark"] tbody,
html[data-isr-theme="dark"] tr,
html[data-isr-theme="dark"] th,
html[data-isr-theme="dark"] td {
  background: transparent !important;
  color: var(--isr-dark-text) !important;
  border-color: var(--isr-dark-border) !important;
}

html[data-isr-theme="dark"] th {
  color: var(--isr-dark-muted) !important;
}

html[data-isr-theme="dark"] .iv-label,
html[data-isr-theme="dark"] td::before {
  color: var(--isr-dark-muted) !important;
}

html[data-isr-theme="dark"] .iv-value,
html[data-isr-theme="dark"] .summary-num,
html[data-isr-theme="dark"] .summary-card div,
html[data-isr-theme="dark"] .fw-bold,
html[data-isr-theme="dark"] strong,
html[data-isr-theme="dark"] b {
  color: var(--isr-dark-text) !important;
}

/* DARK BUTTONS */
html[data-isr-theme="dark"] .btn.iv-btn-outline,
html[data-isr-theme="dark"] .btn-outline,
html[data-isr-theme="dark"] .btn-light {
  background: rgba(255,255,255,.10) !important;
  color: #ffffff !important;
  border-color: rgba(255,255,255,.32) !important;
}

html[data-isr-theme="dark"] .btn.iv-btn-outline:hover,
html[data-isr-theme="dark"] .btn-outline:hover,
html[data-isr-theme="dark"] .btn-light:hover {
  background: rgba(255,255,255,.18) !important;
  color: #ffffff !important;
  border-color: rgba(255,255,255,.55) !important;
}

/* DASHBOARD CARDS */
html[data-isr-theme="dark"] .iv-area-desc,
html[data-isr-theme="dark"] .iv-area-title {
  color: var(--isr-dark-text) !important;
}

/* MODALS */
html[data-isr-theme="dark"] .note-modal,
html[data-isr-theme="dark"] .modal-content {
  background: var(--isr-dark-panel) !important;
  color: var(--isr-dark-text) !important;
  border-color: var(--isr-dark-border) !important;
}

/* MOBILE DARK REFINEMENT */
@media (max-width: 720px) {
  html[data-isr-theme="dark"] .reports-shell table tbody tr {
    background: var(--isr-dark-panel) !important;
    border-color: var(--isr-dark-border) !important;
  }

  html[data-isr-theme="dark"] .reports-shell table tbody tr td {
    background: transparent !important;
    color: var(--isr-dark-text) !important;
    border-bottom-color: rgba(255,255,255,.10) !important;
  }

  html[data-isr-theme="dark"] .reports-shell table tbody tr td::before {
    color: #E2E8F0 !important;
    opacity: .96 !important;
  }
}


/* ISR_THEME_VIEW_HEADER_FIX_START */
html[data-isr-theme="dark"] .page-header,
html[data-isr-theme="dark"] .page-header .container-xl,
html[data-isr-theme="dark"] .page-header .row,
html[data-isr-theme="dark"] .page-header .col {
  background: #111827 !important;
  color: #F8FAFC !important;
}

html[data-isr-theme="dark"] .page-header h1,
html[data-isr-theme="dark"] .page-header .iv-page-title,
html[data-isr-theme="dark"] .page-header .iv-title {
  color: #F8FAFC !important;
  opacity: 1 !important;
}

html[data-isr-theme="dark"] .page-header .iv-muted,
html[data-isr-theme="dark"] .page-header .text-secondary,
html[data-isr-theme="dark"] .page-header .page-subtitle {
  color: #CBD5E1 !important;
  opacity: 1 !important;
}

html:not([data-isr-theme="dark"]) .page-header,
html:not([data-isr-theme="dark"]) .page-header .container-xl {
  background: #f4f5f8 !important;
}
/* ISR_THEME_VIEW_HEADER_FIX_END */


/* ISR_RECEPTION_THEME_BUTTON_POSITION_START */

/* Reception Reports title row: title left, Dark/Normal button right */
.page-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

.page-head > div:first-child {
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

.page-head #isrThemeToggle,
.page-head .isr-theme-toggle {
  flex: 0 0 auto !important;
  align-self: flex-start !important;
  margin-left: auto !important;
  min-width: 78px !important;
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 560 !important;
}

/* Light mode button must be visible on light background */
html:not([data-isr-theme="dark"]) .page-head #isrThemeToggle,
html:not([data-isr-theme="dark"]) .page-head .isr-theme-toggle {
  background: #ffffff !important;
  color: #7C6AA6 !important;
  border: 1px solid #d8d1ea !important;
}

html:not([data-isr-theme="dark"]) .page-head #isrThemeToggle:hover,
html:not([data-isr-theme="dark"]) .page-head .isr-theme-toggle:hover {
  background: #f4f1fb !important;
  color: #6F5F96 !important;
  border-color: #7C6AA6 !important;
}

/* Dark mode button */
html[data-isr-theme="dark"] .page-head #isrThemeToggle,
html[data-isr-theme="dark"] .page-head .isr-theme-toggle {
  background: rgba(255,255,255,.10) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,.35) !important;
}

@media (max-width: 720px) {
  .page-head {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 10px !important;
  }

  .page-head .page-title {
    line-height: 1.15 !important;
  }

  .page-head #isrThemeToggle,
  .page-head .isr-theme-toggle {
    min-width: 74px !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 10px !important;
    font-size: 12.5px !important;
  }
}

/* ISR_RECEPTION_THEME_BUTTON_POSITION_END */

