:root {
  --dash-bg: #08111b;
  --dash-surface: #0f1823;
  --dash-surface-2: #131e2b;
  --dash-line: rgba(157, 180, 205, .16);
  --dash-text: #edf5ff;
  --dash-muted: #9dacbd;
  --dash-blue: #2f7df4;
  --dash-cyan: #20c6df;
  --dash-orange: #f39024;
  --dash-green: #36d47c;
  --dash-violet: #776cf4;
}

body.workspace-active {
  color: var(--dash-text);
  background: var(--dash-bg);
}

body.workspace-active .portal-header,
body.workspace-active .portal-footer {
  display: none;
}

body.workspace-active .portal-shell {
  width: 100%;
  margin: 0;
  padding: 0;
}

.workspace-app {
  min-height: 100vh;
  display: block;
  padding-left: 246px;
  background:
    radial-gradient(circle at 72% 0%, rgba(47, 125, 244, .08), transparent 28%),
    linear-gradient(145deg, #08111b, #0a131e 55%, #07101a);
  transition: padding-left .24s ease;
}

.workspace-app[hidden] { display: none !important; }

.workspace-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 20;
  width: 246px;
  height: 100vh;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--dash-line);
  background: rgba(7, 15, 25, .96);
  overflow-y: auto;
  scrollbar-color: rgba(143,165,187,.45) transparent;
  scrollbar-width: thin;
  transition: width .24s ease, transform .24s ease;
}

.sidebar-collapse-toggle {
  position: sticky;
  top: 0;
  z-index: 2;
  width: 34px;
  height: 34px;
  min-height: 34px;
  margin: -4px 0 14px auto;
  padding: 0;
  display: grid;
  place-items: center;
  color: #ffd39b;
  border: 1px solid rgba(243,144,36,.38);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(47,125,244,.22), rgba(243,144,36,.18));
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
}

.sidebar-collapse-toggle span {
  display: block;
  font-size: 24px !important;
  line-height: 1;
  transform: translateY(-1px);
}

.workspace-app.sidebar-collapsed { padding-left: 76px; }
.workspace-app.sidebar-collapsed .workspace-sidebar { width: 76px; padding-inline: 12px; overflow-x: hidden; }
.workspace-app.sidebar-collapsed .workspace-brand { justify-content: center; padding-inline: 0; }
.workspace-app.sidebar-collapsed .workspace-brand strong,
.workspace-app.sidebar-collapsed .workspace-brand em,
.workspace-app.sidebar-collapsed .workspace-navigation a:not(.active) > small,
.workspace-app.sidebar-collapsed .workspace-navigation a small,
.workspace-app.sidebar-collapsed .sidebar-plan-card,
.workspace-app.sidebar-collapsed .sidebar-help { display: none; }
.workspace-app.sidebar-collapsed .workspace-navigation a { justify-content: center; padding-inline: 0; gap: 0; font-size: 0; }
.workspace-app.sidebar-collapsed .workspace-navigation a > span { width: auto; font-size: 22px !important; }
.workspace-app.sidebar-collapsed .sidebar-collapse-toggle { margin-inline: auto; }
.workspace-app.sidebar-collapsed .sidebar-collapse-toggle span { transform: rotate(180deg) translateY(1px); }

.workspace-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 8px 24px;
  color: var(--dash-text) !important;
  text-decoration: none;
}

.workspace-brand > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #111820 !important;
  background: linear-gradient(145deg, #ffd078, var(--dash-orange));
  box-shadow: 0 0 22px rgba(243, 144, 36, .3);
  font-size: 17px !important;
  letter-spacing: 0 !important;
}

.workspace-brand strong { font-size: 22px; }
.workspace-brand em { color: var(--dash-muted); font-size: 17px; font-style: normal; font-weight: 300; }

.workspace-navigation { display: grid; gap: 7px; }

.workspace-navigation a {
  min-height: 48px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #bac7d8 !important;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  transition: .2s ease;
}

.workspace-navigation a:hover,
.workspace-navigation a.active {
  color: #fff !important;
  border-color: rgba(47, 125, 244, .55);
  background: linear-gradient(90deg, rgba(47, 125, 244, .28), rgba(47, 125, 244, .11));
  box-shadow: inset 0 0 26px rgba(47, 125, 244, .08);
}

