/*
 * Transparencia Latam — Modern UI layer
 * Inspired by the visual language of Linking Values.
 * Reversible: set MODERN_UI_ENABLED=False to stop loading this file.
 */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap');

:root {
  --lv-ink: #16384c;
  --lv-ink-soft: #31556a;
  --lv-navy: #062b45;
  --lv-navy-2: #0a3c5a;
  --lv-navy-3: #115873;
  --lv-aqua: #35c4df;
  --lv-aqua-deep: #087da7;
  --lv-pink: #2aaed0;
  --lv-orange: #79d9eb;
  --lv-green: #7edd93;
  --lv-paper: #eef8fc;
  --lv-line: #cfe5ee;
  --lv-muted: #708b9b;

  --primary-50: #edf9fd;
  --primary-100: #d9f2fa;
  --primary-200: #b9e7f4;
  --primary-300: #79d5e9;
  --primary-400: #35c4df;
  --primary-500: #159fc7;
  --primary-600: #087da7;
  --primary-700: #155b79;

  --bg-primary: var(--lv-paper);
  --bg-secondary: #ffffff;
  --bg-tertiary: #edf7fb;
  --text-primary: var(--lv-ink);
  --text-secondary: var(--lv-ink-soft);
  --text-tertiary: var(--lv-muted);
  --border-light: rgba(24, 126, 164, 0.12);
  --border-medium: rgba(24, 126, 164, 0.22);
  --accent-color: var(--lv-aqua-deep);
  --accent-hover: #0c7f7c;
  --bubble-user-bg: var(--lv-navy);
  --bubble-user-text: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.84);
  --glass-border: rgba(255, 255, 255, 0.78);
  --glass-shadow: 0 18px 55px rgba(17, 28, 53, 0.10);
  --shadow-sm: 0 4px 14px rgba(17, 28, 53, 0.05);
  --shadow-md: 0 12px 30px rgba(17, 28, 53, 0.08);
  --shadow-lg: 0 22px 60px rgba(17, 28, 53, 0.12);
  --shadow-xl: 0 30px 85px rgba(17, 28, 53, 0.16);
}

