/* olApp V1.14 · Temas claro, oscuro y automático */
:root {
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111b21;
  --panel: #202c33;
  --panel-muted: #182229;
  --text: #e9edef;
  --muted: #8696a0;
  --border: #374248;
  --primary: #e9edef;
  --primary-dark: #ffffff;
  --primary-soft: #182229;
  --accent: #25d366;
  --accent-dark: #20bd5a;
  --accent-soft: #103d2a;
  --success: #25d366;
  --warning: #f7b955;
  --danger: #ff6b6b;
  --sidebar: #0b141a;
  --sidebar-strong: #071015;
  --sidebar-muted: #aebac1;
  --shadow: 0 22px 55px rgba(0, 0, 0, .28);
  --shadow-soft: 0 10px 28px rgba(0, 0, 0, .20);
}

html[data-theme="dark"],
html[data-theme="dark"] body,
html[data-theme="dark"] .app-shell,
html[data-theme="dark"] .app-main {
  background: var(--bg);
  color: var(--text);
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] dialog,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .metric-card,
html[data-theme="dark"] .button-secondary,
html[data-theme="dark"] .icon-button,
html[data-theme="dark"] .status-badge,
html[data-theme="dark"] .auth-card {
  border-color: var(--border);
  background: var(--panel);
  color: var(--text);
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #73828b;
}

html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] .auth-brand strong {
  color: var(--text);
}

html[data-theme="dark"] .button-secondary:hover,
html[data-theme="dark"] .icon-button:hover {
  border-color: #56636a;
  background: #293740;
}

html[data-theme="dark"] .metric-mark,
html[data-theme="dark"] .integration-head,
html[data-theme="dark"] .toggle-row,
html[data-theme="dark"] .settings-profile-card,
html[data-theme="dark"] .setting-choice-row,
html[data-theme="dark"] .scheduled-item,
html[data-theme="dark"] .transfer-preview,
html[data-theme="dark"] .internal-note-form textarea {
  border-color: var(--border);
  background: var(--panel-muted);
}

html[data-theme="dark"] .setting-choice-row:hover,
html[data-theme="dark"] .setting-choice-row:has(input:checked) {
  border-color: #25d366;
  background: #103d2a;
}

html[data-theme="dark"] .volume-control,
html[data-theme="dark"] .internal-note-item {
  border-color: var(--border);
  background: var(--panel);
}

