/*
 * Gestión de Brigadas — institutional ARL visual system
 * Visual-only layer: no application state, routes or data contracts are changed.
 */
:root {
  --navy: #12314a;
  --navy2: #0b2236;
  --red: #b42318;
  --paper: #f4f7fa;
  --ink: #102a43;
  --muted: #52677d;
  --line: #d7e1ea;
  --teal: #0f766e;
  --amber: #b85c00;
  --white: #fff;
  --surface-soft: #edf3f6;
  --surface-tint: #e8f3f1;
  --focus: #147d92;
  --shadow: 0 1px 2px #102a430d, 0 8px 22px #102a430a;
  --shadow-raised: 0 16px 38px #0b22361a;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --motion-fast: 140ms;
  --motion-base: 200ms;
}

html {
  color: var(--ink);
  background: var(--paper);
  font-family: "Segoe UI Variable", Aptos, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  text-rendering: optimizeLegibility;
}

body {
  min-width: 320px;
  background:
    linear-gradient(180deg, #ffffff 0, var(--paper) 240px),
    var(--paper);
}

::selection { background: #bde3df; color: var(--navy2); }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button, summary, label:has(input[type="file"]) { cursor: pointer; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* Shared surfaces and controls */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow);
}

.btn {
  min-height: 44px;
  border-radius: var(--radius-sm);
  padding-inline: 16px;
  font-weight: 650;
  letter-spacing: .01em;
  box-shadow: none;
  transition: background-color var(--motion-fast), border-color var(--motion-fast), color var(--motion-fast), box-shadow var(--motion-fast);
}

.btn:hover { box-shadow: 0 3px 10px #102a4317; }
.btn:active { transform: none; box-shadow: inset 0 0 0 1px #102a4317; }
.btn.primary, .btn.red { background: var(--teal); color: #fff; }
.btn.primary:hover, .btn.red:hover { background: #0b625c; }
.btn.soft { border: 1px solid var(--line); background: #fff; color: var(--navy); }
.btn.soft:hover { border-color: #a8bac9; background: #f6f9fb; }
.btn.danger, .delete-company { border-color: #e6b8b3 !important; background: #fff !important; color: var(--red) !important; }
.btn:disabled { opacity: .48; box-shadow: none; cursor: not-allowed; }

.field {
  color: #3e566d;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .015em;
}

.field input, .field select, .field textarea,
.search-field input, .user-row select, .team-actions select {
  min-height: 46px;
  border: 1px solid #c9d5df;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  box-shadow: inset 0 1px 2px #102a4308;
  transition: border-color var(--motion-fast), box-shadow var(--motion-fast);
}

.field input:hover, .field select:hover, .field textarea:hover,
.search-field input:hover, .user-row select:hover { border-color: #8298aa; }
.field input:focus, .field select:focus, .field textarea:focus,
.search-field input:focus, .user-row select:focus { border-color: var(--focus); box-shadow: 0 0 0 3px #147d921a; }

.eyebrow {
  color: var(--teal);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .13em;
}

.tag, .version-tag {
  border: 1px solid #c9d5df;
  border-radius: 999px;
  background: #f2f6f8;
  color: #35516a;
  font-weight: 700;
}
.tag.done { border-color: #b8ddd7; background: #e9f6f3; color: #0b625c; }
.notice { border: 1px solid #ead2a8; border-radius: var(--radius-sm); background: #fff8e8; color: #764817; }

/* Login */
.login {
  grid-template-columns: minmax(360px, 520px) minmax(420px, 1fr);
  min-height: 100dvh;
  background: var(--navy2);
}

.login-panel { padding: clamp(38px, 6vw, 80px); }
.login-brand { gap: 14px; }
.login-brand img { width: 44px; }
.login-brand b { color: var(--navy); font-size: 15px; letter-spacing: .08em; }
.login-brand small { color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: .13em; }
.login h1 {
  max-width: 10ch;
  margin: 52px 0 20px;
  color: var(--navy2);
  font-size: clamp(40px, 4.8vw, 62px);
  font-weight: 720;
  line-height: 1.02;
  letter-spacing: -.045em;
}
.login h1 span { color: var(--teal); }
.login p { max-width: 52ch; color: var(--muted); font-size: 15px; line-height: 1.7; }
.login form { max-width: 420px; }
.login form .btn { margin-top: 24px; }
.login-visual {
  isolation: isolate;
  background:
    linear-gradient(#ffffff0a 1px, transparent 1px),
    linear-gradient(90deg, #ffffff0a 1px, transparent 1px),
    radial-gradient(circle at 66% 38%, #167f7738 0, transparent 34%),
    linear-gradient(145deg, #173d58, #0a2134 72%);
  background-size: 48px 48px, 48px 48px, auto, auto;
}
.login-visual::before {
  width: 430px;
  height: 430px;
  border-color: #ffffff18;
  background: #ffffff05;
}
.login-visual::after { width: 280px; height: 280px; border-color: #ffffff1f; }
.flame {
  width: 142px;
  height: 142px;
  border: 1px solid #ffffff2b;
  border-radius: 30px;
  background: #ffffff0b url('/icon.svg') center/86px no-repeat;
  box-shadow: 0 26px 70px #0005;
  font-size: 0;
  transform: rotate(-2deg);
}
.login-note { color: #d4e0e8; font-size: 11px; font-weight: 650; letter-spacing: .16em; }

/* App frame */
.side {
  width: 248px;
  padding: 28px 16px 22px;
  border-right: 1px solid #ffffff0f;
  background: linear-gradient(180deg, #102f47 0, #0b2236 100%);
}
.content {
  width: calc(100% - 248px);
  max-width: none;
  margin-left: 248px;
  padding: 0 clamp(24px, 3.5vw, 52px) 72px;
}
.brand { margin: 0 7px 28px; gap: 12px; }
.brand img { width: 38px; }
.brand b { font-size: 13px; letter-spacing: .09em; }
.brand small { color: #afc0ce; font-size: 8px; font-weight: 600; letter-spacing: .13em; }
.nav { gap: 4px; }
.nav button {
  position: relative;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: #c1ced8;
  font-size: 12px;
  font-weight: 590;
  transition: background-color var(--motion-fast), color var(--motion-fast), border-color var(--motion-fast);
}
.nav button:hover { border-color: #ffffff17; background: #ffffff0c; color: #fff; }
.nav button.active {
  border-color: #68b6ad40;
  background: #14807729;
  color: #fff;
  box-shadow: none;
}
.nav button.active::before {
  content: "";
  position: absolute;
  inset: 11px auto 11px -1px;
  width: 3px;
  border-radius: 3px;
  background: #64c8bb;
}
.nav-icon { width: 20px; height: 20px; display: inline-grid; place-items: center; flex: 0 0 20px; }
.ui-icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.profile { border-top-color: #ffffff1a; }
.profile small { color: #aebfcd; }
.profile .btn { border: 1px solid #ffffff1c; background: #ffffff0a; }
.profile .btn:hover { background: #ffffff14; }

.topbar {
  min-height: 92px;
  border-bottom: 1px solid var(--line);
  background: #ffffffd9;
}
.topbar h1 { color: var(--navy2); font-size: clamp(21px, 2vw, 27px); font-weight: 690; letter-spacing: -.025em; }
.top-actions { gap: 10px; }
.net {
  border: 1px solid #b9ddd6;
  border-radius: 999px;
  background: #eaf7f4;
  color: #0b625c;
  font-weight: 650;
}
.net.off { border-color: #ead2a8; background: #fff8e8; color: #80501b; }
.sync-tools { border-bottom: 1px solid #e5ecf2; }
.page { padding-top: 28px; }
.page-title { align-items: flex-end; margin-bottom: 24px; }
.page-title h2, .insight-title h2 {
  color: var(--navy2);
  font-weight: 710;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.page-title p, .insight-title p { color: var(--muted); }

/* Overview and operational content */
.hero {
  min-height: 260px;
  border: 1px solid #ffffff12;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(110deg, #102f47 0%, #174b5b 64%, #126f68 100%);
  box-shadow: var(--shadow-raised);
}
.hero::after { border-color: #ffffff17; }
.hero h2 { font-weight: 700; letter-spacing: -.045em; }
.hero h2 span { color: #a7e0d8; }
.hero p { color: #d7e5eb; }
.hero .btn { background: #fff; color: var(--navy2); }
.score-orbit { background: conic-gradient(#7bd3c8 var(--progress), #ffffff24 0); }
.score-orbit::before { background: #164b59; }
.cards3 { gap: 16px; }
.stat strong, .rank strong, .parent-overview strong { color: var(--navy2); font-variant-numeric: tabular-nums; }
.meter { background: #e6edf2; }
.rotation { border-radius: var(--radius-md); }
.rotation th { background: #edf3f6; color: #3e566d; letter-spacing: .06em; }
.rotation th, .rotation td { border-bottom-color: #e2e9ef; }

.progress-hero, .podium-arena {
  border: 1px solid #ffffff12;
  border-radius: var(--radius-lg);
  background: radial-gradient(ellipse at 80% 0, #1d6670, transparent 62%), #0c283d;
  box-shadow: var(--shadow-raised);
}
.insights { --cyan: #79d5ca; }
.live-pill { border: 1px solid #b9ddd6; background: #eaf7f4; color: #0b625c; }
.insight-card { border-radius: var(--radius-md); }

/* Operational forms */
.tabs { gap: 8px; }
.tabs button {
  min-height: 64px;
  border-radius: var(--radius-sm);
  color: #435c72;
  font-weight: 650;
  box-shadow: none;
}
.tabs button:hover { border-color: #99adbd; background: #f7fafb; }
.tabs button.active { border-color: transparent; background: var(--station); color: #fff; box-shadow: 0 5px 14px #102a4317; }
.eval-card, .evidence { border-radius: var(--radius-md); }
.eval-head { background: #fbfcfd; }
.station-icon { border-radius: 10px; font-style: normal; }
.assignment { background: #f1f5f7; }
.criteria li { border-bottom-color: #e5ebf0; }
.criteria li:hover { background: #f8fafb; }
.criteria li > span { color: #6b7f91; font-variant-numeric: tabular-nums; }
.scores button { border-radius: 7px; font-size: 15px; transition: background-color var(--motion-fast), border-color var(--motion-fast), color var(--motion-fast); }
.scores button:hover { border-color: #71899c; }
.scores button.selected[data-score="0"] { background: #a52a21; }
.scores button.selected[data-score="1"] { background: #9b5b0a; }
.scores button.selected[data-score="2"] { background: var(--teal); }
.drop {
  min-height: 132px;
  border-color: #9fb2c1;
  border-radius: var(--radius-sm);
  background: #f5f8fa;
  color: #405a70;
  font-size: 0;
}
.drop::before { content: "＋"; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #b6c5d0; border-radius: 50%; color: var(--teal); font-size: 22px; font-weight: 400; }
.drop > span { font-size: 13px; }
.drop:hover { border-color: var(--teal); background: var(--surface-tint); }
.checkline { padding: 12px; border: 1px solid #d9e2e9; border-radius: var(--radius-sm); background: #f8fafb; }
.checkline input { accent-color: var(--teal); }

/* Directories, cards and media */
.parent-section { border-radius: var(--radius-md); background: #f8fafb; }
.parent-heading { border-bottom-color: var(--line); }
.parent-emblem, .parent-heading > img { border-radius: 10px; }
.company-block, .company-create, .company-edit { border-radius: var(--radius-sm); }
.company-summary:hover { background: #f6f9fb; }
.group-card, .photo-team { border-radius: var(--radius-sm); }
.group-photo { background: linear-gradient(135deg, #e5edf2, #f4f7f9); }
.group-photo > div { font-size: 0 !important; }
.group-photo > div::before { content: "Foto del subgrupo"; font-size: 12px; font-weight: 600; color: var(--muted); }
.group-photo label { border-radius: 7px; background: #0b2236e8; }
.group-filters { border-radius: 10px; }
.group-filters .btn.selected { background: var(--navy); color: #fff; }
.user-avatar { border: 1px solid #d4dfe7; border-radius: 50%; background: #edf4f5; color: var(--teal); font-style: normal; }
.user-row { border-radius: var(--radius-sm); }
.gallery a { border: 1px solid #dce5eb; border-radius: var(--radius-sm); }
.photo-team-cover, .photo-team-empty { background: #e8eef2; }

/* Dialogs, feedback and award presentation */
.navigation-dialog { border-radius: 18px 18px 0 0; box-shadow: 0 -18px 60px #071a2d45; }
.navigation-dialog::backdrop { background: #071a2d8a; backdrop-filter: blur(2px); }
.navigation-dialog nav button { border-radius: var(--radius-sm); }
.navigation-dialog nav button.active { background: var(--navy); border-color: var(--navy); }
#toast { border: 1px solid #ffffff20; border-radius: var(--radius-sm); background: var(--navy2); box-shadow: 0 12px 30px #071a2d38; }
#toast.bad { background: #8f241d; }
.award-dialog { background: #091e2f; }
.award-curtain { background: #102f34; }
.award-trophy .ui-icon { width: 74px; height: 74px; stroke-width: 1.35; color: #d7bc72; }
.award-trophy { width: 96px; height: 96px; display: grid; place-items: center; margin-inline: auto; border: 1px solid #d7bc7266; border-radius: 50%; background: #d7bc7214; color: transparent; font-size: 0; }
.award-trophy::before { content: "BA"; color: #d7bc72; font-size: 28px; font-weight: 750; letter-spacing: .08em; }
.award-medal { width: 92px; height: 92px; display: grid; place-items: center; border: 8px solid color-mix(in srgb, var(--medal-color) 80%, white); border-radius: 50%; background: var(--medal-color); color: #1d2d3b; font-size: 34px; font-weight: 800; filter: drop-shadow(0 6px 18px #0004); }

/* Responsive frame */
@media (min-width: 1700px) {
  .content { width: calc(100% - 248px); max-width: 1580px; margin-left: max(248px, calc((100vw - 1700px) / 2 + 248px)); }
}

@media (min-width: 761px) and (max-width: 1000px) {
  .side { width: 196px; }
  .content { width: calc(100% - 196px); margin-left: 196px; }
}

@media (max-width: 760px) {
  body { background: var(--paper); }
  .login { display: block; background: #fff; }
  .login-panel { min-height: 100dvh; padding: 32px 24px 44px; }
  .login h1 { margin-top: 42px; font-size: clamp(38px, 12vw, 48px); }
  .login-visual { display: none; }
  .content { width: 100%; margin: 0; padding: 0 16px calc(102px + env(safe-area-inset-bottom)); }
  .topbar { min-height: 76px; background: transparent; }
  .topbar h1 { font-size: 20px; }
  .page { padding-top: 20px; }
  .page-title h2 { font-size: 27px; }
  .bottom {
    border-top: 1px solid #cfdbe4;
    background: #fffffffa;
    box-shadow: 0 -8px 24px #102a4310;
    backdrop-filter: none;
  }
  .bottom button { min-height: 58px; border-radius: var(--radius-sm); color: #5b7083; }
  .bottom button.active { background: #e8f3f1; color: #0b625c; }
  .bottom .nav-icon { width: 21px; height: 21px; }
  .bottom .ui-icon { width: 20px; height: 20px; }
  .hero { min-height: 310px; border-radius: var(--radius-md); }
  .card, .progress-hero, .podium-arena { border-radius: var(--radius-md); }
  .criteria li:hover { background: transparent; }
  .group-filters { overflow-x: auto; }
}

/* Keep desktop content flush with the navigation; no centered side offset. */
@media (min-width: 1001px) {
  html, body { max-width: 100%; overflow-x: hidden; }
  .content {
    margin-left: 224px !important;
    margin-right: 0 !important;
    width: calc(100% - 224px) !important;
    max-width: none !important;
    padding-left: clamp(20px, 2vw, 32px) !important;
    padding-right: clamp(20px, 2vw, 32px) !important;
    min-width: 0;
  }
}

/* Summary hierarchy: make the progress ring the hero and move metrics below it. */
@media (min-width: 761px) {
  .progress-hero {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 390px) minmax(0, 1fr) !important;
    align-items: center;
    row-gap: 28px;
  }
  .progress-hero .hero-copy { grid-column: 1; grid-row: 1; }
  .progress-hero .ring-wrap {
    grid-column: 2;
    grid-row: 1;
    width: min(100%, 330px);
    max-width: 330px;
  }
  .progress-hero .ring-number strong { font-size: 64px; }
  .progress-hero .ring-number small { font-size: 25px; }
  .progress-hero .hero-metrics {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 22px 0 0;
  }
}

/* Premiación: show the winner photo and name without a long empty lead-in. */
.award-revealed {
  padding: 18px 30px 36px;
}
.award-revealed .award-medal {
  font-size: 62px;
  line-height: 1;
  margin: 0 auto 6px;
}
.award-revealed > .eyebrow { display: block; }
.award-revealed > h2 {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.05;
  margin: 8px 0 16px;
}
.award-revealed .winner-cover > img {
  max-height: 45vh;
}
@media (max-width: 600px) {
  .award-revealed { padding: 18px 14px 28px; }
  .award-revealed .award-medal { font-size: 54px; }
  .award-revealed .winner-cover > img { max-height: 42vh; }
}

.award-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  min-width: 0;
}
.award-brand img {
  width: 112px;
  height: 34px;
  object-fit: contain;
  object-position: left center;
  filter: brightness(0) invert(1);
}
.award-brand b {
  color: #f7d992;
  font-size: 10px;
  letter-spacing: 1.5px;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .award-brand img { width: 92px; height: 30px; }
  .award-brand b { display: none; }
}

/* Mobile layout must use the full viewport once the sidebar is hidden. */
@media (max-width: 760px) {
  html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
  .side { display: none !important; }
  .content {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 16px calc(105px + env(safe-area-inset-bottom)) !important;
    min-width: 0;
  }
  .topbar, .page, .page-title, .top-actions { min-width: 0; max-width: 100%; }
  .top-actions { flex: 1 1 auto; justify-content: flex-end; }
  .net { max-width: 150px; }
  .net span { overflow-wrap: anywhere; }
}

@media (max-width: 760px) {
  .progress-hero .ring-wrap { width: min(100%, 230px); max-width: 230px; }
  .progress-hero .ring-number strong { font-size: 48px; }
}

/* Keep synchronization controls together in the top bar. */
@media (min-width: 761px) {
  .content { position: relative; }
  #syncPanel {
    position: absolute;
    top: 18px;
    right: clamp(190px, 16vw, 245px);
    z-index: 3;
  }
  #syncPanel .sync-tools {
    min-height: 0;
    padding: 0;
    border: 0;
  }
  #syncPanel .sync-tools > span { display: none; }
  #syncPanel .sync-tools .btn {
    min-height: 52px;
    padding-inline: 24px;
    font-size: 13px;
  }
}

@media (max-width: 380px) {
  .content { padding-inline: 12px; }
  .topbar h1 { font-size: 18px; }
  .net { padding-inline: 7px; }
  .bottom button { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

@media (prefers-contrast: more) {
  :root { --line: #9aabba; --muted: #304b63; }
  .card, .btn.soft, .field input, .field select, .field textarea { border-width: 2px; }
}

/*
 * Gestión de Brigadas refinement — compact, flat and operational.
 * Intentionally avoids the oversized gradients and rounded marketing cards
 * that make administrative tools feel like generic generated landing pages.
 */
:root {
  --navy: #1f3539;
  --navy2: #14282c;
  --teal: #168f80;
  --paper: #f5f6f6;
  --ink: #172529;
  --muted: #5c6b6e;
  --line: #d7dddd;
  --surface-soft: #eef1f1;
  --surface-tint: #e8f3f1;
  --focus: #087f75;
  --shadow: none;
  --shadow-raised: none;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
}

html { background: var(--paper); }
body { background: var(--paper); color: var(--ink); }

.splash { color: var(--teal); }
.splash img { width: 150px; }

.card,
.insight-card,
.stage-card,
.parent-section,
.photo-team,
.media-card {
  border-color: var(--line);
  border-radius: 6px;
  box-shadow: none;
}

.btn { min-height: 42px; border-radius: 4px; font-weight: 600; }
.btn:hover { box-shadow: none; }
.btn.primary, .btn.red { background: var(--teal); }
.btn.primary:hover, .btn.red:hover { background: #11786d; }
.tag, .version-tag, .net, .live-pill { border-radius: 4px; }
.field input, .field select, .field textarea,
.search-field input, .user-row select, .team-actions select { border-radius: 4px; }

/* Brand-first sign in */
.login { grid-template-columns: minmax(380px, 500px) minmax(420px, 1fr); background: #edf2f1; }
.login-panel { border-right: 1px solid var(--line); padding: clamp(36px, 5vw, 68px); }
.login-brand { display: block; }
.login-brand img { width: 184px; height: auto; }
.login h1 {
  max-width: 13ch;
  margin: 42px 0 12px;
  color: var(--ink);
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 680;
  line-height: 1.08;
  letter-spacing: -.035em;
}
.login p { margin-top: 0; color: var(--muted); }
.login-visual {
  background: #e5eeec;
  border: 0;
}
.login-visual::before, .login-visual::after { display: none; }
.login-watermark {
  width: min(440px, 60%);
  filter: grayscale(1);
  mix-blend-mode: multiply;
  opacity: .16;
}
.login-note { color: #526b67; font-size: 10px; letter-spacing: .12em; }

/* Light navigation rail with the supplied wordmark */
.side {
  width: 232px;
  padding: 12px 14px 20px;
  border-right: 1px solid #cfd6d6;
  background: #fff;
  color: var(--ink);
}
.content { width: calc(100% - 232px); margin-left: 232px; padding: 0 clamp(22px, 3vw, 44px) 64px; }
.brand {
  height: 116px;
  margin: 0 0 8px;
  overflow: hidden;
  justify-content: center;
  align-items: flex-start;
}
.brand img { width: 150px; max-width: none; height: auto; }
.nav { gap: 2px; }
.nav button {
  min-height: 42px;
  border-radius: 4px;
  color: #435659;
  font-size: 12px;
  font-weight: 560;
}
.nav button:hover { border-color: transparent; background: #f0f3f3; color: var(--ink); }
.nav button.active { border-color: transparent; background: #e5f2ef; color: #096c62; }
.nav button.active::before { inset-block: 8px; left: -1px; width: 3px; background: var(--teal); }
.profile { border-top-color: var(--line); }
.profile small { color: var(--muted); }
.profile .btn { border-color: var(--line); background: #fff; color: #314649; }
.profile .btn:hover { background: #f0f3f3; }
.app-version { color: #778487 !important; }

/* Compact page chrome */
.topbar { min-height: 72px; padding: 12px 0; background: transparent; }
.topbar h1 { margin-block: 1px; font-size: 22px; font-weight: 650; }
.eyebrow { color: #3e706a; font-size: 9px; font-weight: 700; letter-spacing: .1em; }
.version-tag { padding: 1px 5px; }
.net { border-color: #b7d8d2; background: #edf7f5; color: #096c62; }
.sync-tools { min-height: 50px; padding: 8px 0; }
.page { padding-top: 20px; }
.page-title { margin-bottom: 18px; }
.page-title h2, .insight-title h2 { font-size: clamp(25px, 2.4vw, 32px); font-weight: 650; letter-spacing: -.025em; }
.insight-title { margin-bottom: 18px; }
.insight-title p { font-size: 13px; }

/* Dashboard: a work surface, not a promotional hero */
.progress-hero {
  min-height: 0;
  padding: 20px;
  grid-template-columns: minmax(220px, 1fr) 150px minmax(240px, .9fr);
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  box-shadow: none;
}
.progress-hero::before, .progress-hero::after { display: none; }
.hero-copy h3 {
  margin: 8px 0 4px;
  color: var(--ink);
  font-size: 25px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -.02em;
}
.hero-copy h3 em { color: var(--ink); }
.hero-copy p { margin: 0 0 16px; color: var(--muted); font-size: 12px; }
.hero-copy .btn { margin-top: 0; }
.ring-wrap { max-width: 132px; }
.ring-wrap svg { filter: none; }
.ring-track { stroke: #e4e9e9; }
.ring-fill { stroke: var(--teal); }
.ring-number strong { color: var(--ink); font-size: 28px; }
.ring-number span { color: var(--muted); font-size: 9px; }
.hero-metrics { border-color: var(--line); background: #f7f9f9; }
.hero-metrics > div { border-color: var(--line); }
.hero-metrics strong { color: var(--ink); font-size: 25px; }
.hero-metrics span { color: var(--muted); }
.parent-overview { gap: 10px; margin-block: 14px; }
.parent-overview .card { padding: 15px; }
.parent-overview h3 { font-size: 18px; }
.stage-grid { gap: 10px; }
.stage-card { padding: 14px; }
.stage-symbol { border-radius: 4px; }
.section-heading { margin-bottom: 14px; }
.section-heading h3 { font-size: 18px; }
.insight-card { padding: 18px; }
.heat-cell { min-height: 68px; border-radius: 4px; }

/* Lists and forms */
.tabs button, .scores button, .drop, .checkline,
.group-filters, .group-filters .btn, .search-field input,
.company-block, .company-create, .company-edit,
.company-summary, .group-card, .user-row,
.gallery a, .navigation-dialog nav button { border-radius: 4px; }
.tabs button { min-height: 58px; }
.criteria li { padding-block: 14px; }
.criteria li:hover { background: #f5f7f7; }
.assignment { background: #f2f4f4; }
.parent-section { background: #fafbfb; }
.company-summary:hover { background: #f2f5f5; }
.group-photo { background: #edf0f0; }
.group-filters .btn.selected { background: #243b3e; }
.user-avatar { border-radius: 4px; }

@media (min-width: 1700px) {
  .content { width: calc(100% - 232px); margin-left: max(232px, calc((100vw - 1660px) / 2 + 232px)); max-width: 1600px; }
}

@media (min-width: 761px) and (max-width: 1000px) {
  .side { width: 190px; }
  .content { width: calc(100% - 190px); margin-left: 190px; }
  .brand img { width: 136px; }
  .progress-hero { grid-template-columns: 1fr 120px; }
  .hero-metrics { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .login-panel { padding: 28px 22px 40px; }
  .login-brand img { width: 158px; }
  .login h1 { margin-top: 32px; font-size: 36px; }
  .topbar { min-height: 68px; }
  .topbar h1 { font-size: 19px; }
  .progress-hero { grid-template-columns: 1fr 112px; padding: 16px; }
  .hero-copy h3 { font-size: 22px; }
  .hero-metrics { grid-column: 1 / -1; }
  .ring-wrap { width: 106px; }
  .bottom { box-shadow: 0 -1px 0 #cfd6d6; }
  .bottom button { border-radius: 4px; }
  .bottom button.active { background: #e5f2ef; color: #096c62; }
}

/* Brandbook 2026 — Gestión de Brigadas */
:root {
  --navy: #005d55;
  --navy2: #004953;
  --teal: #009b76;
  --amber: #fecb00;
  --lime: #7ab800;
  --purple: #087f8c;
  --blue: #0094b3;
  --paper: #f5f7f6;
  --ink: #252525;
  --muted: #5f6665;
  --line: #d8dfdd;
  --surface-soft: #eef3f1;
  --surface-tint: #e7f5f1;
  --focus: #0094b3;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

html {
  font-family: Roboto, Arial, Helvetica, sans-serif;
}

.card, .insight-card, .stage-card, .parent-section, .photo-team, .media-card,
.progress-hero, .company-block, .company-create, .company-edit, .group-card {
  border-radius: var(--radius-md);
}

.btn, .field input, .field select, .field textarea,
.search-field input, .user-row select, .team-actions select,
.tabs button, .scores button, .drop, .checkline, .group-filters,
.group-filters .btn, .company-summary, .user-row, .gallery a,
.navigation-dialog nav button {
  border-radius: var(--radius-sm);
}

.btn.primary, .btn.red { background: var(--teal); }
.btn.primary:hover, .btn.red:hover { background: #007f65; }
.nav button.active { background: #e3f4ef; color: var(--navy); }
.nav button.active::before { background: var(--teal); }
.net, .live-pill { border-color: #a9d9cd; background: #e5f6f1; color: var(--navy); }
.eyebrow { color: var(--navy); }
.ring-fill { stroke: var(--teal); }
.group-filters .btn.selected { background: var(--navy); }

/* Login reference: photographic canvas with a centered window. */
.login {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  min-height: 100dvh;
  padding: clamp(24px, 5vw, 64px);
  overflow: hidden;
  background: var(--navy2);
}

.login-visual {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  background: url('/login-scene.svg') center 42% / cover no-repeat;
}

.login-visual::before {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  background: linear-gradient(105deg, #004953e8 0%, #005d55be 42%, #0049536b 100%);
}

.login-visual::after {
  content: "";
  display: block;
  position: absolute;
  inset: auto 0 0;
  width: auto;
  height: 38%;
  border: 0;
  border-radius: 0;
  background: linear-gradient(transparent, #003e46b8);
}

.login-watermark { display: none; }
.login-note {
  position: absolute;
  right: clamp(24px, 4vw, 58px);
  bottom: clamp(22px, 4vw, 48px);
  z-index: 1;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-shadow: 0 1px 8px #003c43;
}

.login-panel {
  position: relative;
  z-index: 2;
  width: min(100%, 430px);
  height: auto;
  padding: clamp(24px, 3vw, 34px) clamp(28px, 3.5vw, 40px);
  border: 1px solid #ffffffaa;
  border-radius: 20px;
  background: #fffffff2;
  box-shadow: 0 24px 70px #00383f66;
  backdrop-filter: blur(10px);
}

.login-brand { text-align: center; }
.login-brand img { width: 126px; margin-inline: auto; }
.login h1 {
  max-width: none;
  margin: 14px 0 6px;
  color: var(--navy2);
  font-size: clamp(28px, 3vw, 35px);
  text-align: center;
}
.login p { max-width: none; margin: 0 0 14px; text-align: center; }
.login form { max-width: none; margin-top: 0; }
.login .field { margin-top: 10px; }
.login form .btn { margin-top: 16px; }
.login form .btn { min-height: 48px; }
.login .field input { background: #fff; }

@media (max-width: 760px) {
  .login { padding: 20px; background: var(--navy2); }
  .login-panel { min-height: 0; padding: 28px 22px 32px; }
  .login-brand img { width: 116px; }
  .login h1 { margin-top: 12px; font-size: 29px; }
  .login-visual { display: block; background-position: 58% center; }
  .login-visual::before { background: linear-gradient(180deg, #004953b8, #004953dc); }
  .login-note { display: none; }
}

/* Final desktop alignment: the workspace begins immediately after the sidebar. */
@media (min-width: 1001px) {
  html, body { max-width: 100%; overflow-x: hidden; }
  .content {
    margin-left: 224px !important;
    margin-right: 0 !important;
    width: calc(100% - 224px) !important;
    max-width: none !important;
    padding-left: clamp(20px, 2vw, 32px) !important;
    padding-right: clamp(20px, 2vw, 32px) !important;
    min-width: 0;
  }
}
