@import url("/static/css/omnira-tokens.css");

/* ═══════════════════════════════════════════════════════════════════════════
   Omnira Studio v1.2.9 — "Fluent Command Suite" Core Architecture & Primitives
   60-30-10 Anti-Glare Palette • 6-Step Tonal Surfaces • 6% Hairline • 12/8/4 Radii
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --font-sans: "Inter Variable", "Inter", "Segoe UI Variable Display", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: "JetBrains Mono Variable", "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  --surface-container-low: rgb(var(--c-surface-low));
  --surface-container-lowest: rgb(var(--c-surface-lowest));
}

html.light,
:root[data-theme="light"] {
  --surface-container-low: #f1f5f9;
  --surface-container-lowest: #ffffff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

html,
body {
  background-color: rgb(var(--c-surface)); /* #0b1326 flat matte canvas — zero radial glow blobs */
  color: rgb(var(--c-on-surface));         /* #dae2fd crisp ice-white */
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: -0.005em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:root[data-theme="halloween"] body {
  background-image: var(--hw-web);
  background-repeat: no-repeat;
  background-position: top right;
}

/* Custom Scrollbar — Recessed Tonal Well */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgb(var(--c-surface-lowest));
}
::-webkit-scrollbar-thumb {
  background: rgb(var(--c-surface-highest));
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgb(var(--c-outline));
}

/* ─── Typography Hierarchy (Rule 4: No 800/900 Overuse, Readable Studio Scale) ─── */
h1,
.omnira-hero-title {
  font-family: var(--font-sans);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: rgb(var(--c-on-surface));
  margin: 0;
}

h2,
h3,
.omnira-block-title {
  font-family: var(--font-sans);
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.4;
  color: rgb(var(--c-on-surface));
  margin: 0;
}

h4 {
  font-family: var(--font-sans);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.4;
  color: rgb(var(--c-on-surface));
  margin: 0;
}

.omnira-subtitle,
p {
  font-size: 14.5px;
  font-weight: 400;
  color: rgb(var(--c-on-surface-variant));
  line-height: 1.6;
}

.mono-code {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ─── Clean 1.75px SVG Icons & Solid 10x10 Platform Squares (Rule 4) ─── */
.ui-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}

.ui-icon-sm {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}

.platform-square {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* ─── Rule 1: Unboxed Page Header & Clean Sidebar / Navigation ─── */
.omnira-hero-card {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 2px 0 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.omnira-titlebar,
.glass-header {
  background-color: rgb(var(--c-surface-low)); /* #131b2e */
  border-bottom: 1px solid var(--border-hairline);
  box-shadow: none;
}

.omnira-sidebar {
  background-color: rgb(var(--c-surface-low)); /* #131b2e */
  border-bottom: 1px solid var(--border-hairline);
}

@media (min-width: 1024px) {
  .omnira-sidebar {
    border-bottom: 0;
    border-right: 1px solid var(--border-hairline);
    position: sticky;
    top: 53px;
    height: calc(100vh - 53px);
    overflow-y: auto;
  }
}

.omnira-nav-group-label {
  padding: 12px 12px 5px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgb(var(--c-outline));
  user-select: none;
}

.omnira-statusbar {
  background-color: rgb(var(--c-surface-low)); /* #131b2e */
  border-top: 1px solid var(--border-hairline);
  font-size: 13.5px;
  color: rgb(var(--c-on-surface-variant));
}

/* Navigation Items & Tab Buttons (#c0c1ff Active Fill + #1000a9 Deep Ultramarine Ink) */
.nav-item,
.cust-tab-btn,
.adm-tab-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9.5px 14px;
  border-radius: var(--radius-control, 8px) !important;
  font-size: 14.5px;
  font-weight: 500;
  color: rgb(var(--c-on-surface-variant));
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
  text-decoration: none;
  text-align: left;
}

.nav-item:hover:not(.active):not(.nav-tab-active),
.cust-tab-btn:hover:not(.active):not(.nav-tab-active),
.adm-tab-btn:hover:not(.active):not(.nav-tab-active) {
  background: rgb(var(--c-surface-high)); /* #222a3d */
  color: rgb(var(--c-on-surface));
}

.nav-item.active,
.nav-item.nav-tab-active,
.cust-tab-btn.active,
.cust-tab-btn.nav-tab-active,
.adm-tab-btn.active,
.adm-tab-btn.nav-tab-active,
.nav-tab-active {
  background: rgb(var(--c-primary)) !important; /* #c0c1ff */
  color: rgb(var(--c-on-primary)) !important;   /* #1000a9 */
  border-color: transparent !important;
  box-shadow: none !important;
  font-weight: 600 !important;
}

.nav-item.active .ui-icon,
.cust-tab-btn.nav-tab-active .ui-icon,
.adm-tab-btn.nav-tab-active .ui-icon {
  stroke: rgb(var(--c-on-primary));
}

/* Rule 1: Hide noisy right-hand counter pills on sidebar/nav items */
.nav-badge {
  display: none !important;
}

/* ─── Rule 2 & 3: Tonal Surface Cards (12px Radius + 6% Hairline Border) ─── */
.omnira-block-card,
.glass-card {
  background: rgb(var(--c-surface-low)); /* #131b2e */
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-card, 12px) !important;
  box-shadow: var(--shadow-highlight);
}

