/* ==========================================================================
   OTP Aggregator — design system (theme.css)
   Built on Bootstrap 5.3 colour modes. Own brand: indigo -> cyan, soft surfaces, 12px radius.
   Light is the default; dark is `html[data-bs-theme="dark"]` (toggle in the top bar, remembered).
   Sections: 1 tokens · 2 Bootstrap overrides · 3 base + legacy-markup safety net · 4 forms
   · 5 tables · 6 components · 7 admin shell · 8 auth · 9 client site · 10 plugins · 11 motion
   · 12 responsive · 13 print
   ========================================================================== */

/* ---------- 1. tokens ------------------------------------------------------ */
:root,
[data-bs-theme="light"] {
  --otp-primary: #4f46e5;
  --otp-primary-hover: #4338ca;
  --otp-primary-rgb: 79, 70, 229;
  --otp-primary-soft: rgba(79, 70, 229, .10);
  --otp-accent: #06b6d4;
  --otp-success: #16a34a;
  --otp-success-rgb: 22, 163, 74;
  --otp-warning: #d97706;
  --otp-warning-rgb: 217, 119, 6;
  --otp-danger: #dc2626;
  --otp-danger-rgb: 220, 38, 38;
  --otp-info: #0284c7;
  --otp-info-rgb: 2, 132, 199;
  --otp-secondary-rgb: 100, 116, 139;

  --otp-bg: #f3f5fa;
  --otp-surface: #ffffff;
  --otp-surface-2: #f8fafc;
  --otp-border: #e4e8f0;
  --otp-border-strong: #cfd6e4;
  --otp-text: #1e293b;
  --otp-text-muted: #64748b;
  --otp-heading: #0f172a;

  --otp-sidebar-bg: #ffffff;
  --otp-sidebar-text: #475569;
  --otp-sidebar-active-bg: rgba(79, 70, 229, .10);
  --otp-sidebar-active-text: #4338ca;
  --otp-sidebar-hover-bg: #f1f5f9;
  --otp-topbar-bg: rgba(255, 255, 255, .86);

  --otp-radius-sm: 8px;
  --otp-radius: 12px;
  --otp-radius-lg: 16px;
  --otp-shadow-sm: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .04);
  --otp-shadow-md: 0 8px 24px rgba(15, 23, 42, .08);
  --otp-shadow-lg: 0 20px 48px rgba(15, 23, 42, .14);

  --otp-space-1: 4px; --otp-space-2: 8px; --otp-space-3: 12px;
  --otp-space-4: 16px; --otp-space-5: 24px; --otp-space-6: 32px;

  --otp-sidebar-w: 264px;
  --otp-sidebar-w-collapsed: 76px;
  --otp-topbar-h: 64px;

  --otp-gradient: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  --otp-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --otp-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

