:root {
  --azul: #00356a;
  --azul-claro: #0a4d8f;
  --vino: #7a032c;
  --dorado: #e3a442;
  --terracota: #c46041;
  --niebla: #f6f8fb;
  --tinta: #12233a;
  --verde: #087052;
  --azul-nota: #d7e5f5;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
  --shadow-blue: 0 18px 45px rgba(0, 53, 106, .12);
  --sidebar-width: 264px;
  --topbar-height: 68px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: calc(var(--topbar-height) + 18px); }
body { margin: 0; background: var(--niebla); color: var(--tinta); font-family: var(--font-body); font-size: 15px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { color: inherit; font: inherit; }
button, select { cursor: pointer; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; }
::selection { background: var(--dorado); color: var(--tinta); }
:focus-visible { outline: 3px solid rgba(227, 164, 66, .65); outline-offset: 3px; }

.grain { position: relative; }
.grain::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .035; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }
.gradient-dark { background: radial-gradient(60rem 35rem at 90% -10%, rgba(122,3,44,.5), transparent 60%), radial-gradient(45rem 30rem at -10% 110%, rgba(196,96,65,.3), transparent 55%), linear-gradient(155deg, #00243f 0%, var(--azul) 55%, #143a6b 100%); }
.content-wrap { position: relative; width: min(1240px, calc(100% - 56px)); margin-inline: auto; }
.kicker { margin-bottom: 10px; color: var(--terracota); font-size: .74rem; font-weight: 800; letter-spacing: .18em; line-height: 1.5; text-transform: uppercase; }
.kicker-dark { color: var(--dorado); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 100; background: var(--dorado); padding: 12px 18px; color: var(--tinta); font-weight: 800; transition: top .2s; }
.skip-link:focus { top: 14px; }
.text-link { color: var(--vino); font-weight: 700; box-shadow: inset 0 -1px 0 rgba(122,3,44,.35); }
.text-link:hover { color: var(--azul); box-shadow: inset 0 -1px 0 rgba(0,53,106,.4); }

/* ---------- Shell de aplicación ---------- */
.app-shell { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: 100vh; }
.app-main { display: flex; min-width: 0; flex-direction: column; }
.app-main > main { flex: 1; min-width: 0; }

.sidebar { position: sticky; top: 0; z-index: 40; display: flex; height: 100vh; flex-direction: column; overflow: hidden; color: white; }
.sidebar > * { position: relative; z-index: 1; }
.sidebar-brand { display: flex; align-items: center; gap: 13px; padding: 22px 20px; border-bottom: 1px solid rgba(255,255,255,.09); }
.sidebar-brand img { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%; }
.sidebar-brand strong { display: block; color: white; font-family: var(--font-display); font-size: 1.02rem; font-weight: 600; line-height: 1.12; }
.sidebar-brand small { display: block; margin-top: 5px; color: var(--dorado); font-size: .54rem; font-weight: 800; letter-spacing: .1em; line-height: 1.4; text-transform: uppercase; }
.sidebar-nav { display: grid; align-content: start; gap: 2px; padding: 16px 0; overflow-y: auto; }
.sidebar-link { display: flex; align-items: center; gap: 13px; padding: 13px 20px; border-left: 3px solid transparent; color: rgba(255,255,255,.7); font-size: .84rem; font-weight: 650; transition: background .2s, color .2s, border-color .2s; }
.sidebar-link svg { flex: 0 0 auto; opacity: .85; }
.sidebar-link:hover { background: rgba(255,255,255,.05); color: white; }
.sidebar-link.active { border-left-color: var(--dorado); background: rgba(255,255,255,.09); color: white; font-weight: 750; }
.sidebar-link.active svg { opacity: 1; color: var(--dorado); }
.sidebar-foot { margin-top: auto; display: grid; gap: 13px; padding: 18px 20px 22px; border-top: 1px solid rgba(255,255,255,.1); background: rgba(0,0,0,.12); }
.sidebar-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sidebar-user > span:last-child { min-width: 0; }
.sidebar-user strong, .sidebar-user small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user strong { color: white; font-size: .76rem; }
.sidebar-user small { margin-top: 2px; color: rgba(255,255,255,.45); font-size: .63rem; }
.sidebar-scrim { position: fixed; inset: 0; z-index: 35; background: rgba(0,36,63,.6); backdrop-filter: blur(2px); }

.topbar { position: sticky; top: 0; z-index: 30; display: flex; min-height: var(--topbar-height); align-items: center; gap: 24px; padding: 12px 26px; border-bottom: 1px solid rgba(0,53,106,.1); background: rgba(246,248,251,.93); backdrop-filter: blur(16px); }
.topbar-title { min-width: 0; flex: 1; }
.topbar-title h1 { margin: 0; overflow: hidden; color: var(--azul); font-size: 1.5rem; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.topbar-title p { margin: 3px 0 0; overflow: hidden; color: rgba(18,35,58,.5); font-size: .71rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 9px; }
.topbar-actions form { display: flex; align-items: center; gap: 9px; }
.topbar-filters select { min-height: 38px; border: 0; background: white; padding: 8px 12px; color: var(--azul); box-shadow: inset 0 0 0 1px rgba(0,53,106,.14); font-size: .75rem; font-weight: 650; }
.topbar-search { position: relative; }
.topbar-search span { position: absolute; left: 11px; top: 50%; color: rgba(18,35,58,.4); font-size: 1.2rem; transform: translateY(-53%); }
.topbar-search input { width: 205px; min-height: 38px; border: 0; background: white; padding: 8px 12px 8px 33px; outline: none; box-shadow: inset 0 0 0 1px rgba(0,53,106,.14); font-size: .78rem; transition: box-shadow .2s, width .2s; }
.topbar-search input:focus { width: 250px; box-shadow: inset 0 0 0 1px var(--azul), 0 0 0 3px rgba(0,53,106,.1); }
.sidebar-toggle { display: none; border: 0; background: transparent; color: var(--azul); }

/* ---------- Botones y campos ---------- */
.button { display: inline-flex; min-height: 43px; align-items: center; justify-content: center; gap: 9px; border: 0; padding: 11px 18px; font-size: .82rem; font-weight: 750; line-height: 1.2; transition: background .2s, color .2s, transform .2s, box-shadow .2s; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--azul); color: white; box-shadow: 0 10px 25px rgba(0,53,106,.2); }
.button-primary:hover { background: var(--vino); box-shadow: 0 12px 28px rgba(122,3,44,.2); }
.button-secondary { background: white; color: var(--azul); box-shadow: inset 0 0 0 1px rgba(0,53,106,.16); }
.button-secondary:hover { background: var(--niebla); box-shadow: inset 0 0 0 1px rgba(122,3,44,.35); color: var(--vino); }
.button-danger { background: white; color: var(--vino); box-shadow: inset 0 0 0 1px rgba(122,3,44,.2); }
.button-danger:hover { background: var(--vino); color: white; }
.button-gold { background: var(--dorado); color: var(--tinta); box-shadow: 0 12px 30px rgba(227,164,66,.22); }
.button-gold:hover { background: white; }
.button-ghost { background: rgba(255,255,255,.1); color: white; box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); }
.button-ghost:hover { background: white; color: var(--azul); }
.button-compact { min-height: 38px; padding: 9px 14px; font-size: .74rem; }
.button-large { min-height: 51px; padding: 14px 22px; font-size: .9rem; }
.button-wide { width: 100%; }
.field label { display: block; margin-bottom: 8px; color: rgba(18,35,58,.7); font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid rgba(0,53,106,.16); border-radius: 0; background: rgba(246,248,251,.58); padding: 12px 14px; outline: none; transition: border .2s, box-shadow .2s, background .2s; }
.field input, .field select { min-height: 46px; }
.field textarea { resize: vertical; line-height: 1.7; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--azul); background: white; box-shadow: 0 0 0 3px rgba(0,53,106,.12); }
.field input::placeholder, .field textarea::placeholder { color: rgba(18,35,58,.38); }
.field small { display: block; margin-top: 7px; color: rgba(18,35,58,.48); font-size: .7rem; }
.alert { position: relative; z-index: 1; margin-bottom: 20px; padding: 13px 16px; font-size: .82rem; font-weight: 650; }
.alert-error { background: rgba(122,3,44,.09); color: var(--vino); box-shadow: inset 4px 0 0 var(--vino); }
.alert-success { background: rgba(10,113,82,.09); color: #075b43; box-shadow: inset 4px 0 0 #0a7152; }
.avatar { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; background: var(--azul); color: white; font-family: var(--font-display); font-size: .77rem; font-weight: 650; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.avatar-small { width: 31px; height: 31px; font-size: .64rem; }
.avatar-tiny { width: 27px; height: 27px; background: var(--niebla); color: var(--azul); box-shadow: inset 0 0 0 1px rgba(0,53,106,.1); font-size: .58rem; }

/* ---------- Login ---------- */
.login-body { background: white; }
.login-shell { display: grid; min-height: 100vh; grid-template-columns: 1.04fr .96fr; }
.login-brand { position: relative; display: flex; min-height: 720px; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 50px clamp(42px, 6vw, 84px); color: white; }
.login-brand > * { position: relative; z-index: 1; }
.login-logo { width: 82px; height: 82px; border-radius: 50%; box-shadow: 0 18px 45px rgba(0,0,0,.18); }
.login-symbols { position: absolute; inset: 0; z-index: 0; color: rgba(255,255,255,.05); font-family: var(--font-display); font-weight: 600; pointer-events: none; }
.login-symbols span { position: absolute; line-height: 1; }
.login-symbols span:nth-child(1) { right: 10%; top: 4%; font-size: 11rem; }
.login-symbols span:nth-child(2) { left: -2%; top: -3%; font-size: 14rem; }
.login-symbols span:nth-child(3) { right: 8%; bottom: 33%; font-size: 8rem; }
.login-symbols span:nth-child(4) { left: 50%; bottom: 9%; font-size: 9rem; }
.login-symbols span:nth-child(5) { left: 7%; bottom: -3%; font-size: 10rem; }
.login-copy { max-width: 580px; }
.login-copy h1 { max-width: 550px; margin-bottom: 22px; font-size: clamp(3rem, 5.2vw, 5.15rem); line-height: .98; letter-spacing: -.035em; }
.login-copy h1 em { color: var(--dorado); font-weight: 500; }
.login-copy > p:not(.kicker) { max-width: 530px; margin-bottom: 30px; color: rgba(255,255,255,.7); font-size: 1rem; line-height: 1.7; }
.login-copy ul { display: grid; margin: 0; padding: 0; gap: 13px; list-style: none; }
.login-copy li { display: flex; align-items: center; gap: 13px; color: rgba(255,255,255,.9); font-size: .84rem; font-weight: 600; }
.login-copy li span { display: grid; width: 25px; height: 25px; place-items: center; background: rgba(227,164,66,.17); color: var(--dorado); }
.login-credit { margin: 0; color: rgba(255,255,255,.38); font-size: .68rem; }
.login-form-side { display: flex; align-items: center; justify-content: center; padding: 60px clamp(30px, 7vw, 100px); background: white; }
.login-form-wrap { width: min(100%, 460px); }
.login-form-wrap h2 { margin-bottom: 12px; color: var(--azul); font-size: clamp(2.3rem, 4vw, 3.2rem); line-height: 1.05; }
.form-intro { margin-bottom: 30px; color: rgba(18,35,58,.62); line-height: 1.65; }
.stack-form { display: grid; gap: 22px; }
.password-field { position: relative; }
.password-field input { padding-right: 82px; }
.password-field button { position: absolute; right: 12px; top: 50%; border: 0; background: transparent; color: var(--azul); font-size: .71rem; font-weight: 800; transform: translateY(-50%); }
.login-form-wrap .button-wide { min-height: 52px; margin-top: 3px; font-size: .88rem; }
.privacy-note { display: flex; gap: 10px; margin: 26px 0 0; padding-top: 22px; border-top: 1px solid rgba(0,53,106,.1); color: rgba(18,35,58,.48); font-size: .7rem; line-height: 1.6; }
.privacy-note span { color: var(--terracota); }
.login-mobile-logo { display: none; border-radius: 50%; }

/* ---------- Tablero ---------- */
.board-shell { display: flex; height: calc(100vh - var(--topbar-height)); flex-direction: column; padding: 18px 26px 22px; }
.board-hint { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; margin: 0 0 14px; padding: 11px 15px; background: rgba(227,164,66,.12); box-shadow: inset 3px 0 0 var(--dorado); }
.board-hint > span { flex: 0 0 auto; color: #8b5d10; font-size: 1.2rem; }
.board-hint p { margin: 0; color: rgba(18,35,58,.62); font-size: .71rem; line-height: 1.55; }
.board-hint strong { color: var(--azul); }
.kanban-board { display: flex; flex: 1; min-height: 0; align-items: flex-start; gap: 14px; overflow-x: auto; overflow-y: hidden; padding-bottom: 6px; scrollbar-width: thin; scrollbar-color: rgba(0,53,106,.3) transparent; }
.kanban-column { display: flex; min-width: 0; max-height: 100%; flex: 1 0 292px; flex-direction: column; background: white; box-shadow: inset 0 0 0 1px rgba(0,53,106,.11); transition: background .2s, box-shadow .2s; }
.kanban-person-board .kanban-column { max-width: 460px; }
.kanban-status-board .kanban-column { flex: 1 1 300px; }
.kanban-column.drag-over { background: rgba(227,164,66,.1); box-shadow: inset 0 0 0 2px var(--dorado), 0 15px 35px rgba(0,53,106,.12); }
.kanban-column-header { display: grid; flex: 0 0 auto; align-items: center; gap: 11px; padding: 14px 15px; background: var(--azul); color: white; }
.kanban-column-header h3 { margin: 0; overflow: hidden; font-family: var(--font-body); font-size: .81rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.kanban-column-header p { margin: 2px 0 0; overflow: hidden; color: rgba(255,255,255,.55); font-size: .6rem; text-overflow: ellipsis; white-space: nowrap; }
.kanban-column-header > strong { display: grid; width: 28px; height: 28px; place-items: center; background: var(--dorado); color: var(--tinta); font-family: var(--font-display); font-size: .8rem; }
.kanban-person-header { grid-template-columns: auto minmax(0, 1fr) auto; }
.kanban-person-header .avatar { background: rgba(255,255,255,.13); color: white; }
.kanban-person-header > div { min-width: 0; }
.kanban-status-header { grid-template-columns: minmax(0, 1fr) auto; }
.kanban-status-header p { margin: 0 0 4px; color: rgba(255,255,255,.6); font-size: .53rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.kanban-status-header h3 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; }
.kanban-status-header.header-in_progress { background: #8a5b0e; }
.kanban-status-header.header-completed { background: var(--verde); }
.kanban-status-header.header-in_progress > strong, .kanban-status-header.header-completed > strong { background: white; }
.kanban-tasks { display: grid; flex: 0 1 auto; min-height: 118px; align-content: start; gap: 9px; overflow-y: auto; padding: 12px; scrollbar-width: thin; scrollbar-color: rgba(0,53,106,.25) transparent; }
.kanban-empty { display: grid; min-height: 110px; place-items: center; align-content: center; gap: 4px; border: 1px dashed rgba(0,53,106,.17); color: rgba(18,35,58,.35); text-align: center; }
.kanban-empty span { font-family: var(--font-display); font-size: 2rem; }
.kanban-empty p { margin: 0; font-size: .64rem; }

.postit { position: relative; display: grid; background: var(--azul-nota); box-shadow: 0 5px 12px rgba(18,35,58,.11), inset 0 -1px rgba(18,35,58,.08); cursor: grab; transform: rotate(-.25deg); transition: opacity .2s, box-shadow .2s, transform .2s; }
.postit:nth-of-type(even) { transform: rotate(.3deg); }
.postit:hover { z-index: 2; box-shadow: 0 12px 24px rgba(18,35,58,.17); transform: rotate(0) translateY(-2px); }
.postit:active { cursor: grabbing; }
.postit-fold { position: absolute; right: 0; top: 0; z-index: 1; width: 0; height: 0; border-style: solid; border-width: 0 18px 18px 0; border-color: transparent rgba(18,35,58,.13) transparent transparent; pointer-events: none; }
.postit-link { display: block; padding: 14px 26px 8px 15px; }
.postit h4 { margin: 0; color: var(--azul); font-size: .92rem; line-height: 1.32; }
.postit-footer { display: flex; align-items: center; gap: 7px; padding: 0 12px 11px 15px; font-size: .57rem; font-weight: 750; }
.postit-status { padding: 4px 7px; background: rgba(255,255,255,.55); color: rgba(18,35,58,.6); font-size: .53rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.postit-status.status-in_progress { color: #8a5b0e; }
.postit-status.status-completed { color: var(--verde); }
.postit-due { display: inline-flex; align-items: center; gap: 4px; color: rgba(18,35,58,.5); }
.postit-due i { font-style: normal; }
.postit-due.is-overdue { color: var(--vino); font-weight: 850; }
.drag-handle { margin-left: auto; color: rgba(18,35,58,.34); font-size: 1rem; line-height: 1; }
.postit.dragging { opacity: .38; transform: rotate(2deg) scale(.97); }
.postit.saving { opacity: .55; pointer-events: none; }
.postit.is-new { animation: postit-in .3s ease-out; }
@keyframes postit-in { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; } }
.kanban-board.is-saving { cursor: progress; }

.quick-add { flex: 0 0 auto; padding: 0 12px 12px; }
.quick-add-open { display: flex; width: 100%; align-items: center; justify-content: flex-start; gap: 8px; border: 1px dashed rgba(0,53,106,.22); background: transparent; padding: 10px 12px; color: rgba(18,35,58,.5); font-size: .72rem; font-weight: 700; transition: background .2s, color .2s, border-color .2s; }
.quick-add-open:hover { border-color: var(--azul); background: var(--niebla); color: var(--azul); }
.quick-add-open span { font-size: .9rem; }
.quick-add-form input { width: 100%; border: 0; background: white; padding: 11px 12px; outline: none; box-shadow: inset 0 0 0 2px var(--azul); font-size: .8rem; }
.quick-add-form p { margin: 7px 0 0; color: rgba(18,35,58,.42); font-size: .6rem; }
.quick-add-form strong { color: var(--azul); }
.quick-add.is-busy { opacity: .55; pointer-events: none; }
.board-live-message { flex: 0 0 auto; min-height: 18px; margin: 8px 0 0; color: var(--verde); font-size: .7rem; font-weight: 700; text-align: right; }
.board-live-message.error { color: var(--vino); }

/* ---------- Secciones de contenido ---------- */
.page-section { padding: 34px 0 70px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 22px; }
.section-heading h2 { margin: 0; color: var(--azul); font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.1; }
.section-heading > p { max-width: 420px; margin: 0; color: rgba(18,35,58,.5); font-size: .74rem; text-align: right; }
.panel-card { padding: 28px; background: white; box-shadow: inset 0 0 0 1px rgba(0,53,106,.1); }
.card-title { display: flex; align-items: center; gap: 13px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid rgba(0,53,106,.1); }
.card-title > span { color: var(--terracota); font-family: var(--font-display); font-size: 1.6rem; font-style: italic; }
.card-title h2 { margin: 0; color: var(--azul); font-size: 1.5rem; }
.card-title h2 small { display: inline-grid; width: 25px; height: 25px; margin-left: 5px; place-items: center; background: var(--niebla); color: var(--azul); font-family: var(--font-body); font-size: .62rem; vertical-align: middle; }
.card-note { margin: -8px 0 18px; color: rgba(18,35,58,.5); font-size: .72rem; line-height: 1.6; }

.task-list { display: grid; gap: 12px; }
.task-card { position: relative; display: grid; min-height: 178px; grid-template-columns: 1fr auto; overflow: hidden; background: white; box-shadow: inset 0 0 0 1px rgba(0,53,106,.11); transition: box-shadow .25s, transform .25s; }
.task-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-blue); }
.task-priority-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: #7a8da5; }
.priority-high .task-priority-bar { background: var(--vino); }
.priority-medium .task-priority-bar { background: var(--dorado); }
.priority-low .task-priority-bar { background: #398c76; }
.task-card-main { padding: 25px 28px 24px 31px; }
.task-meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 13px; }
.status-badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; font-size: .61rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.status-badge > span { width: 6px; height: 6px; background: currentColor; }
.status-assigned { background: rgba(0,53,106,.08); color: var(--azul); }
.status-in_progress { background: rgba(227,164,66,.15); color: #8a5b0e; }
.status-completed { background: rgba(10,113,82,.1); color: var(--verde); }
.priority-label, .overdue-label { font-size: .61rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.priority-text-high { color: var(--vino); }
.priority-text-medium { color: #956614; }
.priority-text-low { color: #347965; }
.overdue-label { padding-left: 10px; border-left: 1px solid rgba(122,3,44,.22); color: var(--vino); }
.task-card h3 { margin-bottom: 8px; color: var(--azul); font-size: 1.4rem; line-height: 1.25; }
.task-card h3 a { transition: color .2s; }
.task-card h3 a:hover { color: var(--vino); }
.task-card-main > p { max-width: 820px; margin-bottom: 19px; color: rgba(18,35,58,.58); font-size: .78rem; line-height: 1.6; }
.task-facts { display: flex; flex-wrap: wrap; gap: 27px; }
.task-facts > span { display: flex; align-items: center; gap: 9px; color: rgba(18,35,58,.42); }
.task-facts i { display: grid; width: 27px; height: 27px; place-items: center; background: var(--niebla); color: var(--azul); font-style: normal; font-weight: 700; }
.task-facts > span > span:last-child { font-size: .61rem; text-transform: uppercase; letter-spacing: .06em; }
.task-facts strong { display: block; max-width: 220px; margin-top: 2px; overflow: hidden; color: rgba(18,35,58,.76); font-size: .7rem; letter-spacing: 0; text-overflow: ellipsis; text-transform: none; white-space: nowrap; }
.task-open { display: flex; min-width: 125px; align-items: center; justify-content: center; gap: 8px; padding: 25px; border-left: 1px solid rgba(0,53,106,.08); color: var(--azul); transition: background .2s, color .2s; }
.task-open span { font-size: .7rem; font-weight: 750; }
.task-open b { font-size: 1.3rem; transition: transform .2s; }
.task-open:hover { background: var(--azul); color: white; }
.task-open:hover b { transform: translateX(4px); }
.empty-state { padding: 70px 24px; background: white; text-align: center; box-shadow: inset 0 0 0 1px rgba(0,53,106,.1); }
.empty-symbol { display: block; margin-bottom: 8px; color: rgba(0,53,106,.14); font-family: var(--font-display); font-size: 6rem; line-height: 1; }
.empty-state h3 { margin-bottom: 10px; color: var(--azul); font-size: 1.8rem; }
.empty-state p { margin-bottom: 22px; color: rgba(18,35,58,.55); }

/* ---------- Métricas ---------- */
.stats-grid { display: grid; margin-bottom: 20px; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.stat-card { position: relative; min-height: 148px; overflow: hidden; padding: 21px; background: white; box-shadow: inset 0 0 0 1px rgba(0,53,106,.09); transition: transform .2s, box-shadow .2s; }
.stat-card::after { content: ""; position: absolute; right: -32px; bottom: -52px; width: 100px; height: 100px; border: 18px solid rgba(0,53,106,.035); transform: rotate(18deg); }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-blue); }
.stat-card span, .stat-card small { display: block; color: rgba(18,35,58,.52); font-size: .65rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.stat-card strong { display: block; margin: 7px 0 6px; color: var(--azul); font-family: var(--font-display); font-size: 2.45rem; line-height: 1; }
.stat-card small { letter-spacing: 0; text-transform: none; font-weight: 500; }
.stat-progress { box-shadow: inset 0 3px 0 var(--dorado), inset 0 0 0 1px rgba(0,53,106,.09); }
.stat-completed { box-shadow: inset 0 3px 0 var(--verde), inset 0 0 0 1px rgba(0,53,106,.09); }
.stat-overdue { box-shadow: inset 0 3px 0 var(--vino), inset 0 0 0 1px rgba(0,53,106,.09); }
.stat-overdue strong { color: var(--vino); }
.metrics-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .8fr); align-items: start; gap: 20px; }
.workload { display: grid; margin: 0; padding: 0; gap: 0; list-style: none; }
.workload li { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(0, 2fr) auto; align-items: center; gap: 16px; padding: 13px 0; border-bottom: 1px solid rgba(0,53,106,.08); }
.workload li:last-child { border-bottom: 0; }
.workload-person { display: flex; min-width: 0; align-items: center; gap: 10px; }
.workload-person > span:last-child { min-width: 0; }
.workload-person strong, .workload-person small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workload-person strong { color: var(--azul); font-size: .76rem; }
.workload-person small { margin-top: 2px; color: rgba(18,35,58,.42); font-size: .61rem; }
.workload-bar { display: flex; height: 14px; background: var(--niebla); box-shadow: inset 0 0 0 1px rgba(0,53,106,.07); }
.workload-bar span { display: block; height: 100%; transition: width .3s; }
.bar-assigned { background: var(--azul); }
.bar-progress { background: var(--dorado); }
.workload-count { min-width: 74px; text-align: right; }
.workload-count strong { display: block; color: var(--azul); font-family: var(--font-display); font-size: 1.3rem; line-height: 1; }
.workload-count small, .workload-count em { display: block; margin-top: 3px; font-size: .6rem; font-style: normal; }
.workload-count small { color: rgba(18,35,58,.4); }
.workload-count em { color: var(--vino); font-weight: 800; }
.workload-empty { color: rgba(18,35,58,.45); font-size: .76rem; }
.workload-legend { display: flex; align-items: center; gap: 7px; margin: 16px 0 0; color: rgba(18,35,58,.45); font-size: .64rem; font-weight: 650; }
.workload-legend .key { display: inline-block; width: 11px; height: 11px; }
.workload-legend .key-progress { margin-left: 10px; }
.key-assigned { background: var(--azul); }
.key-progress { background: var(--dorado); }
.attention-list { display: grid; margin: 0; padding: 0; gap: 0; list-style: none; }
.attention-list li { border-bottom: 1px solid rgba(0,53,106,.08); }
.attention-list li:last-child { border-bottom: 0; }
.attention-list a { display: block; padding: 12px 0; transition: color .2s; }
.attention-list strong { display: block; color: var(--azul); font-size: .78rem; line-height: 1.35; }
.attention-list small { display: block; margin-top: 4px; color: var(--vino); font-size: .63rem; font-weight: 700; }
.attention-list a:hover strong { color: var(--vino); }

/* ---------- Formulario de tarea ---------- */
.form-layout { display: grid; width: min(1120px, calc(100% - 56px)); margin-inline: auto; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .8fr); align-items: start; gap: 24px; }
.form-card { display: grid; padding: 34px; background: white; box-shadow: inset 0 0 0 1px rgba(0,53,106,.1), var(--shadow-blue); gap: 22px; }
.form-card-heading { display: flex; align-items: center; gap: 16px; padding-bottom: 21px; border-bottom: 1px solid rgba(0,53,106,.1); }
.form-card-heading > span { color: var(--terracota); font-family: var(--font-display); font-size: 1.75rem; font-style: italic; }
.form-card-heading h2 { margin: 0 0 4px; color: var(--azul); font-size: 1.5rem; }
.form-card-heading p { margin: 0; color: rgba(18,35,58,.48); font-size: .7rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.assignment-note { display: flex; align-items: center; gap: 13px; padding: 15px; background: var(--niebla); box-shadow: inset 3px 0 0 var(--dorado); }
.assignment-note strong { display: block; margin-bottom: 2px; color: var(--azul); font-size: .76rem; }
.assignment-note p { margin: 0; color: rgba(18,35,58,.5); font-size: .68rem; line-height: 1.5; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 5px; }
.form-help { position: sticky; top: calc(var(--topbar-height) + 24px); padding: 32px; background: var(--azul); color: white; box-shadow: 0 20px 50px rgba(0,53,106,.18); }
.form-help h2 { margin-bottom: 27px; font-size: 1.95rem; line-height: 1.05; }
.form-help h2 em { color: var(--dorado); font-weight: 500; }
.form-help ol { display: grid; margin: 0; padding: 0; gap: 23px; list-style: none; }
.form-help li { display: flex; gap: 14px; }
.form-help li > span { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; background: rgba(227,164,66,.15); color: var(--dorado); font-family: var(--font-display); }
.form-help li strong { display: block; margin-bottom: 5px; color: white; font-size: .77rem; }
.form-help li p { margin: 0; color: rgba(255,255,255,.56); font-size: .7rem; line-height: 1.55; }
.form-help-note { margin: 26px 0 0; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.14); color: rgba(255,255,255,.55); font-size: .69rem; line-height: 1.6; }
.form-help-note strong { color: var(--dorado); }

/* ---------- Detalle ---------- */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, .74fr); align-items: start; gap: 20px; }
.detail-main, .detail-sidebar { display: grid; gap: 20px; }
.description-copy { color: rgba(18,35,58,.72); line-height: 1.85; white-space: pre-line; }
.muted-copy { margin: 0; color: rgba(18,35,58,.45); font-style: italic; }
.comment-list { display: grid; gap: 5px; }
.comment { display: grid; grid-template-columns: auto 1fr; gap: 13px; padding: 17px 0; border-bottom: 1px solid rgba(0,53,106,.08); }
.comment-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 6px; }
.comment-heading strong { color: var(--azul); font-size: .77rem; }
.comment-heading time, .timeline time { color: rgba(18,35,58,.38); font-size: .62rem; }
.comment p { margin: 0; color: rgba(18,35,58,.68); font-size: .78rem; line-height: 1.7; white-space: pre-line; }
.comments-empty { display: flex; align-items: center; gap: 15px; padding: 18px; background: var(--niebla); }
.comments-empty span { color: rgba(0,53,106,.2); font-family: var(--font-display); font-size: 2.4rem; line-height: 1; }
.comments-empty p { margin: 0; color: rgba(18,35,58,.48); font-size: .73rem; }
.comment-form { display: grid; grid-template-columns: auto 1fr; gap: 13px; margin-top: 25px; padding-top: 25px; border-top: 1px solid rgba(0,53,106,.1); }
.comment-form .button { margin-top: 10px; }
.status-card { box-shadow: inset 4px 0 0 var(--dorado), inset 0 0 0 1px rgba(0,53,106,.1); }
.status-card h2 { margin: 0 0 20px; color: var(--azul); font-size: 1.9rem; }
.status-card form { display: grid; gap: 12px; }
.task-data-card dl { margin: 0; }
.task-data-card dl > div { padding: 15px 0; border-bottom: 1px solid rgba(0,53,106,.08); }
.task-data-card dl > div:first-child { padding-top: 5px; }
.task-data-card dl > div:last-child { padding-bottom: 0; border-bottom: 0; }
.task-data-card dt { margin-bottom: 6px; color: rgba(18,35,58,.4); font-size: .59rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.task-data-card dd { margin: 0; color: rgba(18,35,58,.76); font-size: .74rem; font-weight: 650; }
.task-data-card dl > div:first-child dd { display: flex; align-items: center; gap: 9px; }
.task-data-card dd small { display: block; margin-top: 2px; color: rgba(18,35,58,.4); font-size: .59rem; font-weight: 500; }
.timeline-card h2 { margin: 0 0 18px; color: var(--azul); font-size: 1.5rem; }
.timeline { display: grid; margin: 0; padding: 0; gap: 0; list-style: none; }
.timeline li { position: relative; display: grid; grid-template-columns: 11px 1fr; gap: 11px; padding-bottom: 20px; }
.timeline li:not(:last-child)::before { content: ""; position: absolute; left: 4px; top: 10px; bottom: 0; width: 1px; background: rgba(0,53,106,.14); }
.timeline li > span { z-index: 1; width: 9px; height: 9px; margin-top: 4px; background: var(--dorado); box-shadow: 0 0 0 3px white; }
.timeline p { margin: 0 0 4px; color: rgba(18,35,58,.58); font-size: .68rem; line-height: 1.55; }
.timeline p strong { color: var(--azul); }

/* ---------- Administración ---------- */
.users-table-wrap { overflow-x: auto; background: white; box-shadow: inset 0 0 0 1px rgba(0,53,106,.1); }
.users-table { width: 100%; min-width: 820px; border-collapse: collapse; text-align: left; }
.users-table thead { background: var(--azul); color: white; }
.users-table th { padding: 14px 18px; font-size: .62rem; letter-spacing: .09em; text-transform: uppercase; }
.users-table td { padding: 13px 18px; border-bottom: 1px solid rgba(0,53,106,.09); color: rgba(18,35,58,.68); font-size: .73rem; }
.users-table tbody tr { transition: background .2s; }
.users-table tbody tr:hover { background: rgba(246,248,251,.7); }
.users-table tbody tr:last-child td { border-bottom: 0; }
.users-table select { min-height: 36px; border: 0; border-radius: 0; background: var(--niebla); padding: 7px 30px 7px 10px; color: var(--azul); box-shadow: inset 0 0 0 1px rgba(0,53,106,.13); font-size: .7rem; font-weight: 700; }
.table-person { display: flex; align-items: center; gap: 11px; }
.table-person strong, .table-person small { display: block; }
.table-person strong { margin-bottom: 3px; color: var(--azul); font-size: .76rem; }
.table-person small { color: rgba(18,35,58,.42); font-size: .62rem; }
.toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle span { position: relative; width: 34px; height: 18px; background: #aab4c1; transition: background .2s; }
.toggle span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 12px; height: 12px; background: white; transition: transform .2s; }
.toggle input:checked + span { background: var(--verde); }
.toggle input:checked + span::after { transform: translateX(16px); }
.toggle input:focus-visible + span { outline: 3px solid rgba(227,164,66,.6); outline-offset: 2px; }
.toggle b { font-size: .66rem; }
.security-note { display: flex; gap: 15px; margin-top: 22px; padding: 19px; background: white; box-shadow: inset 4px 0 0 var(--azul), inset 0 0 0 1px rgba(0,53,106,.1); }
.security-note > span { color: var(--terracota); font-size: 1.25rem; }
.security-note strong { display: block; margin-bottom: 4px; color: var(--azul); font-size: .76rem; }
.security-note p { margin: 0; color: rgba(18,35,58,.5); font-size: .68rem; line-height: 1.55; }
.app-dialog { width: min(520px, calc(100% - 32px)); max-height: calc(100vh - 40px); border: 0; padding: 0; background: transparent; color: var(--tinta); }
.app-dialog::backdrop { background: rgba(0,36,63,.72); backdrop-filter: blur(5px); }
.dialog-card { display: grid; padding: 32px; background: white; box-shadow: 0 30px 80px rgba(0,0,0,.25); gap: 20px; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.dialog-heading h2 { margin: 0; color: var(--azul); font-size: 2.1rem; }
.dialog-heading button { border: 0; background: transparent; color: rgba(18,35,58,.48); font-size: 2rem; line-height: 1; }
.dialog-intro { margin: -6px 0 2px; color: rgba(18,35,58,.54); font-size: .75rem; line-height: 1.6; }

/* ---------- Error ---------- */
.error-page { position: relative; display: grid; min-height: calc(100vh - var(--topbar-height)); place-items: center; overflow: hidden; padding: 70px 24px; background: white; text-align: center; }
.error-code { position: absolute; color: rgba(0,53,106,.035); font-family: var(--font-display); font-size: min(42vw, 31rem); font-weight: 700; line-height: 1; }
.error-content { position: relative; z-index: 1; max-width: 620px; }
.error-content h1 { margin-bottom: 15px; color: var(--azul); font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1; }
.error-content > p:not(.kicker) { margin-bottom: 27px; color: rgba(18,35,58,.55); }
.plain-shell .error-page { min-height: 100vh; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .metrics-grid { grid-template-columns: 1fr; }
  .topbar-search input { width: 165px; }
}

@media (max-width: 1024px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; width: var(--sidebar-width); transform: translateX(-100%); transition: transform .25s; }
  .sidebar.open { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.4); }
  .sidebar-toggle { display: block; }
  .content-wrap { width: min(100% - 40px, 1240px); }
  .form-layout { width: min(100% - 40px, 1120px); grid-template-columns: 1fr; }
  .form-help { position: static; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-sidebar { grid-template-columns: 1fr 1fr; }
  .timeline-card { grid-column: 1 / -1; }
  .board-shell { padding: 16px 20px 18px; }
  .kanban-status-board .kanban-column, .kanban-column { flex: 1 0 278px; }
}

@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; padding: 10px 18px; }
  .topbar-title h1 { font-size: 1.25rem; }
  .topbar-actions { width: 100%; flex-wrap: wrap; }
  .topbar-actions form { width: 100%; flex-wrap: wrap; }
  .topbar-search { flex: 1; min-width: 150px; }
  .topbar-search input, .topbar-search input:focus { width: 100%; }
  .topbar-filters select { flex: 1; min-width: 130px; }
  .board-shell { height: auto; min-height: calc(100vh - var(--topbar-height)); }
  .kanban-board { flex: none; overflow-y: visible; }
  .kanban-column { max-height: none; flex: 0 0 82vw; }
  .kanban-tasks { overflow-y: visible; }
  .section-heading { align-items: start; flex-direction: column; gap: 12px; }
  .section-heading > p { text-align: left; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-card { min-height: 125px; padding: 17px; }
  .stat-card strong { font-size: 2rem; }
  .stat-total { grid-column: 1 / -1; }
  .workload li { grid-template-columns: 1fr auto; }
  .workload-bar { grid-column: 1 / -1; }
  .task-card { display: block; }
  .task-open { min-height: 50px; border-top: 1px solid rgba(0,53,106,.08); border-left: 0; }
  .task-card-main { padding: 22px 21px 20px 25px; }
  .task-facts { display: grid; gap: 10px; }
  .form-card, .panel-card { padding: 22px 20px; }
  .form-grid, .detail-sidebar { grid-template-columns: 1fr; }
  .timeline-card { grid-column: auto; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .button { width: 100%; }
  .comment-form { grid-template-columns: 1fr; }
  .comment-form > .avatar { display: none; }
  .comment-heading { align-items: start; flex-direction: column; gap: 3px; }
  .login-shell { display: block; }
  .login-brand { display: none; }
  .login-form-side { min-height: 100vh; padding: 50px 24px; }
  .login-mobile-logo { display: block; width: 68px; height: 68px; margin-bottom: 35px; }
  .dialog-card { padding: 24px 20px; }
}

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