[data-theme="dark"] {
  --bg-primary: #061a2c;
  --bg-secondary: #0b2940;
  --bg-tertiary: #103a55;
  --text-primary: #f7f9fc;
  --text-secondary: #d8e1ee;
  --text-tertiary: #91b2c6;
  --border-light: rgba(255, 255, 255, 0.09);
  --border-medium: rgba(255, 255, 255, 0.15);
  --accent-color: #65d4e9;
  --accent-hover: #91e2f0;
  --bubble-bot-bg: #0b2940;
  --bubble-user-bg: linear-gradient(135deg, #159fc7, #087da7);
  --input-bg: #08243a;
  --input-border: rgba(255, 255, 255, 0.12);
  --btn-action-bg: #103a55;
  --btn-action-border: rgba(255, 255, 255, 0.1);
  --footer-bg: #0b2940;
  --glass-bg: rgba(11, 41, 64, 0.82);
  --glass-border: rgba(255, 255, 255, 0.09);
  --glass-shadow: 0 24px 70px rgba(0, 0, 0, 0.30);
}

html,
body,
button,
input,
select,
textarea {
  font-family: "DM Sans", "Inter", system-ui, sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6,
.chat-title,
.stat-value {
  font-family: "Manrope", "DM Sans", sans-serif;
  letter-spacing: -0.025em;
}

body {
  background: var(--bg-primary);
}

/* App shell */
.dashboard-column {
  width: 282px;
  color: #f7f9fc;
  background:
    radial-gradient(circle at 12% 3%, rgba(21, 159, 199, 0.14), transparent 28%),
    radial-gradient(circle at 90% 40%, rgba(48, 214, 208, 0.10), transparent 30%),
    linear-gradient(160deg, var(--lv-navy) 0%, var(--lv-navy-2) 58%, #0b1d38 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 18px 0 55px rgba(7, 18, 39, 0.12);
}

.dashboard-content {
  padding: 22px 18px 18px;
}

.user-profile {
  margin-bottom: 18px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.user-profile::before {
  height: 2px;
  background: linear-gradient(90deg, var(--lv-aqua), var(--lv-pink), var(--lv-orange));
}

.user-profile .user-name {
  color: #ffffff;
  font-weight: 700;
}

.user-profile .user-email,
.dashboard-column .nav-section-title,
.dashboard-column .version,
.dashboard-column .social-link {
  color: #8fa1ba;
}

.avatar-wrapper {
  width: 44px;
  height: 44px;
}

.avatar-ring {
  animation: none;
  background: linear-gradient(135deg, var(--lv-aqua), var(--lv-pink));
  opacity: 0.95;
}

.avatar {
  color: #ffffff;
  background: var(--lv-navy-2);
  border: 2px solid var(--lv-navy-2);
  font-size: 1.15rem;
}

.btn-logout,
.btn-login {
  min-height: 42px;
  color: #d9e2ef;
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.09);
  border-radius: 11px;
  box-shadow: none;
}

.btn-logout:hover,
.btn-login:hover {
  color: #ffffff;
  background: rgba(48, 214, 208, 0.12);
  border-color: rgba(48, 214, 208, 0.34);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
  transform: translateY(-1px);
}

.dashboard-nav {
  margin: 16px 0 24px;
}

.nav-section-title {
  margin-bottom: 9px;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.dashboard-column .nav-items {
  gap: 6px;
}

.dashboard-column .nav-item {
  min-height: 48px;
  padding: 8px 11px;
  color: #b8c5d7;
  border: 1px solid transparent;
  border-radius: 12px;
}

.dashboard-column .nav-item::before {
  display: none;
}

.dashboard-column .nav-item:hover {
  padding-left: 11px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.065);
  border-color: rgba(255, 255, 255, 0.06);
}

.dashboard-column .nav-item.active {
  color: #ffffff;
  background: linear-gradient(110deg, rgba(48, 214, 208, 0.18), rgba(48, 214, 208, 0.055));
  border-color: rgba(48, 214, 208, 0.2);
  box-shadow: inset 3px 0 0 var(--lv-aqua);
}

.dashboard-column .nav-icon {
  width: 34px;
  height: 34px;
  color: #91a3bc;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.055);
}

.dashboard-column .nav-item:hover .nav-icon,
.dashboard-column .nav-item.active .nav-icon {
  color: var(--lv-aqua);
  background: rgba(48, 214, 208, 0.10);
  border-color: rgba(48, 214, 208, 0.16);
  transform: none;
}

.dashboard-column .nav-indicator {
  width: 6px;
  height: 6px;
  background: var(--lv-aqua);
  box-shadow: 0 0 0 5px rgba(48, 214, 208, 0.09);
}

.dashboard-footer {
  border-top-color: rgba(255, 255, 255, 0.08);
}

/* Main conversation surface */
.chat-column {
  isolation: isolate;
  background:
    radial-gradient(circle at 84% 4%, rgba(48, 214, 208, 0.11), transparent 27%),
    radial-gradient(circle at 8% 90%, rgba(21, 159, 199, 0.065), transparent 24%),
    linear-gradient(145deg, #f7f9fc 0%, #f1f4f8 100%);
}

.chat-column::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  opacity: 0.38;
  background-image:
    linear-gradient(rgba(17, 28, 53, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 28, 53, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 68%);
}

[data-theme="dark"] .chat-column {
  background:
    radial-gradient(circle at 86% 2%, rgba(48, 214, 208, 0.11), transparent 28%),
    radial-gradient(circle at 12% 92%, rgba(21, 159, 199, 0.08), transparent 24%),
    linear-gradient(150deg, #071227, #0a1730);
}

[data-theme="dark"] .chat-column::before {
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
}

.chat-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  padding: 26px 34px 22px;
}

.chat-header {
  min-height: 86px;
  margin-bottom: 14px;
  padding: 13px 18px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 15px 45px rgba(17, 28, 53, 0.08);
  backdrop-filter: blur(18px) saturate(135%);
}

[data-theme="dark"] .chat-header {
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(13, 28, 54, 0.82);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.25);
}

.logo-container {
  width: 205px;
  height: 52px;
}

.logo-glow {
  display: none;
}

.chat-title {
  color: var(--text-primary);
  font-size: 1.12rem;
  font-weight: 800;
}

.chat-status {
  margin-top: 2px;
  color: var(--text-tertiary);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.status-dot {
  width: 7px;
  height: 7px;
  background: var(--lv-aqua-deep);
  box-shadow: 0 0 0 4px rgba(48, 214, 208, 0.12);
  animation: none;
}

.theme-toggle,
.dashboard-toggle {
  border: 1px solid rgba(17, 28, 53, 0.10);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 32px rgba(17, 28, 53, 0.10);
  backdrop-filter: blur(14px);
}

.theme-toggle {
  top: 18px;
  right: 18px;
  width: 43px;
  height: 43px;
}

.theme-toggle i {
  color: var(--lv-aqua-deep);
  font-size: 1.15rem;
}

.dashboard-toggle {
  top: 31px;
  left: 14px;
  width: 34px;
  height: 34px;
  padding: 0;
  justify-content: center;
  color: var(--lv-ink-soft);
  border-radius: 10px;
}

.dashboard-toggle:hover,
.theme-toggle:hover {
  color: #ffffff;
  background: var(--lv-navy);
  border-color: var(--lv-navy);
  transform: translateY(-1px);
}

.theme-toggle:hover {
  transform: translateY(-1px);
}

.dashboard-toggle:hover .toggle-icon-wrapper {
  transform: none;
}

.language-btn {
  min-height: 40px;
  padding: 8px 13px;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border-color: var(--border-light);
  border-radius: 11px;
  font-weight: 600;
}

.language-btn:hover {
  color: var(--lv-ink);
  background: rgba(48, 214, 208, 0.14);
  border-color: rgba(48, 214, 208, 0.35);
}

[data-theme="dark"] .language-btn:hover {
  color: #ffffff;
}

.dropdown-menu {
  padding: 7px;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
}

.chat-body {
  padding: 24px 4px 28px;
}

.messages-container {
  gap: 20px;
}

.message {
  max-width: min(78%, 760px);
}

.message-avatar {
  width: 44px;
  height: 44px;
}

.message-avatar img {
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 2px rgba(48, 214, 208, 0.32), 0 9px 22px rgba(17, 28, 53, 0.12);
}

.message-bubble,
.message.bot-message {
  padding: 18px 21px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.90);
  border: 1px solid rgba(17, 28, 53, 0.08);
  border-radius: 18px 18px 18px 5px;
  box-shadow: 0 11px 30px rgba(17, 28, 53, 0.075);
  backdrop-filter: blur(12px);
}

[data-theme="dark"] .message-bubble,
[data-theme="dark"] .message.bot-message {
  color: var(--text-primary);
  background: rgba(13, 28, 54, 0.91);
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

.message.user-message {
  padding: 0;
  background: transparent !important;
}

.message.user-message .message-bubble {
  color: #ffffff;
  background: linear-gradient(135deg, #142640, var(--lv-navy));
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px 18px 5px 18px;
  box-shadow: 0 12px 30px rgba(7, 18, 39, 0.17);
}

[data-theme="dark"] .message.user-message .message-bubble {
  background: linear-gradient(135deg, #168f8c, #0e6d7d);
}

.welcome-text {
  font-size: 1.02rem;
  line-height: 1.72;
}

.quick-replies-container {
  margin-top: 14px;
}

.quick-replies {
  gap: 9px;
}

.quick-reply {
  min-height: 43px;
  padding: 9px 14px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(17, 28, 53, 0.09);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(17, 28, 53, 0.055);
  font-size: 0.86rem;
  font-weight: 600;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.quick-reply i {
  color: var(--lv-aqua-deep);
}

.quick-reply:hover {
  color: #ffffff;
  background: var(--lv-navy);
  border-color: var(--lv-navy);
  box-shadow: 0 12px 26px rgba(7, 18, 39, 0.16);
  transform: translateY(-2px);
}

.quick-reply:hover i {
  color: var(--lv-aqua);
}

[data-theme="dark"] .quick-reply {
  color: var(--text-secondary);
  background: rgba(19, 36, 64, 0.88);
  border-color: rgba(255, 255, 255, 0.09);
}

[data-theme="dark"] .quick-reply:hover {
  color: #ffffff;
  background: rgba(48, 214, 208, 0.12);
  border-color: rgba(48, 214, 208, 0.28);
}

.chat-footer {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.input-wrapper {
  min-height: 72px;
  padding: 9px 10px 9px 18px;
  border: 1px solid rgba(17, 28, 53, 0.10);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.90);
  box-shadow: 0 18px 52px rgba(17, 28, 53, 0.12);
  backdrop-filter: blur(16px);
}

[data-theme="dark"] .input-wrapper {
  border-color: rgba(255, 255, 255, 0.10);
  background: rgba(13, 28, 54, 0.94);
  box-shadow: 0 20px 58px rgba(0, 0, 0, 0.30);
}

.chat-input {
  min-height: 46px;
  padding: 12px 6px;
  color: var(--text-primary);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.chat-input:focus {
  background: transparent;
  box-shadow: none;
}

.input-actions {
  gap: 7px;
}

.action-btn {
  width: 40px;
  height: 40px;
  color: var(--text-tertiary);
  background: var(--bg-tertiary);
  border-color: transparent;
  border-radius: 11px;
  box-shadow: none;
}

.action-btn:hover {
  color: var(--lv-ink);
  background: rgba(48, 214, 208, 0.18);
  transform: translateY(-1px);
}

.send-btn:not(:disabled),
.btn-primary {
  color: #ffffff;
  background: linear-gradient(125deg, var(--lv-pink), #087da7 48%, #155b79 100%);
  border-color: transparent;
  box-shadow: 0 11px 26px rgba(8, 125, 167, 0.22);
}

.send-btn:hover:not(:disabled),
.btn-primary:hover {
  color: #ffffff;
  background: linear-gradient(125deg, #22afd1, #08779e 48%, #134f69 100%);
  border-color: transparent;
  box-shadow: 0 15px 34px rgba(8, 125, 167, 0.28);
  transform: translateY(-1px);
}

/* Evidence panel */
.pruebas-panel {
  padding: 26px 34px 32px;
  background:
    radial-gradient(circle at 85% 0%, rgba(48, 214, 208, 0.10), transparent 27%),
    linear-gradient(145deg, #f7f9fc, #f1f4f8);
}

[data-theme="dark"] .pruebas-panel {
  background:
    radial-gradient(circle at 85% 0%, rgba(48, 214, 208, 0.10), transparent 27%),
    linear-gradient(145deg, #071227, #0a1730);
}

.pruebas-panel::before {
  display: none;
}

.pruebas-form-card,
.pruebas-list-wrapper,
.prueba-card {
  border: 1px solid var(--border-light);
  border-radius: 18px;
  background: var(--bg-secondary);
  box-shadow: 0 14px 38px rgba(17, 28, 53, 0.08);
}

.pruebas-form-card,
.pruebas-list-wrapper {
  padding: 24px;
}

.pruebas-form-card:hover,
.pruebas-list-wrapper:hover {
  border-color: rgba(48, 214, 208, 0.30);
  box-shadow: 0 20px 48px rgba(17, 28, 53, 0.10);
  transform: translateY(-2px);
}

.pruebas-title {
  font-family: "Manrope", sans-serif;
  color: var(--text-primary);
  font-weight: 800;
}

.form-control,
.form-select {
  color: var(--text-primary);
  background-color: var(--bg-primary);
  border-color: var(--border-light);
  border-radius: 11px;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(48, 214, 208, 0.72);
  box-shadow: 0 0 0 4px rgba(48, 214, 208, 0.12);
}

/* Analytics and user administration */
.analytics-content {
  padding: 30px 34px 44px;
  background:
    radial-gradient(circle at 88% 0%, rgba(48, 214, 208, 0.10), transparent 28%),
    radial-gradient(circle at 8% 95%, rgba(21, 159, 199, 0.055), transparent 23%),
    linear-gradient(145deg, #f7f9fc, #f0f3f8);
}

[data-theme="dark"] .analytics-content {
  background:
    radial-gradient(circle at 88% 0%, rgba(48, 214, 208, 0.10), transparent 28%),
    linear-gradient(145deg, #071227, #0a1730);
}

.analytics-content::before {
  display: none;
}

.analytics-page .chat-header,
.user-admin-page .chat-header {
  border-radius: 18px;
}

.stat-card-premium,
.chart-container-premium,
.user-admin-toolbar,
.user-admin-panel {
  border: 1px solid var(--border-light);
  background: var(--bg-secondary);
  box-shadow: 0 13px 36px rgba(17, 28, 53, 0.075);
}

.stat-card-premium {
  min-height: 112px;
  padding: 21px;
  border-radius: 17px;
}

.stat-card-premium:hover {
  border-color: rgba(48, 214, 208, 0.33);
  box-shadow: 0 20px 48px rgba(17, 28, 53, 0.11);
  transform: translateY(-3px);
}

.stat-card-premium .icon-box {
  width: 54px;
  height: 54px;
  color: var(--lv-aqua-deep);
  background: rgba(48, 214, 208, 0.12);
  border-radius: 14px;
}

.analytics-page .row > div:nth-child(2) .icon-box {
  color: #147ca1;
  background: rgba(41, 169, 205, 0.12);
}

.analytics-page .row > div:nth-child(3) .icon-box {
  color: #155b79;
  background: rgba(21, 91, 121, 0.10);
}

.stat-card-premium .stat-value {
  font-size: 2.15rem;
  font-weight: 800;
}

.stat-card-premium .stat-label {
  color: var(--text-tertiary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.chart-container-premium,
.user-admin-panel {
  border-radius: 18px;
}

.chart-container-premium h5 {
  color: var(--text-primary);
  font-family: "Manrope", sans-serif;
}

.analytics-refresh,
.user-admin-new {
  min-height: 40px;
  border-radius: 10px;
}

.analytics-status {
  border-radius: 11px;
  box-shadow: none;
}

.user-admin-toolbar {
  border-radius: 16px;
}

.user-search,
.user-admin-toolbar select {
  border-radius: 10px;
  box-shadow: none;
}

.user-search:focus-within,
.user-admin-toolbar select:focus {
  border-color: rgba(48, 214, 208, 0.68);
  box-shadow: 0 0 0 4px rgba(48, 214, 208, 0.11);
}

.user-admin-table thead th {
  color: var(--text-tertiary) !important;
  background: var(--bg-primary) !important;
  font-size: 0.70rem;
  letter-spacing: 0.09em;
}

.user-admin-table tbody tr:hover,
.user-admin-table tbody tr:hover > td {
  background-color: rgba(48, 214, 208, 0.07) !important;
}

/* Authentication */
body.auth-surface {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(circle at 14% 10%, rgba(101, 212, 233, 0.10), transparent 31%),
    radial-gradient(circle at 84% 22%, rgba(54, 185, 179, 0.12), transparent 29%),
    linear-gradient(135deg, #141219 0%, #1d1824 52%, #292131 100%);
}

body.auth-surface::before,
body.auth-surface::after {
  content: "";
  position: fixed;
  z-index: -1;
  width: clamp(280px, 23vw, 390px);
  height: clamp(280px, 23vw, 390px);
  pointer-events: none;
  transform: none;
  opacity: 0.58;
}

body.auth-surface::before {
  top: 0;
  left: 0;
  clip-path: polygon(0 0, 100% 0, 0 100%);
  background: linear-gradient(135deg, #159fc7, #087da7 82%);
}

body.auth-surface::after {
  right: 0;
  bottom: 0;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  background: linear-gradient(315deg, #36b9b3, #267e80 82%);
}

.auth-surface .login-container,
.auth-surface .verify-container {
  max-width: 458px;
}

.auth-surface .login-card,
.auth-surface .verify-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 23px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 32px 95px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(20px);
}

.auth-surface .login-card:hover,
.auth-surface .verify-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 38px 105px rgba(0, 0, 0, 0.38);
}

.auth-surface .login-card > .card-header,
.auth-surface .verify-card > .card-header {
  padding: 26px 28px 23px;
  text-align: left;
  background:
    radial-gradient(circle at 90% 10%, rgba(54, 185, 179, 0.13), transparent 29%),
    linear-gradient(135deg, #19151f, #302538);
}

.auth-surface .login-card > .card-header {
  text-align: center;
}
.auth-surface .login-card > .card-header::after,
.auth-surface .verify-card > .card-header::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--lv-aqua), var(--lv-pink), var(--lv-orange));
}

.auth-surface .card-header h1 {
  color: #ffffff !important;
  font-family: "Manrope", sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.auth-surface .card-header p {
  color: #aebcd0;
  font-weight: 500;
}

.auth-surface .login-card .logo-container {
  width: 42px;
  height: 42px;
  margin: 0 auto 13px;
  justify-content: center;
  border: 1px solid rgba(48, 214, 208, 0.25);
  border-radius: 12px;
  background: rgba(48, 214, 208, 0.09);
}

.auth-surface .login-card .logo {
  width: 23px;
  /* height: 23px; */
  stroke: var(--lv-aqua);
}

.auth-surface .card-body {
  padding: 28px 30px 30px;
}

.auth-surface .card-body > h2 {
  color: var(--lv-ink) !important;
  font-family: "Manrope", sans-serif;
  font-size: 1.05rem !important;
}

.auth-surface .form-label {
  color: var(--lv-ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.auth-surface .form-control,
.auth-surface .form-select {
  min-height: 47px;
  color: var(--lv-ink) !important;
  background: #f2f5f8 !important;
  border: 1px solid rgba(17, 28, 53, 0.10) !important;
  border-radius: 11px !important;
}

.auth-surface .form-control:focus,
.auth-surface .form-select:focus {
  background: #ffffff !important;
  border-color: rgba(48, 214, 208, 0.85) !important;
  box-shadow: 0 0 0 4px rgba(48, 214, 208, 0.12) !important;
}

.auth-surface .input-group-text {
  color: var(--lv-aqua-deep);
}

.auth-surface .btn {
  min-height: 45px;
  border-radius: 11px;
  font-weight: 700;
}

.auth-surface .btn-outline-secondary {
  color: var(--lv-ink-soft);
  background: #ffffff;
  border-color: rgba(17, 28, 53, 0.13);
}

.auth-surface .btn-outline-secondary:hover {
  color: var(--lv-ink);
  background: #eef8f8;
  border-color: rgba(48, 214, 208, 0.45);
}

.auth-surface .footer-text,
.auth-surface .form-text {
  color: var(--lv-muted);
}

.auth-surface .floating-buttons .theme-toggle,
.auth-surface .language-toggle,
.auth-surface .back-btn {
  color: #ffffff;
  background: rgba(25, 21, 31, 0.92);
  border-color: rgba(255, 255, 255, 0.42);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(12px);
}

.auth-surface .theme-toggle i,
.auth-surface .language-toggle i,
.auth-surface .back-btn i {
  color: #ffffff;
  text-shadow: 0 1px 8px rgba(48, 214, 208, 0.35);
}

.auth-surface .floating-buttons .theme-toggle:hover,
.auth-surface .language-toggle:hover,
.auth-surface .back-btn:hover {
  color: #1b1721;
  background: rgba(255, 255, 255, 0.96);
  border-color: #ffffff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
}

.auth-surface .floating-buttons .theme-toggle:hover i,
.auth-surface .language-toggle:hover i,
.auth-surface .back-btn:hover i {
  color: #1b1721;
  text-shadow: none;
}

.auth-surface .language-dropdown {
  border-color: rgba(255, 255, 255, 0.10);
  background: rgba(29, 24, 36, 0.97);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

.auth-surface .language-option {
  color: #dce5f0;
}

.auth-surface .language-option:hover,
.auth-surface .language-option.active {
  color: #ffffff;
  background: rgba(48, 214, 208, 0.12);
}

.auth-surface .modal-content,
.auth-surface .user-admin-modal {
  overflow: hidden;
  border: 1px solid rgba(17, 28, 53, 0.10) !important;
  border-radius: 18px !important;
  background: #ffffff !important;
  box-shadow: 0 30px 90px rgba(7, 18, 39, 0.28);
}

.auth-surface .verification-icon {
  width: 68px;
  height: 68px;
  margin-top: -34px;
  color: var(--lv-aqua-deep);
  background: #e7fafa;
  border: 6px solid #ffffff;
  box-shadow: 0 12px 30px rgba(17, 28, 53, 0.12);
}

.auth-surface .email-display {
  color: var(--lv-ink-soft);
  background: #f2f6f8;
  border-color: rgba(17, 28, 53, 0.08);
  border-radius: 11px;
}

.auth-surface .code-input {
  color: var(--lv-ink);
  background: #f2f5f8;
  border-color: rgba(17, 28, 53, 0.12);
  border-radius: 10px;
}

.auth-surface .code-input:focus,
.auth-surface .code-input.filled {
  border-color: var(--lv-aqua-deep);
  box-shadow: 0 0 0 4px rgba(48, 214, 208, 0.12);
}

body.auth-surface.dark-mode {
  background:
    radial-gradient(circle at 14% 10%, rgba(101, 212, 233, 0.10), transparent 31%),
    radial-gradient(circle at 84% 22%, rgba(54, 185, 179, 0.11), transparent 29%),
    linear-gradient(135deg, #061a2c, #08243a 58%, #0b2940);
}

body.auth-surface.dark-mode .login-card,
body.auth-surface.dark-mode .verify-card,
body.auth-surface.dark-mode .modal-content {
  color: #f5f8fc;
  background: rgba(11, 41, 64, 0.97) !important;
  border-color: rgba(255, 255, 255, 0.09) !important;
}

body.auth-surface.dark-mode .card-body > h2,
body.auth-surface.dark-mode .modal-title {
  color: #ffffff !important;
}

body.auth-surface.dark-mode .form-label {
  color: #d6e0ed;
}

body.auth-surface.dark-mode .form-control,
body.auth-surface.dark-mode .form-select,
body.auth-surface.dark-mode .code-input {
  color: #f7f9fc !important;
  background: #08243a !important;
  border-color: rgba(255, 255, 255, 0.10) !important;
}

body.auth-surface.dark-mode .form-control::placeholder {
  color: #8496af !important;
}

body.auth-surface.dark-mode .btn-outline-secondary {
  color: #d6e0ed;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

body.auth-surface.dark-mode .email-display {
  color: #cad5e4;
  background: #08243a;
  border-color: rgba(255, 255, 255, 0.09);
}

/* White + cyan login variation (light theme) */
body.auth-surface:not(.dark-mode) {
  background:
    radial-gradient(circle at 16% 12%, rgba(255, 255, 255, 0.92), transparent 27%),
    radial-gradient(circle at 84% 18%, rgba(74, 190, 226, 0.16), transparent 30%),
    linear-gradient(135deg, #f8fcfe 0%, #edf8fc 50%, #dceff7 100%);
}

body.auth-surface:not(.dark-mode)::before,
body.auth-surface:not(.dark-mode)::after {
  width: clamp(310px, 27vw, 470px);
  height: clamp(310px, 27vw, 470px);
  clip-path: none;
  border-radius: 50%;
  transform: none;
  filter: blur(1px);
}

body.auth-surface:not(.dark-mode)::before {
  top: -185px;
  left: -145px;
  background: rgba(255, 255, 255, 0.88);
  opacity: 0.72;
}

body.auth-surface:not(.dark-mode)::after {
  right: -175px;
  bottom: -195px;
  background: linear-gradient(135deg, #8ddcf0, #3bb4d7);
  opacity: 0.34;
}

body.auth-surface:not(.dark-mode) .login-card {
  border-color: rgba(17, 115, 151, 0.13);
  border-radius: 30px;
  background: #ffffff;
  box-shadow: 0 30px 80px rgba(31, 104, 132, 0.16);
}

body.auth-surface:not(.dark-mode) .login-card:hover {
  box-shadow: 0 36px 92px rgba(31, 104, 132, 0.20);
}

body.auth-surface:not(.dark-mode) .login-card > .card-header {
  padding: 27px 30px;
  display: grid;
  grid-template-columns: 48px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 15px;
  text-align: left;
  background:
    radial-gradient(circle at 90% 5%, rgba(75, 190, 226, 0.15), transparent 32%),
    linear-gradient(135deg, #ffffff, #eaf7fc);
}

body.auth-surface:not(.dark-mode) .login-card > .card-header::after {
  height: 3px;
  background: linear-gradient(90deg, #087fa8, #17aed4, #70d6ec);
}

body.auth-surface:not(.dark-mode) .login-card .logo-container {
  width: 48px;
  height: 48px;
  margin: 0;
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: center;
  border-color: rgba(9, 151, 193, 0.22);
  border-radius: 14px;
  background: rgba(29, 174, 212, 0.10);
}

body.auth-surface:not(.dark-mode) .login-card .logo {
  width: 25px;
  stroke: #079cc7;
}

body.auth-surface:not(.dark-mode) .login-card .card-header h1 {
  grid-column: 2;
  margin: 0 0 3px;
  color: #16384c !important;
  font-size: 1.45rem;
}

body.auth-surface:not(.dark-mode) .login-card .card-header p {
  grid-column: 2;
  margin: 0;
  color: #668394;
}

body.auth-surface:not(.dark-mode) .login-card .card-body {
  background: #ffffff;
}

body.auth-surface:not(.dark-mode) .login-card .card-body > h2 {
  color: #17384c !important;
}

body.auth-surface:not(.dark-mode) .form-label {
  color: #31556a;
}

body.auth-surface:not(.dark-mode) .form-control,
body.auth-surface:not(.dark-mode) .form-select {
  color: #17384c !important;
  background: #f4fafc !important;
  border-color: rgba(24, 126, 164, 0.15) !important;
}

body.auth-surface:not(.dark-mode) .form-control:focus,
body.auth-surface:not(.dark-mode) .form-select:focus {
  background: #ffffff !important;
  border-color: rgba(20, 166, 207, 0.72) !important;
  box-shadow: 0 0 0 4px rgba(36, 177, 216, 0.12) !important;
}

body.auth-surface:not(.dark-mode) .input-group-text {
  color: #079cc7;
}

body.auth-surface:not(.dark-mode) .btn-primary {
  color: #ffffff;
  background: linear-gradient(120deg, #0799c4, #087da7 56%, #155b79 100%);
  border-color: transparent;
  box-shadow: 0 12px 27px rgba(8, 126, 168, 0.22);
}

body.auth-surface:not(.dark-mode) .btn-primary:hover {
  color: #ffffff;
  background: linear-gradient(120deg, #08a7d4, #08779e 58%, #134f69 100%);
  box-shadow: 0 16px 34px rgba(8, 126, 168, 0.28);
}

body.auth-surface:not(.dark-mode) .btn-outline-secondary {
  color: #31556a;
  background: #ffffff;
  border-color: rgba(24, 126, 164, 0.20);
}

body.auth-surface:not(.dark-mode) .btn-outline-secondary:hover {
  color: #17384c;
  background: #edf8fc;
  border-color: rgba(20, 166, 207, 0.42);
}

body.auth-surface:not(.dark-mode) .footer-text,
body.auth-surface:not(.dark-mode) .form-text {
  color: #708b9b;
}

body.auth-surface:not(.dark-mode) .floating-buttons .theme-toggle,
body.auth-surface:not(.dark-mode) .language-toggle,
body.auth-surface:not(.dark-mode) .back-btn {
  color: #ffffff;
  background: rgba(16, 91, 119, 0.94);
  border-color: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 34px rgba(25, 104, 135, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

body.auth-surface:not(.dark-mode) .floating-buttons .theme-toggle i,
body.auth-surface:not(.dark-mode) .language-toggle i,
body.auth-surface:not(.dark-mode) .back-btn i {
  color: #ffffff;
  text-shadow: none;
}

body.auth-surface:not(.dark-mode) .floating-buttons .theme-toggle:hover,
body.auth-surface:not(.dark-mode) .language-toggle:hover,
body.auth-surface:not(.dark-mode) .back-btn:hover {
  color: #155b79;
  background: #ffffff;
  border-color: #ffffff;
}

body.auth-surface:not(.dark-mode) .floating-buttons .theme-toggle:hover i,
body.auth-surface:not(.dark-mode) .language-toggle:hover i,
body.auth-surface:not(.dark-mode) .back-btn:hover i {
  color: #155b79;
}

body.auth-surface:not(.dark-mode) .language-dropdown {
  color: #17384c;
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(24, 126, 164, 0.16);
  box-shadow: 0 20px 50px rgba(31, 104, 132, 0.18);
}

body.auth-surface:not(.dark-mode) .language-option {
  color: #31556a;
}

body.auth-surface:not(.dark-mode) .language-option:hover,
body.auth-surface:not(.dark-mode) .language-option.active {
  color: #155b79;
  background: #e8f6fb;
}
/* Unified white-cyan application theme */
body:not([data-theme="dark"]) .main-wrapper {
  background: #eef8fc;
}

body:not([data-theme="dark"]) .dashboard-column {
  color: var(--lv-ink);
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.98), transparent 35%),
    radial-gradient(circle at 100% 100%, rgba(91, 202, 226, 0.18), transparent 38%),
    linear-gradient(160deg, #ffffff 0%, #f4fbfd 58%, #e4f4fa 100%);
  border-right: 1px solid rgba(24, 126, 164, 0.14);
  box-shadow: 18px 0 55px rgba(31, 104, 132, 0.10);
}

body:not([data-theme="dark"]) .user-profile {
  border-color: rgba(24, 126, 164, 0.13);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 30px rgba(31, 104, 132, 0.08);
}

body:not([data-theme="dark"]) .user-profile::before {
  background: linear-gradient(90deg, #087fa8, #22afd1, #78d9eb);
}

body:not([data-theme="dark"]) .user-profile .user-name {
  color: var(--lv-ink);
}

body:not([data-theme="dark"]) .user-profile .user-email,
body:not([data-theme="dark"]) .dashboard-column .nav-section-title,
body:not([data-theme="dark"]) .dashboard-column .version,
body:not([data-theme="dark"]) .dashboard-column .social-link {
  color: #668394;
}

body:not([data-theme="dark"]) .avatar-ring {
  background: linear-gradient(135deg, #159fc7, #79d9eb);
}

body:not([data-theme="dark"]) .avatar {
  color: #087da7;
  background: #edf8fc;
  border-color: #ffffff;
}

body:not([data-theme="dark"]) .btn-logout,
body:not([data-theme="dark"]) .btn-login {
  color: #31556a;
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(24, 126, 164, 0.16);
}

body:not([data-theme="dark"]) .btn-logout:hover,
body:not([data-theme="dark"]) .btn-login:hover {
  color: #ffffff;
  background: #087da7;
  border-color: #087da7;
  box-shadow: 0 12px 28px rgba(8, 125, 167, 0.18);
}

body:not([data-theme="dark"]) .dashboard-column .nav-item {
  color: #31556a;
}

body:not([data-theme="dark"]) .dashboard-column .nav-item:hover {
  color: #155b79;
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(24, 126, 164, 0.12);
}

body:not([data-theme="dark"]) .dashboard-column .nav-item.active {
  color: #155b79;
  background: linear-gradient(110deg, rgba(53, 196, 223, 0.18), rgba(255, 255, 255, 0.64));
  border-color: rgba(21, 159, 199, 0.18);
  box-shadow: inset 3px 0 0 #159fc7;
}

body:not([data-theme="dark"]) .dashboard-column .nav-icon {
  color: #668394;
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(24, 126, 164, 0.10);
}

body:not([data-theme="dark"]) .dashboard-column .nav-item:hover .nav-icon,
body:not([data-theme="dark"]) .dashboard-column .nav-item.active .nav-icon {
  color: #087da7;
  background: rgba(53, 196, 223, 0.13);
  border-color: rgba(21, 159, 199, 0.18);
}

body:not([data-theme="dark"]) .dashboard-column .nav-indicator {
  background: #159fc7;
  box-shadow: 0 0 0 5px rgba(21, 159, 199, 0.10);
}

body:not([data-theme="dark"]) .dashboard-footer {
  border-top-color: rgba(24, 126, 164, 0.12);
}

body:not([data-theme="dark"]) .chat-column {
  background:
    radial-gradient(circle at 8% 4%, rgba(255, 255, 255, 0.96), transparent 26%),
    radial-gradient(circle at 88% 12%, rgba(86, 198, 226, 0.18), transparent 31%),
    linear-gradient(135deg, #f9fdff 0%, #eef9fd 52%, #dff2f8 100%);
}

body:not([data-theme="dark"]) .chat-column::before {
  opacity: 1;
  background:
    radial-gradient(circle at 106% 108%, rgba(79, 194, 220, 0.22) 0 16%, transparent 16.2%),
    radial-gradient(circle at -5% -8%, rgba(255, 255, 255, 0.72) 0 17%, transparent 17.2%);
  background-size: auto;
  mask-image: none;
}

body:not([data-theme="dark"]) .chat-header {
  border-color: rgba(24, 126, 164, 0.12);
  background:
    radial-gradient(circle at 92% 0%, rgba(75, 190, 226, 0.13), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(235, 248, 252, 0.92));
  box-shadow: 0 15px 45px rgba(31, 104, 132, 0.10);
}

body:not([data-theme="dark"]) .theme-toggle,
body:not([data-theme="dark"]) .dashboard-toggle {
  color: #ffffff;
  background: #116483;
  border-color: rgba(255, 255, 255, 0.80);
  box-shadow: 0 12px 30px rgba(25, 104, 135, 0.20);
}

body:not([data-theme="dark"]) .theme-toggle i,
body:not([data-theme="dark"]) .dashboard-toggle i {
  color: #ffffff;
}

body:not([data-theme="dark"]) .theme-toggle:hover,
body:not([data-theme="dark"]) .dashboard-toggle:hover {
  color: #ffffff;
  background: #087da7;
  border-color: #ffffff;
}

body:not([data-theme="dark"]) .language-btn {
  color: #31556a;
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(24, 126, 164, 0.14);
}

body:not([data-theme="dark"]) .language-btn:hover {
  color: #155b79;
  background: #edf8fc;
  border-color: rgba(21, 159, 199, 0.30);
}

body:not([data-theme="dark"]) .message-bubble,
body:not([data-theme="dark"]) .message.bot-message {
  color: var(--lv-ink);
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(24, 126, 164, 0.10);
  box-shadow: 0 11px 30px rgba(31, 104, 132, 0.08);
}

body:not([data-theme="dark"]) .message.user-message,
body:not([data-theme="dark"]) .message.user-message .message-bubble {
  color: #ffffff;
  background: linear-gradient(125deg, #159fc7, #087da7 58%, #155b79);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px 18px 5px 18px;
  box-shadow: 0 12px 30px rgba(8, 125, 167, 0.20);
}

body:not([data-theme="dark"]) .message.user-message {
  padding: 12px 16px;
  background: linear-gradient(125deg, #159fc7, #087da7 58%, #155b79) !important;
}

body:not([data-theme="dark"]) .quick-reply {
  color: #31556a;
  background: rgba(255, 255, 255, 0.90);
  border-color: rgba(24, 126, 164, 0.12);
  box-shadow: 0 6px 18px rgba(31, 104, 132, 0.06);
}

body:not([data-theme="dark"]) .quick-reply i {
  color: #159fc7;
}

body:not([data-theme="dark"]) .quick-reply:hover {
  color: #ffffff;
  background: #087da7;
  border-color: #087da7;
  box-shadow: 0 12px 26px rgba(8, 125, 167, 0.18);
}

body:not([data-theme="dark"]) .quick-reply:hover i {
  color: #ffffff;
}

body:not([data-theme="dark"]) .input-wrapper {
  border-color: rgba(24, 126, 164, 0.13);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 52px rgba(31, 104, 132, 0.13);
}

body:not([data-theme="dark"]) .action-btn {
  color: #668394;
  background: #edf7fb;
}

body:not([data-theme="dark"]) .action-btn:hover {
  color: #087da7;
  background: rgba(53, 196, 223, 0.16);
}

body:not([data-theme="dark"]) .send-btn:not(:disabled),
body:not([data-theme="dark"]) .btn-primary {
  color: #ffffff;
  background: linear-gradient(125deg, #159fc7, #087da7 58%, #155b79);
  border-color: transparent;
  box-shadow: 0 11px 26px rgba(8, 125, 167, 0.22);
}

body:not([data-theme="dark"]) .send-btn:hover:not(:disabled),
body:not([data-theme="dark"]) .btn-primary:hover {
  color: #ffffff;
  background: linear-gradient(125deg, #22afd1, #08779e 58%, #134f69);
  box-shadow: 0 15px 34px rgba(8, 125, 167, 0.28);
}

body:not([data-theme="dark"]) .pruebas-panel,
body:not([data-theme="dark"]) .analytics-content {
  background:
    radial-gradient(circle at 88% 4%, rgba(86, 198, 226, 0.17), transparent 29%),
    radial-gradient(circle at 7% 96%, rgba(255, 255, 255, 0.86), transparent 26%),
    linear-gradient(145deg, #f9fdff, #e8f6fb);
}

body:not([data-theme="dark"]) .pruebas-form-card,
body:not([data-theme="dark"]) .pruebas-list-wrapper,
body:not([data-theme="dark"]) .prueba-card,
body:not([data-theme="dark"]) .stat-card-premium,
body:not([data-theme="dark"]) .chart-container-premium,
body:not([data-theme="dark"]) .user-admin-toolbar,
body:not([data-theme="dark"]) .user-admin-panel {
  border-color: rgba(24, 126, 164, 0.12);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 38px rgba(31, 104, 132, 0.09);
}

body:not([data-theme="dark"]) .stat-card-premium:hover,
body:not([data-theme="dark"]) .pruebas-form-card:hover,
body:not([data-theme="dark"]) .pruebas-list-wrapper:hover {
  border-color: rgba(21, 159, 199, 0.28);
  box-shadow: 0 20px 48px rgba(31, 104, 132, 0.13);
}

body:not([data-theme="dark"]) .stat-card-premium .icon-box {
  color: #087da7;
  background: rgba(53, 196, 223, 0.13);
}

body:not([data-theme="dark"]) .analytics-page .row > div:nth-child(2) .icon-box {
  color: #147ca1;
  background: rgba(41, 169, 205, 0.12);
}

body:not([data-theme="dark"]) .analytics-page .row > div:nth-child(3) .icon-box {
  color: #155b79;
  background: rgba(21, 91, 121, 0.10);
}

body:not([data-theme="dark"]) .form-control,
body:not([data-theme="dark"]) .form-select,
body:not([data-theme="dark"]) .user-search,
body:not([data-theme="dark"]) .user-admin-toolbar select {
  color: #17384c;
  background-color: #f4fafc;
  border-color: rgba(24, 126, 164, 0.15);
}

body:not([data-theme="dark"]) .form-control:focus,
body:not([data-theme="dark"]) .form-select:focus,
body:not([data-theme="dark"]) .user-search:focus-within,
body:not([data-theme="dark"]) .user-admin-toolbar select:focus {
  background-color: #ffffff;
  border-color: rgba(20, 166, 207, 0.68);
  box-shadow: 0 0 0 4px rgba(36, 177, 216, 0.12);
}

body:not([data-theme="dark"]) .user-admin-table thead th {
  color: #668394 !important;
  background: #edf8fc !important;
}

body:not([data-theme="dark"]) .user-admin-table tbody tr:hover,
body:not([data-theme="dark"]) .user-admin-table tbody tr:hover > td {
  background-color: rgba(53, 196, 223, 0.08) !important;
}

body:not([data-theme="dark"]) .dropdown-menu,
body:not([data-theme="dark"]) .modal-content {
  color: #17384c;
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(24, 126, 164, 0.14);
  box-shadow: 0 20px 55px rgba(31, 104, 132, 0.15);
}

/* Blue night mode: same identity, stronger contrast */
[data-theme="dark"] .dashboard-column {
  background:
    radial-gradient(circle at 8% 0%, rgba(45, 172, 207, 0.14), transparent 30%),
    linear-gradient(160deg, #061a2c 0%, #08243a 56%, #0b2940 100%);
  border-right-color: rgba(101, 212, 233, 0.10);
  box-shadow: 18px 0 55px rgba(0, 0, 0, 0.22);
}

[data-theme="dark"] .user-profile {
  border-color: rgba(101, 212, 233, 0.11);
  background: rgba(255, 255, 255, 0.045);
}

[data-theme="dark"] .user-profile::before {
  background: linear-gradient(90deg, #159fc7, #35c4df, #79d9eb);
}

[data-theme="dark"] .avatar-ring {
  background: linear-gradient(135deg, #159fc7, #79d9eb);
}

[data-theme="dark"] .chat-column,
[data-theme="dark"] .pruebas-panel,
[data-theme="dark"] .analytics-content {
  background:
    radial-gradient(circle at 86% 2%, rgba(53, 196, 223, 0.12), transparent 29%),
    radial-gradient(circle at 9% 94%, rgba(21, 159, 199, 0.07), transparent 24%),
    linear-gradient(150deg, #061a2c, #08243a 58%, #0b2940);
}

[data-theme="dark"] .chat-column::before {
  opacity: 0.34;
  background:
    radial-gradient(circle at 106% 108%, rgba(53, 196, 223, 0.16) 0 17%, transparent 17.2%),
    radial-gradient(circle at -5% -8%, rgba(101, 212, 233, 0.08) 0 17%, transparent 17.2%);
  background-size: auto;
  mask-image: none;
}

[data-theme="dark"] .chat-header,
[data-theme="dark"] .stat-card-premium,
[data-theme="dark"] .chart-container-premium,
[data-theme="dark"] .user-admin-toolbar,
[data-theme="dark"] .user-admin-panel,
[data-theme="dark"] .pruebas-form-card,
[data-theme="dark"] .pruebas-list-wrapper,
[data-theme="dark"] .prueba-card {
  border-color: rgba(101, 212, 233, 0.10);
  background: rgba(11, 41, 64, 0.90);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

[data-theme="dark"] .message-bubble,
[data-theme="dark"] .message.bot-message,
[data-theme="dark"] .input-wrapper {
  background: rgba(11, 41, 64, 0.94);
  border-color: rgba(101, 212, 233, 0.10);
}

[data-theme="dark"] .message.user-message,
[data-theme="dark"] .message.user-message .message-bubble,
[data-theme="dark"] .send-btn:not(:disabled),
[data-theme="dark"] .btn-primary {
  color: #ffffff;
  background: linear-gradient(125deg, #159fc7, #087da7 58%, #155b79);
  border-color: transparent;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

[data-theme="dark"] .message.user-message {
  padding: 12px 16px;
  background: linear-gradient(125deg, #159fc7, #087da7 58%, #155b79) !important;
  border-radius: 18px 18px 5px 18px;
}

[data-theme="dark"] .quick-reply:hover {
  color: #ffffff;
  background: rgba(21, 159, 199, 0.18);
  border-color: rgba(101, 212, 233, 0.28);
}

[data-theme="dark"] .theme-toggle,
[data-theme="dark"] .dashboard-toggle {
  color: #dff8fc;
  background: rgba(11, 41, 64, 0.92);
  border-color: rgba(101, 212, 233, 0.18);
}

[data-theme="dark"] .theme-toggle i,
[data-theme="dark"] .dashboard-toggle i {
  color: #65d4e9;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select,
[data-theme="dark"] .user-search,
[data-theme="dark"] .user-admin-toolbar select {
  color: #f7f9fc;
  background-color: #08243a;
  border-color: rgba(101, 212, 233, 0.12);
}

[data-theme="dark"] .user-admin-table {
  --bs-table-color: #d8e8f0;
  --bs-table-bg: transparent;
  --bs-table-border-color: rgba(101, 212, 233, 0.10);
}

[data-theme="dark"] .user-admin-table thead th {
  color: #91b2c6 !important;
  background: #08243a !important;
}

[data-theme="dark"] .dropdown-menu,
[data-theme="dark"] .modal-content {
  color: #f7f9fc;
  background: #0b2940;
  border-color: rgba(101, 212, 233, 0.12);
}

/* Authentication cards follow the same white-cyan system */
body.auth-surface:not(.dark-mode) .verify-card {
  border-color: rgba(17, 115, 151, 0.13);
  border-radius: 30px;
  background: #ffffff;
  box-shadow: 0 30px 80px rgba(31, 104, 132, 0.16);
}

body.auth-surface:not(.dark-mode) .verify-card > .card-header {
  background:
    radial-gradient(circle at 90% 5%, rgba(75, 190, 226, 0.15), transparent 32%),
    linear-gradient(135deg, #ffffff, #eaf7fc);
}

body.auth-surface:not(.dark-mode) .verify-card > .card-header::after {
  background: linear-gradient(90deg, #087fa8, #17aed4, #70d6ec);
}

body.auth-surface:not(.dark-mode) .verify-card .card-header h1,
body.auth-surface:not(.dark-mode) .verify-card .card-header p {
  color: #16384c !important;
}

body.auth-surface.dark-mode {
  background:
    radial-gradient(circle at 14% 10%, rgba(101, 212, 233, 0.10), transparent 31%),
    radial-gradient(circle at 84% 22%, rgba(21, 159, 199, 0.12), transparent 29%),
    linear-gradient(135deg, #061a2c 0%, #08243a 55%, #0b2940 100%);
}

body.auth-surface.dark-mode::before,
body.auth-surface.dark-mode::after {
  width: clamp(310px, 27vw, 470px);
  height: clamp(310px, 27vw, 470px);
  clip-path: none;
  border-radius: 50%;
  filter: blur(1px);
}

body.auth-surface.dark-mode::before {
  top: -185px;
  left: -145px;
  background: rgba(101, 212, 233, 0.12);
  opacity: 0.65;
}

body.auth-surface.dark-mode::after {
  right: -175px;
  bottom: -195px;
  background: linear-gradient(135deg, #35c4df, #087da7);
  opacity: 0.20;
}

body.auth-surface.dark-mode .login-card,
body.auth-surface.dark-mode .verify-card,
body.auth-surface.dark-mode .modal-content {
  color: #f5f9fc;
  background: rgba(11, 41, 64, 0.97) !important;
  border-color: rgba(101, 212, 233, 0.12) !important;
  box-shadow: 0 32px 95px rgba(0, 0, 0, 0.36);
}

body.auth-surface.dark-mode .login-card > .card-header {
  padding: 27px 30px;
  display: grid;
  grid-template-columns: 48px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 15px;
  text-align: left;
  background:
    radial-gradient(circle at 92% 0%, rgba(53, 196, 223, 0.13), transparent 34%),
    linear-gradient(135deg, #0b2940, #0d344f);
}

body.auth-surface.dark-mode .verify-card > .card-header {
  background:
    radial-gradient(circle at 92% 0%, rgba(53, 196, 223, 0.13), transparent 34%),
    linear-gradient(135deg, #0b2940, #0d344f);
}

body.auth-surface.dark-mode .login-card > .card-header::after,
body.auth-surface.dark-mode .verify-card > .card-header::after {
  background: linear-gradient(90deg, #087fa8, #35c4df, #79d9eb);
}

body.auth-surface.dark-mode .login-card .logo-container {
  width: 48px;
  height: 48px;
  margin: 0;
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: center;
  border-color: rgba(101, 212, 233, 0.24);
  background: rgba(53, 196, 223, 0.10);
}

body.auth-surface.dark-mode .login-card .card-header h1 {
  grid-column: 2;
  margin: 0 0 3px;
  font-size: 1.45rem;
}

body.auth-surface.dark-mode .login-card .card-header p {
  grid-column: 2;
  margin: 0;
  color: #91b2c6;
}

body.auth-surface.dark-mode .form-control,
body.auth-surface.dark-mode .form-select,
body.auth-surface.dark-mode .code-input {
  color: #f7f9fc !important;
  background: #08243a !important;
  border-color: rgba(101, 212, 233, 0.12) !important;
}

body.auth-surface.dark-mode .btn-primary {
  color: #ffffff;
  background: linear-gradient(125deg, #159fc7, #087da7 58%, #155b79);
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

body.auth-surface.dark-mode .btn-outline-secondary {
  color: #d8e8f0;
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(101, 212, 233, 0.16);
}

body.auth-surface.dark-mode .floating-buttons .theme-toggle,
body.auth-surface.dark-mode .language-toggle,
body.auth-surface.dark-mode .back-btn {
  color: #dff8fc;
  background: rgba(11, 41, 64, 0.94);
  border-color: rgba(101, 212, 233, 0.24);
}

body.auth-surface.dark-mode .language-dropdown {
  color: #f7f9fc;
  background: rgba(11, 41, 64, 0.98);
  border-color: rgba(101, 212, 233, 0.14);
}

body.auth-surface.dark-mode .language-option {
  color: #d8e8f0;
}

body.auth-surface.dark-mode .language-option:hover,
body.auth-surface.dark-mode .language-option.active {
  color: #ffffff;
  background: rgba(53, 196, 223, 0.13);
}
/* Selected Clara 3D avatar integration */
.message-avatar {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
}

.message-avatar img.clara-avatar-img {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 50%;
  object-fit: contain;
  background: transparent;
  box-shadow: 0 0 0 1px rgba(53, 196, 223, 0.30), 0 9px 22px rgba(31, 104, 132, 0.14);
}

body.auth-surface .login-card > .card-header {
  grid-template-columns: 92px minmax(0, 1fr) !important;
  grid-template-rows: auto !important;
  column-gap: 18px !important;
}

body.auth-surface .login-card .logo-container {
  width: 92px !important;
  height: 92px !important;
  grid-row: 1 !important;
  overflow: visible;
  transform: none;
  border: 0 !important;
  background: transparent !important;
}

body.auth-surface .login-card .clara-login-avatar {
  width: 92px !important;
  height: 92px !important;
  max-width: none;
  border-radius: 50%;
  object-fit: contain;
  stroke: none;
  filter: drop-shadow(0 8px 16px rgba(31, 104, 132, 0.20));
}

body.auth-surface .login-card .login-heading {
  display: flex;
  grid-column: 2;
  grid-row: 1;
  flex-direction: column;
  align-self: center;
  gap: 2px;
}

body.auth-surface .login-card .login-heading h1,
body.auth-surface .login-card .login-heading p {
  margin: 0;
}

body.auth-surface.dark-mode .login-card .clara-login-avatar {
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.32));
}

@media (max-width: 480px) {
  body.auth-surface .login-card > .card-header {
    grid-template-columns: 74px minmax(0, 1fr) !important;
    column-gap: 14px !important;
  }

  body.auth-surface .login-card .logo-container {
    width: 74px !important;
    height: 74px !important;
  }

  body.auth-surface .login-card .clara-login-avatar {
    width: 74px !important;
    height: 74px !important;
  }
}
@media (max-width: 900px) {
  .chat-wrapper,
  .pruebas-panel,
  .analytics-content {
    padding-right: 22px;
    padding-left: 22px;
  }

  .message {
    max-width: 88%;
  }
}

@media (max-width: 768px) {
  .dashboard-column {
    width: min(86vw, 292px);
  }

  .chat-wrapper,
  .pruebas-panel,
  .analytics-content {
    padding: 14px 13px 16px;
  }

  .chat-wrapper {
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .chat-footer {
    margin-top: 8px;
  }

  .chat-header {
    min-height: 72px;
    padding: 10px 12px;
    border-radius: 16px;
  }

  .logo-container {
    width: 125px;
    height: 43px;
  }

  .header-content,
  .brand,
  .brand-text {
    min-width: 0;
  }

  .header-content {
    flex: 1;
  }

  .brand-text {
    flex: 1;
  }

  .brand {
    gap: 10px;
  }

  .chat-title {
    font-size: 0.94rem;
  }

  .language-name {
    display: none;
  }

  .language-btn {
    padding: 7px 9px;
  }

  .dashboard-toggle {
    top: 26px;
    left: 7px;
  }

  .theme-toggle {
    top: 16px;
    right: 13px;
  }

  .message {
    max-width: 96%;
  }

  .message-avatar {
    width: 54px;
    height: 54px;
    flex-basis: 54px;
  }

  .message-bubble,
  .message.bot-message {
    padding: 15px 16px;
  }

  .quick-replies {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .quick-reply {
    width: 100%;
    min-height: 44px;
    justify-content: flex-start;
    padding: 9px 11px;
    font-size: 0.78rem;
  }

  .input-wrapper {
    min-height: 62px;
    padding: 7px 7px 7px 12px;
    border-radius: 17px;
  }

  .action-btn {
    width: 36px;
    height: 36px;
  }

  .auth-surface .login-container,
  .auth-surface .verify-container {
    max-width: 430px;
  }
}

@media (max-width: 480px) {
  .brand-text {
    display: none;
  }

  .quick-replies {
    grid-template-columns: 1fr;
  }

  .input-actions {
    gap: 4px;
  }

  .mic-btn,
  .speaker-btn {
    display: none;
  }

  .auth-surface .card-body {
    padding: 24px 20px 25px;
  }

  .auth-surface .login-card > .card-header,
  .auth-surface .verify-card > .card-header {
    padding: 23px 21px 21px;
  }

  .auth-surface .code-inputs {
    gap: 6px;
  }

  .auth-surface .code-input {
    width: 42px;
    height: 52px;
  }
}

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