html[data-asistan-theme="light"] {
  color-scheme: light;
  --bg: #f5f8f7;
  --bg-2: #edf3f1;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-2: rgba(7, 94, 84, 0.06);
  --panel-solid: #ffffff;
  --elev: #e7efec;
  --text: #10211c;
  --text-2: #304b42;
  --muted: #61766f;
  --faint: #7c8e88;
  --border: rgba(16, 55, 43, 0.12);
  --border-2: rgba(16, 55, 43, 0.22);
  --shadow: 0 18px 50px -12px rgba(20, 55, 44, 0.18);
  --shadow-sm: 0 6px 20px -6px rgba(20, 55, 44, 0.14);
  --pa-bg: #f5f8f7;
  --pa-bg-soft: #edf3f1;
  --pa-panel: #ffffff;
  --pa-text: #10211c;
  --pa-muted: #61766f;
  --pa-border: rgba(16, 55, 43, 0.12);
  --pa-glass: rgba(255, 255, 255, 0.82);
  --pa-recv: #ffffff;
  --pa-sent: #d9fdd3;
}

html[data-asistan-theme="light"] body::before {
  background: radial-gradient(ellipse 70% 50% at 12% -8%, rgba(37, 211, 102, 0.11), transparent 55%), radial-gradient(ellipse 55% 45% at 92% 6%, rgba(7, 94, 84, 0.1), transparent 52%);
}

html[data-asistan-theme="light"] .pa-header,
html[data-asistan-theme="light"] .sidebar {
  background: rgba(250, 253, 252, 0.93);
}

