@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@300;400;500;600;700&display=swap");

/* Somos Pulso brand layer. It intentionally loads last: the dashboard keeps
   every component contract while sharing the public site's visual language. */
:root {
  --ink: #171411;
  --ink-soft: #5f5a54;
  --ink-muted: #8a837b;
  --paper: #f2efe8;
  --card: #fffdf8;
  --line: #d9d3c9;
  --line-soft: #ebe6dd;
  --brand: #ff5b2c;
  --brand-hover: #e94a1e;
  --brand-pale: #fff0e8;
  --primary: #ff5b2c;
  --primary-foreground: #fffaf4;
  --primary-strong: #e94a1e;
  --accent: #fff0e8;
  --accent-foreground: #8d2c12;
  --background: #f2efe8;
  --foreground: #171411;
  --border: #d9d3c9;
  --muted: #e9e4da;
  --muted-foreground: #777068;
  --ring: rgba(255, 91, 44, .24);
  --sidebar: 276px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(34, 25, 18, .05);
  --shadow-md: 0 12px 30px rgba(40, 27, 18, .07);
  --shadow-lg: 0 26px 64px rgba(34, 22, 14, .12);
}

::selection { color: #fff; background: #ff5b2c; }

html, body { max-width: 100%; overflow-x: hidden; }

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 3%, rgba(255, 91, 44, .055), transparent 24rem),
    var(--paper);
  font-family: "DM Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::after {
  content: "";
  position: fixed;
  z-index: 9999;
  inset: 0;
  pointer-events: none;
  opacity: .018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitchTiles'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3, .gd-header h1, .page-heading h1 {
  font-family: "Manrope", "DM Sans", sans-serif;
  letter-spacing: -.035em;
}