.omnira-kpi-card {
  background: rgb(var(--c-surface-container)); /* #171f33 */
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-card, 12px) !important;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 108px;
  box-shadow: var(--shadow-highlight);
}

.omnira-kpi-label {
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgb(var(--c-outline)); /* #908fa0 */
}

.omnira-kpi-val {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: rgb(var(--c-on-surface));
  font-variant-numeric: tabular-nums;
  font-family: var(--font-sans);
}

.omnira-account-card,
.omnira-inspector-card {
  background: rgb(var(--c-surface-container)); /* #171f33 */
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-card, 12px) !important;
}

.omnira-recessed-well {
  background: rgb(var(--c-surface-lowest)); /* #060e20 */
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-control, 8px);
}

.omnira-block-accent-bar {
  width: 3px;
  height: 28px;
  border-radius: 999px;
  flex-shrink: 0;
  background: rgb(var(--c-primary));
}

/* ─── Rule 3: Interactive Controls (8px Radius) ─── */
.btn-primary,
.btn-primary-gradient {
  background: rgb(var(--c-primary)) !important; /* #c0c1ff */
  color: rgb(var(--c-on-primary)) !important;   /* #1000a9 */
  border: 1px solid transparent !important;
  border-radius: var(--radius-control, 8px) !important;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  box-shadow: none !important;
  transition: background-color 140ms ease, color 140ms ease;
  text-decoration: none;
}

.btn-primary:hover:not(:disabled),
.btn-primary-gradient:hover:not(:disabled) {
  background: rgb(var(--c-primary-container)) !important; /* #8083ff */
  color: #ffffff !important;
  transform: none;
  filter: none;
}

.btn-primary:disabled,
.btn-primary-gradient:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-ghost {
  background: rgb(var(--c-surface-high)); /* #222a3d */
  color: rgb(var(--c-on-surface));        /* #dae2fd */
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-control, 8px) !important;
  font-size: 13.5px;
  font-weight: 500;
  padding: 7.5px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease;
  text-decoration: none;
}

.btn-ghost:hover:not(:disabled) {
  background: rgb(var(--c-surface-highest)); /* #2d3449 */
  border-color: rgb(var(--c-overlay) / 0.12);
}

/* Inputs, Selects & Textareas (Tier 2: 8px Radius, #171f33 Surface, 6% Hairline + 2px Bottom Border) */
.studio-input,
.omnira-search-input,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
select,
textarea {
  background-color: rgb(var(--c-surface-container)) !important; /* #171f33 */
  color: rgb(var(--c-on-surface)) !important;                   /* #dae2fd */
  border: 1px solid var(--border-hairline) !important;
  border-bottom: 2px solid rgb(var(--c-outline-variant)) !important; /* #464554 */
  border-radius: var(--radius-control, 8px) !important;
  font-size: 14.5px;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.studio-input:focus,
.omnira-search-input:focus,
input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
  outline: none !important;
  border-color: rgb(var(--c-overlay) / 0.14) !important;
  border-bottom-color: rgb(var(--c-primary)) !important; /* #c0c1ff */
}

input::placeholder,
textarea::placeholder {
  color: rgb(var(--c-outline)) !important;
}

/* Filter Chips (8px Radius) */
.omnira-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-control, 8px);
  font-size: 13.5px;
  font-weight: 500;
  color: rgb(var(--c-on-surface-variant));
  background: rgb(var(--c-surface-container));
  border: 1px solid var(--border-hairline);
  cursor: pointer;
  transition: all 140ms ease;
}

.omnira-filter-chip:hover {
  background: rgb(var(--c-surface-high));
  color: rgb(var(--c-on-surface));
}

.omnira-filter-chip.is-active {
  background: rgb(var(--c-surface-high));
  color: rgb(var(--c-on-surface));
  border-color: rgb(var(--c-overlay) / 0.14);
  font-weight: 600;
}

/* ─── Rule 3: Technical Monospace Badges (Tier 3: 4px Radius) ─── */
.omnira-mono-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-badge, 4px) !important;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  background: rgb(var(--c-surface-high)); /* #222a3d */
  color: rgb(var(--c-on-surface-variant));/* #c7c4d7 */
  border: 0;
  font-variant-numeric: tabular-nums;
  line-height: 1.45;
}

.omnira-mono-badge.is-primary {
  background: rgb(var(--c-primary-container) / 0.22);
  color: rgb(var(--c-primary));
}

.omnira-mono-badge.is-mint {
  background: rgba(78, 222, 163, 0.14);
  color: #4edea3;
}

.omnira-mono-badge.is-amber {
  background: rgba(251, 191, 36, 0.14);
  color: #fbbf24;
}

.omnira-mono-badge.is-coral {
  background: rgba(248, 113, 113, 0.14);
  color: #f87171;
}

.omnira-mono-badge.is-cyan {
  background: rgba(76, 215, 246, 0.14);
  color: #4cd7f6;
}