html[data-asistan-theme="light"] .nav-link.is-active { color: #075e54; }
html[data-asistan-theme="light"] .conv-side { background: rgba(237, 243, 241, 0.82); }
html[data-asistan-theme="light"] .impersonation-bar-text strong { color: #7c4a03; }
html[data-asistan-theme="light"] .alert--info,
html[data-asistan-theme="light"] .banner { color: #075985; }
html[data-asistan-theme="light"] .alert--error,
html[data-asistan-theme="light"] .bubble--err,
html[data-asistan-theme="light"] .st-err,
html[data-asistan-theme="light"] .intg-msg.err { color: #b91c1c; }
html[data-asistan-theme="light"] .badge--connected,
html[data-asistan-theme="light"] .connected-title,
html[data-asistan-theme="light"] .st-ok,
html[data-asistan-theme="light"] .intg-msg.ok { color: #166534; }

html[data-asistan-theme="light"] .card,
html[data-asistan-theme="light"] .stat,
html[data-asistan-theme="light"] .pa-feature-card,
html[data-asistan-theme="light"] .pa-review,
html[data-asistan-theme="light"] .pa-flow__step,
html[data-asistan-theme="light"] .pa-apply__card,
html[data-asistan-theme="light"] .pa-cta__inner {
  box-shadow: 0 18px 48px rgba(20, 55, 44, 0.1);
}

html[data-asistan-theme="light"] .pa-dash,
html[data-asistan-theme="light"] .pa-phone,
html[data-asistan-theme="light"] .auth__aside {
  color: #e9edef;
}

html[data-asistan-theme="light"] .input,
html[data-asistan-theme="light"] .pa-input,
html[data-asistan-theme="light"] .textarea,
html[data-asistan-theme="light"] .select,
html[data-asistan-theme="light"] code,
html[data-asistan-theme="light"] .credbox {
  background: #ffffff;
  color: var(--text, #10211c);
}

.as-prefs {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text, var(--pa-text, #e9edef));
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.76rem;
  line-height: 1;
  z-index: 110;
}

.as-prefs select,
.as-prefs__theme {
  height: 36px;
  border: 1px solid var(--border, var(--pa-border, rgba(134,150,160,.25)));
  border-radius: 999px;
  color: inherit;
  background: var(--panel, var(--pa-glass, rgba(17,27,33,.84)));
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.as-prefs select { min-width: 54px; padding: 0 1.55rem 0 0.72rem; }
.as-prefs__theme { display: inline-flex; align-items: center; gap: 0.38rem; padding: 0 0.72rem; }
.as-prefs__theme:hover, .as-prefs select:hover { border-color: var(--green, var(--pa-wa, #25d366)); }
.as-prefs__theme-icon { width: 14px; height: 14px; border-radius: 50%; background: currentColor; box-shadow: inset -4px -2px 0 var(--panel, var(--pa-glass, #111b21)); }
html[data-asistan-theme="light"] .as-prefs__theme-icon { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.16); }
.as-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.as-prefs--landing-mobile { display: none; }
.as-prefs--auth { position: absolute; top: 1.2rem; right: 1.2rem; }
.auth__main { position: relative; }
.as-prefs--panel { width: 100%; margin-bottom: 0.65rem; justify-content: center; }
.as-prefs--subpage { margin-right: 0.3rem; }
.as-prefs--floating { position: fixed; top: 1rem; right: 1rem; }
.as-prefs select option { color: var(--text, #e9edef); background: var(--panel-solid, #1b2730); }
.as-prefs select:focus-visible,
.as-prefs__theme:focus-visible { outline: none; box-shadow: var(--ring, 0 0 0 3px rgba(37,211,102,.22)); }

.as-mobile-menu {
  display: none;
  width: 44px;
  height: 44px;
  flex: none;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text);
  background: var(--panel-2);
  cursor: pointer;
}
.as-mobile-menu > span[aria-hidden="true"],
.as-mobile-menu > span[aria-hidden="true"]::before,
.as-mobile-menu > span[aria-hidden="true"]::after {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .18s ease, opacity .18s ease;
}
.as-mobile-menu > span[aria-hidden="true"] { position: relative; }
.as-mobile-menu > span[aria-hidden="true"]::before,
.as-mobile-menu > span[aria-hidden="true"]::after { content: ""; position: absolute; left: 0; }
.as-mobile-menu > span[aria-hidden="true"]::before { top: -6px; }
.as-mobile-menu > span[aria-hidden="true"]::after { top: 6px; }
.sidebar.is-menu-open .as-mobile-menu > span[aria-hidden="true"] { background: transparent; }
.sidebar.is-menu-open .as-mobile-menu > span[aria-hidden="true"]::before { top: 0; transform: rotate(45deg); }
.sidebar.is-menu-open .as-mobile-menu > span[aria-hidden="true"]::after { top: 0; transform: rotate(-45deg); }

.input:invalid:not(:placeholder-shown),
.textarea:invalid:not(:placeholder-shown),
.select:invalid:not(:placeholder-shown) { border-color: rgba(248,113,113,.72); }
.field-error { display: block; margin-top: .35rem; color: var(--red, #f87171); font-size: .78rem; font-weight: 600; }
.btn[aria-busy="true"], .is-loading .btn { cursor: progress; }
.btn[aria-busy="true"] { opacity: .72; }
.modal-backdrop[aria-hidden="true"] { display: none; }
.modal:focus { outline: none; }

.modal,
.card,
.table td,
.table th,
.bubble,
.toast,
.alert { overflow-wrap: anywhere; }

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

@media (max-width: 860px) {
  .sidebar { flex-wrap: wrap; align-content: flex-start; }
  .sidebar__brand { flex: 1 1 auto; }
  .as-mobile-menu { display: grid; }
  .sidebar .sidebar__nav,
  .sidebar .sidebar__foot { display: none; width: 100%; flex: 0 0 100%; }
  .sidebar.is-menu-open .sidebar__nav { display: flex; flex-direction: column; align-items: stretch; overflow: visible; padding: .55rem 0 .25rem; }
  .sidebar.is-menu-open .sidebar__foot { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; padding: .65rem 0 .25rem; border-top: 1px solid var(--border); }
  .sidebar.is-menu-open .nav-link { width: 100%; min-height: 44px; justify-content: flex-start; }
  .sidebar.is-menu-open .nav-link span { display: inline; }
  .sidebar.is-menu-open .sidebar__foot .btn { flex: 1 1 150px; min-height: 44px; }
  .sidebar.is-menu-open .as-prefs--panel { width: auto; margin: 0 auto 0 0; }
  .as-prefs--panel .as-prefs__theme-label { display: inline; }
  .as-prefs--panel select { min-width: 54px; }
  .as-prefs select,
  .as-prefs__theme { min-height: 44px; }
  .nav-link,
  .sidebar__foot .btn { min-width: 44px; min-height: 44px; justify-content: center; }
}

@media (min-width: 861px) and (max-width: 1120px) {
  body.panel-page .sidebar { flex-wrap: wrap; align-content: flex-start; }
  body.panel-page .sidebar__brand { flex: 1 1 auto; }
  body.panel-page .as-mobile-menu { display: grid; }
  body.panel-page .sidebar .sidebar__nav,
  body.panel-page .sidebar .sidebar__foot { display: none; width: 100%; flex: 0 0 100%; }
  body.panel-page .sidebar.is-menu-open .sidebar__nav { display: flex; flex-direction: column; align-items: stretch; overflow: visible; padding: .55rem 0 .25rem; }
  body.panel-page .sidebar.is-menu-open .sidebar__foot { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; padding: .65rem 0 .25rem; border-top: 1px solid var(--border); }
  body.panel-page .sidebar.is-menu-open .nav-link { width: 100%; justify-content: flex-start; }
  body.panel-page .sidebar.is-menu-open .nav-link span,
  body.panel-page .sidebar.is-menu-open .as-prefs__theme-label { display: inline; }
}

@media (max-width: 768px) {
  .as-prefs--landing-desktop { display: none; }
  .as-prefs--landing-mobile { display: inline-flex; width: 100%; justify-content: center; padding: 0.55rem 0 0.15rem; }
}

@media (max-width: 560px) {
  .as-prefs--auth { top: 0.75rem; right: 0.75rem; }
  .as-prefs--subpage { width: 100%; justify-content: flex-end; margin-bottom: 0.4rem; }
  .as-prefs__theme-label { display: none; }
  .modal-backdrop { padding: .65rem; }
  .modal { width: 100%; max-height: calc(100dvh - 1.3rem); }
  .modal-actions, .modal__foot { flex-wrap: wrap; }
  .modal-actions .btn, .modal__foot .btn { flex: 1 1 140px; min-height: 44px; }
  .toast-wrap { inset: auto .75rem .75rem; }
  .toast { width: 100%; max-width: none; }
  .subpage { width: min(100% - 1.25rem, 1080px); padding-top: 1rem; }
  .subpage__bar, .subpage__actions { align-items: stretch; }
  .subpage__actions { width: 100%; }
  .subpage__actions .btn { flex: 1 1 150px; }
  .input,
  .pa-input,
  select,
  textarea,
  button,
  .btn { min-height: 44px; }
}