html[data-theme="dark"] .auth-body {
  background:
    radial-gradient(circle at 10% 5%, rgba(37, 211, 102, .10), transparent 28%),
    linear-gradient(135deg, #0b141a 0%, #111b21 100%);
}

html[data-theme="dark"] .auth-showcase {
  border-color: var(--border);
  background: #0b141a;
}

html[data-theme="dark"] .auth-showcase img {
  opacity: .88;
}

html[data-theme="dark"] .auth-trust span {
  border-color: #245b43;
  background: #103d2a;
  color: #85e6ae;
}

/* Bandeja */
html[data-theme="dark"] .inbox-shell,
html[data-theme="dark"] .chat-column,
html[data-theme="dark"] .empty-state {
  background: #0b141a;
}

html[data-theme="dark"] .conversation-column,
html[data-theme="dark"] .conversation-list,
html[data-theme="dark"] .conversation-item {
  border-color: var(--border);
  background: #111b21;
}

html[data-theme="dark"] .conversation-column-header,
html[data-theme="dark"] .chat-header,
html[data-theme="dark"] .message-composer,
html[data-theme="dark"] .contact-column {
  border-color: var(--border);
  background: #202c33;
}

html[data-theme="dark"] .conversation-search {
  border-color: transparent;
  background: #202c33;
}

html[data-theme="dark"] .conversation-search input {
  background: transparent;
}

html[data-theme="dark"] .conversation-item::after {
  background: #222d34;
}

html[data-theme="dark"] .conversation-item:hover {
  background: #202c33;
}

html[data-theme="dark"] .conversation-item.active,
html[data-theme="dark"] .conversation-item.unread.active {
  background: #2a3942;
}

html[data-theme="dark"] .conversation-item.unread {
  background: #15231d;
}

html[data-theme="dark"] .conversation-name,
html[data-theme="dark"] .chat-header h2,
html[data-theme="dark"] .message-document-copy strong,
html[data-theme="dark"] .conversation-empty-list strong {
  color: #e9edef;
}

html[data-theme="dark"] .conversation-snippet,
html[data-theme="dark"] .conversation-time,
html[data-theme="dark"] .conversation-agent,
html[data-theme="dark"] .chat-header .muted,
html[data-theme="dark"] .conversation-empty-list,
html[data-theme="dark"] .message-document-copy span,
html[data-theme="dark"] .message-document-copy small {
  color: #8696a0;
}

html[data-theme="dark"] .filter-chip,
html[data-theme="dark"] .quick-replies button,
html[data-theme="dark"] .chat-actions select {
  border-color: var(--border);
  background: #202c33;
  color: #d6dde1;
}

html[data-theme="dark"] .filter-chip:hover,
html[data-theme="dark"] .quick-replies button:hover {
  background: #2a3942;
}

html[data-theme="dark"] .filter-chip.active {
  border-color: #245b43;
  background: #103d2a;
  color: #7be3a7;
}

html[data-theme="dark"] .messages-list {
  background-color: #0b141a;
  background-blend-mode: soft-light;
  filter: none;
}

html[data-theme="dark"] .message-row.contact .message-bubble {
  background: #202c33;
  color: #e9edef;
}

html[data-theme="dark"] .message-row.agent .message-bubble {
  background: #005c4b;
  color: #e9edef;
}

html[data-theme="dark"] .message-meta,
html[data-theme="dark"] .message-meta-time,
html[data-theme="dark"] .voice-duration {
  color: #aebac1;
}

html[data-theme="dark"] .message-day-separator span {
  border: 1px solid #2d3940;
  background: #182229;
  color: #d6dde1;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .25);
}

html[data-theme="dark"] .message-composer textarea,
html[data-theme="dark"] .composer-tools,
html[data-theme="dark"] .composer-draft-preview,
html[data-theme="dark"] .recording-preview,
html[data-theme="dark"] .emoji-picker,
html[data-theme="dark"] .attach-menu {
  border-color: var(--border);
  background: #2a3942;
  color: #e9edef;
}

html[data-theme="dark"] .composer-tool,
html[data-theme="dark"] .chat-icon-button {
  color: #aebac1;
}

html[data-theme="dark"] .composer-tool:hover,
html[data-theme="dark"] .composer-tool.active,
html[data-theme="dark"] .chat-icon-button:hover,
html[data-theme="dark"] .attach-menu-item:hover,
html[data-theme="dark"] .emoji-picker button:hover {
  background: #374248;
}

html[data-theme="dark"] .attach-menu-item {
  color: #e9edef;
}

html[data-theme="dark"] .emoji-picker button {
  background: #202c33;
}

html[data-theme="dark"] .composer-image-preview {
  background: #111b21;
}

html[data-theme="dark"] .message-document {
  border-color: #3d4a51;
  background: rgba(17, 27, 33, .42);
}

html[data-theme="dark"] .message-document-download {
  color: #7be3a7;
}

html[data-theme="dark"] .contact-column .panel {
  background: #111b21;
}

html[data-theme="dark"] .inline-message {
  background: #24343c;
  color: #d6dde1;
}

html[data-theme="dark"] .inline-message.success {
  background: #103d2a;
  color: #8ce8b4;
}

html[data-theme="dark"] .inline-message.error {
  background: #4a2024;
  color: #ffb4b4;
}

html[data-theme="dark"] .inline-message.info {
  background: #183446;
  color: #9ed6f5;
}

/* Settings theme cards */
html[data-theme="dark"] .theme-choice-card {
  background: #182229;
}

html[data-theme="dark"] .theme-choice-card:has(input:checked) {
  background: #103d2a;
}

/* Native controls */
html[data-theme="dark"] select option {
  background: #202c33;
  color: #e9edef;
}

html[data-theme="dark"] ::selection {
  background: rgba(37, 211, 102, .32);
}

@media (prefers-reduced-motion: no-preference) {
  html,
  body,
  .app-main,
  .conversation-column,
  .chat-column,
  .chat-header,
  .message-composer,
  .panel,
  input,
  textarea,
  select {
    transition: background-color .18s ease, color .18s ease, border-color .18s ease;
  }
}

/* olApp V1.14.1 · Corrección de contraste y especificidad en modo oscuro */
html[data-theme="dark"] .inbox-shell {
  --wa-surface: #111b21;
  --wa-panel: #202c33;
  --wa-divider: #222d34;
  --wa-text: #e9edef;
  --wa-muted: #8696a0;
  --wa-chat-bg: #0b141a;
  --wa-green-soft: #005c4b;
  --wa-blue-check: #53bdeb;
}

/* Encabezado y panel de búsqueda */
html[data-theme="dark"] body .conversation-column,
html[data-theme="dark"] body .conversation-list {
  background: #111b21;
  color: #e9edef;
}

html[data-theme="dark"] body .conversation-column-header {
  border-bottom-color: #374248;
  background: #202c33;
}

html[data-theme="dark"] body .conversation-column-header h1,
html[data-theme="dark"] body .conversation-column-header .eyebrow {
  color: #e9edef;
}

html[data-theme="dark"] body .conversation-search {
  border-color: #2f3b42;
  background: #2a3942;
}

html[data-theme="dark"] body .conversation-search input,
html[data-theme="dark"] body .conversation-search svg,
html[data-theme="dark"] body .conversation-search-meta {
  color: #aebac1;
  stroke: #aebac1;
}

/* La franja de filtros no debe quedar blanca */
html[data-theme="dark"] body .filters {
  border-bottom-color: #222d34;
  background: #111b21;
}

html[data-theme="dark"] body .filters .filter-chip {
  border-color: #374248;
  background: #202c33;
  color: #d6dde1;
}

html[data-theme="dark"] body .filters .filter-chip:hover {
  border-color: #46545c;
  background: #2a3942;
}

html[data-theme="dark"] body .filters .filter-chip.active {
  border-color: #245b43;
  background: #103d2a;
  color: #7be3a7;
}

/* Conversaciones: fuerza contraste aun en estados unread/active */
html[data-theme="dark"] body .conversation-item {
  border-color: #222d34;
  background: #111b21;
  color: #e9edef;
}

html[data-theme="dark"] body .conversation-item:hover {
  background: #182229;
}

html[data-theme="dark"] body .conversation-item.active,
html[data-theme="dark"] body .conversation-item.unread.active {
  background: #2a3942;
  box-shadow: inset 3px 0 0 #00a884;
}

html[data-theme="dark"] body .conversation-item.unread {
  background: #112019;
}

html[data-theme="dark"] body .conversation-item.unread:hover {
  background: #182b22;
}

html[data-theme="dark"] body .conversation-item .conversation-name,
html[data-theme="dark"] body .conversation-item.unread .conversation-name,
html[data-theme="dark"] body .conversation-item.active .conversation-name,
html[data-theme="dark"] body .conversation-item.unread.active .conversation-name {
  color: #e9edef;
}

html[data-theme="dark"] body .conversation-item .conversation-snippet,
html[data-theme="dark"] body .conversation-item.unread .conversation-snippet,
html[data-theme="dark"] body .conversation-item.active .conversation-snippet,
html[data-theme="dark"] body .conversation-item.unread.active .conversation-snippet,
html[data-theme="dark"] body .conversation-item .conversation-agent {
  color: #aebac1;
}

html[data-theme="dark"] body .conversation-item.unread .conversation-name,
html[data-theme="dark"] body .conversation-item.unread .conversation-snippet {
  font-weight: 760;
}

html[data-theme="dark"] body .conversation-item.unread .conversation-time {
  color: #25d366;
}

html[data-theme="dark"] body .conversation-item::after {
  background: #222d34;
}

html[data-theme="dark"] body .conversation-channel-dot {
  border-color: #111b21;
}

html[data-theme="dark"] body .status-pill,
html[data-theme="dark"] body .conversation-item .status-pill {
  border-color: #245b43;
  background: #103d2a;
  color: #7be3a7;
}

/* Encabezado del chat */
html[data-theme="dark"] body .chat-header {
  border-bottom-color: #374248;
  background: #202c33;
}

html[data-theme="dark"] body .chat-header h2 {
  color: #e9edef;
}

html[data-theme="dark"] body .chat-header .muted {
  color: #aebac1;
}

html[data-theme="dark"] body .chat-actions select,
html[data-theme="dark"] body #transfer-button {
  border-color: #374248;
  background: #2a3942;
  color: #e9edef;
}