/* ─── Section 3.5: Startup Loading & System Check Screen (Xanh / Vàng / Đỏ) ─── */
.omnira-check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-control, 8px);
  border: 1px solid var(--border-hairline);
  background: rgb(var(--c-surface-container));
  font-size: 14px;
}

.omnira-check-row .step-dot {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  border: 1px solid currentColor;
  flex-shrink: 0;
}

.omnira-check-row .tag-pill {
  padding: 3px 8px;
  border-radius: var(--radius-badge, 4px);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid transparent;
  flex-shrink: 0;
}

/* Thành công (.is-done / .is-success — Xanh lá #4edea3) */
.omnira-check-row.is-done,
.omnira-check-row.is-success {
  background: rgba(78, 222, 163, 0.06);
  border-color: rgba(78, 222, 163, 0.18);
  color: #4edea3;
}
.omnira-check-row.is-done .step-dot,
.omnira-check-row.is-success .step-dot {
  background: rgba(78, 222, 163, 0.18);
  border-color: #4edea3;
  color: #4edea3;
}
.omnira-check-row.is-done .tag-pill,
.omnira-check-row.is-success .tag-pill {
  background: rgba(78, 222, 163, 0.16);
  border-color: rgba(78, 222, 163, 0.35);
  color: #4edea3;
}

/* Cảnh báo (.is-warn / .is-warning — Vàng #fbbf24) */
.omnira-check-row.is-warn,
.omnira-check-row.is-warning {
  background: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.28);
  color: #fbbf24;
}
.omnira-check-row.is-warn .step-dot,
.omnira-check-row.is-warning .step-dot {
  background: rgba(251, 191, 36, 0.18);
  border-color: #fbbf24;
  color: #fbbf24;
}
.omnira-check-row.is-warn .tag-pill,
.omnira-check-row.is-warning .tag-pill {
  background: rgba(251, 191, 36, 0.16);
  border-color: rgba(251, 191, 36, 0.35);
  color: #fbbf24;
}

/* Thông tin / Đang xử lý (.is-info — Cyan #4cd7f6) */
.omnira-check-row.is-info {
  background: rgba(76, 215, 246, 0.08);
  border-color: rgba(76, 215, 246, 0.28);
  color: #4cd7f6;
}
.omnira-check-row.is-info .step-dot {
  background: rgba(76, 215, 246, 0.18);
  border-color: #4cd7f6;
  color: #4cd7f6;
}
.omnira-check-row.is-info .tag-pill {
  background: rgba(76, 215, 246, 0.16);
  border-color: rgba(76, 215, 246, 0.35);
  color: #4cd7f6;
}

/* Lỗi (.is-error / .is-danger — Đỏ #f87171) */
.omnira-check-row.is-error,
.omnira-check-row.is-danger {
  background: rgba(248, 113, 113, 0.10);
  border-color: rgba(248, 113, 113, 0.35);
  color: #f87171;
}
.omnira-check-row.is-error .step-dot,
.omnira-check-row.is-danger .step-dot {
  background: rgba(248, 113, 113, 0.20);
  border-color: #f87171;
  color: #f87171;
}
.omnira-check-row.is-error .tag-pill,
.omnira-check-row.is-danger .tag-pill {
  background: rgba(248, 113, 113, 0.18);
  border-color: rgba(248, 113, 113, 0.40);
  color: #f87171;
}

/* ─── Tables & Dividers (6% Hairline) ─── */
.omnira-table {
  width: 100%;
  text-align: left;
  border-collapse: collapse;
}

.omnira-table th,
table th {
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgb(var(--c-outline));
  border-bottom: 1px solid var(--border-hairline);
  padding: 11px 10px;
}

.omnira-table td,
table td {
  font-size: 14px;
  color: rgb(var(--c-on-surface));
  padding: 12px 10px;
}

table tbody tr {
  border-bottom: 1px solid var(--border-hairline);
  transition: background-color 120ms ease;
}

table tbody tr:hover {
  background-color: rgb(var(--c-surface-container) / 0.65);
}

/* ─── Omnira Fluent Pagination Bar (Tier 2: 8px Radius, 6% Hairline) ─── */
.omnira-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  margin-top: 12px;
  background-color: rgb(var(--c-surface-container)); /* #171f33 */
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-control, 8px);
  font-size: 13.5px;
  color: rgb(var(--c-on-surface-variant));
}

.omnira-pagination-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.omnira-pagination-select {
  background-color: rgb(var(--c-surface-high)) !important; /* #222a3d */
  color: rgb(var(--c-on-surface)) !important;
  border: 1px solid var(--border-hairline) !important;
  border-bottom: 1px solid rgb(var(--c-outline-variant)) !important;
  border-radius: var(--radius-badge, 4px) !important;
  padding: 3px 8px !important;
  font-size: 13px !important;
  font-family: var(--font-mono);
  cursor: pointer;
}

.omnira-pagination-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.omnira-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 30px;
  padding: 0 10px;
  border-radius: var(--radius-badge, 4px);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  background-color: rgb(var(--c-surface-high)); /* #222a3d */
  color: rgb(var(--c-on-surface-variant));
  border: 1px solid var(--border-hairline);
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
  user-select: none;
}

