@charset "UTF-8";

:root {
  --app-font: "Segoe UI", "Noto Sans", Arial, sans-serif;
  --app-mono-font: "Cascadia Mono", Consolas, monospace;
  --app-control-bg: rgba(15, 23, 42, 0.72);
  --app-control-border: rgba(255, 255, 255, 0.14);
}

html {
  color-scheme: dark;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg0: #f8fbff;
  --bg1: #eaf0fb;
  --bg-dark: #f3f6fb;
  --bg-ultra: #f3f6fb;
  --bg-card: rgba(255, 255, 255, 0.90);
  --card: #ffffff;
  --card-bg: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.88);
  --input-bg: #ffffff;
  --input-focus: #f8fafc;
  --input-icon: #64748b;
  --text-main: #172033;
  --text-white: #172033;
  --text-bright: #172033;
  --text-gray: #5b687c;
  --text-dim: #64748b;
  --text-label: #334155;
  --text-primary: #172033;
  --text-secondary: #475569;
  --text-sub: #5b687c;
  --stroke: rgba(15, 23, 42, 0.12);
  --border-glass: rgba(15, 23, 42, 0.12);
  --border-color: rgba(15, 23, 42, 0.14);
  --accent-primary: #4f46e5;
  --app-control-bg: rgba(255, 255, 255, 0.94);
  --app-control-border: rgba(15, 23, 42, 0.14);
}

body,
button,
input,
select,
textarea,
table,
.tooltip,
.popover {
  font-family: var(--app-font) !important;
  letter-spacing: 0 !important;
}

body *:not(.bi):not(code):not(pre):not(kbd):not(samp):not(.font-monospace):not(.badge-doc):not(.booking-badge):not(.number) {
  font-family: var(--app-font) !important;
  letter-spacing: 0 !important;
}

code,
pre,
kbd,
samp,
.font-monospace,
.badge-doc,
.booking-badge,
.number {
  font-family: var(--app-mono-font) !important;
}

body,
.glass,
.glass-soft,
.glass-dark,
.card,
.modal-content,
.offcanvas,
.topbar,
.form-control,
.form-select,
.input-group-text,
.table > :not(caption) > * > * {
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

html[data-theme="light"] body {
  background-color: #f3f6fb !important;
  color: #172033 !important;
}

html[data-theme="light"] .glass,
html[data-theme="light"] .glass-soft,
html[data-theme="light"] .glass-dark,
html[data-theme="light"] .card-custom,
html[data-theme="light"] .cardx,
html[data-theme="light"] .modalcard,
html[data-theme="light"] .hud,
html[data-theme="light"] .card:not([class*="bg-"]),
html[data-theme="light"] .card.bg-black,
html[data-theme="light"] .modal-content,
html[data-theme="light"] .dropdown-menu,
html[data-theme="light"] .offcanvas {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  color: #172033 !important;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.09) !important;
}

html[data-theme="light"] .muted,
html[data-theme="light"] .text-muted,
html[data-theme="light"] .text-secondary,
html[data-theme="light"] .text-white-50,
html[data-theme="light"] [style*="color:var(--muted)"],
html[data-theme="light"] [style*="color: var(--muted)"] {
  color: #5b687c !important;
}

html[data-theme="light"] .container-fluid[style*="background"] {
  background: #f3f6fb !important;
}

html[data-theme="light"] .form-control,
html[data-theme="light"] .form-select,
html[data-theme="light"] .input-group-text,
html[data-theme="light"] .select2-selection,
html[data-theme="light"] .select2-dropdown,
html[data-theme="light"] .select2-search__field,
html[data-theme="light"] .form-control.bg-dark,
html[data-theme="light"] .form-select.bg-dark,
html[data-theme="light"] .input-group-text.bg-dark {
  background-color: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.16) !important;
  color: #172033 !important;
}

html[data-theme="light"] .form-control:focus,
html[data-theme="light"] .form-select:focus,
html[data-theme="light"] .select2-container--focus .select2-selection {
  background-color: #ffffff !important;
  border-color: #6366f1 !important;
  color: #172033 !important;
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.13) !important;
}

html[data-theme="light"] .form-control::placeholder,
html[data-theme="light"] .select2-selection__placeholder {
  color: #526174 !important;
  opacity: 1 !important;
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder,
html[data-theme="light"] .select2-selection__placeholder {
  color: #526174 !important;
  opacity: 1 !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder,
html[data-theme="dark"] .select2-selection__placeholder {
  color: #b8c4d8 !important;
  opacity: 1 !important;
}

html[data-theme="light"] input[type="date"],
html[data-theme="light"] input[type="datetime-local"],
html[data-theme="light"] input[type="time"] {
  color-scheme: light !important;
}

html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] input[type="datetime-local"],
html[data-theme="dark"] input[type="time"] {
  color-scheme: dark !important;
}

html[data-theme="light"] .text-white,
html[data-theme="light"] .text-light,
html[data-theme="light"] .text-white-50,
html[data-theme="light"] .form-label.text-white,
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] h5,
html[data-theme="light"] h6 {
  color: #172033 !important;
}

