/* ============================================================
   Cotizador SENIC · hoja de estilos
   Paleta de marca: azul marino #16294A · dorado #E6BE50
                    azul línea #215F9A · celeste #A6CAEC
   ============================================================ */

:root {
  --navy: #16294a;
  --navy-soft: #1e3a63;
  --navy-line: #24405f;
  --gold: #e6be50;
  --blue: #215f9a;
  --sky: #a6caec;
  --bg: #f2f5f9;
  --card: #ffffff;
  --ink: #16202e;
  --ink-soft: #3d4b5e;
  --muted: #6b7a8d;
  --line: #e2e8f0;
  --line-soft: #eef2f7;
  --ok: #1d7a4c;
  --ok-bg: #e8f6ee;
  --err: #b42318;
  --err-bg: #fdecea;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 32, 56, 0.05), 0 8px 24px -18px rgba(16, 32, 56, 0.35);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "Segoe UI Variable", "Segoe UI", Inter, system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.92em;
  background: #f1f4f9;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
}

.icon { flex: none; }

/* ---------------- Estructura ---------------- */

.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 252px;
  flex: none;
  background: linear-gradient(180deg, #16294a 0%, #12233f 100%);
  color: #cbd8e9;
  padding: 18px 14px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 8px 20px;
  color: #fff;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }

.brand__logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff;
  display: grid;
  place-items: center;
  padding: 4px;
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.6);
}
.brand__logo img { width: 100%; height: 100%; object-fit: contain; }