.omnira-page-btn:hover:not(:disabled):not(.is-active) {
  background-color: rgb(var(--c-surface-highest)); /* #2d3449 */
  color: rgb(var(--c-on-surface));
}

.omnira-page-btn.is-active {
  background-color: rgb(var(--c-primary)) !important; /* #c0c1ff */
  color: rgb(var(--c-on-primary)) !important;         /* #1000a9 */
  border-color: transparent !important;
  font-weight: 700;
}

.omnira-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.omnira-page-ellipsis {
  padding: 0 5px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: rgb(var(--c-outline));
  user-select: none;
}

/* ─── Semantic Color Fallbacks ─── */
.text-status-success { color: #4edea3; }
.text-status-warning { color: #fbbf24; }
.text-status-danger,
.text-status-error { color: #f87171; }
.text-status-info { color: #4cd7f6; }
.bg-status-success { background-color: #4edea3; }
.bg-status-warning { background-color: #fbbf24; }
.bg-status-danger,
.bg-status-error { background-color: #f87171; }
.bg-status-info { background-color: #4cd7f6; }

/* ─── Modal Dialog Surface ─── */
.omnira-modal-surface {
  background: rgb(var(--c-surface-bright)); /* #31394d */
  border: 1px solid rgb(var(--c-overlay) / 0.08);
  border-radius: var(--radius-card, 12px);
  box-shadow: var(--shadow-modal);
}

/* ─── Status Pulse Dot (#4edea3 Mint) ─── */
.pulse-dot {
  background-color: #4edea3;
  animation: omnira-pulse 2.2s infinite;
}

@keyframes omnira-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(78, 222, 163, 0.55);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(78, 222, 163, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(78, 222, 163, 0);
  }
}

/* ─── Omnira Fluent Toggle Switch (ON/OFF Pill Switch for Checkboxes) ─── */
.omnira-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  font-weight: 500;
  color: rgb(var(--c-on-surface));
  line-height: 1.45;
}

input[type="checkbox"].omnira-toggle,
input.omnira-toggle,
.omnira-toggle input[type="checkbox"],
.omnira-toggle input {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  display: inline-block;
  width: 44px !important;
  height: 24px !important;
  min-width: 44px !important;
  border-radius: 999px !important;
  background-color: rgb(var(--c-surface-highest)) !important;
  border: 1px solid rgb(var(--c-outline-variant)) !important;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  flex-shrink: 0;
  margin: 0;
  padding: 0 !important;
}

input[type="checkbox"].omnira-toggle::before,
input.omnira-toggle::before,
.omnira-toggle input[type="checkbox"]::before,
.omnira-toggle input::before {
  content: "OFF";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgb(var(--c-outline));
  transition: opacity 150ms ease;
  pointer-events: none;
}

input[type="checkbox"].omnira-toggle::after,
input.omnira-toggle::after,
.omnira-toggle input[type="checkbox"]::after,
.omnira-toggle input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background-color: rgb(var(--c-on-surface-variant));
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.38);
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), background-color 180ms ease;
}

input[type="checkbox"].omnira-toggle:checked,
input.omnira-toggle:checked,
.omnira-toggle input[type="checkbox"]:checked,
.omnira-toggle input:checked {
  background-color: rgba(78, 222, 163, 0.22) !important;
  border-color: #4edea3 !important;
}

input[type="checkbox"].omnira-toggle:checked::before,
input.omnira-toggle:checked::before,
.omnira-toggle input[type="checkbox"]:checked::before,
.omnira-toggle input:checked::before {
  content: "ON";
  left: 7px;
  right: auto;
  color: #4edea3;
}

input[type="checkbox"].omnira-toggle:checked::after,
input.omnira-toggle:checked::after,
.omnira-toggle input[type="checkbox"]:checked::after,
.omnira-toggle input:checked::after {
  transform: translateX(20px);
  background-color: #4edea3;
}

input[type="checkbox"].omnira-toggle.is-cyan:checked,
input.omnira-toggle.is-cyan:checked,
.omnira-toggle.is-cyan input[type="checkbox"]:checked,
.omnira-toggle.is-cyan input:checked {
  background-color: rgba(76, 215, 246, 0.22) !important;
  border-color: #4cd7f6 !important;
}
input[type="checkbox"].omnira-toggle.is-cyan:checked::before,
input.omnira-toggle.is-cyan:checked::before,
.omnira-toggle.is-cyan input[type="checkbox"]:checked::before,
.omnira-toggle.is-cyan input:checked::before {
  color: #4cd7f6;
}
input[type="checkbox"].omnira-toggle.is-cyan:checked::after,
input.omnira-toggle.is-cyan:checked::after,
.omnira-toggle.is-cyan input[type="checkbox"]:checked::after,
.omnira-toggle.is-cyan input:checked::after {
  background-color: #4cd7f6;
}

input[type="checkbox"].omnira-toggle.is-amber:checked,
input.omnira-toggle.is-amber:checked,
.omnira-toggle.is-amber input[type="checkbox"]:checked,
.omnira-toggle.is-amber input:checked {
  background-color: rgba(251, 191, 36, 0.22) !important;
  border-color: #fbbf24 !important;
}
input[type="checkbox"].omnira-toggle.is-amber:checked::before,
input.omnira-toggle.is-amber:checked::before,
.omnira-toggle.is-amber input[type="checkbox"]:checked::before,
.omnira-toggle.is-amber input:checked::before {
  color: #fbbf24;
}
input[type="checkbox"].omnira-toggle.is-amber:checked::after,
input.omnira-toggle.is-amber:checked::after,
.omnira-toggle.is-amber input[type="checkbox"]:checked::after,
.omnira-toggle.is-amber input:checked::after {
  background-color: #fbbf24;
}

input[type="checkbox"].omnira-toggle.is-primary:checked,
input.omnira-toggle.is-primary:checked,
.omnira-toggle.is-primary input[type="checkbox"]:checked,
.omnira-toggle.is-primary input:checked {
  background-color: rgb(var(--c-primary-container) / 0.32) !important;
  border-color: rgb(var(--c-primary)) !important;
}
input[type="checkbox"].omnira-toggle.is-primary:checked::before,
input.omnira-toggle.is-primary:checked::before,
.omnira-toggle.is-primary input[type="checkbox"]:checked::before,
.omnira-toggle.is-primary input:checked::before {
  color: rgb(var(--c-primary));
}
input[type="checkbox"].omnira-toggle.is-primary:checked::after,
input.omnira-toggle.is-primary:checked::after,
.omnira-toggle.is-primary input[type="checkbox"]:checked::after,
.omnira-toggle.is-primary input:checked::after {
  background-color: rgb(var(--c-primary));
}

.omnira-toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-control, 8px);
  background: rgb(var(--c-surface-container));
  border: 1px solid var(--border-hairline);
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.omnira-toggle-card:hover {
  background: rgb(var(--c-surface-high));
}

/* ─── Accessibility: Keyboard Focus & Reduced Motion ─── */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid rgb(var(--c-primary)) !important;
  outline-offset: 2px !important;
}

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

/* ─── Omnira v1.2.9 Mobile Native Shell & Safe-Area Bottom Navigation ─── */
.omnira-mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 45;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  background-color: rgb(var(--c-surface-low)); /* #131b2e */
  border-top: 1px solid var(--border-hairline);
}

