:root {
  color-scheme: dark;
  font-family: "DM Sans", sans-serif;
  color: #f1f4ef;
  background: #101713;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #101713;
  --surface: #19221c;
  --surface-raised: #202b24;
  --green: #315e40;
  --green-bright: #88bd85;
  --lime: #d8e5b4;
  --gold: #e3b748;
  --paper: #f1f4ef;
  --muted: #b1bdb3;
  --line: #354238;
  --red: #f09888;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--ink); font-size: 16px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.loading { min-height: 100vh; display: grid; place-content: center; justify-items: center; color: var(--muted); gap: 14px; font-size: 17px; }
.spinner { width: 30px; height: 30px; border: 3px solid #344238; border-top-color: var(--green-bright); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.brand-logo { display: block; width: auto; height: 48px; max-width: min(100%, 230px); object-fit: contain; object-position: left center; }
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr; background: var(--ink); }
.brand-panel { min-height: 230px; padding: 25px 22px; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; color: var(--paper); background: radial-gradient(ellipse at 12% 100%, #31533a 0, transparent 58%), linear-gradient(145deg, #141d17, #223b2a); }
.brand-panel h1 { max-width: 620px; margin: 0 0 14px; font: 800 clamp(32px, 8vw, 48px)/1.05 Manrope, sans-serif; letter-spacing: -1.4px; }
.brand-panel p { max-width: 490px; margin: 0; color: #d6e0d7; font-size: 17px; line-height: 1.6; }
.brand-note { display: none; font-size: 13px; color: #c2cec3; letter-spacing: .7px; }
.login-side { display: grid; place-items: start center; padding: 20px 16px 36px; background: var(--ink); }
.login-card { width: min(100%, 480px); padding: 27px 23px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 22px 60px #0005; }
.eyebrow { text-transform: uppercase; letter-spacing: 1.5px; font-size: 12px; font-weight: 800; color: var(--green-bright); }
h2 { font: 750 30px/1.2 Manrope, sans-serif; letter-spacing: -.6px; margin: 10px 0; }
.subtle { color: var(--muted); font-size: 16px; line-height: 1.55; }
.field { display: grid; gap: 9px; margin: 20px 0 0; }
.field label { font-size: 15px; font-weight: 700; color: #e1e8e1; }
.field input, .field select { width: 100%; min-height: 50px; padding: 13px 14px; border: 1px solid #465348; border-radius: 11px; color: var(--paper); background: #131b16; outline: none; }
.field input::placeholder { color: #869289; }
.field input:focus, .field select:focus { border-color: var(--green-bright); box-shadow: 0 0 0 3px #88bd8530; }
.primary, .secondary, .icon-btn { border: 0; border-radius: 11px; min-height: 48px; padding: 0 18px; font-size: 15px; font-weight: 750; }
.primary { color: #fff; background: #356b48; }
.primary:hover { background: #438258; }
.primary:disabled { cursor: wait; opacity: .65; }
.secondary { color: #edf4eb; background: #26342a; border: 1px solid #465348; }
.secondary:hover { background: #324436; }
.login-card .primary { width: 100%; margin-top: 24px; }
.text-btn { min-height: 44px; border: 0; background: none; color: #a8d3a4; padding: 12px 0 0; font-size: 15px; font-weight: 750; }
.error { min-height: 19px; color: var(--red); font-size: 14px; margin: 11px 0 0; }
.private-note { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 16px; color: #aab5ac; font-size: 13px; line-height: 1.55; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 1fr; background: var(--ink); }
.sidebar { position: sticky; top: 0; z-index: 3; background: #151e18; color: #fff; padding: 10px 12px; display: grid; gap: 10px; border-bottom: 1px solid var(--line); }
.sidebar .brand-logo { height: 38px; max-width: 175px; }
.nav-label { display: none; }
.nav { display: grid; grid-template-columns: repeat(var(--nav-count, 4), minmax(0, 1fr)); gap: 5px; }
.nav button { min-height: 52px; border: 0; text-align: center; color: #c4d0c6; background: transparent; border-radius: 10px; padding: 6px 3px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; }
.nav button.active, .nav button:hover { background: #ffffff12; color: white; }
.nav .nav-icon { color: var(--gold); font-size: 18px; line-height: 1; }
.side-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid #ffffff1b; padding: 8px 2px 0; }
.userline { min-width: 0; display: flex; align-items: center; gap: 9px; }
.avatar { flex: 0 0 34px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #dce6c2; color: #263e2b; font-weight: 800; font-size: 14px; }
.userline strong { display: block; font-size: 13px; }
.userline small { display: block; max-width: 48vw; overflow: hidden; color: #b2beb4; font-size: 11px; text-overflow: ellipsis; }
.signout { flex: 0 0 auto; min-height: 40px; border: 0; border-radius: 8px; background: none; color: #d4ded5; padding: 7px 9px; font-size: 13px; font-weight: 650; }
.signout:hover { background: #ffffff12; }
.main { min-width: 0; }
.topbar { min-height: 62px; border-bottom: 1px solid var(--line); background: #151e18; padding: 0 17px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.topbar h1 { font: 750 19px Manrope, sans-serif; margin: 0; }
.secure { font-size: 12px; color: #b8d9b7; display: flex; gap: 7px; align-items: center; white-space: nowrap; }
.secure span { width: 8px; height: 8px; border-radius: 50%; background: #81c57c; }
.content { width: 100%; max-width: 1240px; margin: auto; padding: 23px 16px 38px; }
.welcome { display: flex; align-items: flex-start; justify-content: space-between; flex-direction: column; gap: 14px; margin-bottom: 21px; }
.welcome h2 { font-size: 27px; margin: 6px 0; }
.welcome p { margin: 0; }
.welcome .secondary { align-self: flex-end; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; }
.stat { min-width: 0; padding: 15px 13px; }
.stat .label { color: #c3cec5; font-size: 13px; line-height: 1.4; }
.stat .value { margin-top: 11px; font: 750 clamp(21px, 6vw, 26px) Manrope, sans-serif; letter-spacing: -.7px; overflow-wrap: anywhere; }
.stat .hint { margin-top: 6px; color: #aab6ac; font-size: 12px; line-height: 1.45; }
.panel { margin-top: 16px; overflow: hidden; }
.panel-head { min-height: 61px; padding: 15px 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.panel-head h3 { font: 750 17px Manrope, sans-serif; margin: 0; }
.panel-head small { color: var(--muted); font-size: 13px; }
.table-wrap { overflow: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; min-width: 680px; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid #303b33; font-size: 14px; }
th { color: #bdc8bf; text-transform: uppercase; letter-spacing: .55px; font-size: 12px; background: #1d2821; }
td { color: #e2e9e2; }
td strong { font-size: 14px; }
.empty { padding: 36px 18px; text-align: center; }
.empty-icon { width: 46px; height: 46px; border-radius: 14px; background: #283a2d; display: grid; place-items: center; margin: 0 auto 14px; color: #c5dda9; font-size: 22px; }
.empty strong { display: block; font: 750 16px Manrope, sans-serif; }
.empty p { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.pill { display: inline-block; border-radius: 99px; background: #293b2d; color: #c8e1bc; padding: 6px 10px; font-size: 12px; font-weight: 750; white-space: nowrap; }
.notice { margin-top: 17px; padding: 14px 15px; border-radius: 11px; background: #202a22; border: 1px solid #344439; color: #c0ccc1; font-size: 14px; line-height: 1.55; }
.notice.error-notice { background: #3a211e; border-color: #64423c; color: #ffd0c7; }
.section-head { margin: 0 0 17px; }
.section-head h2 { font-size: 26px; }
.section-head p { margin: 0; }
.section-row { display: flex; align-items: flex-start; flex-direction: column; justify-content: space-between; gap: 14px; }
.section-row h2 { margin-bottom: 4px; }
.section-row > .primary { width: 100%; }
.row-actions { display: flex; gap: 7px; }
.small-btn, .icon-btn { border: 1px solid #465348; border-radius: 9px; background: #202b24; color: #e6eee6; padding: 8px 11px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.small-btn:hover, .icon-btn:hover { background: #2c3b30; }
.danger-btn { border-color: #65403a; color: #ffc1b5; }
.danger-btn:hover { background: #3c2521; }
.pill-muted { background: #343936; color: #c1c6c2; }
.editor-panel { margin: 0 0 17px; }
.editor-panel > .panel-head > div { display: grid; gap: 5px; }
.editor-panel .panel-head small { font-size: 13px; }
.icon-btn { width: 40px; height: 40px; padding: 0; font-size: 23px; }
.editor-form { padding: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 0 18px; }
.editor-form .field { margin: 4px 0 13px; }
.editor-form input, .editor-form select { width: 100%; min-height: 49px; padding: 12px 13px; border: 1px solid #465348; border-radius: 10px; color: var(--paper); background: #131b16; outline: none; }
.editor-form input:focus, .editor-form select:focus { border-color: var(--green-bright); box-shadow: 0 0 0 3px #88bd8530; }
.form-actions { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 9px; margin-top: 8px; }
.form-actions .primary, .form-actions .secondary { min-height: 46px; }
.editor-form .error { min-height: 0; }
.editor-form .error:empty { display: none; }
.hide { display: none !important; }
.mobile-brand { display: none; }
@media (min-width: 600px) {
  .brand-panel { min-height: 260px; padding: 30px; }
  .login-side { place-items: center; padding: 28px; }
  .login-card { padding: 34px; }
  .content { padding: 30px 25px 46px; }
  .grid { gap: 13px; }
  .stat { padding: 18px; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-actions { flex-direction: row; }
  .section-row { flex-direction: row; align-items: center; }
  .section-row > .primary { width: auto; }
  .welcome { flex-direction: row; align-items: flex-end; }
  .welcome .secondary { align-self: auto; }
}
@media (min-width: 900px) {
  .login-wrap { grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr); }
  .brand-panel { min-height: 100vh; padding: clamp(38px, 7vw, 92px); }
  .brand-panel h1 { font-size: clamp(42px, 5.1vw, 68px); }
  .brand-panel p { font-size: 19px; }
  .brand-note { display: block; }
  .shell { grid-template-columns: 250px minmax(0, 1fr); }
  .sidebar { position: sticky; top: 0; height: 100vh; align-content: start; grid-template-columns: 1fr; gap: 34px; padding: 28px 17px; border: 0; border-right: 1px solid var(--line); }
  .sidebar .brand-logo { height: 50px; max-width: 210px; }
  .nav-label { display: block; padding: 0 12px 8px; color: #a3b0a5; font-size: 12px; text-transform: uppercase; letter-spacing: 1.1px; font-weight: 750; }
  .nav { display: grid; grid-template-columns: 1fr; gap: 5px; }
  .nav button { min-height: 48px; text-align: left; justify-content: flex-start; flex-direction: row; gap: 12px; padding: 11px 12px; font-size: 15px; }
  .nav .nav-icon { width: 20px; text-align: center; }
  .side-bottom { margin-top: auto; display: block; padding: 18px 5px 0; }
  .userline strong { font-size: 14px; }
  .userline small { max-width: 190px; font-size: 12px; }
  .signout { margin-top: 12px; width: 100%; text-align: left; }
  .topbar { min-height: 76px; padding: 0 34px; }
  .topbar h1 { font-size: 21px; }
  .content { padding: 37px clamp(26px, 4vw, 52px) 55px; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
  .stat { padding: 20px; }
  .stat .label { font-size: 14px; }
  .stat .value { font-size: 28px; }
  .panel { margin-top: 20px; }
  .panel-head { padding: 19px 21px; }
  .panel-head h3 { font-size: 18px; }
}
@media (max-width: 599px) {
  .nav button { font-size: 10px; white-space: normal; overflow-wrap: anywhere; }
  .nav .nav-icon { font-size: 16px; }
  .table-wrap:has(.investor-table) { overflow: visible; }
  .investor-table { min-width: 0; }
  .investor-table thead { display: none; }
  .investor-table, .investor-table tbody { display: block; width: 100%; }
  .investor-table tbody { padding: 10px; }
  .investor-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-bottom: 10px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #1d2821; }
  .investor-table td { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 11px 12px; border: 0; font-size: 14px; overflow-wrap: anywhere; }
  .investor-table td::before { content: attr(data-label); color: #aebcaf; font-size: 11px; line-height: 1.25; letter-spacing: .35px; }
  .investor-table td:nth-child(1), .investor-table td:nth-child(2), .investor-table td:last-child { grid-column: 1 / -1; }
  .investor-table td:nth-child(1) { padding-bottom: 7px; }
  .investor-table td:nth-child(2) { padding-top: 7px; border-bottom: 1px solid var(--line); }
  .investor-table td:last-child { border-top: 1px solid var(--line); }
  .investor-table .row-actions { flex-direction: row; }
  .small-btn { min-height: 40px; padding-inline: 14px; }
}

/* Warm Tío Pollo palette: charcoal, cream, red and gold. */
:root { --ink:#171615; --surface:#211f1d; --surface-raised:#292624; --green:#743a2f; --green-bright:#f0b044; --lime:#f3dfae; --gold:#eab33d; --paper:#f6f0e7; --muted:#c1b8ae; --line:#403934; --red:#ff9e8d; }
body,.shell,.login-wrap,.login-side { background:var(--ink); }
.brand-panel { background:radial-gradient(ellipse at 12% 100%,#71382d 0,transparent 57%),linear-gradient(145deg,#1a1918,#302622); }
.brand-panel p { color:#e6d9cc; }
.sidebar,.topbar { background:#201d1b; }
.primary { background:#a93e32; color:#fff8ed; }
.primary:hover { background:#c44d3e; }
.secondary { background:#302a26; border-color:#51453d; color:#fff0df; }
.secondary:hover { background:#3d332d; }
.text-btn { color:#f0bd54; }
.eyebrow,.nav .nav-icon { color:#efb947; }
.secure { color:#e7c77f; }
.secure span { background:#e7b648; }
.avatar { background:#f1c34f; color:#33271a; }
.nav button { color:#d9cec3; }
.nav button.active,.nav button:hover { background:#a63c3030; color:#fff7ef; }
.field input,.field select,.editor-form input,.editor-form select { background:#191817; border-color:#514740; }
.field input:focus,.field select:focus,.editor-form input:focus,.editor-form select:focus { border-color:#e7b648; box-shadow:0 0 0 3px #e7b64830; }
.panel-head,.topbar,.sidebar { border-color:var(--line); }
th { background:#2b2623; color:#e0c99e; }
td { color:#f0e8df; }
.pill { background:#4b3822; color:#f5d889; }
.empty-icon { background:#473128; color:#f1c65c; }
.notice { background:#2b2521; border-color:#493a31; color:#ded1c3; }
.small-btn,.icon-btn { background:#2a2522; border-color:#51443b; color:#f2e9df; }
.small-btn:hover,.icon-btn:hover { background:#3b302a; }
.danger-btn { border-color:#75443c; color:#ffb9a9; }
.danger-btn:hover { background:#482923; }
.pill-muted { background:#393532; color:#d0c7bf; }
@media (max-width:599px) {
  .investor-table tr,.record-table tr { background:#292523; }
  .investor-table td::before,.record-table td::before { color:#d6b975; }
  .record-table { min-width:0; }
  .table-wrap:has(.record-table) { overflow:visible; }
  .record-table thead { display:none; }
  .record-table,.record-table tbody { display:block; width:100%; }
  .record-table tbody { padding:10px; }
  .record-table tr { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); margin-bottom:10px; border:1px solid var(--line); border-radius:12px; overflow:hidden; }
  .record-table td { min-width:0; display:flex; flex-direction:column; justify-content:center; gap:5px; padding:11px 12px; border:0; font-size:14px; overflow-wrap:anywhere; }
  .record-table td::before { content:attr(data-label); font-size:11px; letter-spacing:.35px; }
  .record-table td:nth-child(1),.record-table td:nth-child(2),.record-table td:last-child { grid-column:1/-1; }
  .record-table td:last-child { border-top:1px solid var(--line); }
  .record-table .row-actions { flex-wrap:wrap; }
}
.filter-panel .editor-form { padding-top: 8px; }
.filter-grid { display:grid; grid-template-columns:minmax(0,1fr); gap:0 16px; }
.filter-search { grid-column:1/-1; }
.balance-filter-stat { margin:0 0 16px; }
.balance-value { font-size:clamp(20px,5vw,26px) !important; }
.toggle-field { align-content:center; }
.toggle-field label { display:flex; align-items:center; gap:11px; line-height:1.45; }
.toggle-field input[type="checkbox"] { appearance:auto; width:22px; min-width:22px; height:22px; min-height:22px; margin:0; accent-color:#c94b3d; }
.toggle-field small { color:var(--muted); font-size:13px; line-height:1.5; }
@media (min-width:600px) { .filter-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (min-width:900px) { .filter-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
