/* MS Agros CRM — tema "campo de noche": fondo verde-carbón, acento naranja Texas, cifras en serif. */
:root {
  --bg: #121815;
  --bg-2: #18201c;
  --panel: #1b231f;
  --panel-2: #222c27;
  --raise: #2a3530;
  --line: rgba(238, 233, 223, .09);
  --line-2: rgba(238, 233, 223, .16);
  --text: #eee9df;
  --text-2: #c9c6bd;
  --muted: #8e978f;
  --orange: #f26f11;
  --orange-2: #ff8a3a;
  --orange-soft: rgba(242, 111, 17, .14);
  --good: #7fc48a;
  --good-soft: rgba(127, 196, 138, .13);
  --warn: #e7b65a;
  --warn-soft: rgba(231, 182, 90, .14);
  --bad: #ef7d6e;
  --bad-soft: rgba(239, 125, 110, .14);
  --info: #7fb6dc;
  --info-soft: rgba(127, 182, 220, .13);
  /* Segmentos (orden fijo, validado para daltonismo sobre --panel) */
  --seg-1: #e2660e; --seg-2: #3f94c4; --seg-3: #b08a2e; --seg-4: #8f73d6; --seg-5: #4fa860;
  --radius: 18px;
  --radius-sm: 11px;
  --serif: "DM Serif Display", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
  font-family: var(--sans);
  color: var(--text);
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; font-size: 15px; line-height: 1.5; -webkit-text-size-adjust: 100%;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(242, 111, 17, .10), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(79, 168, 96, .07), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
}
/* Curvas de nivel sutiles, como un mapa topográfico de campo */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600' viewBox='0 0 600 600'%3E%3Cg fill='none' stroke='%23eee9df' stroke-opacity='.035' stroke-width='1.2'%3E%3Cpath d='M-50 120c90-60 170 40 260-10s150-90 250-20 120 60 190 20'/%3E%3Cpath d='M-50 170c90-60 170 40 260-10s150-90 250-20 120 60 190 20'/%3E%3Cpath d='M-50 220c90-60 170 40 260-10s150-90 250-20 120 60 190 20'/%3E%3Cpath d='M-50 400c120 40 180-50 290 0s170 70 260 10 90-30 150 10'/%3E%3Cpath d='M-50 450c120 40 180-50 290 0s170 70 260 10 90-30 150 10'/%3E%3Cpath d='M-50 500c120 40 180-50 290 0s170 70 260 10 90-30 150 10'/%3E%3C/g%3E%3C/svg%3E");
}
#app, #modal-root, #toast { position: relative; z-index: 1; }
a { color: var(--orange-2); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1 { font-family: var(--serif); font-weight: 400; font-size: 2.1rem; line-height: 1.1; margin: 0; letter-spacing: .005em; }
h2 { font-size: .74rem; font-weight: 700; margin: 0 0 1rem; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); }
h3 { font-size: .95rem; margin: 0 0 .5rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.hidden { display: none !important; }
.eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--orange); }
.serif { font-family: var(--serif); font-weight: 400; }

/* ---------- Barra superior ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 1.5rem;
  padding: .7rem clamp(1rem, 3vw, 2.5rem); background: rgba(18, 24, 21, .82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.topbar .logo { height: 46px; width: auto; display: block; }
.topnav { display: flex; gap: .2rem; flex: 1; overflow-x: auto; scrollbar-width: none; }
.topnav a {
  color: var(--text-2); padding: .5rem .85rem; border-radius: 999px; font-weight: 600; font-size: .9rem; white-space: nowrap;
  display: inline-flex; align-items: center; gap: .45rem; transition: background .15s, color .15s;
}
.topnav a:hover { background: var(--panel-2); color: var(--text); text-decoration: none; }
.topnav a.active { background: var(--orange); color: #1a0d03; }
.topnav a svg { width: 17px; height: 17px; }
.me-chip { display: flex; align-items: center; gap: .6rem; position: relative; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .85rem;
  background: var(--raise); color: var(--orange-2); border: 1px solid var(--line-2); cursor: pointer;
}
.me-menu {
  position: absolute; right: 0; top: calc(100% + .5rem); background: var(--panel-2); border: 1px solid var(--line-2);
  border-radius: 14px; padding: .5rem; min-width: 220px; box-shadow: 0 18px 40px rgba(0,0,0,.45);
}
.me-menu .who { padding: .5rem .6rem .7rem; border-bottom: 1px solid var(--line); margin-bottom: .35rem; font-size: .85rem; }
.me-menu button, .me-menu a { display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--text); font: inherit; padding: .55rem .6rem; border-radius: 8px; cursor: pointer; }
.me-menu button:hover, .me-menu a:hover { background: var(--raise); text-decoration: none; }

.main { padding: 1.6rem clamp(1rem, 3vw, 2.5rem) 4rem; max-width: 1480px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.page-head .actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.dock, .fab { display: none; }

@media (max-width: 900px) {
  .topbar { padding: .55rem 1rem; gap: .75rem; }
  .topbar .logo { height: 36px; }
  .topnav { display: none; }
  .me-chip { margin-left: auto; }
  .main { padding: 1.1rem 1rem 7.5rem; }
  h1 { font-size: 1.65rem; }
  /* Dock flotante con botón central de registro */
  .dock {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; position: fixed; z-index: 50;
    left: .75rem; right: .75rem; bottom: calc(.75rem + env(safe-area-inset-bottom)); height: 64px; padding: 0 .3rem;
    background: rgba(34, 44, 39, .9); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--line-2); border-radius: 22px; box-shadow: 0 14px 34px rgba(0,0,0,.5);
  }
  .dock a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .66rem; font-weight: 600; color: var(--muted); }
  .dock a:hover { text-decoration: none; }
  .dock a.active { color: var(--orange-2); }
  .dock svg { width: 22px; height: 22px; }
  .dock .fab {
    display: grid; place-items: center; justify-self: center; width: 58px; height: 58px; margin-top: -26px; border-radius: 19px;
    border: 4px solid var(--bg); background: var(--orange); color: #1a0d03; font-size: 1.9rem; font-weight: 300; cursor: pointer;
    box-shadow: 0 8px 22px rgba(242, 111, 17, .45);
  }
  .hide-mobile { display: none !important; }
}
@media (min-width: 901px) { .show-mobile { display: none !important; } }