html[data-theme="dark"] body #transfer-button:hover {
  background: #374248;
}

/* Fondo y burbujas */
html[data-theme="dark"] body .messages-list {
  background-color: #0b141a;
  background-image:
    radial-gradient(circle at 18px 18px, rgba(134, 150, 160, .04) 1.5px, transparent 1.7px),
    radial-gradient(circle at 42px 42px, rgba(134, 150, 160, .025) 1.2px, transparent 1.5px),
    linear-gradient(45deg, rgba(255,255,255,.018) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.018) 75%);
}

html[data-theme="dark"] body .message-row.contact .message-bubble {
  background: #202c33;
  color: #e9edef;
}

html[data-theme="dark"] body .message-row.agent .message-bubble {
  background: #005c4b;
  color: #e9edef;
}

html[data-theme="dark"] body .message-image figcaption,
html[data-theme="dark"] body .message-content,
html[data-theme="dark"] body .message-text {
  color: #e9edef;
}

html[data-theme="dark"] body .message-meta,
html[data-theme="dark"] body .message-meta-time,
html[data-theme="dark"] body .voice-duration {
  color: #aebac1;
}

html[data-theme="dark"] body .message-day-separator span {
  border-color: #374248;
  background: #182229;
  color: #d6dde1;
}

/* Compositor */
html[data-theme="dark"] body .message-composer {
  border-top-color: #374248;
  background: #202c33;
}