.mob-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 4px;
  border-radius: 8px;
  font-size: 10.5px;
  font-weight: 500;
  color: rgb(var(--c-on-surface-variant));
  background: transparent;
  border: 1px solid transparent;
  transition: background-color 140ms ease, color 140ms ease;
}

.mob-nav-btn.active {
  background: rgb(var(--c-primary)); /* #c0c1ff */
  color: rgb(var(--c-on-primary));   /* #1000a9 */
  font-weight: 600;
}

.mob-nav-btn.active .ui-icon {
  stroke: rgb(var(--c-on-primary));
}

@media (max-width: 1023px) {
  body:has(.omnira-mobile-bottom-nav) {
    padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Omnira v1.2.9 Compact 5-Provider Organization Chart (02 · Sơ Đồ Tổ Chức Model & Thông Số)
   Strict 3-Tier Radii (12px / 8px / 4px) & 6% Translucent Hairlines
   Container-Query Aware for both Full-Width Portal (/) and 7-Col Studio (/app)
   ═══════════════════════════════════════════════════════════════════════════ */
.org-chart-shell {
  container-type: inline-size;
  background: #0e1526;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px 14px;
  color: #dae2fd;
  position: relative;
}

/* LEVEL 1: ROOT CONTROL NODE AT TOP OF ORG CHART */
.org-root-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.org-root-card {
  width: 100%;
  background: #141c2f;
  border: 1px solid rgba(192, 193, 255, 0.24);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  transition: border-color 150ms ease, background-color 150ms ease;
}
.org-root-bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.org-root-title {
  font-size: 13px;
  font-weight: 600;
  color: #dae2fd;
  letter-spacing: -0.01em;
}
.spec-tree-node-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(192, 193, 255, 0.15);
  color: #c0c1ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Vertical Stem from Root Card down to Horizontal 5-Provider Crossbar */
.org-root-stem {
  width: 2px;
  height: 14px;
  background: linear-gradient(180deg, rgba(192, 193, 255, 0.6), rgba(192, 193, 255, 0.35));
  position: relative;
}
.org-root-stem::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c0c1ff;
}

/* LEVEL 2: 5-COLUMN PROVIDER ORGANIZATION CHART (Flow | Vids | Dola | MuseAI | Grok) */
.org-branches-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  position: relative;
  padding-top: 14px;
  align-items: start;
}
/* Horizontal Crossbar connecting Column 1 center (10%) -> Column 5 center (90%) */
.org-branches-grid::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  background: rgba(192, 193, 255, 0.32);
}

.org-branch-col {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
}
/* Vertical Stem dropping from Crossbar into each of the 5 Provider Cards */
.org-branch-col::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 14px;
  background: rgba(192, 193, 255, 0.32);
}