/* ---------- Componentes ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--text); padding: .55rem 1rem; border-radius: 999px; font: inherit; font-weight: 600; font-size: .9rem;
  cursor: pointer; min-height: 40px; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { border-color: rgba(238,233,223,.3); background: var(--raise); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--orange); border-color: var(--orange); color: #1a0d03; }
.btn.primary:hover { background: var(--orange-2); }
.btn.danger { color: var(--bad); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.sm { padding: .3rem .75rem; min-height: 32px; font-size: .82rem; }
.btn svg { width: 17px; height: 17px; }
.btn:disabled { opacity: .5; cursor: default; }

.filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.2rem; align-items: center; }
.filters > * { flex: 1 1 170px; max-width: 260px; }
.filters .search { flex: 2 1 240px; max-width: 380px; }
@media (max-width: 900px) { .filters > * { max-width: none; } }

input, select, textarea {
  font: inherit; color: var(--text); width: 100%; padding: .6rem .8rem; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--bg-2); min-height: 42px;
}
select { appearance: none; -webkit-appearance: none; padding-right: 2rem;
  background: var(--bg-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238e978f' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right .8rem center; }
select option { background: var(--panel-2); color: var(--text); }
input::placeholder, textarea::placeholder { color: #6c756e; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(242, 111, 17, .45); outline-offset: 0; border-color: var(--orange); }
textarea { min-height: 80px; resize: vertical; }
label { display: block; font-size: .78rem; font-weight: 700; margin-bottom: .3rem; color: var(--text-2); letter-spacing: .02em; }
.field { margin-bottom: .9rem; }
.form-grid { display: grid; gap: 0 1rem; grid-template-columns: 1fr 1fr; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
fieldset { border: 1px solid var(--line); border-radius: 14px; padding: .8rem 1rem .25rem; margin: 0 0 1rem; background: rgba(255,255,255,.015); }
legend { font-size: .7rem; font-weight: 800; color: var(--orange); padding: 0 .4rem; text-transform: uppercase; letter-spacing: .16em; }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip-check { position: relative; margin: 0; }
.chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.chip-check span { display: inline-block; padding: .35rem .8rem; border: 1px solid var(--line-2); border-radius: 999px; font-size: .84rem; font-weight: 500; cursor: pointer; background: var(--bg-2); color: var(--text-2); }
.chip-check input:checked + span { background: var(--orange-soft); border-color: var(--orange); color: var(--orange-2); font-weight: 700; }
.chip-check input:focus-visible + span { outline: 2px solid var(--orange); }

.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .14rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 700; background: rgba(238,233,223,.08); color: var(--text-2); white-space: nowrap; }
.badge.green { background: var(--good-soft); color: var(--good); }
.badge.red { background: var(--bad-soft); color: var(--bad); }
.badge.amber { background: var(--warn-soft); color: var(--warn); }
.badge.blue { background: var(--info-soft); color: var(--info); }
.badge.earth { background: var(--orange-soft); color: var(--orange-2); }
.dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; flex: none; }

/* Tablas y tarjetas */
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: .75rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr.clickable { cursor: pointer; transition: background .12s; }
tbody tr.clickable:hover { background: rgba(242, 111, 17, .05); }
.list-cards { display: none; }
@media (max-width: 900px) {
  .table-wrap.responsive { display: none; }
  .list-cards { display: flex; flex-direction: column; gap: .6rem; }
}
.item-card { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: .9rem 1rem; color: var(--text); cursor: pointer; }
.item-card:hover { border-color: var(--line-2); text-decoration: none; }
.item-card .top { display: flex; justify-content: space-between; gap: .5rem; align-items: flex-start; }
.item-card .title { font-weight: 700; color: var(--text); }
.item-card .meta { font-size: .84rem; color: var(--muted); margin-top: .2rem; }
.item-card .row-badges { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .55rem; }
.count-line { font-size: .85rem; color: var(--muted); margin: -.4rem 0 .8rem; }

/* Línea de tiempo (bitácora) */
.timeline { display: flex; flex-direction: column; }
.tl-item { position: relative; padding: 0 0 1.1rem 1.4rem; }
.tl-item::before { content: ""; position: absolute; left: 4px; top: .55rem; bottom: -.2rem; width: 1px; background: var(--line-2); }
.tl-item:last-child::before { display: none; }
.tl-item::after { content: ""; position: absolute; left: 0; top: .35rem; width: 9px; height: 9px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px var(--orange-soft); }
.tl-item .head { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; font-size: .86rem; }
.tl-item .body { font-size: .92rem; margin-top: .3rem; white-space: pre-wrap; color: var(--text-2); }
.tl-item .kv { font-size: .85rem; margin-top: .25rem; color: var(--text-2); }
.tl-item .kv b { color: var(--muted); font-weight: 600; }

.info-list { display: grid; grid-template-columns: 150px 1fr; gap: .5rem .9rem; font-size: .92rem; margin: 0; }
.info-list dt { color: var(--muted); font-size: .82rem; padding-top: .1rem; }
.info-list dd { margin: 0; word-break: break-word; }
@media (max-width: 480px) { .info-list { grid-template-columns: 1fr; gap: .1rem; } .info-list dt { margin-top: .6rem; } }
.quick-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }

.tabs { display: flex; gap: .3rem; margin-bottom: 1.1rem; overflow-x: auto; padding: .25rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; width: fit-content; max-width: 100%; }
.tabs button { background: none; border: 0; padding: .45rem .95rem; font: inherit; font-size: .86rem; font-weight: 600; color: var(--muted); cursor: pointer; border-radius: 999px; white-space: nowrap; }
.tabs button.active { background: var(--raise); color: var(--text); }