html[data-theme="dark"] body .message-composer .composer-tools,
html[data-theme="dark"] body .message-composer textarea {
  border-color: #2a3942;
  background: #2a3942;
  color: #e9edef;
}

html[data-theme="dark"] body .message-composer textarea::placeholder {
  color: #8696a0;
}

html[data-theme="dark"] body .quick-replies button {
  border-color: #374248;
  background: #2a3942;
  color: #d6dde1;
}

html[data-theme="dark"] body .quick-replies button:hover {
  background: #374248;
}

html[data-theme="dark"] body .attach-menu,
html[data-theme="dark"] body .emoji-picker,
html[data-theme="dark"] body .composer-draft-preview,
html[data-theme="dark"] body .recording-preview {
  border-color: #374248;
  background: #233139;
  color: #e9edef;
}

html[data-theme="dark"] body .attach-menu-item {
  color: #e9edef;
}

html[data-theme="dark"] body .attach-menu-item:hover,
html[data-theme="dark"] body .emoji-picker button:hover {
  background: #374248;
}

html[data-theme="dark"] body .emoji-picker button {
  background: #202c33;
  color: #e9edef;
}

/* Tarjetas de medios */
html[data-theme="dark"] body .message-document,
html[data-theme="dark"] body .message-row.contact .message-document,
html[data-theme="dark"] body .message-attachment-error {
  border-color: #3d4a51;
  background: rgba(17, 27, 33, .55);
  color: #e9edef;
}