/* Provider Branch Header Card (Level 2 Node) */
.org-dept-card {
  position: relative;
  background: #131b2e;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-top: 2px solid #c0c1ff;
  border-radius: 8px;
  padding: 7px 9px;
  cursor: pointer;
  user-select: none;
  min-width: 0;
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}
.org-dept-card.is-cyan-dept {
  border-top-color: #4cd7f6;
}
.org-dept-card.is-emerald-dept {
  border-top-color: #4edea3;
}
.org-dept-card.is-amber-dept {
  border-top-color: #fbbf24;
}
.org-dept-card.is-coral-dept {
  border-top-color: #ffb4ab;
}
.org-dept-card.is-active-dept {
  background: rgba(192, 193, 255, 0.13);
  border-color: rgba(192, 193, 255, 0.48);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.org-dept-card:hover {
  background: #182238;
}
/* Node Connector Dot at top center of Provider Card */
.org-dept-card::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c0c1ff;
  border: 1.5px solid #0e1526;
}
.org-dept-card.is-cyan-dept::before {
  background: #4cd7f6;
}
.org-dept-card.is-emerald-dept::before {
  background: #4edea3;
}
.org-dept-card.is-amber-dept::before {
  background: #fbbf24;
}
.org-dept-card.is-coral-dept::before {
  background: #ffb4ab;
}
.org-dept-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
}
.org-dept-title {
  font-size: 12px;
  font-weight: 600;
  color: #dae2fd;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.org-dept-sub {
  font-size: 10px;
  color: #908fa0;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* LEVEL 3: DROPPED-DOWN CARD WRAPPING MODELS OF THAT PROVIDER */
.org-children-flow {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: relative;
  min-width: 0;
}
.org-sub-stem {
  width: 2px;
  height: 10px;
  margin: 0 auto;
  background: rgba(192, 193, 255, 0.28);
  position: relative;
}
.org-sub-stem.is-cyan {
  background: rgba(76, 215, 246, 0.32);
}
.org-sub-stem.is-emerald {
  background: rgba(78, 222, 163, 0.32);
}
.org-sub-stem.is-amber {
  background: rgba(251, 191, 36, 0.32);
}
.org-sub-stem.is-coral {
  background: rgba(255, 180, 171, 0.35);
}

/* Leaf Card wrapping the Model items inside each Provider column */
.org-leaf-card {
  position: relative;
  background: #151d30;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 7px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.org-leaf-card.is-active-leaf {
  border-color: rgba(192, 193, 255, 0.28);
}

/* Compact Model Item Card inside Provider Leaf Card */
.spec-model-card {
  background: #0b1326;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 6px 7px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  transition: background-color 130ms ease, border-color 130ms ease;
}
.spec-model-card:hover {
  background: #1c253d;
  border-color: rgba(192, 193, 255, 0.26);
}
.spec-model-card.is-selected {
  background: rgba(192, 193, 255, 0.14);
  border-color: #c0c1ff;
}
.spec-model-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
}
.spec-model-card-name {
  font-size: 11px;
  font-weight: 600;
  color: #dae2fd;
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.spec-model-card.is-selected .spec-model-card-name {
  color: #c0c1ff;
}
.spec-model-radio-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}
.spec-model-card.is-selected .spec-model-radio-dot {
  background: #4edea3;
  box-shadow: 0 0 6px rgba(78, 222, 163, 0.8);
}
.spec-model-card-desc {
  font-size: 9.8px;
  color: #908fa0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Duration / Resolution Pricing Pills inside a grouped Model Card (2-column matrix when multiple) */
.spec-variant-pills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 3.5px;
  margin-top: 2px;
}
.spec-variant-pill {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  padding: 2.5px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: "JetBrains Mono", monospace;
  font-size: 9.8px;
  color: #cbd5e1;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.spec-variant-pill:hover {
  background: rgba(192, 193, 255, 0.14);
  border-color: rgba(192, 193, 255, 0.35);
  color: #f8fafc;
}
.spec-variant-pill.is-active {
  background: rgba(192, 193, 255, 0.22);
  border-color: #c0c1ff;
  color: #f8fafc;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(192, 193, 255, 0.35);
}

/* Focused Studio Mode Stage (5 Branch Nodes at Top -> 2-Col Active Branch Models Grid Below) */
.org-studio-stage {
  margin-top: 10px;
  background: #131b2e;
  border: 1px solid rgba(192, 193, 255, 0.22);
  border-radius: 10px;
  padding: 10px;
}
.org-studio-models-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

/* Segmented Pill Control Group (.seg-group & .seg-btn) */
.seg-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  max-width: 100%;
  gap: 3px;
  background: #090e1a;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  padding: 2.5px;
}
.seg-btn {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.02);
  color: #94a3b8;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.25;
  padding: 3.5px 8px !important;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: background-color 130ms ease, color 130ms ease, border-color 130ms ease, box-shadow 130ms ease;
}
.seg-btn:hover {
  color: #f8fafc;
  background: rgba(192, 193, 255, 0.1);
  border-color: rgba(192, 193, 255, 0.25);
}
.seg-btn.is-active {
  background: #c0c1ff !important;
  color: #1000a9 !important;
  font-weight: 700;
  border-color: #c0c1ff !important;
  box-shadow: 0 2px 8px rgba(192, 193, 255, 0.28);
}