/* Modal (hoja inferior en móvil) */
.modal-backdrop { position: fixed; inset: 0; background: rgba(5, 8, 6, .7); backdrop-filter: blur(4px); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 5vh 1rem; overflow-y: auto; }
.modal { background: var(--panel); border: 1px solid var(--line-2); border-radius: 22px; width: 100%; max-width: 740px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.modal header { display: flex; justify-content: space-between; align-items: center; padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--line); }
.modal header h2 { margin: 0; font-family: var(--serif); font-size: 1.5rem; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--text); }
.modal .content { padding: 1.2rem 1.3rem; }
.modal footer { display: flex; justify-content: flex-end; gap: .5rem; padding: .9rem 1.3rem; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--panel); border-radius: 0 0 22px 22px; }
@media (max-width: 600px) {
  .modal-backdrop { padding: 2.5rem 0 0; align-items: flex-start; }
  .modal { margin-top: auto; }
  .modal { border-radius: 24px 24px 0 0; min-height: calc(100vh - 2.5rem); }
  .modal footer { border-radius: 0; padding-bottom: calc(.9rem + env(safe-area-inset-bottom)); }
}

#toast { position: fixed; left: 50%; bottom: 6.5rem; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: .4rem; align-items: center; pointer-events: none; }
.toast-msg { background: var(--text); color: var(--bg); padding: .65rem 1.1rem; border-radius: 999px; font-size: .9rem; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.toast-msg.error { background: var(--bad); color: #1d0705; }

.empty { text-align: center; padding: 2.2rem 1rem; color: var(--muted); }
.alert { padding: .8rem 1rem; border-radius: 14px; background: var(--warn-soft); color: var(--warn); font-size: .9rem; margin-bottom: 1rem; border: 1px solid rgba(231,182,90,.2); }
.alert.info { background: var(--info-soft); color: var(--info); border-color: rgba(127,182,220,.2); }
.alert.success { background: var(--good-soft); color: var(--good); border-color: rgba(127,196,138,.2); }
.alert b { color: var(--text); }
code { background: var(--bg-2); padding: .15rem .45rem; border-radius: 6px; color: var(--orange-2); }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 3rem; overflow: hidden; border-right: 1px solid var(--line); }
.login-art img { width: min(460px, 80%); }
.login-art .tag { font-family: var(--serif); font-size: clamp(2rem, 3.6vw, 3.3rem); line-height: 1.08; max-width: 14ch; }
.login-art .tag em { color: var(--orange); font-style: normal; }
.login-art .segs { display: flex; flex-wrap: wrap; gap: .45rem; }
.login-side { display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; }
.login-card { width: 100%; max-width: 380px; }
.login-card h1 { margin: .4rem 0 1.6rem; }
.login-card .mobile-logo { display: none; width: 240px; margin-bottom: 1.5rem; }
@media (max-width: 900px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-card .mobile-logo { display: block; }
}

/* ---------- Tablero ---------- */
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.5rem; align-items: end; margin-bottom: 1.6rem; }
.hero .big { font-family: var(--serif); font-size: clamp(3rem, 7vw, 5.6rem); line-height: .95; color: var(--orange); letter-spacing: -.01em; font-variant-numeric: lining-nums; }
.hero .big small { font-size: .35em; color: var(--muted); letter-spacing: 0; }
.hero .lede { color: var(--text-2); margin-top: .6rem; font-size: 1rem; }
.hero .lede b { color: var(--text); }
.hero-controls { display: flex; flex-direction: column; gap: .6rem; align-items: flex-end; }
.seg-ctrl { display: inline-flex; flex-wrap: wrap; gap: .2rem; padding: .25rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; }
.seg-ctrl button { border: 0; background: none; color: var(--muted); font: inherit; font-size: .8rem; font-weight: 700; padding: .4rem .75rem; border-radius: 999px; cursor: pointer; }
.seg-ctrl button.on { background: var(--text); color: var(--bg); }
.hero-controls .row { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
.hero-controls select, .hero-controls input { width: auto; min-width: 150px; min-height: 36px; padding-top: .35rem; padding-bottom: .35rem; font-size: .85rem; border-radius: 999px; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 1rem; }
  .hero-controls { align-items: stretch; }
  .seg-ctrl { overflow-x: auto; flex-wrap: nowrap; }
  .hero-controls .row { justify-content: stretch; }
  .hero-controls .row > * { flex: 1; }
}

/* Franja de indicadores tipo marcador */
.ticker { display: grid; grid-template-columns: repeat(6, 1fr); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); margin-bottom: 1.6rem; }
.tick { padding: 1rem 1.1rem 1.05rem; border-left: 1px solid var(--line); color: var(--text); }
.tick:first-child { border-left: 0; padding-left: 0; }
a.tick:hover { text-decoration: none; background: rgba(242,111,17,.05); }
.tick .k { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.tick .v { font-family: var(--serif); font-size: 2.35rem; line-height: 1.05; margin-top: .25rem; font-variant-numeric: lining-nums tabular-nums; }
.tick .s { font-size: .8rem; color: var(--muted); }
.tick.alert-tick .v { color: var(--orange); }
@media (max-width: 1100px) { .ticker { grid-template-columns: repeat(3, 1fr); } .tick:nth-child(4) { border-left: 0; padding-left: 0; } .tick:nth-child(n+4) { border-top: 1px solid var(--line); } }
@media (max-width: 560px) {
  .ticker { grid-template-columns: 1fr 1fr; }
  .tick { padding: .85rem .8rem; }
  .tick:nth-child(odd) { border-left: 0; padding-left: 0; }
  .tick:nth-child(4) { border-left: 1px solid var(--line); padding-left: .8rem; }
  .tick:nth-child(n+3) { border-top: 1px solid var(--line); }
  .tick .v { font-size: 1.9rem; }
}

.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem; }
.span-12 { grid-column: span 12; } .span-8 { grid-column: span 8; } .span-7 { grid-column: span 7; } .span-6 { grid-column: span 6; } .span-5 { grid-column: span 5; } .span-4 { grid-column: span 4; }
@media (max-width: 1100px) { .span-8, .span-7, .span-6, .span-5, .span-4 { grid-column: span 12; } }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1.1rem; }
.card-head h2 { margin: 0; }
.card-head .note { font-size: .8rem; color: var(--muted); }