html[data-theme="dark"] body .message-document-icon {
  background: #202c33;
}

html[data-theme="dark"] body .message-document-copy strong,
html[data-theme="dark"] body .message-document-copy span {
  color: #e9edef;
}

html[data-theme="dark"] body .message-document-copy small {
  color: #aebac1;
}

/* Panel derecho y estados vacíos */
html[data-theme="dark"] body .contact-column,
html[data-theme="dark"] body .contact-column .panel {
  border-color: #374248;
  background: #111b21;
  color: #e9edef;
}

html[data-theme="dark"] body .empty-state h2 {
  color: #e9edef;
}

html[data-theme="dark"] body .empty-state .muted {
  color: #aebac1;
}

/* Inputs y tarjetas generales con selectores más específicos */
html[data-theme="dark"] body .panel,
html[data-theme="dark"] body .metric-card,
html[data-theme="dark"] body .settings-profile-card,
html[data-theme="dark"] body .theme-choice-card,
html[data-theme="dark"] body .setting-choice-row {
  border-color: #374248;
  background: #182229;
  color: #e9edef;
}

html[data-theme="dark"] body input,
html[data-theme="dark"] body textarea,
html[data-theme="dark"] body select {
  border-color: #374248;
  background: #202c33;
  color: #e9edef;
}


/* V1.16 · organización en modo oscuro */
html[data-theme="dark"] .conversation-advanced-filters select,
html[data-theme="dark"] .organization-field select,
html[data-theme="dark"] .create-label-form input:not([type="color"]),
html[data-theme="dark"] .create-label-form input[type="color"] {
  border-color: #34434c;
  background: #202c33;
  color: #e9edef;
}

html[data-theme="dark"] .advanced-filter-clear,
html[data-theme="dark"] .conversation-list-label-more {
  background: #202c33;
  color: #aebac1;
}