/* Compact Parameter Cards inside the Root Node of the Org Chart */
.org-param-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}
.org-param-card {
  background: #0b1326;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 7px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 5px;
  min-width: 0;
}
.org-param-card-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #908fa0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

/* Container Queries for Narrow Containers (e.g., 7-col Studio Panel or Tablet) */
@container (max-width: 1120px) {
  .org-param-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .org-branches-grid.is-full-5col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .org-branches-grid.is-full-5col::before {
    display: none;
  }
}

@container (max-width: 760px) {
  .org-param-cards-grid {
    grid-template-columns: 1fr;
  }
  .org-branches-grid.is-full-5col,
  .org-branches-grid.is-studio-5nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .org-branches-grid::before {
    display: none;
  }
  .org-studio-models-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1150px) {
  .org-branches-grid.is-full-5col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .org-branches-grid.is-full-5col::before {
    display: none;
  }
}
@media (max-width: 680px) {
  .org-branches-grid {
    grid-template-columns: 1fr !important;
  }
  .org-branches-grid::before {
    display: none;
  }
}

/* Simplified customer UI: keep the floating support button clear of the mobile bottom nav + sticky submit bar */
@media (max-width: 1023px) {
  body:has(.omnira-mobile-bottom-nav) #lp-support-launcher-btn {
    bottom: calc(136px + env(safe-area-inset-bottom, 0px)) !important;
    right: 14px !important;
    z-index: 60 !important;
  }
  body:has(.omnira-mobile-bottom-nav) #lp-support-chat-panel {
    bottom: calc(196px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 61 !important;
  }
  body:has(#cust-tab-studio:not(.hidden)) { padding-bottom: calc(140px + env(safe-area-inset-bottom, 0px)); }
}

/* Light theme overrides for .org-chart-shell so pricing org tree adapts cleanly */
[data-theme="light"] .org-chart-shell {
  background: rgb(var(--c-surface-container));
  border-color: var(--border-hairline);
  color: rgb(var(--c-on-surface));
}
[data-theme="light"] .org-root-card,
[data-theme="light"] .org-dept-card,
[data-theme="light"] .org-leaf-card,
[data-theme="light"] .org-studio-stage {
  background: rgb(var(--c-surface-lowest));
  border-color: var(--border-hairline);
}
[data-theme="light"] .org-dept-card::before {
  border-color: rgb(var(--c-surface-container));
}
[data-theme="light"] .org-dept-card:hover,
[data-theme="light"] .spec-model-card:hover {
  background: rgb(var(--c-surface-high));
}
[data-theme="light"] .spec-model-card,
[data-theme="light"] .org-param-card,
[data-theme="light"] .seg-group {
  background: rgb(var(--c-surface-low));
  border-color: var(--border-hairline);
}
[data-theme="light"] .org-root-title,
[data-theme="light"] .org-dept-title,
[data-theme="light"] .spec-model-card-name {
  color: rgb(var(--c-on-surface));
}
[data-theme="light"] .org-dept-sub,
[data-theme="light"] .spec-model-card-desc,
[data-theme="light"] .org-param-card-label,
[data-theme="light"] .seg-btn {
  color: rgb(var(--c-on-surface-variant));
}
[data-theme="light"] .spec-variant-pill {
  background: rgb(var(--c-surface-lowest));
  border-color: var(--border-hairline);
  color: rgb(var(--c-on-surface));
}
[data-theme="light"] .spec-variant-pill.is-active,
[data-theme="light"] .spec-model-card.is-selected .spec-model-card-name {
  color: rgb(var(--c-primary));
}
#studio-advanced-options > summary::-webkit-details-marker { display: none; }
@media (min-width: 1024px) {
  #cust-mobile-nav, #studio-mobile-submit-bar { display: none !important; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   Omnira Studio v1.2.9 — Authentication Suite & Google reCAPTCHA Primitives
   ═══════════════════════════════════════════════════════════════════════════ */

.omnira-auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  background: rgb(var(--c-surface-lowest));
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-control, 8px);
}

.omnira-auth-tabs.is-3col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.omnira-auth-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: var(--radius-control, 8px);
  border: 1px solid transparent;
  background: transparent;
  color: rgb(var(--c-on-surface-variant));
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
  white-space: nowrap;
}

.omnira-auth-tab:hover:not(.is-active) {
  background: rgb(var(--c-surface-high));
  color: rgb(var(--c-on-surface));
}

.omnira-auth-tab.is-active {
  background: rgb(var(--c-primary)) !important;
  color: rgb(var(--c-on-primary)) !important;
  font-weight: 600;
}

.omnira-auth-tab.is-active .ui-icon,
.omnira-auth-tab.is-active .ui-icon-sm {
  stroke: rgb(var(--c-on-primary));
}

.omnira-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.omnira-input-wrap .omnira-input-icon {
  position: absolute;
  left: 11px;
  width: 16px;
  height: 16px;
  color: rgb(var(--c-outline));
  pointer-events: none;
  z-index: 2;
}