.workspace-navigation a > span { width: 22px; color: #8cb8ff !important; font-size: 20px !important; letter-spacing: 0 !important; }
.workspace-navigation a > small { margin-left: auto; color: #ffbd6c; font-size: 8px; letter-spacing: .08em; }
.workspace-navigation a.is-locked { opacity: .68; }

.sidebar-plan-card,
.sidebar-help {
  padding: 15px;
  border: 1px solid var(--dash-line);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(18, 29, 42, .95), rgba(10, 18, 28, .96));
}

.sidebar-plan-card { --plan-accent: #55d58b; margin-top: auto; }
.sidebar-plan-card[data-plan="professional"] { --plan-accent: #f3a344; }
.sidebar-plan-card[data-plan="advanced"] { --plan-accent: #9588ff; }
.sidebar-plan-card small { color: var(--dash-muted); font-size: 9px; letter-spacing: .1em; }
.sidebar-plan-card > strong { display: block; margin: 8px 0 5px; color: var(--plan-accent); font-size: 17px; text-transform: uppercase; }
.sidebar-plan-card p { min-height: 34px; margin: 0; color: var(--dash-muted); font-size: 11px; line-height: 1.45; }
.sidebar-plan-card a { display: block; margin-top: 13px; color: #a9caff !important; font-size: 11px; text-decoration: none; }
.plan-details-toggle { width: 28px; height: 24px; margin: 6px auto 0; padding: 0; display: grid; place-items: center; color: var(--plan-accent); border: 1px solid color-mix(in srgb, var(--plan-accent) 48%, transparent); border-radius: 7px; background: color-mix(in srgb, var(--plan-accent) 8%, transparent); }
.plan-details-toggle span { display: block; font-size: 15px; line-height: 1; transition: transform .2s ease; }
.plan-details-toggle:hover { border-color: var(--plan-accent); background: color-mix(in srgb, var(--plan-accent) 14%, transparent); transform: translateY(1px); }
.plan-details-toggle:focus-visible { outline: 2px solid var(--plan-accent); outline-offset: 2px; }
.sidebar-plan-card.is-open .plan-details-toggle span { transform: rotate(180deg); }
.plan-details[hidden] { display: none !important; }
.plan-details { padding-top: 12px; border-top: 1px solid color-mix(in srgb, var(--plan-accent) 30%, transparent); animation: plan-details-enter .22s ease both; }
@keyframes plan-details-enter { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
.plan-progress { height: 6px; margin-top: 12px; display: block; overflow: hidden; border-radius: 999px; background: #273444; }
.plan-progress i { width: 0; height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, var(--dash-blue), var(--plan-accent)); transition: width .35s ease; }
.plan-clarity { margin-top: 14px; }
.plan-clarity h3 { margin: 0 0 9px; color: var(--plan-accent); font-size: 12px; line-height: 1.25; }
.plan-clarity ul { margin: 0; padding: 0; display: grid; gap: 5px; list-style: none; }
.plan-clarity li { position: relative; padding-left: 12px; color: #b9c8d8; font-size: 9px; line-height: 1.35; }
.plan-clarity li::before { content: ""; position: absolute; left: 0; top: .48em; width: 5px; height: 5px; border-radius: 50%; background: var(--plan-accent); box-shadow: 0 0 7px color-mix(in srgb, var(--plan-accent) 55%, transparent); }
.sidebar-help { margin-top: 12px; display: grid; grid-template-columns: auto 1fr; column-gap: 9px; color: #fff !important; text-decoration: none; }
.sidebar-help > span { grid-row: 1 / 3; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--dash-line); border-radius: 50%; color: #bcd0e7 !important; font-size: 14px !important; }
.sidebar-help strong { font-size: 12px; }
.sidebar-help small { color: var(--dash-muted); font-size: 10px; }

.workspace-head {
  position: sticky;
  top: 0;
  z-index: 15;
  min-height: 72px;
  margin: 0;
  padding: 12px 28px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto auto auto auto;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--dash-line);
  background: rgba(8, 17, 27, .9);
  backdrop-filter: blur(18px);
}

.workspace-search { position: relative; margin: 0; }
.workspace-search > span { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--dash-muted) !important; font-size: 19px !important; }
.workspace-search input { min-height: 44px; padding-left: 43px; color: var(--dash-text); border-color: var(--dash-line); background: rgba(255, 255, 255, .045); }
.workspace-notifications { position: relative; width: 44px; height: 44px; padding: 0; display: grid; place-items: center; color: #bad3ef; border: 1px solid var(--dash-line); background: rgba(255,255,255,.035); }
.workspace-notifications:hover, .workspace-notifications:focus-visible { color: #fff; border-color: rgba(47,125,244,.55); background: rgba(47,125,244,.14); outline: none; }
.workspace-notifications svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.workspace-notifications > span { position: absolute; right: -5px; top: -5px; min-width: 18px; height: 18px; padding: 0 4px; display: grid; place-items: center; color: #fff !important; border: 2px solid var(--dash-bg); border-radius: 999px; background: var(--dash-blue); font-size: 8px !important; letter-spacing: 0 !important; }
.workspace-notifications > span[hidden] { display: none !important; }
.workspace-company { justify-self: end; min-height: 44px; padding: 0 15px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--dash-line); border-radius: 10px; background: rgba(255,255,255,.035); }
.workspace-company > span { color: #9dc1ff !important; }
.workspace-company small, .workspace-company strong { display: block; }
.workspace-company small { margin-bottom: 2px; color: var(--dash-muted); font-size: 7px; letter-spacing: .08em; }
.workspace-company strong { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.workspace-user { display: flex; align-items: center; gap: 9px; }
.workspace-user > span { width: 38px; height: 38px; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; color: #101820 !important; background: linear-gradient(135deg, #d7e8f9, #f4a64c); font-size: 14px !important; letter-spacing: 0 !important; }
.workspace-user > span img { width: 100%; height: 100%; object-fit: cover; display: block; }
.workspace-user > span img[hidden] { display: none; }
.workspace-user > span b { font: inherit; color: inherit; letter-spacing: 0 !important; }
.workspace-user > span b[hidden] { display: none; }
.workspace-user strong, .workspace-user small { display: block; }
.workspace-user strong { font-size: 12px; }
.workspace-user small { color: #f6bd73; font-size: 10px; }
.workspace-head > #logoutButton { padding: 10px 13px; color: #ffd7a6; border: 1px solid rgba(243, 144, 36, .28); background: rgba(243, 144, 36, .08); }
.workspace-mobile-logout { display: none; padding: 10px 12px; color: #ffd7a6; border: 1px solid rgba(243, 144, 36, .32); background: linear-gradient(135deg, rgba(47,125,244,.12), rgba(243,144,36,.16)); }
.workspace-theme { width: 40px; height: 40px; padding: 0; display: grid; place-items: center; color: #a9caff; border: 1px solid var(--dash-line); background: #142131; }
.sidebar-toggle { display: none; color: #fff; background: #172334; }

.workspace-nav { display: none; }
.workspace-app.upload-view-active .self-demo-card,
.workspace-app.upload-view-active .dashboard-heading,
.workspace-app.upload-view-active .quick-actions,
.workspace-app.upload-view-active .portal-grid,
.workspace-app.upload-view-active .analytics-grid,
.workspace-app.upload-view-active .insight-panel,
.workspace-app.upload-view-active .secondary-insights,
.workspace-app.upload-view-active .additional-data-panel,
.workspace-app.upload-view-active .future-features,
.workspace-app.dedicated-view-active .self-demo-card,
.workspace-app.dedicated-view-active .dashboard-heading,
.workspace-app.dedicated-view-active .quick-actions,
.workspace-app.dedicated-view-active .upload-panel,
.workspace-app.dedicated-view-active .portal-grid,
.workspace-app.dedicated-view-active .analytics-grid,
.workspace-app.dedicated-view-active .insight-panel,
.workspace-app.dedicated-view-active .secondary-insights,
.workspace-app.dedicated-view-active .additional-data-panel,
.workspace-app.dedicated-view-active .future-features { display: none !important; }
#equipoPortal[hidden] { display: none !important; }
#automatizacionPortal[hidden] { display: none !important; }
#administracionPortal[hidden] { display: none !important; }
#aiPortal[hidden] { display: none !important; }
#configuracionPortal[hidden] { display: none !important; }
#historialPortal[hidden] { display: none !important; }

.self-demo-card,
.dashboard-heading,
.quick-actions,
.upload-panel,
.portal-grid,
.analytics-grid,
.insight-panel,
.secondary-insights,
.additional-data-panel,
.workspace-columns,
.chat-panel,
.administration-panel,
.automation-panel,
.team-panel,
.settings-panel,
.future-features {
  width: min(1180px, calc(100% - 48px));
  margin-left: auto;
  margin-right: auto;
  scroll-margin-top: 92px;
}

.self-demo-card { margin-top: 22px; padding: 22px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); gap: 18px; align-items: center; border: 1px solid rgba(243,144,36,.42); border-radius: 22px; background: radial-gradient(circle at 88% 18%, rgba(243,144,36,.2), transparent 32%), linear-gradient(135deg, rgba(18,55,86,.94), rgba(15,24,34,.95) 54%, rgba(60,36,18,.92)); box-shadow: 0 22px 54px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.08); }
.self-demo-card small { color: var(--dash-orange); font-weight: 900; letter-spacing: .14em; }
.self-demo-card h2 { margin: 8px 0; color: #fff; font-size: clamp(23px, 2.7vw, 34px); }
.self-demo-card p { margin: 0; color: var(--dash-muted); line-height: 1.6; }
.self-demo-form { display: grid; grid-template-columns: 1fr 120px; gap: 12px; align-items: end; padding: 16px; border: 1px solid rgba(111,196,255,.18); border-radius: 18px; background: rgba(5,17,29,.42); }
.self-demo-form label { margin: 0; color: #ffdca8; }
.self-demo-form select { min-height: 52px; color: #fff; background: rgba(13,31,48,.88); border-color: rgba(111,196,255,.28); }
.self-demo-form button { grid-column: 1 / -1; color: #fff; background: linear-gradient(115deg, #2478d4, #1a4775 45%, #df851f); box-shadow: 0 12px 28px rgba(33,102,181,.2); }
.self-demo-form .status { grid-column: 1 / -1; min-height: 0; margin: 0; }
.self-demo-locked { padding: 18px; border: 1px solid rgba(243,144,36,.28); border-radius: 18px; background: linear-gradient(135deg, rgba(255,205,128,.12), rgba(32,92,138,.12)); }
.self-demo-locked strong { display: block; margin-bottom: 8px; color: #ffdca8; font-size: 16px; }
.self-demo-locked p { color: var(--dash-muted); font-size: 12px; }
.dashboard-heading { padding-top: 30px; display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.dashboard-heading small { color: var(--dash-orange); font-weight: 900; letter-spacing: .14em; }
.dashboard-heading h1 { margin: 7px 0 5px; color: #fff; font-size: clamp(30px, 4vw, 42px); line-height: 1.05; }
.dashboard-heading p { margin: 0; color: var(--dash-muted); }
.dashboard-heading > span { padding: 8px 12px; border: 1px solid rgba(47,125,244,.35); border-radius: 999px; color: #a9caff; background: rgba(47,125,244,.1); font-size: 10px; font-weight: 900; letter-spacing: .08em; }
#planBadge { position: relative; isolation: isolate; min-width: 126px; overflow: hidden; color: #fff; border-color: rgba(111,196,255,.58); background: linear-gradient(115deg, #155fc4 0%, #168da7 28%, #e6871f 58%, #c66d17 76%, #155fc4 100%); background-size: 320% 320%; box-shadow: 0 8px 24px rgba(20,102,184,.22), inset 0 1px 0 rgba(255,255,255,.2); text-align: center; text-shadow: 0 1px 8px rgba(3,13,25,.42); animation: keyai-plan-colors 7s ease-in-out infinite; transition: transform .24s cubic-bezier(.2,.8,.2,1), box-shadow .24s ease, border-color .24s ease; }
#planBadge::after { content: ""; position: absolute; inset: -45% auto -45% -42%; width: 30%; pointer-events: none; opacity: .5; background: linear-gradient(90deg, transparent, rgba(255,255,255,.68), transparent); mix-blend-mode: screen; transform: rotate(18deg); animation: keyai-plan-shine 5.2s ease-in-out infinite; }
#planBadge:hover { transform: translateY(-2px) scale(1.035); border-color: rgba(255,196,103,.86); box-shadow: 0 13px 30px rgba(18,115,187,.3), 0 0 20px rgba(242,142,32,.18), inset 0 1px 0 rgba(255,255,255,.28); }
@keyframes keyai-plan-colors { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes keyai-plan-shine { 0%, 56% { left: -42%; opacity: 0; } 68% { opacity: .62; } 86%, 100% { left: 118%; opacity: 0; } }

.quick-actions { margin-top: 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.quick-action { position: relative; min-height: 76px; padding: 14px 18px; display: grid; grid-template-columns: auto 1fr; column-gap: 13px; text-align: left; overflow: hidden; color: #fff; border: 1px solid rgba(98,158,255,.38); background: linear-gradient(115deg, rgba(32,102,230,.95), rgba(25,68,169,.86)); box-shadow: 0 16px 35px rgba(0,0,0,.16); }
.quick-action > span { grid-row: 1 / 3; align-self: center; color: #b9d6ff !important; font-size: 29px !important; letter-spacing: 0 !important; }
.quick-action strong { font-size: 14px; }
.quick-action small { color: rgba(238,246,255,.75); font-size: 11px; }
.quick-action em { position: absolute; right: 8px; bottom: 7px; color: rgba(255,255,255,.58); font-size: 8px; font-style: normal; letter-spacing: .06em; }
.quick-action.is-locked { filter: saturate(.45); opacity: .7; }
.quick-action.action-pdf { isolation: isolate; border-color: rgba(255,193,111,.55); background: linear-gradient(115deg, #155fc4, #168da7 32%, #e6871f 68%, #155fc4); background-size: 260% 260%; animation: keyai-plan-colors 6.5s ease-in-out infinite; }
.quick-action.action-pdf::after { content: ""; position: absolute; inset: -50% auto -50% -40%; width: 28%; opacity: 0; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(255,255,255,.68), transparent); transform: rotate(17deg); animation: keyai-plan-shine 4.8s ease-in-out infinite; }
.quick-action.action-pdf > span { width: 48px; height: 48px; display: grid; place-items: center; color: #07131f !important; border-radius: 15px; background: linear-gradient(135deg, #fff4dc, #ffc16f); font-size: 12px !important; font-weight: 950; box-shadow: 0 10px 22px rgba(230,135,31,.24); }
.quick-action.action-pdf:hover { transform: translateY(-2px); box-shadow: 0 20px 44px rgba(17,90,160,.24), 0 0 24px rgba(230,135,31,.18); }
.section-loader[hidden] { display: none !important; }
.section-loader { position: fixed; inset: 0; z-index: 9998; padding: 22px; display: grid; place-items: center; background: radial-gradient(circle at 18% 24%, rgba(47,125,244,.22), transparent 32%), radial-gradient(circle at 84% 76%, rgba(243,144,36,.22), transparent 32%), rgba(4,11,19,.72); backdrop-filter: blur(12px); animation: section-loader-in .18s ease both; }
.section-loader.is-leaving { animation: section-loader-out .18s ease both; }
.section-loader-card { width: min(560px, 100%); padding: 26px; overflow: hidden; position: relative; border: 1px solid rgba(143,173,203,.2); border-radius: 22px; text-align: center; background: linear-gradient(145deg, rgba(12,24,38,.94), rgba(9,17,28,.94)); box-shadow: 0 24px 70px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.08); }
.section-loader-card span { width: 58px; height: 58px; margin: 0 auto 13px; display: grid; place-items: center; border-radius: 18px; background: linear-gradient(135deg, rgba(47,125,244,.34), rgba(243,144,36,.28)); box-shadow: 0 0 32px rgba(47,125,244,.2); }
.section-loader-card span::before { content: ""; width: 24px; height: 24px; border-radius: 50%; border: 3px solid rgba(255,255,255,.2); border-top-color: #ffd39b; animation: keyaiLoaderSpin .9s linear infinite; }
.section-loader-card strong { display: block; color: #fff6df; font-size: clamp(22px, 4vw, 34px); font-weight: 950; line-height: 1.1; }
.section-loader-card p { max-width: 430px; margin: 9px auto 18px; color: #b9c9d8; font-size: 13px; line-height: 1.55; }
.section-loader-card i { height: 9px; display: block; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.section-loader-card i::before { content: ""; width: 100%; height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, var(--dash-blue), #20c6df, var(--dash-orange)); transform-origin: left center; animation: section-loader-progress 1s linear forwards; }
@keyframes section-loader-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes section-loader-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes section-loader-out { from { opacity: 1; } to { opacity: 0; } }
body.workspace-active .panel,
.metric-card {
  color: var(--dash-text);
  border: 1px solid var(--dash-line);
  background: linear-gradient(145deg, rgba(18, 29, 42, .98), rgba(11, 19, 29, .98));
  box-shadow: 0 18px 45px rgba(0,0,0,.16);
}

.upload-panel { margin-top: 16px; }
.upload-head-actions { display: flex; align-items: center; gap: 8px; }
.portal-upload-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: end; }
.portal-upload-form label { margin: 0; color: #b8c8d9; }
.portal-upload-form input, .portal-upload-form select { color: #eaf4ff; border-color: var(--dash-line); background: #101b28; }
.portal-upload-form button, .upload-panel .panel-title button { min-height: 46px; color: #fff; background: linear-gradient(110deg, var(--dash-blue), #1752b8); }
.upload-panel .panel-title #clearDashboardButton { color: #ffd6a2; border: 1px solid rgba(243,144,36,.38); background: linear-gradient(110deg, rgba(159,73,16,.82), rgba(211,106,21,.88)); }
.upload-panel .panel-title #clearDashboardButton:hover, .upload-panel .panel-title #clearDashboardButton:focus-visible { color: #fff; box-shadow: 0 0 0 2px rgba(243,144,36,.16), 0 10px 22px rgba(0,0,0,.18); outline: none; }
.upload-panel .panel-title #clearDashboardButton:disabled { cursor: not-allowed; filter: grayscale(.6); opacity: .45; }
.portal-upload-form > button { grid-column: 1 / -1; }
.portal-upload-form button:disabled { cursor: not-allowed; opacity: .62; }
.portal-upload-form button[data-loading="true"] { cursor: wait; }
.portal-file-type-selector { grid-column: 1 / -1; min-width: 0; margin: 0; padding: 13px 14px; border: 1px solid rgba(67,138,217,.3); border-radius: 12px; background: linear-gradient(105deg, rgba(28,88,175,.12), rgba(32,198,223,.06), rgba(243,144,36,.07)); }
.portal-file-type-selector legend { padding: 0 7px; color: #eef7ff; font-size: 12px; font-weight: 900; letter-spacing: .035em; }
.portal-file-type-selector > p { margin: 0 0 10px !important; color: #aebfd0 !important; font-size: 10px; line-height: 1.45; }
.portal-file-type-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.portal-file-type-options label { position: relative; min-width: 0; padding: 10px 12px; display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; color: #c8d8e8; border: 1px solid rgba(90,146,202,.3); border-radius: 10px; background: rgba(9,20,33,.55); cursor: pointer; transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.portal-file-type-options label:hover, .portal-file-type-options label:focus-within { transform: translateY(-1px); border-color: rgba(32,198,223,.58); }
.portal-file-type-options label:has(input:checked) { color: #fff; border-color: rgba(243,144,36,.72); background: linear-gradient(112deg, rgba(29,101,200,.38), rgba(22,157,183,.25), rgba(220,116,21,.28)); box-shadow: 0 0 0 2px rgba(243,144,36,.08), 0 8px 20px rgba(0,0,0,.12); }
.portal-file-type-options input { width: 16px; height: 16px; min-height: 0; grid-row: 1 / 3; margin: 0; accent-color: #f39024; }
.portal-file-type-options span { overflow: hidden; text-overflow: ellipsis; color: inherit; font-size: 11px; font-weight: 900; white-space: nowrap; }
.portal-file-type-options small { color: #8fa5b9; font-size: 8px; }
.portal-file-type-options label:has(input:checked) small { color: #d7eaff; }
.portal-file-configuration { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: end; animation: portal-file-configuration-in .26s ease both; }
.portal-file-configuration[hidden] { display: none !important; }
.portal-file-configuration > .portal-sheet-selector, .portal-file-configuration > button, .portal-file-configuration > .period-selection-help, .portal-file-configuration > .file-selection { grid-column: 1 / -1; }
.portal-file-precheck { grid-column: 1 / -1; position: relative; min-height: 54px; margin-top: -3px; padding: 13px 16px 13px 58px; overflow: hidden; display: flex; align-items: center; border: 1px solid rgba(243,144,36,.48); border-radius: 14px; color: #ffe0ae; background: linear-gradient(110deg, rgba(47,125,244,.18), rgba(243,144,36,.2), rgba(13,185,215,.14)); box-shadow: 0 14px 32px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.08); animation: keyaiFilePrecheckPulse 1s ease-in-out infinite; }
.portal-file-precheck[hidden] { display: none !important; }
.portal-file-precheck span { position: absolute; left: 18px; width: 24px; height: 24px; border: 3px solid rgba(255,255,255,.2); border-top-color: #f39024; border-right-color: #2f7df4; border-radius: 50%; animation: keyaiFilePrecheckSpin .72s linear infinite; }
.portal-file-precheck strong { position: relative; z-index: 1; color: inherit; font-size: 12px; font-weight: 950; letter-spacing: .025em; }
.portal-file-precheck::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent); transform: translateX(-120%); animation: keyaiFileLoadingSweep 1s ease-in-out infinite; }
[data-theme="light"] .portal-file-precheck { color: #163450; border-color: rgba(223,133,31,.55); background: linear-gradient(110deg, rgba(47,125,244,.13), rgba(255,198,119,.48), rgba(13,185,215,.13)); box-shadow: 0 12px 28px rgba(23,75,118,.13), inset 0 1px 0 rgba(255,255,255,.82); }
@keyframes keyaiFilePrecheckSpin { to { transform: rotate(360deg); } }
@keyframes keyaiFilePrecheckPulse { 0%, 100% { filter: brightness(1); transform: translateY(0); } 50% { filter: brightness(1.15); transform: translateY(-1px); } }
.portal-upload-form[data-file-type="CSV"] #portalPeriodModeLabel,
.portal-upload-form[data-file-type="CSV"] #portalPeriodMode { text-align: center; }
.portal-upload-form[data-file-type="CSV"] #portalPeriodModeLabel { justify-self: center; }
.portal-upload-form[data-file-type="CSV"] label:has(#portalPeriodMode) { grid-column: 1 / -1; width: min(560px, 100%); justify-self: center; }
.portal-upload-form[data-file-type="CSV"] #portalYearValueField,
.portal-upload-form[data-file-type="CSV"] #portalMonthValueField,
.portal-upload-form[data-file-type="CSV"] #portalSheetSelector { display: none !important; }
.portal-upload-form[data-file-type="CSV"] .portal-period-mode-field { grid-column: 1 / -1 !important; width: min(560px, 100%) !important; justify-self: center !important; text-align: center !important; }
.portal-upload-form[data-file-type="CSV"] .portal-period-mode-field span,
.portal-upload-form[data-file-type="CSV"] .portal-period-mode-field select { text-align: center !important; }
.analysis-loader:not([hidden]) { position: fixed; inset: 0; z-index: 9999; margin: 0; padding: 24px; display: grid; grid-template-columns: 1fr; place-items: center; text-align: center; border: 0; border-radius: 0; background: radial-gradient(circle at 20% 18%, rgba(47,125,244,.28), transparent 30%), radial-gradient(circle at 82% 78%, rgba(243,144,36,.28), transparent 32%), rgba(3,10,18,.86) !important; backdrop-filter: blur(14px); box-shadow: none; }
.analysis-loader:not([hidden]) .analysis-loader-visual { width: clamp(132px, 18vw, 190px); height: clamp(132px, 18vw, 190px); margin: 0 auto 18px; }
.analysis-loader:not([hidden]) .analysis-loader-ring { box-shadow: 0 0 42px rgba(47,125,244,.34), 0 0 60px rgba(243,144,36,.24); animation-duration: .9s; }
.analysis-loader:not([hidden]) .analysis-loader-ring::after { inset: 13px; background: radial-gradient(circle, #122136 0%, #07111e 70%); }
.analysis-loader:not([hidden]) .analysis-loader-core { width: clamp(52px, 7vw, 78px); height: clamp(52px, 7vw, 78px); box-shadow: 0 0 0 15px rgba(255,255,255,.07), 0 0 42px rgba(243,144,36,.42); }
.analysis-loader:not([hidden]) .analysis-loader-copy { width: min(760px, 100%); padding: 22px; border: 1px solid rgba(143,173,203,.2); border-radius: 22px; background: linear-gradient(145deg, rgba(10,20,34,.72), rgba(13,24,38,.5)); box-shadow: 0 24px 70px rgba(0,0,0,.26), inset 0 1px 0 rgba(255,255,255,.08); }
.analysis-loader:not([hidden]) .analysis-loader-copy::before { content: "Analizando tus datos de forma exacta"; display: block; margin-bottom: 10px; color: #ffd39b; font-size: clamp(22px, 4vw, 38px); font-weight: 950; line-height: 1.08; letter-spacing: -.03em; text-shadow: 0 0 22px rgba(243,144,36,.24); }
.analysis-loader:not([hidden]) .analysis-loader-copy strong { color: #eef7ff !important; font-size: clamp(15px, 2vw, 20px); }
.analysis-loader:not([hidden]) .analysis-loader-copy p { max-width: 620px; margin: 8px auto 16px; color: #c9d9e8 !important; font-size: 14px; }
.analysis-loader:not([hidden]) .analysis-loader-bar { max-width: 560px; height: 11px; margin: 0 auto; background: rgba(255,255,255,.1); }
.analysis-loader:not([hidden]) ol { max-width: 760px; margin: 18px auto 0; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@keyframes portal-file-configuration-in { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
.portal-sheet-selector { grid-column: 1 / -1; min-width: 0; margin: 0; padding: 13px 14px 12px; border: 1px solid rgba(32,198,223,.3); border-left: 3px solid #f39024; border-radius: 12px; background: linear-gradient(105deg, rgba(22,103,205,.12), rgba(32,198,223,.07) 58%, rgba(243,144,36,.09)); }
.portal-sheet-selector legend { padding: 0 7px; color: #eef7ff; font-size: 12px; font-weight: 900; letter-spacing: .035em; }
.portal-sheet-selector > p { margin: 0 0 10px !important; color: #b9ccde !important; font-size: 10px; line-height: 1.5; }
.portal-sheet-selector > small { display: block; margin-top: 9px; color: #72dff1; font-size: 9px; font-weight: 800; }
.portal-sheet-options { display: flex; flex-wrap: wrap; gap: 8px; }
.portal-sheet-options .portal-sheet-placeholder { width: 100%; margin: 0 !important; padding: 9px 11px; color: #9fb4c8 !important; border: 1px dashed rgba(99,154,205,.34); border-radius: 9px; background: rgba(9,20,33,.38); font-size: 10px; line-height: 1.45; }
.portal-sheet-options label { min-width: 0; margin: 0; padding: 8px 11px; display: inline-flex; align-items: center; gap: 8px; color: #dcecff; border: 1px solid rgba(92,157,220,.32); border-radius: 9px; background: rgba(9,20,33,.62); cursor: pointer; transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.portal-sheet-options label:hover, .portal-sheet-options label:focus-within { transform: translateY(-1px); border-color: rgba(32,198,223,.62); box-shadow: 0 8px 18px rgba(0,0,0,.13); }
.portal-sheet-options label:has(input:checked) { color: #fff; border-color: rgba(243,144,36,.72); background: linear-gradient(105deg, rgba(33,109,206,.32), rgba(21,174,193,.2), rgba(222,119,24,.24)); box-shadow: 0 0 0 2px rgba(243,144,36,.08); }
.portal-sheet-options .portal-sheet-primary { border-color: rgba(54,212,124,.72); background: linear-gradient(105deg, rgba(28,109,77,.28), rgba(32,198,223,.12), rgba(243,144,36,.16)); box-shadow: 0 0 0 2px rgba(54,212,124,.09), 0 10px 22px rgba(0,0,0,.12); }
.portal-sheet-options .portal-sheet-primary span { color: #dfffe9; }
.portal-sheet-options .portal-sheet-select-all { width: 100%; justify-content: center; color: #eef7ff; border-color: rgba(32,198,223,.46); background: linear-gradient(105deg, rgba(47,125,244,.2), rgba(32,198,223,.11), rgba(243,144,36,.12)); }
.portal-sheet-options .portal-sheet-select-all span { max-width: none; color: inherit; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
.portal-sheet-options .portal-sheet-select-all:has(input:checked) { border-color: rgba(243,144,36,.78); background: linear-gradient(105deg, rgba(36,118,214,.34), rgba(32,198,223,.18), rgba(243,144,36,.28)); }
.portal-sheet-options .portal-sheet-auxiliary { cursor: not-allowed; opacity: .62; border-style: dashed; background: rgba(255,255,255,.035); }
.portal-sheet-options .portal-sheet-auxiliary span { color: #94a9bc; font-style: italic; }
.portal-sheet-options input { width: 16px; height: 16px; min-height: 0; margin: 0; accent-color: #f39024; }
.portal-sheet-options span { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 800; }
.period-selection-help { margin: 13px 0 0 !important; padding: 11px 13px; color: #c9d9ea !important; border: 1px solid rgba(32,198,223,.24); border-radius: 10px; background: linear-gradient(100deg, rgba(22,103,205,.12), rgba(32,198,223,.07), rgba(243,144,36,.08)); font-size: 11px; line-height: 1.5; }
.file-selection { margin-bottom: 0 !important; color: #b8c8d9 !important; font-size: 12px; }
.status { white-space: pre-line; }
.status.loading { position: relative; display: inline-flex; align-items: center; gap: 10px; width: fit-content; max-width: 100%; padding: 10px 14px 10px 42px; overflow: hidden; border: 1px solid rgba(243,144,36,.42); border-radius: 999px; color: #ffe2b2 !important; background: linear-gradient(110deg, rgba(47,125,244,.16), rgba(243,144,36,.2), rgba(13,185,215,.16)); box-shadow: 0 12px 28px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.08); font-weight: 900; letter-spacing: .02em; animation: keyaiFileLoadingGlow 1s ease-in-out infinite; }
.status.loading::before { content: ""; position: absolute; left: 13px; width: 16px; height: 16px; border: 3px solid rgba(255,255,255,.22); border-top-color: #f39024; border-right-color: #2f7df4; border-radius: 50%; animation: keyaiFileLoadingSpin .75s linear infinite; }
.status.loading::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent); transform: translateX(-120%); animation: keyaiFileLoadingSweep 1s ease-in-out infinite; }
[data-theme="light"] .status.loading { color: #12334f !important; background: linear-gradient(110deg, rgba(47,125,244,.13), rgba(255,198,119,.48), rgba(13,185,215,.12)); border-color: rgba(223,133,31,.48); box-shadow: 0 10px 26px rgba(23,75,118,.12), inset 0 1px 0 rgba(255,255,255,.8); }
.recoverable-upload-actions { margin-top: 14px; padding: 15px; border: 1px solid rgba(243,144,36,.44); border-left: 4px solid #f39024; border-radius: 14px; background: linear-gradient(120deg, rgba(47,125,244,.14), rgba(243,144,36,.18), rgba(13,185,215,.1)); box-shadow: 0 16px 34px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.07); }
.recoverable-upload-actions p { margin: 0 0 12px !important; color: #ffe0b0 !important; font-size: 12px; line-height: 1.55; }
.recoverable-upload-actions strong { color: #ffd18a; }
.recoverable-upload-actions > div { display: flex; flex-wrap: wrap; gap: 10px; }
.recoverable-upload-actions button { flex: 1 1 240px; min-height: 44px; padding: 11px 15px; border: 1px solid rgba(124,190,255,.4); border-radius: 12px; color: #eef7ff; background: linear-gradient(105deg, #236ed1, #1c7897 55%, #d47b17); box-shadow: 0 12px 24px rgba(0,0,0,.16); font-weight: 900; cursor: pointer; transition: transform .18s ease, filter .18s ease, box-shadow .18s ease; }
.recoverable-upload-actions button:nth-child(2) { background: linear-gradient(105deg, #15345d, #197d94 54%, #f39024); }
.recoverable-upload-actions button:hover, .recoverable-upload-actions button:focus-visible { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 16px 30px rgba(0,0,0,.2), 0 0 20px rgba(47,125,244,.18); }
.recoverable-upload-actions button:disabled { cursor: not-allowed; opacity: .55; transform: none; filter: grayscale(.2); }
[data-theme="light"] .recoverable-upload-actions { background: linear-gradient(120deg, rgba(47,125,244,.08), rgba(255,198,119,.48), rgba(13,185,215,.1)); box-shadow: 0 12px 30px rgba(23,75,118,.12); }
[data-theme="light"] .recoverable-upload-actions p { color: #3b2a12 !important; }
[data-theme="light"] .recoverable-upload-actions strong { color: #8f4f03; }
@keyframes keyaiFileLoadingSpin { to { transform: rotate(360deg); } }
@keyframes keyaiFileLoadingSweep { to { transform: translateX(120%); } }
@keyframes keyaiFileLoadingGlow { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.16); } }

.portal-grid { margin-top: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric-card { --pointer-x: 50%; --pointer-y: 50%; --tilt-x: 0deg; --tilt-y: 0deg; position: relative; min-height: 128px; padding: 18px 78px 18px 18px; display: block; overflow: hidden; border-radius: 14px; transform: perspective(700px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)); transform-style: preserve-3d; transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; }
.metric-card::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; background: radial-gradient(circle 125px at var(--pointer-x) var(--pointer-y), rgba(83,159,255,.18), transparent 72%); transition: opacity .22s ease; }
.metric-card:hover, .metric-card:focus-within { border-color: rgba(84,155,255,.48); box-shadow: 0 22px 48px rgba(0,0,0,.25), 0 0 28px rgba(47,125,244,.08); }
.metric-card:hover::before, .metric-card:focus-within::before { opacity: 1; }
.metric-card > div { width: 100%; min-width: 0; }
.metric-card > div, .metric-card > i, .metric-card > svg { position: relative; z-index: 1; }
.metric-card span { color: var(--dash-muted); font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.metric-card strong { display: block; margin: 12px 0 8px; color: #fff; font-size: clamp(20px, 2vw, 27px); }
.metric-card p { margin: 0; color: var(--dash-muted); font-size: 10px; }
.metric-card .metric-subline { margin-top: 5px; color: #ffd28a; font-size: 10px; font-weight: 800; letter-spacing: .02em; }
.metric-card > i { position: absolute; top: 18px; right: 18px; width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid rgba(47,125,244,.35); border-radius: 50%; color: #80b2ff; background: rgba(47,125,244,.1); box-shadow: inset 0 0 16px rgba(71,145,255,.08); font-size: 23px; font-style: normal; transition: transform .24s cubic-bezier(.2,.8,.2,1), box-shadow .24s ease, background .24s ease; }
.metric-card:hover > i { transform: translateY(-2px) scale(1.08) rotate(3deg); background: rgba(47,125,244,.16); box-shadow: 0 0 24px rgba(47,125,244,.2), inset 0 0 16px rgba(71,145,255,.12); }
.metric-card > i > strong { margin: 0; color: currentColor; font: inherit; line-height: 1; }
.metric-card > i svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.metric-date-exclusion.is-actionable { cursor: pointer; border-color: rgba(223,133,31,.5); }
.metric-date-exclusion.is-actionable > i { color: #ffd28a; border-color: rgba(223,133,31,.48); background: rgba(223,133,31,.12); }
.metric-date-exclusion.is-disabled { opacity: .78; }
.metric-date-exclusion.is-disabled > i { color: #8aa3b8; border-color: rgba(138,163,184,.25); background: rgba(138,163,184,.08); }
.metric-profit > i { color: #55df87; border-color: rgba(72,216,126,.38); background: rgba(54,212,124,.1); box-shadow: 0 0 20px rgba(54,212,124,.1); }
.metric-product-money > i { color: #ffb34f; border-color: rgba(243,144,36,.3); background: rgba(243,144,36,.08); }
.metric-product-units > i { color: #40d8ef; border-color: rgba(32,198,223,.32); background: rgba(32,198,223,.08); }
.metric-product-gain > i { color: #a99fff; border-color: rgba(119,108,244,.34); background: rgba(119,108,244,.09); }
.metric-usage > i { color: #49dc88; border-color: rgba(54,212,124,.3); background: rgba(54,212,124,.08); }
.metric-sparkline { position: absolute !important; right: 13px; bottom: 10px; width: 92px; height: 34px; overflow: visible; opacity: .82; filter: drop-shadow(0 0 7px rgba(75,149,255,.25)); transition: opacity .22s ease, transform .22s ease, filter .22s ease; }
.metric-sparkline polyline { fill: none; stroke: #3d8cff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-dasharray: var(--spark-length, 180); stroke-dashoffset: var(--spark-length, 180); animation: sparkline-draw .85s cubic-bezier(.2,.8,.2,1) .1s forwards; }
.metric-profit .metric-sparkline { filter: drop-shadow(0 0 7px rgba(40,220,149,.24)); }
.metric-profit .metric-sparkline polyline { stroke: #20d6a1; }
.metric-card:hover .metric-sparkline { opacity: 1; transform: translateY(-3px) scale(1.05); filter: drop-shadow(0 0 10px rgba(75,149,255,.5)); }
.metric-profit:hover .metric-sparkline { filter: drop-shadow(0 0 10px rgba(40,220,149,.48)); }
@keyframes sparkline-draw { to { stroke-dashoffset: 0; } }

.analytics-grid { margin-top: 16px; display: grid; grid-template-columns: 1.65fr 1fr; gap: 16px; }
.analytics-grid .panel { --pointer-x: 50%; --pointer-y: 50%; position: relative; padding: 19px; overflow: hidden; transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease; }
.analytics-grid .panel::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; background: radial-gradient(circle 210px at var(--pointer-x) var(--pointer-y), rgba(46,137,255,.13), transparent 75%); transition: opacity .22s ease; }
.analytics-grid .panel:hover { border-color: rgba(66,145,247,.42); box-shadow: 0 22px 48px rgba(0,0,0,.22); transform: translateY(-2px); }
.analytics-grid .panel:hover::before { opacity: 1; }
.analytics-grid .panel > * { position: relative; z-index: 1; }
.analytics-grid .panel-title span { color: #9fb1c4; font-size: 9px; }
.trend-chart { min-height: 320px; margin-top: 15px; display: grid; align-content: end; gap: 13px; }
.trend-description { margin: 0; color: var(--dash-muted); font-size: 11px; line-height: 1.55; }
.trend-description strong { color: #dce9f7; }
.trend-scroll { max-width: 100%; padding-bottom: 9px; overflow-x: auto; scrollbar-color: #8290a0 #25303c; scrollbar-width: thin; }
.trend-scroll:focus-visible { outline: 2px solid var(--dash-blue); outline-offset: 3px; border-radius: 6px; }
.trend-bars { width: max(100%, calc(var(--month-count) * 92px)); height: 245px; display: flex; align-items: end; gap: 9px; border-bottom: 2px solid #8793a0; background: repeating-linear-gradient(to top, transparent 0 47px, rgba(157,180,205,.08) 48px); }
.trend-bar { height: 100%; min-width: 76px; flex: 1; display: flex; flex-direction: column; justify-content: end; align-items: stretch; gap: 7px; text-align: center; transition: transform .22s cubic-bezier(.2,.8,.2,1), filter .22s ease, opacity .22s ease; }
.trend-bars:hover .trend-bar:not(:hover):not(:focus-visible) { opacity: .64; filter: saturate(.72); }
.trend-bar:hover, .trend-bar:focus-visible { z-index: 2; filter: brightness(1.15) saturate(1.12); transform: translateY(-7px) scale(1.035); outline: none; }
.trend-value { color: #eaf2fb; font-size: 9px; line-height: 1.2; white-space: nowrap; }
.trend-bar i { width: 100%; min-height: 6px; display: block; border-radius: 8px 8px 2px 2px; box-shadow: 0 7px 18px rgba(0,0,0,.2); transform-origin: center bottom; animation: dashboard-bar-rise .68s cubic-bezier(.18,.82,.26,1) both; animation-delay: calc(var(--bar-index, 0) * 38ms); transition: filter .18s ease, box-shadow .18s ease; }
.trend-bar:hover i, .trend-bar:focus-visible i { box-shadow: 0 10px 25px rgba(0,0,0,.3), 0 0 18px currentColor; }
.trend-bar b { min-height: 27px; color: #b8c5d3; font-size: 9px; font-weight: 800; line-height: 1.15; text-transform: capitalize; }
.trend-alto i { background: linear-gradient(to top, #3c8155, #79b88b); }
.trend-medio i { background: linear-gradient(to top, #d77b1e, #f3b557); }
.trend-bajo i { background: linear-gradient(to top, #ad3f3f, #de7771); }
.trend-legend { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.trend-legend span { display: inline-flex; align-items: center; gap: 7px; color: #b8c5d3 !important; font-size: 10px !important; letter-spacing: 0 !important; }
.trend-legend span::before { content: ""; width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; }
.trend-legend .trend-alto::before { background: #65a978; }
.trend-legend .trend-medio::before { background: #eb962f; }
.trend-legend .trend-bajo::before { background: #cf5753; }
.product-chart { min-height: 320px; margin-top: 15px; display: grid; align-content: end; gap: 13px; }
.product-description { margin: 0; color: var(--dash-muted); font-size: 11px; line-height: 1.55; }
.product-scroll { max-width: 100%; padding-bottom: 9px; overflow-x: auto; scrollbar-color: #8290a0 #25303c; scrollbar-width: thin; }
.product-scroll:focus-visible { outline: 2px solid var(--dash-orange); outline-offset: 3px; border-radius: 6px; }
.product-bars { width: max(100%, calc(var(--product-count) * 102px)); height: 245px; display: flex; align-items: end; gap: 10px; border-bottom: 2px solid #8793a0; background: repeating-linear-gradient(to top, transparent 0 47px, rgba(157,180,205,.08) 48px); }
.product-bar { height: 100%; min-width: 84px; flex: 1; display: flex; flex-direction: column; justify-content: end; align-items: stretch; gap: 7px; text-align: center; transition: transform .22s cubic-bezier(.2,.8,.2,1), filter .22s ease, opacity .22s ease; }
.product-bars:hover .product-bar:not(:hover):not(:focus-visible) { opacity: .62; filter: saturate(.65); }
.product-bar:hover, .product-bar:focus-visible { z-index: 2; filter: brightness(1.15) saturate(1.08); transform: translateY(-7px) scale(1.035); outline: none; }
.product-value { color: #eaf2fb; font-size: 9px; line-height: 1.2; white-space: nowrap; }
.product-bar i { width: 100%; min-height: 6px; display: block; border-radius: 8px 8px 2px 2px; background: linear-gradient(to top, #111820, #c4ced8); box-shadow: 0 7px 18px rgba(0,0,0,.22); transform-origin: center bottom; animation: dashboard-bar-rise .68s cubic-bezier(.18,.82,.26,1) both; animation-delay: calc(var(--bar-index, 0) * 32ms); transition: box-shadow .18s ease; }
.product-bar:hover i, .product-bar:focus-visible i { box-shadow: 0 10px 25px rgba(0,0,0,.3), 0 0 17px rgba(182,202,221,.26); }
.product-bar.product-leader i { background: linear-gradient(to top, #915017, #f1ad4e); }
.product-bar b { min-height: 30px; display: -webkit-box; overflow: hidden; color: #b8c5d3; font-size: 8px; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.product-help { margin: 0; display: flex; align-items: center; gap: 7px; color: #b8c5d3 !important; font-size: 10px !important; }
.product-help span { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: var(--dash-orange); }
@keyframes dashboard-bar-rise { from { opacity: .2; transform: scaleY(.06); } to { opacity: 1; transform: scaleY(1); } }

@media (prefers-reduced-motion: reduce) {
  .metric-card, .metric-card > i, .metric-sparkline, .analytics-grid .panel, .trend-bar, .product-bar { transition: none !important; transform: none !important; }
  .metric-sparkline polyline, .trend-bar i, .product-bar i { animation: none !important; stroke-dashoffset: 0; }
  #planBadge, #planBadge::after { animation: none; }
  #planBadge:hover { transform: none; }
}

.insight-panel { margin-top: 16px; }
.insight-copy { margin: 8px 0 16px; color: var(--dash-muted); font-size: 11px; }
.insight-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.insight-grid button { min-height: 116px; padding: 14px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto 1fr; column-gap: 10px; align-items: start; color: #eaf3fc; border: 1px solid var(--dash-line); background: linear-gradient(145deg, rgba(22,37,53,.96), rgba(12,22,33,.98)); text-align: left; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.insight-grid button:hover:not(:disabled), .insight-grid button:focus-visible:not(:disabled) { transform: translateY(-3px); border-color: rgba(243,144,36,.6); box-shadow: 0 12px 28px rgba(0,0,0,.2); outline: none; }
.insight-grid button:disabled { cursor: not-allowed; opacity: .5; }
.insight-grid button > i { width: 31px; height: 31px; grid-row: 1 / 3; display: grid; place-items: center; border-radius: 9px; color: #ffd08e; background: linear-gradient(145deg, rgba(47,125,244,.3), rgba(243,144,36,.28)); font-size: 10px; font-style: normal; }
.insight-grid button > strong { color: #f0f6fd; font-size: 12px; line-height: 1.35; }
.insight-grid button > span { align-self: end; color: #9fb1c4 !important; font-size: 10px !important; line-height: 1.35; letter-spacing: 0 !important; }
.insight-professional-divider { grid-column: 1 / -1; padding: 13px 15px; display: flex; justify-content: space-between; align-items: center; gap: 14px; border: 1px solid rgba(243,144,36,.32); border-radius: 14px; background: linear-gradient(110deg, rgba(47,125,244,.14), rgba(243,144,36,.16), rgba(32,198,223,.09)); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.insight-professional-divider span { padding: 7px 11px; color: #111a24; border-radius: 999px; background: linear-gradient(110deg, #8fd8ff, #ffe1a8, #ff9b34); font-size: 9px; font-weight: 950; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.insight-professional-divider p { margin: 0; color: #ffd9a3; font-size: 10px; line-height: 1.5; }
.insight-grid button.professional-locked { position: relative; overflow: hidden; cursor: pointer; opacity: 1; border-color: rgba(243,144,36,.42); background: radial-gradient(circle at 100% 0, rgba(243,144,36,.18), transparent 42%), linear-gradient(145deg, rgba(22,37,53,.92), rgba(9,18,28,.98)); box-shadow: inset 0 0 0 1px rgba(243,144,36,.08); }
.insight-grid button.professional-locked > strong,
.insight-grid button.professional-locked > span { filter: blur(3.5px); opacity: .36; user-select: none; }
.insight-grid button.professional-locked::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(135deg, rgba(9,18,28,.28), rgba(47,125,244,.16), rgba(243,144,36,.2)); backdrop-filter: blur(1px); pointer-events: none; }
.insight-grid button.professional-locked::after { content: attr(data-lock-label); position: absolute; left: 50%; top: 50%; z-index: 2; transform: translate(-50%, -50%); padding: 9px 13px; color: #101820; border: 1px solid rgba(255,255,255,.38); border-radius: 999px; background: linear-gradient(110deg, #8fd8ff, #ffe0a3, #f39024); box-shadow: 0 12px 30px rgba(0,0,0,.25); font-size: 9px; font-weight: 950; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; pointer-events: none; }
.insight-grid button.professional-locked:hover,
.insight-grid button.professional-locked:focus-visible { transform: translateY(-3px); border-color: rgba(255,190,105,.74); box-shadow: 0 16px 34px rgba(243,144,36,.14), inset 0 0 0 1px rgba(243,144,36,.16); outline: none; }
.insight-dialog-source { margin: 0 0 14px; padding: 11px 13px; border-left: 4px solid var(--dash-orange); border-radius: 8px; color: #b9c9da; background: rgba(243,144,36,.08); font-size: 11px; }
.insight-dialog-source strong { color: #ffd08e; }
.insight-primary { padding: 18px; border: 1px solid var(--dash-line); border-radius: 13px; background: rgba(255,255,255,.035); }
.insight-primary span { color: #93a7bb; font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.insight-primary strong { display: block; margin: 8px 0; color: #fff; font-size: clamp(25px, 4vw, 38px); overflow-wrap: anywhere; }
.insight-primary p { margin: 0; color: #aebed0; font-size: 11px; line-height: 1.6; }
.insight-detail-grid { margin-top: 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.insight-detail-grid article { padding: 13px; border: 1px solid var(--dash-line); border-radius: 10px; background: rgba(255,255,255,.025); }
.insight-detail-grid span { color: #8fa4b8; font-size: 9px; font-weight: 900; letter-spacing: .06em; }
.insight-detail-grid strong { display: block; margin-top: 7px; color: #e9f3fc; font-size: 13px; overflow-wrap: anywhere; }
.insight-products-wrap { margin-top: 12px; overflow-x: auto; }
.insight-products { width: 100%; border-collapse: collapse; }
.insight-products th, .insight-products td { padding: 10px 8px; border-bottom: 1px solid var(--dash-line); color: #c7d5e3; font-size: 10px; text-align: right; white-space: nowrap; }
.insight-products th:first-child, .insight-products td:first-child { width: 38px; color: #ffbd6c; text-align: center; }
.insight-products th:nth-child(2), .insight-products td:nth-child(2) { text-align: left; }
.product-rank { font-weight: 900; }
.insight-products th { color: #8fa4b8; font-size: 8px; letter-spacing: .06em; }
.secondary-insights { margin-top: 16px; }
.secondary-insights-copy { margin: 8px 0 16px; color: var(--dash-muted); font-size: 11px; line-height: 1.55; }
.secondary-insights-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.secondary-insights-grid > .empty { grid-column: 1 / -1; min-height: 140px; display: grid; place-items: center; text-align: center; }
.secondary-insight-card { --secondary-accent: #2f7df4; min-width: 0; min-height: 210px; padding: 16px; display: flex; flex-direction: column; border: 1px solid rgba(118,155,194,.18); border-radius: 13px; color: inherit; background: linear-gradient(145deg, rgba(18,32,46,.97), rgba(10,20,31,.98)); box-shadow: 0 12px 28px rgba(0,0,0,.13); text-align: left; cursor: pointer; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.secondary-insight-card:hover, .secondary-insight-card:focus-visible { transform: translateY(-3px); border-color: color-mix(in srgb, var(--secondary-accent) 55%, transparent); box-shadow: 0 18px 36px rgba(0,0,0,.2), 0 0 0 2px color-mix(in srgb, var(--secondary-accent) 13%, transparent); outline: none; }
.secondary-insight-card:nth-child(2), .secondary-insight-card:nth-child(5) { --secondary-accent: #f39024; }
.secondary-insight-card:nth-child(3), .secondary-insight-card:nth-child(6) { --secondary-accent: #20c6df; }
.secondary-insight-card > div { display: flex; align-items: center; gap: 9px; }
.secondary-insight-card > div i { width: 30px; height: 30px; display: grid; place-items: center; color: var(--secondary-accent); border: 1px solid color-mix(in srgb, var(--secondary-accent) 35%, transparent); border-radius: 9px; background: color-mix(in srgb, var(--secondary-accent) 10%, transparent); font-size: 9px; font-style: normal; font-weight: 900; }
.secondary-insight-card > div span { color: #dce9f6; font-size: 10px; font-weight: 900; letter-spacing: .03em; }
.secondary-insight-head { position: relative; padding-right: 92px; }
.secondary-insight-view { position: absolute; top: 0; right: 0; min-height: 25px; padding: 6px 9px 6px 25px; display: inline-flex; align-items: center; color: #dff4ff; border: 1px solid color-mix(in srgb, var(--secondary-accent) 42%, transparent); border-radius: 999px; background: linear-gradient(135deg, color-mix(in srgb, var(--secondary-accent) 18%, transparent), rgba(255,255,255,.04)); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); font-size: 8px; font-style: normal; font-weight: 950; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.secondary-insight-view::before { content: ""; position: absolute; left: 9px; width: 9px; height: 9px; border: 2px solid currentColor; border-radius: 50%; box-shadow: 0 0 0 3px color-mix(in srgb, var(--secondary-accent) 14%, transparent); }
.secondary-insight-card:hover .secondary-insight-view, .secondary-insight-card:focus-visible .secondary-insight-view { color: #fff; border-color: color-mix(in srgb, var(--secondary-accent) 72%, transparent); transform: translateX(2px); transition: transform .18s ease, border-color .18s ease, color .18s ease; }
.secondary-insight-card > strong { margin: 18px 0 9px; color: #fff; font-size: clamp(17px, 2vw, 23px); line-height: 1.25; overflow-wrap: anywhere; }
.secondary-insight-card > p { margin: 0; color: #aebfd0; font-size: 10px; line-height: 1.55; }
.secondary-insight-card > small { margin-top: auto; padding-top: 13px; color: color-mix(in srgb, var(--secondary-accent) 72%, #fff); border-top: 1px solid rgba(130,158,188,.13); font-size: 9px; line-height: 1.45; }
.additional-data-panel { margin-top: 16px; }
.additional-data-copy { margin: 8px 0 17px; padding: 13px 15px; color: #dbe9f7; border: 1px solid rgba(32,198,223,.25); border-left: 4px solid var(--dash-cyan); border-radius: 10px; background: linear-gradient(105deg, rgba(47,125,244,.12), rgba(32,198,223,.08), rgba(243,144,36,.08)); font-size: 11px; line-height: 1.6; }
.additional-data-disclosure { overflow: hidden; border: 1px solid rgba(118,155,194,.22); border-radius: 13px; background: linear-gradient(145deg, rgba(18,32,46,.96), rgba(8,18,29,.98)); box-shadow: 0 14px 30px rgba(0,0,0,.13); }
.additional-data-disclosure > summary { min-height: 72px; padding: 15px 17px; display: flex; align-items: center; justify-content: space-between; gap: 15px; color: #eaf4ff; cursor: pointer; list-style: none; transition: background .2s ease, color .2s ease; }
.additional-data-disclosure > summary::-webkit-details-marker { display: none; }
.additional-data-disclosure > summary:hover, .additional-data-disclosure > summary:focus-visible { color: #fff; background: linear-gradient(105deg, rgba(47,125,244,.14), rgba(32,198,223,.08), rgba(243,144,36,.1)); outline: none; }
.additional-data-disclosure > summary span, .additional-data-disclosure > summary strong, .additional-data-disclosure > summary small { display: block; }
.additional-data-disclosure > summary strong { font-size: 12px; }
.additional-data-disclosure > summary small { margin-top: 5px; color: #91a6ba; font-size: 9px; font-weight: 700; }
.additional-data-disclosure > summary i { width: 31px; height: 31px; flex: 0 0 auto; display: grid; place-items: center; color: #ffc16f; border: 1px solid rgba(243,144,36,.42); border-radius: 9px; background: rgba(243,144,36,.09); font-size: 18px; font-style: normal; transition: transform .22s ease, background .22s ease; }
.additional-data-disclosure[open] > summary { border-bottom: 1px solid rgba(118,155,194,.18); background: linear-gradient(105deg, rgba(47,125,244,.1), rgba(32,198,223,.055), rgba(243,144,36,.07)); }
.additional-data-disclosure[open] > summary i { transform: rotate(180deg); background: rgba(243,144,36,.17); }
.additional-data-disclosure-body { padding: 15px; animation: additionalDisclosureOpen .22s ease both; }
@keyframes additionalDisclosureOpen { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: translateY(0); } }
.additional-columns-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.additional-columns-grid > .empty { grid-column: 1 / -1; min-height: 125px; display: grid; place-items: center; }
.additional-column-card { --column-accent: #2f7df4; position: relative; min-width: 0; min-height: 134px; margin: 0; padding: 14px; display: grid; grid-template-columns: auto minmax(0,1fr); grid-template-rows: auto auto auto auto; align-content: center; gap: 6px 10px; color: #dce9f6; border: 1px solid rgba(118,155,194,.22); border-radius: 12px; background: linear-gradient(145deg, rgba(18,32,46,.98), rgba(9,19,30,.98)); cursor: pointer; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.additional-column-card[data-column-type="texto"] { --column-accent: #f39024; }
.additional-column-card[data-column-type="fecha"] { --column-accent: #20c6df; }
.additional-column-card[data-column-type="identificador"] { --column-accent: #8c79ff; }
.additional-column-card:hover, .additional-column-card:focus-within { transform: translateY(-3px); border-color: color-mix(in srgb, var(--column-accent) 60%, transparent); box-shadow: 0 14px 28px rgba(0,0,0,.2); }
.additional-column-card input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.additional-column-check { position: relative; width: 28px; height: 28px; grid-row: 1 / 5; display: grid; place-items: center; color: transparent; border: 1px solid color-mix(in srgb, var(--column-accent) 48%, transparent); border-radius: 8px; background: color-mix(in srgb, var(--column-accent) 9%, transparent); font-size: 13px; font-weight: 900; transition: color .18s ease, background .18s ease, transform .18s ease; }
.additional-column-check::after { content: ""; width: 8px; height: 13px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(42deg) translateY(-1px); }
.additional-column-card input:checked + .additional-column-check { color: #fff; background: var(--column-accent); transform: scale(1.06); }
.additional-column-card:has(input:checked) { border-color: color-mix(in srgb, var(--column-accent) 75%, transparent); background: linear-gradient(145deg, color-mix(in srgb, var(--column-accent) 16%, #12202e), #09131e); box-shadow: 0 0 0 1px color-mix(in srgb, var(--column-accent) 28%, transparent), 0 15px 30px rgba(0,0,0,.2); }
.additional-column-card strong { min-width: 0; overflow-wrap: anywhere; color: #f0f6fd; font-size: 11px; line-height: 1.3; }
.additional-column-card small { min-width: 0; color: #a9bfd4; font-size: 8px; line-height: 1.45; overflow-wrap: anywhere; }
.additional-column-card em { width: max-content; max-width: 100%; padding: 4px 7px; overflow: hidden; color: color-mix(in srgb, var(--column-accent) 78%, #fff); border-radius: 999px; background: color-mix(in srgb, var(--column-accent) 10%, transparent); font-size: 7px; font-style: normal; font-weight: 900; letter-spacing: .05em; text-overflow: ellipsis; white-space: nowrap; }
.additional-column-hint { justify-self: start; width: auto; max-width: 100%; padding: 6px 9px; display: inline-flex; align-items: center; justify-content: center; color: #06111d; border-radius: 999px; background: linear-gradient(110deg, color-mix(in srgb, var(--column-accent) 70%, #fff), #ffc16f); font-size: 7px; font-weight: 950; letter-spacing: .045em; line-height: 1.15; text-align: center; text-transform: uppercase; white-space: normal; overflow-wrap: anywhere; box-shadow: 0 7px 16px rgba(0,0,0,.18); }
.additional-selection-actions { margin-top: 14px; padding: 13px 15px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid rgba(118,155,194,.18); border-radius: 11px; background: rgba(255,255,255,.025); }
.additional-selection-actions[hidden], .additional-analysis-results[hidden] { display: none !important; }
.additional-selection-actions p { margin: 0; }
.additional-selection-actions strong, .additional-selection-actions span { display: block; }
.additional-selection-actions strong { color: #f2f7fc; font-size: 11px; }
.additional-selection-actions span { margin-top: 4px; color: #91a6ba; font-size: 9px; }
.additional-selection-actions button { min-height: 42px; color: #fff; background: linear-gradient(110deg, #236fd6, #1b9db8 58%, #c66d16); }
.additional-selection-actions button:disabled { cursor: not-allowed; filter: saturate(.4); opacity: .5; }
.additional-analysis-results { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--dash-line); }
.additional-analysis-results > h3 { margin: 0; color: #f4c77f; font-size: 15px; }
.additional-analysis-results > p { margin: 6px 0 13px; color: #97aabd; font-size: 10px; line-height: 1.55; }
.additional-result-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.additional-result-card { min-width: 0; padding: 15px; border: 1px solid rgba(118,155,194,.2); border-radius: 12px; background: rgba(6,15,24,.42); }
.additional-result-card > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.additional-result-card h4 { margin: 0; color: #eef6ff; font-size: 12px; overflow-wrap: anywhere; }
.additional-result-card > div span { color: #7fc8ff; font-size: 8px; font-weight: 900; }
.additional-result-metrics { margin: 12px 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.additional-result-metrics span { padding: 9px; color: #91a7bc; border-radius: 8px; background: rgba(255,255,255,.035); font-size: 8px; line-height: 1.35; }
.additional-result-metrics strong { display: block; margin-top: 4px; color: #edf5fc; font-size: 11px; overflow-wrap: anywhere; }
.additional-distribution { margin: 0; padding: 0; list-style: none; }
.additional-distribution li { padding: 8px 0; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; border-top: 1px solid rgba(132,160,189,.12); color: #b8c8d8; font-size: 9px; }
.additional-distribution li span, .additional-distribution li b, .additional-distribution li small { display: block; min-width: 0; overflow-wrap: anywhere; }
.additional-distribution li b { color: #dce9f6; font-size: 9px; }
.additional-distribution li small { margin-top: 3px; color: #8399ad; font-size: 7px; line-height: 1.45; }
.additional-distribution li strong { color: #f0c37d; text-align: right; }
.additional-unique-values { padding: 16px; border: 1px solid rgba(243,144,36,.35); border-radius: 14px; background: linear-gradient(135deg, rgba(47,125,244,.12), rgba(32,198,223,.07), rgba(243,144,36,.13)); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.additional-unique-values > div { margin-bottom: 12px; display: block; }
.additional-unique-values > div span { color: #7fc8ff; font-size: 8px; font-weight: 950; letter-spacing: .12em; text-transform: uppercase; }
.additional-unique-values h4 { margin: 5px 0 4px; color: #f5f9ff; font-size: 16px; overflow-wrap: anywhere; }
.additional-unique-values p { margin: 0; color: #afc0d1; font-size: 10px; line-height: 1.5; }
.additional-unique-values .additional-distribution { max-height: 330px; overflow: auto; padding-right: 4px; }
.additional-unique-values .additional-distribution li { grid-template-columns: auto minmax(0,1fr) auto; align-items: center; }
.additional-unique-values .additional-distribution i { width: 28px; height: 28px; display: grid; place-items: center; color: #ffd79a; border-radius: 8px; background: rgba(243,144,36,.14); font-size: 8px; font-style: normal; font-weight: 950; }
.insight-explanation { margin-top: 16px; padding: 16px; border: 1px solid rgba(32,198,223,.25); border-radius: 13px; background: linear-gradient(135deg, rgba(31,109,210,.08), rgba(32,198,223,.05), rgba(243,144,36,.06)); }
.insight-explanation h3 { margin: 0 0 12px; color: #f6c77f; font-size: 13px; }
.insight-explanation > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.insight-explanation article { min-width: 0; padding: 13px; border: 1px solid rgba(143,173,203,.18); border-radius: 10px; background: rgba(5,13,22,.42); }
.insight-explanation article i { width: 27px; height: 27px; margin-bottom: 9px; display: grid; place-items: center; color: #ffcc86; border-radius: 8px; background: linear-gradient(145deg, rgba(39,120,232,.3), rgba(243,144,36,.25)); font-size: 9px; font-style: normal; font-weight: 900; }
.insight-explanation article span { display: block; color: #eaf4ff; font-size: 10px; font-weight: 900; letter-spacing: .04em; }
.insight-explanation article p { margin: 7px 0 0; color: #afc0d1; font-size: 10px; line-height: 1.6; overflow-wrap: anywhere; }
.insight-explanation ul { margin: 12px 0 0; padding: 11px 13px 11px 30px; color: #bcd0e2; border-left: 3px solid var(--dash-cyan); border-radius: 7px; background: rgba(32,198,223,.06); font-size: 10px; line-height: 1.55; }
.insight-explanation li + li { margin-top: 5px; }

.workspace-columns { margin-top: 16px; grid-template-columns: 1fr; align-items: start; }
.history-view-panel { margin-top: 30px; }
.history-panel .panel-title p { margin: 5px 0 0; color: var(--dash-muted); font-size: 10px; }
.history-head-actions { display: flex; align-items: center; gap: 8px; }
.history-head-actions button { min-height: 38px; padding: 8px 11px; color: #cfe0f2; border: 1px solid var(--dash-line); background: #172536; font-size: 9px; }
.history-summary-card { margin: 18px 0 16px; padding: 18px 20px; max-width: 420px; border: 1px solid rgba(47,125,244,.28); border-radius: 16px; background: radial-gradient(circle at 100% 0, rgba(243,144,36,.12), transparent 36%), linear-gradient(145deg, rgba(16,31,47,.94), rgba(8,18,30,.98)); box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.history-summary-card span { color: #8dbdff !important; font-size: 9px !important; font-weight: 900; letter-spacing: .12em !important; text-transform: uppercase; }
.history-summary-card strong { display: block; margin: 10px 0 6px; color: #fff; font-size: clamp(34px, 5vw, 52px); line-height: .95; }
.history-summary-card p { margin: 0; color: #b6c8d9; font-size: 11px; line-height: 1.5; }
.history-load-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; padding: 12px 14px; border: 1px solid rgba(47,125,244,.22); border-radius: 14px; background: rgba(12,27,43,.72); color: #b8c9db; font-size: 10px; }
.history-load-row button { border: 1px solid rgba(255,166,67,.5); border-radius: 12px; padding: 10px 14px; background: linear-gradient(135deg, rgba(47,125,244,.85), rgba(243,144,36,.9)); color: #fff; font-weight: 900; letter-spacing: .03em; cursor: pointer; }
.history-load-row button:disabled { cursor: wait; opacity: .65; }
.analysis-table-wrap { margin-top: 15px; overflow-x: auto; }
.analysis-table { width: 100%; border-collapse: collapse; }
.analysis-table th, .analysis-table td { padding: 12px 9px; border-bottom: 1px solid var(--dash-line); color: #cbd8e7; font-size: 11px; text-align: left; }
.analysis-table th { color: #8fa1b4; font-size: 9px; letter-spacing: .06em; }
.analysis-table td strong { display: block; max-width: 210px; overflow: hidden; color: #eef6ff; text-overflow: ellipsis; white-space: nowrap; }
.source-pill, .status-pill { display: inline-flex; padding: 5px 8px; border-radius: 7px; color: #9cc1ff !important; background: rgba(47,125,244,.1); font-size: 9px !important; letter-spacing: .04em !important; }
.status-pill { color: #6de69b !important; background: rgba(54,212,124,.08); }
.table-actions { display: flex; gap: 5px; }
.table-actions button { padding: 7px 8px; color: #bcd7ff; border: 1px solid var(--dash-line); background: #142131; font-size: 10px; }
.history-list-mobile { display: none; }

.feature-panel { position: relative; overflow: hidden; }
.feature-panel.is-locked {
  min-height: 210px;
  display: grid;
  align-self: stretch;
}
.feature-panel.is-locked > :not(.feature-lock) { display: none; }
.feature-lock {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  justify-items: center;
  gap: 10px;
  padding: clamp(24px, 4vw, 38px);
  overflow: auto;
  text-align: center;
  background: linear-gradient(145deg, rgba(8,17,27,.87), rgba(12,22,34,.94));
}
.feature-panel.is-locked .feature-lock { display: grid; }
.feature-lock strong {
  width: min(100%, 430px);
  color: #ffd08e;
  font-size: 16px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.feature-lock span {
  width: min(100%, 430px);
  color: #a9b9ca !important;
  font-size: 12px !important;
  line-height: 1.55;
  letter-spacing: 0 !important;
  overflow-wrap: anywhere;
}
.chat-panel .panel-title > span { color: #8db8ff; font-size: 10px; }
.chat-messages { background: rgba(3,9,15,.55); }
.chat-message.assistant { color: #dce8f4; border-color: var(--dash-line); background: #162332; }
.automation-panel, .team-panel, .administration-panel, #aiPortal { margin-top: 16px; }
.administration-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.administration-card { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px 14px; min-height: 112px; padding: 20px; border: 1px solid var(--dash-line); border-radius: 18px; color: #eaf3ff; text-align: left; background: linear-gradient(135deg, rgba(47,125,244,.22), rgba(225,132,27,.16)); box-shadow: 0 18px 40px rgba(0,0,0,.18); cursor: pointer; transition: transform 180ms ease, border-color 180ms ease, background 180ms ease; }
.administration-card:hover, .administration-card:focus-visible { transform: translateY(-2px); border-color: rgba(255,189,108,.5); outline: none; background: linear-gradient(135deg, rgba(47,125,244,.3), rgba(225,132,27,.22)); }
.administration-card > span { grid-row: span 2; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; color: #07121f; background: linear-gradient(135deg, #ffbd6c, #2f7df4); font-weight: 950; }
.administration-card strong { display: block; font-size: 18px; }
.administration-card small { color: var(--dash-muted); font-size: 12px; line-height: 1.45; }
.administration-card.is-locked { opacity: .66; cursor: not-allowed; filter: grayscale(.18); }
.team-head-actions { display: flex; align-items: center; gap: 9px; }
.team-head-actions button { padding: 9px 11px; color: #cfe0f2; border: 1px solid var(--dash-line); background: #172536; font-size: 10px; }
.automation-panel .panel-title > button { padding: 9px 11px; color: #cfe0f2; border: 1px solid var(--dash-line); background: #172536; font-size: 10px; }
.chat-head-actions { display: flex; align-items: center; gap: 9px; }
.chat-head-actions button { padding: 9px 11px; color: #cfe0f2; border: 1px solid var(--dash-line); background: #172536; font-size: 10px; }

.settings-panel { margin-top: 30px; }
.settings-panel .panel-title > button { padding: 9px 11px; color: #cfe0f2; border: 1px solid var(--dash-line); background: #172536; font-size: 10px; }
.settings-panel .panel-title p { margin: 5px 0 0; color: var(--dash-muted); font-size: 11px; }
.settings-layout { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.settings-options[hidden], .settings-detail[hidden] { display: none !important; }
.settings-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.settings-options button { --settings-accent: #2f7df4; position: relative; min-height: 92px; padding: 16px; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 13px; align-content: center; align-items: center; overflow: hidden; color: #dce9f6; border: 1px solid rgba(145,173,203,.15); background: linear-gradient(145deg, rgba(20,32,46,.96), rgba(12,22,34,.98)); text-align: left; box-shadow: 0 10px 24px rgba(0,0,0,.12); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.settings-options button:nth-child(2), .settings-options button:nth-child(7) { --settings-accent: #f39024; }
.settings-options button:nth-child(3), .settings-options button:nth-child(6) { --settings-accent: #20c6df; }
.settings-options button:nth-child(4), .settings-options button:nth-child(8) { --settings-accent: #e9b85d; }
.settings-options button:nth-child(5) { --settings-accent: #59a0ff; }
.settings-options button::after { content: ""; position: absolute; inset: auto 12% -32px; height: 42px; border-radius: 50%; background: var(--settings-accent); opacity: 0; filter: blur(28px); transition: opacity .18s ease; }
.settings-options button:hover, .settings-options button:focus-visible, .settings-options button.active { transform: translateY(-3px); border-color: color-mix(in srgb, var(--settings-accent) 65%, transparent); box-shadow: 0 14px 32px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.04); outline: none; }
.settings-options button:hover::after, .settings-options button:focus-visible::after, .settings-options button.active::after { opacity: .22; }
.settings-options button > span { grid-row: 1 / 3; width: 42px; height: 42px; display: grid; place-items: center; color: var(--settings-accent) !important; border: 1px solid color-mix(in srgb, var(--settings-accent) 32%, transparent); border-radius: 11px; background: color-mix(in srgb, var(--settings-accent) 11%, transparent); box-shadow: 0 0 18px color-mix(in srgb, var(--settings-accent) 16%, transparent); font-size: 20px !important; letter-spacing: 0 !important; }
.settings-options button > strong { color: #edf6ff; font-size: 11px; line-height: 1.35; }
.settings-options button > small { margin-top: 4px; color: #8fa4b9; font-size: 9px; line-height: 1.35; }
.settings-options button > i { display: none; }
.settings-detail { min-height: 230px; padding: clamp(22px, 4vw, 38px); display: flex; flex-direction: column; justify-content: center; border: 1px solid var(--dash-line); border-radius: 15px; background: radial-gradient(circle at 100% 0, rgba(243,144,36,.11), transparent 35%), linear-gradient(145deg, rgba(12,27,42,.96), rgba(9,18,29,.98)); }
.settings-detail-navigation { position: sticky; top: 12px; z-index: 5; width: min(100%, 520px); max-width: 100%; margin: -8px 0 18px; padding: 5px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid rgba(47,125,244,.24); border-radius: 12px; background: rgba(7,17,28,.9); box-shadow: 0 10px 24px rgba(0,0,0,.2); backdrop-filter: blur(12px); }
.settings-detail-back { width: max-content; max-width: 100%; margin: 0; padding: 10px 13px; color: #d6eaff; border: 1px solid rgba(47,125,244,.46); background: linear-gradient(110deg, rgba(47,125,244,.18), rgba(32,198,223,.09), rgba(243,144,36,.12)); font-size: 9px; }
.settings-detail-back span { margin-right: 4px; color: #ffc16f; font-size: 13px; }
.settings-detail-back:hover, .settings-detail-back:focus-visible { color: #fff; border-color: rgba(47,125,244,.75); box-shadow: 0 0 0 2px rgba(47,125,244,.13); transform: translateX(-2px); outline: none; }
.settings-coming-soon { padding: 9px 12px; color: #20150a !important; border: 1px solid rgba(255,209,128,.55); border-radius: 999px; background: linear-gradient(110deg, #f6efe2, #ffc46f 52%, #f39024); font-size: 8px !important; font-weight: 900; letter-spacing: .08em !important; text-transform: uppercase; white-space: nowrap; box-shadow: 0 0 18px rgba(243,144,36,.18); }
.settings-detail > small { color: #72b5ff; font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.settings-detail h3 { margin: 9px 0; color: #f4f8fc; font-size: clamp(23px, 3vw, 32px); }
.settings-detail > p { max-width: 620px; margin: 0; color: #afc1d2; font-size: 12px; line-height: 1.7; }
.settings-detail-note { margin-top: 24px; padding: 15px; border-left: 4px solid var(--dash-orange); border-radius: 9px; background: rgba(243,144,36,.07); }
.settings-detail-note strong { color: #ffd08e; font-size: 11px; }
.settings-detail-note p { margin: 6px 0 0; color: #aebfd0; font-size: 10px; line-height: 1.55; }
.company-profile-form[hidden] { display: none !important; }
.company-profile-form { margin-top: 22px; }
.company-profile-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, 250px); gap: 18px; align-items: stretch; }
.company-profile-fields { display: grid; gap: 13px; }
.company-profile-fields label { margin: 0; color: #c7d6e5; font-size: 10px; font-weight: 800; }
.company-profile-fields input, .company-profile-fields select { margin-top: 6px; color: #edf6ff; border-color: var(--dash-line); background: #0c1723; }
.company-profile-fields label > small { display: block; margin-top: 5px; color: #83a4c2; font-size: 8px; font-weight: 500; }
.company-logo-field { padding: 13px; border: 1px dashed rgba(47,125,244,.4); border-radius: 11px; background: rgba(47,125,244,.05); }
.company-logo-field input { width: 100%; }
.company-logo-field > span { display: block; margin-top: 7px; color: #8fa5ba; font-size: 8px; font-weight: 500; }
.company-profile-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.company-profile-preview { padding: 17px; display: flex; flex-direction: column; border: 1px solid var(--dash-line); border-radius: 13px; background: linear-gradient(145deg, rgba(16,29,43,.98), rgba(8,18,28,.98)); }
.company-profile-preview > small { color: #88a4bf; font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.company-logo-preview { width: 92px; height: 92px; margin: 28px auto 18px; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(47,125,244,.3); border-radius: 22px; background: linear-gradient(145deg, rgba(47,125,244,.2), rgba(243,144,36,.16)); }
.company-logo-preview img { width: 100%; height: 100%; object-fit: contain; }
.company-logo-preview span { color: #ffd08e !important; font-size: 34px !important; font-weight: 900; letter-spacing: 0 !important; }
.company-profile-preview > strong { margin-top: auto; color: #fff; font-size: 17px; overflow-wrap: anywhere; }
.company-profile-preview > p { margin: 5px 0 0; color: #8fa6bb; font-size: 9px; overflow-wrap: anywhere; }
.company-profile-actions { margin-top: 15px; display: flex; justify-content: flex-end; gap: 9px; }
.company-profile-actions button { min-height: 42px; color: #c6d8ea; border: 1px solid var(--dash-line); background: #142334; }
.company-profile-actions .primary { color: #fff; border-color: rgba(47,125,244,.5); background: linear-gradient(110deg, #246fd8, #f09024); }
.company-profile-actions button:disabled { cursor: wait; opacity: .6; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.settings-users-panel[hidden], .settings-invitation-form[hidden] { display: none !important; }
.settings-users-panel { margin-top: 22px; }
.settings-users-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.settings-users-head strong, .settings-users-head span { display: block; }
.settings-users-head strong { color: #edf6ff; font-size: 13px; }
.settings-users-head span { margin-top: 4px; color: #90a6bb; font-size: 9px; }
.settings-users-head button { min-height: 40px; padding: 9px 14px; color: #fff; border: 1px solid rgba(119,108,244,.5); background: linear-gradient(110deg, #2e70dc, #6a35d5); font-size: 10px; }
.settings-invitation-form { margin-top: 14px; padding: 13px; display: grid; grid-template-columns: minmax(0,1fr) minmax(150px,.45fr) auto; gap: 10px; align-items: end; border: 1px solid var(--dash-line); border-radius: 11px; background: rgba(47,125,244,.05); }
.settings-invitation-form label { margin: 0; color: #bacbdd; font-size: 9px; }
.settings-invitation-form input, .settings-invitation-form select { margin-top: 6px; color: #edf6ff; border-color: var(--dash-line); background: #0c1723; }
.settings-invitation-form button { min-height: 43px; color: #fff; background: var(--dash-blue); }
.settings-users-table-wrap { margin-top: 14px; overflow-x: auto; }
.settings-users-table { width: 100%; border-collapse: collapse; }
.settings-users-table th, .settings-users-table td { padding: 13px 10px; color: #bfd0e0; border-bottom: 1px solid var(--dash-line); font-size: 10px; text-align: left; vertical-align: middle; }
.settings-users-table th { color: #8299af; font-size: 8px; letter-spacing: .06em; }
.settings-users-table td:first-child strong, .settings-users-table td:first-child small { display: block; }
.settings-users-table td:first-child strong { color: #eef6ff; font-size: 10px; }
.settings-users-table td:first-child small { margin-top: 3px; color: #8299ae; font-size: 8px; }
.member-status { padding: 5px 8px; display: inline-flex; border: 1px solid rgba(54,212,124,.3); border-radius: 999px; color: #61df99; background: rgba(54,212,124,.08); font-size: 8px; font-weight: 900; }
.member-status.inactive { color: #9aa9b8; border-color: rgba(154,169,184,.3); background: rgba(154,169,184,.07); }
.settings-role-action { margin: 0; }
.settings-role-action select { min-width: 125px; min-height: 34px; padding: 6px 28px 6px 9px; color: #dce9f5; border-color: var(--dash-line); background: #101d2b; font-size: 8px; }
.settings-no-action { color: #6f8498; }
.settings-users-locked { padding: 28px !important; color: #e7b46d !important; text-align: center !important; }
.settings-users-mobile { display: none; }
.billing-settings-panel[hidden] { display: none !important; }
.billing-settings-panel { margin-top: 22px; }
.billing-settings-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.billing-settings-head p { max-width: 620px; margin: 0; color: #a9bdcf; font-size: 11px; line-height: 1.6; }
.billing-settings-head span { padding: 8px 11px; color: #ffe0a8; border: 1px solid rgba(243,144,36,.35); border-radius: 999px; background: rgba(243,144,36,.09); font-size: 9px; font-weight: 900; white-space: nowrap; }
.billing-plan-grid { margin-top: 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.billing-plan-card { --billing-accent: #55d58b; position: relative; min-height: 255px; padding: 18px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--billing-accent) 24%, transparent); border-radius: 16px; background: radial-gradient(circle at 100% 0, color-mix(in srgb, var(--billing-accent) 16%, transparent), transparent 36%), linear-gradient(145deg, rgba(16,29,43,.96), rgba(8,18,28,.98)); box-shadow: 0 16px 36px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.04); }
.billing-plan-card[data-plan="professional"] { --billing-accent: #f39024; }
.billing-plan-card[data-plan="advanced"] { --billing-accent: #8a7cff; }
.billing-plan-card.is-active { border-color: color-mix(in srgb, var(--billing-accent) 72%, transparent); box-shadow: 0 20px 46px color-mix(in srgb, var(--billing-accent) 17%, transparent), inset 0 1px 0 rgba(255,255,255,.08); }
.billing-plan-card.is-active::after { content: ""; position: absolute; inset: auto 18px 0; height: 4px; border-radius: 999px 999px 0 0; background: linear-gradient(90deg, var(--dash-blue), var(--billing-accent), var(--dash-orange)); }
.billing-plan-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.billing-plan-top span { padding: 6px 8px; color: #101820; border-radius: 999px; background: color-mix(in srgb, var(--billing-accent) 78%, #fff); font-size: 7px; font-weight: 950; letter-spacing: .08em; }
.billing-plan-top strong { color: #f3f8ff; font-size: 18px; }
.billing-plan-card p { margin: 15px 0; color: #b8cadb; font-size: 10px; line-height: 1.6; }
.billing-plan-price { padding: 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; background: rgba(255,255,255,.035); }
.billing-plan-price strong, .billing-plan-price small { display: block; }
.billing-plan-price strong { color: #fff1d8; font-size: 13px; }
.billing-plan-price small { margin-top: 4px; color: color-mix(in srgb, var(--billing-accent) 70%, #d8e7f7); font-size: 9px; font-weight: 900; }
.billing-plan-card ul { margin: 14px 0 0; padding: 0; display: grid; gap: 8px; list-style: none; }
.billing-plan-card li { position: relative; padding-left: 16px; color: #d4e3f0; font-size: 9px; line-height: 1.4; }
.billing-plan-card li::before { content: "✓"; position: absolute; left: 0; color: var(--billing-accent); font-weight: 950; }
.billing-usage-panel { margin-top: 14px; display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 12px; }
.billing-usage-panel article { padding: 15px; border: 1px solid rgba(145,173,203,.16); border-radius: 14px; background: linear-gradient(145deg, rgba(18,32,47,.92), rgba(8,18,28,.96)); box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.billing-usage-panel span { color: #8fb1d2 !important; font-size: 8px !important; font-weight: 950; letter-spacing: .12em; text-transform: uppercase; }
.billing-usage-panel strong { display: block; margin: 9px 0 4px; color: #fff6df; font-size: clamp(20px, 3vw, 30px); }
.billing-usage-panel p { margin: 0; color: #9fb2c5; font-size: 10px; line-height: 1.5; }
.billing-usage-panel i { height: 9px; margin-top: 13px; display: block; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.billing-usage-panel i b { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, var(--dash-blue), var(--dash-cyan), var(--dash-orange)); transition: width .3s ease; }
.billing-settings-note { margin: 15px 0 0; padding: 13px; color: #ffe3b9; border: 1px solid rgba(243,144,36,.24); border-radius: 12px; background: linear-gradient(110deg, rgba(47,125,244,.1), rgba(243,144,36,.12)); font-size: 10px; line-height: 1.6; }
.notification-settings-form[hidden] { display: none !important; }
.notification-settings-form { margin-top: 22px; }
.notification-settings-head { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.notification-settings-head > p { margin: 0; color: #9eb1c4; font-size: 10px; }
.notification-settings-head > button { min-height: 42px; padding: 10px 16px; color: #fff; border: 1px solid rgba(119,108,244,.5); background: linear-gradient(110deg, #2e70dc, #6a35d5); }
.notification-settings-grid { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.notification-settings-grid fieldset { min-width: 0; margin: 0; padding: 15px; border: 1px solid var(--dash-line); border-radius: 13px; background: rgba(7,16,26,.35); }
.notification-settings-grid legend { padding: 0 4px; color: #edf6ff; font-size: 12px; font-weight: 900; }
.notification-option { position: relative; min-height: 82px; margin: 0; padding: 13px; display: grid; grid-template-columns: auto 1fr auto; gap: 11px; align-items: center; border: 1px solid var(--dash-line); border-radius: 10px; background: rgba(255,255,255,.02); cursor: pointer; }
.notification-option + .notification-option { margin-top: 8px; }
.notification-option-icon { width: 34px; height: 34px; display: grid; place-items: center; color: #8e7cff !important; border: 1px solid rgba(119,108,244,.35); border-radius: 10px; background: rgba(119,108,244,.1); font-size: 17px !important; letter-spacing: 0 !important; }
.notification-option > span strong, .notification-option > span small { display: block; }
.notification-option > span strong { color: #eaf3fc; font-size: 10px; }
.notification-option > span small { margin-top: 4px; color: #8298ad; font-size: 8px; line-height: 1.4; }
.notification-option > input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.notification-option > i { position: relative; width: 42px; height: 23px; border-radius: 999px; background: #334458; transition: background .18s ease; }
.notification-option > i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 17px; height: 17px; border-radius: 50%; background: #d9e3ed; transition: transform .18s ease, background .18s ease; }
.notification-option > input:checked + i { background: linear-gradient(90deg, #2e70dc, #6d38d9); }
.notification-option > input:checked + i::after { transform: translateX(19px); background: #fff; }
.notification-option:focus-within { border-color: rgba(119,108,244,.65); box-shadow: 0 0 0 2px rgba(119,108,244,.12); }
.notification-option.is-unavailable, .notification-option.is-plan-locked { cursor: not-allowed; opacity: .58; }
.alert-option { position: relative; min-height: 64px; margin: 0; padding: 11px 8px; display: grid; grid-template-columns: auto 1fr; gap: 11px; align-items: center; border-bottom: 1px solid var(--dash-line); cursor: pointer; }
.alert-option > input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.alert-option > i { width: 25px; height: 25px; display: grid; place-items: center; color: transparent; border: 2px solid #6e8195; border-radius: 5px; background: transparent; font-size: 12px; font-style: normal; transition: .18s ease; }
.alert-option > input:checked + i { color: #fff; border-color: #7352e8; background: linear-gradient(145deg, #2f7df4, #7132d4); }
.alert-option span strong, .alert-option span small { display: block; }
.alert-option span strong { color: #eaf3fc; font-size: 10px; }
.alert-option span small { margin-top: 3px; color: #8298ad; font-size: 8px; }
.alert-option.is-plan-locked { cursor: not-allowed; opacity: .48; }
.notification-settings-note { margin: 13px 0 0; padding: 10px 12px; color: #9fb2c4; border-left: 3px solid var(--dash-orange); border-radius: 7px; background: rgba(243,144,36,.06); font-size: 9px; line-height: 1.5; }
.security-settings-panel[hidden], .security-sessions-panel[hidden] { display: none !important; }
.security-settings-panel { margin-top: 20px; }
.security-settings-intro { margin-bottom: 14px; color: #a8bacb; font-size: 10px; }
.security-setting-card { min-height: 102px; margin-bottom: 12px; padding: 16px 18px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; border: 1px solid var(--dash-line); border-radius: 14px; background: linear-gradient(115deg, rgba(15,28,42,.96), rgba(10,19,30,.82)); box-shadow: 0 12px 30px rgba(0,0,0,.1); }
.security-setting-icon { width: 42px; height: 42px; display: grid; place-items: center; color: #8e70ff; border: 2px solid #663bd5; border-radius: 13px; background: rgba(100,54,213,.11); font-size: 20px; font-weight: 900; }
.security-setting-card > div > strong, .security-setting-card > div > p, .security-setting-card > div > small { display: block; }
.security-setting-card > div > strong { color: #edf5fd; font-size: 12px; }
.security-setting-card > div > p { margin: 6px 0 3px; color: #a9bacb; font-size: 9px; line-height: 1.45; }
.security-setting-card > div > small { color: #6f879c; font-size: 8px; }
.security-setting-card > button, .security-sessions-panel > button { min-height: 40px; padding: 9px 14px; color: #e7eff8; border: 1px solid rgba(119,83,235,.7); background: rgba(12,21,32,.75); box-shadow: inset 0 0 0 1px rgba(119,83,235,.14); }
.security-setting-card > button:hover:not(:disabled), .security-sessions-panel > button:hover { color: #fff; border-color: #9e83ff; transform: translateY(-1px); }
.security-setting-card.is-pending { opacity: .75; }
.security-setting-card.is-pending > div > small { color: #e18a67; }
.security-setting-card > button:disabled { cursor: not-allowed; opacity: .65; }
.security-sessions-panel { margin: -2px 0 14px; padding: 14px 17px; display: flex; justify-content: space-between; align-items: center; gap: 14px; border: 1px solid rgba(62,139,224,.32); border-radius: 12px; background: rgba(40,111,190,.07); }
.security-sessions-panel > div { display: flex; align-items: center; gap: 11px; min-width: 0; }
.security-sessions-panel > div > div strong, .security-sessions-panel > div > div small { display: block; }
.security-sessions-panel > div > div strong { color: #eef7ff; font-size: 10px; }
.security-sessions-panel > div > div small { margin-top: 3px; color: #91a7ba; font-size: 8px; overflow-wrap: anywhere; }
.security-sessions-panel em { padding: 4px 7px; color: #66e8a5; border: 1px solid rgba(50,204,130,.35); border-radius: 999px; background: rgba(50,204,130,.08); font-size: 7px; font-style: normal; font-weight: 900; }
.session-device-icon { width: 30px; height: 30px; display: grid; place-items: center; color: #55adff; border-radius: 8px; background: rgba(45,125,230,.12); }
.system-preferences-form[hidden] { display: none !important; }
.system-preferences-form { margin-top: 20px; }
.system-preferences-head { margin-bottom: 15px; display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.system-preferences-head > p { margin: 0; color: #a8bacb; font-size: 10px; }
.system-preferences-head > button { min-height: 42px; padding: 10px 17px; color: #fff; border: 1px solid rgba(119,83,235,.55); background: linear-gradient(110deg, #2e70dc, #6b32d3); }
.system-preference-row { min-height: 88px; margin: 0; padding: 16px 18px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 42%); gap: 22px; align-items: center; border: 1px solid var(--dash-line); border-radius: 12px; background: linear-gradient(115deg, rgba(15,28,42,.94), rgba(9,18,29,.78)); }
.system-preference-row + .system-preference-row { margin-top: 9px; }
.system-preference-row > span strong, .system-preference-row > span small { display: block; }
.system-preference-row > span strong { color: #eef6fe; font-size: 11px; }
.system-preference-row > span small { margin-top: 5px; color: #8298ad; font-size: 8px; line-height: 1.4; }
.system-preference-row select { width: 100%; min-height: 43px; margin: 0; padding: 9px 35px 9px 12px; color: #dce9f5; border: 1px solid #2b3d50; border-radius: 9px; background: #0a1420; }
.system-preferences-note { margin: 13px 0 0; padding: 10px 12px; color: #9fb2c4; border-left: 3px solid #7652e9; border-radius: 7px; background: rgba(118,82,233,.07); font-size: 8px; line-height: 1.5; }

.future-features { margin-top: 16px; padding-bottom: 38px; }
.future-features article { padding: 18px; display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; border: 1px dashed rgba(119,108,244,.35); border-radius: 14px; background: rgba(119,108,244,.07); }
.future-features article > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: #a9a2ff !important; background: rgba(119,108,244,.14); font-size: 22px !important; }
.future-features strong { color: #e7e5ff; }
.future-features p { margin: 5px 0 0; color: var(--dash-muted); font-size: 11px; }
.future-features em { color: #b0aaff; font-size: 9px; font-style: normal; font-weight: 900; letter-spacing: .08em; }

.analysis-dialog { width: min(820px, calc(100% - 28px)); max-height: calc(100dvh - 24px); padding: 0; overflow-y: auto; color: var(--dash-text); border: 1px solid var(--dash-line); border-radius: 16px; background: #0d1722; box-shadow: 0 30px 90px rgba(0,0,0,.55); }
.analysis-dialog::backdrop { background: rgba(1,6,12,.76); backdrop-filter: blur(5px); }
.dialog-head { padding: 20px 22px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--dash-line); }
.dialog-head small { color: var(--dash-orange); font-weight: 900; letter-spacing: .1em; }
.dialog-head h2 { color: #fff; }
.dialog-head button { color: #fff; background: #1b2939; font-size: 20px; }
#analysisDialogBody { padding: 20px 22px; }
.dialog-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dialog-metrics article { padding: 13px; border: 1px solid var(--dash-line); border-radius: 11px; background: #121f2d; }
.dialog-metrics span, .dialog-meta span { display: block; color: var(--dash-muted); font-size: 9px; }
.dialog-metrics strong { display: block; margin-top: 6px; color: #fff; font-size: 16px; }
.date-comparison-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 10px 0 12px; }
.date-comparison-grid article { padding: 15px; border: 1px solid var(--dash-line); border-radius: 12px; background: linear-gradient(145deg, rgba(18,31,45,.98), rgba(12,22,34,.96)); }
.date-comparison-grid article:first-child { border-color: rgba(116,194,255,.32); }
.date-comparison-grid article:last-child { border-color: rgba(223,133,31,.42); }
.date-comparison-grid h3 { margin: 0 0 12px; color: #ffd28a; font-size: 14px; letter-spacing: .02em; }
.date-comparison-grid div + div { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.08); }
.date-comparison-grid span { display: block; color: var(--dash-muted); font-size: 9px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.date-comparison-grid strong { display: block; margin-top: 6px; color: #fff; font-size: clamp(17px, 2vw, 22px); }
.dialog-meta { margin-top: 15px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dialog-meta p { margin: 4px 0 0; color: #d1dfed; }
.dialog-table-wrap { margin: 14px 0; overflow-x: auto; border: 1px solid var(--dash-line); border-radius: 12px; background: rgba(255,255,255,.025); }
.dialog-data-table { width: 100%; min-width: 640px; border-collapse: collapse; }
.dialog-data-table th, .dialog-data-table td { padding: 12px 13px; border-bottom: 1px solid rgba(255,255,255,.08); text-align: left; font-size: 12px; }
.dialog-data-table th { color: #ffd08e; font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.dialog-data-table td { color: #d6e3f1; }
.dialog-data-table tr:last-child td { border-bottom: 0; }
.inventory-available-button { min-width: 88px; padding: 8px 11px; border: 1px solid rgba(32,198,223,.42); border-radius: 999px; color: #eaf8ff; background: linear-gradient(135deg, rgba(47,125,244,.35), rgba(32,198,223,.22), rgba(243,144,36,.18)); font: inherit; font-size: 11px; font-weight: 900; cursor: pointer; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.inventory-available-button:hover,
.inventory-available-button:focus-visible { transform: translateY(-2px); border-color: rgba(255,189,108,.75); box-shadow: 0 10px 24px rgba(32,198,223,.16), 0 0 0 3px rgba(243,144,36,.12); outline: none; }
.inventory-potential-panel { margin: 14px 0 0; padding: 16px; border: 1px solid rgba(32,198,223,.28); border-radius: 13px; background: linear-gradient(135deg, rgba(47,125,244,.11), rgba(32,198,223,.07), rgba(243,144,36,.09)); }
.inventory-potential-panel small { color: #7fdcff; font-size: 9px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.inventory-potential-panel h3 { margin: 7px 0 5px; color: #fff2d7; font-size: 20px; }
.inventory-potential-panel p { margin: 0 0 12px; color: #b9cadb; font-size: 11px; line-height: 1.6; }
.dialog-quality { margin-top: 15px; padding: 13px; border: 1px solid rgba(32,198,223,.22); border-radius: 11px; background: rgba(32,198,223,.06); }
.dialog-quality span { color: #6ddbea; font-size: 10px; font-weight: 900; letter-spacing: .06em; }
.dialog-quality p { margin: 6px 0 0; color: #b9c9d9; font-size: 11px; line-height: 1.5; }
.dialog-quality.locked { border-color: rgba(243,144,36,.24); background: rgba(243,144,36,.06); }
.dialog-quality.locked span { color: #ffc175; }
.dialog-actions { padding: 0 22px 20px; display: flex; gap: 9px; }
.dialog-actions button { color: #fff; background: var(--dash-blue); }
.dialog-actions .danger-button { color: #ffc0bb; background: rgba(166,61,56,.2); }
.analysis-dialog > .status { margin: 0 22px 16px; }

.workspace-notice {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  max-width: min(390px, calc(100% - 32px));
  padding: 14px 17px;
  transform: translateY(24px);
  opacity: 0;
  pointer-events: none;
  color: #ffe0b8;
  border: 1px solid rgba(243,144,36,.35);
  border-radius: 12px;
  background: #14202d;
  box-shadow: 0 22px 55px rgba(0,0,0,.4);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.55;
  white-space: pre-line;
  transition: .22s ease;
}

.workspace-notice.visible { transform: translateY(0); opacity: 1; }
.workspace-notice[data-type="error"] { color: #ffc2bd; border-color: rgba(200,70,60,.4); }

body.workspace-active input,
body.workspace-active select,
body.workspace-active textarea { color: #edf5ff; border-color: var(--dash-line); background: #111d2a; }
body.workspace-active label { color: #aebfd0; }
body.workspace-active .team-row, body.workspace-active .team-invite-form, body.workspace-active .role-guide article { color: #dce8f4; border-color: var(--dash-line); background: rgba(255,255,255,.035); }
body.workspace-active .member-info em, body.workspace-active .member-info small, body.workspace-active .role-guide span { color: #9dacbd !important; }

html[data-theme="light"] body.workspace-active {
  --dash-bg: #edf2f6;
  --dash-surface: #ffffff;
  --dash-surface-2: #f6f9fc;
  --dash-line: rgba(28, 57, 82, .15);
  --dash-text: #162433;
  --dash-muted: #607387;
  background: #edf2f6;
}

html[data-theme="light"] .workspace-app { background: radial-gradient(circle at 75% 0%, rgba(47,125,244,.1), transparent 30%), #edf2f6; }
html[data-theme="light"] .workspace-sidebar { background: rgba(250,252,255,.98); }
html[data-theme="light"] .workspace-brand { color: #142334 !important; }
html[data-theme="light"] .workspace-brand em,
html[data-theme="light"] .workspace-navigation a { color: #586b7f !important; }
html[data-theme="light"] .workspace-navigation a:hover,
html[data-theme="light"] .workspace-navigation a.active { color: #164f9e !important; background: linear-gradient(90deg, rgba(47,125,244,.15), rgba(47,125,244,.04)); }
html[data-theme="light"] .sidebar-plan-card,
html[data-theme="light"] .sidebar-help { color: #162433 !important; background: #f7fafc; }
html[data-theme="light"] .sidebar-plan-card > strong,
html[data-theme="light"] .sidebar-help strong { color: #162433; }
html[data-theme="light"] .sidebar-plan-card > strong,
html[data-theme="light"] .plan-clarity h3 { color: color-mix(in srgb, var(--plan-accent) 72%, #132333); }
html[data-theme="light"] .plan-clarity li { color: #42566a; }
html[data-theme="light"] .workspace-head { background: rgba(250,252,255,.9); }
html[data-theme="light"] .workspace-notifications { color: #345b81; background: #f7fafc; }
html[data-theme="light"] .workspace-search input,
html[data-theme="light"] .workspace-company { color: #172635; background: rgba(255,255,255,.85); }
html[data-theme="light"] .workspace-user strong { color: #172635; }
html[data-theme="light"] .dashboard-heading h1 { color: #142334; }
html[data-theme="light"] .self-demo-card { background: radial-gradient(circle at 88% 18%, rgba(243,144,36,.22), transparent 32%), linear-gradient(135deg, rgba(255,255,255,.96), rgba(240,247,252,.94) 54%, rgba(255,244,225,.94)); box-shadow: 0 18px 44px rgba(28,70,105,.1), inset 0 1px 0 rgba(255,255,255,.75); }
html[data-theme="light"] .self-demo-card h2 { color: #142334; }
html[data-theme="light"] .self-demo-card p { color: #526270; }
html[data-theme="light"] .self-demo-form { background: rgba(255,255,255,.72); border-color: rgba(25,104,174,.18); }
html[data-theme="light"] .self-demo-form select { color: #182432; background: #fff; }
html[data-theme="light"] #planBadge { color: #fff; border-color: rgba(25,104,174,.46); box-shadow: 0 9px 23px rgba(30,93,145,.2), inset 0 1px 0 rgba(255,255,255,.32); }
html[data-theme="light"] body.workspace-active .panel,
html[data-theme="light"] .metric-card { color: #162433; background: linear-gradient(145deg, #fff, #f7fafc); box-shadow: 0 16px 36px rgba(29,63,93,.08); }
html[data-theme="light"] .metric-card strong,
html[data-theme="light"] .dialog-metrics strong { color: #142334; }
html[data-theme="light"] .analysis-table td,
html[data-theme="light"] .analysis-table td strong { color: #26394c; }
html[data-theme="light"] .history-load-row { background: rgba(255,255,255,.86); color: #466075; border-color: rgba(35,94,176,.22); }
html[data-theme="light"] .trend-description strong,
html[data-theme="light"] .trend-value,
html[data-theme="light"] .product-value { color: #172635; }
html[data-theme="light"] .trend-bar b,
html[data-theme="light"] .trend-legend span,
html[data-theme="light"] .product-bar b,
html[data-theme="light"] .product-help { color: #465b70 !important; }
html[data-theme="light"] .insight-grid button { color: #172635; background: linear-gradient(145deg, #fff, #edf3f8); }
html[data-theme="light"] .insight-grid button > strong,
html[data-theme="light"] .insight-primary strong,
html[data-theme="light"] .insight-detail-grid strong { color: #172635; }
html[data-theme="light"] .insight-professional-divider { border-color: rgba(210,120,24,.32); background: linear-gradient(110deg, #edf6ff, #fff2de, #eefbfc); box-shadow: 0 10px 24px rgba(32,73,112,.08); }
html[data-theme="light"] .insight-professional-divider p { color: #75410d; }
html[data-theme="light"] .insight-grid button.professional-locked { border-color: rgba(210,120,24,.42); background: radial-gradient(circle at 100% 0, rgba(243,144,36,.2), transparent 42%), linear-gradient(145deg, #fff, #edf3f8); }
html[data-theme="light"] .insight-grid button.professional-locked::before { background: linear-gradient(135deg, rgba(255,255,255,.32), rgba(47,125,244,.12), rgba(243,144,36,.18)); }
html[data-theme="light"] .insight-dialog-source,
html[data-theme="light"] .insight-primary p,
html[data-theme="light"] .insight-products th,
html[data-theme="light"] .insight-products td { color: #465b70; }
html[data-theme="light"] .secondary-insight-card { border-color: #d8e3ec; background: linear-gradient(145deg, #fff, #f2f6f9); }
html[data-theme="light"] .additional-data-copy { color: #17364f; border-color: rgba(21,132,181,.28); border-left-color: #df851f; background: linear-gradient(105deg, #eaf4ff, #eefbfc 58%, #fff3df); box-shadow: 0 10px 24px rgba(30,81,121,.07); }
html[data-theme="light"] .additional-data-disclosure { border-color: #c8d9e7; background: linear-gradient(145deg, #fff, #f2f7fb); box-shadow: 0 12px 28px rgba(35,76,111,.09); }
html[data-theme="light"] .additional-data-disclosure > summary { color: #162433; }
html[data-theme="light"] .additional-data-disclosure > summary small { color: #496074; }
html[data-theme="light"] .additional-data-disclosure > summary:hover, html[data-theme="light"] .additional-data-disclosure > summary:focus-visible, html[data-theme="light"] .additional-data-disclosure[open] > summary { color: #10263b; background: linear-gradient(105deg, #edf6ff, #edfafa 58%, #fff3df); }
html[data-theme="light"] .additional-data-disclosure[open] > summary { border-bottom-color: #c8d9e7; }
html[data-theme="light"] .additional-data-disclosure > summary i { color: #8c4800; border-color: #e4a453; background: #fff0d8; }
html[data-theme="light"] .additional-column-card, html[data-theme="light"] .additional-result-card { color: #213b52; border-color: #c8d9e7; background: linear-gradient(145deg, #fff, #f3f8fc); box-shadow: 0 10px 24px rgba(35,76,111,.08); }
html[data-theme="light"] .additional-column-card:hover, html[data-theme="light"] .additional-column-card:focus-within { border-color: color-mix(in srgb, var(--column-accent) 72%, #b9cddd); box-shadow: 0 14px 30px rgba(35,76,111,.14), 0 0 0 2px color-mix(in srgb, var(--column-accent) 12%, transparent); }
html[data-theme="light"] .additional-column-card:has(input:checked) { border-color: color-mix(in srgb, var(--column-accent) 72%, #aebfd0); background: linear-gradient(145deg, color-mix(in srgb, var(--column-accent) 13%, #fff), color-mix(in srgb, var(--column-accent) 6%, #f5f9fc)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--column-accent) 18%, transparent), 0 16px 32px rgba(35,76,111,.13); }
html[data-theme="light"] .additional-column-check { border-color: color-mix(in srgb, var(--column-accent) 58%, #b8cada); background: color-mix(in srgb, var(--column-accent) 9%, #fff); }
html[data-theme="light"] .additional-column-card strong, html[data-theme="light"] .additional-result-card h4, html[data-theme="light"] .additional-selection-actions strong, html[data-theme="light"] .additional-result-metrics strong { color: #162433; }
html[data-theme="light"] .additional-column-card small, html[data-theme="light"] .additional-selection-actions span, html[data-theme="light"] .additional-analysis-results > p, html[data-theme="light"] .additional-result-metrics span, html[data-theme="light"] .additional-distribution li { color: #496074; }
html[data-theme="light"] .additional-column-card em { color: color-mix(in srgb, var(--column-accent) 78%, #18364d); background: color-mix(in srgb, var(--column-accent) 11%, #fff); }
html[data-theme="light"] .additional-column-hint { color: #10263b; box-shadow: 0 5px 12px rgba(35,76,111,.12); }
html[data-theme="light"] .additional-selection-actions { border-color: #c8d9e7; background: linear-gradient(100deg, #f5f9fd, #fff8ed); box-shadow: 0 10px 22px rgba(35,76,111,.06); }
html[data-theme="light"] .additional-selection-actions button { color: #fff; background: linear-gradient(110deg, #185fae, #138ba5 58%, #c66d16); box-shadow: 0 8px 18px rgba(26,98,151,.18); }
html[data-theme="light"] .additional-analysis-results { border-top-color: #cbdbe7; }
html[data-theme="light"] .additional-analysis-results > h3 { color: #9b5200; }
html[data-theme="light"] .additional-result-metrics span { color: #405d75; background: linear-gradient(145deg, #edf5fb, #fff8ed); }
html[data-theme="light"] .additional-distribution li { border-top-color: #d9e4ed; }
html[data-theme="light"] .additional-distribution li b { color: #213b52; }
html[data-theme="light"] .additional-distribution li small { color: #60798f; }
html[data-theme="light"] .additional-distribution li strong { color: #9b5200; }
html[data-theme="light"] .additional-unique-values { border-color: #e5aa62; background: linear-gradient(135deg, #edf6ff, #eefafa 56%, #fff2dc); box-shadow: 0 12px 24px rgba(35,76,111,.09); }
html[data-theme="light"] .additional-unique-values h4 { color: #172635; }
html[data-theme="light"] .additional-unique-values p { color: #496074; }
html[data-theme="light"] .additional-unique-values .additional-distribution i { color: #733b00; background: #ffe5bd; }
html[data-theme="light"] .upload-panel .panel-title #clearDashboardButton { color: #5f3100; border-color: #e5aa62; background: linear-gradient(110deg, #fff0d8, #ffc97f); box-shadow: 0 8px 18px rgba(151,83,18,.12); }
html[data-theme="light"] .upload-panel .panel-title #clearDashboardButton:hover, html[data-theme="light"] .upload-panel .panel-title #clearDashboardButton:focus-visible { color: #351b00; border-color: #d78125; background: linear-gradient(110deg, #ffe7c3, #ffb754); }
html[data-theme="light"] .portal-file-type-selector { border-color: #c3d8e8; background: linear-gradient(105deg, #edf6ff, #eefafa 58%, #fff5e7); box-shadow: 0 10px 24px rgba(30,81,121,.06); }
html[data-theme="light"] .portal-file-type-selector legend { color: #173047; }
html[data-theme="light"] .portal-file-type-selector > p { color: #4c6479 !important; }
html[data-theme="light"] .portal-file-type-options label { color: #2c465c; border-color: #c5d8e6; background: rgba(255,255,255,.88); }
html[data-theme="light"] .portal-file-type-options label:has(input:checked) { color: #15334c; border-color: #d8903f; background: linear-gradient(112deg, #e5f1ff, #e8fafa 58%, #ffecd1); }
html[data-theme="light"] .portal-file-type-options small { color: #5b7388; }
html[data-theme="light"] .portal-file-type-options label:has(input:checked) small { color: #3e5d74; }
html[data-theme="light"] .portal-sheet-selector { border-color: #bcd9e8; border-left-color: #d97b18; background: linear-gradient(105deg, #edf6ff, #eefafa 58%, #fff3df); box-shadow: 0 10px 24px rgba(30,81,121,.07); }
html[data-theme="light"] .portal-sheet-selector legend { color: #173047; }
html[data-theme="light"] .portal-sheet-selector > p { color: #496074 !important; }
html[data-theme="light"] .portal-sheet-selector > small { color: #09677c; }
html[data-theme="light"] .portal-sheet-options .portal-sheet-placeholder { color: #4d667b !important; border-color: #b9d0e1; background: rgba(255,255,255,.72); }
html[data-theme="light"] .portal-sheet-options label { color: #294258; border-color: #c5d9e7; background: rgba(255,255,255,.88); }
html[data-theme="light"] .portal-sheet-options label:has(input:checked) { color: #173047; border-color: #d8903f; background: linear-gradient(105deg, #e7f2ff, #e9fafa 58%, #ffecd0); box-shadow: 0 0 0 2px rgba(217,123,24,.1); }
html[data-theme="light"] .portal-sheet-options .portal-sheet-primary { border-color: #36a66d; background: linear-gradient(105deg, #e9fff1, #eafaff 58%, #fff0d9); box-shadow: 0 0 0 2px rgba(54,166,109,.11); }
html[data-theme="light"] .portal-sheet-options .portal-sheet-primary span { color: #123c2a; }
html[data-theme="light"] .secondary-insight-card > div span,
html[data-theme="light"] .secondary-insight-card > strong { color: #162433; }
html[data-theme="light"] .secondary-insight-card > p { color: #496074; }
html[data-theme="light"] .secondary-insight-view { color: #174b76; background: linear-gradient(135deg, color-mix(in srgb, var(--secondary-accent) 14%, #fff), #fff8ee); box-shadow: 0 8px 18px rgba(31,88,133,.08); }
html[data-theme="light"] .insight-explanation { border-color: rgba(25,105,190,.22); background: linear-gradient(135deg, rgba(31,109,210,.08), rgba(32,198,223,.06), rgba(243,144,36,.08)); }
html[data-theme="light"] .insight-explanation h3 { color: #9d5700; }
html[data-theme="light"] .insight-explanation article { border-color: #d4e0ea; background: rgba(255,255,255,.84); }
html[data-theme="light"] .insight-explanation article span { color: #14283b; }
html[data-theme="light"] .insight-explanation article p,
html[data-theme="light"] .insight-explanation ul { color: #40576c; }
html[data-theme="light"] .chat-messages { background: #edf3f7; }
html[data-theme="light"] .chat-message.assistant { color: #23374a; background: #fff; }
html[data-theme="light"] .feature-lock { background: linear-gradient(145deg, rgba(244,248,252,.93), rgba(235,242,248,.97)); }
html[data-theme="light"] .feature-lock strong { color: #9a5612; }
html[data-theme="light"] .future-features strong { color: #393276; }
html[data-theme="light"] .settings-options button { color: #23394c; background: #f7fafc; }
html[data-theme="light"] .settings-options button > strong,
html[data-theme="light"] .settings-detail h3 { color: #162433; }
html[data-theme="light"] .settings-detail { border-color: #d8e3ec; background: radial-gradient(circle at 100% 0, rgba(243,144,36,.12), transparent 35%), #f8fbfd; }
html[data-theme="light"] .settings-detail-navigation { border-color: #c6dcef; background: rgba(255,255,255,.94); box-shadow: 0 10px 24px rgba(35,76,111,.12); }
html[data-theme="light"] .settings-detail-back { color: #174d7d; border-color: #a9cce7; background: linear-gradient(110deg, #edf6ff, #effafa 58%, #fff3df); }
html[data-theme="light"] .settings-detail > p,
html[data-theme="light"] .settings-detail-note p { color: #435a6e; }
html[data-theme="light"] .company-profile-fields label { color: #2d4559; }
html[data-theme="light"] .company-profile-fields input,
html[data-theme="light"] .company-profile-fields select,
html[data-theme="light"] .company-profile-preview { color: #162433; border-color: #d8e3ec; background: #fff; }
html[data-theme="light"] .company-profile-preview > strong { color: #162433; }
html[data-theme="light"] .billing-plan-card,
html[data-theme="light"] .billing-usage-panel article { color: #172635; border-color: #d5e3ee; background: linear-gradient(145deg, #fff, #f5f9fc); }
html[data-theme="light"] .billing-plan-top strong,
html[data-theme="light"] .billing-usage-panel strong { color: #172635; }
html[data-theme="light"] .billing-plan-card p,
html[data-theme="light"] .billing-usage-panel p,
html[data-theme="light"] .billing-settings-head p { color: #4d6478; }
html[data-theme="light"] .billing-plan-price { border-color: #d9e5ee; background: #f8fbfd; }
html[data-theme="light"] .billing-plan-price strong { color: #12324d; }
html[data-theme="light"] .billing-plan-card li { color: #2f465b; }
html[data-theme="light"] .billing-settings-note { color: #4d3210; background: linear-gradient(110deg, rgba(47,125,244,.08), rgba(243,144,36,.18)); }
html[data-theme="light"] .settings-users-head strong,
html[data-theme="light"] .settings-users-table td:first-child strong { color: #162433; }
html[data-theme="light"] .settings-users-table th,
html[data-theme="light"] .settings-users-table td { color: #40566a; }
html[data-theme="light"] .settings-invitation-form input,
html[data-theme="light"] .settings-invitation-form select,
html[data-theme="light"] .settings-role-action select { color: #162433; background: #fff; }
html[data-theme="light"] .notification-settings-grid fieldset,
html[data-theme="light"] .notification-option { border-color: #d8e3ec; background: #fff; }
html[data-theme="light"] .notification-settings-grid legend,
html[data-theme="light"] .notification-option > span strong,
html[data-theme="light"] .alert-option span strong { color: #162433; }
html[data-theme="light"] .notification-settings-head > p,
html[data-theme="light"] .notification-settings-note { color: #445b70; }
html[data-theme="light"] .security-settings-intro { color: #465e72; }
html[data-theme="light"] .security-setting-card { border-color: #d7e2eb; background: linear-gradient(115deg, #fff, #f5f8fb); box-shadow: 0 10px 24px rgba(27,50,72,.07); }
html[data-theme="light"] .security-setting-card > div > strong,
html[data-theme="light"] .security-sessions-panel > div > div strong { color: #172635; }
html[data-theme="light"] .security-setting-card > div > p,
html[data-theme="light"] .security-setting-card > div > small,
html[data-theme="light"] .security-sessions-panel > div > div small { color: #52697c; }
html[data-theme="light"] .security-setting-card > button,
html[data-theme="light"] .security-sessions-panel > button { color: #392474; background: #fff; }
html[data-theme="light"] .security-sessions-panel { border-color: #cfe0ef; background: #f5faff; }
html[data-theme="light"] .system-preferences-head > p,
html[data-theme="light"] .system-preferences-note { color: #465e72; }
html[data-theme="light"] .system-preference-row { border-color: #d7e2eb; background: linear-gradient(115deg, #fff, #f5f8fb); }
html[data-theme="light"] .system-preference-row > span strong { color: #172635; }
html[data-theme="light"] .system-preference-row > span small { color: #52697c; }
html[data-theme="light"] .system-preference-row select { color: #172635; border-color: #cbd9e5; background: #fff; }
html[data-theme="light"] body.workspace-active input,
html[data-theme="light"] body.workspace-active select,
html[data-theme="light"] body.workspace-active textarea { color: #1b2b3c; background: #fff; }
html[data-theme="light"] .analysis-dialog { color: #162433; background: #f7fafc; }
html[data-theme="light"] .dialog-head h2 { color: #142334; }
html[data-theme="light"] #analysisDialogBody article { background: #fff; }
html[data-theme="light"] .dialog-table-wrap { background: #fff; border-color: #d9e5f0; }
html[data-theme="light"] .dialog-data-table th { color: #a76508; }
html[data-theme="light"] .dialog-data-table td { color: #17283a; border-bottom-color: #e5edf5; }
html[data-theme="light"] .inventory-available-button { color: #12304b; border-color: rgba(25,105,190,.28); background: linear-gradient(135deg, rgba(47,125,244,.14), rgba(32,198,223,.16), rgba(243,144,36,.18)); }
html[data-theme="light"] .inventory-potential-panel { border-color: #d7e4ef; background: linear-gradient(135deg, rgba(47,125,244,.08), rgba(32,198,223,.08), rgba(243,144,36,.1)); }
html[data-theme="light"] .inventory-potential-panel h3 { color: #17283a; }
html[data-theme="light"] .inventory-potential-panel p { color: #465b70; }

@media (max-width: 1080px) {
  .workspace-app { padding-left: 210px; }
  .workspace-sidebar { width: 210px; }
  .workspace-head { grid-template-columns: minmax(150px,1fr) auto auto auto auto auto; }
  .workspace-company strong { max-width: 150px; }
  .portal-grid { grid-template-columns: repeat(2,1fr); }
  .analytics-grid, .workspace-columns { grid-template-columns: 1fr; }
  .billing-plan-grid { grid-template-columns: 1fr; }
  .billing-usage-panel { grid-template-columns: 1fr; }
  .billing-settings-head { flex-direction: column; }
  .billing-settings-head span { white-space: normal; }
}

@media (max-width: 760px) {
  .workspace-app { padding-left: 0; }
  .workspace-app.sidebar-collapsed { padding-left: 0; }
  .workspace-sidebar { position: fixed; left: 0; top: 0; width: min(290px, 86vw); transform: translateX(-105%); transition: transform .24s ease; box-shadow: 25px 0 70px rgba(0,0,0,.45); }
  .workspace-app.sidebar-collapsed .workspace-sidebar { width: min(290px, 86vw); padding: 22px 16px; }
  .workspace-app.sidebar-collapsed .workspace-brand { justify-content: flex-start; padding: 4px 8px 24px; }
  .workspace-app.sidebar-collapsed .workspace-brand strong,
  .workspace-app.sidebar-collapsed .workspace-brand em,
  .workspace-app.sidebar-collapsed .workspace-navigation a small,
  .workspace-app.sidebar-collapsed .sidebar-plan-card,
  .workspace-app.sidebar-collapsed .sidebar-help { display: initial; }
  .workspace-app.sidebar-collapsed .sidebar-plan-card,
  .workspace-app.sidebar-collapsed .sidebar-help { display: grid; }
  .workspace-app.sidebar-collapsed .workspace-navigation a { justify-content: flex-start; padding: 0 13px; gap: 12px; font-size: 14px; }
  .workspace-app.sidebar-collapsed .workspace-navigation a > span { width: 22px; font-size: 20px !important; }
  .sidebar-collapse-toggle {
    position: absolute;
    top: 18px;
    right: 16px;
    z-index: 8;
    margin: 0;
    display: grid;
  }
  .workspace-app.sidebar-collapsed .sidebar-collapse-toggle { margin: 0; }
  .workspace-brand { padding-right: 54px; }
  .workspace-sidebar.open { transform: translateX(0); }
  .workspace-app > :not(.workspace-sidebar) { grid-column: auto; }
  .workspace-head { padding: 10px 14px; grid-template-columns: auto minmax(0,1fr) auto auto auto; }
  .sidebar-toggle { display: block; }
  .workspace-search { grid-column: 2; }
  .workspace-notifications { grid-column: 3; }
  .workspace-mobile-logout { grid-column: 4; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; }
  .workspace-theme { grid-column: 5; }
  .workspace-company { grid-column: 1 / 3; grid-row: 2; justify-self: stretch; min-width: 0; }
  .workspace-company strong { max-width: min(48vw, 240px); }
  .workspace-user { grid-column: 3 / 5; grid-row: 2; justify-self: end; min-width: 0; }
  .workspace-user strong { max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .workspace-head > #logoutButton { display: none; }
  .workspace-search input { min-height: 42px; }
  .self-demo-card, .dashboard-heading, .quick-actions, .upload-panel, .portal-grid, .analytics-grid, .insight-panel, .secondary-insights, .additional-data-panel, .workspace-columns, .chat-panel, .automation-panel, .team-panel, .settings-panel, .future-features { width: min(100% - 24px, 1180px); }
  .dashboard-heading { padding-top: 20px; align-items: flex-start; flex-direction: column; }
  .self-demo-card { grid-template-columns: 1fr; }
  #planBadge { align-self: flex-start; min-width: 116px; }
  .quick-actions { grid-template-columns: 1fr; }
  .portal-upload-form { grid-template-columns: 1fr; }
  .portal-file-configuration { grid-template-columns: 1fr; }
  .portal-file-configuration > * { grid-column: 1; }
  .portal-file-type-options { grid-template-columns: 1fr; }
  .analysis-loader:not([hidden]) { padding: 18px; }
  .analysis-loader:not([hidden]) ol { grid-template-columns: 1fr; }
  .portal-sheet-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-sheet-options label { width: 100%; }
  .portal-sheet-options span { max-width: 100%; }
  .upload-panel .panel-title, .upload-head-actions { align-items: stretch; flex-direction: column; }
  .upload-head-actions button { width: 100%; }
  .analysis-table-wrap { display: none; }
  .history-list-mobile { margin-top: 14px; display: grid; gap: 9px; }
  .history-mobile-card { padding: 13px; border: 1px solid var(--dash-line); border-radius: 11px; background: rgba(255,255,255,.035); }
  .history-mobile-card strong, .history-mobile-card span { display: block; }
  .history-mobile-card span { margin: 5px 0 9px; color: var(--dash-muted); font-size: 10px; }
  .history-mobile-card div { display: flex; gap: 7px; }
  .history-mobile-card button { color: #bcd7ff; border: 1px solid var(--dash-line); background: #142131; }
  .dialog-metrics, .date-comparison-grid { grid-template-columns: 1fr; }
  .team-panel .panel-title, .team-head-actions, .chat-panel .panel-title, .chat-head-actions, .history-panel .panel-title, .history-head-actions { align-items: flex-start; flex-direction: column; }
  .insight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .secondary-insights-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .additional-columns-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .insight-detail-grid { grid-template-columns: 1fr; }
  .insight-explanation > div { grid-template-columns: 1fr; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-options button:hover, .settings-options button:focus-visible, .settings-options button.active { transform: translateY(-2px); }
  .settings-detail { min-height: 300px; }
  .settings-detail-navigation, .settings-detail-back { width: 100%; }
  .company-profile-editor { grid-template-columns: 1fr; }
  .company-profile-preview { min-height: 250px; }
  .settings-invitation-form { grid-template-columns: 1fr 1fr; }
  .settings-invitation-form button { grid-column: 1 / -1; }
  .settings-users-table-wrap { display: none; }
  .settings-users-mobile { margin-top: 14px; display: grid; gap: 9px; }
  .settings-users-mobile article { padding: 13px; display: grid; grid-template-columns: 1fr auto; gap: 10px; border: 1px solid var(--dash-line); border-radius: 11px; background: rgba(255,255,255,.025); }
  .settings-users-mobile article strong, .settings-users-mobile article small { display: block; }
  .settings-users-mobile article strong { color: #eef6ff; font-size: 10px; }
  .settings-users-mobile article small { margin-top: 3px; color: #8499ad; font-size: 8px; }
  .settings-users-mobile article dl { grid-column: 1 / -1; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .settings-users-mobile article dl > div { padding: 8px; border-radius: 8px; background: rgba(255,255,255,.03); }
  .settings-users-mobile dt { color: #7f96ab; font-size: 7px; }
  .settings-users-mobile dd { margin: 3px 0 0; color: #cbd9e6; font-size: 9px; }
  .settings-users-mobile .settings-role-action { grid-column: 1 / -1; }
  .settings-users-mobile .settings-role-action select { width: 100%; }
  .notification-settings-grid { grid-template-columns: 1fr; }
  .security-setting-card { grid-template-columns: auto minmax(0, 1fr); }
  .security-setting-card > button { grid-column: 1 / -1; width: 100%; }
  .system-preference-row { grid-template-columns: 1fr; gap: 11px; }
}

@media (max-width: 480px) {
  .workspace-company { padding: 0 10px; }
  .workspace-company small { display: none; }
  .workspace-company strong { max-width: 42vw; font-size: 11px; }
  .workspace-user > span { width: 32px; height: 32px; }
  .workspace-user strong { max-width: 90px; font-size: 10px; }
  .workspace-user small { font-size: 8px; }
  .portal-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 112px; }
  .trend-bars { width: max(100%, calc(var(--month-count) * 88px)); gap: 7px; }
  .trend-bar { min-width: 72px; }
  .trend-value { font-size: 8px; }
  .trend-bar b { font-size: 8px; }
  .product-bars { width: max(100%, calc(var(--product-count) * 92px)); gap: 8px; }
  .product-bar { min-width: 76px; }
  .product-value { font-size: 8px; }
  .dialog-meta { grid-template-columns: 1fr; }
  .dialog-actions { flex-direction: column; }
  .insight-grid { grid-template-columns: 1fr; }
  .secondary-insights-grid { grid-template-columns: 1fr; }
  .secondary-insight-head { padding-right: 0; align-items: flex-start; flex-direction: column; }
  .secondary-insight-view { position: relative; margin-left: 39px; }
  .additional-columns-grid, .additional-result-grid { grid-template-columns: 1fr; }
  .additional-selection-actions { align-items: stretch; flex-direction: column; }
  .additional-selection-actions button { width: 100%; }
  .additional-result-metrics { grid-template-columns: 1fr; }
  .settings-options { grid-template-columns: 1fr; }
  .administration-grid { grid-template-columns: 1fr; }
  .company-profile-row { grid-template-columns: 1fr; }
  .company-profile-actions { align-items: stretch; flex-direction: column-reverse; }
  .settings-users-head { align-items: flex-start; flex-direction: column; }
  .settings-invitation-form { grid-template-columns: 1fr; }
  .settings-invitation-form button { grid-column: auto; }
  .notification-settings-head { align-items: stretch; flex-direction: column; }
  .security-setting-card { padding: 14px; gap: 12px; }
  .security-setting-icon { width: 38px; height: 38px; }
  .security-sessions-panel { align-items: stretch; flex-direction: column; }
  .security-sessions-panel > button { width: 100%; }
  .system-preferences-head { align-items: stretch; flex-direction: column; }
  .system-preferences-head > button { width: 100%; }
  .feature-panel.is-locked { min-height: 230px; }
  .feature-lock { padding: 24px 20px; }
}

/* Prueba comercial: los detalles de planes dentro del panel quedan opacos/difuminados. */
.billing-plan-card p,
.billing-plan-card .billing-plan-price,
.billing-plan-card ul,
.billing-settings-note,
.billing-usage-panel {
  filter: blur(2.4px) saturate(.78);
  opacity: .46;
  user-select: none;
  transition: filter .18s ease, opacity .18s ease;
}

.billing-plan-card:hover p,
.billing-plan-card:hover .billing-plan-price,
.billing-plan-card:hover ul,
.billing-usage-panel:hover {
  filter: blur(1.9px) saturate(.86);
  opacity: .54;
}