html[data-theme="dark"] .conversation-list-label,
html[data-theme="dark"] .organization-label {
  background: color-mix(in srgb, var(--label-color) 22%, #111b21);
  color: #e9edef;
}

html[data-theme="dark"] .organization-label button {
  background: rgba(255,255,255,.08);
  color: #e9edef;
}

html[data-theme="dark"] .priority-pill.priority-high {
  background: rgba(245, 158, 11, .2);
  color: #ffd166;
}

html[data-theme="dark"] .priority-pill.priority-urgent {
  background: rgba(239, 68, 68, .2);
  color: #ff9b9b;
}

/* ===== V1.17A · Perfil del cliente en modo oscuro ===== */
html[data-theme="dark"] .contact-profile-form,
html[data-theme="dark"] .contact-metric,
html[data-theme="dark"] .contact-custom-field-item {
  border-color: #2a3942;
  background: #18252d;
}

html[data-theme="dark"] .profile-field,
html[data-theme="dark"] .contact-profile-dates strong {
  color: #d8e1e7;
}

html[data-theme="dark"] .profile-field input,
html[data-theme="dark"] .profile-field select,
html[data-theme="dark"] .profile-field textarea {
  border-color: #30414b;
  background: #111b21;
  color: #e9edef;
}

html[data-theme="dark"] .profile-field input::placeholder,
html[data-theme="dark"] .profile-field textarea::placeholder {
  color: #71828c;
}

html[data-theme="dark"] .profile-section-heading h3,
html[data-theme="dark"] .contact-custom-field-item strong {
  color: #e9edef;
}

html[data-theme="dark"] .custom-fields-editor-block,
html[data-theme="dark"] .contact-profile-summary,
html[data-theme="dark"] .contact-custom-fields-section,
html[data-theme="dark"] .contact-profile-dates > div {
  border-color: #263740;
}

html[data-theme="dark"] .contact-metric strong {
  color: #25d366;
}

html[data-theme="dark"] .contact-metric span,
html[data-theme="dark"] .contact-profile-dates span,
html[data-theme="dark"] .contact-custom-field-item > span {
  color: #8696a0;
}

html[data-theme="dark"] .required-mark {
  background: #4a3513;
  color: #f8c76b;
}

/* ===== V1.17B · Historial del cliente en modo oscuro ===== */
html[data-theme="dark"] .contact-conversation-history-section,
html[data-theme="dark"] .contact-activity-timeline-section {
  border-color: #263740;
}

html[data-theme="dark"] .contact-history-count {
  background: #103d2a;
  color: #78e4a4;
}

html[data-theme="dark"] .contact-history-item {
  border-color: #2d3d46;
  background: #18252d;
  color: #e9edef;
}

html[data-theme="dark"] .contact-history-item:hover {
  border-color: #2f8f62;
  background: #1d2d35;
}

html[data-theme="dark"] .contact-history-preview,
html[data-theme="dark"] .contact-activity-copy p {
  color: #aebac1;
}

html[data-theme="dark"] .contact-history-meta,
html[data-theme="dark"] .contact-activity-copy small {
  color: #8696a0;
}

html[data-theme="dark"] .contact-activity-item:not(:last-child)::after {
  background: #2d3d46;
}

html[data-theme="dark"] .contact-activity-icon {
  border-color: #29513b;
  background: #103d2a;
  color: #78e4a4;
}

html[data-theme="dark"] .contact-activity-copy strong {
  color: #e9edef;
}

html[data-theme="dark"] .history-conversation-dialog {
  background: #0b141a;
}

html[data-theme="dark"] .history-dialog-header {
  border-color: #374248;
  background: #202c33;
}

html[data-theme="dark"] .history-dialog-header h2 {
  color: #e9edef;
}

html[data-theme="dark"] .history-messages-list {
  background-color: #0b141a;
  background-image:
    linear-gradient(45deg, rgba(255,255,255,.018) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,.018) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,.018) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.018) 75%);
}

html[data-theme="dark"] .history-loading {
  color: #8696a0;
}

/* V1.17C · Menú rápido por conversación en modo oscuro */
html[data-theme="dark"] .conversation-menu-trigger {
  background: rgba(32, 44, 51, .94);
  color: #aebac1;
  box-shadow: 0 5px 14px rgba(0, 0, 0, .25);
}

html[data-theme="dark"] .conversation-menu-trigger:hover,
html[data-theme="dark"] .conversation-menu-trigger[aria-expanded="true"] {
  background: #374248;
  color: #e9edef;
}

html[data-theme="dark"] .conversation-context-menu {
  border-color: #374248;
  background: #233138;
  box-shadow: 0 20px 52px rgba(0, 0, 0, .52);
}

html[data-theme="dark"] .conversation-context-item {
  color: #e9edef;
}

html[data-theme="dark"] .conversation-context-item:hover {
  background: #374248;
}

html[data-theme="dark"] .conversation-context-divider {
  background: #3b4a54;
}

html[data-theme="dark"] .conversation-context-danger {
  color: #ff8f8f;
}

html[data-theme="dark"] .conversation-context-danger:hover {
  background: rgba(255, 107, 107, .12);
}


/* V1.18C · Login oscuro unificado */
html[data-theme="dark"] .auth-layout {
  background: transparent;
}

html[data-theme="dark"] .auth-showcase {
  border-color: rgba(134, 150, 160, .24);
  background: transparent;
  box-shadow: 0 22px 55px rgba(0, 0, 0, .24);
}

html[data-theme="dark"] .auth-showcase img {
  opacity: 1;
}

