/* ============================================================
   FLUXS · Tema "Lumen" — naranja / gris claro / negro carbón
   ============================================================ */
:root {
  --bg: #F5F6F8;
  --bg-soft: #EFF0F3;
  --card: #FFFFFF;
  --ink: #14161C;
  --ink-2: #3D434E;
  --muted: #8B93A0;
  --line: #EDEEF2;
  --primary: #F5511C;
  --primary-2: #E4450F;
  --primary-tint: #FEEAE3;
  --peach: #FFD5C2;
  --dark: #17181D;
  --dark-2: #23252C;
  --green: #17924F;
  --green-tint: #E7F6EE;
  --red: #DF3A33;
  --red-tint: #FDECEA;
  --amber: #C77A08;
  --amber-tint: #FFF3DC;
  --blue: #2E6BE6;
  --blue-tint: #EAF1FE;
  --purple: #7B5CF0;
  --purple-tint: #F1EDFE;
  --cyan: #0FA3B1;
  --cyan-tint: #E3F5F7;
  --teal: #0E9F8A;
  --teal-tint: #E1F5F2;
  --r-card: 20px;
  --r-in: 13px;
  --shadow: 0 12px 34px rgba(15, 20, 36, .05);
  --shadow-hi: 0 18px 44px rgba(15, 20, 36, .09);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #E9EAEE radial-gradient(circle at 1px 1px, #DFE1E6 1px, transparent 0) 0 0 / 26px 26px;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #D4D7DE; border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }
a { color: inherit; text-decoration: none; }
button { font: inherit; border: none; background: none; cursor: pointer; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
svg { flex: none; }

/* ==================== ESTRUCTURA ==================== */
#app {
  width: auto; max-width: 2600px; min-height: calc(100vh - 32px);
  margin: 16px; padding: 20px 22px 26px;
  display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 22px;
  background: var(--bg); border-radius: 28px;
  box-shadow: 0 30px 70px rgba(20, 24, 38, .10), 0 1px 0 #fff inset;
}
.main { min-width: 0; display: flex; flex-direction: column; }
#view { padding: 2px 2px 20px; min-width: 0; }

/* ==================== SIDEBAR ==================== */
.side { display: flex; flex-direction: column; gap: 4px; padding: 4px 0; }
.brand { display: block; padding: 4px 0 18px; }
.brand-chip { display: block; width: 122px; max-width: 100%; height: 69px; }
.brand-chip img { width: 100%; height: 100%; object-fit: contain; object-position: left center; }
.side-sep { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #A2A9B4; padding: 12px 10px 6px; }
.side-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-radius: 13px; font-size: 13.5px; font-weight: 600; color: #4A515E; transition: background .15s;
}
.side-item svg { opacity: .9; }
.side-item:hover { background: #EDEEF1; }
.side-item.on { background: var(--dark); color: #fff; box-shadow: 0 10px 20px rgba(18, 20, 28, .22); }
.side-badge {
  margin-left: auto; min-width: 22px; text-align: center; padding: 3px 7px; border-radius: 99px;
  background: var(--primary-tint); color: var(--primary-2); font-size: 11px; font-weight: 800;
}
.side-item.on .side-badge { background: rgba(255, 255, 255, .16); color: #fff; }
.side-cta {
  margin-top: auto; border-radius: 18px; padding: 18px 16px; color: #fff;
  background: linear-gradient(135deg, #FF7B47 0%, #F54D12 100%); box-shadow: 0 16px 30px rgba(243, 70, 20, .30);
}
.side-cta h4 { font-size: 14.5px; font-weight: 800; margin-bottom: 4px; }
.side-cta p { font-size: 11.5px; opacity: .9; line-height: 1.45; margin-bottom: 12px; }
.side-cta .btn { width: 100%; justify-content: center; }

/* ==================== TOPBAR ==================== */
#topbar { display: flex; align-items: center; gap: 12px; padding: 6px 2px 18px; }
.searchbox {
  flex: 1; max-width: 360px; display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; color: var(--muted);
}
.searchbox input { border: none; outline: none; background: transparent; width: 100%; font-size: 13px; }
.searchbox input::placeholder { color: #A6ADB8; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.iconbtn {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: #fff; border: 1px solid var(--line); color: #565D68; transition: .15s;
}
.iconbtn:hover { color: var(--ink); border-color: #DDE0E6; box-shadow: var(--shadow); }
.userchip { position: relative; }
.userchip > button {
  display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 12px 5px 5px; transition: .15s;
}
.userchip > button:hover { box-shadow: var(--shadow); }
.ava { width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 800; background: var(--dark); }
.ava.naranja { background: linear-gradient(135deg, #FF8452, #EF4210); }
.userchip .info { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.userchip .info b { font-size: 12.5px; font-weight: 700; }
.userchip .info span { font-size: 10.5px; color: var(--muted); font-weight: 600; }
.menu-layer { position: fixed; inset: 0; z-index: 60; }
.menu {
  position: absolute; right: 0; top: 46px; width: 220px; background: #fff; border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 20, 36, .18); padding: 8px; z-index: 61; animation: pop .16s ease;
}
.menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; color: #3A404C; }
.menu button:hover { background: var(--bg-soft); }
.menu .mu { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
.menu .mu.danger:hover { background: var(--red-tint); color: var(--red); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }

/* ==================== BOTONES / CHIPS / PILLS ==================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; padding: 11px 18px; font-size: 13px; font-weight: 700; transition: .16s; white-space: nowrap;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: linear-gradient(135deg, #FF6B33, #F0480D); color: #fff; box-shadow: 0 12px 24px rgba(243, 70, 20, .33); }
.btn.primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn.dark { background: var(--dark); color: #fff; }
.btn.dark:hover { background: #2A2C33; }
.btn.ghost { background: var(--bg-soft); color: #2B303A; }
.btn.ghost:hover { background: #E7E9ED; }
.btn.soft { background: var(--primary-tint); color: var(--primary-2); }
.btn.danger { background: var(--red-tint); color: var(--red); }
.btn.danger:hover { background: #FBD9D5; }
.btn.lite { background: #fff; border: 1px solid #E4E6EB; color: #3B414D; }
.btn.lite:hover { border-color: #C9CDD5; }
.btn.sm { padding: 8px 13px; font-size: 12px; }
.btn.wfull { width: 100%; }
.chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 9px 15px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: #575E6B;
  background: transparent; border: none; transition: .15s;
}
.chip:hover { background: #EBECEF; }
.chip.on { background: var(--dark); color: #fff; box-shadow: 0 8px 16px rgba(18, 20, 28, .18); }
.chips .chip-divider { width: 1px; height: 22px; background: #E2E4E9; margin: 0 6px; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 10px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.pill.gray { background: #F0F1F4; color: #5A6472; }
.pill.orange { background: var(--primary-tint); color: var(--primary-2); }
.pill.green { background: var(--green-tint); color: var(--green); }
.pill.red { background: var(--red-tint); color: var(--red); }
.pill.blue { background: var(--blue-tint); color: var(--blue); }
.pill.amber { background: var(--amber-tint); color: var(--amber); }
.pill.white { background: rgba(255, 255, 255, .16); color: #fff; }
.pill.dark { background: var(--dark); color: #fff; }
.tint-orange { background: var(--primary-tint); color: var(--primary-2); }
.tint-blue { background: var(--blue-tint); color: var(--blue); }
.tint-green { background: var(--green-tint); color: var(--green); }
.tint-red { background: var(--red-tint); color: var(--red); }
.tint-purple { background: var(--purple-tint); color: var(--purple); }
.tint-cyan { background: var(--cyan-tint); color: var(--cyan); }
.tint-amber { background: var(--amber-tint); color: var(--amber); }
.tint-teal { background: var(--teal-tint); color: var(--teal); }
.tint-brown { background: #F6EEE7; color: #A2572B; }
.tint-gray { background: #F0F1F4; color: #636B78; }
.tint-fifty { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; }

/* ==================== PÁGINA ==================== */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 6px 0 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; font-weight: 800; letter-spacing: -.4px; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 5px; font-weight: 500; }
.page-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filters-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.filters-row .spacer { flex: 1; }
select.mini, input.mini {
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; font-size: 12.5px; font-weight: 600; color: #47505C; outline: none;
}
select.mini:focus, input.mini:focus { border-color: var(--primary); }
.grid { display: grid; gap: 18px; }
.stats-row { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; }
.dash { grid-template-columns: minmax(0, 2.05fr) minmax(0, 1fr); align-items: start; }
.col { display: grid; gap: 18px; min-width: 0; }
.mt18 { margin-top: 18px; }

/* ==================== CARDS ==================== */
.card { background: var(--card); border-radius: var(--r-card); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-title { font-size: 15px; font-weight: 800; letter-spacing: -.2px; }
.card-sub { font-size: 11.5px; color: var(--muted); font-weight: 500; margin-top: 3px; }
.card.pad0 { padding: 12px 16px; }

/* Stat cards */
.stat .stat-top { display: flex; align-items: center; gap: 10px; }
.stat .stat-top b { font-size: 13px; font-weight: 700; }
.stat .stat-top span { display: block; font-size: 10.5px; color: var(--muted); font-weight: 600; }
.stat-val { font-size: 27px; font-weight: 800; letter-spacing: -.8px; margin: 14px 0 10px; }
.stat-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat .mini-note { font-size: 11px; color: var(--muted); font-weight: 600; }
.stat.hl { background: linear-gradient(135deg, #FF7138 0%, #F03E06 100%); color: #fff; box-shadow: 0 18px 36px rgba(243, 70, 20, .35); }
.stat.hl .stat-top span, .stat.hl .mini-note { color: rgba(255, 255, 255, .85); }
.stat.hl .stat-top span { color: rgba(255, 255, 255, .72); }

/* Financiero */
.big-money { font-size: 34px; font-weight: 800; letter-spacing: -1px; margin: 8px 0 6px; }
.money-sub { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.money-sub .ms { font-size: 12px; color: var(--muted); font-weight: 600; }
.money-sub .ms b { color: var(--ink); font-weight: 800; }

/* ==================== TABLA ==================== */
table.data { width: 100%; border-collapse: separate; border-spacing: 0 8px; }
table.data thead th { text-align: left; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: #9AA2AE; font-weight: 700; padding: 2px 14px; }
table.data tbody tr { background: #fff; box-shadow: 0 6px 16px rgba(15, 20, 36, .04); cursor: pointer; transition: .12s; }
table.data tbody tr:hover td { background: #FFF8F5; }
table.data td { padding: 11px 14px; font-size: 13px; color: var(--ink-2); vertical-align: middle; }
table.data td:first-child { border-radius: 14px 0 0 14px; }
table.data td:last-child { border-radius: 0 14px 14px 0; }
.cell-ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; }
.cell-main { display: flex; flex-direction: column; line-height: 1.25; }
.cell-main b { font-weight: 700; font-size: 13px; color: var(--ink); }
.cell-main span { font-size: 11px; color: var(--muted); font-weight: 500; }
.amount { font-weight: 800; color: var(--ink); white-space: nowrap; }
.amount.pos { color: var(--green); }
.amount.neg { color: var(--red); }
.amount.mut { color: var(--muted); font-weight: 600; }
.mono { font-weight: 800; color: var(--ink); font-size: 12px; letter-spacing: .2px; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.row-actions .iconbtn { width: 30px; height: 30px; border: none; background: transparent; border-radius: 9px; }
.row-actions .iconbtn:hover { background: var(--bg-soft); }
.row-actions .iconbtn.dng:hover { background: var(--red-tint); color: var(--red); }

/* ==================== CHART / GAUGE ==================== */
.bar-chart svg { display: block; width: 100%; height: auto; }
.legend { display: flex; gap: 16px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; }
.gauge-wrap { display: grid; place-items: center; padding: 6px 0; }
.gauge-wrap svg { width: 200px; }
.gauge-txt { text-anchor: middle; }

/* ==================== TARJETAS OSCURAS ==================== */
.darkcard { background: var(--dark); color: #C9CDD6; border-radius: var(--r-card); padding: 20px; box-shadow: var(--shadow); }
.darkcard .card-title { color: #fff; }
.load-row { display: flex; align-items: center; gap: 12px; margin: 12px 0; }
.load-row .nm { width: 108px; font-size: 12px; font-weight: 700; color: #EDEEF2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.load-row .bar { flex: 1; height: 8px; border-radius: 999px; background: #2B2D35; overflow: hidden; }
.load-row .bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #FF7A45, #F1440A); }
.load-row .n { font-size: 11px; font-weight: 800; color: #9BA2AE; width: 46px; text-align: right; }
.quick-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.qcard {
  border-radius: 16px; padding: 16px; background: var(--dark-2); color: #E7E9EE; text-align: left;
  border: 1px solid #2E313A; transition: .15s; display: flex; flex-direction: column; gap: 10px; min-height: 108px;
}
.qcard:hover { border-color: var(--primary); transform: translateY(-2px); }
.qcard .qc-ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: rgba(245, 81, 28, .18); color: #FF8757; }
.qcard b { font-size: 13.5px; color: #fff; }
.qcard span { font-size: 11px; color: #9AA2AE; font-weight: 600; line-height: 1.4; }

/* ==================== DRAWER ==================== */
.overlay {
  position: fixed; inset: 0; background: rgba(13, 15, 20, .48); z-index: 80;
  opacity: 0; animation: fadein .2s ease forwards;
}
@keyframes fadein { to { opacity: 1; } }
.drawer {
  position: fixed; top: 10px; right: 10px; bottom: 10px; width: min(600px, calc(100vw - 20px));
  background: #F5F6F8; border-radius: 26px; z-index: 81; display: flex; flex-direction: column;
  box-shadow: 0 40px 90px rgba(10, 12, 20, .35); animation: slidin .26s cubic-bezier(.2, .8, .25, 1);
  overflow: hidden;
}
@keyframes slidin { from { transform: translateX(40px); opacity: 0; } }
.dr-head { background: #fff; padding: 18px 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.dr-head h3 { font-size: 17px; font-weight: 800; letter-spacing: -.3px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dr-sub { font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 500; }
.dr-body { overflow-y: auto; padding: 18px; display: grid; gap: 16px; flex: 1; }
.dr-foot { background: #fff; padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 10px; }
.sect-title { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #A0A7B2; margin: 2px 0 8px 2px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kv { background: #fff; border-radius: 14px; padding: 11px 14px; box-shadow: 0 4px 12px rgba(15, 20, 36, .03); }
.kv label { display: block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: #9AA2AE; font-weight: 700; }
.kv > div { font-size: 13px; font-weight: 600; margin-top: 4px; color: var(--ink); word-break: break-word; }
.kv.wide { grid-column: 1 / -1; }
.kv.money > div { font-weight: 800; }
.inline-sel { border: 1px solid var(--line); background: #F5F6F8; border-radius: 8px; padding: 5px 6px; font-size: 12px; font-weight: 700; outline: none; color: var(--ink); }
.inline-sel:focus { border-color: var(--primary); background: #fff; }
.seg { display: inline-flex; gap: 4px; background: #EDEEF2; padding: 4px; border-radius: 999px; }
.seg button { padding: 6px 12px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: #5A6472; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(15, 20, 36, .10); }
.seg button.on.orange { background: #fff; }

/* ==================== FOTOS ==================== */
.fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.foto { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 1; cursor: zoom-in; background: #E8EAEE; }
.foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto .foto-x {
  position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 999px;
  background: rgba(20, 22, 28, .65); color: #fff; display: grid; place-items: center; opacity: 0; transition: .15s; z-index: 2;
}
.foto .foto-x:hover { background: var(--red); }
.foto:hover .foto-x { opacity: 1; }
.uploader {
  display: flex; align-items: center; justify-content: center; gap: 9px; padding: 14px; border-radius: 14px;
  border: 1.6px dashed #D5D8DE; color: var(--muted); font-size: 12.5px; font-weight: 600; background: #FAFAFC; width: 100%; transition: .15s;
}
.uploader:hover { border-color: var(--primary); color: var(--primary-2); background: #FFF8F5; }
.lightbox-img { max-width: 92vw; max-height: 88vh; border-radius: 16px; box-shadow: 0 40px 100px rgba(0, 0, 0, .5); }

/* ==================== SEGUIMIENTO / FEED ==================== */
.feed { display: flex; flex-direction: column; gap: 12px; }
.feed-item { display: flex; gap: 10px; }
.feed-ava { width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center; font-size: 10.5px; font-weight: 800; color: #fff; flex: none; margin-top: 2px; }
.bubble-wrap { min-width: 0; }
.bubble { background: #fff; border-radius: 4px 16px 16px 16px; padding: 10px 14px; font-size: 13px; line-height: 1.45; color: var(--ink-2); box-shadow: 0 4px 12px rgba(15, 20, 36, .04); }
.bubble-sys { color: var(--blue); font-weight: 600; }
.bubble-dim { color: var(--muted); font-weight: 600; }
.feed-time { font-size: 10.5px; color: #A3AAB5; font-weight: 600; margin: 5px 0 0 4px; }
.feed-time b { color: var(--ink-2); font-weight: 700; margin-right: 4px; }
.composer { display: flex; gap: 8px; align-items: center; }
.composer input { flex: 1; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 11px 16px; font-size: 13px; outline: none; }
.composer input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(245, 81, 28, .10); }
.composer .send { width: 42px; height: 42px; border-radius: 999px; background: var(--dark); color: #fff; display: grid; place-items: center; transition: .15s; }
.composer .send:hover { background: var(--primary-2); }

/* ==================== MODAL ==================== */
.modal-card {
  position: fixed; z-index: 81; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(700px, 94vw); max-height: 92vh; background: #F5F6F8; border-radius: 24px;
  display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 50px 120px rgba(10, 12, 20, .4);
  animation: zoomin .22s cubic-bezier(.2, .8, .25, 1);
}
@keyframes zoomin { from { transform: translate(-50%, -47%) scale(.96); opacity: 0; } }
.modal-card.narrow { width: min(460px, 94vw); }
.modal-head { padding: 18px 22px; background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.modal-head h3 { font-size: 16.5px; font-weight: 800; }
.modal-head p { font-size: 11.5px; color: var(--muted); margin-top: 3px; font-weight: 500; }
.modal-body { padding: 18px 22px; overflow-y: auto; display: grid; gap: 14px; }
.modal-foot { padding: 13px 22px; background: #fff; display: flex; justify-content: flex-end; gap: 10px; }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.frow.three { grid-template-columns: 1fr 1fr 1fr; }
.field label { display: block; font-size: 11.5px; font-weight: 700; color: #3A404C; margin-bottom: 6px; }
.field label em { color: var(--primary-2); font-style: normal; }
.field input[type="text"], [class^="field"] input[type="date"], .field input[type="number"], .field input[type="email"], .field input[type="password"], .field input[type="tel"], .field select, .field textarea {
  width: 100%; border: 1.5px solid transparent; background: #EAEBEF; border-radius: 12px; padding: 11.5px 13px;
  font-size: 13.5px; color: var(--ink); outline: none; transition: .15s; font-weight: 500;
}
.field textarea { resize: vertical; min-height: 74px; }
.field input:focus, .field select:focus, .field textarea:focus { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(245, 81, 28, .09); }
.field .hint { font-size: 10.5px; color: var(--muted); margin-top: 5px; font-weight: 500; }
.form-err { background: var(--red-tint); color: var(--red); border-radius: 12px; padding: 11px 14px; font-size: 12.5px; font-weight: 600; display: none; }

/* ==================== DOMICILIOS ==================== */
.dom-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.domicard { background: var(--card); border-radius: var(--r-card); padding: 18px; box-shadow: var(--shadow); cursor: pointer; transition: .16s; border: 1.5px solid transparent; }
.domicard:hover { transform: translateY(-3px); box-shadow: var(--shadow-hi); border-color: #FFD9C7; }
.dom-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.dom-name { font-size: 15px; font-weight: 800; letter-spacing: -.2px; line-height: 1.3; }
.dom-addr { font-size: 12px; color: var(--muted); font-weight: 500; margin-top: 4px; line-height: 1.45; }
.dom-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.dom-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 11.5px; color: var(--muted); font-weight: 600; }

/* ==================== LISTAS / VACÍO ==================== */
.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty .e-ico { width: 52px; height: 52px; border-radius: 16px; background: var(--bg-soft); display: grid; place-items: center; margin: 0 auto 14px; color: #9AA2AE; }
.empty b { display: block; color: var(--ink-2); font-size: 14px; margin-bottom: 4px; }
.empty p { font-size: 12.5px; font-weight: 500; margin-bottom: 14px; }
.titlelink { color: var(--primary-2); font-weight: 700; }
.titlelink:hover { text-decoration: underline; }

/* ==================== TOAST ==================== */
#toast-root { position: fixed; right: 22px; bottom: 22px; z-index: 99; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 10px; background: var(--dark); color: #fff; border-radius: 14px;
  padding: 12px 18px; font-size: 13px; font-weight: 600; box-shadow: 0 20px 44px rgba(10, 12, 20, .35);
  animation: toastin .25s cubic-bezier(.2, .8, .25, 1);
}
.toast.err { background: var(--red); }
.toast .ok-ico { color: #7BE2A8; }
@keyframes toastin { from { transform: translateY(14px); opacity: 0; } }

/* ==================== LOGIN ==================== */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: 410px; max-width: 100%; background: #F6F7F9; border-radius: 26px; padding: 34px; box-shadow: 0 40px 90px rgba(20, 24, 38, .16); }
.login-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; justify-content: center; }
.login-mark { width: min(210px, 100%); display: block; margin: 0 auto 6px; }
.login-card h1 { font-size: 19px; font-weight: 800; letter-spacing: -.3px; text-align: center; margin-bottom: 4px; }
.login-card .lsub { text-align: center; font-size: 12.5px; color: var(--muted); font-weight: 500; margin-bottom: 24px; }
.login-card input[type= password], .login-card input[type=text] {
  width: 100%; border: 1.5px solid transparent; background: #ECEDEF; border-radius: 14px; padding: 13px 15px;
  font-size: 14px; outline: none; margin-bottom: 12px; transition: .15s; font-weight: 500;
}
.login-card input:focus { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(245, 81, 28, .09); }
.login-hint { margin-top: 18px; font-size: 11.5px; color: var(--muted); text-align: center; line-height: 1.6; font-weight: 500; }
.login-hint code { background: #ECEDEF; border-radius: 6px; padding: 2px 7px; font-size: 11px; color: var(--ink-2); font-weight: 700; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1180px) {
  #app { grid-template-columns: 210px minmax(0, 1fr); }
  .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  body { background: var(--bg); }
  #app { grid-template-columns: 1fr; margin: 0; border-radius: 0; padding: 14px 12px 20px; gap: 14px; min-height: 100vh; }
  .side { flex-direction: row; align-items: center; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
  .brand { padding: 0 8px 0 0; }
  .brand-chip { height: 44px; width: 77px; flex: none; }
  .side-sep { display: none; }
  .side-item { padding: 10px 13px; white-space: nowrap; }
  .side-cta { display: none; }
  .frow, .frow.three { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr; }
  .quick-row { grid-template-columns: 1fr; }
  .searchbox { max-width: none; }
}