[data-bs-theme="dark"] {
  --otp-primary: #818cf8;
  --otp-primary-hover: #a5b4fc;
  --otp-primary-rgb: 129, 140, 248;
  --otp-primary-soft: rgba(129, 140, 248, .16);
  --otp-accent: #22d3ee;
  --otp-success: #4ade80;
  --otp-success-rgb: 74, 222, 128;
  --otp-warning: #fbbf24;
  --otp-warning-rgb: 251, 191, 36;
  --otp-danger: #f87171;
  --otp-danger-rgb: 248, 113, 113;
  --otp-info: #38bdf8;
  --otp-info-rgb: 56, 189, 248;
  --otp-secondary-rgb: 148, 163, 184;

  --otp-bg: #0b1020;
  --otp-surface: #121a2e;
  --otp-surface-2: #182238;
  --otp-border: #25314d;
  --otp-border-strong: #33425f;
  --otp-text: #dbe3f0;
  --otp-text-muted: #93a1bb;
  --otp-heading: #f1f5f9;

  --otp-sidebar-bg: #0e1527;
  --otp-sidebar-text: #a9b6cc;
  --otp-sidebar-active-bg: rgba(129, 140, 248, .16);
  --otp-sidebar-active-text: #c7d2fe;
  --otp-sidebar-hover-bg: #17213a;
  --otp-topbar-bg: rgba(14, 21, 39, .86);

  --otp-shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --otp-shadow-md: 0 8px 24px rgba(0, 0, 0, .38);
  --otp-shadow-lg: 0 20px 48px rgba(0, 0, 0, .5);
  --otp-gradient: linear-gradient(135deg, #6366f1 0%, #22d3ee 100%);
  color-scheme: dark;
}

/* ---------- 2. Bootstrap overrides ---------------------------------------- */
:root,
[data-bs-theme="light"],
[data-bs-theme="dark"] {
  --bs-body-font-family: var(--otp-font);
  --bs-body-font-size: .9375rem;
  --bs-body-line-height: 1.55;
  --bs-body-color: var(--otp-text);
  --bs-body-color-rgb: 30, 41, 59;
  --bs-body-bg: var(--otp-bg);
  --bs-secondary-color: var(--otp-text-muted);
  --bs-tertiary-bg: var(--otp-surface-2);
  --bs-border-color: var(--otp-border);
  --bs-border-radius: var(--otp-radius-sm);
  --bs-border-radius-sm: 6px;
  --bs-border-radius-lg: var(--otp-radius);
  --bs-link-color: var(--otp-primary);
  --bs-link-hover-color: var(--otp-primary-hover);
  --bs-link-color-rgb: var(--otp-primary-rgb);
  --bs-primary: var(--otp-primary);
  --bs-primary-rgb: var(--otp-primary-rgb);
  --bs-success: var(--otp-success);
  --bs-success-rgb: var(--otp-success-rgb);
  --bs-warning: var(--otp-warning);
  --bs-warning-rgb: var(--otp-warning-rgb);
  --bs-danger: var(--otp-danger);
  --bs-danger-rgb: var(--otp-danger-rgb);
  --bs-info: var(--otp-info);
  --bs-info-rgb: var(--otp-info-rgb);
  --bs-focus-ring-color: rgba(var(--otp-primary-rgb), .28);
}

html { -webkit-text-size-adjust: 100%; }
body { background: var(--otp-bg); color: var(--otp-text); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { color: var(--otp-heading); font-weight: 650; letter-spacing: -.01em; }
a { text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
::selection { background: rgba(var(--otp-primary-rgb), .22); }
.text-muted, .text-body-secondary { color: var(--otp-text-muted) !important; }
.fw-600 { font-weight: 600; }
.mono, code, kbd, pre, samp { font-family: var(--otp-mono); }
code { color: var(--otp-primary); background: var(--otp-primary-soft); padding: .1em .4em; border-radius: 6px; font-size: .875em; }
pre { background: var(--otp-surface-2); border: 1px solid var(--otp-border); border-radius: var(--otp-radius-sm); padding: 14px 16px; color: var(--otp-text); overflow: auto; }
hr { border-color: var(--otp-border); opacity: 1; }

/* buttons */
.btn { --bs-btn-border-radius: 10px; --bs-btn-font-weight: 550; --bs-btn-padding-x: 1rem; --bs-btn-padding-y: .5rem; transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease; }
.btn:not(:disabled):not(.disabled):hover { transform: translateY(-1px); }
.btn:not(:disabled):not(.disabled):active { transform: translateY(0); }
.btn-sm { --bs-btn-padding-y: .3rem; --bs-btn-padding-x: .7rem; --bs-btn-font-size: .8125rem; --bs-btn-border-radius: 8px; }
.btn-lg { --bs-btn-padding-y: .72rem; --bs-btn-padding-x: 1.4rem; --bs-btn-font-size: 1rem; --bs-btn-border-radius: 12px; }
.btn-primary { --bs-btn-bg: var(--otp-primary); --bs-btn-border-color: var(--otp-primary); --bs-btn-hover-bg: var(--otp-primary-hover); --bs-btn-hover-border-color: var(--otp-primary-hover); --bs-btn-active-bg: var(--otp-primary-hover); --bs-btn-active-border-color: var(--otp-primary-hover); --bs-btn-color: #fff; --bs-btn-hover-color: #fff; --bs-btn-active-color: #fff; --bs-btn-disabled-bg: var(--otp-primary); --bs-btn-disabled-border-color: var(--otp-primary); --bs-btn-focus-shadow-rgb: var(--otp-primary-rgb); box-shadow: 0 4px 12px rgba(var(--otp-primary-rgb), .28); }
[data-bs-theme="dark"] .btn-primary { --bs-btn-color: #0b1020; --bs-btn-hover-color: #0b1020; --bs-btn-active-color: #0b1020; }
.btn-outline-primary { --bs-btn-color: var(--otp-primary); --bs-btn-border-color: rgba(var(--otp-primary-rgb), .45); --bs-btn-hover-bg: var(--otp-primary); --bs-btn-hover-border-color: var(--otp-primary); --bs-btn-hover-color: #fff; --bs-btn-active-bg: var(--otp-primary); --bs-btn-active-border-color: var(--otp-primary); --bs-btn-active-color: #fff; --bs-btn-focus-shadow-rgb: var(--otp-primary-rgb); }
.btn-success { --bs-btn-bg: var(--otp-success); --bs-btn-border-color: var(--otp-success); --bs-btn-hover-bg: #15803d; --bs-btn-hover-border-color: #15803d; --bs-btn-color: #fff; --bs-btn-hover-color: #fff; --bs-btn-active-bg: #15803d; --bs-btn-active-color: #fff; }
[data-bs-theme="dark"] .btn-success { --bs-btn-color: #052e16; --bs-btn-hover-color: #052e16; --bs-btn-hover-bg: #86efac; --bs-btn-hover-border-color: #86efac; }
.btn-danger { --bs-btn-bg: var(--otp-danger); --bs-btn-border-color: var(--otp-danger); --bs-btn-hover-bg: #b91c1c; --bs-btn-hover-border-color: #b91c1c; --bs-btn-color: #fff; --bs-btn-hover-color: #fff; --bs-btn-active-bg: #b91c1c; --bs-btn-active-color: #fff; }
[data-bs-theme="dark"] .btn-danger { --bs-btn-color: #2a0a0a; --bs-btn-hover-color: #2a0a0a; --bs-btn-hover-bg: #fca5a5; --bs-btn-hover-border-color: #fca5a5; }
.btn-warning { --bs-btn-bg: #f59e0b; --bs-btn-border-color: #f59e0b; --bs-btn-color: #1f1300; --bs-btn-hover-bg: #d97706; --bs-btn-hover-border-color: #d97706; --bs-btn-hover-color: #fff; }
.btn-light, .btn-secondary, .btn-outline-secondary { --bs-btn-color: var(--otp-text); --bs-btn-bg: var(--otp-surface); --bs-btn-border-color: var(--otp-border-strong); --bs-btn-hover-bg: var(--otp-surface-2); --bs-btn-hover-border-color: var(--otp-border-strong); --bs-btn-hover-color: var(--otp-heading); --bs-btn-active-bg: var(--otp-surface-2); --bs-btn-active-color: var(--otp-heading); --bs-btn-active-border-color: var(--otp-border-strong); --bs-btn-disabled-bg: var(--otp-surface); --bs-btn-disabled-color: var(--otp-text-muted); }
.btn-ghost { --bs-btn-color: var(--otp-text-muted); --bs-btn-bg: transparent; --bs-btn-border-color: transparent; --bs-btn-hover-bg: var(--otp-sidebar-hover-bg); --bs-btn-hover-color: var(--otp-heading); --bs-btn-hover-border-color: transparent; }
.btn-icon { width: 36px; height: 36px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; }
.btn-icon.btn-sm { width: 30px; height: 30px; border-radius: 8px; }
.btn.is-loading { position: relative; pointer-events: none; color: transparent !important; }
.btn.is-loading::after { content: ""; position: absolute; inset: 0; margin: auto; width: 1.1em; height: 1.1em; border-radius: 50%; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; animation: otp-spin .7s linear infinite; }
.btn-light.is-loading::after, .btn-secondary.is-loading::after, .btn-outline-secondary.is-loading::after, .btn-outline-primary.is-loading::after { border-color: rgba(var(--otp-primary-rgb), .3); border-top-color: var(--otp-primary); }
.btn:focus-visible, a:focus-visible, button:focus-visible, .form-control:focus, .form-select:focus { outline: 0; box-shadow: 0 0 0 .22rem rgba(var(--otp-primary-rgb), .30); }

/* cards */
.card { --bs-card-bg: var(--otp-surface); --bs-card-border-color: var(--otp-border); --bs-card-border-radius: var(--otp-radius); --bs-card-inner-border-radius: calc(var(--otp-radius) - 1px); --bs-card-cap-bg: transparent; --bs-card-cap-padding-y: 1rem; --bs-card-spacer-y: 1.25rem; --bs-card-spacer-x: 1.25rem; box-shadow: var(--otp-shadow-sm); color: var(--otp-text); }
.card-header { font-weight: 600; border-bottom-color: var(--otp-border); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-title { font-size: 1rem; margin: 0; }
.card-footer { background: transparent; border-top-color: var(--otp-border); }
.card-hover { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--otp-shadow-md); border-color: rgba(var(--otp-primary-rgb), .35); }

/* dropdowns, modals, offcanvas, tooltips */
.dropdown-menu { --bs-dropdown-bg: var(--otp-surface); --bs-dropdown-border-color: var(--otp-border); --bs-dropdown-border-radius: 12px; --bs-dropdown-link-color: var(--otp-text); --bs-dropdown-link-hover-bg: var(--otp-sidebar-hover-bg); --bs-dropdown-link-hover-color: var(--otp-heading); --bs-dropdown-link-active-bg: var(--otp-primary-soft); --bs-dropdown-link-active-color: var(--otp-primary); --bs-dropdown-divider-bg: var(--otp-border); --bs-dropdown-item-padding-y: .5rem; box-shadow: var(--otp-shadow-md); padding: .4rem; animation: otp-pop .14s ease-out; }
.dropdown-item { border-radius: 8px; display: flex; align-items: center; gap: 10px; }
.dropdown-item i { width: 18px; text-align: center; color: var(--otp-text-muted); }
.dropdown-header { text-transform: uppercase; font-size: .6875rem; letter-spacing: .06em; font-weight: 650; }
.modal-content { --bs-modal-bg: var(--otp-surface); --bs-modal-border-color: var(--otp-border); --bs-modal-border-radius: var(--otp-radius-lg); --bs-modal-header-border-color: var(--otp-border); --bs-modal-footer-border-color: var(--otp-border); box-shadow: var(--otp-shadow-lg); }
.modal-title { font-size: 1.0625rem; }
.offcanvas { --bs-offcanvas-bg: var(--otp-surface); --bs-offcanvas-color: var(--otp-text); --bs-offcanvas-border-color: var(--otp-border); }
.tooltip { --bs-tooltip-bg: #0f172a; --bs-tooltip-border-radius: 8px; --bs-tooltip-font-size: .75rem; }
.btn-close { --bs-btn-close-focus-shadow: 0 0 0 .2rem rgba(var(--otp-primary-rgb), .3); }
[data-bs-theme="dark"] .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }

/* alerts */
.alert { --bs-alert-border-radius: var(--otp-radius-sm); --bs-alert-padding-y: .8rem; border-width: 1px; display: flex; gap: 12px; align-items: flex-start; }
.alert > i:first-child { margin-top: .2em; }
.alert-success { --bs-alert-color: #14532d; --bs-alert-bg: rgba(var(--otp-success-rgb), .10); --bs-alert-border-color: rgba(var(--otp-success-rgb), .35); }
.alert-danger { --bs-alert-color: #7f1d1d; --bs-alert-bg: rgba(var(--otp-danger-rgb), .09); --bs-alert-border-color: rgba(var(--otp-danger-rgb), .35); }
.alert-warning { --bs-alert-color: #78350f; --bs-alert-bg: rgba(var(--otp-warning-rgb), .11); --bs-alert-border-color: rgba(var(--otp-warning-rgb), .40); }
.alert-info { --bs-alert-color: #0c4a6e; --bs-alert-bg: rgba(var(--otp-info-rgb), .09); --bs-alert-border-color: rgba(var(--otp-info-rgb), .35); }
[data-bs-theme="dark"] .alert-success { --bs-alert-color: #bbf7d0; }
[data-bs-theme="dark"] .alert-danger { --bs-alert-color: #fecaca; }
[data-bs-theme="dark"] .alert-warning { --bs-alert-color: #fde68a; }
[data-bs-theme="dark"] .alert-info { --bs-alert-color: #bae6fd; }

/* pagination, breadcrumb, nav tabs, list group, progress */
.pagination { --bs-pagination-color: var(--otp-text); --bs-pagination-bg: var(--otp-surface); --bs-pagination-border-color: var(--otp-border); --bs-pagination-hover-bg: var(--otp-surface-2); --bs-pagination-hover-color: var(--otp-heading); --bs-pagination-hover-border-color: var(--otp-border-strong); --bs-pagination-active-bg: var(--otp-primary); --bs-pagination-active-border-color: var(--otp-primary); --bs-pagination-active-color: #fff; --bs-pagination-disabled-bg: var(--otp-surface-2); --bs-pagination-disabled-color: var(--otp-text-muted); --bs-pagination-disabled-border-color: var(--otp-border); --bs-pagination-border-radius: 8px; --bs-pagination-padding-x: .75rem; gap: 4px; }
.page-item .page-link { border-radius: 8px !important; margin: 0; }
.breadcrumb { --bs-breadcrumb-divider: "›"; --bs-breadcrumb-divider-color: var(--otp-text-muted); --bs-breadcrumb-item-active-color: var(--otp-text-muted); font-size: .8125rem; margin: 0; }
.nav-tabs { --bs-nav-tabs-border-color: var(--otp-border); --bs-nav-tabs-link-active-bg: transparent; --bs-nav-tabs-link-active-color: var(--otp-primary); --bs-nav-tabs-link-active-border-color: transparent transparent var(--otp-primary); --bs-nav-tabs-link-hover-border-color: transparent; --bs-nav-link-color: var(--otp-text-muted); --bs-nav-link-hover-color: var(--otp-heading); gap: 4px; }
.nav-tabs .nav-link { border-width: 0 0 2px; border-radius: 0; font-weight: 550; padding: .65rem 1rem; }
.nav-pills { --bs-nav-pills-link-active-bg: var(--otp-primary); --bs-nav-link-color: var(--otp-text-muted); --bs-nav-pills-border-radius: 10px; }
.list-group { --bs-list-group-bg: var(--otp-surface); --bs-list-group-border-color: var(--otp-border); --bs-list-group-color: var(--otp-text); --bs-list-group-action-hover-bg: var(--otp-surface-2); --bs-list-group-border-radius: var(--otp-radius-sm); }
.progress { --bs-progress-bg: var(--otp-surface-2); --bs-progress-border-radius: 999px; --bs-progress-bar-bg: var(--otp-primary); height: .6rem; }
.accordion { --bs-accordion-bg: var(--otp-surface); --bs-accordion-border-color: var(--otp-border); --bs-accordion-btn-color: var(--otp-heading); --bs-accordion-btn-bg: var(--otp-surface); --bs-accordion-active-bg: var(--otp-primary-soft); --bs-accordion-active-color: var(--otp-primary); --bs-accordion-border-radius: var(--otp-radius); --bs-accordion-inner-border-radius: calc(var(--otp-radius) - 1px); --bs-accordion-btn-focus-box-shadow: 0 0 0 .2rem rgba(var(--otp-primary-rgb), .25); --bs-accordion-color: var(--otp-text); }
.accordion-button { font-weight: 600; }
[data-bs-theme="dark"] .accordion-button::after { filter: invert(1) brightness(1.4); }
.toast { --bs-toast-bg: var(--otp-surface); --bs-toast-color: var(--otp-text); --bs-toast-border-color: var(--otp-border); --bs-toast-border-radius: 12px; --bs-toast-box-shadow: var(--otp-shadow-md); }

/* ---------- 3. base + safety net for legacy (unclassed) markup ------------- */
.app-content table:not([class]),
.auth-card table:not([class]),
.site-main table:not([class]) { width: 100%; border-collapse: collapse; background: var(--otp-surface); border: 1px solid var(--otp-border); border-radius: var(--otp-radius-sm); overflow: hidden; margin-bottom: 1rem; }
.app-content table:not([class]) th, .app-content table:not([class]) td,
.auth-card table:not([class]) th, .auth-card table:not([class]) td,
.site-main table:not([class]) th, .site-main table:not([class]) td { padding: .65rem .85rem; border-bottom: 1px solid var(--otp-border); text-align: left; vertical-align: top; }
.app-content table:not([class]) th, .site-main table:not([class]) th { background: var(--otp-surface-2); color: var(--otp-text-muted); font-weight: 600; font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; }
.app-content input:not([type]):not([class]), .app-content input[type="text"]:not([class]), .app-content input[type="email"]:not([class]), .app-content input[type="password"]:not([class]), .app-content input[type="number"]:not([class]), .app-content input[type="url"]:not([class]), .app-content input[type="search"]:not([class]), .app-content input[type="tel"]:not([class]), .app-content input[type="date"]:not([class]), .app-content input[type="datetime-local"]:not([class]), .app-content select:not([class]), .app-content textarea:not([class]),
.auth-card input:not([type]):not([class]), .auth-card input[type="text"]:not([class]), .auth-card input[type="email"]:not([class]), .auth-card input[type="password"]:not([class]), .auth-card select:not([class]), .auth-card textarea:not([class]) { width: 100%; max-width: 100%; padding: .5rem .75rem; background: var(--otp-surface); color: var(--otp-text); border: 1px solid var(--otp-border-strong); border-radius: 10px; font: inherit; }
.app-content button:not([class]), .app-content input[type="submit"]:not([class]), .auth-card button:not([class]) { padding: .5rem 1rem; background: var(--otp-primary); color: #fff; border: 0; border-radius: 10px; font-weight: 550; cursor: pointer; }
.app-content label:not([class]), .auth-card label:not([class]) { display: block; font-weight: 550; margin: .65rem 0 .25rem; font-size: .875rem; }
.app-content .section, .app-content .card-legacy { background: var(--otp-surface); border: 1px solid var(--otp-border); border-radius: var(--otp-radius); padding: 1.25rem; margin-bottom: 1.25rem; box-shadow: var(--otp-shadow-sm); }
.app-content .muted, .site-main .muted { color: var(--otp-text-muted); }
.app-content .btn:not([class*="btn-"]) { background: var(--otp-primary); color: #fff; }
.app-content .error, .app-content .err { color: var(--otp-danger); }
.app-content .ok, .app-content .success { color: var(--otp-success); }

/* ---------- 4. forms ------------------------------------------------------- */
.form-label { font-weight: 600; font-size: .8125rem; color: var(--otp-heading); margin-bottom: .35rem; }
.form-label.is-required::after, label.is-required::after, .required-mark { content: " *"; color: var(--otp-danger); font-weight: 700; }
.required-mark { content: none; }
.required-mark::after { content: " *"; color: var(--otp-danger); }
.form-text { color: var(--otp-text-muted); font-size: .78rem; }
.form-control, .form-select { background-color: var(--otp-surface); color: var(--otp-text); border-color: var(--otp-border-strong); border-radius: 10px; padding: .55rem .8rem; transition: border-color .15s ease, box-shadow .15s ease; }
.form-control::placeholder { color: var(--otp-text-muted); opacity: .75; }
.form-control:focus, .form-select:focus { border-color: var(--otp-primary); background-color: var(--otp-surface); color: var(--otp-text); }
.form-control:disabled, .form-select:disabled, .form-control[readonly] { background-color: var(--otp-surface-2); opacity: .85; }
.form-control-sm, .form-select-sm { border-radius: 8px; padding: .3rem .6rem; font-size: .8125rem; }
.form-control-lg, .form-select-lg { border-radius: 12px; }
.form-check-input { border-color: var(--otp-border-strong); background-color: var(--otp-surface); }
.form-check-input:checked { background-color: var(--otp-primary); border-color: var(--otp-primary); }
.form-switch .form-check-input { width: 2.4em; height: 1.3em; cursor: pointer; }
.form-select { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); }
.input-group-text { background: var(--otp-surface-2); border-color: var(--otp-border-strong); color: var(--otp-text-muted); }
.input-group > .form-control:not(:last-child), .input-group > .form-select:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-icon { position: relative; }
.input-icon > .fa-solid, .input-icon > .fa-regular { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--otp-text-muted); pointer-events: none; font-size: .9rem; }
.input-icon > .form-control, .input-icon > .form-select { padding-left: 2.5rem; }
.password-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--otp-text-muted); width: 34px; height: 34px; border-radius: 8px; }
.password-toggle:hover { background: var(--otp-sidebar-hover-bg); color: var(--otp-heading); }
.has-password-toggle > .form-control { padding-right: 2.8rem; }
.form-control.is-invalid, .was-validated .form-control:invalid, .form-select.is-invalid, .was-validated .form-select:invalid { border-color: var(--otp-danger); background-image: none; }
/* a field is never painted green just because it is not wrong (optional empty fields stay neutral) */
.was-validated .form-control:valid, .was-validated .form-select:valid, .was-validated .form-check-input:valid { border-color: var(--otp-border-strong); background-image: none; box-shadow: none; }
.was-validated .form-select:valid { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); }
.was-validated .form-check-input:valid:checked { background-color: var(--otp-primary); }
.was-validated .form-control:focus:valid, .was-validated .form-select:focus:valid { border-color: var(--otp-primary); box-shadow: 0 0 0 .22rem rgba(var(--otp-primary-rgb), .30); }
.was-validated .form-check-input:valid ~ .form-check-label { color: inherit; }
.invalid-feedback { color: var(--otp-danger); font-size: .78rem; }
.is-invalid ~ .invalid-feedback, .was-validated :invalid ~ .invalid-feedback { display: block; }
.form-section { padding: 1.25rem 0; border-bottom: 1px dashed var(--otp-border); }
.form-section:last-child { border-bottom: 0; }
.form-section-title { font-weight: 650; color: var(--otp-heading); margin-bottom: .15rem; }
.form-section-hint { color: var(--otp-text-muted); font-size: .8125rem; margin-bottom: 1rem; }
.sticky-actions { position: sticky; bottom: 0; z-index: 5; background: linear-gradient(to top, var(--otp-bg) 70%, transparent); padding: 1rem 0 .25rem; margin-top: 1rem; display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- 5. tables ------------------------------------------------------ */
.table { --bs-table-bg: transparent; --bs-table-color: var(--otp-text); --bs-table-border-color: var(--otp-border); --bs-table-striped-bg: var(--otp-surface-2); --bs-table-hover-bg: rgba(var(--otp-primary-rgb), .045); --bs-table-hover-color: var(--otp-text); margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .8rem 1rem; vertical-align: middle; }
.table thead th { background: var(--otp-surface-2); color: var(--otp-text-muted); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 650; border-bottom: 1px solid var(--otp-border); white-space: nowrap; }
.table tbody tr:last-child > * { border-bottom-width: 0; }
.table-actions { white-space: nowrap; text-align: right; }
.table-actions .btn + .btn, .table-actions form + .btn, .table-actions .btn + form { margin-left: 4px; }
.table-actions form { display: inline; }
.table-card { padding: 0; overflow: hidden; }
.table-card > .table-responsive { border-radius: inherit; }
.table-card .card-header { padding: 1rem 1.25rem; }
.table-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: .85rem 1.25rem; border-top: 1px solid var(--otp-border); color: var(--otp-text-muted); font-size: .8125rem; }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-responsive .dropdown { position: static; }
.table-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-id { color: var(--otp-text-muted); font-variant-numeric: tabular-nums; }
.table-empty td { padding: 0 !important; }
.sortable { cursor: pointer; user-select: none; }
.sortable::after { content: "\f0dc"; font-family: "Font Awesome 6 Free"; font-weight: 900; margin-left: .45em; opacity: .35; font-size: .8em; }

/* ---------- 6. components -------------------------------------------------- */
.badge-soft { display: inline-flex; align-items: center; gap: 6px; padding: .25em .65em; border-radius: 999px; font-size: .75rem; font-weight: 600; line-height: 1.35; white-space: nowrap; border: 1px solid transparent; }
.badge-soft::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-soft-success { color: var(--otp-success); background: rgba(var(--otp-success-rgb), .12); border-color: rgba(var(--otp-success-rgb), .25); }
.badge-soft-warning { color: var(--otp-warning); background: rgba(var(--otp-warning-rgb), .13); border-color: rgba(var(--otp-warning-rgb), .28); }
.badge-soft-danger { color: var(--otp-danger); background: rgba(var(--otp-danger-rgb), .11); border-color: rgba(var(--otp-danger-rgb), .26); }
.badge-soft-info { color: var(--otp-info); background: rgba(var(--otp-info-rgb), .11); border-color: rgba(var(--otp-info-rgb), .26); }
.badge-soft-secondary { color: var(--otp-text-muted); background: rgba(var(--otp-secondary-rgb), .12); border-color: rgba(var(--otp-secondary-rgb), .25); }
.badge-soft-primary { color: var(--otp-primary); background: var(--otp-primary-soft); border-color: rgba(var(--otp-primary-rgb), .28); }
.badge { font-weight: 600; }

.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-title { font-size: 1.5rem; font-weight: 700; margin: 0 0 .25rem; }
.page-subtitle { color: var(--otp-text-muted); margin: 0; font-size: .9rem; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.stat-card { position: relative; overflow: hidden; display: flex; align-items: center; gap: 16px; padding: 1.15rem 1.25rem; background: var(--otp-surface); border: 1px solid var(--otp-border); border-radius: var(--otp-radius); box-shadow: var(--otp-shadow-sm); height: 100%; transition: transform .18s ease, box-shadow .18s ease; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--otp-shadow-md); }
.stat-icon { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.2rem; color: var(--tone, var(--otp-primary)); background: color-mix(in srgb, var(--tone, var(--otp-primary)) 14%, transparent); }
.stat-label { color: var(--otp-text-muted); font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 .2rem; }
.stat-value { font-size: 1.55rem; font-weight: 700; color: var(--otp-heading); line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat-sub { color: var(--otp-text-muted); font-size: .78rem; margin-top: .15rem; }
.stat-card.tone-primary { --tone: var(--otp-primary); } .stat-card.tone-success { --tone: var(--otp-success); } .stat-card.tone-warning { --tone: var(--otp-warning); } .stat-card.tone-danger { --tone: var(--otp-danger); } .stat-card.tone-info { --tone: var(--otp-info); }
.stat-card.is-gradient { background: var(--otp-gradient); border-color: transparent; color: #fff; }
.stat-card.is-gradient .stat-label, .stat-card.is-gradient .stat-sub { color: rgba(255,255,255,.82); } .stat-card.is-gradient .stat-value { color: #fff; } .stat-card.is-gradient .stat-icon { background: rgba(255,255,255,.2); color: #fff; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; padding: 1rem 1.25rem; background: var(--otp-surface); border: 1px solid var(--otp-border); border-radius: var(--otp-radius); margin-bottom: 1rem; }
.filter-bar .form-label { margin-bottom: .2rem; font-size: .72rem; color: var(--otp-text-muted); text-transform: uppercase; letter-spacing: .05em; }
.filter-bar .grow { flex: 1 1 220px; }

.kv { display: grid; grid-template-columns: minmax(130px, 220px) 1fr; gap: .55rem 1.25rem; margin: 0; }
.kv dt { color: var(--otp-text-muted); font-weight: 550; font-size: .85rem; }
.kv dd { margin: 0; word-break: break-word; }
@media (max-width: 575.98px) { .kv { grid-template-columns: 1fr; gap: .1rem; } .kv dd { margin-bottom: .6rem; } }

.empty-state { text-align: center; padding: 3rem 1.5rem; color: var(--otp-text-muted); }
.empty-state-icon { width: 64px; height: 64px; margin: 0 auto 1rem; display: grid; place-items: center; border-radius: 50%; font-size: 1.6rem; color: var(--otp-primary); background: var(--otp-primary-soft); }
.empty-state-title { color: var(--otp-heading); font-weight: 650; font-size: 1.05rem; margin-bottom: .25rem; }
.empty-state-hint { max-width: 420px; margin: 0 auto; font-size: .9rem; }
.empty-state-action { margin-top: 1.1rem; }

.skeleton { position: relative; overflow: hidden; background: var(--otp-surface-2); border-radius: 8px; min-height: 1em; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(var(--otp-primary-rgb), .10), transparent); animation: otp-shimmer 1.4s infinite; }

.copy-field { display: flex; align-items: center; gap: 8px; background: var(--otp-surface-2); border: 1px dashed var(--otp-border-strong); border-radius: 10px; padding: .45rem .6rem .45rem .85rem; font-family: var(--otp-mono); word-break: break-all; }
.copy-field .copy-text { flex: 1; min-width: 0; }
.otp-code { display: inline-flex; gap: 6px; font-family: var(--otp-mono); font-size: 1.9rem; font-weight: 700; letter-spacing: .18em; color: var(--otp-primary); }
.countdown { font-variant-numeric: tabular-nums; font-weight: 650; }
.countdown.is-low { color: var(--otp-danger); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--otp-text-muted); }
.dot-success { background: var(--otp-success); box-shadow: 0 0 0 3px rgba(var(--otp-success-rgb), .2); } .dot-danger { background: var(--otp-danger); box-shadow: 0 0 0 3px rgba(var(--otp-danger-rgb), .2); } .dot-warning { background: var(--otp-warning); box-shadow: 0 0 0 3px rgba(var(--otp-warning-rgb), .2); }
.step-list { counter-reset: step; display: grid; gap: 1rem; padding: 0; list-style: none; }
.step-list > li { counter-increment: step; position: relative; padding-left: 3.1rem; }
.step-list > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border-radius: 50%; background: var(--otp-primary-soft); color: var(--otp-primary); font-weight: 700; }
.timeline { list-style: none; padding: 0 0 0 1.25rem; margin: 0; border-left: 2px solid var(--otp-border); }
.timeline > li { position: relative; padding: 0 0 1.1rem 1rem; }
.timeline > li::before { content: ""; position: absolute; left: -1.62rem; top: .35rem; width: 10px; height: 10px; border-radius: 50%; background: var(--otp-primary); box-shadow: 0 0 0 4px var(--otp-primary-soft); }

.toast-host { position: fixed; top: 16px; right: 16px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); }
.toast-host .toast { opacity: 1; width: 100%; animation: otp-slide-in .22s ease-out; }
.toast-host .toast-body { display: flex; gap: 10px; align-items: flex-start; }
.toast-ico { font-size: 1.1rem; margin-top: .1rem; }
.toast-ok .toast-ico { color: var(--otp-success); } .toast-err .toast-ico { color: var(--otp-danger); } .toast-warn .toast-ico { color: var(--otp-warning); } .toast-info .toast-ico { color: var(--otp-info); }

/* ---------- 7. admin shell ------------------------------------------------- */
.app-shell { min-height: 100vh; }
.app-sidebar { position: fixed; z-index: 1040; inset: 0 auto 0 0; width: var(--otp-sidebar-w); display: flex; flex-direction: column; background: var(--otp-sidebar-bg); border-right: 1px solid var(--otp-border); transition: width .22s ease, transform .22s ease; }
.sidebar-brand { height: var(--otp-topbar-h); flex: 0 0 var(--otp-topbar-h); display: flex; align-items: center; gap: 12px; padding: 0 1.25rem; border-bottom: 1px solid var(--otp-border); }
.sidebar-brand a { display: flex; align-items: center; gap: 12px; color: var(--otp-heading); text-decoration: none; min-width: 0; }
.brand-mark { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 11px; background: var(--otp-gradient); display: grid; place-items: center; color: #fff; font-size: 1rem; box-shadow: 0 6px 16px rgba(var(--otp-primary-rgb), .35); }
.brand-name { font-weight: 750; letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-name small { display: block; font-weight: 550; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--otp-text-muted); margin-top: 2px; }
.sidebar-nav { flex: 1 1 auto; min-height: 0; padding: .9rem .75rem 1.25rem; overflow-y: auto; }
.sidebar-nav .simplebar-content-wrapper { outline: 0; }
.nav-caption { display: flex; align-items: center; gap: 10px; width: 100%; padding: .55rem .75rem; margin-top: .35rem; border: 0; background: transparent; color: var(--otp-text-muted); font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; border-radius: 8px; text-align: left; }
.nav-caption:hover { color: var(--otp-heading); }
.nav-caption .nav-caption-icon { width: 18px; text-align: center; font-size: .8rem; opacity: .85; }
.nav-caption .nav-chevron { margin-left: auto; font-size: .7rem; transition: transform .2s ease; }
.nav-group.is-collapsed .nav-chevron { transform: rotate(-90deg); }
.nav-group-items { list-style: none; margin: 0; padding: 0; overflow: hidden; display: grid; grid-template-rows: 1fr; transition: grid-template-rows .22s ease; }
.nav-group-items > .nav-group-inner { min-height: 0; overflow: hidden; }
.nav-group.is-collapsed .nav-group-items { grid-template-rows: 0fr; }
.nav-link-item { display: flex; align-items: center; gap: 12px; padding: .55rem .75rem; margin: 2px 0; border-radius: 10px; color: var(--otp-sidebar-text); font-weight: 500; font-size: .9rem; text-decoration: none; position: relative; transition: background-color .15s ease, color .15s ease, padding .15s ease; }
.nav-link-item .nav-ico { flex: 0 0 20px; text-align: center; font-size: .95rem; opacity: .9; }
.nav-link-item:hover { background: var(--otp-sidebar-hover-bg); color: var(--otp-heading); text-decoration: none; }
.nav-link-item.active { background: var(--otp-sidebar-active-bg); color: var(--otp-sidebar-active-text); font-weight: 650; }
.sidebar-foot { flex: 0 0 auto; padding: .75rem; border-top: 1px solid var(--otp-border); }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: .5rem; border-radius: 12px; background: var(--otp-surface-2); }
.avatar { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; background: var(--otp-gradient); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.avatar-sm { width: 32px; height: 32px; font-size: .8rem; }
.sidebar-user-name { font-weight: 600; font-size: .85rem; line-height: 1.2; color: var(--otp-heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-role { font-size: .72rem; color: var(--otp-text-muted); }

.app-main { margin-left: var(--otp-sidebar-w); min-height: 100vh; display: flex; flex-direction: column; transition: margin-left .22s ease; min-width: 0; }
.app-topbar { position: sticky; top: 0; z-index: 1030; height: var(--otp-topbar-h); display: flex; align-items: center; gap: 12px; padding: 0 1.5rem; background: var(--otp-topbar-bg); backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--otp-border); }
.topbar-spacer { flex: 1 1 auto; }
.topbar-search { position: relative; width: min(380px, 38vw); }
.topbar-search .form-control { padding-left: 2.4rem; background: var(--otp-surface-2); border-color: transparent; }
.topbar-search .form-control:focus { background: var(--otp-surface); border-color: var(--otp-primary); }
.topbar-search > .fa-magnifying-glass { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--otp-text-muted); font-size: .85rem; pointer-events: none; }
.topbar-search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: .7rem; padding: .1em .45em; background: var(--otp-surface); color: var(--otp-text-muted); border: 1px solid var(--otp-border); border-radius: 6px; pointer-events: none; }
.search-results { position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: var(--otp-surface); border: 1px solid var(--otp-border); border-radius: 12px; box-shadow: var(--otp-shadow-md); padding: .4rem; z-index: 50; display: none; max-height: 60vh; overflow: auto; }
.search-results.show { display: block; }
.search-results a { display: flex; align-items: center; gap: 10px; padding: .5rem .65rem; border-radius: 8px; color: var(--otp-text); text-decoration: none; font-size: .9rem; }
.search-results a:hover, .search-results a.is-hot { background: var(--otp-primary-soft); color: var(--otp-primary); }
.search-results .grp { margin-left: auto; font-size: .72rem; color: var(--otp-text-muted); }
.topbar-btn { position: relative; }
.topbar-btn .dot-badge { position: absolute; top: 6px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--otp-danger); border: 2px solid var(--otp-surface); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: .25rem .6rem .25rem .25rem; border-radius: 999px; border: 1px solid transparent; background: transparent; color: var(--otp-text); }
.user-chip:hover, .user-chip.show { background: var(--otp-surface-2); border-color: var(--otp-border); }
.user-chip-name { font-weight: 600; font-size: .85rem; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-content { flex: 1 1 auto; padding: 1.75rem 1.5rem 2rem; width: 100%; max-width: 1480px; margin: 0 auto; }
.app-content.is-wide { max-width: none; }
.app-footer { padding: 1rem 1.5rem 1.5rem; color: var(--otp-text-muted); font-size: .8rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.app-backdrop { display: none; position: fixed; inset: 0; z-index: 1035; background: rgba(15, 23, 42, .5); backdrop-filter: blur(2px); }

/* collapsed rail (desktop) */
html.sidebar-collapsed .app-sidebar { width: var(--otp-sidebar-w-collapsed); }
html.sidebar-collapsed .app-main { margin-left: var(--otp-sidebar-w-collapsed); }
html.sidebar-collapsed .brand-name, html.sidebar-collapsed .nav-link-item .nav-text, html.sidebar-collapsed .nav-caption .nav-caption-text, html.sidebar-collapsed .nav-caption .nav-chevron, html.sidebar-collapsed .sidebar-user-meta { display: none; }
html.sidebar-collapsed .nav-link-item, html.sidebar-collapsed .nav-caption { justify-content: center; padding-left: 0; padding-right: 0; }
html.sidebar-collapsed .sidebar-brand { justify-content: center; padding: 0; }
html.sidebar-collapsed .sidebar-user { justify-content: center; background: transparent; }
html.sidebar-collapsed .nav-group.is-collapsed .nav-group-items { grid-template-rows: 1fr; }

/* ---------- 8. auth -------------------------------------------------------- */
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; background: radial-gradient(1000px 520px at 12% -8%, rgba(var(--otp-primary-rgb), .20), transparent 60%), radial-gradient(900px 480px at 100% 108%, rgba(6, 182, 212, .17), transparent 60%), var(--otp-bg); }
.auth-wrap { width: 100%; max-width: 440px; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 1.5rem; color: var(--otp-heading); text-decoration: none; font-weight: 750; font-size: 1.25rem; letter-spacing: -.02em; }
.auth-brand:hover { text-decoration: none; }
.auth-card { background: var(--otp-surface); border: 1px solid var(--otp-border); border-radius: var(--otp-radius-lg); box-shadow: var(--otp-shadow-lg); padding: 2rem; animation: otp-rise .35s ease-out both; }
.auth-title { font-size: 1.4rem; font-weight: 700; margin: 0 0 .25rem; }
.auth-sub { color: var(--otp-text-muted); margin: 0 0 1.5rem; font-size: .9rem; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 1.25rem; font-size: .875rem; }
.auth-foot { text-align: center; margin-top: 1.25rem; color: var(--otp-text-muted); font-size: .8rem; }
.auth-theme { position: fixed; top: 14px; right: 14px; }

/* ---------- 9. client site -------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 1030; background: var(--otp-topbar-bg); backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--otp-border); }
.site-nav { display: flex; align-items: center; gap: 1.25rem; min-height: 68px; }
.site-brand { display: flex; align-items: center; gap: 10px; color: var(--otp-heading); font-weight: 750; letter-spacing: -.02em; font-size: 1.1rem; text-decoration: none; }
.site-brand:hover { text-decoration: none; }
.site-menu { display: flex; align-items: center; gap: .25rem; margin: 0 0 0 1rem; padding: 0; list-style: none; }
.site-menu a { display: block; padding: .5rem .8rem; border-radius: 10px; color: var(--otp-text-muted); font-weight: 550; font-size: .92rem; text-decoration: none; }
.site-menu a:hover { color: var(--otp-heading); background: var(--otp-sidebar-hover-bg); text-decoration: none; }
.site-menu a.active { color: var(--otp-primary); background: var(--otp-primary-soft); }
.site-spacer { flex: 1; }
.balance-chip { display: inline-flex; align-items: center; gap: 8px; padding: .4rem .8rem; border-radius: 999px; background: var(--otp-primary-soft); color: var(--otp-primary); font-weight: 650; font-size: .88rem; text-decoration: none; white-space: nowrap; }
.balance-chip:hover { text-decoration: none; background: rgba(var(--otp-primary-rgb), .18); }
.site-main { min-height: 60vh; }
.site-container { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }
.site-page { padding: 2rem 1.25rem 3rem; max-width: 1180px; margin: 0 auto; }
.site-announce { background: var(--otp-gradient); color: #fff; text-align: center; padding: .55rem 1rem; font-size: .88rem; font-weight: 550; }
.site-footer { margin-top: 3rem; background: var(--otp-sidebar-bg); border-top: 1px solid var(--otp-border); padding: 2.5rem 0 1.5rem; color: var(--otp-text-muted); font-size: .9rem; }
.site-footer h6 { text-transform: uppercase; font-size: .72rem; letter-spacing: .1em; color: var(--otp-heading); margin-bottom: .9rem; }
.site-footer a { color: var(--otp-text-muted); display: block; padding: .18rem 0; }
.site-footer a:hover { color: var(--otp-primary); }
.site-footer .copy { border-top: 1px solid var(--otp-border); margin-top: 1.75rem; padding-top: 1.1rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .8rem; }

.hero { position: relative; overflow: hidden; padding: 5rem 0 4rem; background: radial-gradient(900px 420px at 15% -10%, rgba(var(--otp-primary-rgb), .22), transparent 62%), radial-gradient(800px 420px at 95% 20%, rgba(6, 182, 212, .20), transparent 60%); }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.08; }
.hero h1 .grad { color: var(--otp-primary); }
.hero p.lead { color: var(--otp-text-muted); font-size: 1.1rem; max-width: 560px; }
.hero-card { background: var(--otp-surface); border: 1px solid var(--otp-border); border-radius: 20px; box-shadow: var(--otp-shadow-lg); padding: 1.4rem; animation: otp-float 6s ease-in-out infinite; }
.hero-chip { display: inline-flex; align-items: center; gap: 8px; padding: .3rem .8rem; border-radius: 999px; background: var(--otp-primary-soft); color: var(--otp-primary); font-weight: 600; font-size: .8rem; margin-bottom: 1rem; }
.feature { padding: 1.5rem; height: 100%; background: var(--otp-surface); border: 1px solid var(--otp-border); border-radius: var(--otp-radius); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--otp-shadow-md); border-color: rgba(var(--otp-primary-rgb), .35); }
.feature-icon { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-size: 1.25rem; margin-bottom: 1rem; color: var(--otp-primary); background: var(--otp-primary-soft); }
.section-title { font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 750; letter-spacing: -.02em; }
.section-sub { color: var(--otp-text-muted); max-width: 560px; }
.price-row { display: flex; align-items: center; gap: 12px; }
.service-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--otp-primary-soft); color: var(--otp-primary); font-size: .95rem; flex: 0 0 auto; }
.price-tag { font-weight: 700; color: var(--otp-primary); font-variant-numeric: tabular-nums; }
.rental-card { background: var(--otp-surface); border: 1px solid var(--otp-border); border-radius: var(--otp-radius); padding: 1.1rem 1.25rem; box-shadow: var(--otp-shadow-sm); }
.rental-card + .rental-card { margin-top: .85rem; }
.rental-phone { font-family: var(--otp-mono); font-size: 1.25rem; font-weight: 700; letter-spacing: .03em; color: var(--otp-heading); }

/* ---------- 10. plugins theming -------------------------------------------- */
.select2-container { width: 100% !important; }
.select2-container--bootstrap-5 .select2-selection { background-color: var(--otp-surface); border-color: var(--otp-border-strong); border-radius: 10px; min-height: calc(1.55em + 1.1rem + 2px); color: var(--otp-text); }
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered { color: var(--otp-text); }
.select2-container--bootstrap-5.select2-container--focus .select2-selection, .select2-container--bootstrap-5.select2-container--open .select2-selection { border-color: var(--otp-primary); box-shadow: 0 0 0 .22rem rgba(var(--otp-primary-rgb), .26); }
.select2-container--bootstrap-5 .select2-dropdown { background: var(--otp-surface); border-color: var(--otp-border-strong); border-radius: 12px; box-shadow: var(--otp-shadow-md); overflow: hidden; z-index: 2060; }
.select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field { background: var(--otp-surface-2); color: var(--otp-text); border-color: var(--otp-border-strong); border-radius: 8px; }
.select2-container--bootstrap-5 .select2-results__option { color: var(--otp-text); }
.select2-container--bootstrap-5 .select2-results__option--highlighted { background: var(--otp-primary-soft) !important; color: var(--otp-primary) !important; }
.select2-container--bootstrap-5 .select2-results__option--selected { background: rgba(var(--otp-primary-rgb), .16) !important; }
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice { background: var(--otp-primary-soft); color: var(--otp-primary); border: 0; border-radius: 6px; }
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove { color: var(--otp-primary); }
.is-invalid + .select2-container--bootstrap-5 .select2-selection { border-color: var(--otp-danger); }
.input-group .select2-container { flex: 1 1 auto; width: 1% !important; }
.flatpickr-calendar { background: var(--otp-surface); border: 1px solid var(--otp-border); border-radius: 14px; box-shadow: var(--otp-shadow-md); color: var(--otp-text); font-family: var(--otp-font); }
.flatpickr-calendar.arrowTop::before, .flatpickr-calendar.arrowTop::after { display: none; }
.flatpickr-months .flatpickr-month, .flatpickr-current-month .flatpickr-monthDropdown-months, .flatpickr-current-month input.cur-year, span.flatpickr-weekday { color: var(--otp-heading); fill: var(--otp-heading); background: transparent; }
.flatpickr-day { color: var(--otp-text); border-radius: 10px; }
.flatpickr-day:hover { background: var(--otp-sidebar-hover-bg); border-color: transparent; }
.flatpickr-day.today { border-color: var(--otp-primary); }
.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange { background: var(--otp-primary); border-color: var(--otp-primary); color: #fff; }
.flatpickr-day.inRange { background: var(--otp-primary-soft); border-color: transparent; box-shadow: -5px 0 0 var(--otp-primary-soft), 5px 0 0 var(--otp-primary-soft); }
.flatpickr-day.flatpickr-disabled, .flatpickr-day.prevMonthDay, .flatpickr-day.nextMonthDay { color: var(--otp-text-muted); opacity: .55; }
.flatpickr-time input, .flatpickr-time .flatpickr-am-pm { color: var(--otp-text); background: transparent; }
.flatpickr-months .flatpickr-prev-month svg, .flatpickr-months .flatpickr-next-month svg { fill: var(--otp-text-muted); }
.swal2-popup { background: var(--otp-surface); color: var(--otp-text); border-radius: 18px; font-family: var(--otp-font); border: 1px solid var(--otp-border); }
.swal2-title { color: var(--otp-heading); font-size: 1.25rem; }
.swal2-html-container { color: var(--otp-text-muted); }
.swal2-styled.swal2-confirm { background: var(--otp-primary) !important; border-radius: 10px; box-shadow: none !important; }
.swal2-styled.swal2-cancel { background: var(--otp-surface-2) !important; color: var(--otp-text) !important; border: 1px solid var(--otp-border-strong) !important; border-radius: 10px; }
.swal2-styled.swal2-deny { border-radius: 10px; }
.swal2-container.swal2-backdrop-show { background: rgba(15, 23, 42, .55) !important; backdrop-filter: blur(3px); }
div.dt-container { color: var(--otp-text); }
div.dt-container .dt-search input, div.dt-container .dt-length select { background-color: var(--otp-surface); color: var(--otp-text); border: 1px solid var(--otp-border-strong); border-radius: 10px; padding: .35rem .7rem; }
div.dt-container .dt-paging .page-link { border-radius: 8px; }
div.dt-container .dt-info { color: var(--otp-text-muted); font-size: .8125rem; }
table.dataTable > thead > tr > th, table.dataTable > thead > tr > td { border-bottom-color: var(--otp-border) !important; }
table.dataTable { margin-top: 0 !important; margin-bottom: 0 !important; }
.simplebar-scrollbar::before { background: var(--otp-text-muted); }
.simplebar-track.simplebar-vertical { width: 8px; }
[data-bs-theme="dark"] .flatpickr-calendar { box-shadow: var(--otp-shadow-md); }
[data-bs-theme="dark"] .swal2-icon.swal2-question, [data-bs-theme="dark"] .swal2-icon.swal2-warning { border-color: var(--otp-warning); color: var(--otp-warning); }

/* ---------- 11. motion ----------------------------------------------------- */
@keyframes otp-spin { to { transform: rotate(360deg); } }
@keyframes otp-shimmer { to { transform: translateX(100%); } }
@keyframes otp-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes otp-pop { from { opacity: 0; transform: scale(.97) translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes otp-slide-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes otp-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes otp-pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(var(--otp-primary-rgb), .45); } 100% { box-shadow: 0 0 0 14px rgba(var(--otp-primary-rgb), 0); } }
.page-enter { animation: otp-rise .32s ease-out both; }
.pulse-ring { animation: otp-pulse-ring 1.6s ease-out infinite; }
.spin { animation: otp-spin .9s linear infinite; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- 12. responsive ------------------------------------------------- */
@media (max-width: 991.98px) {
  .app-sidebar { transform: translateX(-100%); width: min(86vw, var(--otp-sidebar-w)); box-shadow: var(--otp-shadow-lg); }
  html.sidebar-open .app-sidebar { transform: none; }
  html.sidebar-open .app-backdrop { display: block; }
  .app-main, html.sidebar-collapsed .app-main { margin-left: 0; }
  html.sidebar-collapsed .app-sidebar { width: min(86vw, var(--otp-sidebar-w)); }
  html.sidebar-collapsed .brand-name, html.sidebar-collapsed .nav-link-item .nav-text, html.sidebar-collapsed .nav-caption .nav-caption-text, html.sidebar-collapsed .nav-caption .nav-chevron, html.sidebar-collapsed .sidebar-user-meta { display: revert; }
  html.sidebar-collapsed .nav-link-item, html.sidebar-collapsed .nav-caption { justify-content: flex-start; padding-left: .75rem; padding-right: .75rem; }
  .topbar-search { display: none; }
  .app-topbar { padding: 0 1rem; }
  .app-content { padding: 1.25rem 1rem 1.5rem; }
  .site-menu { display: none; }
}
@media (max-width: 767.98px) {
  .page-title { font-size: 1.25rem; }
  .hero { padding: 3rem 0 2.5rem; }
  .auth-card { padding: 1.5rem 1.25rem; }
  .user-chip-name { display: none; }
  /* wide tables become stacked cards when they opt in with .table-stack */
  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { margin: 0 0 .85rem; border: 1px solid var(--otp-border); border-radius: var(--otp-radius-sm); background: var(--otp-surface); overflow: hidden; }
  .table-stack td { display: flex; justify-content: space-between; gap: 14px; text-align: right; padding: .55rem .9rem !important; border-bottom: 1px solid var(--otp-border) !important; }
  .table-stack td:last-child { border-bottom: 0 !important; }
  .table-stack td::before { content: attr(data-label); color: var(--otp-text-muted); font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; text-align: left; flex: 0 0 38%; }
  .table-stack td.table-actions { justify-content: flex-end; }
  .table-stack td.table-actions::before { content: none; }
  .btn-lg-mobile { padding: .8rem 1.2rem; font-size: 1.02rem; width: 100%; }
}
@media (max-width: 575.98px) {
  .stat-value { font-size: 1.3rem; }
  .toast-host { left: 16px; right: 16px; width: auto; }
}

/* ---------- 13. print ------------------------------------------------------ */
@media print {
  .app-sidebar, .app-topbar, .app-footer, .site-header, .site-footer, .page-actions, .toast-host, .btn { display: none !important; }
  .app-main { margin-left: 0 !important; }
  body { background: #fff; color: #000; }
  .card, .stat-card { box-shadow: none; border-color: #ccc; }
}