html[data-theme="dark"] .auth-card {
  box-shadow: 0 22px 55px rgba(0, 0, 0, .30);
}


/* V1.18D · Perfil en modo oscuro */
html[data-theme="dark"] .profile-photo-editor {
  border-color: var(--border);
  background: var(--panel-muted);
}

html[data-theme="dark"] .settings-avatar-photo {
  border-color: var(--panel);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .30);
}


/* V1.18D.1 · Login oscuro integrado y contrastes refinados */
html[data-theme="dark"] .auth-body {
  background:
    radial-gradient(circle at 8% 4%, rgba(37, 211, 102, .11), transparent 31%),
    radial-gradient(circle at 96% 100%, rgba(6, 43, 85, .42), transparent 36%),
    #071015;
}

html[data-theme="dark"] .auth-showcase {
  border-color: #2b3941;
  background: #0b141a;
}

html[data-theme="dark"] .auth-showcase::after {
  background:
    linear-gradient(90deg, rgba(7, 16, 21, .04) 0%, rgba(7, 16, 21, .12) 56%, rgba(7, 16, 21, .62) 100%),
    linear-gradient(180deg, rgba(7, 16, 21, .10), transparent 34%, rgba(7, 16, 21, .22));
}

html[data-theme="dark"] .auth-showcase img {
  opacity: .92;
  filter: brightness(.76) contrast(1.06) saturate(.88);
}

html[data-theme="dark"] .auth-panel {
  border-color: #2b3941;
  background:
    radial-gradient(circle at 100% 0%, rgba(37, 211, 102, .055), transparent 30%),
    #111b21;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .36);
}

html[data-theme="dark"] .auth-card {
  border: 0;
  background: transparent;
  box-shadow: none;
}

html[data-theme="dark"] .auth-brand img {
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .24));
}

html[data-theme="dark"] .auth-form input {
  border-color: #34434c;
  background: #17232a;
}

html[data-theme="dark"] .auth-form input:hover {
  border-color: #485862;
}

html[data-theme="dark"] .auth-form input:focus {
  border-color: #25d366;
  background: #19272e;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, .13);
}

html[data-theme="dark"] .auth-form input:-webkit-autofill,
html[data-theme="dark"] .auth-form input:-webkit-autofill:hover,
html[data-theme="dark"] .auth-form input:-webkit-autofill:focus {
  -webkit-text-fill-color: #e9edef;
  box-shadow: 0 0 0 1000px #17232a inset;
  caret-color: #e9edef;
}

html[data-theme="dark"] .auth-trust span {
  border-color: #245b43;
  background: rgba(16, 61, 42, .78);
  color: #8ce8b3;
}

html[data-theme="dark"] .panel,
html[data-theme="dark"] .metric-card,
html[data-theme="dark"] .team-card,
html[data-theme="dark"] .role-card {
  box-shadow: 0 12px 30px rgba(0, 0, 0, .12);
}

html[data-theme="dark"] .metric-card:hover,
html[data-theme="dark"] .team-card:hover,
html[data-theme="dark"] .role-card:hover,
html[data-theme="dark"] .routing-team-row:hover {
  border-color: #46565f;
  box-shadow: 0 15px 34px rgba(0, 0, 0, .20);
}

html[data-theme="dark"] option {
  background: #202c33;
  color: #e9edef;
}

html[data-theme="dark"] ::selection {
  background: rgba(37, 211, 102, .28);
  color: #fff;
}

@media (max-width: 640px) {
  html[data-theme="dark"] .auth-panel {
    border-color: #2b3941;
    background:
      radial-gradient(circle at 100% 0%, rgba(37, 211, 102, .06), transparent 35%),
      #111b21;
  }
}


/* V1.18D.2 · Hero oscuro completo, sin recortar contenido */
html[data-theme="dark"] .auth-showcase img {
  opacity: .94;
  filter: brightness(.79) contrast(1.04) saturate(.9);
}
