:root {
  --bg: #f3f4f6;
  --paper: #ffffff;
  --ink: #4a4f54;
  --muted: #5c6166;
  --line: #e4e7eb;
  --blue: #004382;
  --blue-2: #003366;
  --blue-soft: #e7eef6;
  --red: #b42318;
  --red-soft: #fdecec;
  --amber: #b54708;
  --amber-soft: #fff4e5;
  --green: #0e7a45;
  --green-soft: #e8f6ee;
  --soft: #eef1f3;
  --shadow: 0 1px 2px rgba(17, 17, 17, 0.04);
  --radius: 6px;
  --ease: 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
  --cursor-grab: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='%23fff' stroke-width='4.4' d='M18 11V6a2 2 0 0 0-2-2 2 2 0 0 0-2 2M14 10V4a2 2 0 0 0-2-2 2 2 0 0 0-2 2v2M10 10.5V6a2 2 0 0 0-2-2 2 2 0 0 0-2 2v8M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15'/%3E%3Cpath stroke='%23111111' stroke-width='2.05' d='M18 11V6a2 2 0 0 0-2-2 2 2 0 0 0-2 2M14 10V4a2 2 0 0 0-2-2 2 2 0 0 0-2 2v2M10 10.5V6a2 2 0 0 0-2-2 2 2 0 0 0-2 2v8M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15'/%3E%3C/g%3E%3C/svg%3E") 14 8, grab;
  --cursor-hold: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='%23fff' stroke-width='4.4' d='M18 11.5V9a2 2 0 0 0-2-2 2 2 0 0 0-2 2v1.4M14 10V8a2 2 0 0 0-2-2 2 2 0 0 0-2 2v2M10 9.9V9a2 2 0 0 0-2-2 2 2 0 0 0-2 2v5M6 14a2 2 0 0 0-2-2 2 2 0 0 0-2 2M18 11a2 2 0 1 1 4 0v3a8 8 0 0 1-8 8h-4a8 8 0 0 1-8-8 2 2 0 1 1 4 0'/%3E%3Cpath stroke='%23111111' stroke-width='2.05' d='M18 11.5V9a2 2 0 0 0-2-2 2 2 0 0 0-2 2v1.4M14 10V8a2 2 0 0 0-2-2 2 2 0 0 0-2 2v2M10 9.9V9a2 2 0 0 0-2-2 2 2 0 0 0-2 2v5M6 14a2 2 0 0 0-2-2 2 2 0 0 0-2 2M18 11a2 2 0 1 1 4 0v3a8 8 0 0 1-8 8h-4a8 8 0 0 1-8-8 2 2 0 1 1 4 0'/%3E%3C/g%3E%3C/svg%3E") 12 10, grabbing;
  --cursor-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23111111' stroke='%23ffffff' stroke-width='1.35' stroke-linejoin='round' d='M4.2 2.2l.3 15.2 3.7-3.8 2.8 6.4 2.2-1-2.8-6.3 5.2-.15z'/%3E%3C/svg%3E") 3 2, default;
  --cursor-arrow-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffffff' stroke='%23111111' stroke-width='1.35' stroke-linejoin='round' d='M4.2 2.2l.3 15.2 3.7-3.8 2.8 6.4 2.2-1-2.8-6.3 5.2-.15z'/%3E%3C/svg%3E") 3 2, default;
}
body.is-holding, body.is-holding * { cursor: var(--cursor-hold) !important; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.45 "Segoe UI", system-ui, sans-serif;
}
b, strong { font-weight: 400; }
button, input, select, textarea { font: inherit; color: inherit; }
* { scrollbar-width: thin; scrollbar-color: #9bb0c7 transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: #9bb0c7; border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: #004382; background-clip: padding-box; }
*::-webkit-scrollbar-button,
*::-webkit-scrollbar-button:single-button,
*::-webkit-scrollbar-button:vertical:start:decrement,
*::-webkit-scrollbar-button:vertical:end:increment,
*::-webkit-scrollbar-button:vertical:start:increment,
*::-webkit-scrollbar-button:vertical:end:decrement,
*::-webkit-scrollbar-button:horizontal:start:decrement,
*::-webkit-scrollbar-button:horizontal:end:increment,
*::-webkit-scrollbar-button:horizontal:start:increment,
*::-webkit-scrollbar-button:horizontal:end:decrement {
  display: block;
  width: 0;
  height: 0;
  background: transparent;
  border: 0;
}
*::-webkit-scrollbar-corner { background: transparent; }
aside { scrollbar-color: rgba(255, 255, 255, 0.45) transparent; }
aside::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.4); }
button, .btn {
  background: var(--blue);
  color: white;
  border: 0;
  border-radius: var(--radius);
  padding: 9px 14px;
  transition: background-color var(--ease), border-color var(--ease), color var(--ease), box-shadow var(--ease);
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
}
button:hover, .btn:hover { background: var(--blue-2); }
button.ghost, .btn.ghost, .demo button {
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  font-weight: 400;
}
button.ghost:hover, .btn.ghost:hover, .demo button:hover {
  background: var(--blue-soft);
  border-color: #b7c6d9;
  color: var(--blue-2);
}
button:disabled { opacity: 0.55; cursor: default; }
a { color: var(--blue-2); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}
.login-card {
  width: min(420px, 100%);
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(22, 27, 29, 0.06);
  padding: 32px 28px 28px;
  display: grid;
  gap: 14px;
}
.login-card h1 { font-size: 26px; margin: 4px 0 0; }
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-weight: 400;
  font-size: 18px;
  letter-spacing: 0;
}
.mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--blue);
  box-shadow: inset 0 -8px 0 rgba(255, 255, 255, 0.28);
  flex: none;
}
form { display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 400; color: #3d4448; }
input, select, textarea {
  background: white;
  border: 1px solid #e3e6ea;
  border-radius: var(--radius);
  transition: border-color var(--ease), box-shadow var(--ease);
  padding: 9px 11px;
  width: 100%;
  font-weight: 400;
}
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(0, 67, 130, 0.16); }
textarea { min-height: 76px; resize: vertical; }
.form-error { color: var(--red); margin: 0; }
.demo { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 4px; }
.demo p { width: 100%; margin: 0 0 2px; color: var(--muted); font-size: 13px; font-weight: 400; }

.shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px 1fr;
  transition: grid-template-columns var(--ease);
}
.shell.is-collapsed { grid-template-columns: 72px 1fr; }
aside {
  background: #004382;
  color: white;
  padding: 16px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.side-edge {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 6;
  width: 14px;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}
.side-edge::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 3px;
  width: 3px;
  height: 44px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-50%);
  transition: height 160ms ease, background-color 160ms ease, right 160ms ease;
}
.side-edge:hover,
.side-edge:focus-visible {
  background: transparent;
  outline: none;
}
.side-edge:hover::before,
.side-edge:focus-visible::before {
  height: 64px;
  right: 2px;
  background: rgba(255, 255, 255, 0.72);
}
.shell.is-collapsed .side-edge::before {
  height: 36px;
  background: rgba(255, 255, 255, 0.42);
}
.shell.is-collapsed .side-edge:hover::before,
.shell.is-collapsed .side-edge:focus-visible::before {
  height: 56px;
  background: rgba(255, 255, 255, 0.82);
}
.side-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
aside .brand { padding: 2px 4px 0; color: white; letter-spacing: 0.16em; text-transform: uppercase; font-size: 13px; font-weight: 400; }
.brand-name,
nav a span,
.slogan {
  overflow: hidden;
  white-space: nowrap;
  max-width: 12rem;
  opacity: 1;
  transition: opacity 180ms ease, max-width var(--ease), max-height var(--ease);
}
.slogan { display: block; max-height: 3.4em; max-width: none; }
.mark { width: 28px; height: 28px; border-radius: 0; background: transparent; box-shadow: none; color: white; }
.login .mark, .login .brand { color: #004382; }
.login .brand { letter-spacing: 0.16em; text-transform: uppercase; font-size: 13px; }
.ico { width: 18px; height: 18px; flex: none; }
.fold {
  position: fixed;
  z-index: 40;
  left: 248px;
  top: 22px;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  padding: 0;
  display: grid;
  place-items: center;
  background: white;
  color: var(--blue);
  border: 1px solid #d5dde6;
  border-radius: 99px;
  box-shadow: 0 1px 4px rgba(16, 24, 32, 0.14);
  transition: left var(--ease), transform var(--ease), background-color var(--ease);
}
.shell.is-collapsed .fold { left: 72px; }
.fold svg { width: 16px; height: 16px; transition: transform var(--ease); }
.fold:hover, .shell.is-collapsed .fold:hover { background: white; color: var(--blue); }
nav { display: grid; gap: 2px; flex: 1; min-height: 0; overflow: auto; align-content: safe center; }
nav a {
  color: white;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color var(--ease), padding var(--ease);
}
nav a:hover { background: rgba(255, 255, 255, 0.1); }
nav a[aria-current="page"] { background: rgba(255, 255, 255, 0.18); }
.nav-group { display: grid; gap: 2px; margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.2); }
.nav-label {
  margin: 2px 10px 4px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.shell.is-collapsed .nav-group { margin-top: 8px; padding-top: 8px; }
.shell.is-collapsed .nav-label {
  max-width: 0;
  max-height: 0;
  margin: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}
.muted { color: var(--muted); }
.side-foot {
  margin-top: auto;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 12px 4px 2px;
  flex: none;
}
.side-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.side-social a {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: white;
  text-decoration: none;
  border-radius: 8px;
}
.side-social a:hover { background: rgba(255, 255, 255, 0.14); }
.side-social .ico { width: 18px; height: 18px; }
.slogan {
  margin: 0;
  width: 100%;
  text-align: center;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.88);
  border-top: 1px solid rgba(255, 255, 255, 0.32);
  padding-top: 10px;
  white-space: normal;
}
.shell.is-collapsed .brand-name,
.shell.is-collapsed nav a span,
.shell.is-collapsed .slogan {
  max-width: 0;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  padding-top: 0;
  border-top-width: 0;
}
.shell.is-collapsed .side-foot { gap: 8px; }
.shell.is-collapsed .side-social { flex-direction: column; gap: 6px; }
.shell.is-collapsed .side-top { flex-direction: column; align-items: center; }
.shell.is-collapsed nav a { justify-content: center; padding: 10px; }
.shell.is-collapsed .create-btn { justify-content: center; padding: 10px; }
.shell.is-collapsed .create-btn span {
  max-width: 0;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}