.sidebar {
  color: #f3efe9;
  background:
    radial-gradient(circle at 28% 4%, rgba(255, 91, 44, .16), transparent 17rem),
    linear-gradient(180deg, #0b0a09 0%, #11100e 52%, #090909 100%);
  border-right: 1px solid rgba(255, 184, 109, .13);
  box-shadow: 20px 0 70px rgba(17, 10, 6, .13);
}

.brand {
  height: 76px;
  border-bottom-color: rgba(255, 255, 255, .09);
}
.brand strong { color: #f6f1e9; font-family: "Manrope", sans-serif; letter-spacing: .19em; }
.brand small, .nav-group-label, .candidate-switcher > label { color: #8f8780; }
.brand-wave-mark {
  border-color: rgba(255, 91, 44, .35);
  background: radial-gradient(circle, rgba(255, 91, 44, .2), transparent 70%);
}
.brand-wave-track { stroke: rgba(255, 184, 109, .18); }
.brand-wave-signal { stroke: #ff6a3f; filter: drop-shadow(0 0 6px rgba(255, 91, 44, .9)); }
.brand-wave-halo { border-color: rgba(255, 91, 44, .48); }
.brand::after { background: linear-gradient(90deg, transparent, #ff5b2c, transparent); }

.candidate-switcher {
  border-color: rgba(255, 184, 109, .12);
  background: linear-gradient(145deg, rgba(45, 27, 20, .74), rgba(20, 17, 14, .82));
  box-shadow: inset 0 1px rgba(255, 255, 255, .03), 0 18px 36px rgba(0, 0, 0, .15);
}
.select-row select, .sidebar .icon-button {
  color: #f1ece5;
  border-color: rgba(255, 184, 109, .16);
  background: rgba(5, 5, 5, .42);
}
.select-row select:focus { border-color: #ff6a3f; box-shadow: 0 0 0 3px rgba(255, 91, 44, .12); }
.sidebar .icon-button:hover { color: #fff; border-color: rgba(255, 91, 44, .55); background: rgba(255, 91, 44, .18); }
.candidate-mini .avatar {
  color: #fff7ef;
  border-color: rgba(255, 91, 44, .34);
  background: linear-gradient(145deg, #b63818, #ff6a3f);
  box-shadow: 0 0 0 3px rgba(255, 91, 44, .07);
}
.candidate-mini strong, .assigned-candidate-name { color: #f7f2eb !important; }
.candidate-mini small { color: #8d857d; }

.nav-group + .nav-group { border-top-color: rgba(255, 255, 255, .075); }
.nav-item { color: #a59d95; }
.nav-item:hover {
  color: #fff8f0;
  border-color: rgba(255, 184, 109, .12);
  background: rgba(255, 184, 109, .055);
}
.nav-item.active {
  color: #fffaf5;
  border-color: rgba(255, 91, 44, .25);
  background: linear-gradient(90deg, rgba(255, 91, 44, .22), rgba(255, 91, 44, .045));
}
.nav-item.active::before { background: #ff5b2c; box-shadow: 0 0 12px rgba(255, 91, 44, .9); }
.nav-item.active::after { background: #ff9b78; box-shadow: 0 0 9px #ff5b2c; }
.nav-icon { color: #7f7770; border-color: rgba(255, 255, 255, .08); background: rgba(0, 0, 0, .22); }
.nav-item.active .nav-icon { color: #ff9b78; border-color: rgba(255, 91, 44, .26); background: rgba(255, 91, 44, .1); }
.sidebar-logout { color: #817971; }
.sidebar-logout:hover { color: #f4eee7; background: rgba(255, 184, 109, .06); }

.main-content { background: transparent; }
.topbar {
  border-bottom: 1px solid rgba(74, 61, 50, .12);
  background: rgba(242, 239, 232, .88);
  box-shadow: none;
  backdrop-filter: blur(18px) saturate(130%);
}
.breadcrumb span, .breadcrumb b, .last-update { color: #898178; }
.breadcrumb strong { color: #29241f; }
.operation-chip {
  border-color: #d8d0c5;
  background: rgba(255, 253, 248, .72);
  box-shadow: var(--shadow-sm);
}
.operation-chip.active i { background: #ff5b2c; box-shadow: 0 0 0 3px rgba(255, 91, 44, .12), 0 0 10px rgba(255, 91, 44, .36); }

.content-wrap { max-width: 1580px; }
.global-control-bar {
  border-color: rgba(110, 94, 79, .16);
  border-radius: 16px;
  background: rgba(255, 253, 248, .72);
  box-shadow: 0 12px 35px rgba(55, 39, 27, .055);
  backdrop-filter: blur(14px);
}
.time-range-control > span { color: #8c8279; }
.time-range-control button { color: #6f665e; border-radius: 99px; }
.time-range-control button:hover { color: #1c1916; background: #eee8de; }
.time-range-control button.active {
  color: #fffaf4;
  border-color: #ff5b2c;
  background: #ff5b2c;
  box-shadow: 0 8px 18px rgba(255, 91, 44, .19);
}
.freshness-status strong { color: #2c2722; }
.freshness-status small { color: #8a8178; }
.freshness-status i { background: #ff5b2c; box-shadow: 0 0 0 4px rgba(255, 91, 44, .09); }

.stale-warning {
  color: #7e351e;
  border-color: #f0b494;
  background: #fff4ea;
}
.page-heading { border-bottom-color: #d9d2c8; }
.page-heading .eyebrow, .eyebrow { color: #ff5b2c; letter-spacing: .17em; }
.page-heading h1 { color: #181512; font-weight: 500; }
.page-heading p { color: #6f6860; }

.button.primary {
  color: #fffaf4;
  border-color: #ff5b2c;
  background: #ff5b2c;
  box-shadow: 0 10px 24px rgba(255, 91, 44, .18);
}
.button.primary:hover { border-color: #e94a1e; background: #e94a1e; box-shadow: 0 14px 30px rgba(255, 91, 44, .24); }
.button.secondary { color: #302a25; border-color: #d8d0c5; background: #fffdf8; }
.button.secondary:hover { border-color: #c8bcaf; background: #f8f3eb; }

.card, .metric-card, .electoral-kpi-section, .daily-brief, .territorial-intelligence,
.advisor-hero, .forecast-v2-headline > div {
  border-color: #ddd5ca;
  background: rgba(255, 253, 248, .88);
  box-shadow: 0 14px 40px rgba(47, 32, 21, .055);
}
.card:hover, .metric-card:hover { border-color: #cfc2b4; box-shadow: 0 18px 48px rgba(47, 32, 21, .085); }
.card-heading h2 { color: #211d19; }

/* The executive header becomes the dashboard equivalent of the site's hero. */
#section-overview .gd-header {
  position: relative;
  min-height: 196px;
  margin: 0 0 -42px;
  padding: 34px 34px 76px;
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  color: #f6f0e9;
  background:
    radial-gradient(circle at 78% 30%, rgba(255, 91, 44, .25), transparent 25rem),
    linear-gradient(145deg, #090909, #17120f 68%, #24110d);
  box-shadow: 0 28px 70px rgba(32, 20, 13, .18);
}
#section-overview .gd-header::before {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 49.9%, rgba(255, 255, 255, .025) 50%, transparent 50.1%),
    linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px);
  background-size: 100% 100%, 100% 76px;
}
#section-overview .gd-header::after {
  content: "";
  display: block;
  position: absolute;
  right: -80px;
  bottom: -190px;
  width: 430px;
  height: 430px;
  border: 1px solid rgba(255, 91, 44, .22);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(255, 91, 44, .035), 0 0 0 140px rgba(255, 184, 109, .018);
}
#section-overview .gd-header > * { position: relative; z-index: 2; }
#section-overview .gd-kicker { color: #b5aaa0 !important; }
#section-overview .gd-kicker::before { background: #ff5b2c; box-shadow: 0 0 12px #ff5b2c; }
#section-overview .gd-header h1 { color: #fffaf4; font-size: clamp(31px, 3.1vw, 49px); font-weight: 400; }
#section-overview .gd-header p { color: #aaa199; }
#section-overview .gd-header-status > span { color: #ece4dc; }
#section-overview .gd-header-status small { color: #9c9188; }
#section-overview .gd-quality {
  color: #f7f0e9;
  border-color: rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .055);
  backdrop-filter: blur(12px);
}
#section-overview .gd-quality > span, #section-overview .gd-quality > small { color: #aaa097; }
#section-overview .gd-quality > i { background: rgba(255, 255, 255, .1); }
#section-overview .gd-quality > i b { background: #ff5b2c; }
#section-overview .gd-state-banner { z-index: 4; margin: 12px 18px 0; }
#section-overview .gd-kpis { position: relative; z-index: 3; margin: 0 18px; border-color: #ddd5ca; box-shadow: 0 20px 55px rgba(40, 25, 16, .13); }
#section-overview .gd-kpi, #section-overview .gd-kpi:hover { background: #fffdf8; }
#section-overview .gd-kpi h3 { color: #211c18; }
#section-overview .gd-kpi > span { color: #857b72; }
#section-overview .gd-kpi footer b { color: #d7441c; }
#section-overview .gd-insights { border-color: #d9d2c8; }
#section-overview .gd-card, #section-overview .gd-card:hover { background: #fffdf8 !important; }
#section-overview .gd-main-grid, #section-overview .gd-kpis { border-color: #d9d2c8; }
#section-overview .gd-card + .gd-card, #section-overview .gd-kpi + .gd-kpi { border-color: #e8e1d8 !important; }

input, select, textarea {
  color: #211d19;
  border-color: #d8d0c5;
  background: #fffdf8;
}
input:focus, select:focus, textarea:focus { border-color: #ff5b2c; box-shadow: 0 0 0 3px rgba(255, 91, 44, .1); }
.modal { border-color: #d9d0c4; background: #fffdf8; box-shadow: 0 35px 90px rgba(27, 18, 12, .24); }
.modal-backdrop { background: rgba(10, 9, 8, .7); backdrop-filter: blur(9px); }

@media (max-width: 760px) {
  .main-content, .content-wrap, .page-section, .general-dashboard { width: 100%; min-width: 0; max-width: 100vw; }
  .mention-drawer:not(.open) { visibility: hidden; }
  #section-overview .gd-header { min-height: 210px; margin: 0 0 -36px; padding: 25px 22px 68px; border-radius: 16px; }
  #section-overview .gd-header h1 { font-size: 30px; }
  #section-overview .gd-kpis { margin-inline: 10px; }
  .global-control-bar { border-radius: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .brand-wave-signal, .brand-wave-halo { animation: none !important; }
}

/* Access screen: same identity as somospulso.digital, with the orange signal
   replacing the unrelated blue/purple product skin. */
.auth-gate {
  color: #f2eee7;
  background:
    radial-gradient(circle at 76% 28%, rgba(255, 91, 44, .13), transparent 29%),
    radial-gradient(circle at 9% 86%, rgba(255, 184, 109, .08), transparent 27%),
    #090909 !important;
}
.auth-gate::before {
  opacity: .34;
  background:
    repeating-linear-gradient(90deg, transparent 0 28px, rgba(255, 91, 44, .22) 29px 30px),
    repeating-linear-gradient(0deg, transparent 0 18px, rgba(255, 184, 109, .14) 19px 20px);
}
.auth-gate::after { background: radial-gradient(ellipse at center, rgba(255, 91, 44, .23), transparent 62%); }
.auth-grid-wave span:first-child { background: linear-gradient(90deg, transparent, #ff5b2c 30%, #9b3217 60%, transparent 87%); }
.auth-grid-wave span:last-child { background: linear-gradient(90deg, #ffb86d, transparent 36%, #ff5b2c 70%, transparent); }
.auth-logo {
  border-color: #ff5b2c;
  box-shadow: 0 0 0 4px rgba(255, 91, 44, .1), 0 0 34px rgba(255, 91, 44, .22);
}
.auth-logo::after { border-color: rgba(255, 91, 44, .46); }
.auth-logo path { stroke: #ff5b2c; filter: drop-shadow(0 0 5px rgba(255, 91, 44, .9)); }
.auth-logo .auth-pulse-track { stroke: rgba(255, 184, 109, .22); }
.auth-wordmark strong { color: #fffaf4; font-family: "Manrope", sans-serif; }
.auth-wordmark b { color: #ff6a3f; }
.auth-wordmark small { color: #8e867e; }
.auth-presentation h1 { color: #fffaf4; font-family: "Manrope", sans-serif; font-weight: 400; }
.auth-presentation h1 span { color: #ff5b2c; }
.auth-presentation > p { color: #aaa199; }
.auth-capability i {
  color: #ff6a3f;
  border-color: rgba(255, 184, 109, .14);
  background: rgba(34, 25, 19, .72);
  box-shadow: inset 0 0 20px rgba(255, 91, 44, .07);
}
.auth-capability:nth-child(2) i { color: #ffb86d; }
.auth-capability:nth-child(3) i { color: #f07a55; }
.auth-capability:nth-child(4) i { color: #d9b27d; }
.auth-capability:hover { background: linear-gradient(90deg, rgba(255, 91, 44, .08), transparent); }
.auth-capability strong { color: #e8e1d9; }
.auth-capability small { color: #817a73; }
.auth-card {
  border-color: rgba(255, 184, 109, .16) !important;
  background: linear-gradient(145deg, rgba(29, 23, 19, .96), rgba(12, 11, 10, .96)) !important;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .48), inset 0 1px rgba(255, 255, 255, .025) !important;
}
.auth-card h2 { color: #fffaf4 !important; font-family: "Manrope", sans-serif; font-weight: 500; }
.auth-card > p { color: #8d857e !important; }
.auth-card label { color: #cfc6bd !important; }
.auth-input > span, .auth-password-toggle { color: #887d74; }
.auth-card input[type="email"], .auth-card input[type="password"], .auth-card input[type="text"] {
  border-color: rgba(255, 184, 109, .14) !important;
  background: #17130f !important;
  color: #f5eee7 !important;
}
.auth-card input:focus { border-color: #ff5b2c !important; box-shadow: 0 0 0 3px rgba(255, 91, 44, .11) !important; }
.auth-card input::placeholder { color: #726a63; }
.auth-options { color: #958c84; }
.auth-remember input { accent-color: #ff5b2c; }
.auth-help, .auth-contact a { color: #e66a44; }
.auth-card .auth-submit {
  color: #fffaf4;
  background: #ff5b2c !important;
  box-shadow: 0 12px 30px rgba(255, 91, 44, .22);
}
.auth-card .auth-submit:hover { background: #e94a1e !important; }
.auth-contact { border-top-color: rgba(255, 255, 255, .09); color: #7e766f; }
.auth-contact i { color: #ff6a3f; }
.auth-footer, .auth-footer a { color: #6f6862; }

/* Ranked, evidence-bound opportunity engine. */
.opportunity-command{margin:22px 0;overflow:hidden;border:1px solid #32271f;border-radius:18px;color:#f4eee7;background:radial-gradient(circle at 82% 10%,rgba(255,91,44,.2),transparent 20rem),linear-gradient(145deg,#0b0a09,#17120f 70%,#20110c);box-shadow:0 24px 60px rgba(34,22,14,.16)}
.opportunity-command>header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 23px;border-bottom:1px solid rgba(255,255,255,.09)}
.opportunity-command>header .eyebrow{color:#ff6a3f}.opportunity-command>header h2{margin:5px 0 0;color:#fffaf4;font-size:20px;font-weight:450}
.opportunity-command-status{padding:7px 10px;border:1px solid rgba(255,91,44,.24);border-radius:99px;color:#ffc0aa;background:rgba(255,91,44,.08);font-size:9px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}
.opportunity-command-main{display:grid;grid-template-columns:86px minmax(0,1.4fr) minmax(260px,.6fr)}
.opportunity-rank{padding:27px 20px;border-right:1px solid rgba(255,255,255,.08)}.opportunity-rank span{display:block;color:#ff5b2c;font:300 38px/1 "Manrope",sans-serif}.opportunity-rank small{display:block;margin-top:11px;color:#776f68;font-size:7px;font-weight:800;letter-spacing:.14em;line-height:1.5}
.opportunity-copy{padding:27px 28px}.opportunity-copy h3{margin:0;color:#fffaf4;font-size:clamp(21px,2vw,31px);font-weight:400}.opportunity-copy>p{margin:10px 0 20px;color:#aaa098;font-size:12px;line-height:1.6}
.opportunity-action,.opportunity-message,.opportunity-growth{margin-top:16px}.opportunity-copy div>span,.opportunity-operation div>span{display:block;margin-bottom:6px;color:#ff7650;font-size:7px;font-weight:800;letter-spacing:.15em}.opportunity-action strong{color:#ece4dc;font-size:13px;line-height:1.55}
.opportunity-message{padding:13px 15px;border-left:2px solid #ff5b2c;background:rgba(255,91,44,.065)}.opportunity-message q{color:#f4e7df;font-size:12px;line-height:1.55}.opportunity-growth p{margin:0;color:#aaa098;font-size:11px;line-height:1.6}
.opportunity-alignment{margin-top:18px;padding:13px 15px;border:1px solid rgba(255,255,255,.09);border-radius:10px;background:rgba(255,255,255,.035)}.opportunity-alignment>span{display:block;margin-bottom:6px;color:#ff7650;font-size:7px;font-weight:800;letter-spacing:.15em}.opportunity-alignment strong{color:#eee6de;font-size:11px}.opportunity-alignment p{margin:6px 0;color:#9e958d;font-size:10px;line-height:1.5}.opportunity-alignment small{color:#c6b4a8;font-size:8px}.opportunity-alignment.aligned{border-color:rgba(91,188,125,.28)}.opportunity-alignment.conflict{border-color:rgba(255,91,44,.5);background:rgba(255,91,44,.08)}
.opportunity-operation{padding:27px 23px;border-left:1px solid rgba(255,255,255,.08);background:rgba(0,0,0,.15)}.opportunity-operation>div{margin-bottom:16px}.opportunity-operation strong{color:#e8e0d8;font-size:11px;line-height:1.45}.opportunity-operation>p{padding-top:12px;border-top:1px solid rgba(255,255,255,.08);color:#9c9189;font-size:9px;line-height:1.55}.opportunity-operation>p b{color:#ff9b7d}.opportunity-operation footer{display:flex;flex-wrap:wrap;gap:5px;margin-top:15px}.opportunity-operation footer a,.opportunity-operation footer span{padding:5px 7px;border:1px solid rgba(255,184,109,.15);border-radius:6px;color:#c8b7aa;font-size:8px;text-decoration:none}
.opportunity-queue{display:grid;grid-template-columns:repeat(3,1fr);border-top:1px solid rgba(255,255,255,.08)}.opportunity-queue>div{display:grid;grid-template-columns:28px 1fr auto;gap:9px;align-items:center;padding:13px 18px;border-left:1px solid rgba(255,255,255,.07)}.opportunity-queue>div:first-child{border-left:0}.opportunity-queue span,.opportunity-queue>div>b{color:#ff6a3f;font-size:10px}.opportunity-queue p{margin:0;min-width:0}.opportunity-queue strong,.opportunity-queue small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.opportunity-queue strong{color:#ddd5ce;font-size:10px}.opportunity-queue small{margin-top:3px;color:#766f68;font-size:8px}
.opportunity-method{display:block;padding:9px 22px;border-top:1px solid rgba(255,255,255,.06);color:#665f59;font-size:8px}.opportunity-command-empty{padding:28px 24px}.opportunity-command-empty strong{color:#eee7df;font-size:15px}.opportunity-command-empty p{margin:7px 0;color:#9a9189}.opportunity-command-empty small{color:#ff8a68}
@media(max-width:760px){.opportunity-command>header{align-items:flex-start;flex-direction:column}.opportunity-command-main{grid-template-columns:1fr}.opportunity-rank{display:flex;align-items:center;gap:12px;padding:18px 20px;border-right:0;border-bottom:1px solid rgba(255,255,255,.08)}.opportunity-rank small{margin:0}.opportunity-copy{padding:22px 20px}.opportunity-operation{padding:22px 20px;border-top:1px solid rgba(255,255,255,.08);border-left:0}.opportunity-queue{grid-template-columns:1fr}.opportunity-queue>div{border-top:1px solid rgba(255,255,255,.07);border-left:0}}
.candidate-memory-fields{display:grid;gap:12px;margin:18px 0;padding:18px;border:1px solid rgba(255,91,44,.2);border-radius:14px;background:rgba(255,91,44,.035)}.candidate-memory-fields>.eyebrow{color:#f15a2a}.candidate-memory-fields textarea{resize:vertical}
.candidate-memory-auto{display:flex;gap:10px;align-items:flex-start;margin:0;padding:12px;border-radius:10px;background:rgba(255,91,44,.08);color:#66584f;font-size:11px;line-height:1.5}.candidate-memory-auto i{color:#f15a2a;font-style:normal}.candidate-memory-auto strong{display:block;color:#2a211c}