.omnira-input-wrap input.has-leading-icon {
  padding-left: 36px !important;
}

.omnira-input-wrap input.has-trailing-btn {
  padding-right: 38px !important;
}

.omnira-pwd-toggle {
  position: absolute;
  right: 6px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-badge, 4px);
  border: 0;
  background: transparent;
  color: rgb(var(--c-outline));
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}

.omnira-pwd-toggle:hover {
  background: rgb(var(--c-surface-high));
  color: rgb(var(--c-on-surface));
}

.omnira-pwd-meter {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin-top: 6px;
}

.omnira-pwd-bar {
  height: 3px;
  border-radius: var(--radius-badge, 4px);
  background: rgb(var(--c-surface-high));
  transition: background-color 160ms ease;
}

.omnira-pwd-bar.is-weak { background: #f87171; }
.omnira-pwd-bar.is-fair { background: #fbbf24; }
.omnira-pwd-bar.is-good { background: #4cd7f6; }
.omnira-pwd-bar.is-strong { background: #4edea3; }

/* Google reCAPTCHA Container — Omnira Recessed Security Well */
.omnira-recaptcha-box {
  background: rgb(var(--c-surface-lowest));
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-control, 8px);
  padding: 10px 12px;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.omnira-recaptcha-box.is-verified {
  border-color: rgba(78, 222, 163, 0.34);
  background: rgba(78, 222, 163, 0.04);
}

.omnira-recaptcha-box.is-error {
  border-color: rgba(248, 113, 113, 0.48);
  background: rgba(248, 113, 113, 0.06);
}

.omnira-recaptcha-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 78px;
  margin-top: 8px;
  overflow: hidden;
}

@media (max-width: 375px) {
  .omnira-recaptcha-stage > div {
    transform: scale(0.88);
    transform-origin: center center;
  }
}

.omnira-auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 12px;
  border-radius: var(--radius-control, 8px);
  font-size: 12.5px;
  line-height: 1.5;
  border: 1px solid var(--border-hairline);
}

.omnira-auth-alert.is-error {
  background: rgba(248, 113, 113, 0.10);
  border-color: rgba(248, 113, 113, 0.35);
  color: #f87171;
}

.omnira-auth-alert.is-warn {
  background: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.28);
  color: #fbbf24;
}

.omnira-auth-alert.is-success {
  background: rgba(78, 222, 163, 0.08);
  border-color: rgba(78, 222, 163, 0.28);
  color: #4edea3;
}

.omnira-auth-alert.is-info {
  background: rgb(var(--c-primary-container) / 0.14);
  border-color: rgb(var(--c-primary) / 0.30);
  color: rgb(var(--c-on-surface));
}

/* ============================================================================
   Seedance Cloner & Motion Control Workbench — Omnira Fluent v1.2.9
   ============================================================================ */
.studio-mode-switcher {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  background: rgb(var(--c-surface-lowest));
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-control, 8px);
}

.studio-mode-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  color: rgb(var(--c-on-surface-variant));
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.studio-mode-tab:hover {
  color: rgb(var(--c-on-surface));
  background: rgba(255, 255, 255, 0.03);
}

.studio-mode-tab.is-active {
  color: #c0c1ff;
  background: rgb(var(--c-surface-high));
  border-color: rgba(192, 193, 255, 0.28);
}

.studio-mode-badge {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: var(--radius-badge, 4px);
  background: rgba(78, 222, 163, 0.12);
  color: #4edea3;
  letter-spacing: 0.04em;
}

.cloner-matrix-frame {
  background: rgb(var(--c-surface-lowest));
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-card, 12px);
  overflow: hidden;
}

.cloner-scene-card,
.motion-seg-card {
  background: rgb(var(--c-surface-lowest));
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-control, 8px);
  padding: 10px 12px;
  transition: border-color 150ms ease;
}

.cloner-scene-card:hover,
.motion-seg-card:hover {
  border-color: rgba(192, 193, 255, 0.22);
}

.motion-waveform-shell {
  position: relative;
  height: 76px;
  padding: 8px 6px;
  background: rgb(var(--c-surface-lowest));
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-control, 8px);
  display: flex;
  align-items: flex-end;
  gap: 1.5px;
  overflow: hidden;
  cursor: crosshair;
  user-select: none;
}

.motion-wave-bar {
  flex: 1 1 0;
  min-width: 1px;
  background: rgba(192, 193, 255, 0.42);
  border-radius: 2px 2px 0 0;
  transition: background-color 120ms ease;
}

.motion-wave-bar:hover,
.motion-wave-bar.is-active {
  background: #4edea3;
}

.motion-cut-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  pointer-events: none;
  z-index: 4;
}

.motion-cut-line.is-scene {
  background: #fbbf24;
}

.motion-cut-line.is-pause,
.motion-cut-line.is-manual,
.motion-cut-line.is-forced {
  background: #4cd7f6;
}

.motion-cut-cursor {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #f87171;
  pointer-events: none;
  z-index: 5;
}

.motion-dual-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 640px) {
  .studio-mode-switcher {
    grid-template-columns: 1fr;
  }
  .motion-dual-compare {
    grid-template-columns: 1fr;
  }
}