/* Ruta comercial: el embudo como un camino con paradas */
.route { position: relative; display: grid; grid-template-columns: repeat(6, 1fr) 1.15fr; align-items: start; padding: .5rem 0 0; }
.route::before { content: ""; position: absolute; left: 4%; right: 8%; top: 38px; height: 2px; background: repeating-linear-gradient(90deg, var(--line-2) 0 10px, transparent 10px 18px); }
.stop { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .55rem; cursor: pointer; background: none; border: 0; color: inherit; font: inherit; padding: 0 .2rem; }
.stop .node {
  width: var(--s, 44px); height: var(--s, 44px); margin-top: calc((76px - var(--s, 44px)) / 2); border-radius: 50%; display: grid; place-items: center;
  background: var(--panel-2); border: 2px solid var(--line-2); font-family: var(--serif); font-size: 1.25rem; color: var(--text);
  box-shadow: 0 0 0 5px var(--panel); transition: transform .15s, border-color .15s;
}
.stop:hover .node { transform: scale(1.07); border-color: var(--orange); }
.stop .lbl { font-size: .76rem; font-weight: 700; color: var(--text-2); line-height: 1.25; max-width: 11ch; }
.stop .pct { font-size: .72rem; color: var(--muted); }
.stop.won .node { background: var(--orange); border-color: var(--orange); color: #1a0d03; }
.stop.lost .node { background: transparent; border-style: dashed; color: var(--muted); }
.stop.fork { border-left: 1px dashed var(--line-2); margin-left: .4rem; padding-left: .6rem; }
.stop.fork .split { display: flex; gap: .7rem; }
@media (max-width: 760px) {
  .route { grid-template-columns: 1fr; gap: .1rem; }
  .route::before { left: 21px; right: auto; top: 10px; bottom: 10px; width: 2px; height: auto; background: repeating-linear-gradient(180deg, var(--line-2) 0 8px, transparent 8px 14px); }
  .stop { flex-direction: row; text-align: left; gap: .9rem; padding: .25rem 0; }
  .stop .node { --s: 44px !important; margin-top: 0; font-size: 1.05rem; flex: none; }
  .stop .lbl { max-width: none; font-size: .9rem; }
  .stop .pct { margin-left: auto; }
  .stop.fork { border-left: 0; margin-left: 0; padding-left: 0; }
}

/* Ciclo de cultivo: etapas de negociación como crecimiento */
.growth { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; align-items: end; min-height: 230px; }
.plant { display: flex; flex-direction: column; align-items: center; gap: .5rem; height: 100%; justify-content: flex-end; text-align: center; }
.plant .stem { width: 100%; max-width: 92px; border-radius: 14px 14px 4px 4px; background: linear-gradient(180deg, rgba(79,168,96,.55), rgba(79,168,96,.12)); border: 1px solid rgba(127,196,138,.35); border-bottom: 0; position: relative; min-height: 6px; }
.plant:nth-child(3) .stem, .plant:nth-child(4) .stem { background: linear-gradient(180deg, rgba(242,111,17,.75), rgba(242,111,17,.15)); border-color: rgba(242,111,17,.5); }
.plant .n { font-family: var(--serif); font-size: 1.9rem; line-height: 1; }
.plant svg { width: 30px; height: 30px; color: var(--good); }
.plant:nth-child(n+3) svg { color: var(--orange-2); }
.plant .name { font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.plant .desc { font-size: .72rem; color: var(--muted); line-height: 1.3; min-height: 2.6em; }
.soil { height: 6px; border-radius: 3px; background: repeating-linear-gradient(90deg, #4a3a2a 0 6px, #3a2e22 6px 12px); margin-top: .1rem; }

/* Cinta de segmentos */
.ribbon { display: flex; height: 18px; gap: 2px; border-radius: 6px; overflow: hidden; margin-bottom: 1.1rem; }
.ribbon span { display: block; height: 100%; min-width: 3px; }
.ribbon span:first-child { border-radius: 4px 0 0 4px; } .ribbon span:last-child { border-radius: 0 4px 4px 0; }
.seg-list { display: flex; flex-direction: column; }
.seg-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: .2rem 1rem; align-items: center; padding: .6rem 0; border-top: 1px solid var(--line); cursor: pointer; }
.seg-row:hover .nm { color: var(--orange-2); }
.seg-row .nm { font-weight: 600; font-size: .92rem; }
.seg-row .c { font-family: var(--serif); font-size: 1.3rem; text-align: right; min-width: 2.5ch; }
.seg-row .val { font-size: .82rem; color: var(--muted); text-align: right; min-width: 7ch; }

/* Agenda breve y equipo */
.agenda-mini { display: flex; flex-direction: column; gap: .2rem; }
.ag-row { display: grid; grid-template-columns: 54px 1fr; gap: .8rem; align-items: center; padding: .55rem 0; border-top: 1px solid var(--line); color: var(--text); }
.ag-row:hover { text-decoration: none; }
.ag-row:hover .t { color: var(--orange-2); }
.ag-date { text-align: center; border-radius: 12px; padding: .3rem 0; background: var(--panel-2); border: 1px solid var(--line); line-height: 1.1; }
.ag-date b { display: block; font-family: var(--serif); font-size: 1.3rem; font-weight: 400; }
.ag-date span { font-size: .62rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ag-date.late { border-color: rgba(239,125,110,.5); background: var(--bad-soft); }
.ag-date.late span { color: var(--bad); }
.ag-date.today { border-color: var(--orange); background: var(--orange-soft); }
.ag-date.today span { color: var(--orange-2); }
.ag-row .t { font-weight: 700; font-size: .92rem; }
.ag-row .m { font-size: .8rem; color: var(--muted); }

.team-row { display: grid; grid-template-columns: 38px 1fr auto; gap: .8rem; align-items: center; padding: .65rem 0; border-top: 1px solid var(--line); }
.team-row .bar { height: 6px; border-radius: 3px; background: var(--raise); margin-top: .35rem; overflow: hidden; }
.team-row .bar i { display: block; height: 100%; background: var(--orange); border-radius: 0 4px 4px 0; }
.team-row .amt { text-align: right; font-family: var(--serif); font-size: 1.2rem; }
.team-row .amt small { display: block; font-family: var(--sans); font-size: .72rem; color: var(--muted); }

.agenda-group h3 { margin: 1.4rem 0 .7rem; font-family: var(--serif); font-weight: 400; font-size: 1.35rem; }
.agenda-group:first-of-type h3 { margin-top: 0; }
.spinner { padding: 3rem; text-align: center; color: var(--muted); }
.map-table td, .map-table th { padding: .45rem .6rem; }

[data-tip] { position: relative; }
.tip { position: fixed; z-index: 300; pointer-events: none; background: var(--text); color: var(--bg); font-size: .8rem; font-weight: 600; padding: .45rem .7rem; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.4); max-width: 260px; }
.card-head { flex-wrap: wrap; }
@media (max-width: 900px) { .hero-controls .row.exports { justify-content: flex-end; } .hero-controls .row.exports > * { flex: 0 0 auto; } }
@media (max-width: 760px) { .stop.fork .split { flex-direction: column; gap: .1rem; width: 100%; } .stop.fork { width: 100%; } }

/* ===================== Etapas 2 y 3 ===================== */
/* Menú agrupado */
.nav-group { position: relative; }
.topnav { overflow: visible; }
.nav-btn { color: var(--text-2); padding: .5rem .85rem; border-radius: 999px; font: inherit; font-weight: 600; font-size: .9rem; white-space: nowrap;
  display: inline-flex; align-items: center; gap: .45rem; background: none; border: 0; cursor: pointer; transition: background .15s, color .15s; }
.nav-btn:hover { background: var(--panel-2); color: var(--text); text-decoration: none; }
.nav-btn.active, .topnav a.nav-btn.active { background: var(--orange); color: #1a0d03; }
.nav-btn svg { width: 17px; height: 17px; }
.nav-btn .caret { font-size: .65rem; opacity: .7; }
.nav-drop { display: none; position: absolute; top: calc(100% + .45rem); left: 0; min-width: 250px; padding: .45rem; background: var(--panel-2);
  border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 18px 44px rgba(0,0,0,.5); z-index: 60; }
.nav-group.open .nav-drop { display: block; }
.nav-drop a { display: flex; align-items: center; gap: .6rem; padding: .6rem .7rem; border-radius: 10px; color: var(--text); font-weight: 600; font-size: .9rem; }
.nav-drop a:hover { background: var(--raise); text-decoration: none; }
.nav-drop a.active { color: var(--orange-2); background: var(--orange-soft); }
.nav-drop svg { width: 18px; height: 18px; color: var(--muted); }
.nav-drop a.active svg { color: var(--orange-2); }
@media (max-width: 1180px) { .nav-btn { padding: .5rem .6rem; } .nav-btn > svg { display: none; } }

/* Registro rápido */
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.quick-btn { display: flex; gap: .8rem; align-items: center; text-align: left; padding: 1rem; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text); font: inherit; cursor: pointer; }
.quick-btn:hover { border-color: var(--orange); background: var(--orange-soft); }
.quick-btn svg { width: 28px; height: 28px; color: var(--orange-2); flex: none; }
.quick-btn b { display: block; }
.quick-btn small { color: var(--muted); font-size: .78rem; }
@media (max-width: 480px) { .quick-grid { grid-template-columns: 1fr; } }

.more-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.more-tile { display: flex; flex-direction: column; gap: .5rem; padding: 1rem; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); color: var(--text); font-weight: 700; font-size: .9rem; }
.more-tile:hover { text-decoration: none; border-color: var(--orange); }
.more-tile svg { width: 24px; height: 24px; color: var(--orange-2); }

/* Selección masiva y aprobaciones */
.bulk-bar { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; padding: .6rem .8rem; margin-bottom: .8rem; border-radius: 14px;
  background: #3a2614; border: 1px solid rgba(242,111,17,.5); position: sticky; top: 76px; z-index: 30; }
.bulk-bar select, .bulk-bar input { width: auto; min-height: 34px; padding-top: .3rem; padding-bottom: .3rem; font-size: .85rem; }
.check { width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: var(--orange); cursor: pointer; }
.switch { display: inline-flex; align-items: center; gap: .5rem; font-weight: 500; font-size: .88rem; color: var(--text-2); cursor: pointer; margin: 0; }
.switch input { width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: var(--orange); }
.switch.full { grid-column: 1 / -1; margin-top: .2rem; }

/* Catálogo de productos */
.prod-row { display: grid; grid-template-columns: 2fr 1fr .9fr 1fr auto; gap: .5rem; align-items: center; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.prod-row input { min-height: 38px; }
.prod-head { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 700; border-bottom: 1px solid var(--line-2); }
.prod-new { margin-bottom: .8rem; border-bottom: 0; }
@media (max-width: 760px) { .prod-row { grid-template-columns: 1fr 1fr; } .prod-row > :first-child { grid-column: 1 / -1; } }

/* Editor de partidas de cotización */
.qi-head, .qi-row { display: grid; grid-template-columns: 2.4fr .8fr .8fr 1fr .7fr 1fr 36px; gap: .45rem; align-items: center; }
.qi-head { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; padding-bottom: .4rem; }
.qi-row { padding: .5rem 0; border-top: 1px solid var(--line); }
.qi-row input { min-height: 38px; }
.qi-row .qi-desc { grid-column: 1 / 6; font-size: .85rem; min-height: 34px; }
.qi-line { font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .qi-row { grid-template-columns: 1fr 1fr 1fr; }
  .qi-row .qi-name, .qi-row .qi-desc { grid-column: 1 / -1; }
  .qi-row .qi-line { grid-column: 1 / 3; text-align: left; }
}
.qi-totals dl, .paper-totals dl { display: grid; grid-template-columns: 1fr auto; gap: .35rem 1.2rem; margin: 0; font-variant-numeric: tabular-nums; }
.qi-totals dt { color: var(--muted); }
.qi-totals dd { margin: 0; text-align: right; }
.qi-totals .grand { font-family: var(--serif); font-size: 1.6rem; color: var(--orange); }
.qi-totals { align-self: center; padding: 1rem 1.2rem; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }

/* Hoja de cotización (vista tipo papel) */
.paper { --pad: clamp(1.2rem, 4vw, 3rem); background: #fbf8f3; color: #1f2622; border-radius: 6px; padding: var(--pad); max-width: 900px; margin: 0 auto; box-shadow: 0 30px 70px rgba(0,0,0,.45); overflow: hidden; }
.paper .eyebrow { color: #c4580a; }
.paper-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: #121815; margin: calc(-1 * var(--pad)) calc(-1 * var(--pad)) 1.8rem;
  padding: 1.2rem var(--pad); border-bottom: 4px solid var(--orange); }
.paper-logo { height: 70px; }
.paper-co { text-align: right; color: #d9d4ca; font-size: .82rem; line-height: 1.5; }
.paper-co b { color: #fff; }
.paper-title { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.paper-num { font-family: var(--serif); font-size: 2.2rem; line-height: 1.1; }
.paper-title dl { display: grid; grid-template-columns: auto auto; gap: .2rem 1rem; margin: 0; font-size: .88rem; }
.paper-title dt { color: #6b716a; }
.paper-title dd { margin: 0; font-weight: 600; }
.paper-client { padding: 1rem 0; border-top: 1px solid #e3ddd2; border-bottom: 1px solid #e3ddd2; margin-bottom: 1.2rem; font-size: .92rem; line-height: 1.55; }
.paper-table { width: 100%; font-size: .9rem; }
.paper-table th { color: #5d635c; border-bottom: 2px solid #1f2622; background: none; }
.paper-table td { border-bottom: 1px solid #e3ddd2; }
.paper-totals { display: flex; justify-content: flex-end; margin: 1.2rem 0; }
.paper-totals dl { min-width: 280px; }
.paper-totals dt { color: #5d635c; }
.paper-totals dd { margin: 0; text-align: right; }
.paper-totals .grand { background: #c4580a; color: #fff; padding: .55rem .8rem; font-weight: 800; font-size: 1.1rem; margin-top: .3rem; }
.paper-totals dt.grand { border-radius: 6px 0 0 6px; } .paper-totals dd.grand { border-radius: 0 6px 6px 0; }
.paper-notes { font-size: .85rem; color: #4b524c; margin-top: 1rem; white-space: pre-wrap; }
@media (max-width: 600px) { .paper-head { flex-direction: column; align-items: flex-start; } .paper-co { text-align: left; } .paper-table { font-size: .8rem; } .paper-table th, .paper-table td { padding: .5rem .35rem; } }

/* Gastos: barras por categoría y comprobante */
.cat-bars { display: flex; flex-direction: column; gap: .5rem; }
.cat-row { display: grid; grid-template-columns: minmax(110px, 40%) 1fr auto; gap: .6rem; align-items: center; font-size: .85rem; }
.cat-row b { font-variant-numeric: tabular-nums; }
.bar-track { background: var(--raise); border-radius: 4px; height: 10px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--orange); border-radius: 0 4px 4px 0; min-width: 2px; }
.drop { display: flex; align-items: center; justify-content: center; min-height: 64px; border: 1.5px dashed var(--line-2); border-radius: 14px; color: var(--muted); cursor: pointer; padding: .8rem; text-align: center; font-weight: 600; }
.drop:hover { border-color: var(--orange); color: var(--orange-2); }
.receipt-prev { margin-top: .6rem; max-height: 220px; border-radius: 10px; border: 1px solid var(--line-2); }

/* Desempeño */
.goal-bar { position: relative; height: 8px; border-radius: 4px; background: var(--raise); }
.goal-bar i { display: block; height: 100%; background: var(--orange); border-radius: 4px; }
.goal-bar.done i { background: var(--seg-5); }
.goal-bar.behind i { background: #c9562a; }
.goal-bar b { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text); border-radius: 1px; opacity: .7; }
.goal-bar.nogoal { opacity: .35; }
.trend-card { padding: 1rem 1.2rem; }
.trend { display: grid; grid-template-columns: repeat(6, 1fr); gap: .6rem; height: 150px; align-items: end; }
.tcol { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: .35rem; cursor: default; }
.tbar { width: 100%; max-width: 44px; background: var(--orange); border-radius: 4px 4px 0 0; min-height: 2px; }
.tcol span { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.rep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.rep-card header { display: grid; grid-template-columns: 40px 1fr auto; gap: .8rem; align-items: center; margin-bottom: 1rem; }
.rep-card .amt { font-size: 1.7rem; color: var(--orange); }
.goals { display: flex; flex-direction: column; gap: .7rem; margin-bottom: 1rem; }
.goal-row { display: grid; grid-template-columns: 1fr auto; gap: .3rem .6rem; font-size: .86rem; }
.goal-row span { color: var(--text-2); }
.goal-row b { font-variant-numeric: tabular-nums; }
.goal-row b small { color: var(--muted); font-weight: 500; }
.goal-row .goal-bar { grid-column: 1 / -1; }
.mini-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: .1rem; border-top: 1px solid var(--line); padding-top: .8rem; margin-bottom: .8rem; }
.mini-kpi { display: flex; flex-direction: column; padding: .3rem .2rem; }
.mini-kpi span { font-size: .64rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 800; }
.mini-kpi b { font-family: var(--serif); font-weight: 400; font-size: 1.15rem; }
.mini-kpi small { font-size: .7rem; color: var(--muted); }
@media (max-width: 420px) { .rep-grid { grid-template-columns: 1fr; } .mini-kpis { grid-template-columns: repeat(2, 1fr); } }
.goal-table input { min-width: 90px; min-height: 36px; }
.goal-table td, .goal-table th { white-space: nowrap; }

/* Territorios */
.terr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.terr-card header { display: flex; justify-content: space-between; gap: .5rem; margin-bottom: 1rem; }
.terr-card.off { opacity: .55; }
.terr-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .3rem; margin-bottom: 1rem; padding: .8rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.terr-stats div { display: flex; flex-direction: column; }
.terr-stats b { font-family: var(--serif); font-weight: 400; font-size: 1.2rem; }
.terr-stats span { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }

/* Reporte de trabajo */
.report-head { margin-bottom: 1.2rem; }
.report-sum { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .1rem 1.2rem; margin-bottom: 1.4rem; border-top: 1px solid var(--line-2); }
.report-sum div { display: flex; justify-content: space-between; gap: .8rem; padding: .6rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.report-sum span { color: var(--muted); }
.report-h { font-family: var(--serif); font-weight: 400; font-size: 1.25rem; margin: 1.4rem 0 .6rem; }
.filters > .seg-ctrl { flex: 0 0 auto; max-width: 100%; }
@media (max-width: 900px) { .filters > .seg-ctrl { overflow-x: auto; flex-wrap: nowrap; } }
.seg-ctrl { max-width: 100%; min-width: 0; }
@media (min-width: 1101px) { .ticker.t4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 561px) and (max-width: 1100px) { .ticker.t4 { grid-template-columns: repeat(2, 1fr); } .ticker.t4 .tick:nth-child(3) { border-left: 0; padding-left: 0; } .ticker.t4 .tick:nth-child(4) { border-left: 1px solid var(--line); padding-left: 1.1rem; } .ticker.t4 .tick:nth-child(n+3) { border-top: 1px solid var(--line); } }
.paper { overflow-x: auto; }
.hero > *, .hero-controls > *, .bento > * { min-width: 0; }

/* ===================== Login (escaparate + formulario) ===================== */
.login { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(380px, 1fr); }
.login-show {
  position: relative; margin: 18px; border-radius: 28px; overflow: hidden; display: flex; flex-direction: column;
  background: radial-gradient(120% 70% at 50% 0%, #ffffff 55%, #f6efe4 100%); color: #1f2622;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
}
.show-copy { position: relative; z-index: 2; padding: clamp(1.6rem, 3vw, 2.6rem) clamp(1.6rem, 3vw, 2.8rem) 0; max-width: 34rem; }
.show-copy .eyebrow { color: #c4580a; }
.show-copy h2 { font-family: var(--serif); font-weight: 400; text-transform: none; letter-spacing: 0; color: #1a211d; font-size: clamp(1.7rem, 2.6vw, 2.5rem); line-height: 1.1; margin: .6rem 0 0; }
.show-copy h2 em { font-style: normal; color: #d2600c; }
.show-img { position: relative; z-index: 1; flex: 1; min-height: 0; width: 100%; object-fit: contain; object-position: center bottom; margin-top: .5rem;
  animation: rise .9s cubic-bezier(.2,.8,.2,1) both; }
.show-segs { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center;
  padding: 1.6rem 1rem 1rem; background: linear-gradient(transparent, rgba(18,24,21,.85)); }
.show-segs .badge { background: rgba(18,24,21,.75); color: #eee9df; backdrop-filter: blur(6px); }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
/* Sin foto: panel oscuro con el contorno de Texas */
.login-show.no-photo { background: radial-gradient(90% 70% at 70% 80%, rgba(242,111,17,.22), transparent 60%), var(--panel); color: var(--text); }
.login-show.no-photo .show-img { display: none; }
.login-show.no-photo .show-copy { margin-top: auto; margin-bottom: 5rem; }
.login-show.no-photo .show-copy h2 { color: var(--text); font-size: clamp(2.2rem, 4vw, 3.6rem); }
.login-show.no-photo::after { content: ""; position: absolute; right: -6%; top: 6%; width: 55%; height: 70%; background: url(logo-mark.png) no-repeat center / contain; opacity: .14; }

.login-side { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem clamp(1.2rem, 4vw, 3.5rem) 1.2rem; position: relative; }
.login-card { width: 100%; max-width: 400px; margin: auto 0; }
.login-logo { width: 210px; display: block; margin-bottom: 2.2rem; }
.login-card h1 { margin: .45rem 0 .4rem; font-size: 2.4rem; }
.login-sub { color: var(--muted); margin: 0 0 1.8rem; }
.login-card label { margin-top: 1rem; }
.in-ico { position: relative; display: flex; align-items: center; }
.in-ico > svg { position: absolute; left: .95rem; width: 19px; height: 19px; color: var(--muted); pointer-events: none; transition: color .15s; }
.in-ico input { padding-left: 2.8rem; min-height: 52px; border-radius: 14px; font-size: 1rem; background: var(--panel); }
.in-ico:focus-within > svg { color: var(--orange-2); }
.in-ico .eye { position: absolute; right: .45rem; width: 40px; height: 40px; border: 0; border-radius: 10px; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.in-ico .eye:hover, .in-ico .eye.on { color: var(--orange-2); background: var(--raise); }
.in-ico .eye svg { width: 20px; height: 20px; }
#l-pass { padding-right: 3.2rem; }
.caps { margin-top: .45rem; font-size: .8rem; font-weight: 700; color: var(--warn); }
.login-btn { width: 100%; min-height: 54px; margin-top: 1.6rem; font-size: 1rem; border-radius: 14px; position: relative;
  box-shadow: 0 12px 30px rgba(242,111,17,.32); }
.login-btn .spin { display: none; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(26,13,3,.3); border-top-color: #1a0d03; animation: spin .7s linear infinite; }
.login-card.busy .login-btn { pointer-events: none; opacity: .85; }
.login-card.busy .login-btn span { display: none; }
.login-card.busy .login-btn .spin { display: inline-block; }
.login-help { font-size: .82rem; color: var(--muted); margin-top: 1.2rem; text-align: center; }
.login-foot { font-size: .75rem; color: #6c756e; margin-top: 2rem; }
.shake { animation: shake .4s; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-show { margin: 12px 12px 0; border-radius: 22px; height: 42vh; min-height: 260px; }
  .show-copy { padding: 1.2rem 1.3rem 0; }
  .show-copy h2 { font-size: 1.35rem; }
  .show-segs { display: none; }
  .login-show.no-photo { display: none; }
  .login-side { padding-top: 1.4rem; }
  .login-logo { width: 160px; margin-bottom: 1.4rem; }
  .login-card h1 { font-size: 1.9rem; }
}
@media (prefers-reduced-motion: reduce) { .show-img, .shake, .login-btn .spin { animation: none; } }

/* ===================== SweetAlert2 con el tema de la app ===================== */
.swal2-container.swal2-backdrop-show { background: rgba(5, 8, 6, .72) !important; backdrop-filter: blur(4px); }
.swal2-container { z-index: 2000 !important; }
.ms-swal { background: var(--panel) !important; color: var(--text) !important; border: 1px solid var(--line-2); border-radius: 22px !important;
  padding: 1.6rem 1.4rem 1.4rem !important; box-shadow: 0 30px 80px rgba(0,0,0,.6) !important; font-family: var(--sans); width: min(30rem, calc(100vw - 2rem)) !important; }
.ms-swal-title { font-family: var(--serif) !important; font-weight: 400 !important; font-size: 1.65rem !important; color: var(--text) !important; padding-top: .4rem !important; }
.ms-swal-text { color: var(--text-2) !important; font-size: .95rem !important; line-height: 1.5 !important; }
.ms-swal-text b { color: var(--text); }
.ms-swal-actions { gap: .6rem; margin-top: 1.5rem !important; }
.ms-swal-actions .btn { min-height: 44px; padding: .6rem 1.3rem; }
.btn.danger-fill { background: var(--bad); border-color: var(--bad); color: #1d0705; }
.btn.danger-fill:hover { background: #ff9184; border-color: #ff9184; }
.ms-swal-input { background: var(--bg-2) !important; border: 1px solid var(--line-2) !important; color: var(--text) !important; border-radius: 12px !important;
  box-shadow: none !important; font: inherit !important; margin: 1rem 1.2rem .2rem !important; }
.ms-swal-input:focus { border-color: var(--orange) !important; outline: 2px solid rgba(242,111,17,.4) !important; }
textarea.ms-swal-input { min-height: 96px; }
.ms-swal-validation { background: var(--bad-soft) !important; color: var(--bad) !important; border-radius: 10px; margin: .6rem 1.2rem 0 !important; }
.ms-swal-validation::before { background-color: var(--bad) !important; }
.ms-swal .swal2-icon { margin: .6rem auto .2rem !important; transform: scale(.82); }
.swal2-icon.swal2-warning { border-color: var(--orange) !important; color: var(--orange) !important; }
.swal2-icon.swal2-question, .swal2-icon.swal2-info { border-color: var(--info) !important; color: var(--info) !important; }
.swal2-icon.swal2-error { border-color: var(--bad) !important; }
.swal2-icon.swal2-error [class^=swal2-x-mark-line] { background-color: var(--bad) !important; }
.swal2-icon.swal2-success { border-color: rgba(127,196,138,.4) !important; }
.swal2-icon.swal2-success [class^=swal2-success-line] { background-color: var(--good) !important; }
.swal2-icon.swal2-success .swal2-success-ring { border-color: rgba(127,196,138,.35) !important; }
.ms-swal .swal2-icon.swal2-success [class^=swal2-success-circular-line], .ms-swal .swal2-icon.swal2-success .swal2-success-fix { background-color: var(--panel) !important; }
.swal2-close { color: var(--muted) !important; }
.swal2-close:hover { color: var(--text) !important; }
.swal-sub { color: var(--muted); margin: .2rem 0 .9rem; }
.cred { display: grid; grid-template-columns: auto 1fr; gap: .5rem 1rem; align-items: center; text-align: left; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 14px; padding: 1rem 1.1rem; }
.cred span { color: var(--muted); font-size: .82rem; }
.cred code { font-size: 1.15rem; justify-self: start; }
/* Avisos breves (toast) */
.ms-toast { background: var(--panel-2) !important; color: var(--text) !important; border: 1px solid var(--line-2) !important; border-radius: 14px !important;
  box-shadow: 0 16px 40px rgba(0,0,0,.5) !important; padding: .7rem .9rem !important; font-family: var(--sans); }
.ms-toast-title { color: var(--text) !important; font-size: .92rem !important; font-weight: 600 !important; margin: 0 .4rem !important; }
.ms-toast-bar { background: var(--orange) !important; }
.ms-toast .swal2-icon.swal2-success [class^=swal2-success-circular-line], .ms-toast .swal2-icon.swal2-success .swal2-success-fix { background-color: var(--panel-2) !important; }
.swal2-container.swal2-top, .swal2-container.swal2-top-end { padding-top: 76px !important; }
body.swal2-toast-shown .swal2-container { background: transparent !important; backdrop-filter: none !important; }
.ms-swal-title { letter-spacing: 0 !important; text-transform: none !important; margin: 0 !important; line-height: 1.2 !important; }
@media (max-width: 900px) { .login-show .show-copy { display: none; } .login-show { height: 36vh; } .show-img { margin-top: 0; padding-top: .6rem; } }

/* Escaparate con la mascota (imagen con fondo transparente sobre el tema oscuro) */
.login-show {
  background:
    radial-gradient(55% 45% at 50% 42%, rgba(242,111,17,.28), transparent 70%),
    radial-gradient(120% 80% at 50% 100%, #24302a, transparent 70%),
    linear-gradient(180deg, #1b231f, #141a17);
  color: var(--text); border: 1px solid var(--line);
}
.login-show::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: url(logo-mark.png) no-repeat 105% -8% / 42% auto; filter: saturate(0) brightness(3); mix-blend-mode: soft-light; }
.show-copy .eyebrow { color: var(--orange); }
.show-copy h2 { color: var(--text); }
.show-copy h2 em { color: var(--orange); }
.show-pic { position: relative; z-index: 1; flex: 1; min-height: 0; display: flex; }
.show-pic .show-img { flex: 1; margin-top: .5rem; filter: drop-shadow(0 30px 50px rgba(0,0,0,.45)); }
.show-segs { background: linear-gradient(transparent, rgba(10,14,12,.75)); }
/* Difumina los costados de la imagen para que la mesa no termine en corte recto cuando sobra espacio a los lados. */
.show-pic .show-img { -webkit-mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent); mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent); }
.show-pic { justify-content: center; align-items: flex-end; }
.show-pic .show-img { flex: 0 1 auto; width: auto; height: 100%; max-width: 100%; }