.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-size: 16px; font-weight: 700; letter-spacing: 0.16em; }
.brand__sub { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.1em; color: #93a8c6; margin-top: 3px; }

.nav { display: flex; flex-direction: column; gap: 2px; }

.nav__link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #c2d1e5;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.nav__link:hover { background: rgba(255, 255, 255, 0.07); color: #fff; text-decoration: none; }
.nav__link--active { background: var(--gold); color: #1a2a42; font-weight: 650; }
.nav__link--active:hover { background: var(--gold); color: #1a2a42; }
.nav__link--soon { opacity: 0.5; cursor: default; }
.nav__link--soon:hover { background: transparent; color: #c2d1e5; }

.nav__soon {
  margin-left: auto;
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
}

.sidebar__foot { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.1); }

.who { display: flex; align-items: center; gap: 10px; padding: 4px 6px 12px; }
.who__avatar {
  width: 34px; height: 34px; flex: none;
  border-radius: 50%;
  background: #27456d;
  color: #fff;
  display: grid; place-items: center;
  font-weight: 650; font-size: 14px;
}
.who__text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.who__name { font-size: 13px; color: #fff; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who__role { font-size: 10.5px; color: #8fa5c3; text-transform: uppercase; letter-spacing: 0.06em; }

.logout { margin: 0; }

.main { flex: 1; min-width: 0; padding: 28px 34px 64px; }

.topbar {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 22px;
}
.page-title { font-size: 25px; }
.page-sub { margin: 5px 0 0; color: var(--muted); font-size: 13.5px; }
.actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

/* ---------------- Botones ---------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.1;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--navy-soft); }

.btn--ghost { background: #fff; border-color: var(--line); color: #26344a; }
.btn--ghost:hover { background: #f6f8fc; border-color: #cfd9e6; }

.btn--danger { color: var(--err); border-color: #f0c8c4; }

.btn--sm { padding: 6px 10px; font-size: 12.5px; border-radius: 8px; }
.btn--block { width: 100%; }

/* ---------------- Tarjetas ---------------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card__head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line-soft);
}
.card__head--slim { padding: 13px 18px; background: #fbfcfe; }
.card__head--toolbar { flex-wrap: wrap; }
.card__title { font-size: 15px; }
.card__body { padding: 18px; }
.card__foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--line-soft);
  background: #fbfcfe;
}

/* ---------------- Indicadores ---------------- */

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.kpi { padding: 16px 18px 15px; }
.kpi__label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); font-weight: 600; }
.kpi__value { font-size: 27px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.kpi__hint { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------------- Grillas ---------------- */

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-2--start { align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.stack { display: grid; gap: 16px; margin-top: 18px; }

/* ---------------- Tablas ---------------- */

.table-wrap { overflow-x: auto; }

.table { width: 100%; border-collapse: collapse; }
.table th {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--muted); font-weight: 650; text-align: left;
  padding: 10px 16px;
  background: #fafbfd;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fbfcfe; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.cell-main { font-weight: 550; color: var(--ink); }
.cell-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.cell-actions { text-align: right; white-space: nowrap; }
.cell-actions form { display: inline; }
.cell-actions .btn + .btn { margin-left: 4px; }
td.ref-cell { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }

.muted { color: var(--muted); }

/* ---------------- Etiquetas ---------------- */

.badge {
  display: inline-block;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px;
  background: #eef2f7; color: #50617a;
}
.badge--on { background: var(--ok-bg); color: var(--ok); }
.badge--off { background: #f3f4f6; color: #79828f; }
.badge--soft { background: #eef4fb; color: var(--blue); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip {
  padding: 7px 13px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: #41506a;
  font-size: 13px;
  font-weight: 550;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.chip:hover { text-decoration: none; border-color: #c9d5e5; background: #fbfcfe; }
.chip--active, .chip--active:hover { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ---------------- Formularios ---------------- */

.field { display: grid; gap: 6px; align-content: start; }
.field--full { grid-column: 1 / -1; }
.field__label { font-size: 12.5px; font-weight: 650; color: #34435a; }
.field__hint { font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.field--note { background: #f8fafd; border: 1px dashed var(--line); border-radius: 10px; padding: 12px 14px; }

.input, .select, .textarea {
  width: 100%;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #d7dfe9;
  border-radius: 10px;
  padding: 9px 12px;
  min-height: 40px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.textarea { resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(33, 95, 154, 0.14);
}
.input::placeholder, .textarea::placeholder { color: #9aa7b8; }

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7a8d' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

.search { position: relative; flex: 1 1 260px; max-width: 420px; }
.search__icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); display: flex; }
.input--search { padding-left: 38px; }

.check { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: #34435a; }
.check input { width: 17px; height: 17px; accent-color: var(--navy); }

.inline-form { display: flex; gap: 8px; }
.inline-form .input { flex: 1; }

.form .card__body { display: grid; gap: 15px; }

/* ---------------- Avisos ---------------- */

.flash {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.flash--ok { background: var(--ok-bg); color: var(--ok); border-color: #c6e9d6; }
.flash--error { background: var(--err-bg); color: var(--err); border-color: #f5ccc7; }

.empty { padding: 40px 24px; text-align: center; }
.empty__title { font-weight: 650; font-size: 14.5px; }
.empty__text { color: var(--muted); font-size: 13px; margin-top: 6px; max-width: 420px; margin-left: auto; margin-right: auto; }

/* ---------------- Listas ---------------- */

.roadmap { list-style: none; margin: 0 0 16px; padding: 0; }
.roadmap__item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13.5px;
  color: #33425a;
}
.roadmap__item:last-child { border-bottom: 0; }
.roadmap__dot { width: 9px; height: 9px; border-radius: 50%; background: #d7dfe9; flex: none; }
.roadmap__item--done .roadmap__dot { background: #2f9e68; }
.roadmap__item--done { color: #6b7a8d; }
.roadmap__item--next .roadmap__dot { background: var(--gold); box-shadow: 0 0 0 4px rgba(230, 190, 80, 0.2); }
.roadmap__item--next { font-weight: 650; color: var(--ink); }
.roadmap__tag {
  margin-left: auto; font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ok); background: var(--ok-bg); padding: 2px 7px; border-radius: 999px; font-weight: 700;
}
.roadmap__tag--next { color: #8a6a10; background: #fdf4dc; }

.summary { list-style: none; margin: 0; padding: 0; }
.summary li {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
}
.summary li:last-child { border-bottom: 0; }
.summary strong { font-variant-numeric: tabular-nums; color: var(--muted); }

.taglist { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 12.5px;
  background: #f3f6fa;
  border: 1px solid var(--line);
  color: #3b4a61;
  padding: 5px 11px;
  border-radius: 999px;
}
.tag--off { opacity: 0.5; text-decoration: line-through; }

/* ---------------- Login ---------------- */

.auth { display: grid; grid-template-columns: 1.05fr 0.95fr; min-height: 100vh; background: #f4f6f9; }

.auth__aside {
  position: relative;
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 46px 48px;
  color: #fff;
  background:
    radial-gradient(900px 500px at 110% -10%, rgba(230, 190, 80, 0.16), transparent 60%),
    linear-gradient(160deg, #16294a 0%, #1b355c 55%, #22436f 100%);
}
.auth__brand { display: flex; align-items: center; gap: 14px; }
.auth__logo {
  width: 74px; height: 74px; flex: none;
  background: #fff; border-radius: 18px;
  display: grid; place-items: center; padding: 7px;
}
.auth__logo img { width: 100%; height: 100%; object-fit: contain; }
.auth__name { font-size: 21px; font-weight: 700; letter-spacing: 0.18em; }
.auth__sub { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em; color: #a9bbd4; margin-top: 4px; }

.auth__pitch h2 { font-size: 34px; line-height: 1.16; letter-spacing: -0.02em; max-width: 430px; font-weight: 650; }
.auth__pitch p { color: #c4d2e6; font-size: 14.5px; line-height: 1.6; max-width: 400px; margin: 14px 0 0; }
.auth__rubros { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; padding: 0; }
.auth__rubros li {
  font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px; padding: 6px 12px; color: #d7e3f3;
}
.auth__foot { font-size: 11.5px; color: #8ea4c2; letter-spacing: 0.02em; }

.auth__body { display: grid; place-items: center; padding: 34px; }

.login { width: 100%; max-width: 366px; display: grid; gap: 15px; }
.login h1 { font-size: 26px; }
.login__sub { margin: -9px 0 4px; color: var(--muted); font-size: 13.5px; }

.login__note {
  display: grid;
  gap: 3px;
  padding: 11px 13px;
  border: 1px solid #dbe6f2;
  border-radius: 10px;
  background: #f5f9fd;
  font-size: 12.5px;
  color: #3b4a61;
  text-align: left;
}
.login__note-title {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #215f9a;
}
.login__note-hint { font-size: 11.5px; color: var(--muted); }

/* ---------------- Responsive ---------------- */

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .app { display: block; }
  .sidebar {
    position: static; width: auto; height: auto;
    flex-direction: row; align-items: center; gap: 10px;
    padding: 10px 14px; overflow-x: auto;
  }
  .brand { padding: 0 10px 0 0; }
  .brand__logo { width: 38px; height: 38px; }
  .brand__text { display: none; }
  .nav { flex-direction: row; gap: 4px; }
  .nav__link { padding: 8px 11px; white-space: nowrap; }
  .nav__soon { display: none; }
  .sidebar__foot { margin-left: auto; padding: 0; border: 0; display: flex; align-items: center; gap: 8px; }
  .who { padding: 0; }
  .who__text { display: none; }
  .logout .btn { padding: 7px 9px; }
  .logout .btn span, .logout .btn { font-size: 0; }
  .logout .btn .icon { margin: 0; }
  .main { padding: 20px 18px 48px; }
  .page-title { font-size: 21px; }

  .auth { grid-template-columns: 1fr; }
  .auth__aside { padding: 34px 28px 30px; gap: 28px; }
  .auth__pitch h2 { font-size: 26px; }
  .auth__foot { display: none; }
}

@media (max-width: 640px) {
  .kpis { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .card__head--toolbar { flex-direction: column; align-items: stretch; }
  .search { max-width: none; }
  .inline-form { flex-direction: column; }
  .auth__body { padding: 24px 20px 40px; }
}

/* ---------------- Paginación ---------------- */

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-top: 1px solid var(--line-soft);
}
.pager__info { font-size: 12.5px; color: var(--muted); }
.pager__links { display: flex; align-items: center; gap: 8px; }
.pager__current { font-size: 12.5px; color: var(--muted); }

.btn--icon-danger { color: var(--err); }
.btn--icon-danger:hover { background: var(--err-bg); border-color: #f5ccc7; }

/* ---------------- Configuración protegida ---------------- */

.lock-card { max-width: 430px; margin: 18px auto 0; }
.lock-card__icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: #eef4fb; color: var(--blue);
  display: grid; place-items: center;
  margin-bottom: 12px;
}
.lock-card__title { font-size: 19px; }
.lock-card__text { color: var(--muted); font-size: 13.5px; line-height: 1.55; margin: 8px 0 16px; }
.lock-card__form { display: grid; gap: 12px; margin-bottom: 14px; }
.lock-card__back { font-size: 12.5px; color: var(--muted); }

/* ---------------- Clientes ---------------- */

.cell-link { font-weight: 600; color: var(--ink); }
.cell-link:hover { color: var(--blue); }

.badge--late { background: var(--err-bg); color: var(--err); }
.badge--today { background: #fdf4dc; color: #8a6a10; }
.badge--soon { background: #eef4fb; color: var(--blue); }

.client-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.client-head__name { font-size: 22px; }
.client-head__meta { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.client-head__notes {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--ink-soft);
  background: #f8fafd;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  max-width: 560px;
}

.visit-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.visit-form .field--full { grid-column: 1 / -1; }
.visit-form button { grid-column: 1 / -1; }

.visits { list-style: none; margin: 0; padding: 0; }
.visit {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
}
.visit__date { font-size: 12.5px; font-weight: 600; color: #34435a; }
.visit__kind { font-size: 13px; }
.visit__state { margin-top: 3px; }
.visit__actions { display: flex; gap: 6px; }

.visits-card { margin-top: 18px; }
.visit-list { list-style: none; margin: 0; padding: 6px 18px 14px; }
.visit-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
}
.visit-row:last-child { border-bottom: 0; }
.visit-row__client { font-weight: 600; color: var(--ink); }
.visit-row__kind { color: var(--muted); font-size: 12.5px; }

/* ---------------- Análisis ---------------- */

.kpis--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpis--five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpi__value--sm { font-size: 17px; }

.analytics-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.filters { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.field--inline { gap: 4px; }
.field--inline .select { min-height: 38px; }
.analytics-toolbar__note { font-size: 12.5px; color: var(--muted); }

.chart { width: 100%; height: auto; display: block; }
.chart__grid { stroke: var(--line); stroke-width: 1; }
.chart__label { font-size: 15px; fill: var(--muted); font-family: inherit; }
.chart__value { font-size: 14px; fill: #4a5a70; font-family: inherit; }
.chart__legend { font-size: 14px; fill: #16294a; font-family: inherit; }
.chart__legend--gold { fill: #a8892c; }
.chart__group rect { transition: opacity 0.12s; }
.chart__group:hover rect { opacity: 0.82; }

.sharebar { display: inline-flex; align-items: center; gap: 8px; min-width: 120px; }
.sharebar__bar { display: inline-block; height: 7px; border-radius: 4px; background: var(--gold); min-width: 2px; }
.sharebar__text { font-size: 12px; color: var(--muted); }

@media (max-width: 1100px) {
  .kpis--five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .visit { grid-template-columns: 1fr; gap: 4px; }
  .visit__actions { justify-content: flex-start; }
  .visit-form { grid-template-columns: 1fr; }
}

/* ---------------- Impresión de fichas ---------------- */

@media print {
  body { background: #fff; }
  .app { display: block; }
  .sidebar, .topbar .actions, .page-sub, .client-head .actions, .btn, .nav { display: none !important; }
  .main { padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
  .kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .table th { background: #fff; }
  a { color: inherit; text-decoration: none; }
}

/* ---------------- Logo en configuración ---------------- */

.logo-edit { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.logo-edit__preview {
  width: 220px; max-height: 110px; object-fit: contain;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px;
}
.logo-edit__form { flex: 1; min-width: 240px; display: grid; gap: 10px; }

.new-quote { display: flex; align-items: center; gap: 8px; }
.new-quote .select--sm { width: auto; }

/* ---------------- Presupuestos por estado ---------------- */

.status-card { margin-bottom: 18px; }
.status-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.status-cell { padding: 14px 18px 16px; border-right: 1px solid var(--line-soft); }
.status-cell:last-child { border-right: 0; }
.status-cell__dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.status-cell__label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); font-weight: 650;
}
.status-cell__value { display: block; font-size: 26px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.status-cell__meta { font-size: 11.5px; color: var(--muted); }

@media (max-width: 900px) {
  .status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .status-cell:nth-child(2n) { border-right: 0; }
  .status-cell:nth-child(-n+2) { border-bottom: 1px solid var(--line-soft); }
}

/* ---------------- Estado en la lista ---------------- */

.select--xs {
  width: auto;
  min-height: 30px;
  padding: 4px 26px 4px 8px;
  font-size: 12px;
  border-radius: 8px;
  background-position: right 8px center;
}
.status-form { margin: 0; }

/* ---------------- Para aprobar (inicio) ---------------- */

.pending-list { list-style: none; margin: 0; padding: 6px 18px 12px; }
.pending-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
}
.pending-row:last-child { border-bottom: 0; }
.pending-row__client { font-weight: 600; color: var(--ink); }
.pending-row__number { color: var(--muted); font-size: 12px; }
.pending-row__total { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; grid-row: span 2; align-self: center; }

/* ---------------- Filtros de presupuestos ---------------- */

.filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filters .search { flex: 1 1 220px; max-width: 360px; }
.filters .input--date { width: 148px; min-height: 38px; }

.textarea--code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.6;
}

.backup-list { list-style: none; margin: 14px 0 0; padding: 0; }
.backup-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line-soft);
}
.backup-list li:last-child { border-bottom: 0; }
.check--inline { font-size: 12.5px; }
.btn.is-loading { opacity: 0.6; pointer-events: none; }

/* ---------------- Buscador global ---------------- */

.nav__search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0 0 14px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #c2d1e5;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}
.nav__search:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.nav__search kbd {
  margin-left: auto;
  font-size: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  padding: 1px 5px;
  color: #93a8c6;
  font-family: inherit;
}

.searchbox {
  width: min(560px, 92vw);
  border: 0;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 30px 70px -24px rgba(12, 22, 38, 0.6);
}
.searchbox::backdrop { background: rgba(12, 22, 38, 0.45); }
.searchbox .input { font-size: 15px; }
.searchbox__results { margin-top: 10px; max-height: 52vh; overflow: auto; }
.searchbox__group { padding-top: 4px; }
.searchbox__title {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-weight: 700;
  padding: 8px 8px 4px;
}
.searchbox__row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 8px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
}
.searchbox__row:hover { background: #f4f7fb; }
.searchbox__main { font-size: 13.5px; }
.searchbox__meta { font-size: 12px; color: var(--muted); white-space: nowrap; }
.searchbox__empty { padding: 16px 8px; color: var(--muted); font-size: 13px; }

/* ---------------- Semáforo de estados ---------------- */

.status-cell { white-space: nowrap; }
.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: middle;
  background: #c3ccd8;
}
.status-dot--borrador { background: #e08a1e; }
.status-dot--enviada { background: #d4b21f; }
.status-dot--aprobada { background: #2f9e68; }
.status-dot--rechazada { background: #c33b2e; }

.status-select--borrador { background-color: #fff4e6; border-color: #f0c58a; color: #8a5310; }
.status-select--enviada { background-color: #fdf6d8; border-color: #e5cf7f; color: #7a6410; }
.status-select--aprobada { background-color: #e8f6ee; border-color: #c6e9d6; color: #1d7a4c; }
.status-select--rechazada { background-color: #fdecea; border-color: #f5ccc7; color: #b42318; }

.quote-row td:first-child { box-shadow: inset 3px 0 0 transparent; }
.quote-row--borrador td:first-child { box-shadow: inset 3px 0 0 #e08a1e; }
.quote-row--enviada td:first-child { box-shadow: inset 3px 0 0 #d4b21f; }
.quote-row--aprobada td:first-child { box-shadow: inset 3px 0 0 #2f9e68; }
.quote-row--rechazada td:first-child { box-shadow: inset 3px 0 0 #c33b2e; }

.flash--warn {
  background: #fff4e6;
  border: 1px solid #f0c58a;
  color: #8a5310;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 14px;
}