.create-slot { display: block; }
nav .create-btn, nav .create-btn:hover {
  width: 100%;
  height: auto;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: white;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 400;
  text-align: left;
}
nav .create-btn:hover,
.create-slot.is-open .create-btn { background: rgba(255, 255, 255, 0.18); }
nav .create-btn .ph {
  font-size: 18px;
  width: 17px;
  height: 17px;
  line-height: 1;
  display: grid;
  place-items: center;
  flex: none;
  transform: translateY(-1px);
}
aside .ico { width: 17px; height: 17px; }
.create-menu {
  position: fixed;
  z-index: 60;
  display: flex;
  gap: 2px;
  background: white;
  color: #004382;
  border: 1px solid #e7edf2;
  border-radius: 12px;
  padding: 4px;
  box-shadow: 0 8px 24px rgba(16, 24, 32, 0.14);
}
.create-menu button, .create-menu button:hover {
  background: transparent;
  color: #004382;
  border: 0;
  border-radius: 8px;
  min-width: 72px;
  padding: 4px 8px 3px;
  display: grid;
  justify-items: center;
  gap: 1px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.15;
}
.create-menu button:hover { background: #e7eef6; }
.create-menu .ph { font-size: 18px; line-height: 1; color: #004382; }
.create-menu { transform-origin: left center; }
.create-menu.is-in { animation: create-open 280ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.create-menu.is-drop.is-in { animation-name: create-open-drop; }
.create-menu.is-in button { animation: create-item 260ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.create-menu.is-in button:nth-child(2) { animation-delay: 45ms; }
.create-menu.is-in button:nth-child(3) { animation-delay: 90ms; }
.create-menu.is-in button:nth-child(4) { animation-delay: 135ms; }
@keyframes create-open {
  from { opacity: 0; transform: translateY(-50%) translateX(-14px) scale(0.96); }
  to { opacity: 1; transform: translateY(-50%) scale(1); }
}
@keyframes create-open-drop {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
@keyframes create-item {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.main { min-width: 0; padding: 28px 32px 72px; }
.main.is-leaving {
  opacity: 0.28;
  pointer-events: none;
  transition: opacity 160ms ease;
}
.main.is-entering { animation: view-in 240ms cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes view-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .main.is-leaving { transition: none; }
  .main.is-entering { animation: none; }
}
.top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.top-main { min-width: 0; flex: 1; }
.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
}
.top-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}
.proj-meta {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}
.proj-context {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.proj-context a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}
.proj-context a:hover { text-decoration: underline; }
.proj-context-dot {
  width: 3px;
  height: 3px;
  margin: 0 8px;
  border-radius: 50%;
  background: #9aa6b2;
  flex: 0 0 auto;
}
.plazo-line { margin: 2px 0 0; font-size: 13px; }
dialog.modal.is-menu-open { overflow: visible; }
dialog.modal.is-date-open {
  /* Keep scroll clipping so the form does not spill; calendar is placed inside the visible box. */
  overflow: auto;
}
dialog.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: white;
  color: var(--ink);
  box-shadow: 0 24px 64px rgba(17, 17, 17, 0.16);
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  transition: opacity 220ms ease, transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
dialog.modal[open] { animation: modal-in 240ms cubic-bezier(0.2, 0.8, 0.2, 1); }
dialog.modal[open].is-closing {
  animation: none;
  opacity: 0;
  transform: translate(-50%, -48%) scale(0.98);
}
@keyframes modal-in {
  from { opacity: 0; transform: translate(-50%, -48%) scale(0.98); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
dialog.modal::backdrop {
  background: rgba(17, 17, 17, 0.22);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: opacity 220ms ease;
}
dialog.modal[open]::backdrop { animation: fade-in 220ms ease; }
dialog.modal[open].is-closing::backdrop { animation: none; opacity: 0; }
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
dialog.modal form, dialog.modal .modal-sheet, dialog.modal .bitacora-view, dialog.modal .bitacora-list { padding: 22px 22px 18px; }
dialog.modal.is-wide { width: min(720px, calc(100vw - 32px)); }
dialog.modal.is-worker-sheet {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  padding: 0;
  overflow: hidden;
}
dialog.modal.is-worker-sheet .modal-sheet {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 40px);
  padding: 0 18px 16px;
  overflow: hidden;
}
dialog.modal.is-worker-sheet .modal-head {
  margin: 0 -18px 12px;
  flex: none;
}
.worker-sheet-body {
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  padding-bottom: 4px;
}
.worker-sheet-body.is-loading { opacity: 0.6; }
.person-board.is-sheet {
  display: grid;
  gap: 10px;
}
.person-board.is-sheet .person-tabs { position: static; }
.person-board.is-sheet .person-panels {
  max-height: none;
}
.person-board.is-sheet .person-panel {
  max-height: min(42vh, 420px);
}
dialog.modal.is-cost { width: min(1180px, calc(100vw - 32px)); }
dialog.modal.is-cost .cost-who { margin: -4px 0 14px; color: var(--muted); font-size: 13px; }
dialog.modal.is-cost .book-wrap.is-costos,
dialog.modal.is-cost .book-wrap.is-costos table { width: 100%; max-width: 100%; min-width: 0; }
dialog.modal.is-cost .modal-head {
  display: block;
  margin-bottom: 18px;
  padding: 16px 18px 18px;
  background:
    radial-gradient(90% 80% at 100% 0%, rgba(232, 201, 138, 0.22), transparent 46%),
    linear-gradient(165deg, #00356a 0%, #004382 52%, #0b5698 100%);
}
dialog.modal.is-cost .cost-head-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
dialog.modal.is-cost .cost-head-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
}
dialog.modal.is-cost .cost-head-price > b {
  color: white;
  font-size: 32px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.cost-due-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #e7f6ee;
  font-size: 13px;
  white-space: nowrap;
}
.cost-due-chip b { color: inherit; font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }
.cost-due-chip.is-open {
  border-color: rgba(232, 201, 138, 0.7);
  background: rgba(232, 201, 138, 0.16);
  color: #ffe6c2;
}
.cost-head-who { margin: 8px 0 0; color: #d7e6f5; font-size: 13px; }
.cost-head-rule {
  height: 1px;
  margin: 14px 0 12px;
  background: linear-gradient(90deg, #e8c98a, rgba(232, 201, 138, 0));
  transform-origin: left center;
  animation: cost-rule 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}
.cost-head-flow { display: flex; align-items: flex-end; gap: 22px; }
.cost-head-flow p { display: grid; gap: 2px; margin: 0; }
.cost-head-flow span { color: #d7e6f5; font-size: 12px; }
.cost-head-flow b { color: white; font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.cost-head-flow .is-paid b { color: #c8f3dc; }
.cost-meter {
  flex: 1;
  height: 6px;
  margin-bottom: 5px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 99px;
  overflow: hidden;
}
.cost-meter i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #e8c98a, #fff4d8);
  border-radius: 99px;
  transition: width 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}
.cost-head-igv {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 14px 0 0;
  color: #d7e6f5;
  font-size: 13px;
}
.cost-head-igv b { color: white; font-weight: 650; font-variant-numeric: tabular-nums; }
.cost-head-igv i { color: #e8c98a; font-style: normal; }
.cost-igv-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin-left: auto;
  padding: 6px 12px;
  background: #f3e0c0;
  color: #5c3b12;
  border-radius: 999px;
  font-size: 13px;
}
.cost-igv-pill b { color: #5c3b12; font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.cost-igv-pill.is-credit { background: #d9f5e6; color: #0e7a45; }
.cost-igv-pill.is-credit b { color: #0e7a45; }
@keyframes cost-rule { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) {
  .cost-head-rule { animation: none; }
  .cost-meter i { transition: none; }
}
.cost-composer-grid .cost-igv-field input {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  padding-left: 0;
  color: #16324f;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.tax-board { display: grid; gap: 10px; margin: 0 0 16px; }
.tax-months { display: flex; flex-wrap: wrap; gap: 6px; }
.tax-months button {
  min-width: 44px;
  min-height: 32px;
  padding: 4px 8px;
  background: white;
  color: #004382;
  border: 1px solid #d3e0ec;
  border-radius: 6px;
  font-size: 12px;
}
.tax-months button.is-on,
.tax-months button.is-on:hover { background: #004382; color: white; border-color: #004382; }
.tax-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: #eef3f8;
  border: 1px solid #d3e0ec;
  border-radius: 6px;
  overflow: hidden;
}
.tax-cards article {
  display: grid;
  gap: 4px;
  align-content: start;
  min-width: 0;
  padding: 12px 14px;
}
.tax-cards article + article { border-left: 1px solid #d3e0ec; }
.tax-cards span,
.tax-cards em { color: #004382; font-size: 12px; font-style: normal; font-weight: 400; }
.tax-cards b { color: #16324f; font-size: 18px; font-weight: 400; font-variant-numeric: tabular-nums; }
.tax-cards small { color: #5c6b7a; font-size: 12px; line-height: 1.35; }
.book-table th.is-tax-month,
.book-table td.is-tax-month { box-shadow: inset 0 -2px 0 #004382; }
@media (max-width: 900px) {
  .tax-cards { grid-template-columns: 1fr 1fr; }
  .tax-cards article:nth-child(odd) { border-left: 0; }
  .tax-cards article:nth-child(n + 3) { border-top: 1px solid #d3e0ec; }
}
.cost-composer { margin: 0; padding: 0; background: white; border: 1px solid #e1e8f0; border-radius: 8px; overflow: hidden; }
.cost-composer h2 {
  margin: 0;
  padding: 12px 16px;
  background: white;
  color: #16324f;
  border-bottom: 1px solid #e8eef4;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}
.cost-composer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(108px, 0.7fr) minmax(0, 1fr) minmax(100px, 0.6fr);
  gap: 10px 12px;
  align-items: end;
}
.cost-composer-grid .span-2 { grid-column: span 2; }
.cost-composer-grid > label {
  display: grid;
  gap: 4px;
  margin: 0;
  min-width: 0;
  color: #5c6e80;
  font-size: 12px;
  font-weight: 650;
}
.cost-composer-grid input:not([type="file"]):not([type="hidden"]) {
  width: 100%;
  min-width: 0;
  background: white;
}
.cost-composer-grid .pick,
.cost-composer-grid .lark-date { width: 100%; min-width: 0; }
.cost-composer-grid .lark-date { display: flex; }
.cost-composer-grid > label.cost-rubro-new[hidden] { display: none; }
.cost-composer-grid > label.file-pick {
  gap: 2px;
  padding: 12px 14px;
  color: #004382;
  font-weight: 400;
}
.cost-composer-grid > label.file-pick .file-face { font-size: 14px; font-weight: 650; }
.cost-composer-grid > label.file-pick small { font-size: 12px; }
.cost-boleta-view.is-pdf { color: #004382; font-size: 10px; font-weight: 650; letter-spacing: 0.04em; }
.cost-composer-grid .cost-boleta {
  width: auto;
  min-height: 34px;
  justify-content: flex-start;
  padding: 0 12px;
  border-style: solid;
  background: white;
}
.cost-composer-grid button[type="submit"] { min-width: 128px; min-height: 38px; }
.cost-composer-actions { display: flex; justify-content: flex-end; gap: 8px; }
.cost-pop .cost-empty { margin: 0; padding: 18px 4px 6px; }
.cost-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}
.cost-split .cost-composer-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  padding: 14px 16px 16px;
  background: white;
}
.cost-split .cost-composer-grid .span-2 { grid-column: 1 / -1; }
.cost-split .cost-composer-actions { grid-column: 1 / -1; }
.cost-added {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;
  background: white;
  border: 1px solid #e1e8f0;
  border-radius: 8px;
  overflow: hidden;
}
.cost-added .cost-block-head {
  margin: 0;
  min-height: 46px;
  padding: 8px 12px 8px 16px;
  background: white;
  border-bottom: 1px solid #e8eef4;
}
.cost-added .cost-block-head h2 {
  margin: 0;
  color: #16324f;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}
.cost-added .cost-block-head .lark-search { width: min(240px, 62%); min-height: 30px; background: #f7f9fb; }
.cost-added-cols {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 70px 7px 14px;
  background: #e8f0f8;
  color: #004382;
  font-size: 12px;
}
.cost-added-cols span:last-child { text-align: right; }
.cost-added-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  max-height: min(52vh, 480px);
  overflow: auto;
  padding-right: 2px;
}
.cost-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: white;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}
.cost-item:nth-child(even) { background: #f7fafc; }
.cost-item:not(:has(.cost-boleta-view)) { grid-template-columns: minmax(0, 1fr) auto; }
.cost-item.is-editing { background: transparent; box-shadow: inset 2px 0 0 #004382; padding-left: 8px; }
.cost-item-main { display: grid; gap: 2px; min-width: 0; }
.cost-item-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-width: 0; }
.cost-item-main strong {
  color: #243038;
  font-size: 14px;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cost-item-amount { color: #004382; font-size: 14px; font-weight: 400; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cost-item-sub { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; color: var(--muted); font-size: 12px; }
.cost-item-sub .is-paid { color: #0e7a45; }
.cost-item-sub .is-wait { color: #7a3e08; }
.cost-item-note { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cost-item-tools { display: flex; align-items: center; }
.cost-thumb-empty {
  width: 36px;
  height: 36px;
  border: 1px dashed #b7c6d9;
  border-radius: 6px;
  background: white;
}
.cost-pencil {
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 0;
  color: #004382;
  cursor: pointer;
  border-radius: 99px;
}
.cost-pencil:hover { background: var(--blue-soft); }
.cost-pencil input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.cost-pencil svg { width: 15px; height: 15px; pointer-events: none; }
@media (max-width: 860px) {
  dialog.modal.is-cost .cost-head-price,
  dialog.modal.is-cost .cost-head-flow,
  dialog.modal.is-cost .cost-head-igv { flex-wrap: wrap; }
  .cost-igv-pill { margin-left: 0; }
  .cost-split { grid-template-columns: 1fr; }
  .cost-added { padding: 0; border-left: 1px solid #d3e0ec; border-top: 0; }
  .cost-composer-grid { grid-template-columns: 1fr 1fr; }
  .cost-composer-grid .span-2,
  .cost-composer-actions { grid-column: 1 / -1; }
  .cost-added-list { max-height: 360px; }
}
dialog.modal .modal-sheet form { padding: 0; margin: 0; background: transparent; border: 0; box-shadow: none; }
dialog.modal.is-cost .cost-composer {
  display: block;
  margin: 0;
  padding: 0;
  background: white;
  border: 1px solid #d3e0ec;
  border-radius: 6px;
  box-shadow: none;
  overflow: hidden;
}
@media (max-width: 860px) {
  dialog.modal.is-cost .cost-composer { padding-right: 0; }
}
dialog.modal.is-narrow { width: min(420px, calc(100vw - 32px)); }
.project-menu { min-width: 220px; }
.project-menu [data-action="edit-rating"].is-on { background: #f0f5fa; }
.project-rate-panel {
  display: grid;
  gap: 10px;
  margin: 4px 2px 2px;
  padding: 12px 12px 10px;
  border-top: 1px solid var(--line);
  background: white;
  border-radius: 0 0 6px 6px;
}
.project-rate-panel[hidden] { display: none !important; }
.project-rate-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.project-rate-panel small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}
.project-rate-panel .rating { flex-wrap: wrap; }
.project-menu:has(.project-rate-panel:not([hidden])) { min-width: 300px; }
/* Con la calificación abierta el menú necesita más alto que los 280 px habituales. */
.row-menu.project-menu.is-floating:has(.project-rate-panel:not([hidden])) { max-height: min(480px, calc(100vh - 24px)); }

/* Cabecera: título y pregunta a la izquierda, nota grande con su palabra a la derecha. */
.project-rate-panel .rate-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.project-rate-panel .rate-ask { margin: 3px 0 0; font-size: 13px; line-height: 1.35; color: var(--ink, #1d2939); }
.project-rate-panel .rate-badge {
  flex: none;
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  justify-items: end;
  column-gap: 1px;
  text-align: right;
  line-height: 1;
}
.project-rate-panel .rate-badge b { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.project-rate-panel .rate-badge small { font-size: 12px; font-weight: 600; color: var(--muted); }
.project-rate-panel .rate-badge em {
  grid-column: 1 / -1;
  margin-top: 4px;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.project-rate-panel .rate-badge.is-low b, .project-rate-panel .rate-badge.is-low em { color: #b42318; }
.project-rate-panel .rate-badge.is-mid b, .project-rate-panel .rate-badge.is-mid em { color: #b54708; }
.project-rate-panel .rate-badge.is-high b, .project-rate-panel .rate-badge.is-high em { color: #0e7a45; }
.project-rate-panel .rate-badge.is-none em { color: var(--muted); text-transform: none; font-size: 12px; font-weight: 500; margin-top: 2px; }

/* Barra segmentada 1-10. Gana a «.row-menu button» (que estira los botones a todo el ancho). */
.project-rate-panel .rate-scale {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 3px;
}
.row-menu .project-rate-panel .rate-scale button.rate-cell,
.row-menu .project-rate-panel .rate-scale button.rate-cell:hover {
  --tone: #98a2b3;
  width: auto;
  display: grid;
  place-items: center;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: #eef1f5;
  color: #667085;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
  transition: background-color 120ms ease, color 120ms ease, transform 120ms ease;
}
.row-menu .project-rate-panel .rate-scale button.rate-cell:first-child { border-radius: 8px 4px 4px 8px; }
.row-menu .project-rate-panel .rate-scale button.rate-cell:last-child { border-radius: 4px 8px 8px 4px; }
/* Tramos: el color depende de la nota (no de la celda), así toda la barra llena comparte color. */
.row-menu .project-rate-panel .rate-scale button.rate-cell.is-low { --tone: #b42318; }
.row-menu .project-rate-panel .rate-scale button.rate-cell.is-mid { --tone: #b54708; }
.row-menu .project-rate-panel .rate-scale button.rate-cell.is-high { --tone: #0e7a45; }
.row-menu .project-rate-panel .rate-scale button.rate-cell.is-fill {
  background: color-mix(in srgb, var(--tone) 22%, white);
  color: var(--tone);
}
.row-menu .project-rate-panel .rate-scale button.rate-cell.is-on {
  background: var(--tone);
  color: white;
  font-weight: 700;
}
/* Vista previa al pasar el mouse: se llena hasta la celda señalada con el color de ese tramo. */
@media (hover: hover) {
  .row-menu .project-rate-panel .rate-scale:hover button.rate-cell {
    background: #dfe4ea;
    color: #344054;
  }
  .row-menu .project-rate-panel .rate-scale:hover button.rate-cell:hover ~ button.rate-cell {
    background: #eef1f5;
    color: #98a2b3;
  }
  .row-menu .project-rate-panel .rate-scale button.rate-cell:hover {
    transform: translateY(-1px);
  }
  .row-menu .project-rate-panel .rate-scale:hover button.rate-cell[data-tone="is-low"]:hover { background: #b42318; color: white; }
  .row-menu .project-rate-panel .rate-scale:hover button.rate-cell[data-tone="is-mid"]:hover { background: #b54708; color: white; }
  .row-menu .project-rate-panel .rate-scale:hover button.rate-cell[data-tone="is-high"]:hover { background: #0e7a45; color: white; }
}
.project-rate-panel .rate-ends {
  display: flex;
  justify-content: space-between;
  margin-top: -4px;
  font-size: 11px;
  color: var(--muted);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #004382;
  color: white;
  margin: -22px -22px 16px;
  padding: 8px 14px;
  min-height: 0;
  border-radius: var(--radius) var(--radius) 0 0;
}
.modal-head h2 {
  margin: 0;
  color: white;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.2;
}
.modal-head .icon-btn {
  width: 28px;
  height: 28px;
}
.modal-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.modal-head .icon-btn, .modal-head .icon-btn:hover { background: transparent; color: white; border: 0; }
.modal-head .pay-pdf,
.modal-head .pay-pdf:hover {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  box-shadow: none;
  white-space: nowrap;
}
.modal-head .pay-pdf:hover { background: rgba(255, 255, 255, 0.2); }
.modal-head .pay-pdf .ico { width: 16px; height: 16px; }
label { color: #004382; font-weight: 400; }
label.check-line { display: flex; align-items: center; gap: 8px; color: var(--ink); }
label.check-line input { width: auto; }
label input, label textarea, label select, label .pick-btn, label .pick-btn:hover { color: var(--ink); font-weight: 400; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.icon-btn { width: 32px; height: 32px; padding: 0; display: grid; place-items: center; }
h1, h2, h3 { font-weight: 400; letter-spacing: 0; }
h1 { font-size: 28px; margin: 0 0 4px; font-weight: 400; letter-spacing: 0; }
.title-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 4px; }
.title-line h1 { margin: 0; }
.phase-tag {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 99px;
  background: #e8f1fb;
  color: #004382;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}
.phase-tag.is-ejecucion { background: #004382; color: white; }
.phase-tag.is-cerrado { background: #eef1f4; color: #5c6570; }
.phase-tag.is-entregado { background: #e8f6ee; color: #0e7a45; }
.phase-tag.is-rescindido { background: #fdecec; color: #b42318; }
.phase-tag.is-pausado { background: #fff4e8; color: #b54708; }
.proj-status { position: relative; display: inline-flex; }
.proj-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px 0 10px;
  border: 0;
  border-radius: 99px;
  background: #e8f6ee;
  color: #0e7a45;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
}
.proj-status-tag:hover { filter: brightness(0.98); }
.proj-status-tag:disabled,
span.proj-status-tag { cursor: default; }
.proj-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: currentColor;
  flex: none;
  box-shadow: 0 0 0 0 currentColor;
}
.proj-status-tag.is-activo {
  background: #e8f6ee;
  color: #0e7a45;
}
.proj-status-tag.is-activo .proj-status-dot {
  background: #16a34a;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.55);
  animation: proj-status-pulse 1.8s ease-out infinite;
}
.proj-status-tag.is-pausado { background: #fff4e8; color: #b54708; }
.proj-status-tag.is-pausado .proj-status-dot { background: #f79009; }
.proj-status-tag.is-suspendido { background: #f3eefc; color: #6941c6; }
.proj-status-tag.is-suspendido .proj-status-dot { background: #7a5af8; }
.proj-status-tag.is-entregado { background: #e8f1fb; color: #004382; }
.proj-status-tag.is-entregado .proj-status-dot { background: #004382; }
.proj-status-tag.is-cancelado { background: #fdecec; color: #b42318; }
.proj-status-tag.is-cancelado .proj-status-dot { background: #d92d20; }
@keyframes proj-status-pulse {
  0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}
.proj-status-menu {
  position: absolute;
  z-index: 40;
  min-width: 220px;
  padding: 6px;
  background: white;
  border: 1px solid #d7e2ec;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 67, 130, 0.14);
}
.proj-status-menu.is-floating,
.proj-status-menu:popover-open {
  position: fixed;
  inset: auto;
  margin: 0;
  display: grid;
  gap: 2px;
}
.proj-status-opts { display: grid; gap: 2px; }
.proj-status-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 400;
  text-align: left;
  box-shadow: none;
}
.proj-status-opt .proj-status-dot { width: 8px; height: 8px; }
.proj-status-opt.is-activo .proj-status-dot { background: #16a34a; }
.proj-status-opt.is-pausado .proj-status-dot { background: #f79009; }
.proj-status-opt.is-suspendido .proj-status-dot { background: #7a5af8; }
.proj-status-opt.is-entregado .proj-status-dot { background: #004382; }
.proj-status-opt.is-cancelado .proj-status-dot { background: #d92d20; }
.proj-status-opt:hover { background: #f5f8fb; }
.proj-status-opt.is-on { background: #f0f5fa; font-weight: 550; }
.proj-status-opt .tick { margin-left: auto; width: 16px; height: 16px; color: #004382; }
.proj-status-note {
  display: grid;
  gap: 10px;
  padding: 8px 4px 4px;
}
.proj-status-note[hidden] { display: none !important; }
.proj-status-note label {
  display: grid;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.proj-status-note textarea {
  width: 100%;
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid #d7e2ec;
  border-radius: 10px;
  resize: vertical;
  font: inherit;
  color: var(--ink);
  background: #fbfcfd;
}
.proj-status-note textarea:focus {
  outline: none;
  border-color: #004382;
  background: white;
}
.proj-status-note-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.proj-status-note-actions .ghost {
  padding: 7px 12px;
  font-size: 13px;
}
.proj-status-note-actions button:not(.ghost) {
  padding: 7px 14px;
  font-size: 13px;
}
.status-form { display: grid; gap: 12px; }
.close-fields { display: grid; gap: 12px; padding: 12px; background: #f7f9fb; border: 1px solid var(--line); border-radius: var(--radius); }
.archive-table td small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.archive-table td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.archive-motivo summary {
  cursor: pointer;
  color: #004382;
  list-style: none;
}
.archive-motivo summary::-webkit-details-marker { display: none; }
.archive-motivo p {
  margin: 8px 0 0;
  padding: 8px 10px;
  background: #f7f9fb;
  border-radius: var(--radius);
  white-space: pre-wrap;
}
.log-filters { align-items: center; }
.log-filters .lark-search { flex: 1 1 280px; min-width: 220px; max-width: 420px; }
.logs-table { min-width: 0; }
.logs-table td:nth-child(2) { width: 22%; }
.logs-table td:nth-child(4),
.logs-table td:nth-child(5) { width: 1%; white-space: nowrap; }
.log-switch {
  display: inline-flex;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.log-switch button, .log-switch button:hover {
  margin: 0;
  padding: 8px 14px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: white;
  color: var(--ink);
  box-shadow: none;
  cursor: pointer;
}
.log-switch button:last-child { border-right: 0; }
.log-switch button:hover { background: #f7f9fb; }
.log-switch button.is-on, .log-switch button.is-on:hover {
  background: #004382;
  color: white;
}
.logs-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.logs-flow button, .logs-flow button:hover {
  margin: 0;
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
}
.logs-flow button.is-on, .logs-flow button.is-on:hover {
  border-color: #004382;
  box-shadow: 0 0 0 3px rgba(0, 67, 130, 0.12);
}
.logs-flow b {
  display: block;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.logs-flow span { color: var(--muted); font-size: 13px; font-weight: 400; }
.logs-table td small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; font-weight: 400; }
.logs-table .log-when { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--muted); width: 64px; }
.logs-table .log-what a { color: #004382; text-decoration: none; }
.logs-table .log-what a:hover { text-decoration: underline; }
.logs-table tr.log-day td {
  background: #f4f7fb;
  color: #004382;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 8px 12px;
}
h2 { font-size: 18px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 0; }

.questions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.q {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
}
.q h3 { color: var(--muted); font-weight: 400; }
.answer { margin: 8px 0 0; font-size: 26px; letter-spacing: 0; font-variant-numeric: tabular-nums; font-weight: 400; }
.answer.small { font-size: 18px; }
.q .muted { margin: 4px 0 0; font-size: 13px; }
.panel, .card, .money, .note, .work article {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.note {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  background: var(--blue-soft);
  border-color: #b7c6d9;
}
.note p { margin: 0; }
.alerts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.alerts a { color: inherit; text-decoration: none; font-weight: 400; }
.alerts li { padding: 10px 12px; border-radius: var(--radius); background: var(--amber-soft); color: #7a3e08; }
.alerts li.late { background: var(--red-soft); color: var(--red); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.ads-block { margin: 8px 0 28px; }
.ads-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: flex-end; }
.ads-top h2 { margin: 0 0 4px; }
.ads-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ads-tools .btn-primary { background: #b54708; color: white; border: 0; border-radius: 8px; padding: 9px 14px; font: inherit; cursor: pointer; }
.ads-range { position: relative; }
.ads-range-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 15.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  background: white;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.ads-range-btn span { flex: 1; text-align: left; white-space: nowrap; }
.ads-range-btn svg { width: 16px; height: 16px; color: var(--blue); flex: none; }
.ads-range-btn.is-on, .ads-range-btn:hover { border-color: #9eb6d1; }
.ads-range-pop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  width: min(36rem, calc(100vw - 2rem));
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(16, 35, 63, 0.16);
  padding: 12px;
}
.ads-range-summary {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
  padding: 0 4px;
}
.ads-range-months {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.ads-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
}
.ads-cal-head button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.ads-cal-head button:hover { background: #f1f5f9; }
.ads-cal-head svg { width: 18px; height: 18px; }
.ads-cal-spacer { width: 32px; height: 32px; }
.ads-cal-title { display: grid; justify-items: center; gap: 0; line-height: 1.15; }
.ads-cal-title strong { font-size: 14px; color: var(--ink); }
.ads-cal-title span { font-size: 12px; color: var(--muted); }
.ads-cal-week, .ads-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.ads-cal-week span {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  padding: 4px 0;
}
.ads-cal-empty { min-height: 34px; }
.ads-cal-day {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.ads-cal-day:hover { background: #eef4fb; }
.ads-cal-day.is-today { box-shadow: inset 0 0 0 1px #9eb6d1; }
.ads-cal-day.is-in { background: #e8f0f8; border-radius: 0; }
.ads-cal-day.is-start,
.ads-cal-day.is-end {
  background: #004382;
  color: white;
  border-radius: 8px;
}
.ads-cal-day.is-start.is-in { border-radius: 8px 0 0 8px; }
.ads-cal-day.is-end.is-in { border-radius: 0 8px 8px 0; }
.ads-cal-day.is-start.is-end { border-radius: 8px; }
.ads-range-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.ads-range-foot .ghost {
  border: 0;
  background: transparent;
  color: var(--blue);
  font: inherit;
  cursor: pointer;
  padding: 8px 4px;
}
.ads-range-foot .btn-primary:disabled { opacity: 0.45; cursor: default; }
@media (max-width: 720px) {
  .ads-range-months { grid-template-columns: 1fr; }
  .ads-range-pop { right: auto; left: 0; width: min(20rem, calc(100vw - 2rem)); }
}
.ads-kpi-cost b { color: #b54708; }
.ads-chart-card, .ads-leads { margin-top: 12px; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.ads-chart-head, .ads-leads-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.ads-chart-head h3, .ads-leads-head h3 { margin: 0; font-size: 16px; }
.ads-chart-wrap { position: relative; margin-top: 8px; }
.ads-chart-card svg { width: 100%; height: auto; display: block; }
.ads-grid { stroke: #e8eef5; stroke-width: 1; }
.ads-line {
  stroke-width: 1.25;
  stroke-linejoin: round;
  stroke-linecap: round;
  fill: none;
  vector-effect: non-scaling-stroke;
  opacity: 0;
  animation: adsFadeIn 520ms ease forwards;
}
.ads-line-spend { stroke: #004382; }
.ads-line-leads { stroke: #b54708; animation-delay: 80ms; }
.ads-area { opacity: 0; animation: adsAreaIn 620ms ease forwards; }
.ads-area-leads { animation-delay: 80ms; }
.ads-dot {
  fill: #fff;
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
  opacity: 0;
  animation: adsFadeIn 520ms ease forwards;
  transition: r 160ms ease, stroke-width 160ms ease, filter 160ms ease;
}
.ads-dot-spend { stroke: #004382; }
.ads-dot-leads { stroke: #b54708; }
.ads-dot.is-on { r: 4.5; stroke-width: 1.6; filter: drop-shadow(0 0 4px rgba(16, 35, 63, 0.2)); }
.ads-chart-wrap.is-tip .ads-line { opacity: 0.5; }
.ads-chart-wrap.is-tip .ads-area { opacity: 0.4; }
.ads-hit { cursor: pointer; }
.ads-tip { position: absolute; z-index: 4; pointer-events: none; display: grid; gap: 3px; min-width: 8.5rem; padding: 8px 10px; border-radius: 8px; background: #10233f; color: white; font-size: 12px; line-height: 1.35; box-shadow: 0 10px 28px rgba(16, 35, 63, 0.22); transform: translateY(4px); opacity: 0; transition: opacity 140ms ease, transform 140ms ease; }
.ads-tip:not([hidden]) { opacity: 1; transform: translateY(0); }
.ads-tip[hidden] { display: none; }
.ads-tip strong { font-size: 12px; }
.ads-tip span { display: flex; align-items: center; gap: 6px; }
.ads-tip i { width: 12px; height: 3px; border-radius: 2px; background: #7eb6e8; display: inline-block; }
.ads-tip i.is-leads { background: #f0a06a; }
@keyframes adsFadeIn {
  to { opacity: 1; }
}
@keyframes adsAreaIn {
  to { opacity: 1; }
}
.ads-key { display: inline-flex; align-items: center; gap: 6px; margin-left: 14px; font-size: 12px; color: var(--muted); }
.ads-key i { width: 16px; height: 2px; border-radius: 1px; display: inline-block; background: #004382; }
.ads-key.is-leads i { background: #b54708; }
.ads-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.ads-chips button { border: 1px solid var(--line); background: white; color: var(--ink); border-radius: 999px; padding: 6px 12px; font: inherit; cursor: pointer; }
.ads-chips button:hover { background: var(--blue-soft); color: var(--blue); border-color: #c9d6e4; }
.ads-chips button.is-on, .ads-chips button.is-on:hover { background: #004382; color: white; border-color: #004382; }
.ads-leads input[type="search"] { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; margin-bottom: 12px; }
.ads-split { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 12px; align-items: start; }
.ads-leads-table { width: 100%; min-width: 0; }
.ads-leads-table a { color: #0e7a45; font-weight: 600; text-decoration: none; }
.ads-leads-table tbody tr { cursor: default; }
.ads-leads-table tbody tr.is-on td { background: #fff4e5; }
.ads-detail { background: #f7f9fb; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.ads-detail h3 { margin: 4px 0 10px; }
.ads-detail dl { display: grid; gap: 8px; margin: 12px 0; }
.ads-detail dt { color: var(--muted); font-size: 12px; }
.ads-detail dd { margin: 0; }
.ads-wa { display: inline-block; background: #0e7a45; color: white; text-decoration: none; border-radius: 8px; padding: 8px 10px; font-size: 14px; }
@media (max-width: 900px) { .ads-split { grid-template-columns: 1fr; } }
table.ads-spend { min-width: 0; }
table.ads-spend th:first-child,
table.ads-spend td:first-child { text-align: left; }
table.ads-spend th:last-child,
table.ads-spend td:last-child { text-align: right; width: 9rem; }
.card, .job, .flow div, .q, .step { transition: border-color var(--ease), box-shadow var(--ease), background-color var(--ease); }
.card { display: block; color: inherit; text-decoration: none; }
.card:hover { border-color: #b7c6d9; }
.metrics { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.metrics b { font-variant-numeric: tabular-nums; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 9px 0 7px;
  border: 1px solid #d5dde6;
  border-radius: 4px;
  background: #fff;
  color: #3d4448;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}
.pill .ph {
  font-size: 12px;
  line-height: 1;
  flex: none;
  opacity: 0.92;
}
.pill.late {
  color: #9f1d14;
  border-color: #d9aaa6;
  background: #fff;
}
.pill.soon {
  color: #8a3a0a;
  border-color: #d7b895;
  background: #fff;
}
.pill.ontrack,
.pill.ok {
  color: #0b6b3c;
  border-color: #a9d0ba;
  background: #fff;
}
.pill.hold {
  color: #5c6570;
  border-color: #d5dae0;
  background: #fff;
}
.pill.wait {
  color: #004382;
  border-color: #a9c0d8;
  background: #fff;
}
.alerts li.wait { background: #e8f1fb; color: #185a9d; }

.flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 8px; }
.flow div { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.flow b { display: block; font-size: 28px; letter-spacing: 0; line-height: 1.1; }
.flow span { color: var(--muted); font-size: 13px; font-weight: 400; }
.flow .warn b { color: var(--red); }
.jobs { display: grid; gap: 8px; }
.job {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(180px, 1.3fr) auto;
  gap: 12px;
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
}
.job:hover { border-color: #b7c6d9; }
.job strong, .job-now b, .job-now .why { display: block; }
.job-now .why { color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 2px; }
.kicker { display: block; font-size: 15px; font-weight: 400; letter-spacing: 0; color: var(--blue); }
.job-now .kicker { text-transform: none; letter-spacing: 0.01em; font-size: 12px; }
.job-side { display: grid; justify-items: end; gap: 4px; }
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.lane { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; min-width: 0; }
.lane header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin: -12px -12px 12px;
  padding: 10px 12px;
  background: var(--blue);
  color: white;
  border-radius: var(--radius) var(--radius) 0 0;
}
.lane h2 { margin: 0; font-size: 15px; color: white; }
.lane header span {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border-radius: 99px;
  background: white;
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.lane-hint { margin: 2px 0 10px; color: var(--muted); font-size: 12px; }
.lane-quiet { background: #f7f8f9; }
.lane .job { grid-template-columns: 1fr; box-shadow: none; }
.lane .jobs { max-height: min(640px, calc(100vh - 250px)); overflow: auto; scrollbar-width: thin; scrollbar-color: #d5d5d5 transparent; }
.lane .jobs::-webkit-scrollbar { width: 8px; height: 8px; }
.lane .jobs::-webkit-scrollbar-track { background: transparent; }
.lane .jobs::-webkit-scrollbar-thumb { background: #d5d5d5; border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
.lane .jobs::-webkit-scrollbar-thumb:hover { background: #c2c2c2; background-clip: padding-box; border: 2px solid transparent; }
.lane .jobs::-webkit-scrollbar-button,
.lane .jobs::-webkit-scrollbar-button:single-button,
.lane .jobs::-webkit-scrollbar-button:vertical:start:decrement,
.lane .jobs::-webkit-scrollbar-button:vertical:end:increment,
.lane .jobs::-webkit-scrollbar-button:vertical:start:increment,
.lane .jobs::-webkit-scrollbar-button:vertical:end:decrement {
  display: block;
  width: 0;
  height: 0;
  background: transparent;
  border: 0;
}
.lane .job-side { justify-items: start; }
.lane-empty { margin: 0; font-size: 13px; }
.proj-lane-view { display: grid; gap: 10px; }
.proj-lane-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.proj-lane-head h2 { margin: 0; font-size: 18px; }
.proj-lane-head span { color: var(--muted); font-variant-numeric: tabular-nums; }
.proj-lane-table td { text-align: left; vertical-align: middle; }
.proj-lane-table th { text-align: left; }
.proj-lane-table tr.is-clickable { cursor: pointer; }
.proj-lane-table tr.is-clickable:hover td { background: #f4f8fc; }
.proj-lane-table tr.is-design-done td { background: #f3faf6; }
.proj-lane-table tr.is-design-done:hover td { background: #e7f6ee; }
.proj-lane-table tr.is-design-done > td:first-child {
  box-shadow: inset 3px 0 0 var(--green);
}
.proj-lane-table th.more,
.proj-lane-table td.more { width: 48px; text-align: right; padding-right: 10px; }
.proj-lane-table th.more { color: transparent; }
.proj-lane-table .proj-link,
.proj-lane-table .proj-client {
  display: grid;
  gap: 2px;
  color: inherit;
  text-decoration: none;
}
.proj-lane-table .proj-link strong,
.proj-lane-table .proj-client strong { font-weight: 600; }
.proj-lane-table .proj-link small,
.proj-lane-table .proj-client small { color: var(--muted); font-size: 12px; }
.proj-lane-table .proj-link:hover strong { color: var(--blue); }
.proj-lane-table .pay-line,
.client-sheet .pay-line { font-weight: 600; white-space: nowrap; }
.proj-lane-table .pay-line.is-pago,
.client-sheet .pay-line.is-pago { color: #0e7a45; }
.proj-lane-table .pay-line.is-pronto,
.client-sheet .pay-line.is-pronto { color: #b54708; }
.proj-lane-table .pay-line.is-debe,
.client-sheet .pay-line.is-debe { color: #b42318; }
.proj-lane-table .proj-empty td { color: var(--muted); text-align: center; padding: 28px 14px; }
.proj-lane-table .pill { justify-self: start; }
.sheet {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 18px;
  overflow: visible;
  scrollbar-color: rgba(0, 67, 130, 0.45) transparent;
}
.sheet::-webkit-scrollbar { width: 10px; height: 10px; }
.sheet::-webkit-scrollbar-track { background: transparent; }
.sheet::-webkit-scrollbar-thumb { background: rgba(0, 67, 130, 0.45); border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; }
.sheet::-webkit-scrollbar-thumb:hover { background: #004382; background-clip: padding-box; border: 3px solid transparent; }
.sheet::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
.sheet-top, .stage-band { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.sheet-top { padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.sheet-top h2 { margin: 0; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; }
.sheet-top span, .stage-band span:last-child { color: var(--muted); font-size: 12px; font-weight: 400; }
.sheet-cols, .line-main {
  display: grid;
  grid-template-columns: minmax(190px, 1.35fr) minmax(150px, 1fr) 148px 132px;
  gap: 14px;
  align-items: center;
}
.sheet-cols { padding: 8px 18px; color: var(--muted); font-size: 11px; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; }
.stage-band { padding: 9px 18px; background: #f4f6f8; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; }
.line-main {
  width: 100%;
  margin: 0;
  padding: 13px 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: white;
  color: var(--ink);
  text-align: left;
  font-weight: 400;
}
.line.is-current .line-main { background: #f3f7fb; box-shadow: inset 3px 0 0 #004382; border-bottom-color: transparent; }
.line.is-done .line-main { color: #6a7074; }
.act, .ent, .when, .state { display: grid; min-width: 0; }
.act b, .ent { font-weight: 400; }
.act small, .ent small, .when small, .state small { color: var(--muted); font-weight: 400; font-size: 12px; }
.when { font-variant-numeric: tabular-nums; font-weight: 400; }
.when small { text-decoration: line-through; }
.when.empty, .state.quiet { color: var(--muted); font-weight: 400; }
.line-work { padding: 0 18px 14px 21px; background: #f7fafc; border-bottom: 1px solid var(--line); box-shadow: inset 3px 0 0 #004382; animation: rise 240ms ease; }
.now { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; padding-top: 4px; }
.now p { margin: 0; flex: 1 1 280px; }
.now-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.one-date { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 400; }
.one-date input { width: auto; }
.file-btn input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.note-line { flex: 1 1 100%; background: transparent; border-color: transparent; padding-left: 0; }
.note-line:focus { background: white; }
.quiet-files { flex: 1 1 100%; margin: 0; font-size: 13px; }
.cronograma { width: 100%; min-width: 1240px; border-collapse: collapse; table-layout: fixed; }
.cronograma.is-selectable { min-width: 1284px; }
.cronograma col.sel-col { width: 44px; }
.cronograma col.c-act { width: 220px; }
.cronograma col.c-resp { width: 196px; }
.cronograma col.c-ent { width: 160px; }
.cronograma col.c-fecha,
.cronograma col.c-replan { width: 168px; }
.cronograma col.c-estado { width: 212px; }
.cronograma col.c-log { width: 140px; }
.cronograma col.c-more { width: 48px; }
.cronograma th, .cronograma td { border-bottom: 1px solid var(--line); vertical-align: middle; }
.band-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.cronograma .phase th { letter-spacing: 0.14em; text-transform: uppercase; font-size: 12px; background: white; }
.cronograma .phase th span:last-child, .cronograma .band th span:last-child { letter-spacing: 0; text-transform: none; color: var(--muted); font-size: 12px; }
.cronograma .cols th { height: 44px; padding: 0 16px; font-size: 12px; font-weight: 400; letter-spacing: 0.04em; line-height: 1; text-align: left; text-transform: uppercase; color: white; background: #004382; vertical-align: middle; }
.cronograma .cols th.sel-col,
.cronograma td.sel-col {
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  padding: 10px 8px;
  text-align: center;
}
.cronograma .cols th.sel-col { height: 44px; padding: 0 8px; }
.cronograma .cols th:nth-child(4),
.cronograma .cols th:nth-child(5),
.cronograma .cols th:nth-child(6),
.cronograma .cols th:nth-child(7) { text-align: center; }
.cronograma .cols th:nth-child(4),
.cronograma .cols th:nth-child(5) { height: auto; line-height: 1.2; padding-top: 8px; padding-bottom: 8px; letter-spacing: 0.02em; }
.cronograma.is-selectable .cols th:nth-child(4),
.cronograma.is-selectable .cols th:nth-child(5) {
  text-align: left;
  height: 44px;
  padding-top: 0;
  padding-bottom: 0;
  letter-spacing: 0.04em;
}
.cronograma.is-selectable .cols th:nth-child(5),
.cronograma.is-selectable .cols th:nth-child(6),
.cronograma.is-selectable .cols th:nth-child(7),
.cronograma.is-selectable .cols th:nth-child(8) { text-align: center; }
.cronograma.is-selectable .cols th:nth-child(5),
.cronograma.is-selectable .cols th:nth-child(6) {
  height: auto;
  line-height: 1.2;
  padding-top: 8px;
  padding-bottom: 8px;
  letter-spacing: 0.02em;
}
.cronograma tbody td.td-fecha,
.cronograma tbody td.td-estado,
.cronograma tbody td.log { text-align: center; }
.cronograma tbody td.td-fecha { overflow: visible; }
.cronograma td.td-fecha.is-faded { opacity: 0.4; }
.cronograma tbody td.td-fecha .lark-date,
.cronograma tbody td.td-estado .status-field { display: inline-flex; justify-content: center; }
.cronograma .fecha-locked {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--muted);
  cursor: default;
  user-select: none;
}
.cronograma .fecha-revised-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  isolation: isolate;
  z-index: 1;
}
.cronograma .fecha-revised-wrap:hover,
.cronograma .fecha-revised-wrap:focus-within {
  z-index: 2;
}
.cronograma .fecha-revised-wrap .lark-date {
  min-width: 0;
}
.cronograma button.fecha-clear,
.cronograma button.fecha-clear:hover {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  min-width: 22px;
  padding: 0;
  border: 1px solid #d7e2ec;
  border-radius: 999px;
  background: #fff;
  color: #5c6b7a;
  box-shadow: 0 2px 8px rgba(16, 36, 58, 0.12);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease, background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.cronograma .fecha-revised-wrap:hover button.fecha-clear,
.cronograma .fecha-revised-wrap:focus-within button.fecha-clear,
.cronograma button.fecha-clear:focus-visible {
  opacity: 1;
  pointer-events: auto;
}
.cronograma button.fecha-clear svg {
  width: 12px;
  height: 12px;
}
.cronograma button.fecha-clear:hover {
  border-color: #e3b4b0;
  background: #fff5f4;
  color: #c0392b;
}
.cronograma .band th { background: #f4f6f8; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.cronograma td input[type="date"] { width: 150px; border: 0; background: transparent; padding: 4px 0; }
.cronograma tr.is-current td { background: #f3f7fb; }
.cronograma tr.is-current td:first-child { box-shadow: inset 3px 0 0 #004382; }
.cronograma.is-selectable tr.is-current td:first-child { box-shadow: none; }
.cronograma.is-selectable tr.is-current td.sel-col + td { box-shadow: inset 3px 0 0 #004382; }
.cronograma tr.is-done td { color: #6a7074; }
.cronograma .act small, .cronograma .ent small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.cronograma .deliver { width: 140px; text-align: right; }
.cronograma button { padding: 6px 12px; }
.stage-note { margin: 0 0 6px; color: var(--muted); font-size: 12px; }
.schedule-bar { display: flex; align-items: stretch; justify-content: space-between; gap: 16px; margin: 0 0 16px; flex-wrap: wrap; }
.schedule-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.phase-switch { display: inline-flex; width: auto; margin: 0; flex: none; align-self: center; background: white; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cronograma tbody td.td-resp {
  overflow: visible;
  padding-left: 12px;
  padding-right: 12px;
}
.cronograma .cols th:nth-child(2) { padding-left: 12px; padding-right: 12px; }
.cronograma.is-selectable .cols th:nth-child(3) { padding-left: 12px; padding-right: 12px; }
.cronograma tbody td.td-resp .pick,
.cronograma tbody td.td-resp .pick-btn {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.cronograma tbody td.td-resp .pick { display: flex; }
.cronograma tbody td.td-resp .pick-btn span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cronograma .resp { display: inline-block; max-width: 100%; }
.phase-switch button, .phase-switch button:hover {
  flex: none;
  width: auto;
  min-width: max-content;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: white;
  color: var(--ink);
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  padding: 0 16px;
  font-weight: 400;
}
body.is-stage-busy { cursor: progress; }
body.is-stage-busy .cronograma .status-current,
body.is-stage-busy .stage-rail button,
body.is-stage-busy .phase-switch button,
body.is-stage-busy .more-btn { pointer-events: none; }
.cronograma .status-current.is-status-pop-run {
  animation: status-pop 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
.sheet.is-enter {
  animation: stage-enter 200ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes status-pop {
  0% { opacity: 0.35; transform: scale(0.97); }
  100% { opacity: 1; transform: none; }
}
@keyframes stage-enter {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
.phase-switch svg { width: 16px; height: 16px; flex: none; }
.phase-switch button:last-child { border-right: 0; }
.phase-switch button.is-on, .phase-switch button.is-on:hover { background: #004382; color: white; }
.phase-switch button:disabled, .phase-switch button:disabled:hover { background: #f7f8f9; color: #9aa1a8; cursor: not-allowed; }
.review-note { margin: -4px 0 12px; color: var(--muted); font-size: 13px; }
.stage-rail { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: max-content; max-width: 100%; margin: 0; background: white; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stage-rail button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: auto;
  min-width: max-content;
  padding: 12px 16px;
  background: white;
  color: var(--ink);
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  text-align: left;
  box-shadow: none;
  cursor: pointer;
}
.stage-rail button:last-child { border-right: 0; }
.stage-rail i {
  width: 28px;
  height: 28px;
  border-radius: 99px;
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid #c5d0dc;
  font-style: normal;
  font-size: 12px;
  font-weight: 400;
  color: var(--blue);
}
.stage-rail span { display: grid; min-width: max-content; }
.stage-rail em { font-style: normal; font-size: 11px; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.stage-rail b { font-size: 13px; white-space: nowrap; }
.stage-rail small { margin-left: 8px; color: var(--muted); font-size: 12px; font-weight: 400; white-space: nowrap; flex: none; }
/* Parecen estáticas (como no clicables), pero sí abren la etapa */
.stage-rail button.is-quiet,
.stage-rail button.is-quiet:hover {
  background: #f7f8f9;
  color: #6b7280;
  cursor: pointer;
  box-shadow: none;
  transform: none;
}
.stage-rail button.is-quiet i {
  color: #9aa1a8;
  border-color: #e4e7eb;
  background: white;
}
.stage-rail button.is-quiet em,
.stage-rail button.is-quiet small,
.stage-rail button.is-quiet b { color: #9aa1a8; }
.stage-rail button.is-quiet:hover {
  background: #f3f4f6;
}
.stage-rail button.is-on,
.stage-rail button.is-on:hover {
  background: var(--blue);
  color: white;
  cursor: default;
}
.stage-rail button.is-on i { background: white; color: var(--blue); border-color: white; }
.stage-rail button.is-on em, .stage-rail button.is-on small { color: rgba(255, 255, 255, 0.82); }
.stage-rail button.is-done i,
.stage-rail button.is-on.is-done i {
  background: #0e7a45;
  color: white;
  border-color: #0e7a45;
}
.stage-rail button.is-quiet.is-done i {
  background: #e8f6ee;
  color: #0e7a45;
  border-color: #b7dfc9;
}
.stage-rail button:disabled, .stage-rail button:disabled:hover { background: #f7f8f9; color: #9aa1a8; cursor: not-allowed; }
.stage-rail button:disabled i { color: #9aa1a8; border-color: #e4e7eb; }
.stage-tabs { display: flex; gap: 10px; margin-bottom: 12px; }
.stage-tabs .tab {
  flex: 1;
  display: grid;
  gap: 2px;
  justify-items: start;
  padding: 14px 16px;
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: left;
  box-shadow: var(--shadow);
}
.stage-tabs .tab b { font-size: 13px; }
.stage-tabs .tab small, .tab-k { color: var(--muted); font-size: 12px; font-weight: 400; letter-spacing: 0.06em; }
.stage-tabs .tab.is-on { background: #f3f7fb; border-color: #004382; box-shadow: inset 0 -3px 0 #004382; }
.stage-tabs .tab.is-on .tab-k, .stage-tabs .tab.is-on b { color: #004382; }
.stage-tabs .tab.is-done { background: #f3faf6; border-color: #b7dfc9; }
.stage-tabs .tab.is-done .tab-k { color: #0e7a45; }
.stage-tabs .tab:hover { background: #f7f9fb; color: var(--ink); }
.stage-tabs .tab.is-on:hover { background: #eaf1f8; }
.stage-tabs .tab:disabled, .stage-tabs .tab:disabled:hover { background: #f3f4f6; color: #9aa1a8; border-color: var(--line); box-shadow: none; cursor: not-allowed; }
.status-field { display: inline-flex; }
.status-current {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 168px;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--radius);
  color: white;
  font-size: 13px;
  font-weight: 400;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}
.status-current .chev, .status-current .wa { width: 18px; height: 18px; flex: none; }
.status-current .chev { width: 14px; height: 14px; opacity: 0.9; transition: transform var(--ease); }
.status-field.is-open .status-current .chev { transform: rotate(180deg); }
.status-current.st-pendiente { background: #5c6570; }
.status-current.st-proceso { background: #004382; }
.status-current.st-pospuesto { background: #b54708; }
.status-current.st-completo { background: #0e7a45; }
.status-current.st-pendiente:hover { background: #4e5862; }
.status-current.st-proceso:hover { background: #003366; }
.status-current.st-pospuesto:hover { background: #8f3906; }
.status-current.st-completo:hover { background: #0b6338; }
.status-field.is-gated .status-current,
.status-field.is-gated .status-current:hover { cursor: not-allowed; filter: saturate(0.72); }
.status-current:disabled,
.status-current:disabled:hover { opacity: 0.72; cursor: default; }
.status-menu {
  position: fixed;
  z-index: 40;
  display: none;
  gap: 4px;
  margin: 0;
  padding: 6px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(17, 17, 17, 0.14);
}
.status-menu.is-floating { display: grid; }
.status-menu button.st {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 400;
  text-align: left;
  box-shadow: none;
}
.status-menu button.st::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}
.status-menu button.st .tick { width: 14px; height: 14px; margin-left: auto; }
.status-menu button.st-pendiente { color: #5c6570; }
.status-menu button.st-proceso { color: #004382; }
.status-menu button.st-pospuesto { color: #b54708; }
.status-menu button.st-completo { color: #0e7a45; }
.status-menu button.st-pendiente:hover { background: #f1f3f5; }
.status-menu button.st-proceso:hover { background: #e7eef6; }
.status-menu button.st-pospuesto:hover { background: #fff4e5; }
.status-menu button.st-completo:hover { background: #e8f6ee; }
.status-menu button.st.is-on { color: white; }
.status-menu button.st.is-on::before { background: white; }
.status-menu button.st-pendiente.is-on,
.status-menu button.st-pendiente.is-on:hover { background: #5c6570; }
.status-menu button.st-proceso.is-on,
.status-menu button.st-proceso.is-on:hover { background: #004382; }
.status-menu button.st-pospuesto.is-on,
.status-menu button.st-pospuesto.is-on:hover { background: #b54708; }
.status-menu button.st-completo.is-on,
.status-menu button.st-completo.is-on:hover { background: #0e7a45; }
.cronograma tr.tone-pendiente td { background: #fbfcfd; }
.cronograma tr.tone-proceso td { background: #f3f7fb; }
.cronograma tr.tone-pospuesto td { background: #fff8f0; }
.cronograma tr.tone-completo td { background: #f3faf6; }
.cronograma tr.tone-proceso td:first-child { box-shadow: inset 3px 0 0 #004382; }
.cronograma tr.tone-pospuesto td:first-child { box-shadow: inset 3px 0 0 #b54708; }
.cronograma tr.tone-completo td:first-child { box-shadow: inset 3px 0 0 #0e7a45; }
.cronograma tr.tone-pendiente td:first-child { box-shadow: inset 3px 0 0 #c5ccd3; }
.cronograma.is-selectable tr.tone-proceso td:first-child,
.cronograma.is-selectable tr.tone-pospuesto td:first-child,
.cronograma.is-selectable tr.tone-completo td:first-child,
.cronograma.is-selectable tr.tone-pendiente td:first-child { box-shadow: none; }
.cronograma.is-selectable tr.tone-proceso td.sel-col + td { box-shadow: inset 3px 0 0 #004382; }
.cronograma.is-selectable tr.tone-pospuesto td.sel-col + td { box-shadow: inset 3px 0 0 #b54708; }
.cronograma.is-selectable tr.tone-completo td.sel-col + td { box-shadow: inset 3px 0 0 #0e7a45; }
.cronograma.is-selectable tr.tone-pendiente td.sel-col + td { box-shadow: inset 3px 0 0 #c5ccd3; }
.cronograma tbody tr.tone-pendiente:hover td { background: #f3f5f7; }
.cronograma tbody tr.tone-proceso:hover td { background: #e7f0f8; }
.cronograma tbody tr.tone-pospuesto:hover td { background: #fff1e4; }
.cronograma tbody tr.tone-completo:hover td { background: #e7f6ee; }
.stepper { display: flex; gap: 8px; list-style: none; margin: 0 0 12px; padding: 0; flex-wrap: wrap; }
.stepper li { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 12px; font-size: 13px; font-weight: 400; color: var(--muted); }
.stepper li.on { background: var(--blue); color: white; border-color: var(--blue); }
.stepper li.done { background: var(--blue-soft); color: var(--blue-2); border-color: #b7c6d9; }
.stage-block { margin: 16px 0; }
.step { background: white; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; }
.step.is-current { border-color: #b7c6d9; box-shadow: var(--shadow); }
.step.is-done { background: #fbfcfc; }
.step summary { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 14px; cursor: pointer; color: var(--ink); font-weight: 400; }
.step summary .tag { margin-left: auto; }
.editor { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; padding: 0 14px 14px; }
.editor .check { grid-column: 1 / -1; align-content: center; font-weight: 400; }
.legend { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.filters, .row-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 14px; }
.filters input { width: auto; min-width: 160px; background: white; }

.is-selectable .sel-col,
.is-selectable col.sel-col {
  width: 44px;
  min-width: 44px;
  max-width: 44px;
}
.is-selectable th.sel-col,
.is-selectable td.sel-col {
  text-align: center;
  vertical-align: middle;
  padding: 10px 8px;
  overflow: visible;
}
.is-selectable thead th.sel-col {
  padding: 0 8px;
}
.sel-box {
  position: relative;
  display: inline-grid;
  width: 18px;
  height: 18px;
  margin: 0 auto;
  vertical-align: middle;
}
.sel-box input {
  position: absolute;
  inset: 0;
  width: 18px;
  height: 18px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
  background: transparent;
}
.sel-box span {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid #b7c3d0;
  background: white;
  display: grid;
  place-items: center;
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}
.sel-box:hover span { border-color: #004382; }
.sel-box input:focus-visible + span { box-shadow: 0 0 0 3px rgba(0, 67, 130, 0.28); }
.sel-box input:checked + span,
.sel-box input:indeterminate + span {
  background: #004382;
  border-color: #004382;
}
.sel-box input:checked + span::after {
  content: "";
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}
.sel-box input:indeterminate + span::after {
  content: "";
  width: 8px;
  height: 2px;
  border-radius: 1px;
  background: white;
}
.is-selectable thead th.sel-col .sel-box span {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.9);
}
.is-selectable thead th.sel-col .sel-box:hover span { border-color: white; }
.is-selectable thead th.sel-col .sel-box input:checked + span,
.is-selectable thead th.sel-col .sel-box input:indeterminate + span {
  background: white;
  border-color: white;
}
.is-selectable thead th.sel-col .sel-box input:checked + span::after { border-color: #004382; }
.is-selectable thead th.sel-col .sel-box input:indeterminate + span::after { background: #004382; }
.is-selectable thead th.is-evidence .sel-box span { border-color: #3d4a12; background: transparent; }
.is-selectable thead th.is-evidence .sel-box input:checked + span,
.is-selectable thead th.is-evidence .sel-box input:indeterminate + span { background: #3d4a12; border-color: #3d4a12; }
.is-selectable thead th.is-evidence .sel-box input:checked + span::after { border-color: white; }
.is-selectable thead th.is-evidence .sel-box input:indeterminate + span::after { background: white; }
.is-selectable tbody tr.is-picked td,
.is-selectable tbody tr.is-picked:hover td,
.is-selectable tbody tr.is-picked td.sticky,
.is-selectable tbody tr.is-picked:hover td.sticky { background: #e7eef6; }
.sel-bar {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 11px 14px;
  box-sizing: border-box;
  background: #004382;
  color: white;
  border-radius: 0;
  box-shadow: none;
  animation: sel-in 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes sel-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
.sel-bar[hidden] { display: none !important; }
.sel-bar strong { font-size: 14px; font-weight: 650; color: white; letter-spacing: 0; }
.sel-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.sel-bar .sel-delete,
.sel-bar .sel-delete:hover {
  background: #b42318;
  color: white;
  border: 0;
  border-radius: 6px;
  min-height: 34px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
}
.sel-bar .sel-delete:hover { background: #912018; }
.sel-bar .sel-clear,
.sel-bar .sel-clear:hover {
  background: transparent;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 6px;
  min-height: 34px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
}
.sel-bar .sel-clear:hover { background: rgba(255, 255, 255, 0.12); }
@media (prefers-reduced-motion: reduce) {
  .sel-bar { animation: none; }
}
.filters input { width: auto; min-width: 160px; background: white; }
.filters .lark-search,
.log-filters .lark-search,
.client-bar .lark-search,
.ledger-tools .lark-search {
  flex: 1 1 280px;
  width: min(420px, 100%);
  max-width: 420px;
  min-width: 220px;
}
.filters .lark-search input,
.log-filters .lark-search input,
.client-bar .lark-search input,
.ledger-tools .lark-search input,
.table-find .lark-search input,
.cost-block-head .lark-search input,
.prog-toolbar .lark-search input {
  width: 100%;
  min-width: 0;
  max-width: none;
  border: 0;
  box-shadow: none;
  padding: 8px 0;
  background: transparent;
}
.table-find { display: grid; gap: 10px; }
.table-find .lark-search,
.cost-block-head .lark-search { width: min(420px, 100%); }
.table-find-empty { margin: 0; }
.prog-toolbar { align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.prog-toolbar .lark-search { width: min(420px, 100%); }
.pick { position: relative; display: inline-flex; min-width: 168px; }
label .pick, form .pick { width: 100%; }
.pick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 37px;
  padding: 8px 12px;
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 400;
  box-shadow: none;
}
.pick-btn:hover { background: #f7f9fb; color: var(--ink); border-color: #c5d0dc; }
.pick.is-open .pick-btn { border-color: #004382; box-shadow: 0 0 0 3px rgba(0, 67, 130, 0.14); }
.pick-btn .chev { width: 14px; height: 14px; color: #004382; flex: 0 0 auto; transition: transform var(--ease); }
.pick.is-open .pick-btn .chev { transform: rotate(180deg); }
.pick-menu {
  position: fixed;
  z-index: 50;
  display: none;
  gap: 2px;
  margin: 0;
  padding: 6px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(17, 17, 17, 0.14);
}
.pick-menu.is-floating,
.status-menu.is-floating,
.row-menu.is-floating,
.proj-status-menu.is-floating,
.proj-status-menu:popover-open {
  inset: auto;
  margin: 0;
  max-height: min(280px, calc(100vh - 24px));
  overflow: auto;
}
.date-pop:popover-open,
.date-pop.is-floating {
  inset: auto;
  margin: 0;
  max-height: none;
  overflow: hidden;
}
.pick-menu.is-floating { display: grid; }
.row-menu.is-floating { display: grid; }
.pick-menu button.pick-opt {
  display: flex;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 400;
  text-align: left;
  box-shadow: none;
}
.pick-menu button.pick-opt:hover { background: var(--blue-soft); color: var(--blue-2); }
.pick-menu button.pick-opt.is-on,
.pick-menu button.pick-opt.is-on:hover { background: #004382; color: white; }
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
}
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 880px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; color: white; font-weight: 400; letter-spacing: 0.04em; text-align: center; background: #004382; border-bottom-color: #003566; padding: 13px 14px; line-height: 1.2; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #f7fbf8; }
tr.stage th { background: #004382; color: white; font-size: 13px; }
td select, td input[type="date"], td input[type="number"] { width: auto; }
.sub td { background: #fbfcfc; }
.bar { display: block; height: 6px; background: #e6eaec; border-radius: 99px; width: 72px; margin-top: 6px; }
.bar span { display: block; height: 100%; background: var(--blue); border-radius: 99px; }
.tag { font-size: 12px; color: var(--muted); }
.money dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 10px 0; }
.money dt { color: var(--muted); }
.money dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 400; }
.stack { display: grid; gap: 12px; }
.work { display: grid; gap: 8px; }
.work header { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.panel { margin-bottom: 16px; }
#toast {
  position: fixed;
  inset: unset;
  top: 18px;
  right: 18px;
  left: auto;
  bottom: auto;
  margin: 0;
  z-index: 2147483647;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: 400px;
  padding: 14px 16px;
  background: white;
  color: var(--ink);
  border: 1px solid #e6ebf0;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(17, 24, 39, 0.14);
  animation: toast-in 220ms ease;
}
#toast[hidden] { display: none !important; }
#toast:popover-open { display: flex; }
#toast .toast-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: none;
  background: #e8f6ee;
  color: #0e7a45;
}
#toast.is-bad .toast-icon { background: #fdecec; color: var(--red); }
#toast .toast-icon svg { width: 18px; height: 18px; }
#toast .toast-copy { display: grid; gap: 2px; min-width: 0; }
#toast .toast-copy strong { font-size: 14px; font-weight: 650; }
#toast .toast-copy span { font-size: 13px; color: var(--muted); line-height: 1.35; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
.error { color: var(--red); }

details summary { cursor: pointer; color: var(--ink); font-weight: 400; font-size: 14px; margin-bottom: 8px; }
details[open] > :not(summary) { animation: rise 240ms ease; }
@keyframes rise {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}
@keyframes menu-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.pick-menu.is-floating.is-ready,
.status-menu.is-floating.is-ready,
.row-menu.is-floating.is-ready,
.proj-status-menu.is-floating.is-ready,
.date-pop.is-floating.is-ready,
.finder-menu.is-ready,
.client-suggest.is-ready,
.account-menu.is-ready {
  animation: menu-in 180ms cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top center;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 1200px) {
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .stage-tabs { flex-direction: column; }
  .shell, .shell.is-collapsed { display: block; }
  .fold,
  .side-edge { display: none; }
  aside { overflow: visible; }
  .shell.is-collapsed .brand-name,
  .shell.is-collapsed nav a span,
  .shell.is-collapsed .create-btn span,
  .shell.is-collapsed .slogan {
    display: block;
    max-width: none;
    max-height: none;
    opacity: 1;
    pointer-events: auto;
    border-top-width: 1px;
    border-top-color: rgba(255, 255, 255, 0.32);
    padding-top: 10px;
  }
  .shell.is-collapsed .side-social { flex-direction: row; gap: 14px; }
  .shell.is-collapsed nav a,
  .shell.is-collapsed .create-btn,
  .shell.is-collapsed .side-top { justify-content: flex-start; flex-direction: row; }
  .login-card { padding: 24px 18px; }
  .main { padding: 16px 14px 64px; }
  aside {
    position: sticky;
    top: 0;
    height: auto;
    z-index: 2;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  nav { display: flex; gap: 6px; overflow: auto; flex: 1; min-width: 0; align-content: center; }
  nav a { white-space: nowrap; }
  .nav-group { display: contents; margin: 0; padding: 0; border: 0; }
  .nav-label { display: none; }
  .side-foot { width: 100%; margin-top: 4px; padding-top: 4px; }
  .finder { padding: 10px 14px; }
  .form-grid { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  table { min-width: 720px; }
  .note { align-items: flex-start; flex-direction: column; }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sheet-cols { display: none; }
  .line-main { grid-template-columns: 1fr auto; }
  .line-main .ent { grid-column: 1 / -1; }
  .job, .jobs > .job { grid-template-columns: 1fr; }
  .job-side { justify-items: start; }
  .board { grid-template-columns: 1fr; }
}

.main-col { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.finder {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  background: rgba(246, 247, 248, 0.94);
  border-bottom: 1px solid var(--line);
  padding: 10px 20px;
}
.finder-wrap { position: relative; width: min(280px, 42vw); flex: none; }
.finder-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #e6e8eb;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0 12px;
}
.finder-box:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 67, 130, 0.16); background: white; }
.finder-box input { border: 0; background: transparent; box-shadow: none; padding: 8px 0; width: 100%; min-width: 0; }
.finder-box input:focus { box-shadow: none; }
.finder-box input::placeholder { color: #6b7280; font-weight: 400; }
.finder-box .ico { width: 18px; height: 18px; color: #243044; flex: none; }
.finder-menu {
  position: absolute;
  left: auto;
  right: 0;
  top: calc(100% + 6px);
  width: min(420px, calc(100vw - 24px));
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(17, 17, 17, 0.08);
  max-height: 360px;
  overflow: auto;
}
button.account-btn, button.account-btn:hover {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #1a3a56;
  box-shadow: none;
  display: grid;
  place-items: center;
}
button.account-btn:hover,
button.account-btn[aria-expanded="true"] { background: rgba(0, 67, 130, 0.1); color: var(--blue); }
button.account-btn .ico { width: 20px; height: 20px; }
.account { position: relative; flex: none; }
.account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 320px;
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(17, 17, 17, 0.12);
  padding: 8px;
  z-index: 5;
}
.account-photo { display: flex; justify-content: center; padding: 10px 8px 6px; }
.avatar-img, .avatar-fallback {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  display: grid;
  place-items: center;
}
.avatar-fallback {
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 0.02em;
}
.account-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 7px 10px;
  font-size: 14px;
  font-weight: 400;
}
.account-line .ico { width: 16px; height: 16px; color: var(--blue); }
.account-line span { min-width: 0; }
.account-line.is-empty span { color: var(--muted); font-weight: 400; }
.account-split { height: 1px; background: var(--line); margin: 6px 8px; }
.account-menu button.account-action,
.account-menu button.account-action:hover {
  width: 100%;
  background: transparent;
  color: var(--ink);
  border: 0;
  border-radius: 8px;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 9px 10px;
  font-weight: 400;
  text-align: left;
}
.account-menu button.account-action:hover { background: var(--blue-soft); color: var(--blue-2); }
.account-menu button.account-action .ico { width: 16px; height: 16px; }
.finder-hit {
  display: grid;
  grid-template-columns: 108px 1fr;
  column-gap: 10px;
  padding: 10px 12px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--line);
}
.finder-hit small { grid-row: span 2; align-self: center; color: var(--blue); font-size: 11px; font-weight: 400; letter-spacing: 0.04em; text-transform: uppercase; }
.finder-hit span { color: var(--muted); font-size: 13px; }
.finder-hit.is-on, .finder-hit:hover { background: var(--blue-soft); }
.finder-empty { margin: 0; padding: 12px; color: var(--muted); }
.hint { margin: 0; color: var(--muted); font-size: 13px; font-weight: 400; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 8px 0 18px; }
.dash-grid .panel { margin: 0; }
.dash-grid h2 { margin: 0 0 12px; }
.ring-wrap { display: flex; gap: 18px; align-items: center; }
.ring { width: 148px; height: 148px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.ring > div { width: 96px; height: 96px; border-radius: 50%; background: white; display: grid; place-items: center; text-align: center; }
.ring b { font-size: 28px; line-height: 1; }
.ring small { color: var(--muted); }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.legend i { width: 8px; height: 8px; border-radius: 99px; display: inline-block; margin-right: 6px; }
.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: minmax(92px, 150px) 1fr auto; gap: 8px; align-items: center; font-size: 13px; }
.bar-row span { color: #3d4448; }
.bar-track { height: 8px; background: #eef2f6; border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; min-width: 0; }
.rating { display: inline-flex; align-items: center; gap: 3px; }
.rating b { margin-left: 4px; min-width: 1.2em; font-size: 13px; }
button.dot, .rating i.dot { width: 9px; height: 9px; min-width: 9px; padding: 0; border: 0; border-radius: 99px; background: #d5dbe2; display: inline-block; }
button.dot:hover { background: #9bb0c7; }
button.dot.is-on.is-high, .rating i.is-on.is-high { background: #0e7a45; }
button.dot.is-on.is-mid, .rating i.is-on.is-mid { background: #b54708; }
button.dot.is-on.is-low, .rating i.is-on.is-low { background: #b42318; }
.rate-block { display: grid; justify-items: end; gap: 2px; font-size: 12px; color: var(--muted); }
.rate-block small { font-size: 11px; }
.client-pick { position: relative; display: grid; }
.client-suggest {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 40;
  max-height: min(240px, 42vh);
  overflow: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 36px rgba(0, 67, 130, 0.16);
}
.client-suggest button { width: 100%; text-align: left; background: white; color: var(--ink); border: 0; border-bottom: 1px solid var(--line); border-radius: 0; display: flex; justify-content: space-between; gap: 8px; font-weight: 400; }
.client-suggest button:hover { background: var(--blue-soft); }
.client-suggest small { color: var(--muted); font-weight: 400; }
dialog.modal.wide { width: min(760px, calc(100vw - 32px)); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.clients td small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.clients td a { color: inherit; text-decoration: none; }
.clients td a:hover { color: var(--blue); }
.client-name-cell {
  display: grid;
  gap: 2px;
  align-content: start;
}
.client-name-cell > a:first-child { display: inline-block; }
.client-name-cell .client-name-code {
  display: block;
  width: fit-content;
  line-height: 1.2;
}
.client-name-cell small { margin: 0; }
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0 4px;
}
.pager .muted { margin-right: auto; font-size: 13px; }
.pager button { min-width: 36px; padding: 7px 12px; }
.pager button.is-on, .pager button.is-on:hover {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}
.pager-gap { color: var(--muted); padding: 0 2px; }
tr[data-page-hide="1"] { display: none !important; }
.table-pager { margin: 10px 0 4px; }
.book-wrap table.cost-index { min-width: 0; width: 100%; }
.book-wrap:not(.is-income) .book-table.cost-index th:not(.sticky):not(.sel-col),
.book-wrap:not(.is-income) .book-table.cost-index td:not(.sticky):not(.sel-col) {
  width: auto;
  max-width: none;
}
.bp-pager { margin: 0 0 14px; justify-content: flex-start; }
.book-wrap.is-income + .bp-pager { margin: 12px 0 4px; }
.bp-pager .bp-count {
  margin-right: 4px;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  color: var(--ink);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 400;
}
.bp-pager .bp-count strong { font-weight: 400; }
.bp-pager .bp-range { color: var(--muted); font-family: "Segoe UI", system-ui, sans-serif; font-size: 13px; font-weight: 400; }
.bp-pager button {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 400;
}
.delivered { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.delivered li { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; display: grid; gap: 4px; }
.delivered span, .delivered small { color: var(--muted); }
.dossier { align-items: start; }
.dossier-flow b { font-size: 18px; }
.cal-shell { display: grid; gap: 12px; }
.cal-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.cal-hero-copy { display: grid; gap: 6px; }
.cal-hero h1 { margin: 0; font-size: 24px; font-weight: 650; letter-spacing: -0.02em; color: var(--ink); }
.cal-summary {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.cal-summary b { color: var(--ink); font-weight: 650; }
.cal-summary b.is-late { color: #b42318; }
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}
.cal-pager {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
}
.cal-pager strong {
  min-width: 9.5rem;
  padding: 0 6px;
  text-align: center;
  text-transform: capitalize;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.cal-pager-btn {
  min-width: 0;
  padding: 6px 10px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #5c6570 !important;
  font-size: 12px;
  font-weight: 650;
  transition: color 160ms ease, background-color 160ms ease;
}
.cal-pager-btn:hover {
  color: var(--ink) !important;
  background: rgba(0, 67, 130, 0.06) !important;
}
.cal-today {
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #004382 !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  padding: 6px 10px !important;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(0, 67, 130, 0.35);
  transition: color 160ms ease, text-decoration-color 160ms ease, background-color 160ms ease;
}
.cal-today:hover {
  color: #003066 !important;
  background: rgba(0, 67, 130, 0.06) !important;
  text-decoration-color: #003066;
}
.cal-nav button,
.filters input,
.filters select,
.filters .pick-btn {
  font-size: 13px;
  font-weight: 600;
}
.cal-views {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  min-width: 168px;
  padding: 3px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 35, 55, 0.05);
  gap: 0;
}
.cal-views-pill {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 36, 56, 0.08), 0 6px 16px rgba(16, 36, 56, 0.06);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.cal-views[data-view="week"] .cal-views-pill { transform: translateX(100%); }
.cal-views button {
  position: relative;
  z-index: 1;
  border: 0 !important;
  border-radius: 999px !important;
  margin: 0 !important;
  background: transparent !important;
  color: #6a7684 !important;
  padding: 7px 14px !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  transition: color 180ms ease;
}
.cal-views button.is-on,
.cal-views button.is-on:hover {
  background: transparent !important;
  color: var(--ink) !important;
}
.cal-views button:not(.is-on):hover { color: var(--ink) !important; }
button.ghost.is-on, button.ghost.is-on:hover { background: var(--blue); color: white; border-color: var(--blue); }
.cal-views button.ghost.is-on,
.cal-views button.ghost.is-on:hover {
  background: transparent !important;
  color: var(--ink) !important;
  border-color: transparent !important;
}
.cal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 2px;
}
.cal-filters { margin: 0; }
.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 7px; height: 7px; border-radius: 99px; display: inline-block; }
.cal-legend i.is-done { background: #1f7a4d; }
.cal-legend i.is-work { background: #004382; }
.cal-legend i.is-late { background: #b42318; }
.cal-legend i.is-wait { background: #5a6f85; }
.cal-legend i.is-idle { background: #7a8490; }
.cal-clear { min-height: 28px; margin-top: 4px; border-radius: 6px; }
.cal-clear.is-drop { box-shadow: inset 0 0 0 2px var(--blue); }
.cal {
  background: #fff;
  border: 1px solid #d7dee6;
  border-radius: 12px;
  overflow: hidden;
}
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head {
  background: #f4f7fa;
  border-bottom: 1px solid #d7dee6;
}
.cal-head span {
  padding: 9px 8px;
  font-size: 12px;
  font-weight: 650;
  color: #5b6672;
  text-align: center;
}
.cal-day {
  background: #fff;
  color: var(--ink);
  border: 0;
  border-top: 1px solid #e8edf2;
  border-right: 1px solid #e8edf2;
  min-height: 112px;
  padding: 8px;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  cursor: pointer;
  transition: background-color 160ms ease;
  animation: cal-day-in 320ms ease both;
}
.cal-day:nth-child(1) { animation-delay: 0ms; }
.cal-day:nth-child(2) { animation-delay: 12ms; }
.cal-day:nth-child(3) { animation-delay: 24ms; }
.cal-day:nth-child(4) { animation-delay: 36ms; }
.cal-day:nth-child(5) { animation-delay: 48ms; }
.cal-day:nth-child(6) { animation-delay: 60ms; }
.cal-day:nth-child(7) { animation-delay: 72ms; }
.cal-day:nth-child(n+8) { animation-delay: 80ms; }
@keyframes cal-day-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cal-day { animation: none; }
}
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day:hover { background: #f8fafc; }
.cal-day.is-out { background: #f6f8fa; color: #9aa3ab; }
.cal-day.is-out .cal-day-num { color: #9aa3ab; }
.cal-day.is-today .cal-day-num {
  background: #004382;
  color: #fff;
}
.cal-day.is-on { background: #f2f7fc; box-shadow: inset 0 0 0 1.5px #004382; }
.cal-day.is-drop { background: var(--blue-soft); }
.cal-day.is-heavy { background: #f5f8fb; }
.cal-day-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.cal-day-num {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}
.cal-day-count {
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 999px;
  background: transparent;
  color: #6a7582;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}
.cal-day-count.is-late { color: #b42318; background: #f8e8e6; }
.cal.is-week .cal-day { min-height: 300px; }
.cal-hot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  color: #5b6672;
  font-style: normal;
  font-size: 10px;
  font-weight: 650;
}
.cal-hot span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70px;
}
.cal-hot b { font-weight: 700; font-variant-numeric: tabular-nums; }
.cal-hotline { color: var(--red); font-size: 13px; margin: 0 0 8px; }
.cal-day-chips {
  display: grid;
  gap: 3px;
  min-height: 0;
}
.cal-chip {
  display: grid;
  grid-template-columns: 6px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  width: 100%;
  text-align: left;
  border: 0;
  text-decoration: none;
  font: inherit;
  font-size: 11px;
  line-height: 1.25;
  padding: 3px 4px;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  background: transparent;
  color: var(--ink);
  transition: background-color 140ms ease;
}
.cal-chip:hover { background: #eef3f8; }
.cal-chip i {
  width: 6px;
  height: 6px;
  margin-top: 4px;
  border-radius: 99px;
  background: currentColor;
}
.cal-chip span { min-width: 0; display: grid; gap: 0; }
.cal-chip b, .cal-chip small {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 600;
}
.cal-chip small { display: none; font-weight: 500; color: var(--muted); }
.cal.is-week .cal-chip small { display: block; }
.cal-chip.is-dragging { opacity: 0.45; }
.cal-chip.is-done { color: #1f7a4d; }
.cal-chip.is-done i { background: #1f7a4d; }
.cal-chip.is-work { color: #004382; }
.cal-chip.is-work i { background: #004382; }
.cal-chip.is-late { color: #b42318; }
.cal-chip.is-late i { background: #b42318; }
.cal-chip.is-wait { color: #5a6f85; }
.cal-chip.is-wait i { background: #5a6f85; }
.cal-chip.is-idle { color: #5c6570; }
.cal-chip.is-idle i { background: #8a949e; }
.cal-more {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: auto;
  margin: 1px 0 0;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  color: #004382;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cal-more:hover,
.cal-more[aria-expanded="true"] {
  color: #003066;
  background: transparent;
}
.cal-day-pop,
.cal-day-pop:popover-open,
.cal-day-pop.is-floating {
  position: fixed;
  inset: auto;
  margin: 0;
  z-index: 80;
  width: min(320px, calc(100vw - 16px));
  max-height: min(360px, calc(100vh - 24px));
  height: fit-content;
  overflow: auto;
  background: #fff;
  border: 1px solid #d7dee6;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(16, 36, 56, 0.16);
  padding: 10px;
  opacity: 0;
  transform: translateY(6px) scale(0.98);
  filter: blur(2px);
  transition: opacity 180ms ease, transform 180ms ease, filter 180ms ease;
}
.cal-day-pop.is-ready {
  opacity: 1;
  transform: none;
  filter: none;
}
.cal-day-pop-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e8edf2;
}
.cal-day-pop-head strong {
  display: block;
  font-size: 14px;
  font-weight: 650;
  color: var(--ink);
}
.cal-day-pop-head span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}
.cal-day-pop-list {
  display: grid;
  gap: 4px;
}
.cal-day-pop-list .cal-chip {
  padding: 7px 6px;
  border-radius: 6px;
}
.cal-day-pop-list .cal-chip:hover { background: #f2f6fa; }
.cal-day-pop-list .cal-chip small { display: block; }
.cal-event-pop,
.cal-event-pop:popover-open,
.cal-event-pop.is-floating {
  --spot-x: 50%;
  --spot-y: 40%;
  position: fixed;
  inset: auto;
  margin: 0;
  z-index: 85;
  width: min(280px, calc(100vw - 16px));
  height: fit-content;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 8px;
  background: rgba(252, 253, 255, 0.78);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 18px 48px rgba(16, 36, 56, 0.16);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  padding: 0;
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  filter: blur(3px);
  transition: opacity 200ms ease, transform 220ms cubic-bezier(0.22, 1, 0.36, 1), filter 200ms ease;
}
.cal-event-pop.is-ready {
  opacity: 1;
  transform: none;
  filter: none;
}
.cal-event-pop-spot {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    140px circle at var(--spot-x) var(--spot-y),
    rgba(0, 67, 130, 0.1),
    transparent 70%
  );
  opacity: 0.9;
  transition: background 80ms linear;
}
.cal-event-pop-body {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  padding: 14px 14px 12px;
}
.cal-event-pop-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #6a7684;
}
.cal-event-pop-title {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.3;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.cal-event-pop-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}
.cal-event-pop-meta i {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  flex: none;
  background: #8a949e;
}
.cal-event-pop-meta i.is-done { background: #1f7a4d; }
.cal-event-pop-meta i.is-work { background: #004382; }
.cal-event-pop-meta i.is-late { background: #b42318; }
.cal-event-pop-meta i.is-wait { background: #5a6f85; }
.cal-event-pop-meta i.is-idle { background: #8a949e; }
.cal-event-pop-go {
  margin-top: 4px;
  justify-self: start;
  border: 0;
  border-radius: 6px;
  padding: 7px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  color: #fff;
  background: #004382;
  cursor: pointer;
  transition: transform 140ms ease, background-color 140ms ease;
}
.cal-event-pop-go:hover { background: #003066; }
.cal-event-pop-go:active { transform: scale(0.97); }
.cal-agenda { display: grid; gap: 8px; }
.cal-row { display: flex; gap: 10px; align-items: center; background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; color: inherit; cursor: pointer; }
.cal-row.is-on { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.cal-row input[type="date"] { width: 148px; background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 8px; }
.cal-row a { margin-left: 4px; font-weight: 400; text-decoration: none; }
.cal-row:hover { border-color: #b7c6d9; }
.cal-row > i { width: 8px; height: 8px; border-radius: 99px; flex: none; }
.cal-row > i.is-done { background: #0e7a45; }
.cal-row > i.is-work { background: #004382; }
.cal-row > i.is-late { background: #b42318; }
.cal-row > i.is-wait { background: #5a6f85; }
.cal-row > i.is-idle { background: #5c6570; }
.cal-row span { display: grid; min-width: 0; }
.cal-row small { color: var(--muted); }
.cal-row .pill { margin-left: auto; }
@media (max-width: 720px) {
  .cal-day { min-height: 92px; }
}

button.plus, button.handle {
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 99px;
  background: white;
  color: var(--blue);
  border: 1px solid #b7c6d9;
  display: inline-grid;
  place-items: center;
}
button.plus svg, button.handle svg { width: 14px; height: 14px; }
button.handle { border: 0; background: transparent; color: #8b97a3; cursor: var(--cursor-grab); border-radius: 4px; }
button.handle:active { cursor: var(--cursor-hold); }
button.handle:hover, button.plus:hover { background: var(--blue-soft); color: var(--blue); }
.cronograma .cols th:first-child,
.cronograma tbody td:first-child { padding-left: 28px; }
.cronograma.is-selectable .cols th:first-child,
.cronograma.is-selectable tbody td:first-child {
  padding-left: 8px;
  padding-right: 8px;
}
.cronograma.is-selectable .cols th.sel-col + th,
.cronograma.is-selectable tbody td.sel-col + td { padding-left: 28px; }
.cronograma tbody td:first-child { position: relative; }
.cronograma.is-selectable tbody td:first-child { position: static; }
.cronograma.is-selectable tbody td.sel-col + td { position: relative; }
.cronograma tbody td { padding: 12px 16px; transition: padding-top 200ms cubic-bezier(0.2, 0.8, 0.2, 1), padding-bottom 200ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.cronograma.is-selectable tbody td.sel-col {
  box-sizing: border-box;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  padding: 12px 8px;
  text-align: center;
  vertical-align: middle;
  overflow: visible;
}
.cronograma.is-selectable .cols th.sel-col {
  box-sizing: border-box;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  padding: 0 8px;
  text-align: center;
}
.cronograma.is-selectable col.sel-col {
  width: 44px;
}
.cronograma button.plus {
  position: absolute;
  left: 4px;
  top: 0;
  width: 22px;
  height: 22px;
  transform: translateY(-50%) scale(0.86);
  z-index: 3;
  padding: 0;
  opacity: 0;
  transition: opacity 160ms ease, transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1), background-color var(--ease);
}
.cronograma button.plus:hover,
.cronograma button.plus:focus-visible {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}
.cronograma button.plus.is-end { top: auto; bottom: 0; transform: translateY(50%) scale(0.86); }
.cronograma button.plus.is-end:hover,
.cronograma button.plus.is-end:focus-visible { transform: translateY(50%) scale(1); }
.cronograma tr.gap button.plus { position: static; opacity: 1; transform: none; }
button.bitacora, button.bitacora:hover {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  font-weight: 400;
}
button.bitacora.is-add, button.bitacora.is-add:hover { color: #8a9096; }
button.bitacora.is-set, button.bitacora.is-set:hover { color: #004382; font-weight: 400; }
button.bitacora svg { width: 16px; height: 16px; flex: none; }
.bitacora-empty { color: var(--muted); }
.kind-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kind-pick button, .kind-pick button:hover {
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
  font-weight: 400;
}
.kind-pick button.is-on, .kind-pick button.is-on:hover { background: #004382; color: white; border-color: #004382; }
.file-pick {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px dashed #b7c6d9;
  border-radius: var(--radius);
  background: #f7f9fb;
  color: #004382;
  cursor: pointer;
}
.file-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.file-pick small { color: var(--muted); font-weight: 400; }
.bitacora-meta { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.bitacora-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.bitacora-table { width: 100%; min-width: 0; border-collapse: collapse; font-size: 13px; }
.bitacora-table th, .bitacora-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); }
.bitacora-table tbody tr { cursor: pointer; }
.bitacora-table tbody tr:hover td { background: #f4f7fb; }
.bitacora-table td.clip { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bitacora-copy {
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.bitacora-view .bitacora-link { margin: 14px 0 0; }
.bitacora-photo {
  margin: 16px 0 0;
}
.bitacora-photo img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f4f7fb;
}
dialog.modal.is-evidence-view {
  width: min(960px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
}
dialog.modal.is-evidence-view .evidence-photo {
  margin: 12px 0 0;
}
dialog.modal.is-evidence-view .evidence-photo img {
  max-height: min(78vh, 820px);
  width: 100%;
  background: #111827;
}
dialog.modal.is-evidence-view .evidence-frame {
  display: block;
  width: 100%;
  height: min(78vh, 820px);
  margin: 12px 0 0;
  border: 1px solid #d3e0ec;
  border-radius: 6px;
  background: #f7fafc;
}
dialog.modal.is-evidence-view .evidence-frame[hidden] { display: none; }
.bitacora-view .modal-actions { margin-top: 18px; }
.bitacora-view .modal-actions .danger { margin-right: auto; }
.confirm-copy { margin: 0; color: var(--ink); line-height: 1.45; }
#confirm-dialog .confirm-ok.danger, #confirm-dialog .confirm-ok.danger:hover { background: var(--red); color: white; }
button.kebab {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: transparent;
  color: #8b97a3;
}
button.kebab svg { width: 16px; height: 16px; }
button.kebab:hover { background: var(--blue-soft); color: var(--blue); }
.cronograma td.more { width: 40px; text-align: right; padding-right: 8px; }
.row-menu {
  position: fixed;
  z-index: 40;
  min-width: 148px;
  padding: 4px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.row-menu button, .row-menu button:hover {
  width: 100%;
  display: block;
  text-align: left;
  background: white;
  color: var(--ink);
  border: 0;
  border-radius: 4px;
  padding: 8px 10px;
}
.row-menu button:hover { background: #f4f7fb; }
.row-menu button.is-danger, .row-menu button.is-danger:hover { color: var(--red); background: white; }
.row-menu button.is-danger:hover { background: #fdeceb; }
.cronograma tbody tr:last-child td { padding-bottom: 14px; }
.cronograma tr[draggable="true"],
.cronograma tr[draggable="true"]:active { cursor: var(--cursor-arrow); }
.cronograma tr[draggable="true"] button,
.cronograma tr[draggable="true"] input { cursor: pointer; }
.cronograma .status-field:not(.is-gated) .status-current,
.cronograma .status-field:not(.is-gated) .status-current:hover { cursor: var(--cursor-arrow-light); }
.cronograma tr.gap td { padding: 18px 12px; border-bottom: 0; background: transparent; }
.cronograma tbody td { transition: padding 160ms var(--ease); }
.cronograma tr.is-dragging td { opacity: 0.35; }
.cronograma tbody tr.is-drop-before td {
  padding-top: 34px;
  background-image: linear-gradient(#004382, #004382);
  background-size: 100% 3px;
  background-repeat: no-repeat;
  background-position: left top 14px;
}
.cronograma tbody tr.is-drop-after td {
  padding-bottom: 34px;
  background-image: linear-gradient(#004382, #004382);
  background-size: 100% 3px;
  background-repeat: no-repeat;
  background-position: left bottom 14px;
}
.drag-ghost {
  position: fixed;
  top: -240px;
  left: 0;
  z-index: 80;
  min-width: 220px;
  max-width: 360px;
  padding: 12px 16px;
  background: white;
  color: var(--ink);
  border: 1px solid #d5deea;
  border-left: 4px solid #004382;
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(17, 17, 17, 0.16);
  font-size: 14px;
  font-weight: 400;
  pointer-events: none;
}
.drag-ghost b {
  display: block;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
button.danger { background: white; color: var(--red); border: 1px solid #f0c7c3; }
button.danger:hover { background: #fdeceb; }
.modal-actions .danger { margin-right: auto; }
.team td small { display: block; color: var(--muted); font-size: 12px; }
.team td a { color: inherit; text-decoration: none; }
.team td a:hover { color: var(--blue); }
.late-text { color: var(--red); font-weight: 400; }
.meter { display: block; width: 88px; height: 8px; border-radius: 99px; background: #e7eef6; overflow: hidden; }
.meter i { display: block; height: 100%; background: #004382; border-radius: 99px; }
.meter.is-hot i { background: #b42318; }

button.date-btn, button.date-btn:hover {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 32px;
  padding: 0;
  background: transparent;
  color: var(--ink);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-weight: 400;
  text-align: left;
}
.cronograma button.date-btn, .cronograma button.date-btn:hover {
  width: auto;
  justify-content: center;
  gap: 8px;
}
button.date-btn svg { width: 16px; height: 16px; color: var(--blue); flex: none; }
.date-pop {
  position: fixed;
  z-index: 50;
  width: 304px;
  padding: 0;
  overflow: hidden;
  background: white;
  color: var(--ink);
  border: 1px solid #d7e2ec;
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(0, 67, 130, 0.18);
}
.date-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 12px 10px;
  background: linear-gradient(180deg, #004382 0%, #003566 100%);
  color: white;
}
.date-title { text-align: center; line-height: 1.15; }
.date-title strong { display: block; font-size: 15px; font-weight: 650; letter-spacing: 0.01em; }
.date-title span { display: block; font-size: 12px; opacity: 0.82; font-weight: 500; }
.date-pop button, .date-pop button:hover {
  background: transparent;
  color: var(--ink);
  border: 0;
  box-shadow: none;
  font-weight: 500;
}
.date-head button, .date-head button:hover {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 99px;
  color: white;
  display: grid;
  place-items: center;
}
.date-head button:hover { background: rgba(255, 255, 255, 0.16); }
.date-head svg { width: 16px; height: 16px; }
.date-week, .date-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: 0 10px;
}
.date-week { padding-top: 10px; }
.date-week span { text-align: center; font-size: 11px; font-weight: 650; color: #6b7c8c; padding: 4px 0 6px; }
.date-grid {
  padding-bottom: 6px;
  min-height: 216px;
  align-content: start;
}
.date-grid button, .date-grid button:hover {
  width: 34px;
  height: 34px;
  margin: 0 auto;
  padding: 0;
  border-radius: 99px;
  font-weight: 550;
}
.date-grid button:hover { background: #e8f1f8; color: #004382; }
.date-grid button.is-today { box-shadow: inset 0 0 0 1.5px #004382; color: #004382; font-weight: 700; }
.date-grid button.is-on, .date-grid button.is-on:hover { background: #004382; color: white; box-shadow: none; }
.date-foot {
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 8px 10px 10px;
  border-top: 1px solid #e6eef5;
  background: #f7fafc;
}
.date-foot button, .date-foot button:hover { color: #004382; padding: 6px 10px; font-weight: 650; border-radius: 8px; }
.date-foot button:hover { background: #e8f1f8; }
.date-foot .date-today { background: #004382; color: white; }
.date-foot .date-today:hover { background: #003566; color: white; }
.lane .jobs::-webkit-scrollbar-button,
.lane .jobs::-webkit-scrollbar-button:single-button,
.lane .jobs::-webkit-scrollbar-button:vertical:start:decrement,
.lane .jobs::-webkit-scrollbar-button:vertical:end:increment { display: block; width: 0; height: 0; background: transparent; border: 0; }

@media (max-width: 900px) {
  .payroll-bar { flex-wrap: wrap; }
  .payroll-actions { margin-left: 0; width: 100%; justify-content: flex-end; }
  dialog.modal.is-drawer {
    width: 100vw;
    border-radius: 0;
  }
  dialog.modal.is-drawer .modal-head { border-radius: 0; }
  .pay-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pay-filters .pay-filter { width: min(180px, 100%); }
  .pay-pie-layout { grid-template-columns: 1fr; justify-items: start; }
  .pay-rank li { grid-template-columns: 1fr auto; }
  .pay-rank-track { grid-column: 1 / -1; }
  .create-menu { justify-content: space-around; }
  .finder { padding: 10px 14px; }
  .finder-wrap { width: min(220px, 54vw); }
  .finder-menu { left: auto; right: 0; width: min(420px, calc(100vw - 28px)); }
  .form-grid, .dash-grid, .cal-board { grid-template-columns: 1fr; }
  .cal-nav { justify-content: flex-start; }
  .ring-wrap { align-items: flex-start; }
  .phase-block { align-items: flex-start; flex-direction: column; gap: 4px; }
  .phase-block strong { font-size: 22px; }
  .client-stats { grid-template-columns: 1fr 1fr; }
  .client-search { margin-left: 0; flex: 1 1 220px; }
}

.book-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.book-nav a {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
}
.book-nav a:hover { background: var(--blue-soft); color: var(--blue-2); }
.book-nav a[aria-current="page"] { background: var(--blue); border-color: var(--blue); color: white; }
.book-head { margin-bottom: 16px; }
.book-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.book-title h1 { margin: 0; }
.book-year { display: flex; align-items: center; gap: 8px; }
.book-year .pick { min-width: 96px; }
.book-year .pick-btn { min-height: 34px; font-size: 15px; font-weight: 650; }
form.book-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin: 0 0 16px;
}
form.book-form label { flex: 1 1 180px; }
form.book-form label.book-filter { flex: 0 1 220px; }
form.book-form button { flex: 0 0 auto; }
.payroll-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 16px;
  margin: 0 0 16px;
}
.payroll-bar .book-form { flex: 1 1 auto; margin: 0; }
.payroll-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 14px;
  min-width: 0;
}
.payroll-filters .book-filter { margin: 0; min-width: 160px; }
.payroll-filters .book-filter .pick { min-width: 168px; }
.payroll-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  margin-left: auto;
}
.payroll-year { min-width: 104px; }
.payroll-year .pick { min-width: 96px; }
.payroll-year .pick-btn {
  min-height: 38px;
  font-size: 14px;
  font-weight: 400;
}
button.payroll-analysis {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  white-space: nowrap;
}
button.payroll-analysis svg { width: 16px; height: 16px; }
dialog.modal.is-drawer {
  top: 0;
  right: 0;
  left: auto;
  bottom: 0;
  width: min(calc(50vw + 400px), 100vw);
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  border-radius: 0;
  border-right: 0;
  transform: none;
  box-shadow: -24px 0 56px rgba(17, 24, 39, 0.18);
  overflow: auto;
}
dialog.modal.is-drawer.is-menu-open {
  overflow: visible;
}
dialog.modal.is-drawer .pick-menu.is-floating,
dialog.modal.is-drawer .status-menu.is-floating,
dialog.modal.is-drawer .row-menu.is-floating {
  position: absolute;
  z-index: 60;
}
dialog.modal.is-drawer[open] {
  animation: drawer-in 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
dialog.modal.is-drawer[open].is-closing {
  animation: none;
  opacity: 1;
  transform: translateX(100%);
}
@keyframes drawer-in {
  from { transform: translateX(100%); }
  to { transform: none; }
}
dialog.modal.is-drawer .modal-sheet {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 0 22px 28px;
}
dialog.modal.is-drawer .modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 0 -22px 16px;
  border-radius: 0;
}
.pay-kicker { margin: 0 0 14px; color: var(--blue); }
.pay-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 10px 12px;
  margin: 0 0 12px;
  position: relative;
  z-index: 2;
}
.pay-filter {
  margin: 0;
  flex: 0 0 auto;
  width: 180px;
}
.pay-filter .pick { width: 100%; min-width: 0; }
.pay-filter.is-off {
  display: grid;
  gap: 6px;
  color: #004382;
  font-size: 14px;
  width: 180px;
}
.pay-filter.is-off .pick-btn {
  justify-content: flex-start;
  opacity: 0.55;
  cursor: default;
}
.pay-subhead { margin: 4px 0 8px; font-size: 15px; color: #004382; }
.pay-pie-wrap { margin: 0 0 14px; }
.pay-pie-layout {
  display: grid;
  grid-template-columns: minmax(300px, 460px) minmax(220px, 1fr);
  gap: 18px 24px;
  align-items: center;
}
.pay-pie-wrap .pay-pie {
  width: 100%;
  max-width: 460px;
  height: auto;
}
.pay-pie .pay-slice { cursor: pointer; transition: opacity 180ms ease; }
.pay-pie .pay-slice:hover { opacity: 0.92; }
.pay-pie .pay-slice.is-on { filter: brightness(1.05); }
.pay-pie-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.pay-pie-list button,
.pay-pie-list button:hover {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  background: #f7f9fb;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-align: left;
  box-shadow: none;
  font-weight: 400;
}
.pay-pie-list button:hover { background: #eef4fa; border-color: #b7c6d9; }
.pay-pie-list li.is-on button,
.pay-pie-list li.is-on button:hover {
  background: #e8f0f8;
  border-color: #004382;
}
.pay-pie-list i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex: none;
}
.pay-pie-list .pay-pie-name { min-width: 0; color: #004382; font-weight: 600; }
.pay-pie-list b { font-variant-numeric: tabular-nums; color: #111; }
.pay-pie-list small { color: var(--muted); min-width: 36px; text-align: right; }
.pay-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.pay-stats article {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7f9fb;
  min-width: 0;
}
.pay-stats span { color: var(--muted); font-size: 17px; display: block; }
.pay-stats small { color: var(--muted); font-size: 12px; display: block; margin-top: 2px; }
.pay-stats b {
  color: #004382;
  font-variant-numeric: tabular-nums;
  display: block;
  margin-top: 2px;
  font-weight: 600;
}
.pay-block { margin-top: 20px; }
.pay-block h3 { margin: 0; font-size: 16px; color: #004382; }
.pay-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
  flex-wrap: wrap;
}
.pay-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  box-shadow: none;
}
.pay-switch:hover { background: transparent; color: var(--ink); }
.pay-switch i {
  width: 36px;
  height: 22px;
  border-radius: 99px;
  background: #d5dde6;
  position: relative;
  flex: none;
  transition: background 160ms ease;
}
.pay-switch i::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.22);
  transition: transform 160ms ease;
}
.pay-switch.is-on { color: #004382; }
.pay-switch.is-on i { background: #004382; }
.pay-switch.is-on i::after { transform: translateX(14px); }
.pay-people {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}
.pay-people button, .pay-people button:hover {
  margin: 0;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  box-shadow: none;
  cursor: pointer;
}
.pay-people button:hover { background: #f7f9fb; border-color: #b7c6d9; }
.pay-people button.is-on, .pay-people button.is-on:hover {
  background: #004382;
  border-color: #004382;
  color: white;
}
.pay-chart-wrap { position: relative; }
.pay-svg { width: 100%; height: auto; display: block; font-family: "Segoe UI", system-ui, sans-serif; }
.pay-svg text { font-weight: 400; }
.pay-bar { cursor: pointer; }
.pay-amt { font-variant-numeric: tabular-nums; }
.pay-legend { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; color: var(--muted); font-size: 12px; flex-wrap: wrap; }
.pay-legend i { width: 12px; height: 12px; border-radius: 2px; background: #8aabc8; }
.pay-legend i.is-now { background: #003366; margin-left: 8px; }
.pay-note { margin: 10px 0 0; }
.pay-rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pay-rank li { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(80px, 1.2fr) auto; gap: 10px; align-items: center; }
.pay-rank-name { min-width: 0; line-height: 1.3; }
.pay-rank li.is-on .pay-rank-name { color: #004382; }
.pay-rank-track { height: 10px; background: #e7eef6; border-radius: 99px; overflow: hidden; }
.pay-rank-track i { display: block; height: 100%; border-radius: 99px; }
.pay-rank-val { min-width: 96px; text-align: right; font-variant-numeric: tabular-nums; }
.book-wrap table { min-width: 1120px; }
.book-wrap.is-income table { min-width: 1480px; }
.book-table th, .book-table td { white-space: nowrap; }
.book-table td.num, .book-table th { text-align: center; }
.book-table td.num { font-variant-numeric: tabular-nums; }
.book-wrap:not(.is-income) .book-table th:not(.sticky):not(.sel-col),
.book-wrap:not(.is-income) .book-table td:not(.sticky):not(.sel-col) {
  width: 88px;
  max-width: 96px;
  padding-left: 6px;
  padding-right: 6px;
}
.book-table td.sticky, .book-table th.sticky {
  position: sticky;
  left: 0;
  z-index: 1;
  text-align: left;
  background: white;
  box-shadow: 1px 0 0 var(--line);
  white-space: normal;
  max-width: 336px;
  width: 336px;
}
.book-table thead th.sticky { z-index: 2; background: #004382; color: white; }
.book-wrap .book-table th.sel-col,
.book-wrap .book-table td.sel-col {
  position: sticky;
  left: 0;
  z-index: 3;
  width: 28px;
  max-width: 28px;
  min-width: 28px;
  padding: 8px 4px 8px 6px;
  text-align: left;
  background: white;
}
.book-wrap .book-table thead th.sel-col { z-index: 5; background: #004382; }
.book-table:has(.sel-col) td.sticky,
.book-table:has(.sel-col) th.sticky { left: 28px; }
.book-table tbody tr:hover td.sticky { background: #f7fbf8; }
.book-table tbody tr.is-picked td.sticky,
.book-table tbody tr.is-picked:hover td.sticky { background: #e7eef6; }
.book-table td.is-now { background: #f4f8fc; }
.book-table input.cell {
  border-color: transparent;
  background: transparent;
  min-width: 64px;
  padding: 6px 4px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.book-table .pay-soles {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
  font-variant-numeric: tabular-nums;
}
.book-table .pay-soles-mark {
  color: var(--muted);
  font-size: 11px;
  flex: none;
}
.book-table .pay-soles input.cell {
  min-width: 0;
  width: 4.6ch;
  flex: 0 0 auto;
  padding-left: 0;
  padding-right: 0;
  text-align: left;
}
.book-table input.cell.text { text-align: left; min-width: 140px; }
.book-table .person-cell {
  display: block;
  max-width: 100%;
}
.book-table td.pay-actions,
.book-table th.pay-actions {
  width: 44px;
  max-width: 44px;
  padding-left: 4px;
  padding-right: 8px;
  text-align: center;
  white-space: nowrap;
}
.book-table td.pay-actions .row-more { display: inline-flex; justify-content: center; }
.book-table .person-name {
  min-width: 0;
  padding: 6px 2px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  word-break: break-word;
}
.book-table input.cell:focus { background: white; border-color: var(--blue); }
.book-table .pick { min-width: 132px; }
.book-table td.is-paid .pick-btn,
.book-table td.is-paid .pick-btn:hover { background: #e5f6ec; color: #0e7a45; border-color: #b7e4c7; }
.book-table td.is-due .pick-btn,
.book-table td.is-due .pick-btn:hover { background: var(--red-soft); color: var(--red); border-color: #f3c7c4; }
.book-table td.pay-year-total {
  background: #eef7f1;
  color: #0f6b3c;
  font-weight: 650;
}
.book-table tr:nth-child(even) td.pay-year-total { background: #e4f2ea; }
.book-table tr.is-total td.pay-year-total,
.book-table tr.is-total:hover td.pay-year-total {
  background: #0f6b3c;
  color: #fff;
  font-weight: 650;
}
.book-table tr.is-total td,
.book-table tr.is-total:hover td { background: #004382; color: white; font-weight: 400; }
.book-table tr.is-result td,
.book-table tr.is-result:hover td { background: #0a4a86; color: white; font-weight: 400; }
.book-table tr.is-net td,
.book-table tr.is-net:hover td { background: #062844; color: white; font-weight: 400; }
.book-table tr.is-total td.sticky,
.book-table tr.is-result td.sticky,
.book-table tr.is-net td.sticky,
.book-table tr.is-total:hover td.sticky,
.book-table tr.is-result:hover td.sticky,
.book-table tr.is-net:hover td.sticky { color: white; }
.book-table tr.is-total td.sticky,
.book-wrap .book-table tr.is-total td.sel-col,
.book-wrap .book-table tr.is-total:hover td.sel-col { background: #004382; }
.book-table tr.is-result td.sticky,
.book-wrap .book-table tr.is-result td.sel-col,
.book-wrap .book-table tr.is-result:hover td.sel-col { background: #0a4a86; }
.book-table tr.is-net td.sticky,
.book-wrap .book-table tr.is-net td.sel-col,
.book-wrap .book-table tr.is-net:hover td.sel-col { background: #062844; }
.book-table tr.is-total a,
.book-table tr.is-result a,
.book-table tr.is-net a { color: white; }
.book-table tr.is-band td,
.book-table tr.is-band:hover td { background: #e7eef6; color: var(--blue-2); font-weight: 400; }
.book-table tr.is-sub td,
.book-table tr.is-sub:hover td { background: #f4f7fb; font-weight: 400; }
.book-table tr.is-sub td.sticky,
.book-table tr.is-sub:hover td.sticky { background: #f4f7fb; }
.book-band { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: flex-end; }
.book-band > div { display: flex; gap: 10px; align-items: baseline; min-width: 220px; }
.book-band span, .book-band b { font-weight: 400; }
.book-band label { min-width: 160px; }
.book-band input.cell { background: white; border-color: var(--line); }
.book-table td.evidence { display: flex; gap: 8px; align-items: center; }
.book-table tr.book-add td { background: #fbfcfc; }
button.tiny, button.tiny:hover { padding: 6px 10px; font-size: 13px; }

.client-top { align-items: center; }
.client-top h1 { margin: 0; }
.more-btn, .more-btn:hover { display: inline-flex; align-items: center; gap: 8px; }
.more-btn .ico { width: 16px; height: 16px; }
.client-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.client-stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  min-height: 0;
  box-shadow: none;
  display: grid;
  gap: 2px;
  align-content: start;
}
.client-stat h3 { margin: 0; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.client-stat p { margin: 0; }
.client-stat .muted { margin: 0; font-size: 11px; line-height: 1.3; }
.client-stat .figure { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.client-stat .figure b { font-size: 22px; line-height: 1; letter-spacing: -0.02em; }
.delta {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 99px;
  background: #e8ecf0;
  color: #3d4650;
  font-size: 12px;
  font-weight: 400;
}
.delta.is-up { background: #e5f6ec; color: #0e7a45; }
.delta.is-down { background: var(--red-soft); color: var(--red); }
.client-tip { border-color: #c5d0dc; }
.client-tip p { margin: 8px 0 12px; color: var(--muted); font-size: 13px; font-weight: 400; }
button.text-link, button.text-link:hover {
  background: transparent;
  color: var(--blue);
  border: 0;
  border-radius: 0;
  padding: 0;
  font-weight: 400;
}
button.text-link:hover { text-decoration: underline; }
.client-bar h2 { font-size: 16px; margin: 0 0 10px; }
.client-bar-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.client-bar-row .pager { margin: 0 0 0 auto; }
.client-pills { display: flex; flex-wrap: wrap; gap: 8px; }
button.chip, button.chip:hover {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  color: var(--ink);
  border: 1px solid #c5cdd6;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 400;
}
button.chip.is-set, button.chip.is-set:hover { background: #e7ebef; border-color: #e7ebef; }
.chip-plus {
  width: 18px;
  height: 18px;
  border-radius: 99px;
  display: grid;
  place-items: center;
  background: #eef1f4;
  color: #3d4650;
  font-weight: 400;
  line-height: 1;
}
.chip-bar { color: #8b97a3; font-weight: 400; }
label.client-search {
  margin-left: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 380px;
  max-width: 100%;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: white;
  font-weight: 400;
}
label.client-search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 67, 130, 0.16); }
label.client-search .ico { width: 16px; height: 16px; color: var(--muted); }
label.client-search input { border: 0; box-shadow: none; padding: 8px 0; width: auto; flex: 1; min-width: 0; background: transparent; }
label.client-search input:focus { box-shadow: none; }
.client-menu { min-width: 196px; }
.client-board .client-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  flex: none;
}
.client-board .person-stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.client-board .person-panel {
  max-height: min(58vh, 560px);
}
.client-board .person-row.client-obra {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 6px 12px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f6;
  background: white;
  text-decoration: none;
  color: inherit;
}
.client-board .person-row.client-obra:last-child { border-bottom: 0; }
.client-board .person-row.client-obra:hover { background: #f7fafc; }
.client-board .person-row.client-obra .person-row-main {
  display: grid;
  gap: 2px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.client-board .person-row.client-obra .person-row-main:hover strong { color: var(--blue); }
.client-obra-money {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.client-obra-side {
  display: grid;
  justify-items: end;
  gap: 6px;
}
.client-card-list {
  display: grid;
  gap: 8px;
}
.client-card {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.client-card-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.client-card-main strong {
  font-size: 14px;
  letter-spacing: -0.01em;
}
.client-card-main .muted,
.client-card-main span { font-size: 12px; color: var(--muted); }
.client-card-files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}
.client-card-files a {
  font-size: 13px;
  font-weight: 600;
}
.client-notes {
  display: grid;
  gap: 8px;
  align-content: start;
}
.client-notes-add {
  justify-self: start;
  min-height: 34px;
  padding: 7px 12px;
}
.client-notes-box {
  display: grid;
  gap: 6px;
}
.client-notes-box[hidden] { display: none !important; }
.client-ficha-form {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
.client-ficha-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}
@media (max-width: 900px) {
  .client-board .person-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .client-board .person-hero { align-items: flex-start; flex-direction: column; }
  .client-board .client-hero-actions { width: 100%; }
  .client-board .person-row.client-obra {
    grid-template-columns: 56px minmax(0, 1fr);
  }
  .client-obra-side {
    grid-column: 2;
    justify-items: start;
  }
}
@media (max-width: 640px) {
  .client-board .person-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.client-contract-field {
  display: grid;
  gap: 8px;
  justify-items: start;
}
.client-contract.file-pick {
  width: 100%;
  margin: 2px 0 0;
}
.client-contract .file-face {
  font-weight: 700;
  color: #004382;
}
dialog.modal.is-contract-view {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow: hidden;
}
dialog.modal.is-contract-view .modal-sheet {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 40px);
  overflow: hidden;
  padding-bottom: 14px;
}
.client-contract-frame-wrap {
  flex: 1;
  min-height: min(68vh, 640px);
  margin: 0 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #f4f7fb;
}
.client-contract-frame,
.client-contract-image {
  display: block;
  width: 100%;
  height: min(68vh, 640px);
  border: 0;
  background: white;
}
.client-contract-image {
  object-fit: contain;
  padding: 12px;
}
.client-sheet { min-width: 1280px; }
.client-sheet thead th,
.client-sheet th {
  background: #004382;
  color: white;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: none;
  border-bottom-color: #003566;
  padding: 13px 14px;
}
.client-sheet td { text-align: left; }
.client-sheet th.check, .client-sheet td.check { width: 44px; text-align: center; }
.client-sheet th.more, .client-sheet td.more { width: 48px; text-align: right; padding-right: 10px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.client-sheet input[type="checkbox"] { width: 16px; height: 16px; accent-color: #004382; }
.client-sheet tr.empty td { text-align: center; color: var(--muted); padding: 36px 16px; }
.client-sheet button.th-sort, .client-sheet button.th-sort:hover {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: white;
  border: 0;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
}
.client-sheet button.th-sort:hover { color: white; background: transparent; }
.sort-ico { width: 10px; height: 14px; }
.sort-ico .up, .sort-ico .down { fill: rgba(255, 255, 255, 0.45); }
.sort-ico.is-asc .up, .sort-ico.is-desc .down { fill: white; }
.client-sheet th.more { color: transparent; }
.st-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 400;
  background: #eef1f4;
  color: #3d4650;
}
.st-pill.active { background: #e5f6ec; color: #0e7a45; }
.st-pill.design { background: var(--blue-soft); color: var(--blue-2); }
.st-pill.paused { background: var(--amber-soft); color: var(--amber); }
.st-pill.done { background: #e8f6ee; color: #0e7a45; }
.st-pill.voided { background: var(--red-soft); color: var(--red); }
.st-pill.closed { background: #eef1f4; color: #5c6166; }
.sit-motivo { margin-top: 4px; }
.sit-motivo summary {
  cursor: pointer;
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
  list-style: none;
}
.sit-motivo summary::-webkit-details-marker { display: none; }
.sit-motivo p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  max-width: 220px;
}
@media (max-width: 1100px) {
  .client-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .client-stats { grid-template-columns: 1fr; }
  label.client-search { width: 100%; }
}

.person-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 14px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.person-back:hover { color: var(--blue); }
.person-back .ico { width: 16px; height: 16px; }
.person-head { display: flex; align-items: center; gap: 16px; margin: 0 0 16px; }
.person-board { animation: crew-in 360ms var(--ease); }
.person-board.is-cockpit {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}
.person-board.is-cockpit .person-back {
  margin: 0;
  width: 32px;
  height: 32px;
  justify-content: center;
  border-radius: 50%;
  background: #eef3f8;
  color: var(--blue);
}
.person-board.is-cockpit .person-hero {
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  gap: 12px;
}
.person-board.is-cockpit .person-avatar { width: 42px; height: 42px; font-size: 16px; }
.person-board.is-cockpit .person-id h1 { font-size: 20px; margin: 0; }
.person-board.is-cockpit .person-contact { display: inline; }
.person-brief { display: grid; gap: 6px; }
.person-board.is-cockpit .person-insight,
.person-board.is-cockpit .person-next,
.person-board.is-cockpit .person-focus {
  margin: 0;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
}
.person-board.is-cockpit .person-insight { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.person-board.is-cockpit .person-stats {
  margin: 0;
  gap: 6px;
}
.person-board.is-cockpit .person-stat {
  padding: 8px 10px;
  border-radius: 10px;
  box-shadow: none;
}
.person-board.is-cockpit .person-stat strong { font-size: 20px; }
.person-board.is-cockpit .person-hint { font-size: 11px; }
.person-board.is-cockpit .person-health {
  margin: 0;
  padding: 8px 12px;
  border-radius: 10px;
  box-shadow: none;
}
.person-health.is-slim .health-bar { margin-bottom: 6px; height: 8px; }
.person-health.is-slim .health-legend { gap: 6px 12px; }
.person-health.is-slim .health-legend span { font-size: 11px; }
.person-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  background: #eef3f8;
  border: 1px solid var(--line);
  border-radius: 12px;
  position: sticky;
  top: 8px;
  z-index: 3;
}
.person-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.person-tab:hover,
.person-tab:focus-visible {
  background: #e2eaf3;
  color: var(--blue);
}
.person-tab b {
  min-width: 1.4em;
  padding: 1px 7px;
  border-radius: 99px;
  background: white;
  color: var(--ink);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.person-tab.is-on,
.person-tab.is-on:hover,
.person-tab.is-on:focus-visible {
  background: white;
  color: var(--blue);
  box-shadow: 0 1px 0 rgba(11, 61, 115, 0.08);
}
.person-panels {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #f7f9fb;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.person-panel {
  display: none;
  padding: 10px;
  max-height: min(46vh, 460px);
  overflow: auto;
  scroll-behavior: smooth;
  scrollbar-width: thin;
}
.person-panel.is-on {
  display: block;
}
.person-panel[hidden] {
  display: none !important;
}
.person-panel .person-groups { gap: 8px; }
.person-panel .person-group { box-shadow: none; }
.person-rows {
  display: grid;
  gap: 0;
  margin: 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.person-act-tree { display: grid; gap: 10px; }
.person-act-phase {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.person-act-phase-head,
.person-act-stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
}
.person-act-phase-head {
  background: #0b3d73;
  color: white;
}
.person-act-phase-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: white;
}
.person-act-phase-head b { color: rgba(255,255,255,0.85); font-variant-numeric: tabular-nums; }
.person-act-stage + .person-act-stage { border-top: 1px solid var(--line); }
.person-act-stage-head {
  background: #f4f7fb;
  border-bottom: 1px solid #e7eef6;
}
.person-act-stage-head h4 {
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
  color: #004382;
}
.person-act-stage-head b { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.person-act-rows .person-act {
  border-top: 0;
  border-bottom: 1px solid #eef2f6;
  padding: 10px 12px;
  border-radius: 0;
}
.person-act-rows .person-act:last-child { border-bottom: 0; }
.person-act-rows .person-act.is-front { background: #f3f7fb; }
.person-list-pane { display: grid; gap: 8px; }
.person-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.person-filters button {
  appearance: none;
  border: 1px solid var(--line);
  background: white;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 10px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.person-filters button b {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.person-filters button.is-on {
  background: #0b3d73;
  border-color: #0b3d73;
  color: white;
}
.person-filters button.is-on b { color: white; }
.person-list-meta {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.person-attention-acts {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed #d7e0ea;
}
a.person-row {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  gap: 6px 10px;
  align-items: center;
  padding: 8px 10px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid #eef2f6;
}
a.person-row:last-child { border-bottom: 0; }
a.person-row:hover { background: #f7fafc; }
.person-row-main {
  display: grid;
  gap: 1px;
  min-width: 0;
}
a.person-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  letter-spacing: -0.01em;
}
a.person-row .muted {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
a.person-row .pill { justify-self: end; }
a.person-row.is-past { background: #f8fafc; }
.person-clip {
  margin: 0;
  padding: 8px 14px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.person-empty.is-ok {
  margin: 0;
  padding: 18px 16px;
  background: #e8f6ee;
  border: 1px solid #c8e6d3;
  border-radius: 12px;
  color: #0e7a45;
  font-weight: 600;
}
.person-group .person-rows,
.person-more .person-rows {
  border: 0;
  border-radius: 0;
  border-top: 1px solid var(--line);
}
.person-more { margin: 0; padding: 0 12px 10px; border-top: 0; }
.person-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 14px;
  padding: 16px 18px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.person-hero-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.person-dial {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  padding: 8px 12px 8px 8px;
  border-radius: 999px;
  background: #f4f7fb;
  border: 1px solid #dbe5ef;
}
.person-dial .load-badge { margin: 0; grid-row: auto; }
.person-dial strong { display: block; font-size: 14px; letter-spacing: -0.02em; }
.person-dial span { color: var(--muted); font-size: 12px; font-weight: 600; }
.person-dial.is-hot { background: var(--red-soft); border-color: #f0d0cc; }
.person-dial.is-mid { background: var(--amber-soft); border-color: #f3ddc4; }
.person-dial.is-ok { background: #e8f6ee; border-color: #c8e6d3; }
.person-insight {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #0b3d73;
  color: white;
  font-weight: 600;
  line-height: 1.45;
  animation: crew-in 420ms var(--ease);
}
.person-next {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  font-weight: 600;
  line-height: 1.4;
  animation: crew-in 480ms var(--ease);
}
.person-next.is-hot { background: var(--red-soft); border-color: #f0d0cc; color: #8d1d14; }
.person-next.is-soon { background: var(--amber-soft); border-color: #f3ddc4; color: #7a3e08; }
.person-next.is-ok { background: #e8f6ee; border-color: #c8e6d3; color: #0e7a45; }
.person-health {
  margin: 0 0 24px;
  padding: 14px 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  animation: crew-in 500ms var(--ease);
}
.person-health .person-section { margin-bottom: 10px; }
.health-bar {
  display: flex;
  height: 12px;
  border-radius: 99px;
  overflow: hidden;
  background: #eef2f6;
  margin: 0 0 10px;
}
.health-bar.is-empty {
  display: grid;
  place-items: center;
  height: 40px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.health-bar i {
  display: block;
  height: 100%;
  transform-origin: left center;
  animation: health-grow 700ms var(--ease) both;
}
.health-bar .is-late { background: var(--red); }
.health-bar .is-soon { background: var(--amber); }
.health-bar .is-ok { background: #0e7a45; }
.health-bar .is-wait { background: #185a9d; }
.health-bar .is-idle { background: #9aa5b1; }
.health-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.health-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.health-legend b { color: var(--ink); font-variant-numeric: tabular-nums; }
.health-legend .is-late b { color: var(--red); }
.health-legend .is-soon b { color: var(--amber); }
.health-legend .is-ok b { color: #0e7a45; }
.health-legend .is-wait b { color: #185a9d; }
.person-group .person-projects {
  margin: 0;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--line);
}
.person-group.is-soon header,
.person-group.is-soon summary { background: #fff8ef; }
.person-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #004382;
  color: white;
  display: grid;
  place-items: center;
  flex: none;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.person-id { min-width: 0; }
.person-id p { margin: 2px 0 0; }
.person-focus {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #e8f1fb;
  border: 1px solid #d5e3f2;
  color: #12365f;
}
.person-focus.is-late { background: var(--red-soft); border-color: #f0d0cc; color: #8d1d14; }
.person-focus.is-soon { background: var(--amber-soft); border-color: #f3ddc4; color: #7a3e08; }
.person-focus.is-wait { background: #f4f8fc; border-color: #d5e3f2; color: #185a9d; }
.person-focus.is-quiet { background: white; border-color: var(--line); color: var(--muted); }
.person-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 28px;
}
.person-stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 14px 14px 12px;
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  animation: crew-in 520ms var(--ease) both;
}
.person-stat:nth-child(1) { animation-delay: 40ms; }
.person-stat:nth-child(2) { animation-delay: 80ms; }
.person-stat:nth-child(3) { animation-delay: 120ms; }
.person-stat:nth-child(4) { animation-delay: 160ms; }
.person-stat:nth-child(5) { animation-delay: 200ms; }
.person-more {
  margin: 0 12px 14px;
  border-top: 1px dashed #d7e0ea;
  padding-top: 10px;
}
.person-more summary {
  cursor: pointer;
  list-style: none;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  padding: 4px 2px 8px;
}
.person-more summary::-webkit-details-marker { display: none; }
.person-more .person-projects { margin: 0; }
.person-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.person-stat strong {
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.person-stat strong small { margin-left: 1px; font-size: 15px; font-weight: 600; color: var(--muted); }
.person-hint { color: var(--muted); font-size: 12px; font-weight: 500; }
.person-stat.is-bad strong { color: var(--red); }
.person-stat.is-good strong { color: #0e7a45; }
.person-stat.is-warn strong { color: var(--amber); }
.person-stat.is-empty strong { color: #8b939a; font-weight: 600; }
.person-stat .meter { width: 100%; margin-top: 6px; }
.person-section {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}
.person-section h2 { margin: 0; }
.person-section span { color: var(--muted); font-size: 13px; font-weight: 600; }
.person-projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin: 0 0 28px;
}
a.person-project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 10px;
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 14px;
  color: inherit;
  text-decoration: none;
}
a.person-project:hover { border-color: #b7c6d9; box-shadow: 0 8px 20px rgba(0, 67, 130, 0.08); }
.person-code { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: var(--blue); }
a.person-project strong { grid-column: 1 / -1; font-size: 16px; letter-spacing: -0.02em; }
a.person-project .muted { grid-column: 1 / -1; font-size: 13px; }
.person-mix { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.person-groups { display: grid; gap: 12px; }
.person-group {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.person-group.is-hot { border-color: #f0d0cc; }
.person-group.is-wait { border-color: #d5e3f2; }
.person-group header,
.person-group summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 14px 16px;
  font-size: inherit;
  font-weight: 600;
  color: inherit;
}
.person-group.is-hot header,
.person-group.is-hot summary { background: #fdf7f6; }
.person-group.is-now header { background: #f7fafc; }
.person-group.is-wait header,
.person-group.is-wait summary { background: #f4f8fc; }
.person-group.is-later header,
.person-group.is-later summary { background: #f7f8f9; }
.person-group summary { cursor: pointer; list-style: none; }
.person-group summary::-webkit-details-marker { display: none; }
.person-group summary::after {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  border-right: 2px solid #8b939a;
  border-bottom: 2px solid #8b939a;
  transform: rotate(45deg) translateY(-2px);
}
.person-group[open] summary::after { transform: rotate(225deg) translateY(-1px); }
.person-group-copy { flex: 1; min-width: 0; }
.person-group-copy h3 { margin: 0; font-size: 15px; }
.person-group-copy p { margin: 2px 0 0; color: var(--muted); font-size: 12px; font-weight: 500; }
.person-group header b,
.person-group summary b {
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.person-act {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}
.person-act:hover { background: #f4f7fb; }
.person-act.is-front { box-shadow: inset 3px 0 0 #004382; background: #f3f7fb; }
.person-act-copy { display: grid; gap: 2px; min-width: 0; }
.person-act-copy small { color: var(--blue); font-size: 12px; font-weight: 700; }
.person-act-copy strong {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.person-act-meta { display: flex; align-items: center; gap: 10px; }
.person-when {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.person-when.is-late { color: var(--red); }
.person-when.is-soon { color: var(--amber); }
.person-bundle + .person-bundle { border-top: 1px solid var(--line); }
.person-bundle h3 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 14px 16px 4px;
  font-size: 13px;
}
.person-bundle h3 a { color: var(--blue); text-decoration: none; }
.person-bundle h3 a:hover { text-decoration: underline; }
.person-bundle h3 span { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600; }
.person-mini-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  column-gap: 22px;
  padding: 0 16px 8px;
}
a.person-mini {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
a.person-mini:hover { color: var(--blue); }
a.person-mini small { color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
a.person-mini small.is-late { color: var(--red); }
a.person-mini small.is-soon { color: var(--amber); }
a.person-mini.is-front { box-shadow: inset 3px 0 0 #004382; padding-left: 8px; }
.person-empty {
  margin: 0 0 28px;
  padding: 22px 16px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: white;
  color: var(--muted);
  text-align: center;
}
@media (max-width: 1100px) {
  .person-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .person-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .person-act { grid-template-columns: 1fr; align-items: start; }
  .person-act-copy strong { white-space: normal; }
  .person-act-meta { justify-content: space-between; }
}

h1, h2, h3,
.q h3,
.brand,
aside .brand,
.kicker,
.job strong,
.stage-band,
.sheet-cols,
th,
.cronograma .cols th,
.client-sheet th,
.date-head strong,
details summary,
.step summary,
.book-band span,
.book-band b,
.stage-rail b,
.stage-tabs .tab b {
  font-weight: 600;
}
button,
.btn,
button.ghost,
.btn.ghost,
.demo button,
nav a,
nav .create-btn,
.create-menu button,
.phase-switch button,
.phase-switch button:hover,
.stage-rail button,
.stage-tabs .tab,
.status-current,
.status-menu button.st,
.stepper li,
.pick-btn,
label .pick-btn,
label .pick-btn:hover,
.pick-menu button.pick-opt,
.client-suggest button,
.cal-person,
button.bitacora,
button.bitacora:hover,
button.bitacora.is-set,
button.bitacora.is-set:hover,
.kind-pick button,
.kind-pick button:hover,
button.date-btn,
button.date-btn:hover,
.date-pop button,
.date-pop button:hover,
.date-grid button,
.date-grid button:hover,
.date-foot button,
.date-foot button:hover,
button.text-link,
button.text-link:hover,
button.chip,
button.chip:hover,
.account-menu button.account-action,
.account-menu button.account-action:hover,
.client-sheet button.th-sort,
.client-sheet button.th-sort:hover,
.book-nav a,
button b,
button strong {
  font-weight: 600;
}
label,
.phase-tag,
.pill,
.st-pill,
.delta,
.tag,
.flow span,
.stage-rail em,
.stage-rail i,
.tab-k,
.stage-tabs .tab small,
.finder-hit small,
.cal-head span,
.date-week span,
.cal-legend {
  font-weight: 600;
}

.bp-table th, .bp-table td { border: 1px solid #d5deea; }
.bp-table .sel-col { border-right: 0; }
.bp-table .sel-col + th,
.bp-table .sel-col + td { border-left: 0; }
.bp-table td,
.bp-table td input,
.bp-table td button,
.bp-table .pick-btn,
.bp-table .status-current,
.bp-table .status-menu button.st,
.bp-toolbar .pick-btn,
.bp-toolbar .more-btn,
.bp-toolbar .row-menu button,
.bp-search-box input,
.bp-suggest .bp-opt,
.bp-pager button {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 400;
}
.bp-table thead th.is-evidence { background: #f5c518; color: #111; border-color: #e0b000; }
.bp-table .bp-name, .bp-table .bp-client { text-align: center; font-size: 14px; font-weight: 400; vertical-align: middle; background: white; }
.bp-table .bp-name strong, .bp-table .bp-client strong { font-weight: 400; }
.bp-table .bp-name small, .bp-table .bp-client small { display: block; font-weight: 400; color: #4b5b6b; margin-top: 4px; }
.bp-table .bp-stage { vertical-align: middle; text-align: center; white-space: normal; min-width: 140px; }
.bp-table .bp-stage strong { display: block; font-size: 14px; font-weight: 400; text-transform: none; }
.bp-table .bp-stage .bp-total { display: block; margin-top: 8px; font-family: "Segoe UI", system-ui, sans-serif; font-size: 13px; font-variant-numeric: tabular-nums; font-weight: 400; color: #17324d; }
.bp-table .bp-pct { white-space: nowrap; min-width: 96px; }
.bp-table td.bp-estado { text-align: center; vertical-align: middle; }
.bp-table td.bp-estado .status-field { display: inline-flex; justify-content: center; }
.bp-table .bp-percent { display: flex; align-items: center; gap: 6px; }
.bp-table .bp-percent input { width: 64px; text-align: right; }
.bp-table .bp-percent span { color: #5c6b7a; font-family: "Segoe UI", system-ui, sans-serif; font-size: 13px; font-weight: 400; }
.bp-table th.bp-paid,
.bp-table td.bp-paid { width: 1%; white-space: nowrap; padding-left: 8px; padding-right: 8px; }
.bp-table td.bp-paid .pay-soles { justify-content: center; }
.bp-table .bp-row-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 8px; }
.bp-table td.is-paid .pick-btn,
.bp-table td.is-paid .pick-btn:hover { background: #1f9d55; color: white; border-color: #1f9d55; }
.bp-table td.is-due .pick-btn,
.bp-table td.is-due .pick-btn:hover { background: #d64545; color: white; border-color: #d64545; }
.bp-table td.is-paid .pick-btn span,
.bp-table td.is-due .pick-btn span,
.bp-table td.is-paid .pick-btn .chev,
.bp-table td.is-due .pick-btn .chev { color: white; text-transform: uppercase; }
.bp-table td.evidence { display: table-cell; vertical-align: middle; white-space: nowrap; }
.bp-table td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.bp-table td.num input.cell { min-width: 96px; }
.bp-table td.bp-paid .pay-soles input.cell { width: 6.2ch; min-width: 0; padding-left: 0; padding-right: 0; text-align: left; }
.bp-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 12px;
  margin: 0 0 16px;
  width: 100%;
}
.bp-toolbar .bp-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  min-width: 0;
}
.bp-toolbar .bp-field > span { font-size: 13px; font-weight: 650; color: var(--ink); }
.bp-toolbar .bp-search { flex: 1 1 auto; max-width: 420px; }
.bp-toolbar .bp-field:not(.bp-search) { flex: 0 0 160px; }
.bp-toolbar .bp-year { flex: 0 0 120px; margin-left: auto; }
.bp-toolbar .bp-more { flex: 0 0 auto; }
.bp-toolbar .bp-more .more-btn {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: white;
}
.bp-toolbar .bp-more .more-btn:hover { background: #f7f9fb; }
.bp-toolbar .bp-more .more-btn svg { width: 16px; height: 16px; }
.project-edit-body.is-locked {
  opacity: 0.55;
  pointer-events: none;
  user-select: none;
}
.edit-project-search { margin: 0 0 8px; }
.edit-project-search .bp-search-box { margin-top: 6px; }
.bp-search-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 0 10px;
  min-height: 40px;
}
.bp-search-box:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 67, 130, 0.16); }
.bp-search-box .ico { width: 16px; height: 16px; color: var(--muted); flex: none; }
.bp-search-box input {
  border: 0;
  box-shadow: none;
  padding: 8px 0;
  width: 100%;
  min-width: 0;
  background: transparent;
  color: var(--ink);
  -webkit-text-fill-color: var(--ink);
}
.bp-search-box input::placeholder {
  color: #6b7785;
  -webkit-text-fill-color: #6b7785;
  opacity: 1;
}
.bp-search-box input:focus { box-shadow: none; color: var(--ink); }
.bp-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  max-height: 240px;
  overflow: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(16, 36, 58, 0.12);
  padding: 6px;
}
.bp-suggest .bp-opt {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink);
}
.bp-suggest .bp-opt:hover,
.bp-suggest .bp-opt:focus { background: #eef4fb; }
.phase-flags {
  margin: 0 0 14px;
  display: grid;
  gap: 8px;
}
.phase-flags-title {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  color: #004382;
}
.phase-flags-hint,
.phase-only-ejec {
  margin: 0;
}
.phase-flags-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
label.phase-flag {
  display: block;
  margin: 0;
  cursor: pointer;
  color: inherit;
}
label.phase-flag input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.phase-flag-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7f9fb;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.phase-flag-mark {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  flex: none;
  border: 1.5px solid #9aa7b5;
  border-radius: 5px;
  background: white;
  position: relative;
}
.phase-flag-mark::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 2px;
  background: transparent;
}
.phase-flag-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.phase-flag-copy strong {
  font-size: 14px;
  font-weight: 650;
  color: var(--ink);
}
.phase-flag-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.phase-flag-copy small {
  display: block;
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
}
label.phase-flag:hover .phase-flag-card {
  border-color: #b7c6d6;
  background: white;
}
label.phase-flag input:focus-visible + .phase-flag-card {
  box-shadow: 0 0 0 3px rgba(0, 67, 130, 0.18);
}
label.phase-flag input:checked + .phase-flag-card {
  border-color: #004382;
  background: #eef4fb;
  box-shadow: inset 0 0 0 1px #004382;
}
label.phase-flag input:checked + .phase-flag-card .phase-flag-mark {
  border-color: #004382;
  background: #004382;
}
label.phase-flag input:checked + .phase-flag-card .phase-flag-mark::after {
  background: white;
  clip-path: polygon(14% 44%, 0 65%, 40% 100%, 100% 18%, 82% 0, 38% 62%);
}
@media (max-width: 520px) {
  .phase-flags-grid { grid-template-columns: 1fr; }
}
.advance-pair,
.balance-pair {
  display: grid;
  gap: 10px;
  margin: 0;
}
.phase-block-head {
  display: grid;
  gap: 4px;
}
.advance-pair-label {
  font-size: 13px;
  font-weight: 650;
  color: #004382;
}
.advance-min-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.phase-top-row {
  display: grid;
  grid-template-columns: minmax(96px, 0.9fr) minmax(140px, 1.2fr) minmax(160px, 1.2fr);
  gap: 10px 12px;
  align-items: end;
  margin: 0 0 18px;
}
.phase-cost,
.phase-days,
.phase-end {
  display: grid;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: #3d4a57;
  min-width: 0;
}
.phase-cost input,
.phase-days input {
  width: 100%;
  min-height: 38px;
}
.phase-end .field-date,
.phase-end .lark-date,
.phase-end .date-btn {
  width: 100%;
}
input[name="delivery_days"][readonly] {
  background: #eef3f8;
  color: #5a6b7b;
  cursor: default;
}
.bp-money {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 38px;
  padding: 0 10px 0 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.bp-money-prefix {
  color: #5c6b7a;
  font-weight: 700;
  flex: none;
  font-variant-numeric: tabular-nums;
}
.bp-money input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
  padding: 8px 0;
  font-variant-numeric: tabular-nums;
}
.bp-money input:focus {
  outline: none;
}
.bp-money.is-locked {
  background: #eef2f6;
  border-color: #d5dde6;
  pointer-events: none;
  cursor: default;
}
.bp-money.is-locked input {
  color: #5c6570;
  cursor: default;
}
.pay-fields,
.advance-fields,
.balance-fields {
  display: grid;
  grid-template-columns: minmax(96px, 0.9fr) minmax(140px, 1.2fr) minmax(160px, 1.2fr);
  gap: 10px 12px;
  align-items: end;
}
.pay-fields label,
.advance-fields label,
.balance-fields label {
  display: grid;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: #3d4a57;
  min-width: 0;
}
.pay-fields .field-date,
.pay-fields .lark-date,
.pay-fields .date-btn,
.advance-fields .field-date,
.balance-fields .field-date {
  width: 100%;
}
.phase-panel .bp-percent {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 10px 0 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.phase-panel .bp-percent input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  text-align: right;
  padding: 8px 0 8px 10px;
}
.phase-panel .bp-percent input:focus {
  outline: none;
}
.phase-panel .bp-percent span {
  color: #5c6b7a;
  font-weight: 650;
  flex: none;
}
.pay-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  margin: 16px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid #e2eaf2;
}
.advance-pair {
  margin: 0 0 14px;
  padding: 14px 0 0;
  border-top: 1px solid #e2eaf2;
}
.balance-pair {
  margin: 0;
  padding: 14px 0 0;
  border-top: 1px solid #e2eaf2;
}
.phase-panel .phase-file {
  margin: 12px 0 0;
}
.pay-fields .bp-percent.is-locked,
.balance-fields .bp-percent.is-locked {
  background: #eef2f6;
  border-color: #d5dde6;
  pointer-events: none;
  cursor: default;
}
.pay-fields .bp-percent.is-locked input,
.balance-fields .bp-percent.is-locked input {
  color: #5c6570;
  cursor: default;
}
dialog.modal.is-project {
  width: min(760px, calc(100vw - 32px));
}
dialog.modal.is-project.is-kickoff {
  width: min(820px, calc(100vw - 24px));
}
.kickoff-lead {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
/* Pasos: barra plana con subrayado, estilo ERP */
.kickoff-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 0 0 18px;
  border-bottom: 1px solid var(--line);
}
.kickoff-tab,
.kickoff-tab:hover {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  padding: 9px 6px 10px;
  margin: 0 0 -1px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #6b7280;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}
.kickoff-tab span { overflow: hidden; text-overflow: ellipsis; }
.kickoff-tab:hover:not(:disabled) { color: var(--blue); }
.kickoff-tab i {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 1px solid currentColor;
  border-radius: 3px;
  font-style: normal;
  font-size: 10.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.kickoff-tab.is-done { color: #3d4448; }
.kickoff-tab.is-done i { background: var(--blue-soft); border-color: #b7c6d9; color: var(--blue); }
.kickoff-tab.is-on {
  color: var(--blue);
  border-bottom-color: var(--blue);
  font-weight: 600;
}
.kickoff-tab.is-on i { background: var(--blue); border-color: var(--blue); color: white; }
.kickoff-tab:disabled,
.kickoff-tab:disabled:hover {
  opacity: 1;
  color: #b3b9c0;
  background: transparent;
  cursor: not-allowed;
}
.kickoff-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
}
.kickoff-panel-head h3 {
  order: -1;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #1f2933;
}
.kickoff-step {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
/* Campos: grilla de 2 columnas, sin tarjetas */
.kickoff-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
  align-items: start;
}
.kickoff-card {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.kickoff-card:has(textarea),
.kickoff-card:has(.kickoff-checks) {
  grid-column: 1 / -1;
}
.kickoff-card h4 {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  color: #3d4448;
}
.kickoff-req { color: var(--red); font-weight: 600; }
.kickoff-card input[type="text"],
.kickoff-card input:not([type]),
.kickoff-card input[type="time"],
.kickoff-card textarea {
  width: 100%;
  padding: 7px 10px;
  border-color: #d5dae0;
  border-radius: 4px;
  font-size: 13px;
}
.kickoff-card input[type="time"] { max-width: 160px; }
.kickoff-card .field-date,
.kickoff-card .field-date .lark-date {
  display: block;
  width: 100%;
}
.kickoff-card .field-date button.date-btn,
.kickoff-card .field-date button.date-btn:hover {
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  background: white;
  color: var(--ink);
  border: 1px solid #d5dae0;
  border-radius: 4px;
  box-shadow: none;
  font-size: 13px;
  font-weight: 400;
}
.kickoff-card .field-date button.date-btn:hover { border-color: #b7c6d9; }
.kickoff-card .field-date button.date-btn:focus-visible,
.kickoff-card .field-date button.date-btn[aria-expanded="true"] {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 67, 130, 0.16);
}
.kickoff-radios,
.kickoff-checks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 20px;
  min-height: 34px;
}
.kickoff-radio,
.kickoff-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  color: #3d4448;
  cursor: pointer;
}
.kickoff-radio input,
.kickoff-check input {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin: 0;
  padding: 0;
  accent-color: var(--blue);
  cursor: pointer;
}
.kickoff-radio span,
.kickoff-check span { text-align: left; }
.kickoff-check input:disabled + span { color: #b3b9c0; }
@media (max-width: 640px) {
  .kickoff-cards { grid-template-columns: 1fr; }
  .kickoff-tab span { display: none; }
}
.kickoff-nav {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.kickoff-nav .ghost[data-action="kickoff-clear"],
.kickoff-nav .ghost[data-action="kickoff-clear"]:hover {
  margin-right: auto;
  padding-left: 4px;
  padding-right: 4px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
.kickoff-nav .ghost[data-action="kickoff-clear"]:hover {
  color: var(--red);
  text-decoration: underline;
}
.project-nav .ghost[data-action="kickoff-to-layer1"] {
  margin-right: auto;
}
.project-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}
.project-form-grid-3 {
  grid-template-columns: 1fr 1fr 1fr;
}
.phase-panels {
  display: grid;
  gap: 12px;
  margin: 4px 0 10px;
}
.phase-panel {
  border: 1px solid #d7e2ec;
  border-radius: 12px;
  padding: 16px 16px 14px;
  background: #f8fbfe;
}
.phase-panel h3 {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 700;
  color: #004382;
}
.phase-panel .field-date {
  display: block;
  width: 100%;
}
.phase-panel .field-date .lark-date,
.phase-panel .field-date .date-btn {
  width: 100%;
}
.phase-panel .field-date .date-btn,
.phase-panel .field-date .date-btn:hover {
  min-height: 38px;
  padding: 0 10px;
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;
  font-weight: 400;
}
.phase-panel .field-date .date-btn:hover {
  border-color: #b7c6d9;
  background: #fff;
}
@media (max-width: 720px) {
  .pay-meta,
  .pay-fields,
  .advance-fields,
  .balance-fields,
  .project-form-grid,
  .project-form-grid-3,
  .phase-top-row { grid-template-columns: 1fr; }
  .phase-cost { max-width: none; }
}
.bp-add-form .bp-search-box { margin-top: 6px; }
.bp-add-form [data-bp-contract-wrap].is-missing input { border-color: #d64545; }
.bp-add-form .hint { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
@media (max-width: 900px) {
  .bp-toolbar { flex-wrap: wrap; }
  .bp-toolbar .bp-year { margin-left: 0; }
  .bp-toolbar .bp-search { max-width: none; flex: 1 1 100%; }
}

.prog-head { margin-bottom: 18px; }
.prog-kicker {
  margin: 0 0 4px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.prog-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7f9fb;
  overflow: hidden;
}
.prog-stat {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  min-width: 0;
  border-right: 1px solid var(--line);
  background: transparent;
}
.prog-stat:last-child { border-right: 0; }
.prog-stat-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.prog-stat b {
  color: #004382;
  font-size: 22px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.prog-stat small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
}
.prog-stat.is-warn b { color: #9a6700; }
.prog-stat.is-warn .prog-stat-label { color: #9a6700; }
.prog-stat.is-year { background: #004382; }
.prog-stat.is-year .prog-stat-label,
.prog-stat.is-year small { color: rgba(255, 255, 255, 0.72); }
.prog-stat.is-year b { color: white; }
.prog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}
.book-wrap.is-programas {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: auto;
  box-shadow: var(--shadow);
}
.book-wrap.is-programas table { min-width: 1280px; }
.book-wrap.is-programas .book-table thead th {
  background: #0b3d73;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.book-wrap.is-programas .book-table thead th.is-now {
  background: #155fa8;
  box-shadow: inset 0 -2px 0 #7eb6e6;
}
.book-wrap.is-programas .book-table tbody td {
  border-bottom: 1px solid #edf1f5;
  vertical-align: middle;
}
.book-wrap.is-programas .book-table tbody tr:hover td { background: #f7fafc; }
.book-wrap.is-programas .book-table tbody tr:hover td.sticky { background: #f7fafc; }
.book-wrap.is-programas .book-table td.is-now { background: #f3f8fd; }
.book-wrap.is-programas .book-table td.sticky {
  width: 280px;
  max-width: 280px;
  background: #f8fafc;
}
.book-wrap.is-programas .book-table thead th.sticky { background: #0b3d73; }
.book-wrap.is-programas .book-table tr.is-total td.sticky,
.book-wrap.is-programas .book-table tr.is-total:hover td.sticky { background: #004382; color: white; }
.prog-name {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: start;
}
.prog-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.prog-card:hover,
.prog-card:focus-visible { background: #eef5fb; }
.prog-thumb {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(11, 61, 115, 0.12);
  object-fit: cover;
  background: #d9e7f5;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #0b3d73;
}
.prog-thumb.is-empty { border: 1px solid #c7d7e8; }
.prog-card-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.prog-card-copy strong {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.25;
  color: var(--ink);
}
.prog-card-meta {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prog-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.prog-badge {
  --b-bg: #eef2f6;
  --b-fg: #35506c;
  --b-bd: #d6e0ea;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px 3px 8px;
  border: 1px solid var(--b-bd);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.25;
  white-space: nowrap;
  background: var(--b-bg);
  color: var(--b-fg);
}
.prog-badge-ico { flex: none; opacity: 0.9; }
.prog-badge.is-ended { --b-bg: #f2f3f5; --b-fg: #5b6470; --b-bd: #dde0e5; }
.prog-badge.is-renew.is-ok { --b-bg: #eef4fa; --b-fg: #2f4f72; --b-bd: #d2e0ee; }
.prog-badge.is-renew.is-pronto { --b-bg: #fff4d9; --b-fg: #8a5a00; --b-bd: #f3dc9b; }
.prog-badge.is-renew.is-vencido { --b-bg: #fdeeed; --b-fg: #a12828; --b-bd: #f5c9c6; }
.prog-drop {
  opacity: 0;
  transition: opacity var(--ease);
  padding: 4px 8px;
  font-size: 12px;
}
.book-wrap.is-programas tr:hover .prog-drop,
.prog-drop:focus-visible { opacity: 1; }
.prog-toolbar .lark-search { margin-right: auto; }
dialog.modal.prog-history-modal {
  width: min(980px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 48px);
  padding: 0;
  overflow: auto;
}
dialog.modal.prog-history-modal .modal-sheet {
  padding: 0;
  margin: 0;
  background: white;
  border: 0;
  box-shadow: none;
}
dialog.modal.prog-history-modal .modal-head {
  margin: 0;
  padding: 16px 28px;
  flex: none;
  border-radius: var(--radius) var(--radius) 0 0;
}
dialog.modal.prog-history-modal .prog-history-body {
  padding: 16px 28px 28px;
  display: block;
  min-height: 240px;
  overflow: visible;
}
.prog-history-empty { margin: 36px 0; text-align: center; }
.prog-history-sum {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}
.prog-history-sum span {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid #e3e9f0;
  border-radius: 12px;
  background: #f8fbfe;
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
}
.prog-history-sum b {
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.prog-history-wrap {
  max-height: min(56vh, 520px);
  overflow: auto;
  border: 1px solid #e3e9f0;
  border-radius: 14px;
  background: white;
}
.prog-history-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 14px;
}
.prog-history-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 14px 16px;
  background: #f4f7fa;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
}
.prog-history-table td {
  padding: 14px 16px;
  border-top: 1px solid #edf1f5;
  vertical-align: middle;
}
.prog-history-table col.c-name { width: 28%; }
.prog-history-table col.c-date { width: 14%; }
.prog-history-table col.c-state { width: 18%; }
.prog-history-table col.c-years { width: 10%; }
.prog-history-table col.c-spent { width: 12%; }
.prog-history-table col.c-act { width: 14%; }
.prog-history-table tbody tr:first-child td { border-top: 0; }
.prog-history-table tbody tr:hover td { background: #f7fafc; }
.prog-history-table .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.prog-history-table tr.is-ended td { color: var(--muted); }
.prog-history-table tr.is-ended .prog-thumb { filter: grayscale(0.7); opacity: 0.8; }
.prog-history-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.prog-history-name .prog-thumb { width: 40px; height: 40px; border-radius: 11px; flex: none; }
.prog-history-name span:last-child { display: grid; gap: 3px; min-width: 0; }
.prog-history-name strong {
  font-size: 14px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prog-history-name small {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prog-history-actions { text-align: right; white-space: nowrap; }
.prog-history-actions .ghost.tiny {
  padding: 8px 12px;
  border-radius: 8px;
}
@media (max-width: 720px) {
  .prog-history-sum { grid-template-columns: 1fr; }
  dialog.modal.prog-history-modal .modal-head,
  dialog.modal.prog-history-modal .prog-history-body { padding-left: 18px; padding-right: 18px; }
  .prog-history-table { table-layout: auto; }
  .prog-history-table th,
  .prog-history-table td { padding: 12px 14px; white-space: nowrap; }
}
.prog-empty td { padding: 0 !important; border: 0 !important; }
.prog-empty-card {
  margin: 28px auto;
  max-width: 420px;
  text-align: center;
  padding: 28px 20px;
}
.prog-empty-card strong {
  display: block;
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--ink);
}
.prog-empty-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
dialog.modal.prog-modal { width: min(580px, calc(100vw - 24px)); }
.prog-ficha { padding: 8px 0 12px; }
.prog-end-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 14px;
  padding: 12px 14px;
  border: 1px solid #e7edf3;
  border-radius: 12px;
  background: #f8fafc;
}
.prog-end-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
.prog-end-bar .ghost {
  flex: none;
  white-space: nowrap;
}
.prog-price-summary {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid #d7e4f2;
  border-radius: 12px;
  background: #f5f9fc;
}
.prog-price-summary strong {
  font-size: 14px;
  color: #004382;
}
.prog-price-summary span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.prog-apply-month {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  font-weight: 500 !important;
  color: var(--ink) !important;
}
.prog-apply-month input {
  width: auto !important;
  margin: 0;
}
.prog-ficha-grid label .pay-soles {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 10px;
  background: white;
  min-height: 42px;
}
.prog-ficha-grid label .pay-soles input {
  border: 0 !important;
  box-shadow: none !important;
  outline: none;
  padding: 10px 0 !important;
  background: transparent;
  min-width: 0;
  flex: 1;
}
.prog-receipt {
  display: grid;
  gap: 8px;
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.prog-receipt-label {
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
}
.prog-receipt-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.prog-photo-preview {
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 12px;
  border: 1px dashed #b7c7d8;
  background: #f5f8fb;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #5b738c;
  font-size: 11px;
  font-weight: 650;
  text-align: center;
  padding: 6px;
}
.prog-photo-preview.has-image { border-style: solid; border-color: var(--line); padding: 0; }
.prog-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.prog-receipt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.prog-receipt-hint { line-height: 1.25; }
.prog-combo { position: relative; }
.prog-combo-box {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  padding: 0 10px;
  min-height: 42px;
}
.prog-combo-box:focus-within {
  border-color: #004382;
  box-shadow: 0 0 0 3px rgba(0, 67, 130, 0.12);
}
.prog-combo-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  overflow: hidden;
  flex: none;
}
.prog-combo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.prog-combo-box input {
  border: 0 !important;
  box-shadow: none !important;
  outline: none;
  padding: 10px 0 !important;
  background: transparent;
  min-width: 0;
  flex: 1;
}
.prog-combo-list {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  max-height: 280px;
  overflow: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(15, 35, 55, 0.14);
  padding: 6px;
}
.prog-combo-option {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.prog-combo-option:hover,
.prog-combo-option:focus-visible { background: #eef5fb; }
.prog-combo-empty {
  padding: 14px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.prog-pick-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  overflow: hidden;
  flex: none;
  background: #f7f8fa;
}
.prog-pick-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.prog-pick-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.prog-pick-copy strong {
  font-size: 13px;
  line-height: 1.25;
  color: var(--ink);
}
.prog-pick-copy span {
  font-size: 11px;
  color: var(--muted);
}
.prog-plans {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #d7e4f2;
  border-radius: 12px;
  background: #f5f9fc;
}
.prog-plans-label {
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
}
.prog-plans-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.prog-plan-chip {
  margin: 0;
  padding: 6px 10px;
  border: 1px solid #c8d7e7;
  border-radius: 999px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.prog-plan-chip.is-on,
.prog-plan-chip:hover {
  border-color: #004382;
  background: #eaf3fb;
  color: #004382;
}
.prog-ficha-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}
.prog-ficha-grid label {
  display: grid;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.prog-ficha-grid label.full,
.prog-ficha-grid .full { grid-column: 1 / -1; }
.prog-ficha-grid input,
.prog-ficha-grid select,
.prog-ficha-grid textarea {
  width: 100%;
  font: inherit;
  font-weight: 500;
  color: var(--ink);
}
.prog-ficha-grid textarea { resize: vertical; min-height: 84px; }
@media (max-width: 900px) {
  .prog-stats { grid-template-columns: 1fr; }
  .prog-stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .prog-stat:last-child { border-bottom: 0; }
  .prog-ficha-grid { grid-template-columns: 1fr; }
}

dialog.modal.hire { width: min(560px, calc(100vw - 32px)); }
.hire-photo {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
  padding: 4px 0 2px;
  cursor: pointer;
}
.hire-shot {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #e7eef6;
  color: #004382;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
}
.hire-shot img { width: 100%; height: 100%; object-fit: cover; }
.hire-photo-copy { display: grid; gap: 2px; min-width: 0; }
.hire-photo-copy strong { font-size: 14px; }
.hire-photo-copy .hint { margin: 0; }
.hire-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.crew-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 14px;
}
.crew-summary article {
  display: grid;
  gap: 2px;
  min-width: 132px;
  max-width: 180px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  animation: crew-in 420ms var(--ease) both;
}
.crew-summary article span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.crew-summary b {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.crew-summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
}
.crew-summary .is-team b { color: var(--blue); }
.crew-summary .is-hot {
  border-color: #f0d0cc;
  background: #fdf7f6;
}
.crew-summary .is-hot b { color: var(--red); }
.crew-summary .is-ok b { color: #0e7a45; }
.crew-summary .is-light b { color: var(--ink); }
.crew-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.crew-filters button.ghost.is-on,
.crew-filters button.ghost.is-on:hover {
  background: #004382;
  color: white;
  border-color: #004382;
}
.crew-rule { margin: 0 0 14px; }
.crew-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}
.crew-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 2px 12px;
  align-items: center;
  width: 100%;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 14px;
  color: inherit;
  text-align: left;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  animation: crew-in 480ms var(--ease) both;
  animation-delay: calc(var(--i) * 45ms);
}
.crew-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}
.modal-actions .modal-delete { margin-right: auto; }
.crew-actions button { min-height: 30px; padding: 5px 14px; font-size: 12.5px; font-weight: 650; }
button.is-danger-text, button.is-danger-text:hover { color: var(--red); }
button.is-danger-text:hover { background: #fdeceb; border-color: #f0d0cc; }
button.crew-card, button.crew-card:hover { background: white; color: inherit; }
.crew-card:hover { border-color: #b7c6d9; box-shadow: 0 10px 24px rgba(0, 67, 130, 0.08); transform: translateY(-1px); }
dialog.modal.worker-sheet {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  padding: 0;
  overflow: hidden;
}
.worker-sheet-body {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  max-height: calc(100vh - 40px);
}
.worker-sheet-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 16px 18px;
  border-radius: 0;
}
.worker-sheet-id {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.worker-sheet-id h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 20px;
  color: white;
}
.worker-sheet-id p { margin: 2px 0 0; color: rgba(255, 255, 255, 0.82); font-size: 13px; font-weight: 500; }
.worker-sheet-id .person-contact { color: rgba(255, 255, 255, 0.72); }
.worker-sheet-id .person-avatar {
  width: 52px;
  height: 52px;
  font-size: 18px;
  background: rgba(255, 255, 255, 0.18);
  color: white;
}
.worker-sheet-head .load-badge {
  margin-left: 0;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}
.worker-sheet-head .load-badge b { color: white; }
.worker-sheet-head .load-ring .track { stroke: rgba(255, 255, 255, 0.22); }
.worker-sheet-head .load-ring .value { stroke: #9fe0bf; }
.worker-sheet-head .load-badge.is-mid .value { stroke: #ffd39a; }
.worker-sheet-head .load-badge.is-hot .value { stroke: #ffb4ad; }
.worker-sheet-head .load-badge.is-hot b { color: #ffb4ad; }
.worker-sheet-head .icon-btn, .worker-sheet-head .icon-btn:hover {
  background: transparent;
  color: white;
  border: 0;
  margin-left: 4px;
}
.worker-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 12px 16px 0;
  background: white;
}
button.worker-tab, button.worker-tab:hover {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #f3f6f9;
  color: #5c6570;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 9px 12px;
  font-weight: 650;
}
button.worker-tab:hover { background: var(--blue-soft); color: var(--blue); }
button.worker-tab.is-on,
button.worker-tab.is-on:hover {
  background: #004382;
  color: white;
}
button.worker-tab b {
  min-width: 1.4em;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.08);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
button.worker-tab.is-on b { background: rgba(255, 255, 255, 0.18); }
.worker-panes {
  min-height: 0;
  overflow: auto;
  padding: 14px 16px 18px;
  background: #f7f8fa;
}
.worker-pane { animation: crew-in 280ms var(--ease); }
.worker-pane .person-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 8px; }
.worker-pane .person-projects { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-bottom: 16px; }
.worker-pane .person-section:first-child { margin-top: 2px; }
.worker-pane .person-empty { margin-bottom: 16px; }
@media (max-width: 720px) {
  .worker-pane .person-stats { grid-template-columns: 1fr 1fr; }
  .worker-sheet-head { align-items: flex-start; flex-wrap: wrap; }
  .worker-sheet-head .load-badge { order: 3; }
}
.crew-face {
  grid-row: span 2;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #004382;
  color: white;
  display: grid;
  place-items: center;
  font-weight: 700;
  overflow: hidden;
}
img.crew-face, img.person-avatar { object-fit: cover; }
.crew-id { display: grid; min-width: 0; }
.crew-id strong { font-size: 16px; letter-spacing: -0.02em; }
.crew-id span, .crew-now, .crew-quiet { color: var(--muted); font-size: 13px; }
.crew-band, .crew-works, .crew-now, .crew-quiet { grid-column: 1 / -1; }
.crew-band { margin-top: 8px; font-size: 13px; font-weight: 700; }
.crew-band.is-sobrecarga { color: var(--red); }
.crew-band.is-ritmo { color: var(--amber); }
.crew-band.is-holgado { color: #0e7a45; }
.crew-band.is-jefatura { color: var(--blue); }
.crew-works { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.crew-works span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--blue-soft);
  color: var(--blue-2);
  border-radius: 99px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 600;
}
.crew-works .more, .crew-works .muted { background: var(--soft); color: var(--muted); }
.crew-now, .crew-quiet { margin: 6px 0 0; }
.crew-now { font-weight: 600; color: var(--ink); }
.crew-quiet { color: var(--amber); font-weight: 650; }
.crew-none { margin: 8px 0 0; color: var(--muted); }
.person-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.load-badge {
  position: relative;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  grid-row: span 2;
}
.load-badge b {
  position: relative;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  animation: load-pop 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--i, 0) * 70ms + 280ms);
}
.load-badge b small {
  font-size: 10px;
  font-weight: 700;
  margin-left: 1px;
  color: inherit;
  opacity: 0.85;
}
.load-ring { position: absolute; inset: 0; width: 58px; height: 58px; transform: rotate(-90deg); }
.load-ring circle { fill: none; stroke-width: 3.2; }
.load-ring .track { stroke: #e7eef6; }
.load-ring .value {
  stroke: #0e7a45;
  stroke-linecap: round;
  stroke-dasharray: 94.2;
  stroke-dashoffset: calc(94.2 * (1 - var(--load, 0) / 100));
  animation: load-draw 980ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--i, 0) * 70ms + 80ms);
}
.crew-card .load-badge,
.crew-card .load-ring .value,
.crew-card .load-badge b {
  --i: inherit;
}
.crew-card { --i: 0; }
.load-badge.is-mid .value { stroke: var(--amber); }
.load-badge.is-hot .value { stroke: var(--red); }
.load-badge.is-hot b { color: var(--red); }
.load-badge.is-office {
  background: var(--blue-soft);
  color: var(--blue);
  border-radius: 50%;
}
.person-head .load-badge { margin-left: auto; grid-row: auto; }
.person-contact { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 4px 0 0; color: var(--muted); font-size: 13px; }
a.person-project.is-past { background: #f8fafc; }
@keyframes crew-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes load-draw {
  from { stroke-dashoffset: 94.2; }
}
@keyframes load-pop {
  from { opacity: 0; transform: scale(0.72); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .load-ring .value,
  .load-badge b {
    animation: none !important;
  }
}
@keyframes health-grow {
  from { transform: scaleX(0.15); opacity: 0.55; }
  to { transform: none; opacity: 1; }
}
@media (max-width: 900px) {
  .person-hero { align-items: flex-start; flex-direction: column; }
  .person-dial { width: 100%; }
  .person-panel { max-height: 52vh; }
  a.person-row {
    grid-template-columns: 56px minmax(0, 1fr);
  }
  a.person-row .pill { grid-column: 2; justify-self: start; }
}
[data-book-root]:has(.cost-page),
[data-book-root]:has(.cost-index) { min-width: 0; max-width: 100%; }
[data-book-root]:has(.cost-index) {
  position: relative;
  isolation: isolate;
}
[data-book-root]:has(.cost-index)::before {
  content: "";
  position: absolute;
  inset: -12px -8px auto;
  height: 180px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 65% 90% at 8% 0%, rgba(0, 67, 130, .09), transparent 58%),
    radial-gradient(ellipse 45% 70% at 95% 10%, rgba(14, 122, 69, .05), transparent 50%);
}
[data-book-root]:has(.cost-index) .book-head h1 {
  letter-spacing: -.02em;
}
.life-bar { margin: 0 0 14px; }
.life-segs {
  display: inline-flex;
  padding: 3px;
  border: 1px solid #d3e0ec;
  border-radius: 12px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 2px rgba(16, 36, 64, .04);
}
.life-seg {
  height: 34px;
  padding: 0 15px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: #5c6166;
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
  transition: background .18s cubic-bezier(.2, .8, .2, 1), color .18s cubic-bezier(.2, .8, .2, 1), box-shadow .18s cubic-bezier(.2, .8, .2, 1);
}
.life-seg:hover { background: #eef3f8; color: #16324f; }
.life-seg.is-on,
.life-seg.is-on:hover {
  background: #004382;
  color: #fff;
  box-shadow: 0 6px 16px rgba(0, 67, 130, .22);
}
.cost-find {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  max-width: none;
  padding: 10px;
  border: 1px solid #dce3eb;
  border-radius: 14px;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(8px);
}
.cost-find .life-bar { margin: 0 0 0 auto; }
.cost-find .lark-search { flex: 0 1 420px; max-width: 420px; }
.cost-life-empty { margin: 0 0 12px; }
.cost-find .bp-search-box {
  width: 100%;
  border-radius: 10px;
  transition: border-color .18s cubic-bezier(.2, .8, .2, 1), box-shadow .18s cubic-bezier(.2, .8, .2, 1);
}
.cost-find .bp-search-box:focus-within {
  border-color: #8fb0d0;
  box-shadow: 0 0 0 3px rgba(0, 67, 130, .12);
}
.cost-project { display: flex; align-items: center; gap: 10px; color: inherit; }
.cost-project > span { display: grid; gap: 1px; }
.cost-project strong { color: var(--blue-2); font-weight: 650; letter-spacing: -.01em; }
.cost-project small { color: var(--muted); font-size: 12px; }
.cost-caret {
  width: 7px;
  height: 7px;
  border-right: 2px solid #004382;
  border-bottom: 2px solid #004382;
  transform: rotate(-45deg);
  flex: none;
}
.cost-index tr.is-open .cost-caret { transform: rotate(45deg); }
[data-book-root]:has(.cost-index) .table-wrap.book-wrap {
  border: 1px solid #dce3eb;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 32px rgba(16, 36, 64, .06);
}
.cost-index tbody tr[data-cost-project] {
  cursor: pointer;
  animation: cost-rise .45s cubic-bezier(.2, .8, .2, 1) both;
}
.cost-index tbody tr[data-cost-project]:nth-child(1) { animation-delay: 0ms; }
.cost-index tbody tr[data-cost-project]:nth-child(2) { animation-delay: 40ms; }
.cost-index tbody tr[data-cost-project]:nth-child(3) { animation-delay: 80ms; }
.cost-index tbody tr[data-cost-project]:nth-child(4) { animation-delay: 120ms; }
.cost-index tbody tr[data-cost-project]:nth-child(5) { animation-delay: 160ms; }
.cost-index tbody tr[data-cost-project]:nth-child(6) { animation-delay: 200ms; }
.cost-index tbody tr[data-cost-project]:nth-child(n + 7) { animation-delay: 240ms; }
.cost-index tbody tr[data-cost-project] td {
  transition: background .18s cubic-bezier(.2, .8, .2, 1);
}
.cost-index tbody tr[data-cost-project]:hover td { background: #f3f7fb; }
.cost-index tr.is-open td,
.cost-index tr.is-open:hover td,
.cost-index tr.is-open td.sticky,
.cost-index tr.is-open:hover td.sticky { background: #e8f0f8; }
@keyframes cost-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cost-index tbody tr[data-cost-project],
  .life-seg { animation: none; transition: none; }
}
.book-wrap:not(.is-income) .cost-index tr.cost-fold > td,
.book-wrap .cost-index tr.cost-fold > td {
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  padding: 0 !important;
  text-align: left;
  white-space: normal;
  background: #f4f7fb;
  cursor: default;
  position: static;
}
.cost-index tr.cost-fold:hover > td { background: #f4f7fb; }
.cost-fold-body { padding: 12px 14px 16px; }
.cost-fold .table-wrap,
.cost-fold .book-wrap.is-costos { width: 100%; max-width: 100%; min-width: 0; }
.cost-fold .book-wrap.is-costos table { min-width: 0; width: 100%; }
.cost-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 99px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}
.cost-pill.cost-ok { background: #e7f6ee; color: #0e7a45; }
.cost-pill.cost-short { background: var(--amber-soft); color: #7a3e08; }
.cost-pill.cost-over { background: var(--red-soft); color: var(--red); }
.cost-page { max-width: 100%; min-width: 0; }
.cost-nav {
  display: flex;
  align-items: flex-end;
  gap: 14px 22px;
  margin: 0 0 18px;
}
.cost-back { color: var(--blue-2); font-size: 13px; text-decoration: none; white-space: nowrap; padding-bottom: 8px; }
.cost-back:hover { text-decoration: underline; }
.cost-who { color: var(--muted); font-size: 13px; white-space: nowrap; padding-bottom: 8px; }
.cost-switch { width: 320px; margin: 0; }
.cost-block { margin: 0 0 26px; max-width: 100%; min-width: 0; }
.cost-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
}
.cost-block-head h2 { margin: 0; color: #243038; font-size: 15px; font-weight: 650; }
.cost-block-head button { min-height: 36px; white-space: nowrap; }
.book-wrap.is-costos { max-width: 100%; }
.book-wrap.is-costos table { min-width: 920px; width: 100%; }
.book-wrap.is-costos:not(.is-income) .book-table th:not(.sticky):not(.sel-col),
.book-wrap.is-costos:not(.is-income) .book-table td:not(.sticky):not(.sel-col) {
  width: auto;
  max-width: none;
  text-align: left;
  padding-left: 12px;
  padding-right: 12px;
}
.book-wrap.is-costos .book-table th.num,
.book-wrap.is-costos .book-table td.num { text-align: right; }
.book-wrap.is-costos table.cost-table { table-layout: fixed; }
col.sel-col { width: 48px; }
.cost-table .c-concept { width: 16%; }
.cost-table .c-unit { width: 11%; }
.cost-table .c-rubro { width: 13%; }
.cost-table .c-money { width: 11%; }
.cost-table .c-date { width: 13%; }
.cost-table .c-box { width: 13%; }
.cost-table .c-note { width: 16%; }
.cost-table .c-boleta { width: 132px; }
.cost-table .c-act { width: 108px; }
.cost-boleta-cell { display: flex; align-items: center; gap: 6px; }
.cost-boleta {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 32px;
  padding: 0 10px;
  border: 1px dashed #b7c6d9;
  border-radius: 6px;
  color: #004382;
  cursor: pointer;
  font-size: 13px;
}
.cost-boleta input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.cost-boleta span { max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.cost-boleta-view, button.cost-boleta-view:hover {
  width: 36px;
  height: 36px;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: white;
  box-shadow: none;
}
button.cost-boleta-view img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cost-table input.cell::placeholder { color: #8aa0b3; }
.book-wrap.is-costos .book-table input.cell { width: 100%; min-width: 0; }
.book-wrap.is-costos .book-table .pick,
.book-wrap.is-costos .book-table .lark-date { min-width: 0; width: 100%; }
.book-wrap.is-costos .book-table .lark-date { display: flex; }
.cost-table tr.cost-draft td { background: #f4f8fc; }
.cost-table tr.cost-draft:hover td { background: #f4f8fc; }
.cost-table td.cost-act,
.cost-table th.cost-act { text-align: right; white-space: nowrap; }
.cost-table td.cost-act button { min-height: 34px; white-space: nowrap; }
.cost-empty { color: var(--muted); }
@media (max-width: 720px) {
  .cost-nav { flex-wrap: wrap; }
  .cost-switch { width: 100%; }
}

@media (max-width: 720px) {
  .hire-split { grid-template-columns: 1fr; }
  .crew-summary { width: 100%; }
  .crew-summary article { flex: 1 1 calc(50% - 8px); max-width: none; }
  .crew-card { grid-template-columns: auto minmax(0, 1fr); }
}

.analysis-periods {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}
dialog.modal.ta-drawer .modal-sheet { background: #f7f9fb; }
.ta-body { display: grid; gap: 14px; padding-top: 2px; transition: opacity 160ms ease; }
.ta-body.is-loading { opacity: 0.55; }
.ta-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.ta-range { margin: 0; color: var(--muted); font-size: 13px; }
.ta-empty { margin: 0; color: var(--muted); font-size: 13.5px; }
.ta-lead {
  margin: 0;
  padding: 0 2px;
  color: #44515f;
  font-size: 14px;
  line-height: 1.45;
}
.ta-lead strong { color: var(--ink); font-weight: 700; }
.ta-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.ta-stats article {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7f9fb;
  min-width: 0;
}
.ta-stats span { color: var(--muted); font-size: 13px; display: block; }
.ta-stats b {
  display: block;
  margin-top: 2px;
  color: #004382;
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.ta-stats small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.ta-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ta-block {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  min-width: 0;
}
.ta-head {
  margin: 0 0 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
}
.ta-head h3 { margin: 0; font-size: 15px; color: #004382; font-weight: 650; }
.ta-head p { margin: 0; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.ta-caps { display: grid; gap: 10px; }
a.ta-cap {
  display: grid;
  grid-template-columns: minmax(96px, 140px) minmax(0, 1fr) 28px;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-size: 13px;
}
.ta-cap-track {
  position: relative;
  display: flex;
  height: 10px;
  background: #eef1f5;
  border-radius: 99px;
  overflow: hidden;
}
.ta-cap-track i { display: block; height: 100%; background: #004382; }
.ta-cap-track i.is-over { background: #b42318; }
.ta-cap-track u {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 0;
  border-left: 1px dashed #5c6b7a;
  text-decoration: none;
}
.ta-cap b { text-align: right; font-variant-numeric: tabular-nums; }
.ta-note { margin: 0; color: var(--muted); font-size: 12px; }
.ta-front { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ta-front li {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 28px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}
.ta-front-bar {
  display: block;
  height: 8px;
  background: #eef1f5;
  border-radius: 99px;
  overflow: hidden;
}
.ta-front-bar i { display: block; height: 100%; background: #004382; }
.ta-front b { text-align: right; font-variant-numeric: tabular-nums; }
.ta-days {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 6px;
  height: 140px;
  align-items: end;
}
.ta-day {
  display: grid;
  grid-template-rows: 16px 1fr 16px;
  height: 100%;
  justify-items: center;
  gap: 3px;
  min-width: 0;
}
.ta-day > span { font-size: 12px; font-weight: 650; align-self: end; }
.ta-day-stack {
  display: flex;
  flex-direction: column-reverse;
  width: 100%;
  max-width: 28px;
  height: 100%;
  align-self: end;
  background: #f0f3f7;
  border-radius: 4px;
  overflow: hidden;
}
.ta-day-stack i { display: block; width: 100%; }
.ta-day.is-weekend .ta-day-stack { opacity: 0.55; }
.ta-day small { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.ta-day.is-today small { color: #004382; font-weight: 700; }
.ta-days-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}
.ta-days-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 5px;
}
.ta-table-wrap { overflow-x: auto; }
.ta-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ta-table th {
  text-align: left;
  padding: 0 8px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.ta-table th.num, .ta-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.ta-table td {
  padding: 9px 8px;
  border-bottom: 1px solid #eef1f5;
  vertical-align: top;
}
.ta-table tr:last-child td { border-bottom: 0; }
.ta-table a { color: #004382; text-decoration: none; font-weight: 650; }
.ta-table a:hover { text-decoration: underline; }
.ta-table small { display: block; margin-top: 2px; color: var(--muted); font-size: 11.5px; font-weight: 500; }
.ta-weeks {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(34px, 1fr);
  gap: 8px;
  align-items: end;
  height: 120px;
}
.ta-week {
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  align-items: end;
  gap: 4px;
  height: 100%;
}
.ta-week i {
  display: block;
  width: 100%;
  max-width: 28px;
  border-radius: 4px 4px 2px 2px;
  background: #004382;
}
.ta-week span { font-size: 12px; font-weight: 650; }
.ta-week small { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.ta-read {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.ta-read li { font-size: 13.5px; color: #44515f; line-height: 1.45; }
.ta-read strong { color: var(--ink); }
@media (max-width: 900px) {
  .ta-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ta-cols { grid-template-columns: 1fr; }
  a.ta-cap { grid-template-columns: 1fr; }
}

.ledger { color: var(--ink); font-weight: 400; }
.ledger .prog-kicker { font-weight: 400; letter-spacing: 0.06em; }
.ledger .muted { max-width: 68ch; font-size: 14px; font-weight: 400; }
.ledger-cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}
.ledger-card {
  display: grid;
  gap: 6px;
  align-content: start;
  min-height: 84px;
  padding: 14px 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
}
a.ledger-card:hover { border-color: #b7c9dc; }
.ledger-card span { font-size: 13px; font-weight: 400; color: var(--muted); }
.ledger-card b {
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  color: var(--ink);
}
.ledger-card.is-result.is-up b { color: #0e7a45; }
.ledger-card.is-result.is-down b { color: #b42318; }
.ledger-note {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff7ea;
  color: #7a3e08;
  font-size: 14px;
  font-weight: 400;
}
.ledger-spot { margin: 0 0 12px; }
.ledger-month-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
}
.ledger-month-line span { color: var(--ink); }
.ledger-month-line b {
  font-size: 18px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.ledger-month-line em { font-style: normal; }
.ledger-month-line.is-up b { color: #0e7a45; }
.ledger-month-line.is-down b { color: #b42318; }
.ledger-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 12px;
}
.ledger-rail { display: flex; flex-wrap: wrap; gap: 4px; margin-right: auto; }
button.ledger-pill, button.ledger-pill:hover {
  margin: 0;
  min-width: 36px;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  font-size: 13px;
  font-weight: 400;
}
button.ledger-pill:hover { background: #f4f7fb; color: var(--ink); }
button.ledger-pill.is-on, button.ledger-pill.is-on:hover {
  background: #e7eef6;
  color: #004382;
}
.book-wrap.is-ledger {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: auto;
  box-shadow: var(--shadow);
}
.book-wrap.is-ledger table { min-width: 1180px; }
.book-wrap.is-ledger .book-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #0b3d73;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
  padding-top: 12px;
  padding-bottom: 12px;
}
.book-wrap.is-ledger .book-table thead th.sticky { z-index: 3; background: #0b3d73; }
.book-wrap.is-ledger thead button,
.book-wrap.is-ledger thead button:hover {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: white;
  box-shadow: none;
  font: inherit;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}
.book-wrap.is-ledger thead th.is-focus { box-shadow: inset 0 -2px 0 #d7e6f5; }
.book-wrap.is-ledger td.sticky {
  width: 260px;
  max-width: 260px;
  background: #fff;
}
.book-wrap.is-ledger td.ledger-cell,
.book-wrap.is-ledger td.ledger-year {
  font-size: 13px;
  font-weight: 400;
  padding-top: 11px;
  padding-bottom: 11px;
}
.book-wrap.is-ledger td.is-focus { background: #f4f8fc; }
.book-wrap.is-ledger .ledger-figure { font-variant-numeric: tabular-nums; font-weight: 400; }
.book-wrap.is-ledger .ledger-empty { color: #c5d0dc; }
.book-wrap.is-ledger td.is-neg .ledger-figure,
.book-wrap.is-ledger td.ledger-year.is-neg { color: #b42318; }
.book-wrap.is-ledger tr.is-ingresos { --tone: #0e7a45; }
.book-wrap.is-ledger tr.is-planilla { --tone: #004382; }
.book-wrap.is-ledger tr.is-marketing { --tone: #b45309; }
.book-wrap.is-ledger tr.is-programas { --tone: #0f6b6b; }
.book-wrap.is-ledger tr.is-obra { --tone: #7a3e08; }
.book-wrap.is-ledger tr.ledger-group { cursor: pointer; }
.book-wrap.is-ledger tr.ledger-group td { background: #f7f9fb; }
.book-wrap.is-ledger tr.ledger-group td.sticky {
  background: #f7f9fb;
  box-shadow: inset 3px 0 0 var(--tone, #c5d0dc);
}
.book-wrap.is-ledger tr.ledger-group:hover td { background: #f1f5f8; }
.book-wrap.is-ledger tr.ledger-group .ledger-name strong,
.book-wrap.is-ledger tr.ledger-group .ledger-name a { font-weight: 600; }
.book-wrap.is-ledger tr.ledger-group .ledger-figure { font-weight: 600; }
.book-wrap.is-ledger tr.ledger-line td { background: white; }
.book-wrap.is-ledger tr.ledger-line td.sticky { background: white; }
.book-wrap.is-ledger tr.ledger-deep td,
.book-wrap.is-ledger tr.ledger-deep .ledger-figure { color: #5c6770; font-weight: 400; }
.book-wrap.is-ledger tr.ledger-deep td.sticky { background: #fbfcfd; }
.book-wrap.is-ledger tr.is-dim { opacity: 0.4; }
.ledger-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ledger-name.is-d1 { padding-left: 22px; }
.ledger-name.is-d2 { padding-left: 40px; }
.ledger-copy { min-width: 0; display: grid; gap: 1px; }
.ledger-copy small, .ledger-sum small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.ledger-name a, .ledger-name strong {
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
  text-decoration: none;
}
.ledger-name a:hover { text-decoration: underline; }
button.ledger-fold, button.ledger-fold:hover {
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #7b8794;
  box-shadow: none;
  flex: none;
}
.ledger-fold i {
  display: block;
  width: 6px;
  height: 6px;
  margin: 0 auto;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 160ms ease;
}
tr.is-open > td .ledger-fold i { transform: rotate(45deg) translate(-1px, -1px); }
.book-wrap.is-ledger tr.ledger-sum td,
.book-wrap.is-ledger tr.ledger-sum:hover td { color: white; font-weight: 400; }
.book-wrap.is-ledger tr.ledger-sum .ledger-name strong,
.book-wrap.is-ledger tr.ledger-sum .ledger-copy strong,
.book-wrap.is-ledger tr.ledger-sum .ledger-figure { font-weight: 600; }
.book-wrap.is-ledger tr.ledger-sum.is-empresa td,
.book-wrap.is-ledger tr.ledger-sum.is-empresa td.sticky { background: #004382; }
.book-wrap.is-ledger tr.ledger-sum.is-result td,
.book-wrap.is-ledger tr.ledger-sum.is-result td.sticky { background: #062844; }
.book-wrap.is-ledger tr.ledger-sum small { color: rgba(255, 255, 255, 0.75); font-weight: 400; }
.book-wrap.is-ledger tr.ledger-sum td.is-neg .ledger-figure,
.book-wrap.is-ledger tr.ledger-sum td.ledger-year.is-neg { color: #ffd2d2; }
.book-wrap.is-ledger tr.ledger-chapter td {
  background: #f7f4f0;
  color: #6b5344;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
}
.book-wrap.is-ledger tr.ledger-chapter span {
  margin-left: 8px;
  color: #8a7364;
  font-weight: 400;
}
@media (max-width: 1100px) {
  .ledger-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .ledger-cards { grid-template-columns: 1fr 1fr; }
}

/* Ficha de cliente en ventana emergente */
dialog.modal.is-client-sheet { width: min(1040px, calc(100vw - 32px)); }
.person-board.is-cockpit.client-board .person-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
}
a.person-code { text-decoration: none; }
a.person-code:hover { text-decoration: underline; }

/* Pestañas de la lista de clientes: activos / historial */
.client-switch { flex: 0 0 auto; }
.client-switch button { display: inline-flex; align-items: center; gap: 6px; }
.client-scope-count {
  min-width: 1.4em;
  padding: 0 6px;
  border-radius: 99px;
  background: #eef3f8;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.client-switch button.is-on .client-scope-count { background: rgba(255, 255, 255, 0.22); color: inherit; }
/* Proyectos: filtros en un solo botón con panel + etiquetas activas */
.pf { position: relative; display: inline-flex; }
button.pf-btn,
button.pf-btn:hover {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 37px;
  padding: 8px 12px;
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
}
button.pf-btn:hover { background: #f7f9fb; border-color: #c5d0dc; }
.pf-btn svg { width: 16px; height: 16px; color: var(--blue); flex: none; }
button.pf-btn.is-active { border-color: #9fb6cf; color: var(--blue); }
.pf.is-open button.pf-btn { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 67, 130, 0.14); }
.pf-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--blue);
  color: white;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.pf-count[hidden] { display: none; }
.pf-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 60;
  width: min(720px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  background: white;
  border: 1px solid #dde2e8;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(17, 17, 17, 0.05), 0 18px 44px rgba(17, 17, 17, 0.14);
  color: var(--ink);
  overflow: hidden;
}
.pf-panel[hidden] { display: none; }
/* Abrir y cerrar suave: baja un poco y aparece; al cerrar sube y se desvanece más rápido. */
.pf-panel {
  transform-origin: top left;
  transition:
    opacity 200ms cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.pf-panel.is-off {
  opacity: 0;
  transform: translateY(-8px) scale(0.985);
  pointer-events: none;
}
.pf-panel.is-closing {
  transition-duration: 140ms, 160ms;
  transition-timing-function: ease-in, ease-in;
}
@media (prefers-reduced-motion: reduce) {
  .pf-panel { transition: opacity 120ms linear; }
  .pf-panel.is-off { transform: none; }
}
/* Cancelar proyecto: el motivo ocupa todo el ancho del diálogo */
#cancel-project-dialog .cancel-reason { display: grid; gap: 6px; margin: 4px 0 6px; font-size: 13px; font-weight: 600; }
#cancel-project-dialog .cancel-reason textarea { width: 100%; font: inherit; font-weight: 400; resize: vertical; }
.pf-head,
.pf-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
}
.pf-head { border-bottom: 1px solid var(--line); }
.pf-title { display: grid; gap: 1px; }
.pf-title strong { font-size: 14px; font-weight: 600; color: #1f2933; }
.pf-title span { font-size: 12px; color: #8a9199; font-variant-numeric: tabular-nums; }
button.pf-x,
button.pf-x:hover {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: transparent;
  color: #8a9199;
  border: 0;
  border-radius: 5px;
  box-shadow: none;
}
button.pf-x:hover { background: #f1f4f7; color: #1f2933; }
.pf-x svg { width: 16px; height: 16px; }
.pf-foot { border-top: 1px solid var(--line); background: #fafbfc; }
button.pf-go { padding: 8px 18px; font-variant-numeric: tabular-nums; }

/* Cuerpo: atributos a la izquierda, fecha en columna propia a la derecha */
.pf-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 232px;
  max-height: min(62vh, 520px);
  min-height: 0;
}
.pf-main {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
  align-content: start;
  padding: 16px;
  overflow: auto;
}
.pf-aside {
  padding: 16px;
  background: #f8fafc;
  border-left: 1px solid var(--line);
  overflow: auto;
}
.pf-group {
  display: grid;
  gap: 6px;
  align-content: start;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.pf-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0 0 2px;
  padding: 0 0 6px;
  border-bottom: 1px solid #eef1f4;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.pf-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.pf-legend-n {
  display: inline-grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--blue);
  color: white;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
}
.pf-opts { display: grid; gap: 1px; }
.pf-opts.is-scroll { max-height: 196px; overflow: auto; padding-right: 2px; }
label.pf-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 8px;
  border-radius: 5px;
  color: #2b3137;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  transition: background-color 120ms ease;
}
label.pf-opt:hover { background: #f1f4f7; }
.pf-aside label.pf-opt:hover { background: #eef2f6; }
label.pf-opt.is-on { background: var(--blue-soft); }
label.pf-opt.is-on .pf-opt-text { color: var(--blue); font-weight: 600; }
.pf-panel label.pf-opt input {
  flex: 0 0 auto;
  min-width: 0;
  width: 15px;
  height: 15px;
  margin: 0;
  padding: 0;
  accent-color: var(--blue);
  cursor: pointer;
}
.pf-opt-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-opt-count {
  min-width: 22px;
  padding: 0 6px;
  border-radius: 9px;
  background: #f1f4f7;
  color: #6b737b;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
label.pf-opt.is-on .pf-opt-count { background: white; color: var(--blue); }
label.pf-opt.is-empty { color: #a7adb4; }
label.pf-opt.is-empty .pf-opt-count { background: transparent; color: #b8bec4; }
.pf-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #aab2ba; }
.pf-dot.is-red { background: var(--red); }
.pf-dot.is-amber { background: #dc8a1e; }
.pf-dot.is-green { background: var(--green); }
.pf-segs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0 0 4px;
  padding: 2px;
  background: #e9edf2;
  border-radius: 6px;
}
button.pf-seg,
button.pf-seg:hover {
  padding: 5px 10px;
  background: transparent;
  color: var(--muted);
  border: 0;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  box-shadow: none;
}
button.pf-seg:hover { color: var(--blue); }
button.pf-seg.is-on { background: white; color: var(--blue); font-weight: 600; box-shadow: 0 1px 2px rgba(17, 17, 17, 0.1); }
.pf-custom { display: grid; gap: 8px; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.pf-custom label { display: grid; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 600; }
.pf-panel .pf-custom input { width: 100%; min-width: 0; padding: 7px 8px; font-size: 13px; background: white; border: 1px solid #d5dae0; border-radius: 5px; }
button.pf-link,
button.pf-link:hover,
button.pf-mini,
button.pf-mini:hover {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--blue);
  font-size: 12px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}
button.pf-mini { font-size: 11px; }
button.pf-link:hover,
button.pf-mini:hover { text-decoration: underline; }
button.pf-link:disabled,
button.pf-link:disabled:hover { color: #b8bec4; text-decoration: none; cursor: default; }
.pf-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: -6px 0 14px;
}
.pf-chips[hidden] { display: none; }
.pf-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 3px 3px 9px;
  background: var(--blue-soft);
  border: 1px solid #cdd9e7;
  border-radius: 4px;
  color: #1f2933;
  font-size: 12px;
  line-height: 18px;
}
.pf-chip em { font-style: normal; color: var(--muted); }
.pf-chip button,
.pf-chip button:hover {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  background: transparent;
  color: var(--muted);
  border: 0;
  border-radius: 3px;
  box-shadow: none;
}
.pf-chip button:hover { background: rgba(0, 67, 130, 0.12); color: var(--blue); }
.pf-chip button svg { width: 12px; height: 12px; }
@media (max-width: 760px) {
  .pf-body { grid-template-columns: 1fr; overflow: auto; }
  .pf-main, .pf-aside { overflow: visible; }
  .pf-aside { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 520px) {
  .pf-main { grid-template-columns: 1fr; }
}

/* Ficha de cliente: contrato y pagos */
.client-pay { display: grid; gap: 10px; }
.client-pay-title { margin: 6px 0 0; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.client-pay-contract {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; background: #fff; border: 1px solid #dfe6ee; border-radius: 6px;
}
.client-pay-contract.is-empty { border-style: dashed; }
.client-pay-contract-main { display: grid; gap: 2px; flex: 1; min-width: 0; }
.client-pay-contract-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-pay-group { background: #fff; border: 1px solid #dfe6ee; border-radius: 6px; overflow: hidden; }
.client-pay-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px; border-bottom: 1px solid #e6ecf2; background: #f7f9fb;
}
.client-pay-head > div { display: grid; gap: 2px; }
.client-pay-head a { color: inherit; text-decoration: none; }
.client-pay-head a:hover strong { color: var(--blue); }
.client-pay-sums { display: flex; gap: 22px; margin: 0; }
.client-pay-sums div { display: grid; gap: 2px; text-align: right; }
.client-pay-sums dt {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #4a5560;
}
.client-pay-sums dd { margin: 0; font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--ink); }
.client-pay-sums dd.is-due { color: var(--red); }
.client-pay-wrap {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: auto;
}
.client-pay-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 13px; }
.client-pay-table thead th,
.client-pay-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: #004382;
  border-bottom-color: #003566;
  padding: 10px 12px;
}
.client-pay-table th.num { text-align: right; }
.client-pay-table td { padding: 9px 12px; border-bottom: 1px solid #eef2f6; background: #fff; color: var(--ink); }
.client-pay-table tr:nth-child(even) td { background: #f7f9fb; }
.client-pay-table tr:last-child td { border-bottom: 0; }
.client-pay-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.client-pay-table tr.empty td { color: var(--muted); text-align: center; background: #fff; }
.client-pay-state {
  font-weight: 650;
  font-size: 13px;
}
.client-pay-state.is-ok { color: #0e7a45; }
.client-pay-state.is-wait { color: #8a4b12; }
.client-pay-state.is-late { color: #b42318; }
.client-pay-proof,
button.client-pay-proof,
button.client-pay-proof:hover {
  padding: 0;
  border: 0;
  background: transparent;
  color: #004382;
  font: inherit;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 2px;
  box-shadow: none;
  cursor: pointer;
}

/* Bitácora en línea (debajo de la actividad) */
.cronograma td.log {
  position: relative;
  overflow: visible;
}
.bitacora-cell {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
}
.bitacora-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  width: min(420px, 70vw);
  padding: 12px;
  background: #fff;
  border: 1px solid #d5dee8;
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(15, 35, 60, 0.16);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px) scale(0.98);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms;
}
.bitacora-cell.is-open .bitacora-pop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.bitacora-notes { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; max-height: 180px; overflow: auto; }
.bitacora-notes li { background: #f7f9fb; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; }
.bitacora-note-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bitacora-note-head small { color: var(--muted); font-size: 12px; }
.bitacora-notes p { margin: 4px 0 0; font-size: 13px; line-height: 1.5; white-space: pre-wrap; }
.bitacora-note-links { display: flex; gap: 14px; margin-top: 4px; font-size: 13px; }
.bitacora-empty-copy { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
button.bitacora-del, button.bitacora-del:hover { width: 26px; height: 26px; min-height: 0; padding: 0; color: var(--muted); }
button.bitacora-del:hover { color: #b42318; }
button.bitacora-del svg { width: 15px; height: 15px; }
.bitacora-add {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  width: 100%;
}
.bitacora-add textarea { min-height: 64px; resize: vertical; background: white; min-width: 0; }
.bitacora-add input { background: white; min-width: 0; width: 100%; }
.bitacora-add button[type="submit"] { white-space: nowrap; justify-self: end; }
button.bitacora.is-open, button.bitacora.is-open:hover { color: #004382; background: transparent; }
.proj-lane-table .td-carpeta {
  position: relative;
  width: 92px;
  min-width: 92px;
  max-width: 110px;
  overflow: visible;
}
.proj-folder {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
}
.proj-folder-add,
.proj-folder-edit,
.proj-folder-add:hover,
.proj-folder-edit:hover {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #004382;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: opacity 160ms ease, color 160ms ease;
}
.proj-folder-add:hover,
.proj-folder-edit:hover {
  color: #002f5c;
  text-decoration: underline;
  background: transparent;
}
.proj-folder-link {
  color: #0e7a45;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transition: opacity 160ms ease;
}
.proj-folder-link:hover { text-decoration: underline; }
.proj-lane-table td.td-carpeta:has(.is-editing) {
  z-index: 8;
}
.proj-folder-form {
  position: absolute;
  right: 0;
  top: 50%;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 6px 7px;
  width: max-content;
  min-width: 236px;
  background: #fff;
  border: 1px solid #d5dee8;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15, 35, 60, 0.14);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(6px, -50%) scale(0.98);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms;
}
.proj-folder.is-editing .proj-folder-form {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(0, -50%) scale(1);
}
.proj-folder.is-editing .proj-folder-add,
.proj-folder.is-editing .proj-folder-link,
.proj-folder.is-editing .proj-folder-edit {
  opacity: 0;
  pointer-events: none;
}
.proj-folder-form input {
  width: 148px;
  min-width: 0;
  min-height: 32px;
  padding: 4px 8px;
  font-size: 12px;
}
.proj-folder-form button[type="submit"] {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}
.proj-folder-form .ghost,
.proj-folder-form .ghost:hover {
  min-height: 32px;
  min-width: 28px;
  padding: 0 6px;
  background: transparent;
  color: #5c6b7a;
}

/* Fecha replanteada vacía: tenue, pero se puede hacer clic */
.cronograma .fecha-empty { opacity: 0.45; transition: opacity 0.15s; }
.cronograma .fecha-empty:hover, .cronograma .fecha-empty:focus-within { opacity: 0.8; }
.cronograma .fecha-empty button.date-btn, .cronograma .fecha-empty button.date-btn:hover { color: var(--muted); }
.cronograma .fecha-empty button.date-btn svg { color: var(--muted); }

.crew-field { margin: 2px 0 12px; }
.crew-field-label { display: block; margin-bottom: 6px; }
.crew-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.crew-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 36px; }
.crew-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 3px 3px 10px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: #004382;
  font-size: 13px;
}
button.crew-x, button.crew-x:hover {
  width: 22px;
  height: 22px;
  min-width: 22px;
  padding: 0;
  border-radius: 999px;
  background: white;
  color: #004382;
  border: 1px solid #c5d4e6;
  line-height: 1;
}
button.crew-x:hover { background: #f4f7fb; }
.crew-field .pick { min-width: 190px; }
.crew-field .hint { margin: 6px 0 0; }

dialog.modal.is-gantt {
  width: min(1180px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
}
.gantt-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; margin: 0 0 12px; }
.gantt-top strong { color: #004382; letter-spacing: 0.16em; font-size: 13px; text-transform: uppercase; }
.gantt-top b { display: block; color: var(--ink); }
.gantt-top p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.gantt-scroll { overflow-x: auto; overflow-y: visible; max-height: none; border: 1px solid #d5dde6; border-radius: 8px; }
.gantt { border-collapse: separate; border-spacing: 0; font-size: 12px; min-width: 100%; }
.gantt th, .gantt td { border-right: 1px solid #e1e6eb; border-bottom: 1px solid #e1e6eb; }
.gantt thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #004382;
  color: white;
  font-weight: 400;
  text-align: center;
  padding: 6px 8px;
  white-space: nowrap;
}
.gantt thead tr:nth-child(2) th { top: 29px; }
.gantt-month { letter-spacing: 0.04em; text-transform: uppercase; font-size: 11px; }
.gantt-day { width: 18px; min-width: 18px; padding: 4px 0; font-variant-numeric: tabular-nums; }
.gantt-day.is-off { background: #00386e; color: #9db4cc; }
.gantt-stage {
  width: 148px;
  min-width: 148px;
  background: #f4f7fb;
  text-align: left;
  vertical-align: middle;
  padding: 8px 10px;
  font-weight: 400;
}
.gantt-stage b { display: block; text-transform: uppercase; letter-spacing: 0.04em; font-size: 11px; color: #004382; font-weight: 650; }
.gantt-stage small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.gantt-name { min-width: 210px; padding: 7px 10px; background: white; white-space: nowrap; }
.gantt-days { width: 46px; min-width: 46px; text-align: center; font-variant-numeric: tabular-nums; background: white; }
.gantt-cell { width: 18px; min-width: 18px; height: 28px; padding: 0; background: white; }
.gantt-cell.is-off { background: #f3f5f7; }
.gantt-cell.is-on { background: #2f6fad; cursor: help; }
.gantt-cell.is-on:hover { background: #004382; }
.gantt-float {
  position: absolute;
  z-index: 40;
  pointer-events: none;
  width: max-content;
  max-width: 220px;
  background: #10243a;
  color: white;
  border-radius: 8px;
  padding: 8px 10px;
  box-shadow: 0 8px 24px rgba(16, 36, 58, 0.28);
  white-space: nowrap;
}
.gantt-float b { display: block; font-size: 13px; font-weight: 650; }
.gantt-float small { display: block; margin-top: 2px; color: #d5e2ef; font-size: 12px; white-space: normal; }
dialog.modal.is-gantt .hint { margin: 10px 0 0; }