html[data-theme="light"] .btn.text-white,
html[data-theme="light"] .badge.text-white,
html[data-theme="light"] .btn-primary,
html[data-theme="light"] .btn-danger,
html[data-theme="light"] .btn-success,
html[data-theme="light"] .btn-dark,
html[data-theme="light"] .btn-primary-soft {
  color: #ffffff !important;
}

html[data-theme="dark"] .text-dark:not(.badge):not(.btn),
html[data-theme="dark"] h1.text-dark,
html[data-theme="dark"] h2.text-dark,
html[data-theme="dark"] h3.text-dark,
html[data-theme="dark"] h4.text-dark,
html[data-theme="dark"] h5.text-dark,
html[data-theme="dark"] h6.text-dark {
  color: #f8fafc !important;
}

html[data-theme="light"] .table,
html[data-theme="light"] table {
  --bs-table-color: #172033;
  --bs-table-bg: transparent;
  --bs-table-border-color: rgba(15, 23, 42, 0.10);
  color: #172033 !important;
}

html[data-theme="light"] .table > :not(caption) > * > *,
html[data-theme="light"] .table-dark > :not(caption) > * > *,
html[data-theme="light"] .table-light > :not(caption) > * > * {
  background-color: transparent !important;
  border-color: rgba(15, 23, 42, 0.10) !important;
  color: #172033 !important;
}

html[data-theme="light"] .table-hover > tbody > tr:hover > * {
  background-color: rgba(99, 102, 241, 0.06) !important;
}

html[data-theme="light"] .nav-tabs {
  border-color: rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .nav-tabs .nav-link {
  color: #475569 !important;
}

html[data-theme="light"] .nav-tabs .nav-link.active {
  color: #4338ca !important;
}

html[data-theme="light"] .btn-outline-light {
  border-color: rgba(15, 23, 42, 0.24) !important;
  color: #172033 !important;
}

html[data-theme="light"] .btn-outline-light:hover {
  background: #172033 !important;
  border-color: #172033 !important;
  color: #ffffff !important;
}

html[data-theme="light"] hr,
html[data-theme="light"] hr.border-secondary {
  border-color: rgba(15, 23, 42, 0.14) !important;
}

/* Legacy module panels must follow the global theme even when a page ships
   older page-local dark variables after this stylesheet. */
html[data-theme="light"] .table-container,
html[data-theme="light"] .filter-card,
html[data-theme="light"] .search-card,
html[data-theme="light"] .glass-card,
html[data-theme="light"] .custom-card,
html[data-theme="light"] .glass-dark-modal,
html[data-theme="light"] .calc-box,
html[data-theme="light"] .calc-card,
html[data-theme="light"] .totals-box,
html[data-theme="light"] .passport-info-box,
html[data-theme="light"] .customer-info-box,
html[data-theme="light"] .item-row,
html[data-theme="light"] .sale-panel,
html[data-theme="light"] .sale-summary,
html[data-theme="light"] .inc-box,
html[data-theme="light"] .conditional-box,
html[data-theme="light"] .service-toggle-box,
html[data-theme="light"] .hotel-box,
html[data-theme="light"] .transfer-box {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  color: #172033 !important;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08) !important;
}

.language-switcher {
  min-width: 106px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--border-soft, var(--app-control-border));
  border-radius: 12px;
  background: var(--bg-elevated, var(--app-control-bg));
  color: var(--text-soft, inherit);
  box-shadow: var(--shadow-soft, 0 8px 20px rgba(0, 0, 0, 0.12));
}

.language-switcher i {
  flex: 0 0 auto;
  color: var(--muted-2, currentColor);
}

.language-switcher select {
  min-width: 58px;
  height: 38px;
  padding: 0 20px 0 0;
  border: 0;
  outline: 0;
  background-color: transparent !important;
  color: inherit !important;
  font-size: 14px !important;
  font-weight: 700;
  cursor: pointer;
}

.language-switcher select option {
  background: #ffffff;
  color: #172033;
}

.ginza-floating-controls {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  z-index: 1085;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--border-soft, var(--app-control-border));
  border-radius: 14px;
  background: var(--panel-strong, var(--app-control-bg));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: ginza-control-enter 240ms ease-out both;
}

.ginza-floating-controls .language-switcher {
  min-width: 88px;
  height: 38px;
  border: 0;
  box-shadow: none;
  padding-left: 8px;
}

.ginza-floating-controls .ginza-floating-theme {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: var(--bg-elevated, rgba(255, 255, 255, 0.08));
  color: var(--text, #ffffff);
}

html.theme-transitioning .theme-toggle-btn i,
html.theme-transitioning .ginza-floating-theme i {
  animation: ginza-theme-spin 320ms ease-out;
}

body > .app,
body > .container,
body > .container-fluid,
body > .wrap {
  animation: ginza-page-enter 260ms ease-out both;
}

@keyframes ginza-page-enter {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes ginza-control-enter {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes ginza-theme-spin {
  from { transform: rotate(-35deg) scale(0.85); }
  to { transform: rotate(0) scale(1); }
}

@media (max-width: 576px) {
  .language-switcher {
    min-width: 82px;
    padding: 0 7px;
  }

  .language-switcher select {
    min-width: 48px;
  }

  .ginza-floating-controls {
    top: max(8px, env(safe-area-inset-top));
    right: max(8px, env(safe-area-inset-right));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
