/* Mi Actividad 1.9.2 · hoja consolidada; conservar el orden de las reglas */

:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  color: #111820;
  background: #e9eef3;
  --green: #24845a;
  --amber: #ad6a15;
  --red: #aa4141;
  --app-viewport-height: 100dvh;
  --navy: #1f3347;
  --navy-2: #375d80;
  --blue: #4d78a5;
  --blue-dark: #355f87;
  --sky: #edf3f8;
  --orange: #ed9550;
  --orange-dark: #ca7334;
  --orange-soft: #fff4e9;
  --surface: rgba(255,255,255,.9);
  --muted: #68798a;
  --line: #dce5ed;
  --soft: #f5f8fa;
  --shadow: 0 6px 20px rgba(43,66,88,.07);
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; }
html.member-document { overflow: hidden; height: 100%; }
body { min-height: 100vh; margin: 0; font-feature-settings: "kern" 1, "liga" 1; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; overflow: hidden; width: 1px; height: 1px; padding: 0; border: 0; margin: -1px; clip: rect(0 0 0 0); white-space: nowrap; }
.eyebrow { margin: 0 0 5px; font-size: 9px; font-weight: 900; letter-spacing: .17em; text-transform: uppercase; }
.ui-icon { display: block; flex: 0 0 auto; width: 20px; height: 20px; overflow: visible; color: inherit; }
.button-with-icon { display: inline-flex !important; align-items: center; justify-content: center; gap: 8px; }
.button-with-icon .ui-icon { width: 16px; height: 16px; }
.brand-symbol { display: grid; flex: 0 0 43px; width: 43px; height: 43px; place-items: center; border: 1px solid rgba(255,255,255,.18); border-radius: 13px; color: #fff; font-size: 15px; font-weight: 950; letter-spacing: -.05em; }
.brand-symbol.large { width: 56px; height: 56px; border-radius: 17px; font-size: 19px; }
.primary-button, .outline-button, .text-button, .logout-button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 18px; border-radius: 12px; font-size: 13px; font-weight: 800; letter-spacing: -.01em; text-decoration: none; cursor: pointer; }
.primary-button { border: 1px solid rgba(167,78,18,.52); color: #fff; }
.primary-button:disabled { opacity: .6; cursor: wait; }
.primary-button.wide { width: 100%; }
.outline-button { border: 1px solid rgba(114,132,150,.4); color: #263a4d; -webkit-backdrop-filter: blur(20px) saturate(135%); backdrop-filter: blur(20px) saturate(135%); }
.text-button { min-height: 38px; padding: 0; border: 0; background: transparent; color: var(--blue); }
.global-notice { position: fixed; z-index: 500; top: max(12px, env(safe-area-inset-top)); left: 50%; width: min(calc(100% - 24px), 520px); margin: 0; padding: 13px 16px; transform: translateX(-50%); border: 1px solid rgba(146,205,169,.72); border-radius: 14px; background: rgba(239,251,243,.88); color: #17633a; font-size: 12px; font-weight: 800; box-shadow: 0 16px 42px rgba(24,87,52,.16), inset 0 1px 0 rgba(255,255,255,.8); -webkit-backdrop-filter: blur(18px) saturate(135%); backdrop-filter: blur(18px) saturate(135%); animation: toast-in .2s ease; }
.global-notice.error { border-color: #efbcbc; background: #fff2f2; color: #982f2f; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -8px); } }
.form-alert { margin-bottom: 16px; padding: 11px 13px; border-radius: 10px; font-size: 12px; line-height: 1.45; }
.form-alert.error { border: 1px solid #edbcbc; background: #fff3f3; color: #953d3d; }
.form-alert p { margin: 0; }.form-alert p + p { margin-top: 5px; }
.form-grid { display: grid; gap: 12px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label, .login-form label, .entry-fields label { display: grid; gap: 6px; }
.form-grid label > span, .login-form label > span, .entry-fields label > span, .group-admin-card label > span { color: #536177; font-size: 10px; font-weight: 850; }
input, select, textarea { width: 100%; border: 1px solid #c7d0dc; border-radius: 10px; color: #172236; }
input, select { min-height: 46px; padding: 0 12px; }
textarea { padding: 11px 12px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(223,129,47,.16); border-color: var(--orange); }
small { line-height: 1.4; }

/* Acceso */
.login-page { position: relative; overflow-x: hidden; }
.login-page::before { content: ""; position: absolute; z-index: 0; top: 0; right: 0; left: 0; height: 455px; border: 1px solid rgba(255,255,255,.14); border-top: 0; border-radius: 0 0 34px 34px; }
.login-shell { position: relative; z-index: 1; width: min(100% - 28px, 980px); margin: 0 auto; padding: max(28px, calc(env(safe-area-inset-top) + 16px)) 0 max(24px, env(safe-area-inset-bottom)); }
.login-brand { max-width: 600px; padding: 8px 8px 42px; color: #fff; }
.login-brand .brand-symbol { margin-bottom: 25px; border: 1px solid rgba(255,255,255,.2); -webkit-backdrop-filter: blur(24px) saturate(140%); backdrop-filter: blur(24px) saturate(140%); }
.login-brand h1 { margin: 0; font-size: clamp(42px, 10vw, 65px); line-height: .96; letter-spacing: -.055em; }
.login-brand > p:not(.eyebrow) { max-width: 500px; margin: 17px 0 0; font-size: 15px; line-height: 1.55; }
.login-benefits { display: none; }.login-benefits span { align-items: center; gap: 6px; }.login-benefits .ui-icon { width: 14px; height: 14px; color: #ffad65; }
.login-card { overflow: hidden; max-width: 520px; margin: 0 auto; border: 1px solid rgba(255,255,255,.82); border-radius: 24px; }
.login-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 7px; border-bottom: 1px solid var(--line); background: #f6f8fb; }
.login-tabs button { min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: #758197; font-size: 11px; font-weight: 850; cursor: pointer; }
.login-tabs button.active { background: #fff; color: #284f9f; box-shadow: 0 3px 11px rgba(23,42,74,.08); }
.login-card > .form-alert { margin: 18px 18px 0; }
.login-form { display: grid; gap: 14px; padding: 24px 20px 22px; }
.login-form-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 2px; }
.login-icon { display: grid; flex: 0 0 42px; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(223,129,47,.22); border-radius: 13px; }.login-icon .ui-icon { width: 21px; height: 21px; }
.login-form h2 { margin: 0; font-size: 23px; letter-spacing: -.03em; }
.login-form-heading p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.login-form > small { color: #8a94a5; font-size: 10px; text-align: center; }
.access-code-field { font-size: 19px; font-weight: 850; letter-spacing: .12em; text-align: center; text-transform: uppercase; }
.login-footer { margin-top: 23px; color: #758197; font-size: 10px; text-align: center; }
.back-to-personal { color: #65758b; font-size: 10px; font-weight: 750; text-align: center; text-decoration: none; }

/* Instalador */
.installer-shell { width: min(100% - 24px, 790px); margin: 0 auto; padding: 20px 0 40px; }
.installer-header { display: flex; align-items: center; gap: 15px; padding: 26px 21px; border: 1px solid rgba(255,255,255,.13); border-bottom: 0; border-radius: 20px 20px 0 0; color: #fff; }
.installer-header h1 { margin: 0; font-size: 29px; letter-spacing: -.04em; }.installer-header p:last-child { margin: 6px 0 0; color: #cfdbed; font-size: 11px; }
.installer-card { padding: 20px; border: 1px solid rgba(255,255,255,.82); border-top: 0; border-radius: 0 0 20px 20px; }
.installer-section + .installer-section { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); }
.installer-section-title { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.installer-section-title > span { display: grid; flex: 0 0 37px; width: 37px; height: 37px; place-items: center; border: 1px solid rgba(255,255,255,.85); border-radius: 11px; font-size: 12px; font-weight: 900; }
.installer-section-title h2 { margin: 0; font-size: 20px; letter-spacing: -.025em; }
.installer-note { margin: 12px 0 0; color: #8490a2; font-size: 10px; text-align: center; }
.installer-finished { display: grid; min-height: 380px; justify-items: center; align-content: center; text-align: center; }
.installer-finished h2 { margin: 16px 0 5px; }.installer-finished p { margin: 0 0 22px; color: var(--muted); }
.success-symbol { display: grid; width: 56px; height: 56px; place-items: center; border: 1px solid rgba(54,142,92,.16); border-radius: 17px; background: #e7f7ed; color: var(--green); box-shadow: inset 0 1px 0 rgba(255,255,255,.9); }.success-symbol .ui-icon { width: 27px; height: 27px; }

/* Aplicación personal */
.role-member { overflow: hidden; height: var(--app-viewport-height, 100dvh); min-height: 0; }
.mobile-app { position: relative; display: grid; grid-template-rows: auto minmax(0,1fr) auto; height: var(--app-viewport-height, 100dvh); min-height: 0; padding: 0; overflow: hidden; }
.app-header { min-height: 124px; padding: max(19px, env(safe-area-inset-top)) 20px 18px; color: #fff; }
.member-header { position: relative; isolation: isolate; display: flex; overflow: hidden; align-items: flex-start; justify-content: space-between; gap: 15px; border: 1px solid rgba(255,255,255,.16); border-top: 0; border-radius: 0 0 28px 28px; }.member-header::after { content: ""; position: absolute; z-index: -1; top: -70%; right: 10%; width: 55%; height: 180%; transform: rotate(18deg); background: linear-gradient(90deg, transparent, rgba(255,255,255,.11), rgba(255,174,99,.08), transparent); filter: blur(4px); pointer-events: none; }
.member-header-copy { min-width: 0; }.member-header h1 { overflow: hidden; max-width: calc(100vw - 98px); margin: 0; font-size: clamp(32px,8.5vw,37px); line-height: 1; letter-spacing: -.045em; text-overflow: ellipsis; white-space: nowrap; }
.member-header .eyebrow { margin-bottom: 7px; font-size: 9px; }
.member-header-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }.member-header-meta span { display: inline-flex; align-items: center; min-height: 25px; padding: 0 9px; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; font-size: 11px; font-weight: 750; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.profile-avatar { display: grid; flex: 0 0 48px; width: 48px; height: 48px; place-items: center; border: 1px solid rgba(255,255,255,.32); border-radius: 16px; color: #fff; font-size: 16px; font-weight: 900; cursor: pointer; -webkit-backdrop-filter: blur(24px) saturate(145%); backdrop-filter: blur(24px) saturate(145%); }
.member-header-logout { display: block; flex: 0 0 48px; width: 48px; height: 48px; margin: 0; }
.header-logout-button { display: flex; width: 48px; height: 48px; padding: 0; align-items: center; justify-content: center; -webkit-appearance: none; appearance: none; font-size: 11px; line-height: 1; letter-spacing: .01em; text-align: center; }
.header-logout-button span { display: block; line-height: 1; }
.app-content { position: relative; overflow-x: hidden; overflow-y: auto; width: min(100%, 720px); height: 100%; margin: 0 auto; padding: 13px 12px 18px; scroll-padding-bottom: 18px; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; }
.app-view { animation: view-in .18s ease; } @keyframes view-in { from { opacity: .3; transform: translateY(5px); } }
.today-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; padding: 5px 6px 7px; }
.view-heading { display: flex; overflow: hidden; min-width: 0; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; padding: 14px 15px; border: 1px solid rgba(255,255,255,.82); border-radius: 18px; }.view-heading > * { min-width: 0; }
.today-heading h2, .view-heading h2 { margin: 0; color: #131b24; font-size: 28px; line-height: 1.06; letter-spacing: -.035em; }
.today-heading .eyebrow { color: #9a633c; font-size: 9px; }.today-heading h2 { font-size: 25px; }.today-help { margin: 4px 0 0; color: #667381; font-size: 12px; }
.status-pill, .role-chip { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border: 1px solid rgba(76,151,106,.18); border-radius: 999px; background: rgba(232,246,237,.86); color: #237149; font-size: 10px; font-weight: 900; white-space: nowrap; box-shadow: inset 0 1px 0 rgba(255,255,255,.8); }
.status-pill.closed, #monthlyState.closed { background: #e9edf3; color: #68758a; }.status-pill.warning, #monthlyState.warning { background: #fff1dc; color: #9a5a0b; }
.closure-reminder { display: grid; grid-template-columns: 42px minmax(0,1fr); align-items: center; gap: 12px; margin-bottom: 14px; padding: 15px; border: 1px solid rgba(194,131,40,.25); border-radius: 20px; -webkit-backdrop-filter: blur(22px) saturate(130%); backdrop-filter: blur(22px) saturate(130%); }.reminder-symbol { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; color: #fff; font-size: 21px; font-weight: 950; }.closure-reminder strong { color: #563b18; font-size: 15px; }.closure-reminder p { margin: 4px 0 0; color: #735a36; font-size: 12px; line-height: 1.45; }.closure-reminder button { grid-column: 2; min-height: 44px; border: 1px solid rgba(158,96,15,.22); border-radius: 12px; background: rgba(255,255,255,.78); color: #805015; font-size: 12px; font-weight: 900; cursor: pointer; }
.entry-card, .month-progress-card, .profile-card, .privacy-card, .monthly-hero, .mini-stats article { border: 1px solid rgba(255,255,255,.84); border-radius: 24px; -webkit-backdrop-filter: blur(32px) saturate(148%); backdrop-filter: blur(32px) saturate(148%); }
.entry-card { overflow: hidden; padding: 4px 17px 15px; }
.entry-step { display: grid; grid-template-columns: 36px minmax(0,1fr); gap: 12px; padding: 14px 0; }.entry-step + .entry-step, .entry-fields .entry-step { border-top: 1px solid rgba(113,137,168,.17); }
.step-number { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid rgba(255,255,255,.44); border-radius: 12px; color: #fff; font-size: 15px; font-weight: 900; }
.step-content { display: grid; min-width: 0; gap: 11px; }.step-copy { display: grid; gap: 3px; }.step-copy strong { color: #263a55; font-size: 16px; line-height: 1.2; }.step-copy small { color: #6b798d; font-size: 11px; }
.date-step .step-content { grid-template-columns: minmax(0,1fr); align-items: center; gap: 9px; }
.calendar-picker { position: relative; isolation: isolate; display: grid; overflow: hidden; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 10px; min-width: 0; min-height: 50px; padding: 0 14px; border: 1px solid rgba(91,115,137,.3); border-radius: 15px; color: #213a50; cursor: pointer; -webkit-backdrop-filter: blur(26px) saturate(145%); backdrop-filter: blur(26px) saturate(145%); }
.calendar-picker:focus-within { border-color: #4a6da7; box-shadow: 0 0 0 3px rgba(74,109,167,.16), 0 9px 22px rgba(39,67,99,.1), inset 0 1px 0 rgba(255,255,255,.98); }
.calendar-picker-copy { overflow: hidden; min-width: 0; font-size: 14px; font-weight: 850; text-align: center; text-overflow: ellipsis; white-space: nowrap; }.calendar-picker-icon { display: grid; width: 33px; height: 33px; place-items: center; border-radius: 10px; }.calendar-picker-icon .ui-icon { width: 17px; height: 17px; }
.calendar-picker input { position: absolute; z-index: 3; inset: 0; display: block; width: 100%; min-width: 0; max-width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: inherit; opacity: 0; cursor: pointer; -webkit-appearance: none; appearance: none; }
.date-selector { width: min(100%, 270px); margin: 0 auto; }.month-selector { flex: 0 1 210px; width: 210px; min-height: 45px; }
.auxiliary-month-option { position: relative; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 13px; margin: 1px 0 8px 51px; padding: 16px; border: 1px solid rgba(90,117,143,.28); border-radius: 16px; cursor: pointer; -webkit-backdrop-filter: blur(24px) saturate(140%); backdrop-filter: blur(24px) saturate(140%); }
.auxiliary-month-option > input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.glass-check { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid #9dafc6; border-radius: 10px; background: rgba(255,255,255,.78); box-shadow: inset 0 1px 0 #fff; }
.auxiliary-month-option > input:checked + .glass-check { border-color: var(--blue); background: linear-gradient(145deg, #5a7eb7, #3d6097); }
.auxiliary-month-option > input:checked + .glass-check::after { content: "✓"; color: #fff; font-size: 16px; font-weight: 900; }
.auxiliary-month-option > span:last-child { display: grid; gap: 3px; }.auxiliary-month-option strong { color: #2d4564; font-size: 14px; }.auxiliary-month-option small { color: #687990; font-size: 11px; }
.participation-question { margin-top: 0; }.segmented-control { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; padding: 4px; border: 1px solid rgba(111,134,162,.15); border-radius: 15px; }
.segmented-control button { display: grid; min-height: 58px; justify-items: center; place-content: center; gap: 3px; padding: 6px; border: 0; border-radius: 11px; background: transparent; color: #607086; font-size: 13px; font-weight: 850; cursor: pointer; }
.segmented-control button .ui-icon { width: 23px; height: 23px; }.segmented-control button.active { color: #fff; text-shadow: 0 1px 1px rgba(84,34,5,.18); }.participation-question[data-selected="no"] .segmented-control button.active { border: 1px solid rgba(111,128,151,.17); background: rgba(255,255,255,.86); color: #3f4c5a; text-shadow: none; box-shadow: 0 8px 20px rgba(21,39,57,.09), inset 0 1px 0 rgba(255,255,255,.94); }
.entry-fields { display: grid; }.entry-fields small { color: #8390a1; font-size: 10px; font-weight: 650; }.details-step .step-content > label { display: grid; gap: 8px; }.details-step .step-content > label > span, .time-fields label > span { color: #435571; font-size: 13px; font-weight: 850; }
.details-step input, .details-step textarea { border-color: rgba(91,115,147,.3); border-radius: 14px; background: rgba(255,255,255,.8); font-size: 16px; }.details-step input { min-height: 56px; }.details-step textarea { min-height: 102px; padding: 14px; }
.time-fields { display: grid; grid-template-columns: 1fr 20px 1fr; align-items: end; gap: 5px; }
.time-fields input { font-size: 22px; font-weight: 850; text-align: center; }.time-separator { padding-bottom: 16px; color: #61738b; font-size: 22px; font-weight: 900; text-align: center; }
.save-area { display: grid; gap: 6px; padding: 14px 0 1px; border-top: 1px solid rgba(113,137,168,.17); }.save-area > small { color: #6f7d90; font-size: 10px; text-align: center; }.save-entry { min-height: 54px; margin: 0; border-radius: 14px; font-size: 15px; }
.month-progress-card { margin-top: 14px; padding: 20px; color: #fff; }
.progress-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }.progress-heading h3 { margin: 0; font-size: 20px; letter-spacing: -.03em; text-transform: capitalize; }
.month-progress-card .eyebrow { color: #b9cde7; }.month-progress-card .progress-heading h3 { color: #fff; font-size: 22px; }.role-chip { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.14); color: #fff; }
.progress-totals { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 18px; border: 1px solid rgba(255,255,255,.18); border-radius: 15px; background: rgba(255,255,255,.1); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.progress-totals div { display: grid; gap: 2px; min-height: 70px; place-content: center; text-align: center; }.progress-totals div + div { border-left: 1px solid #e1e6ed; }
.month-progress-card .progress-totals div + div { border-left-color: rgba(255,255,255,.16); }.progress-totals strong { color: #fff; font-size: 23px; }.progress-totals span { color: #c5d3e5; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.month-progress-card .text-button { width: 100%; min-height: 46px; margin-top: 9px; color: #fff; font-size: 13px; }
.monthly-hero { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px; }
.monthly-hero > div:first-child > span { display: inline-flex; margin-bottom: 8px; padding: 5px 8px; border-radius: 999px; background: #e8f6ed; color: #24714b; font-size: 8px; font-weight: 900; text-transform: uppercase; }
.monthly-hero h3 { margin: 0; font-size: 24px; letter-spacing: -.035em; text-transform: capitalize; }.monthly-hero p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.monthly-number { display: grid; justify-items: center; }.monthly-number strong { font-size: 32px; letter-spacing: -.04em; }.monthly-number span { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.monthly-closing-notice { margin-top: 10px; padding: 14px 16px; border: 1px solid rgba(194,131,40,.24); border-radius: 15px; color: #72501f; font-size: 12px; font-weight: 750; line-height: 1.5; -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 9px; }.mini-stats article { display: grid; min-height: 76px; place-content: center; text-align: center; }.mini-stats strong { color: #26354e; font-size: 22px; }.mini-stats span { color: #778398; font-size: 9px; }
.entries-list { display: grid; gap: 8px; margin-top: 16px; }
.entry-list-item { display: grid; grid-template-columns: 46px minmax(0,1fr) auto; align-items: center; gap: 11px; width: 100%; padding: 11px; border: 1px solid var(--line); border-radius: 13px; background: #fff; color: inherit; text-align: left; cursor: pointer; }
.entry-list-date { display: grid; width: 44px; height: 48px; place-content: center; border-radius: 10px; text-align: center; }.entry-list-date strong { font-size: 17px; }.entry-list-date small { font-size: 8px; text-transform: uppercase; }
.entry-list-copy { display: grid; min-width: 0; gap: 3px; }.entry-list-copy strong { color: #2b384f; font-size: 12px; }.entry-list-copy small { overflow: hidden; color: #7d8799; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }.entry-arrow .ui-icon { width: 18px; height: 18px; }
.empty-state { display: grid; min-height: 210px; justify-items: center; align-content: center; padding: 24px; border: 1px dashed rgba(188,96,29,.32); border-radius: 17px; color: #77828e; text-align: center; }.empty-state > span { display: grid; width: 44px; height: 44px; place-items: center; margin-bottom: 10px; border: 1px solid rgba(223,129,47,.2); border-radius: 14px; }.empty-state > span .ui-icon { width: 22px; height: 22px; }.empty-state strong { color: #3f4c59; font-size: 13px; }.empty-state p { margin: 5px 0 0; font-size: 10px; }
.profile-card { display: grid; justify-items: center; padding: 24px 18px; text-align: center; }.large-avatar { width: 60px; height: 60px; font-size: 21px; }.profile-card h3 { margin: 13px 0 4px; color: #131d27; font-size: 22px; }.profile-card > p { margin: 0; color: var(--muted); font-size: 11px; }.profile-detail { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--line); font-size: 10px; }.profile-detail span { color: var(--muted); }.profile-detail strong { color: #2b3d4e; }
.privacy-card { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 16px; }.privacy-icon { display: grid; flex: 0 0 40px; width: 40px; height: 40px; place-items: center; border: 1px solid rgba(223,129,47,.22); border-radius: 13px; }.privacy-icon .ui-icon { width: 21px; height: 21px; }.privacy-card strong { font-size: 12px; }.privacy-card p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.logout-button { width: 100%; margin-top: 12px; border: 1px solid #e4c5c5; background: #fff; color: #a14848; }
.bottom-nav { position: relative; z-index: 100; display: grid; grid-template-columns: repeat(3, 1fr); width: min(calc(100% - 20px), 700px); min-height: 64px; margin: 7px auto max(7px, env(safe-area-inset-bottom)); padding: 5px; border: 1px solid rgba(255,255,255,.84); border-radius: 20px; }
.bottom-nav button { position: relative; display: grid; justify-items: center; align-content: center; gap: 3px; border: 0; border-radius: 15px; background: transparent; color: #66727e; font-size: 10px; font-weight: 850; cursor: pointer; }.bottom-nav button .ui-icon { width: 20px; height: 20px; }.bottom-nav button.active::after { content: ""; position: absolute; bottom: 3px; width: 18px; height: 2px; border-radius: 999px; }
.standalone-mode .bottom-nav { width: 100%; min-height: calc(66px + env(safe-area-inset-bottom)); margin: 6px 0 0; padding: 5px 10px max(5px, env(safe-area-inset-bottom)); border: 1px solid rgba(255,255,255,.14); border-right: 0; border-bottom: 0; border-left: 0; border-radius: 24px 24px 0 0; }

/* Administración */
.admin-app { min-height: 100vh; }
.admin-sidebar { display: none; }
.admin-main { min-width: 0; padding-bottom: 82px; }
.admin-mobile-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: max(14px, env(safe-area-inset-top)) 16px 14px; border: 1px solid rgba(255,255,255,.13); border-top: 0; border-radius: 0 0 20px 20px; color: #fff; }
.admin-brand { display: flex; align-items: center; gap: 10px; }.admin-brand strong, .admin-brand small { display: block; }.admin-brand strong { font-size: 14px; }.admin-brand small { margin-top: 2px; color: #aebed6; font-size: 8px; text-transform: uppercase; }.admin-mobile-header form button { min-height: 36px; padding: 0 11px; border: 1px solid rgba(255,255,255,.2); border-radius: 9px; color: #fff; font-size: 9px; font-weight: 800; }
.admin-view { padding: 18px 12px 28px; animation: view-in .18s ease; }
.admin-page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }.admin-page-heading h1 { margin: 0; font-size: 28px; letter-spacing: -.04em; }.admin-page-heading p:last-child { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }.admin-page-heading > span { padding: 7px 9px; border-radius: 999px; background: #e8eef7; color: #607189; font-size: 9px; font-weight: 850; text-transform: capitalize; white-space: nowrap; }
.heading-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.admin-overview-actions { align-items: center; }
.admin-date-pill { padding: 7px 9px; border-radius: 999px; background: #e8eef7; color: #607189; font-size: 9px; font-weight: 850; text-transform: capitalize; white-space: nowrap; }
.admin-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.admin-stat { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr auto; min-height: 118px; padding: 15px; border: 1px solid rgba(255,255,255,.88); border-radius: 17px; }.admin-stat::after { content: ""; position: absolute; right: -20px; bottom: -32px; width: 80px; height: 80px; border-radius: 50%; background: radial-gradient(circle, rgba(223,129,47,.18), rgba(45,81,115,.05) 58%, transparent 60%); }.admin-stat-icon { z-index: 1; grid-column: 2; grid-row: 1 / 3; display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid rgba(223,129,47,.2); border-radius: 11px; }.admin-stat-icon .ui-icon { width: 17px; height: 17px; }.admin-stat-label { grid-column: 1; grid-row: 1; color: #697582; font-size: 9px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }.admin-stat strong { z-index: 1; grid-column: 1 / -1; grid-row: 2; align-self: end; font-size: 27px; letter-spacing: -.04em; }.admin-stat small { z-index: 1; grid-column: 1 / -1; grid-row: 3; color: #818b96; font-size: 8px; }.admin-stat.stat-2 strong { color: var(--green); }
.overview-grid { display: grid; gap: 10px; margin-top: 11px; }
.admin-card, .report-group-card, .person-card, .group-admin-card, .filter-bar, .people-toolbar { border: 1px solid rgba(255,255,255,.86); border-radius: 18px; }
.admin-card { padding: 17px; }.card-heading { margin-bottom: 15px; }.card-heading h2 { margin: 0; font-size: 19px; letter-spacing: -.03em; }
.group-progress { display: grid; grid-template-columns: minmax(110px,1fr) 1.2fr auto; align-items: center; gap: 9px; padding: 11px 0; }.group-progress + .group-progress { border-top: 1px solid #edf0f4; }.group-progress > div:first-child { display: grid; gap: 2px; }.group-progress strong { font-size: 11px; }.group-progress span { color: var(--muted); font-size: 8px; }.progress-track { height: 7px; overflow: hidden; border-radius: 999px; }.progress-track i { display: block; height: 100%; border-radius: inherit; }.group-progress b { min-width: 32px; color: #49617f; font-size: 9px; text-align: right; }
.pending-person { display: flex; align-items: center; gap: 10px; padding: 9px 0; }.pending-person + .pending-person { border-top: 1px solid #edf0f4; }.pending-person div { display: grid; gap: 2px; }.pending-person strong { font-size: 11px; }.pending-person small { color: var(--muted); font-size: 8px; }
.mini-avatar { display: grid; flex: 0 0 35px; width: 35px; height: 35px; place-items: center; border: 1px solid rgba(255,255,255,.84); border-radius: 10px; color: #294b69; font-size: 11px; font-weight: 900; }
.success-empty, .empty-compact { padding: 22px; color: var(--muted); font-size: 10px; text-align: center; }.success-empty span { display: grid; width: 40px; height: 40px; margin: 0 auto 8px; place-items: center; border-radius: 12px; background: #e7f7ed; color: var(--green); }.success-empty span .ui-icon { width: 20px; height: 20px; }.success-empty strong { display: block; color: #3a4a60; font-size: 12px; }.success-empty p { margin: 4px 0 0; }
.filter-bar, .people-toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 12px; padding: 12px; }.filter-bar label { display: grid; gap: 5px; }.filter-bar label span { color: #647188; font-size: 9px; font-weight: 850; }
.reports-groups, .people-list, .groups-list { display: grid; gap: 10px; }
.report-group-card { overflow: hidden; }.report-group-card > header { display: grid; grid-template-columns: 1fr repeat(3, auto); align-items: center; gap: 11px; padding: 15px; border-bottom: 1px solid rgba(119,137,156,.16); }.report-group-card h2 { margin: 0; color: #172431; font-size: 16px; }.group-total { display: grid; justify-items: center; }.group-total strong { color: #273c50; font-size: 13px; }.group-total span { color: #747f8b; font-size: 7px; text-transform: uppercase; }
.report-people { display: grid; }.report-person { display: grid; grid-template-columns: minmax(150px,1fr) auto auto; align-items: center; gap: 10px; padding: 13px; }.report-person + .report-person { border-top: 1px solid #edf0f4; }.report-person-name { display: flex; align-items: center; gap: 9px; min-width: 0; }.report-person-name div { display: grid; min-width: 0; gap: 2px; }.report-person-name strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }.report-person-name small { color: var(--muted); font-size: 8px; }.participation-mark { display: none; padding: 5px 7px; border-radius: 999px; background: #f0f2f5; color: #7c8797; font-size: 7px; font-weight: 850; }.participation-mark.yes { background: #e8f6ed; color: #28734f; }.report-number { display: grid; justify-items: center; }.report-number strong { font-size: 12px; }.report-number small { color: var(--muted); font-size: 7px; }.report-controls { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; gap: 7px; }.report-controls select { min-height: 38px; font-size: 9px; }.small-action { min-height: 38px; padding: 0 10px; border: 1px solid #cbd6e4; border-radius: 9px; background: #fff; color: #49617f; font-size: 8px; font-weight: 850; cursor: pointer; }
.people-toolbar { grid-template-columns: 1fr; }.people-toolbar input, .people-toolbar select { min-height: 42px; }
.person-card { display: grid; grid-template-columns: auto minmax(110px,1fr) auto; align-items: center; gap: 10px; padding: 13px; }.person-card.inactive { opacity: .64; }.person-main { display: grid; min-width: 0; gap: 3px; }.person-main strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }.person-main span { color: var(--muted); font-size: 8px; }.person-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }.person-actions button { display: inline-flex; min-height: 37px; align-items: center; justify-content: center; gap: 6px; border: 1px solid #d3dce7; border-radius: 10px; color: #3f5367; font-size: 8px; font-weight: 850; cursor: pointer; }.person-actions button .ui-icon { width: 14px; height: 14px; color: #c36724; }
.group-admin-card { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 10px; padding: 14px; }.group-symbol { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid rgba(223,129,47,.22); border-radius: 11px; }.group-symbol .ui-icon { width: 19px; height: 19px; }.group-admin-card label:not(.switch-row) { display: grid; gap: 5px; }.group-admin-card .switch-row { grid-column: 1 / -1; }.group-admin-card .save-group { grid-column: 1 / -1; }
.switch-row { display: flex !important; align-items: center; justify-content: space-between; gap: 15px; min-height: 46px; padding: 0 11px; border: 1px solid #d7dee8; border-radius: 10px; }.switch-row input { width: 20px; min-height: 20px; accent-color: var(--orange); }.switch-row.compact { border: 0; }
.admin-bottom-nav { position: fixed; z-index: 90; right: 0; bottom: 0; left: 0; display: grid; min-height: calc(67px + env(safe-area-inset-bottom)); padding: 6px 5px env(safe-area-inset-bottom); border-top: 1px solid rgba(255,255,255,.82); }.admin-bottom-nav button { position: relative; display: grid; justify-items: center; align-content: center; gap: 3px; border: 0; background: transparent; color: #747f8a; font-size: 8px; font-weight: 800; }.admin-bottom-nav button .ui-icon { width: 18px; height: 18px; }.admin-bottom-nav button.active::after { content: ""; position: absolute; bottom: 2px; width: 16px; height: 2px; border-radius: 999px; }

/* Modales */
.modal-open { overflow: hidden; }.modal { position: fixed; z-index: 1000; inset: 0; display: grid; align-items: end; padding: 12px; }.modal-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; -webkit-backdrop-filter: blur(8px) saturate(115%); backdrop-filter: blur(8px) saturate(115%); }.modal-card { position: relative; overflow-y: auto; width: min(100%, 520px); max-height: calc(100vh - 24px); margin: 0 auto; padding: 22px; border: 1px solid rgba(255,255,255,.8); border-radius: 20px 20px 15px 15px; -webkit-backdrop-filter: blur(32px) saturate(145%); backdrop-filter: blur(32px) saturate(145%); }.modal-close { position: absolute; top: 12px; right: 12px; display: grid; width: 35px; height: 35px; place-items: center; border: 1px solid rgba(255,255,255,.78); border-radius: 10px; color: #445463; font-size: 0; cursor: pointer; }.modal-close .ui-icon { width: 17px; height: 17px; }.modal-card h2 { margin: 0 0 18px; color: #121b24; font-size: 24px; letter-spacing: -.035em; }.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 19px; }.code-card { display: grid; justify-items: center; text-align: center; }.code-card h2 { margin: 14px 0 6px; }.code-card > p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }.generated-code { width: 100%; margin: 20px 0 12px; padding: 16px; border: 1px dashed rgba(223,129,47,.62); border-radius: 13px; font-size: clamp(22px,7vw,31px); font-weight: 900; letter-spacing: .08em; }

/* Informe formal e impresión PDF */
.print-report-shell { width: min(100% - 24px, 1120px); margin: 0 auto; padding: 22px 0 40px; }
.print-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.print-report-header { display: flex; align-items: center; gap: 15px; padding: 22px; border: 1px solid rgba(255,255,255,.16); border-radius: 20px; color: #fff; }.print-report-header h1 { margin: 0; font-size: clamp(25px,4vw,37px); letter-spacing: -.04em; }.print-report-header p:last-child { margin: 6px 0 0; color: #d5e0e8; font-size: 10px; }
.print-group { overflow: hidden; margin-top: 13px; border: 1px solid rgba(255,255,255,.88); border-radius: 18px; }
.print-group > header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 19px; border-bottom: 1px solid var(--line); background: rgba(244,247,251,.8); }.print-group h2 { margin: 0; font-size: 20px; letter-spacing: -.03em; }
.print-group-summary { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 18px; }.print-group-summary span { display: grid; gap: 2px; color: #778499; font-size: 8px; text-align: center; text-transform: uppercase; }.print-group-summary strong { color: #334963; font-size: 14px; }
.print-table-wrap { overflow-x: auto; }.print-group table { width: 100%; border-collapse: collapse; }.print-group th { padding: 10px 12px; background: #f8fafc; color: #6e7d91; font-size: 8px; letter-spacing: .06em; text-align: left; text-transform: uppercase; }.print-group td { padding: 11px 12px; border-top: 1px solid #edf0f4; color: #334158; font-size: 10px; }.print-group th:not(:first-child), .print-group td:not(:first-child) { text-align: center; }
.print-report-footer { padding: 20px 4px 0; color: #8490a2; font-size: 9px; text-align: center; }

@media screen and (max-width: 700px) {
  .print-toolbar { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); }.print-toolbar > * { min-width: 0; padding-right: 9px; padding-left: 9px; font-size: 9px; }
  .print-report-header { align-items: flex-start; padding: 18px; }.print-report-header .brand-symbol { flex: 0 0 42px; width: 42px; height: 42px; }.print-report-header h1 { font-size: 24px; line-height: 1.06; }
  .print-group > header { display: grid; gap: 13px; }.print-group-summary { display: grid; grid-template-columns: repeat(3,1fr); justify-content: stretch; gap: 8px; }.print-group-summary span { padding: 8px 4px; border-radius: 9px; background: rgba(255,255,255,.72); }
  .print-table-wrap { overflow: visible; }.print-group table, .print-group tbody { display: block; }.print-group thead { display: none; }.print-group tr { display: grid; grid-template-columns: 1fr 1fr; padding: 8px 10px; }.print-group tr + tr { border-top: 1px solid #e6ebf1; }
  .print-group td, .print-group td:not(:first-child) { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 7px 8px; border: 0; font-size: 10px; text-align: right; }.print-group td:first-child { grid-column: 1 / -1; padding-bottom: 10px; border-bottom: 1px solid #edf0f4; color: #263f5d; font-size: 12px; font-weight: 850; }.print-group td::before { content: attr(data-label); color: #8390a2; font-size: 7px; font-weight: 850; letter-spacing: .04em; text-align: left; text-transform: uppercase; }.print-group td:first-child::before { font-size: 8px; }
}

@media print {
  @page { size: A4 landscape; margin: 12mm; }
  html, body, .print-report-page { background: #fff !important; }
  .print-report-shell { width: 100%; padding: 0; }
  .print-toolbar { display: none !important; }
  .print-report-header { padding: 12px 15px; border: 0; border-radius: 0; box-shadow: none; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .print-report-header .brand-symbol { box-shadow: none; }
  .print-group { break-inside: avoid; margin-top: 9px; border: 1px solid #cfd7e1; border-radius: 0; box-shadow: none; }
  .print-group > header { padding: 9px 11px; }
  .print-group th { padding: 6px 8px; }.print-group td { padding: 7px 8px; }
  .print-report-footer { padding-top: 10px; }
}

@media (min-width: 760px) {
  .login-page { background: radial-gradient(circle at 12% 88%, rgba(223,129,47,.2), transparent 23rem), radial-gradient(circle at 14% 15%, rgba(101,143,183,.2), transparent 25rem), linear-gradient(90deg, #0d151d 0 48%, #e9eef3 48% 100%); }
  .login-page::before { display: none; }
  .login-shell { display: grid; grid-template-columns: 1fr 430px; align-items: center; gap: 70px; min-height: 100vh; padding: 40px 0; }
  .login-brand { padding: 0; }.login-benefits { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; color: #bdcce1; font-size: 10px; font-weight: 750; }.login-card { width: 100%; margin: 0; }.login-footer { position: fixed; right: 0; bottom: 20px; width: 52%; }
  .installer-shell { padding-top: 38px; }.installer-card { padding: 30px; }
  .app-header { padding-right: max(30px, calc((100% - 720px) / 2)); padding-left: max(30px, calc((100% - 720px) / 2)); }
  .modal { align-items: center; }.modal-card { border-radius: 20px; }
  .people-toolbar { grid-template-columns: 1fr 220px; }
  .person-card { grid-template-columns: auto minmax(180px,1fr) auto auto; }.person-actions { grid-column: auto; display: flex; }.person-actions button { padding: 0 10px; }
  .group-admin-card { grid-template-columns: auto minmax(220px,1fr) 150px auto; }.group-admin-card .switch-row, .group-admin-card .save-group { grid-column: auto; }.group-admin-card .save-group { min-height: 46px; }
  .report-person { grid-template-columns: minmax(180px,1fr) auto 70px 70px minmax(180px,auto); }.participation-mark { display: inline-flex; }.report-controls { grid-column: auto; }
}

@media (min-width: 980px) {
  .admin-app { display: grid; grid-template-columns: 230px minmax(0,1fr); }
  .admin-sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; padding: 22px 15px; border-right: 1px solid rgba(255,255,255,.1); background: radial-gradient(circle at 16% 102%, rgba(223,129,47,.22), transparent 16rem), radial-gradient(circle at 20% 0, rgba(112,153,193,.18), transparent 18rem), linear-gradient(180deg, #0b1219, #1c3348); color: #fff; box-shadow: 14px 0 42px rgba(8,16,24,.14), inset -1px 0 0 rgba(255,255,255,.06); }
  .admin-sidebar .admin-brand { padding: 0 6px 25px; }.admin-sidebar nav { display: grid; gap: 5px; }.admin-sidebar nav button { display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: #adbed0; font-size: 11px; font-weight: 750; text-align: left; cursor: pointer; }.admin-sidebar nav button .ui-icon { width: 18px; height: 18px; }.admin-sidebar nav button.active { background: linear-gradient(90deg, rgba(223,129,47,.24), rgba(255,255,255,.08)); color: #fff; box-shadow: inset 3px 0 0 var(--orange), inset 0 1px 0 rgba(255,255,255,.08); }
  .admin-user { display: flex; align-items: center; gap: 9px; margin-top: auto; padding: 15px 6px 11px; border-top: 1px solid rgba(255,255,255,.1); }.admin-user div { display: grid; gap: 2px; }.admin-user strong { font-size: 10px; }.admin-user small { color: #9eb0c9; font-size: 8px; }.sidebar-logout { width: 100%; min-height: 36px; border: 1px solid rgba(255,255,255,.12); border-radius: 9px; background: rgba(255,255,255,.06); color: #bdcce0; font-size: 9px; cursor: pointer; }
  .admin-main { padding: 0 0 40px; }.admin-mobile-header, .admin-bottom-nav { display: none; }.admin-view { width: min(100% - 50px, 1240px); margin: 0 auto; padding: 34px 0; }.admin-page-heading h1 { font-size: 36px; }.admin-page-heading p:last-child { font-size: 11px; }
  .admin-stats { grid-template-columns: repeat(4,1fr); gap: 12px; }.admin-stat { min-height: 130px; padding: 18px; }.overview-grid { grid-template-columns: 1.35fr .85fr; gap: 12px; }
  .global-notice { width: min(calc(100% - 50px), 520px); }
}

@media (max-width: 520px) {
  .form-grid.two { grid-template-columns: 1fr; }.form-grid .full { grid-column: auto; }
  .role-member .view-heading { align-items: stretch; flex-direction: column; }.role-member .view-heading .month-selector { align-self: center; flex-basis: auto; width: min(100%, 310px); }
  .report-group-card > header { grid-template-columns: 1fr repeat(2,auto); }.report-group-card > header .group-total:nth-of-type(2) { display: none; }
  .admin-page-heading { align-items: stretch; flex-direction: column; }.admin-page-heading .primary-button, .admin-page-heading .outline-button { width: 100%; }.heading-actions { display: grid; grid-template-columns: 1fr; }
}

@media (max-width: 360px) {
  .app-header { padding-right: 15px; padding-left: 15px; }.member-header h1 { font-size: 32px; }.app-content { padding-right: 8px; padding-left: 8px; }.today-heading { align-items: flex-start; flex-direction: column; }.entry-card { padding-right: 14px; padding-left: 14px; }.month-progress-card { padding: 17px; }.entry-step { grid-template-columns: 34px minmax(0,1fr); gap: 10px; }.step-number { width: 33px; height: 33px; }.date-step .step-content { grid-template-columns: 1fr; }.auxiliary-month-option { margin-left: 44px; }.view-heading { align-items: stretch; flex-direction: column; }.report-group-card > header { grid-template-columns: 1fr auto; }.report-group-card > header .group-total:nth-of-type(3) { display: none; }
}

/* Tema claro 1.4.1: menos efectos, más claridad y ligereza visual. */

html,
body,
.login-page,
.installer-page,
.role-member,
.print-report-page {
  background: #f3f6f9;
}
html.login-document,
html.member-document { background: #2f4b61; }
html.member-document.standalone-mode { background: linear-gradient(180deg, #2f4b61 0 150px, #f3f6f9 150px 100%); }
.eyebrow { color: #5c7690; }
.eyebrow.light { color: rgba(255,255,255,.78); }

.brand-symbol,
.login-brand .brand-symbol {
  border-color: rgba(255,255,255,.35);
  background: #416d98;
  box-shadow: none;
}
.primary-button {
  border-color: #3f6f9c;
  background: #4676a3;
  text-shadow: none;
  box-shadow: none;
}
.primary-button:hover { border-color: #355f87; background: #3d6993; }
.outline-button,
.person-actions button {
  border-color: #d4dee7;
  background: rgba(255,255,255,.88);
  box-shadow: none;
}
.outline-button:hover { border-color: #aebfce; color: #355f87; }
input,
select,
textarea { border-color: #ccd7e1; background: rgba(255,255,255,.96); }

/* Acceso */
.login-page::before {
  border-color: rgba(255,255,255,.18);
  background: #315f87;
  box-shadow: none;
}
.login-card,
.installer-card {
  border-color: rgba(255,255,255,.9);
  background: rgba(255,255,255,.9);
  box-shadow: 0 8px 28px rgba(42,64,84,.1);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
}
.login-icon,
.installer-section-title > span {
  border-color: #f0d7c1;
  background: var(--orange-soft);
  color: #bd6a2e;
  box-shadow: none;
}
.login-brand > p:not(.eyebrow) { color: rgba(255,255,255,.88); }
.login-benefits { color: rgba(255,255,255,.82); }

/* Aplicación personal */
.member-header {
  border-color: rgba(255,255,255,.24);
  background: #2f4b61;
  box-shadow: 0 5px 18px rgba(27,48,65,.18);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.member-header::after { display: none; }
.member-header-meta span {
  border-color: rgba(255,255,255,.3);
  background: rgba(255,255,255,.12);
  color: #fff;
  box-shadow: none;
}
.member-header-meta span:last-child {
  border-color: rgba(255,224,197,.58);
  background: rgba(255,244,233,.16);
  color: #fff4e9;
}
.profile-avatar,
.large-avatar {
  border-color: rgba(255,255,255,.4);
  background: rgba(255,255,255,.14);
  box-shadow: none;
}
.large-avatar { background: #4d78a5; }
.view-heading,
.entry-card,
.profile-card,
.privacy-card,
.monthly-hero,
.mini-stats article,
.admin-stat,
.admin-card,
.report-group-card,
.person-card,
.group-admin-card,
.filter-bar,
.people-toolbar,
.print-group {
  border-color: #e0e7ee;
  background: rgba(255,255,255,.88);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.step-number { border-color: #416d98; background: #4d78a5; box-shadow: none; }
.calendar-picker {
  border-color: #cfdae4;
  background: #fff;
  box-shadow: none;
}
.calendar-picker-icon {
  border-color: #f1d6bf;
  background: var(--orange-soft);
  color: #c36e31;
  box-shadow: none;
}
.segmented-control { border-color: #d9e2ea; background: #edf2f6; box-shadow: none; }
.segmented-control button.active {
  border-color: #416d98;
  background: #4d78a5;
  box-shadow: none;
}
.auxiliary-month-option,
.closure-reminder,
.monthly-closing-notice {
  border-color: #efd8c4;
  background: #fff8f1;
  box-shadow: none;
}
.reminder-symbol { background: #ed9550; box-shadow: none; }
.month-progress-card {
  border-color: rgba(255,255,255,.32);
  background: #4d78a5;
  box-shadow: 0 6px 20px rgba(45,78,108,.12);
}
.monthly-hero { background: rgba(255,255,255,.9); }
.monthly-number strong { color: #3d6993; }
.entry-list-item { border-color: #dfe7ee; box-shadow: none; }
.entry-list-date { background: #edf3f8; color: #3e6991; }
.entry-arrow { color: #6f8294; }
.empty-state {
  border-color: #d7e1e9;
  background: rgba(255,255,255,.7);
}
.empty-state > span,
.privacy-icon,
.group-symbol,
.admin-stat-icon {
  border-color: #efd8c4;
  background: var(--orange-soft);
  color: #bd6a2e;
  box-shadow: none;
}

/* Navegación */
.bottom-nav,
.standalone-mode .bottom-nav,
.admin-bottom-nav {
  border-color: #dce5ed;
  background: rgba(255,255,255,.94);
  box-shadow: 0 -3px 14px rgba(39,61,81,.07);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
.standalone-mode .bottom-nav {
  background: #fff;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.standalone-mode .bottom-nav button { color: #718091; }
.bottom-nav button.active,
.standalone-mode .bottom-nav button.active {
  background: #edf3f8;
  color: #355f87;
  box-shadow: none;
}
.bottom-nav button.active::after,
.admin-bottom-nav button.active::after { background: var(--orange); box-shadow: none; }
.admin-bottom-nav button.active { color: #355f87; }

/* Administración */
.admin-mobile-header,
.installer-header,
.print-report-header {
  border-color: rgba(255,255,255,.22);
  background: #315f87;
  box-shadow: 0 4px 16px rgba(43,72,99,.12);
}
.admin-mobile-header form button { background: rgba(255,255,255,.14); }
.admin-stat::after { display: none; }
.admin-stat strong { color: #24384a; }
.admin-stat.stat-3 strong { color: #3e6991; }
.admin-stat.stat-4 strong { color: #bc6b31; }
.report-group-card > header { background: #f6f8fa; }
.progress-track { background: #e6edf2; box-shadow: none; }
.progress-track i { background: #5d84aa; box-shadow: none; }
.mini-avatar { border-color: #dde5ec; background: #edf3f8; box-shadow: none; }
.modal-backdrop { background: rgba(34,48,62,.42); }
.modal-card {
  border-color: rgba(255,255,255,.92);
  background: rgba(255,255,255,.96);
  box-shadow: 0 14px 40px rgba(34,49,64,.18);
}
.modal-close { border-color: #d8e1e9; background: #f4f7f9; box-shadow: none; }
.generated-code { background: var(--orange-soft); color: #355f87; }
.print-report-page { background: #f3f6f9; }
.print-report-header .eyebrow { color: rgba(255,255,255,.78); }

@media (min-width: 760px) {
  .login-page { background: linear-gradient(90deg, #315f87 0 48%, #f3f6f9 48% 100%); }
}

@media (min-width: 980px) {
  .admin-sidebar {
    border-color: #dce5ed;
    background: #f8fafc;
    color: #263b4e;
    box-shadow: none;
  }
  .admin-sidebar nav button { color: #66788a; }
  .admin-sidebar nav button.active {
    background: #eaf1f7;
    color: #355f87;
    box-shadow: inset 3px 0 0 var(--orange);
  }
  .admin-user { border-top-color: #dfe7ee; }
  .admin-user small { color: #78899a; }
  .sidebar-logout { border-color: #d9e2e9; background: #fff; color: #66788a; }
}

/* Estudios bíblicos: un único valor por mes. */
.monthly-studies-card {
  margin-top: 10px;
  padding: 16px;
  border: 1px solid #e0e7ee;
  border-radius: 20px;
  background: rgba(255,255,255,.9);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.mini-stats.single { grid-template-columns: 1fr; }
.monthly-studies-card > header {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 11px;
}
.monthly-studies-card h3 { margin: 0; color: #25384a; font-size: 18px; letter-spacing: -.025em; }
.monthly-studies-card .eyebrow { margin-bottom: 3px; }
.monthly-studies-card > p { margin: 13px 0; color: #667789; font-size: 11px; line-height: 1.5; }
.monthly-studies-card > small { display: block; margin-top: 9px; color: #748496; font-size: 9px; line-height: 1.45; }
.monthly-studies-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid #efd8c4;
  border-radius: 12px;
  background: var(--orange-soft);
  color: #bd6a2e;
}
.monthly-studies-icon .ui-icon { width: 20px; height: 20px; }
.monthly-studies-status {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: #fff3df;
  color: #9a641a;
  font-size: 8px;
  font-weight: 900;
  white-space: nowrap;
}
.monthly-studies-status.confirmed { background: #e8f5ed; color: #27704b; }
.monthly-studies-status.suggested { background: #fff3df; color: #925b12; }
.monthly-studies-status.closed { background: #edf1f4; color: #667687; }
.monthly-studies-form { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 9px; }
.monthly-studies-form label { display: grid; gap: 6px; }
.monthly-studies-form label > span { color: #506275; font-size: 10px; font-weight: 850; }
.monthly-studies-form input { min-height: 48px; font-size: 19px; font-weight: 850; text-align: center; }
.monthly-studies-form button { min-height: 48px; white-space: nowrap; }
.report-studies { gap: 3px; }
.report-studies input {
  width: 56px;
  min-height: 36px;
  padding: 0 5px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}
.report-studies.pending input { border-color: #e5ba8f; background: #fff8f1; }
.report-studies.pending small { color: #a2642a; }

@media (max-width: 360px) {
  .monthly-studies-card > header { grid-template-columns: auto minmax(0,1fr); }
  .monthly-studies-status { grid-column: 2; justify-self: start; }
  .monthly-studies-form { grid-template-columns: 1fr; }
  .monthly-studies-form button { width: 100%; }
}

/* Mis asignaciones: consulta diaria de los cuatro programas. */
.role-member .bottom-nav { grid-template-columns: repeat(4, minmax(0,1fr)); }
.role-member .bottom-nav button { min-width: 0; padding: 3px 1px; font-size: 9px; line-height: 1.12; }
.assignments-view { padding-bottom: 2px; }
.role-member .assignments-view .view-heading {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
}
.assignments-view .view-heading h2 { font-size: clamp(24px,7vw,28px); }
.assignments-heading-icon {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid #d4e0e9;
  border-radius: 14px;
  background: #edf3f8;
  color: #3e6991;
}
.assignments-heading-icon .ui-icon { width: 23px; height: 23px; }
.assignments-whatsapp-warning {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding: 14px;
  border: 1px solid #ead4bd;
  border-radius: 18px;
  background: #fff8f1;
}
.assignments-whatsapp-warning > span {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  background: #fff0e0;
  color: #b9682d;
}
.assignments-whatsapp-warning > span .ui-icon { width: 21px; height: 21px; }
.assignments-whatsapp-warning strong { display: block; color: #5d422d; font-size: 13px; line-height: 1.35; }
.assignments-whatsapp-warning p { margin: 4px 0 0; color: #80664f; font-size: 10px; line-height: 1.4; }
.assignments-list { display: grid; gap: 9px; }
.assignments-loading {
  display: grid;
  min-height: 190px;
  justify-items: center;
  align-content: center;
  gap: 12px;
  color: #53677a;
  font-size: 12px;
}
.assignments-loading > span {
  width: 30px;
  height: 30px;
  border: 3px solid #d9e4ed;
  border-top-color: #4d78a5;
  border-radius: 50%;
  animation: assignments-spin .8s linear infinite;
}
@keyframes assignments-spin { to { transform: rotate(360deg); } }
.assignment-day-card {
  overflow: hidden;
  border: 2px solid #315b7d;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(28,54,77,.13);
}
.assignment-day-heading {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: center;
  gap: 13px;
  padding: 14px 15px 16px;
  border-bottom: 4px solid #df8b42;
  background: #294f70;
  color: #fff;
}
.assignment-date {
  display: grid;
  width: 62px;
  height: 64px;
  place-content: center;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 16px;
  background: #fff;
  color: #294f70;
  text-align: center;
  box-shadow: 0 5px 13px rgba(7,27,45,.17);
}
.assignment-date strong { font-size: 24px; line-height: 1; }
.assignment-date small { margin-top: 4px; color: #b46528; font-size: 9px; font-weight: 950; letter-spacing: .09em; }
.assignment-date .ui-icon { width: 23px; height: 23px; }
.assignment-day-heading-copy { display: grid; min-width: 0; justify-items: start; text-align: left; }
.assignment-day-kicker { color: #ffd6b1; font-size: 8px; font-weight: 950; letter-spacing: .12em; line-height: 1.2; text-transform: uppercase; }
.assignment-day-heading-copy > strong { margin-top: 4px; color: #fff; font-size: 15px; line-height: 1.25; text-transform: capitalize; }
.assignment-day-count {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  margin-top: 7px;
  padding: 0 9px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}
.assignment-day-items { display: grid; background: #fff; }
.assignment-day-item { display: grid; min-width: 0; justify-items: center; padding: 16px 15px 18px; text-align: center; }
.assignment-day-item + .assignment-day-item { border-top: 2px solid #e3e9ef; }
.assignment-item-badges { display: flex; max-width: 100%; flex-wrap: wrap; justify-content: center; gap: 6px; }
.assignment-source {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  max-width: 100%;
  padding: 0 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #eaf1f7;
  color: #426a8f;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .045em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.assignment-source.source-publica { background: #eaf5ef; color: #347455; }
.assignment-source.source-discursos { background: #fff1e4; color: #a4602a; }
.assignment-source.source-asignaciones { background: #f0edf8; color: #675888; }
.assignment-day-item h3 { margin: 8px 0 0; color: #263a4d; font-size: 15px; line-height: 1.25; letter-spacing: -.015em; }
.assignment-day-item p { max-width: 460px; margin: 5px 0 0; color: #647587; font-size: 10px; line-height: 1.45; }
.assignment-when { margin-top: 5px; color: #7a8998; font-size: 9px; font-weight: 750; line-height: 1.3; }
.assignment-kind {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 5px 7px;
  border-radius: 999px;
  background: #fff4e9;
  color: #ad642d;
  font-size: 7px;
  font-weight: 900;
  text-transform: uppercase;
}
.assignments-stale-note {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #ead7c4;
  border-radius: 13px;
  background: #fff8f1;
  color: #8a603d;
  font-size: 9px;
  line-height: 1.45;
  text-align: center;
}
.assignments-empty { min-height: 230px; }

@media (max-width: 380px) {
  .role-member .bottom-nav button { font-size: 8px; }
  .assignment-day-heading { gap: 10px; padding: 13px 11px 15px; }
  .assignment-day-item { padding-right: 10px; padding-left: 10px; }
  .assignment-date { width: 56px; height: 59px; }
  .assignment-day-heading-copy > strong { font-size: 14px; }
  .assignment-day-kicker { font-size: 7px; letter-spacing: .09em; }
}

/* Control de territorios. Se mantiene separado del registro de actividad. */
.captain-tools-card {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 17px;
  border: 1px solid #cbd9e4;
  border-radius: 20px;
  background: #f8fbfd;
  box-shadow: 0 8px 22px rgba(28,52,73,.08);
}
.captain-tools-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 15px;
  background: #315c7d;
  color: #fff;
}
.captain-tools-icon .ui-icon { width: 25px; height: 25px; }
.captain-tools-card h3 { margin: 2px 0 3px; color: #1d3346; font-size: 18px; letter-spacing: -.025em; }
.captain-tools-card p:not(.eyebrow) { margin: 0; color: #637587; font-size: 10px; line-height: 1.45; }
.captain-tools-card > button { grid-column: 1 / -1; justify-content: center; }
.captain-tools-card > button .ui-icon { margin-left: auto; }

.territories-view { padding-bottom: 4px; }
.territory-back-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: #426783;
  font-size: 10px;
  font-weight: 850;
}
.territory-back-button .ui-icon { width: 17px; height: 17px; }
.territory-view-heading { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; }
.territory-view-heading > div > p:last-child { margin: 4px 0 0; color: #667789; font-size: 10px; line-height: 1.45; }
.member-territories { display: grid; gap: 12px; }
.territory-loading { display: grid; min-height: 200px; place-content: center; justify-items: center; gap: 12px; color: #536b7e; font-size: 11px; }
.territory-loading > span { width: 28px; height: 28px; border: 3px solid #d8e2e9; border-top-color: #315c7d; border-radius: 50%; animation: assignments-spin .8s linear infinite; }
.territory-focus, .territory-section {
  padding: 14px;
  border: 1px solid #d3dde5;
  border-radius: 21px;
  background: #fff;
  box-shadow: 0 9px 24px rgba(28,52,73,.07);
}
.territory-section-heading { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.territory-section-heading h3 { margin: 2px 0 0; color: #21384b; font-size: 17px; letter-spacing: -.025em; }
.territory-section-heading > span { flex: 0 0 auto; color: #758595; font-size: 8px; font-weight: 850; text-transform: uppercase; }
.territory-current-card, .territory-next-card { overflow: hidden; border: 1px solid #cbd8e2; border-radius: 17px; background: #f8fbfd; }
.territory-current-card > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid #d6e1e8; background: #edf4f8; color: #6b7c8c; font-size: 8px; font-weight: 800; }
.territory-status-badge { display: inline-flex; min-height: 24px; align-items: center; padding: 0 9px; border-radius: 999px; font-size: 7px; font-style: normal; font-weight: 950; letter-spacing: .055em; text-transform: uppercase; }
.territory-status-badge.current { background: #dcecf6; color: #275b7d; }
.territory-status-badge.next { background: #fff0e3; color: #9b5b2c; }
.territory-status-badge.completed { background: #e8f3ed; color: #2d704f; }
.territory-current-main { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 12px; padding: 15px 13px; }
.territory-current-main p { margin: 0 0 2px; color: #6d7d8d; font-size: 8px; font-weight: 850; text-transform: uppercase; }
.territory-current-main h3 { margin: 0; color: #1f3447; font-size: 19px; line-height: 1.2; letter-spacing: -.025em; }
.territory-current-main small { display: block; margin-top: 4px; color: #687a8b; font-size: 9px; line-height: 1.4; }
.territory-code { display: grid; min-width: 53px; height: 53px; place-items: center; padding: 0 7px; border: 1px solid #bdcedb; border-radius: 15px; background: #fff; color: #2e5b7e; font-size: 18px; font-weight: 950; }
.territory-code.compact { min-width: 39px; width: auto; height: 39px; border-radius: 11px; font-size: 12px; }
.territory-card-actions { display: flex; justify-content: flex-end; padding: 0 12px 12px; }
.territory-map-button, .territory-admin-actions button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 11px;
  border: 1px solid #bed0dd;
  border-radius: 11px;
  background: #fff;
  color: #315f83;
  font-size: 9px;
  font-weight: 850;
}
.territory-map-button .ui-icon, .territory-admin-actions button .ui-icon { width: 16px; height: 16px; }
.territory-no-map { display: inline-flex; min-height: 32px; align-items: center; color: #8996a2; font-size: 8px; font-weight: 800; }
.territory-finish-form, .territory-start-form { display: grid; gap: 11px; padding: 14px 13px; border-top: 1px solid #d6e1e8; background: #fff; }
.territory-finish-form h4 { margin: 2px 0; color: #263c4f; font-size: 15px; }
.territory-finish-form > div > small { color: #718191; font-size: 8px; line-height: 1.4; }
.territory-finish-form label, .territory-start-form label { display: grid; gap: 5px; }
.territory-finish-form label > span, .territory-start-form label > span { color: #526779; font-size: 9px; font-weight: 850; }
.territory-finish-form input, .territory-start-form input { min-height: 48px; font-size: 15px; font-weight: 800; }
.territory-finish-form textarea { min-height: 70px; }
.territory-next-copy { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 12px 0; }
.territory-next-copy p { margin: 0; color: #70808e; font-size: 8px; line-height: 1.35; text-align: right; }
.territory-order-list, .territory-history-list { display: grid; gap: 7px; }
.territory-order-item { display: grid; align-items: center; min-width: 0; border: 1px solid #dbe3e9; border-radius: 14px; }
.territory-order-number { display: grid; width: auto; min-width: 48px; height: 25px; place-items: center; padding: 0 7px; border-radius: 8px; background: #e9f0f5; color: #46647b; font-size: 7px; font-weight: 900; text-transform: uppercase; white-space: nowrap; }
.territory-order-item strong { display: block; overflow: hidden; color: #2b4051; text-overflow: ellipsis; white-space: nowrap; }
.territory-order-item small { display: block; color: #738391; }
.territory-order-item .territory-map-button { min-height: 34px; padding: 0 8px; font-size: 0; }
.territory-history-list article { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 10px; border: 1px solid #dde5ea; border-radius: 13px; }
.territory-history-list strong { color: #2b4051; font-size: 11px; }
.territory-history-list p { margin: 3px 0 0; color: #657889; font-size: 8px; }
.territory-history-list small { display: block; margin-top: 3px; color: #7c8995; font-size: 8px; line-height: 1.35; }
.territory-history-check { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: #e8f3ed; color: #347355; }
.territory-history-check .ui-icon { width: 15px; height: 15px; }
.territory-history-empty { padding: 20px 12px; color: #778795; font-size: 9px; line-height: 1.5; text-align: center; }
.territory-empty { display: grid; min-height: 190px; justify-items: center; align-content: center; gap: 7px; padding: 20px; text-align: center; }
.territory-empty > span { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 15px; background: #edf3f7; color: #3d6888; }
.territory-empty > span .ui-icon { width: 25px; height: 25px; }
.territory-empty strong { color: #2a4154; font-size: 14px; }
.territory-empty p { max-width: 310px; margin: 0; color: #6f7f8e; font-size: 9px; line-height: 1.5; }
.territory-offline-note { margin: 0; padding: 10px; border: 1px solid #ead3bd; border-radius: 12px; background: #fff8f1; color: #855e3f; font-size: 8px; line-height: 1.4; text-align: center; }

.admin-bottom-nav { grid-template-columns: repeat(5,minmax(0,1fr)); }
.territory-admin-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; margin-bottom: 14px; }
.territory-admin-summary article { display: flex; min-width: 0; align-items: center; gap: 10px; padding: 13px; border: 1px solid #d8e1e8; border-radius: 15px; background: #fff; }
.territory-admin-summary article > span { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: 11px; background: #edf3f7; color: #315f82; }
.territory-admin-summary .ui-icon { width: 19px; height: 19px; }
.territory-admin-summary strong { display: block; color: #22394c; font-size: 19px; }
.territory-admin-summary small { display: block; color: #71808e; font-size: 8px; line-height: 1.2; }
.territory-admin-grid { display: grid; gap: 14px; }
.territory-admin-list { display: grid; gap: 12px; }
.territory-captain-group { overflow: hidden; border: 1px solid #d4dfe7; border-radius: 16px; background: #f9fbfc; }
.territory-captain-group > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 13px; border-bottom: 1px solid #d7e1e8; background: #edf3f7; }
.territory-captain-group > header strong, .territory-captain-group > header small { display: block; }
.territory-captain-group > header strong { color: #28445a; font-size: 11px; }
.territory-captain-group > header small { margin-top: 2px; color: #70808e; font-size: 8px; }
.territory-captain-group > header > span { color: #577186; font-size: 8px; font-weight: 850; text-transform: uppercase; }
.territory-admin-item { display: grid; grid-template-columns: auto auto minmax(0,1fr); align-items: center; gap: 9px; padding: 11px; background: #fff; }
.territory-admin-item + .territory-admin-item { border-top: 1px solid #e0e7ec; }
.territory-admin-item.inactive { opacity: .57; }
.territory-admin-copy { min-width: 0; }
.territory-admin-copy strong { display: block; overflow: hidden; color: #263e51; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.territory-admin-copy small { display: block; margin-top: 3px; color: #6e7f8e; font-size: 8px; line-height: 1.35; }
.territory-admin-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 7px; }
.territory-admin-actions > span { display: inline-flex; min-height: 34px; align-items: center; color: #8a969f; font-size: 8px; }
.territory-admin-history-list { display: grid; gap: 8px; }
.territory-admin-history-list article { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 9px; padding: 10px; border: 1px solid #dce4e9; border-radius: 13px; }
.territory-admin-history-list article.current { border-color: #a9c5d7; background: #f2f8fb; }
.territory-admin-history-list strong { color: #2a4052; font-size: 10px; }
.territory-admin-history-list p, .territory-admin-history-list small, .territory-admin-history-list em { display: block; margin: 2px 0 0; color: #6f7f8d; font-size: 8px; line-height: 1.35; }
.territory-admin-history-list em { color: #84909a; }
.territory-admin-history-list .territory-status-badge { grid-column: 2; justify-self: start; margin-top: 5px; }
.form-grid-wide { grid-column: 1 / -1; }
.territory-map-upload > small { color: #788693; font-size: 8px; line-height: 1.35; }
.territory-map-upload input { padding: 8px; font-size: 10px; }
.territory-map-card { display: grid; grid-template-rows: auto auto minmax(0,1fr) auto; width: min(100%,760px); height: min(88vh,760px); }
.territory-map-stage { display: grid; min-height: 0; place-items: center; overflow: hidden; border: 1px solid #d3dde4; border-radius: 15px; background: #eaf0f4; }
.territory-map-stage img { width: 100%; height: 100%; object-fit: contain; }
.territory-map-stage iframe { width: 100%; height: 100%; min-height: 420px; border: 0; background: #fff; }
.territory-map-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.territory-map-actions > * { justify-content: center; }

@media (max-width: 370px) {
  .territory-order-item { grid-template-columns: auto auto minmax(0,1fr); }
  .territory-order-item .territory-map-button { grid-column: 2 / -1; justify-self: end; font-size: 8px; }
  .territory-admin-summary article { display: grid; justify-items: center; gap: 5px; padding: 10px 4px; text-align: center; }
  .territory-admin-summary article > span { width: 34px; height: 34px; }
  .admin-bottom-nav button { font-size: 7px; }
}

@media (min-width: 700px) {
  .territory-current-card, .territory-next-card { max-width: 640px; margin: 0 auto; }
  .territory-finish-form { grid-template-columns: 1fr 1fr; }
  .territory-finish-form > div, .territory-finish-form button { grid-column: 1 / -1; }
  .territory-start-form { grid-template-columns: 1fr auto; align-items: end; }
  .territory-start-form button { min-width: 240px; }
  .territory-admin-item { grid-template-columns: auto auto minmax(0,1fr) auto; }
  .territory-admin-actions { grid-column: auto; }
  .territory-admin-history-list article { grid-template-columns: auto minmax(0,1fr) auto; }
  .territory-admin-history-list .territory-status-badge { grid-column: auto; justify-self: end; margin-top: 0; }
}

@media (min-width: 1020px) {
  .territory-admin-grid { grid-template-columns: minmax(0,1.3fr) minmax(320px,.7fr); align-items: start; }
}

/* Territorios 1.8.1: jerarquía más simple y delimitaciones de Google Maps. */
.territory-primary-card {
  overflow: hidden;
  border: 1px solid #cbd8e2;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 9px 24px rgba(28,52,73,.07);
}
.territory-primary-card > header {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border-bottom: 1px solid #dce5eb;
  background: #f4f8fa;
}
.territory-primary-card.is-next > header { border-top: 4px solid #d98a49; }
.territory-primary-card.is-current > header { border-top: 4px solid #4c7ca2; }
.territory-primary-card > header > div { display: grid; justify-items: start; gap: 5px; }
.territory-primary-card > header small { color: #6c7d8c; font-size: 8px; font-weight: 750; }
.territory-primary-main {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: center;
  gap: 13px;
  min-height: 105px;
  padding: 17px 14px;
}
.territory-primary-main > div { min-width: 0; }
.territory-primary-main p { margin: 0 0 3px; color: #6e7f8d; font-size: 8px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.territory-primary-main h3 { margin: 0; color: #20384b; font-size: 20px; line-height: 1.17; letter-spacing: -.025em; text-decoration: none; }
.territory-primary-main small { display: block; margin-top: 5px; color: #66798a; font-size: 9px; line-height: 1.45; text-decoration: none; }
.territory-map-link {
  display: inline-flex;
  min-height: 38px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid #bfcfdb;
  border-radius: 11px;
  background: #fff;
  color: #315f82;
  font-family: inherit;
  font-size: 8px;
  font-weight: 850;
  text-decoration: none !important;
  cursor: pointer;
}
.territory-map-link .ui-icon { width: 15px; height: 15px; }
.territory-map-link .ui-icon:last-child { width: 12px; height: 12px; color: #73889a; }
.territory-map-link.compact { min-width: 36px; min-height: 34px; padding: 0 8px; border-color: transparent; background: #eef4f7; }
.territory-map-link.compact span { display: none; }
.territory-map-link.compact .ui-icon { width: 16px; height: 16px; }
.territory-map-link.compact .ui-icon:last-child { display: none; }
.territory-primary-card .territory-start-form,
.territory-primary-card .territory-finish-form { border-top-color: #dce5eb; }
.territory-assigned-section { padding: 16px; }
.territory-section-heading h3,
.territory-section-heading span,
.territory-order-item strong,
.territory-order-item small,
.territory-code { border-bottom: 0; text-decoration: none !important; }
.territory-order-item {
  grid-template-columns: auto minmax(0,1fr) auto;
  gap: 11px;
  padding: 11px;
  border-color: #dde5ea;
  background: #fff;
}
.territory-order-item.is-current { border-color: #9ebace; background: #f3f8fb; }
.territory-order-item.is-next { border-color: #e7c7ab; background: #fffaf6; }
.territory-order-item > div { min-width: 0; }
.territory-order-item strong { font-size: 12px; }
.territory-order-item small { margin-top: 3px; font-size: 8px; }
.territory-map-link + .territory-admin-actions,
.territory-order-item .territory-map-link { justify-self: end; }
.territory-map-link-field { display: grid; gap: 6px; }
.territory-map-link-field > small { color: #748493; font-size: 8px; line-height: 1.4; }
.territory-admin-actions .territory-map-link { min-height: 38px; border-color: #bed0dd; background: #fff; }

/* Visor simple de delimitaciones creadas en Google My Maps. */
.territory-map-viewer {
  align-items: center;
  padding: max(10px,env(safe-area-inset-top)) 10px max(10px,env(safe-area-inset-bottom));
}
.territory-map-viewer-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0,1fr);
  overflow: hidden;
  width: min(100%,780px);
  height: min(88vh,760px);
  height: min(88dvh,760px);
  margin: 0 auto;
  border: 1px solid #d4dee6;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(20,34,47,.28);
}
.territory-map-viewer-card > header {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid #dbe4ea;
  background: #f5f8fa;
}
.territory-map-viewer-card > header > div { min-width: 0; }
.territory-map-viewer-card h2 {
  overflow: hidden;
  margin: 2px 0 0;
  color: #20384b;
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: -.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.territory-map-viewer-close {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border: 1px solid #d2dde5;
  border-radius: 12px;
  background: #fff;
  color: #425b6f;
  cursor: pointer;
}
.territory-map-viewer-close .ui-icon { width: 18px; height: 18px; }
.territory-map-viewer-card iframe { width: 100%; height: 100%; min-height: 0; border: 0; background: #edf2f5; }

@media (max-width: 600px) {
  .territory-map-viewer { padding: max(8px,env(safe-area-inset-top)) 8px max(8px,env(safe-area-inset-bottom)); }
  .territory-map-viewer-card {
    height: calc(100vh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    height: calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    border-radius: 18px;
  }
  .territory-map-viewer-card > header { padding: 11px 12px; }
}

/* Informe administrativo de territorios. */
.territory-report-page { min-height: 100vh; background: #eef2f5; }
.territory-report-shell { width: min(100% - 24px,1180px); margin: 0 auto; padding: 20px 0 40px; }
.territory-report-toolbar > div { display: flex; gap: 8px; }
.territory-report-header { display: flex; align-items: center; gap: 15px; padding: 20px; border-radius: 19px; background: #2f526d; color: #fff; }
.territory-report-header-icon { display: grid; width: 48px; height: 48px; flex: 0 0 48px; place-items: center; border: 1px solid rgba(255,255,255,.32); border-radius: 14px; background: rgba(255,255,255,.11); }
.territory-report-header-icon .ui-icon { width: 25px; height: 25px; }
.territory-report-header h1 { margin: 0; font-size: clamp(25px,5vw,36px); letter-spacing: -.04em; }
.territory-report-header p:last-child { margin: 5px 0 0; color: #d8e4ed; font-size: 10px; line-height: 1.45; }
.territory-report-filters { display: grid; grid-template-columns: minmax(220px,1fr) repeat(2,minmax(145px,.55fr)) auto; align-items: end; gap: 9px; margin: 13px 0; padding: 13px; border: 1px solid #d7e0e7; border-radius: 15px; background: #fff; }
.territory-report-filters label { display: grid; gap: 5px; }
.territory-report-filters label > span { color: #5d6f7f; font-size: 9px; font-weight: 850; }
.territory-report-summary { display: grid; grid-template-columns: repeat(4,1fr); gap: 9px; margin-bottom: 13px; }
.territory-report-summary article { display: grid; justify-items: center; gap: 2px; padding: 13px 8px; border: 1px solid #d8e1e7; border-radius: 14px; background: #fff; text-align: center; }
.territory-report-summary strong { color: #294c67; font-size: 21px; }
.territory-report-summary span { color: #71818e; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.territory-report-table-card { overflow: hidden; border: 1px solid #d5dfe6; border-radius: 17px; background: #fff; box-shadow: 0 8px 22px rgba(30,50,68,.06); }
.territory-report-table-wrap { overflow-x: auto; }
.territory-report-table-card table { width: 100%; border-collapse: collapse; }
.territory-report-table-card th { padding: 11px 10px; background: #f1f5f7; color: #627484; font-size: 8px; letter-spacing: .055em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.territory-report-table-card td { padding: 12px 10px; border-top: 1px solid #e3e9ed; color: #455a6b; font-size: 9px; line-height: 1.4; vertical-align: middle; }
.territory-report-table-card td strong,
.territory-report-table-card td span { display: block; }
.territory-report-table-card td strong { color: #253e52; font-size: 10px; }
.territory-report-table-card td > span:not(.territory-report-status) { margin-top: 2px; color: #748390; font-size: 8px; }
.territory-report-status { display: inline-flex !important; min-height: 24px; align-items: center; padding: 0 8px; border-radius: 999px; font-size: 7px; font-weight: 900; text-transform: uppercase; white-space: nowrap; }
.territory-report-status.completed { background: #e8f3ed; color: #2d704f; }
.territory-report-status.current { background: #e5f0f7; color: #2d6386; }
.territory-report-empty td { padding: 34px 12px; color: #738391; text-align: center; }

@media (max-width: 700px) {
  .territory-primary-card > header { align-items: flex-start; }
  .territory-primary-card > header .territory-map-link { margin-top: 1px; }
  .territory-report-toolbar { align-items: stretch; }
  .territory-report-toolbar > div { display: grid; grid-template-columns: 1fr 1fr; }
  .territory-report-filters { grid-template-columns: 1fr 1fr; }
  .territory-report-filters label:first-child,
  .territory-report-filters button { grid-column: 1 / -1; }
  .territory-report-summary { grid-template-columns: 1fr 1fr; }
  .territory-report-table-wrap { overflow: visible; }
  .territory-report-table-card table,
  .territory-report-table-card tbody { display: block; }
  .territory-report-table-card thead { display: none; }
  .territory-report-table-card tr { display: grid; grid-template-columns: 1fr 1fr; padding: 9px; }
  .territory-report-table-card tr + tr { border-top: 1px solid #dde5ea; }
  .territory-report-table-card td { display: grid; gap: 3px; padding: 7px; border: 0; }
  .territory-report-table-card td::before { content: attr(data-label); color: #7a8996; font-size: 7px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
  .territory-report-table-card td:first-child,
  .territory-report-table-card td:nth-child(2),
  .territory-report-table-card td:last-child { grid-column: 1 / -1; }
  .territory-report-empty { display: block !important; }
  .territory-report-empty td { display: block; }
  .territory-report-empty td::before { display: none; }
}

@media (max-width: 380px) {
  .territory-primary-card > header { display: grid; }
  .territory-primary-card > header .territory-map-link { justify-self: start; }
  .territory-primary-main { padding-right: 11px; padding-left: 11px; }
  .territory-report-header { align-items: flex-start; padding: 16px; }
  .territory-report-header-icon { width: 42px; height: 42px; flex-basis: 42px; }
  .territory-report-toolbar > div { grid-template-columns: 1fr; }
}

@media print {
  .territory-report-page { background: #fff !important; }
  .territory-report-shell { width: 100%; padding: 0; }
  .territory-report-toolbar,
  .territory-report-filters,
  .territory-report-page .form-alert { display: none !important; }
  .territory-report-header { border-radius: 0; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .territory-report-summary article,
  .territory-report-table-card { box-shadow: none; }
  .territory-report-table-card { border-radius: 0; }
  .territory-report-table-wrap { overflow: visible; }
  .territory-report-table-card table { display: table; }
  .territory-report-table-card thead { display: table-header-group; }
  .territory-report-table-card tbody { display: table-row-group; }
  .territory-report-table-card tr { display: table-row; padding: 0; }
  .territory-report-table-card td { display: table-cell; }
  .territory-report-table-card td::before { display: none !important; }
  .territory-report-table-card th,
  .territory-report-table-card td { padding: 7px; }
}
