:root {
  --ink: #0b1730;
  --navy: #071b3a;
  --navy-2: #0b2e63;
  --blue: #0d6efd;
  --blue-2: #3a8cff;
  --teal: #12b9ac;
  --green: #169a62;
  --amber: #eaa51e;
  --red: #d94e5d;
  --violet: #7259d9;
  --surface: #ffffff;
  --surface-2: #f4f7fb;
  --surface-3: #eaf0f8;
  --line: #dfe7f1;
  --muted: #6c7a91;
  --shadow: 0 16px 40px rgba(11, 36, 79, .10);
  --shadow-strong: 0 24px 60px rgba(7, 27, 58, .18);
  --radius: 22px;
  --radius-sm: 15px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { background: #e8eef7; }
html, body { margin: 0; min-height: 100%; color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { min-height: 100vh; background: radial-gradient(circle at 15% -10%, rgba(13,110,253,.13), transparent 38%), linear-gradient(180deg, #edf2f8, #e7edf6); }
button, input, select, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(13,110,253,.22); outline-offset: 2px; }
.hidden { display: none !important; }

.app-shell {
  position: relative;
  width: min(100%, 560px);
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: calc(88px + var(--safe-bottom));
  overflow-x: clip;
  background: linear-gradient(180deg, #f9fbfe, #f2f6fb 44%, #eef3f9);
  box-shadow: 0 0 60px rgba(7,27,58,.12);
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  min-height: 66px;
  padding: 11px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  background: rgba(7,27,58,.97);
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(18px);
}
.brand-lockup { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(135deg, var(--blue), var(--teal)); box-shadow: 0 8px 20px rgba(13,110,253,.28); }
.brand-mark svg { width: 23px; height: 23px; }
.brand-copy { min-width: 0; }
.brand-name { font-size: 18px; font-weight: 900; letter-spacing: -.03em; }
.brand-subtitle { color: #a9bdd8; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 225px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-button { position: relative; width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.13); border-radius: 14px; color: white; background: rgba(255,255,255,.08); display: grid; place-items: center; cursor: pointer; transition: .18s ease; }
.icon-button:hover { background: rgba(255,255,255,.14); transform: translateY(-1px); }
.icon-button svg { width: 20px; height: 20px; }
.alert-dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 99px; background: #ff6273; box-shadow: 0 0 0 3px var(--navy); }

.screen { padding: 16px 15px 26px; }
.section { animation: fade-in .22s ease; }
@keyframes fade-in { from { opacity: .35; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.card {
  position: relative;
  margin-bottom: 13px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid rgba(217,226,238,.92);
  border-radius: var(--radius);
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow);
}
.card.flat { box-shadow: none; }
.card.soft { background: #f8fbff; }
.card.dark { color: white; background: linear-gradient(140deg, var(--navy), #0c3c7c 62%, #0a56aa); border-color: rgba(255,255,255,.08); box-shadow: var(--shadow-strong); }
.card.tint-blue { background: linear-gradient(135deg, #eef6ff, #f9fcff); }
.card.tint-green { background: linear-gradient(135deg, #ebfaf4, #fbfffd); }
.card.tint-amber { background: linear-gradient(135deg, #fff7e7, #fffdf8); }
.card.tint-red { background: linear-gradient(135deg, #fff0f2, #fffafb); }

.eyebrow { margin-bottom: 5px; color: var(--blue); font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.card.dark .eyebrow { color: #8fdcf2; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(27px, 7vw, 36px); line-height: 1.04; letter-spacing: -.045em; }
h2 { margin-bottom: 9px; font-size: 21px; line-height: 1.15; letter-spacing: -.025em; }
h3 { margin-bottom: 6px; font-size: 17px; line-height: 1.2; }
p { margin-bottom: 0; line-height: 1.46; }
.muted { color: var(--muted); }
.card.dark .muted { color: #c1d2e8; }
.small { font-size: 12px; }
.micro { font-size: 10px; }
.strong { font-weight: 900; }
.money { font-variant-numeric: tabular-nums; }

.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.start { align-items: flex-start; }
.row.wrap { flex-wrap: wrap; }
.stack { display: grid; gap: 10px; }
.spacer-6 { height: 6px; }
.spacer-10 { height: 10px; }
.divider { height: 1px; margin: 14px 0; background: var(--line); }

.btn {
  min-height: 48px;
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-radius: 16px;
  font-weight: 900;
  letter-spacing: -.01em;
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease, opacity .14s ease;
}
.btn:active { transform: scale(.985); }
.btn.primary { color: white; background: linear-gradient(135deg, var(--blue), #0754c5); box-shadow: 0 12px 25px rgba(13,110,253,.24); }
.btn.secondary { color: var(--blue); background: #eaf3ff; }
.btn.dark { color: white; background: var(--navy); }
.btn.success { color: white; background: linear-gradient(135deg, #16aa70, #138454); }
.btn.warning { color: #775104; background: #fff2d2; }
.btn.danger { color: #b23143; background: #ffeaed; }
.btn.ghost { color: var(--muted); background: transparent; border: 1px solid var(--line); }
.btn.inline { width: auto; min-height: 40px; padding: 9px 12px; border-radius: 13px; font-size: 12px; }
.btn.icon-text { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn[disabled] { opacity: .48; cursor: not-allowed; box-shadow: none; }

.chip { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 6px 10px; border-radius: 999px; color: #285174; background: #eef4fa; font-size: 11px; font-weight: 850; }
.chip.success { color: #0b7549; background: #e4f8ee; }
.chip.warning { color: #8b5d04; background: #fff3d6; }
.chip.danger { color: #a73546; background: #ffe7eb; }
.chip.blue { color: #0955bc; background: #e3f0ff; }
.card.dark .chip { color: white; background: rgba(255,255,255,.11); }

.hero-dashboard { min-height: 216px; display: grid; grid-template-columns: minmax(0,1fr) 145px; align-items: center; gap: 6px; padding: 19px 14px 17px 19px; }
.hero-dashboard::before { content: ""; position: absolute; width: 200px; height: 200px; border-radius: 50%; right: -62px; top: -72px; background: rgba(42,170,255,.16); }
.hero-copy { position: relative; z-index: 2; min-width: 0; }
.hero-copy h1 { max-width: 270px; }
.hero-copy .hero-line { margin: 8px 0 15px; color: #c5d6ea; font-size: 13px; }

.cash-status { display: grid; gap: 12px; }
.cash-status-main { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.cash-balance { font-size: 30px; font-weight: 950; letter-spacing: -.04em; }
.cash-formula { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 12px; }
.formula-item { padding: 10px 6px; border-radius: 13px; background: #f3f7fc; text-align: center; }
.formula-item span { display: block; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.formula-item strong { display: block; margin-top: 4px; font-size: 12px; font-variant-numeric: tabular-nums; }

.metrics-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin-bottom: 13px; }
.metric-card { min-height: 104px; padding: 14px; border-radius: 19px; border: 1px solid var(--line); background: white; box-shadow: 0 8px 24px rgba(11,36,79,.055); }
.metric-card .metric-icon { width: 30px; height: 30px; margin-bottom: 8px; display: grid; place-items: center; border-radius: 10px; background: #eaf3ff; color: var(--blue); }
.metric-card .metric-icon svg { width: 17px; height: 17px; }
.metric-card .label { color: var(--muted); font-size: 11px; font-weight: 800; }
.metric-card .value { margin-top: 4px; font-size: 20px; font-weight: 950; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.metric-card.green .metric-icon { color: var(--green); background: #e6f7ef; }
.metric-card.amber .metric-icon { color: #986404; background: #fff2d6; }
.metric-card.red .metric-icon { color: var(--red); background: #ffeaed; }
.metric-card.violet .metric-icon { color: var(--violet); background: #eeeafd; }

.section-head { margin: 19px 3px 10px; display: flex; align-items: end; justify-content: space-between; gap: 10px; }
.section-head h2 { margin: 0; }
.section-head p { margin-top: 3px; color: var(--muted); font-size: 11px; }

.quick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.quick-action { min-height: 103px; padding: 14px; border: 1px solid var(--line); border-radius: 19px; color: var(--ink); background: white; text-align: left; cursor: pointer; box-shadow: 0 8px 22px rgba(11,36,79,.055); transition: .16s ease; }
.quick-action:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(11,36,79,.09); }
.quick-action-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; color: var(--blue); background: #eaf3ff; }
.quick-action-icon svg { width: 20px; height: 20px; }
.quick-action strong { display: block; margin-top: 10px; font-size: 14px; }
.quick-action span { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.quick-action.credit .quick-action-icon { color: #8b5d04; background: #fff2d6; }
.quick-action.payment .quick-action-icon { color: var(--green); background: #e6f7ef; }
.quick-action.expense .quick-action-icon { color: var(--red); background: #ffeaed; }

.progress-track { height: 9px; margin: 10px 0 6px; overflow: hidden; border-radius: 999px; background: #e2eaf4; }
.progress-track > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal), var(--blue)); transition: width .45s ease; }

.list { display: grid; gap: 9px; }
.list-item { width: 100%; min-height: 72px; padding: 12px; display: flex; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: white; text-align: left; cursor: pointer; box-shadow: 0 7px 18px rgba(11,36,79,.04); }
.list-item:hover { border-color: #cbd8e8; }
.avatar { flex: 0 0 auto; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; color: #0b5ecc; background: linear-gradient(145deg, #e5f1ff, #f5faff); font-weight: 950; }
.list-main { min-width: 0; flex: 1; }
.list-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.list-main span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.list-aside { flex: 0 0 auto; text-align: right; }
.list-aside strong { display: block; font-size: 13px; font-variant-numeric: tabular-nums; }
.list-aside span { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.amount-positive { color: var(--green); }
.amount-negative { color: var(--red); }
.amount-credit { color: #966306; }

.search-wrap { position: sticky; z-index: 6; top: 76px; margin-bottom: 12px; }
.search-field { width: 100%; height: 48px; padding: 0 15px 0 43px; border: 1px solid #d9e3ef; border-radius: 16px; color: var(--ink); background: rgba(255,255,255,.96); box-shadow: 0 8px 20px rgba(11,36,79,.06); }
.search-icon { position: absolute; left: 15px; top: 14px; width: 20px; height: 20px; color: var(--muted); pointer-events: none; }

.form-grid { display: grid; gap: 12px; }
.field label { display: block; margin: 0 0 6px 1px; color: #33435d; font-size: 12px; font-weight: 850; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 12px 13px; border: 1px solid #d7e1ed; border-radius: 15px; color: var(--ink); background: #fff; transition: .15s ease; }
.field textarea { min-height: 92px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(13,110,253,.09); outline: none; }
.field-hint { margin: 5px 2px 0; color: var(--muted); font-size: 10px; }
.amount-input { height: 74px !important; font-size: 31px !important; font-weight: 950; text-align: center; letter-spacing: -.035em; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.segmented { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.segmented.three { grid-template-columns: repeat(3, 1fr); }
.segmented button { min-height: 45px; padding: 9px 7px; border: 1px solid #d9e3ef; border-radius: 14px; color: #4c5b70; background: white; font-size: 11px; font-weight: 850; cursor: pointer; }
.segmented button.active { color: var(--blue); border-color: #8fbcfa; background: #eaf3ff; box-shadow: inset 0 0 0 1px rgba(13,110,253,.10); }

.notice { padding: 12px 13px; border: 1px solid #f0d78e; border-radius: 15px; color: #7b560b; background: #fff8e6; font-size: 12px; line-height: 1.4; }
.notice.danger { color: #9f3242; border-color: #ffc3cb; background: #fff0f2; }
.notice.success { color: #0b7047; border-color: #b9e7d1; background: #ebfaf3; }
.notice.info { color: #175c9c; border-color: #c3ddf7; background: #edf6ff; }

.empty { padding: 32px 16px; color: var(--muted); text-align: center; }
.empty-icon { width: 52px; height: 52px; margin: 0 auto 10px; display: grid; place-items: center; border-radius: 17px; color: var(--blue); background: #eaf3ff; }
.empty-icon svg { width: 27px; height: 27px; }

.bottom-nav { position: fixed; z-index: 40; left: 50%; bottom: 0; width: min(100%, 560px); padding: 7px 8px calc(7px + var(--safe-bottom)); display: grid; grid-template-columns: repeat(5, 1fr); transform: translateX(-50%); border-top: 1px solid rgba(213,224,237,.95); background: rgba(255,255,255,.97); box-shadow: 0 -12px 34px rgba(11,36,79,.11); backdrop-filter: blur(18px); }
.nav-btn { min-height: 55px; padding: 6px 3px; border: 0; border-radius: 14px; color: #7b879a; background: transparent; font-size: 9px; font-weight: 850; cursor: pointer; }
.nav-btn svg { display: block; width: 22px; height: 22px; margin: 0 auto 3px; }
.nav-btn.active { color: var(--blue); background: #edf5ff; }
.nav-btn.register { position: relative; color: white; background: transparent; }
.nav-btn.register svg { width: 27px; height: 27px; margin-top: -18px; padding: 8px; box-sizing: content-box; border-radius: 17px; color: white; background: linear-gradient(135deg, var(--blue), #0753bd); box-shadow: 0 10px 24px rgba(13,110,253,.35); }
.nav-btn.register.active { color: var(--blue); }

.modal-backdrop { position: fixed; z-index: 90; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding-top: 40px; background: rgba(4,16,35,.58); backdrop-filter: blur(6px); animation: backdrop-in .18s ease; }
.modal { width: min(100%, 560px); max-height: 93vh; overflow: auto; padding: 17px 15px calc(24px + var(--safe-bottom)); border-radius: 28px 28px 0 0; background: #f5f8fc; box-shadow: 0 -20px 70px rgba(7,27,58,.30); animation: modal-up .22s ease; }
.modal-head { position: sticky; z-index: 4; top: -17px; margin: -17px -15px 12px; padding: 15px 15px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #e1e8f1; background: rgba(245,248,252,.96); backdrop-filter: blur(14px); }
.modal-head h2 { margin: 0; font-size: 20px; }
.modal-close { flex: 0 0 auto; width: 39px; height: 39px; border: 0; border-radius: 13px; color: #53627a; background: #e9eff7; cursor: pointer; }
@keyframes modal-up { from { transform: translateY(45px); opacity: .35; } to { transform: none; opacity: 1; } }
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }

.toast { position: fixed; z-index: 120; left: 50%; bottom: calc(95px + var(--safe-bottom)); max-width: min(90vw, 470px); padding: 12px 16px; transform: translateX(-50%); border-radius: 14px; color: white; background: #071b3a; box-shadow: 0 16px 38px rgba(7,27,58,.28); text-align: center; font-size: 12px; font-weight: 750; animation: toast-in .2s ease; }
@keyframes toast-in { from { transform: translate(-50%, 12px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

.onboarding {
  min-height: 100vh;
  width: min(100%, 620px);
  margin: 0 auto;
  padding: 18px 18px calc(24px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 5%, rgba(18,185,172,.16), transparent 27%),
    radial-gradient(circle at 5% 40%, rgba(13,110,253,.10), transparent 32%),
    linear-gradient(180deg, #f9fcff, #edf4fb 58%, #e8f0f9);
  box-shadow: 0 0 70px rgba(7,27,58,.16);
}
.onboarding-header { min-height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.onboarding-brand { display: flex; align-items: center; gap: 10px; color: var(--navy); font-weight: 950; font-size: 21px; letter-spacing: -.03em; }
.onboarding-brand .brand-mark { width: 42px; height: 42px; color: white; }
.onboarding-count { padding: 7px 10px; border: 1px solid #d7e4f2; border-radius: 999px; color: #46627f; background: rgba(255,255,255,.72); font-size: 10px; font-weight: 900; }
.onboarding-stage { flex: 1; min-height: 530px; display: grid; align-content: center; }
.tutorial-layout { grid-template-columns: minmax(0, .88fr) minmax(260px, 1.12fr); align-items: center; gap: 8px; }
.tutorial-card { position: relative; z-index: 2; padding: 22px; border: 1px solid rgba(210,225,240,.96); border-radius: 27px; background: rgba(255,255,255,.96); box-shadow: 0 24px 60px rgba(14,52,99,.14); }
.tutorial-card::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: linear-gradient(135deg, rgba(255,255,255,.58), transparent 45%); }
.tutorial-card > * { position: relative; z-index: 1; }
.tutorial-card-head { display: grid; grid-template-columns: 48px 1fr; align-items: start; gap: 12px; }
.tutorial-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 16px; color: white; background: linear-gradient(135deg, var(--blue), var(--teal)); box-shadow: 0 10px 23px rgba(13,110,253,.22); }
.tutorial-card .eyebrow { margin-bottom: 5px; }
.tutorial-card h1 { margin: 0; font-size: clamp(25px, 5.7vw, 34px); line-height: 1.05; }
.tutorial-description { margin: 15px 0; color: #63738a; font-size: 13px; }
.tutorial-list { display: grid; gap: 9px; }
.tutorial-list > div { display: grid; grid-template-columns: 25px 1fr; align-items: center; gap: 8px; color: #283d59; font-size: 11px; font-weight: 760; }
.tutorial-list svg { padding: 4px; box-sizing: content-box; border-radius: 9px; color: #0a8462; background: #e6f8f0; }
.tutorial-preview { min-height: 86px; margin-top: 17px; padding: 14px; display: grid; align-content: center; border: 1px solid #d9e7f4; border-radius: 18px; background: linear-gradient(135deg, #f0f7ff, #f8fffd); }
.tutorial-preview > span, .tutorial-preview > small { display: block; color: var(--muted); font-size: 10px; font-weight: 760; }
.tutorial-preview > strong { display: block; margin: 4px 0; color: var(--navy); font-size: 21px; letter-spacing: -.03em; }
.tutorial-pills { display: grid; grid-template-columns: repeat(2,1fr); gap: 7px; }
.tutorial-pills b { padding: 9px 7px; border-radius: 12px; color: #155b99; background: white; text-align: center; font-size: 10px; box-shadow: 0 5px 13px rgba(13,60,110,.06); }
.tutorial-balance { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tutorial-balance span { padding: 8px 5px; border-radius: 11px; color: var(--muted); background: white; text-align: center; font-size: 8px; font-weight: 800; }
.tutorial-balance b { display: block; margin-top: 3px; color: var(--navy); font-size: 10px; }
.tutorial-balance .ok { color: #0d7650; background: #e6f8f0; }
.onboarding-footer { display: grid; gap: 10px; }
.onboarding-actions { display: grid; grid-template-columns: minmax(0,.72fr) minmax(0,1.28fr); gap: 9px; }
.onboarding-actions > span { display: block; }
.dots { display: flex; justify-content: center; gap: 7px; margin-bottom: 4px; }
.dot { width: 8px; height: 8px; border-radius: 99px; background: #c6d5e6; transition: .2s ease; }
.dot.active { width: 30px; background: linear-gradient(90deg, var(--blue), var(--teal)); }
.onboarding .btn.primary { background: linear-gradient(135deg, #0b68dc, #0d9e9b); }
.onboarding .btn.ghost { color: #52647c; border-color: #ccd9e8; background: rgba(255,255,255,.6); }
.setup-stage { grid-template-columns: 180px 1fr; align-items: center; gap: 8px; }
.setup-card { color: var(--ink); text-align: left; background: rgba(255,255,255,.97); box-shadow: 0 24px 60px rgba(14,52,99,.13); }
.setup-card h1 { font-size: 28px; }

@media (max-width: 560px) {
  .onboarding { padding-inline: 14px; }
  .onboarding-stage { min-height: 625px; }
  .tutorial-layout { grid-template-columns: 1fr; align-content: center; gap: 0; }
  .tutorial-card { padding: 19px; }
  .tutorial-card h1 { font-size: 27px; }
  .setup-stage { grid-template-columns: 1fr; }
}

.opening-gate { min-height: 230px; padding: 22px; display: grid; align-content: center; text-align: center; }
.opening-gate h2 { margin-bottom: 6px; }

.session-timeline { position: relative; display: grid; gap: 0; }
.timeline-row { position: relative; min-height: 58px; padding: 0 0 16px 32px; }
.timeline-row::before { content: ""; position: absolute; left: 9px; top: 11px; bottom: -11px; width: 2px; background: #dce6f1; }
.timeline-row:last-child::before { display: none; }
.timeline-dot { position: absolute; left: 2px; top: 4px; width: 16px; height: 16px; border: 4px solid #dcecff; border-radius: 99px; background: var(--blue); }
.timeline-row.closed .timeline-dot { background: var(--green); border-color: #dff5ea; }
.timeline-row strong { display: block; font-size: 13px; }
.timeline-row span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }

.style-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.style-card { position: relative; min-height: 180px; padding: 11px; border: 1px solid var(--line); border-radius: 18px; background: white; overflow: hidden; }
.style-card h3 { font-size: 13px; }
.style-card p { color: var(--muted); font-size: 9px; }
.style-card.locked { filter: grayscale(.65); opacity: .62; }
.style-lock { position: absolute; z-index: 3; top: 9px; right: 9px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 10px; color: white; background: rgba(7,27,58,.78); }

.log-grid { display: grid; gap: 8px; }
.log-row { padding: 11px 12px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.log-row strong { display: block; font-size: 12px; }
.log-row span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }

.report-highlight { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; }
.report-highlight .big { font-size: 27px; font-weight: 950; letter-spacing: -.04em; }
.bar-list { display: grid; gap: 11px; }
.bar-row { display: grid; grid-template-columns: 88px 1fr auto; align-items: center; gap: 9px; font-size: 10px; }
.bar-track { height: 8px; overflow: hidden; border-radius: 99px; background: #e4ebf3; }
.bar-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--teal)); }

.calculator-display { min-height: 68px; margin-bottom: 10px; padding: 16px; border-radius: 17px; background: #eaf0f7; text-align: right; font-size: 29px; font-weight: 950; overflow-x: auto; }
.calculator-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.calculator-grid button { min-height: 52px; border: 0; border-radius: 14px; color: var(--ink); background: white; font-weight: 900; cursor: pointer; box-shadow: 0 5px 15px rgba(11,36,79,.05); }
.calculator-grid button.op { color: #0757bd; background: #e6f1ff; }
.calculator-grid button.equal { color: white; background: var(--blue); }

.ad-banner { display:none; } /* legado RC6: reemplazado por .cf-ad-slot */

.toggle-row { min-height: 58px; padding: 9px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.toggle-row:last-child { border-bottom: 0; }
.toggle-copy strong { display: block; font-size: 13px; }
.toggle-copy span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.switch { position: relative; width: 47px; height: 28px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #ced7e3; transition: .2s ease; }
.switch span::after { content: ""; position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: white; box-shadow: 0 3px 8px rgba(11,36,79,.22); transition: .2s ease; }
.switch input:checked + span { background: var(--blue); }
.switch input:checked + span::after { transform: translateX(19px); }


@media (min-width: 700px) {
  body { padding: 22px 0; }
  .app-shell, .onboarding { min-height: calc(100vh - 44px); border-radius: 30px; overflow: hidden; }
  .topbar { top: 0; }
  .bottom-nav { bottom: 22px; border-radius: 0 0 30px 30px; overflow: hidden; }
  .modal-backdrop { align-items: center; padding: 24px; }
  .modal { max-height: 88vh; border-radius: 28px; }
}

@media (max-width: 390px) {
  .hero-dashboard { grid-template-columns: minmax(0,1fr) 120px; }
  .cash-formula { grid-template-columns: repeat(2,1fr); }
  .style-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.optional-details { border: 1px solid var(--line); border-radius: 15px; background: #fbfdff; overflow: hidden; }
.optional-details summary { padding: 12px 13px; color: var(--blue); font-size: 11px; font-weight: 850; cursor: pointer; list-style: none; }
.optional-details summary::-webkit-details-marker { display: none; }
.optional-details[open] summary { border-bottom: 1px solid var(--line); }
.optional-details .field { padding: 12px; }

/* CajaFácil Pro V4 — identidad original refinada */
:root {
  --navy: #101f46;
  --navy-2: #173365;
  --blue: #2f9fcd;
  --blue-2: #49c5df;
  --teal: #49c5df;
  --ink: #14213d;
  --surface-2: #f4f9fc;
  --surface-3: #e8f3f8;
  --line: #d9e8ef;
  --shadow: 0 14px 34px rgba(16,31,70,.09);
  --shadow-strong: 0 24px 58px rgba(16,31,70,.19);
}
html { background: #eaf3f7; }
body { background: linear-gradient(180deg, #eff8fb, #e7f1f6); }
.app-shell { background: linear-gradient(180deg, #fbfdfe, #f3f8fb 48%, #edf5f8); }
.topbar { background: rgba(16,31,70,.98); border-bottom-color: rgba(73,197,223,.18); }
.brand-mark { background: linear-gradient(135deg, #49c5df, #2f9fcd); box-shadow: 0 8px 20px rgba(73,197,223,.23); }
.brand-name span, .onboarding-brand > span span { color: #49c5df; }
.brand-subtitle { color: #b7d3e1; }
.btn.primary { background: linear-gradient(135deg, #42bdd9, #268fbe); box-shadow: 0 12px 24px rgba(47,159,205,.22); }
.btn.secondary { color: #197fa9; background: #e5f5fa; }
.card.dark { background: linear-gradient(140deg, #101f46, #173365 65%, #1e537d); }
.card.dark .eyebrow { color: #83d9ea; }
.hero-dashboard { min-height: 210px; grid-template-columns: minmax(0,1fr) 112px; padding: 22px 20px; }
.hero-dashboard::before { background: rgba(73,197,223,.16); }
.hero-brand-art { position: relative; z-index: 2; width: 96px; height: 96px; border-radius: 30px; display:grid; place-items:center; color:white; background: linear-gradient(145deg, rgba(73,197,223,.95), rgba(47,159,205,.7)); box-shadow: 0 18px 36px rgba(0,0,0,.14); transform: rotate(-4deg); }
.hero-brand-art svg { width: 60px; height: 60px; }
.hero-open { width: auto; min-width: 146px; }
.quick-head { margin-top: 12px; }
.home-quick-grid { margin-bottom: 15px; }
.quick-action { border-color: #d5e7ee; }
.quick-action.sale .quick-action-icon { background:#e2f7f2; color:#168a66; }
.quick-action.credit .quick-action-icon { background:#fff2d9; color:#9b690a; }
.quick-action.expense .quick-action-icon { background:#ffeaee; color:#c84155; }
.quick-action.payment .quick-action-icon { background:#e9eefc; color:#536ac7; }
.opening-icon, .setup-icon { width: 54px; height: 54px; border-radius: 18px; display:grid; place-items:center; color:white; background: linear-gradient(135deg, #49c5df, #2f9fcd); box-shadow: 0 10px 22px rgba(47,159,205,.2); margin-bottom: 14px; }
.opening-modal-head { display:flex; align-items:flex-start; gap:14px; }
.opening-modal-head .opening-icon { flex:0 0 auto; margin:0; }
.brand-tutorial { display:grid; align-items:center; }
.brand-tutorial .tutorial-card { width:min(100%, 470px); margin:auto; }
.tutorial-visual { width:88px; height:88px; margin:0 0 22px; border-radius:28px; display:grid; place-items:center; color:white; background: linear-gradient(145deg, #101f46, #267fa6); box-shadow: 0 18px 40px rgba(16,31,70,.18); }
.tutorial-visual span { width:54px; height:54px; border-radius:18px; display:grid; place-items:center; background:rgba(73,197,223,.22); color:#9ce7f4; }
.setup-stage.no-character { grid-template-columns:1fr; }
.setup-stage.no-character .setup-card { max-width:500px; margin:auto; }
.onboarding { background: radial-gradient(circle at 50% -10%, rgba(73,197,223,.18), transparent 38%), linear-gradient(180deg,#f8fcfe,#edf6f9); }
.onboarding-header { background:#101f46; color:white; border-radius:0 0 24px 24px; padding:14px 18px; }
.onboarding-count { color:#c6e8f0; }
.dot.active { background:#2f9fcd; }
@media (max-width:390px) {
  .hero-dashboard { grid-template-columns:1fr; }
  .hero-brand-art { display:none; }
}

/* CajaFácil Pro V5 — logo oficial, bienvenida centrada y caja chica */
:root {
  --navy: #0B1D34;
  --navy-2: #123A6D;
  --blue: #1E88FF;
  --blue-2: #41C4FF;
  --teal: #41C4FF;
  --ink: #0B1D34;
  --surface-2: #F6F9FC;
  --surface-3: #EAF3FA;
  --line: #DCE7F1;
}
html, body { font-family: Manrope, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.topbar { background: rgba(11,29,52,.98); }
.brand-mark { color:#fff; background: linear-gradient(145deg, #41C4FF, #1E88FF 58%, #123A6D); }
.brand-mark svg { stroke-width: 1.9; }
.brand-name span, .onboarding-brand strong span { color:#41C4FF; }
.btn.primary { background: linear-gradient(135deg, #1E88FF, #0870E2); box-shadow: 0 12px 25px rgba(30,136,255,.24); }
.card.dark { background: linear-gradient(145deg, #0B1D34, #123A6D 66%, #15568F); }

/* Bienvenida: la tarjeta queda realmente centrada en todos los tamaños */
.onboarding { width:min(100%, 620px); padding:0 16px calc(22px + var(--safe-bottom)); }
.onboarding-header { margin:0 -16px; padding:14px 18px; border-radius:0 0 24px 24px; background:#0B1D34; }
.onboarding-brand { min-width:0; gap:11px; }
.onboarding-wordmark { min-width:0; display:grid; line-height:1; }
.onboarding-wordmark strong { font-size:20px; letter-spacing:-.04em; }
.onboarding-wordmark small { margin-top:5px; color:#A9CCE5; font-size:8px; font-weight:800; letter-spacing:.10em; text-transform:uppercase; white-space:nowrap; }
.onboarding-stage { width:100%; min-height:520px; place-items:center; align-content:center; justify-content:center; }
.brand-tutorial { grid-template-columns:1fr !important; }
.brand-tutorial .tutorial-card { justify-self:center; width:min(100%, 440px); margin:22px auto 12px; padding:24px; text-align:center; }
.tutorial-card-top { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.tutorial-visual { flex:0 0 auto; width:82px; height:82px; margin:0; border-radius:25px; }
.tutorial-step-number { color:#C9D8E7; font-size:28px; font-weight:950; letter-spacing:-.06em; }
.tutorial-copy { max-width:360px; margin:18px auto 0; }
.tutorial-copy .eyebrow { text-align:center; }
.tutorial-card h1 { max-width:360px; margin:0 auto; font-size:clamp(26px, 6vw, 34px); }
.tutorial-description { max-width:360px; margin:13px auto 17px; text-align:center; }
.tutorial-list { max-width:340px; margin:0 auto; text-align:left; }
.tutorial-preview { max-width:360px; width:100%; margin:18px auto 0; text-align:left; }
.tutorial-balance.two { grid-template-columns:repeat(2,1fr); }
.tutorial-source, .tutorial-search { display:grid; gap:5px; }
.tutorial-source span, .tutorial-search span { display:flex; align-items:center; gap:6px; color:var(--muted); font-size:10px; font-weight:800; }
.tutorial-source b, .tutorial-search b { color:var(--navy); font-size:17px; }
.tutorial-source small, .tutorial-search small { color:var(--muted); font-size:10px; }
.onboarding-footer { width:min(100%, 440px); margin:0 auto; }
.onboarding-actions { grid-template-columns:minmax(0,.78fr) minmax(0,1.22fr); }
.setup-stage.no-character { place-items:center; }
.setup-stage.no-character .setup-card { width:min(100%, 500px); margin:22px auto 12px; }

/* Dos fondos: caja principal y caja chica */
.hero-actions { display:flex; align-items:center; flex-wrap:wrap; gap:9px; }
.hero-petty-link { min-height:36px; padding:6px 10px; display:grid; gap:1px; border:1px solid rgba(255,255,255,.16); border-radius:12px; color:white; background:rgba(255,255,255,.09); text-align:left; cursor:pointer; }
.hero-petty-link span { color:#B7D8EB; font-size:8px; font-weight:850; text-transform:uppercase; letter-spacing:.08em; }
.hero-petty-link strong { font-size:12px; }
.fund-overview { display:grid; grid-template-columns:minmax(0,1fr) minmax(150px,.68fr); align-items:stretch; gap:10px; }
.fund-primary { min-width:0; padding:4px 2px; }
.petty-balance-button { min-width:0; padding:12px; display:grid; grid-template-columns:38px minmax(0,1fr) 16px; align-items:center; gap:8px; border:1px solid #CDE0EF; border-radius:17px; color:var(--ink); background:linear-gradient(145deg,#F3FAFF,#E8F4FC); text-align:left; cursor:pointer; }
.petty-balance-button .petty-icon { width:38px; height:38px; display:grid; place-items:center; border-radius:13px; color:#fff; background:linear-gradient(145deg,#41C4FF,#1E88FF); }
.petty-balance-button small, .petty-balance-button strong { display:block; }
.petty-balance-button small { color:var(--muted); font-size:9px; font-weight:850; text-transform:uppercase; letter-spacing:.07em; }
.petty-balance-button strong { margin-top:3px; font-size:15px; }
.cash-status-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:8px; }
.cash-formula.five { grid-template-columns:repeat(5,1fr); }
.fund-opening-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.amount-input.compact { height:64px !important; font-size:25px !important; }
.petty-hero { margin-bottom:12px; padding:18px; display:flex; justify-content:space-between; align-items:center; gap:16px; border:1px solid rgba(255,255,255,.08); border-radius:22px; color:white; background:linear-gradient(145deg,#0B1D34,#123A6D); box-shadow:var(--shadow-strong); }
.petty-hero .eyebrow { color:#74D8FF; }
.petty-hero .muted { color:#C1D8E8; }
.petty-hero-icon { width:58px; height:58px; display:grid; place-items:center; border-radius:19px; color:#fff; background:linear-gradient(145deg,#41C4FF,#1E88FF); }
.petty-close-note { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.section-head.compact { margin-top:14px; }
.list-item.compact { padding:11px; }

/* Selector predictivo de clientes dentro de fiado y abono */
.client-picker { position:relative; }
.client-picker-input-wrap { min-height:50px; padding:0 12px; display:flex; align-items:center; gap:9px; border:1px solid #D7E1ED; border-radius:15px; background:#fff; }
.client-picker-input-wrap > span { flex:0 0 auto; color:var(--blue); }
.client-picker-input { width:100%; min-height:48px; padding:0; border:0 !important; outline:0 !important; box-shadow:none !important; color:var(--ink); background:transparent; }
.client-picker-results { max-height:265px; margin-top:8px; overflow:auto; display:grid; gap:6px; }
.client-pick-result { width:100%; padding:9px; display:grid; grid-template-columns:38px minmax(0,1fr) 18px; align-items:center; gap:9px; border:1px solid #E0E8F0; border-radius:14px; color:var(--ink); background:#fff; text-align:left; cursor:pointer; }
.client-pick-result.selected { border-color:#79B8F8; background:#EDF6FF; box-shadow:inset 0 0 0 1px rgba(30,136,255,.12); }
.client-pick-result .avatar { width:38px; height:38px; }
.client-pick-copy { min-width:0; }
.client-pick-copy strong, .client-pick-copy small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.client-pick-copy strong { font-size:12px; }
.client-pick-copy small { margin-top:3px; color:var(--muted); font-size:9px; }
.client-picker-empty { padding:15px; border:1px dashed #CCD9E6; border-radius:14px; color:var(--muted); background:#F8FBFD; text-align:center; font-size:11px; }

/* Selección de origen del gasto */
.source-choice-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.source-choice { position:relative; cursor:pointer; }
.source-choice input { position:absolute; opacity:0; pointer-events:none; }
.source-choice > span { min-height:92px; padding:12px; display:grid; align-content:center; justify-items:start; gap:4px; border:1px solid #D9E4EE; border-radius:16px; color:var(--ink); background:#fff; transition:.15s ease; }
.source-choice svg { color:var(--blue); }
.source-choice strong { font-size:12px; }
.source-choice small { color:var(--muted); font-size:9px; }
.source-choice input:checked + span { border-color:#67AFF8; background:#EDF6FF; box-shadow:inset 0 0 0 1px rgba(30,136,255,.14), 0 7px 18px rgba(30,136,255,.08); }

@media (max-width:560px) {
  .source-choice-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .onboarding-stage { min-height:545px; }
  .brand-tutorial .tutorial-card { margin-top:16px; padding:21px 18px; }
  .tutorial-visual { width:72px; height:72px; border-radius:22px; }
  .tutorial-visual span { width:48px; height:48px; }
  .fund-overview { grid-template-columns:1fr; }
  .petty-balance-button { grid-template-columns:38px minmax(0,1fr) 16px; }
  .cash-formula.five { grid-template-columns:repeat(2,1fr); }
  .fund-opening-grid { grid-template-columns:1fr; }
}

@media (max-width:360px) {
  .onboarding { padding-inline:12px; }
  .onboarding-header { margin-inline:-12px; padding-inline:14px; }
  .onboarding-wordmark small { display:none; }
  .onboarding-count { font-size:9px; }
  .tutorial-card h1 { font-size:24px; }
  .source-choice-grid { grid-template-columns:1fr; }
}


/* CajaFácil Pro V6 — personaje oficial, icono premium y reapertura independiente */
.premium-brand-mark { overflow:hidden; padding:0; background:#081a38; border:1px solid rgba(65,196,255,.35); box-shadow:0 8px 22px rgba(30,136,255,.30), inset 0 1px 0 rgba(255,255,255,.18); }
.premium-brand-mark img { width:100%; height:100%; object-fit:cover; display:block; }
.merchant-avatar { width:39px; height:39px; border-radius:50%; overflow:hidden; border:2px solid #41C4FF; box-shadow:0 5px 16px rgba(30,136,255,.32); background:#0B1D34; }
.merchant-avatar img { width:100%; height:100%; object-fit:cover; object-position:50% 27%; transform:scale(1.18); display:block; }
.merchant-hero { overflow:hidden; padding:0; border-radius:50%; background:#0B1D34; border:3px solid rgba(65,196,255,.8); transform:none; }
.merchant-hero img { width:100%; height:100%; object-fit:cover; object-position:50% 24%; transform:scale(1.12); display:block; }
.cash-status-actions { justify-content:flex-end; }
.previous-close-summary { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:16px 0; padding:14px; border:1px solid #d9e8f5; border-radius:18px; background:linear-gradient(135deg,#f4f9ff,#fff); }
.previous-close-summary > div { display:grid; gap:4px; }
.previous-close-summary span { color:var(--muted); font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; }
.previous-close-summary strong { font-size:19px; }
.previous-close-summary p { grid-column:1/-1; margin:3px 0 0; color:var(--muted); font-size:12px; line-height:1.45; }
@media (max-width:390px) {
  .merchant-avatar { width:36px; height:36px; }
  .brand-subtitle { max-width:145px; }
  .previous-close-summary { grid-template-columns:1fr; }
  .previous-close-summary p { grid-column:auto; }
}

/* CajaFácil Pro V7 — interfaz móvil premium, modo oscuro y panel inteligente */
.text-brand-lockup { gap: 0; }
.text-brand-lockup .brand-name { font-size: 21px; }
.text-brand-lockup .brand-subtitle { max-width: 230px; }
.theme-toggle { color: #9fe8ff; }

.hero-dashboard {
  min-height: 248px;
  grid-template-columns: minmax(0, 1fr) 138px;
  gap: 8px;
  padding: 22px 12px 20px 20px;
}
.hero-greeting {
  display: block;
  margin-bottom: 8px;
  color: #86ddff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .02em;
}
.hero-copy h1 { max-width: 300px; margin-bottom: 7px; font-size: clamp(27px, 7vw, 35px); }
.hero-copy .hero-line { margin-bottom: 10px; }
.assistant-note {
  max-width: 315px;
  margin: 0 0 13px;
  padding: 9px 10px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid rgba(116, 216, 255, .18);
  border-radius: 13px;
  background: rgba(255,255,255,.075);
}
.assistant-note > span { flex: 0 0 auto; color: #7bdcff; }
.assistant-note p { color: #d7e8f6; font-size: 11px; line-height: 1.38; }
.merchant-hero {
  width: 132px;
  height: 178px;
  align-self: end;
  border: 0;
  border-radius: 34px 34px 28px 28px;
  background: linear-gradient(180deg, rgba(65,196,255,.22), rgba(7,27,58,.16));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 18px 34px rgba(0,0,0,.18);
}
.merchant-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  transform: scale(1.08);
}
.hero-petty-link { min-width: 108px; }

/* La caja chica se gestiona únicamente desde el saldo del hero. */
.petty-balance-display { cursor: default; grid-template-columns: 38px minmax(0,1fr); }
.petty-balance-display:hover { transform: none; }

.quick-head h2, .summary-head h2, .pro-section-head h2 { font-size: 23px; }
.quick-head p, .summary-head p, .pro-section-head p { font-size: 12px; }
.home-quick-grid { gap: 11px; }
.quick-action.premium {
  position: relative;
  min-height: 132px;
  padding: 16px 14px;
  display: grid;
  grid-template-columns: 48px minmax(0,1fr) 20px;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.32);
  color: #fff;
  background: linear-gradient(145deg, #1479e8, #0b5fc4);
  box-shadow: 0 14px 28px rgba(11, 82, 170, .22);
}
.quick-action.premium::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,.13), transparent 42%);
}
.quick-action.premium .quick-decoration {
  position: absolute;
  width: 104px;
  height: 104px;
  right: -42px;
  bottom: -45px;
  border-radius: 50%;
  background: rgba(255,255,255,.10);
  box-shadow: 0 0 0 18px rgba(255,255,255,.045);
}
.quick-action.premium .quick-action-icon {
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  margin: 0;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 16px;
  color: #fff;
  background: rgba(255,255,255,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16);
}
.quick-action.premium .quick-action-icon svg { width: 24px; height: 24px; }
.quick-action-copy { position: relative; z-index: 1; min-width: 0; }
.quick-action.premium .quick-action-copy strong {
  margin: 0;
  color: #fff;
  font-size: clamp(15px, 4.2vw, 18px);
  line-height: 1.1;
  letter-spacing: -.025em;
}
.quick-action.premium .quick-action-copy span {
  margin-top: 5px;
  color: rgba(255,255,255,.78);
  font-size: 10px;
  line-height: 1.25;
}
.quick-action-arrow { position: relative; z-index: 1; display: grid; place-items: center; color: rgba(255,255,255,.74); }
.quick-action.premium.sale { background: linear-gradient(145deg, #168e69, #0d6e52); box-shadow: 0 14px 28px rgba(13,110,82,.22); }
.quick-action.premium.credit { background: linear-gradient(145deg, #c68917, #91600b); box-shadow: 0 14px 28px rgba(145,96,11,.22); }
.quick-action.premium.expense { background: linear-gradient(145deg, #d44a5e, #aa3042); box-shadow: 0 14px 28px rgba(170,48,66,.22); }
.quick-action.premium.payment { background: linear-gradient(145deg, #6658c8, #4c42a4); box-shadow: 0 14px 28px rgba(76,66,164,.22); }
.quick-action.premium:active { transform: scale(.975); }

.summary-head { margin-top: 23px; }
.metric-card .label { font-size: 12px; }
.metric-card .value { font-size: 22px; }

.pro-section-head { align-items: center; margin-top: 23px; }
.smart-badge {
  min-height: 31px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  color: #0d68c7;
  background: #e5f2ff;
  font-size: 11px;
  font-weight: 900;
}
.smart-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-bottom: 13px; }
.smart-card {
  position: relative;
  min-height: 142px;
  padding: 15px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 21px;
  color: var(--ink);
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow);
  text-align: left;
}
button.smart-card { cursor: pointer; }
.smart-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 13px; color: var(--blue); background: #e8f3ff; }
.smart-copy { display: grid; gap: 3px; margin-top: 13px; }
.smart-copy small { color: var(--muted); font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .05em; }
.smart-copy strong { font-size: 27px; letter-spacing: -.045em; }
.smart-copy strong.money { font-size: 21px; }
.smart-copy strong em { color: var(--muted); font-size: 12px; font-style: normal; }
.smart-copy > span { color: var(--muted); font-size: 10px; font-weight: 750; }
.health-card .health-ring {
  position: absolute;
  top: 15px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: conic-gradient(currentColor var(--score), #e7edf4 0);
  opacity: .22;
}
.health-card.excellent { color: #168a66; }
.health-card.good { color: #1874c9; }
.health-card.warning { color: #a06a08; }
.health-card.danger { color: #c33d52; }
.health-card .smart-copy, .health-card .smart-copy strong { color: var(--ink); }
.prediction-card .smart-icon { color: #6253c5; background: #efedff; }
.business-level-card { padding: 17px; }
.level-number { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 16px; color: #fff; background: linear-gradient(145deg,#1e88ff,#1264c4); font-size: 22px; font-weight: 950; box-shadow: 0 10px 22px rgba(30,136,255,.22); }
.level-progress { height: 8px; overflow: hidden; border-radius: 999px; background: #e6edf5; }
.level-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#41c4ff,#1e88ff); }
.radar-card { padding: 17px; }
.radar-list { display: grid; gap: 7px; margin-top: 13px; }
.radar-item { width: 100%; padding: 9px; display: grid; grid-template-columns: 40px minmax(0,1fr) auto; align-items: center; gap: 9px; border: 1px solid #e0e8f1; border-radius: 15px; color: var(--ink); background: #f9fbfd; text-align: left; cursor: pointer; }
.radar-item > span:nth-child(2) { min-width: 0; }
.radar-item strong, .radar-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radar-item strong { font-size: 12px; }
.radar-item small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.radar-item b { color: #b3374b; font-size: 12px; }
.radar-empty { padding: 16px; border: 1px dashed var(--line); border-radius: 15px; color: var(--muted); background: #f9fbfd; text-align: center; font-size: 11px; }
.day-story-card { display: flex; align-items: flex-start; gap: 12px; background: linear-gradient(135deg,#f0f7ff,#fff); }
.story-icon { flex: 0 0 auto; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: linear-gradient(145deg,#1e88ff,#41c4ff); }
.day-story-card p { color: #41516a; font-size: 12px; line-height: 1.55; }
.health-detail { padding: 18px; display: flex; align-items: center; gap: 16px; border-radius: 22px; background: linear-gradient(145deg,#edf7ff,#fff); }
.health-score-large { flex: 0 0 auto; width: 92px; height: 92px; display: grid; place-content: center; border-radius: 50%; color: #fff; background: linear-gradient(145deg,#1e88ff,#0c65c6); box-shadow: 0 16px 30px rgba(30,136,255,.24); text-align: center; }
.health-score-large strong { font-size: 33px; line-height: 1; }
.health-score-large span { font-size: 11px; }
.health-reasons { display: grid; gap: 8px; margin-top: 14px; }
.health-reasons > div { padding: 11px; display: flex; align-items: flex-start; gap: 9px; border: 1px solid var(--line); border-radius: 15px; background: #fff; font-size: 12px; line-height: 1.42; }
.health-reasons svg { flex: 0 0 auto; color: var(--green); }

/* WhatsApp: opciones táctiles estables, sin menú nativo que se cierre. */
.whatsapp-composer { overflow: visible; }
.message-template-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.message-template-option { min-height: 92px; padding: 11px; display: grid; grid-template-columns: 26px minmax(0,1fr); align-content: center; align-items: center; gap: 3px 7px; border: 1px solid #dce6ef; border-radius: 16px; color: var(--ink); background: #fff; text-align: left; cursor: pointer; }
.message-template-option > span { grid-row: 1 / span 2; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 9px; color: var(--blue); background: #eaf3ff; }
.message-template-option strong { font-size: 12px; line-height: 1.15; }
.message-template-option small { color: var(--muted); font-size: 9px; line-height: 1.25; }
.message-template-option.selected { border-color: #57a9f7; background: #edf6ff; box-shadow: inset 0 0 0 1px rgba(30,136,255,.12), 0 8px 20px rgba(30,136,255,.08); }
.message-template-option.selected > span { color: #fff; background: var(--blue); }

/* Tema oscuro diseñado; mantiene contraste y jerarquía. */
html[data-theme="dark"] {
  --ink: #eef5ff;
  --surface: #102037;
  --surface-2: #0b182b;
  --surface-3: #142740;
  --line: #29405d;
  --muted: #9fb1c8;
  --shadow: 0 16px 40px rgba(0,0,0,.22);
  --shadow-strong: 0 24px 60px rgba(0,0,0,.32);
  background: #061120;
}
html[data-theme="dark"] body { background: radial-gradient(circle at 15% -10%, rgba(30,136,255,.15), transparent 38%), linear-gradient(180deg,#081525,#06111e); }
html[data-theme="dark"] .app-shell { background: linear-gradient(180deg,#0a1728,#081524 46%,#07121f); box-shadow: 0 0 60px rgba(0,0,0,.35); }
html[data-theme="dark"] .topbar { background: rgba(5,16,31,.97); border-bottom-color: rgba(118,173,225,.12); }
html[data-theme="dark"] .card:not(.dark),
html[data-theme="dark"] .metric-card,
html[data-theme="dark"] .smart-card,
html[data-theme="dark"] .list-item,
html[data-theme="dark"] .client-pick-result,
html[data-theme="dark"] .message-template-option,
html[data-theme="dark"] .health-reasons > div { color: var(--ink); border-color: var(--line); background: rgba(16,32,55,.97); }
html[data-theme="dark"] .card.soft,
html[data-theme="dark"] .radar-item,
html[data-theme="dark"] .radar-empty,
html[data-theme="dark"] .formula-item,
html[data-theme="dark"] .client-picker-empty { color: var(--ink); border-color: var(--line); background: #11243b; }
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .client-picker-input-wrap,
html[data-theme="dark"] .source-choice > span { color: var(--ink); border-color: var(--line); background: #0e2036; }
html[data-theme="dark"] .field input::placeholder,
html[data-theme="dark"] .field textarea::placeholder { color: #7890aa; }
html[data-theme="dark"] .modal { color: var(--ink); background: #0a182a; }
html[data-theme="dark"] .modal-head { border-bottom-color: #223a55; background: rgba(10,24,42,.96); }
html[data-theme="dark"] .modal-close { color: #c3d4e6; background: #182d46; }
html[data-theme="dark"] .bottom-nav { border-top-color: #21364e; background: rgba(7,18,31,.96); }
html[data-theme="dark"] .nav-btn { color: #91a4ba; }
html[data-theme="dark"] .nav-btn.active { color: #57c9ff; }
html[data-theme="dark"] .btn.secondary { color: #75d5ff; background: #143653; }
html[data-theme="dark"] .btn.ghost { color: #a9b9ca; border-color: #2a405a; }
html[data-theme="dark"] .chip { color: #c9deef; background: #18324c; }
html[data-theme="dark"] .chip.success { color: #7ce8b7; background: #123a30; }
html[data-theme="dark"] .petty-balance-button { color: var(--ink); border-color: #294964; background: linear-gradient(145deg,#102a43,#0e2138); }
html[data-theme="dark"] .previous-close-summary,
html[data-theme="dark"] .day-story-card,
html[data-theme="dark"] .health-detail { border-color: #29405d; background: linear-gradient(135deg,#10263e,#0d1d31); }
html[data-theme="dark"] .day-story-card p { color: #c3d1e0; }
html[data-theme="dark"] .smart-badge { color: #83dcff; background: #123b58; }
html[data-theme="dark"] .level-progress { background: #213850; }
html[data-theme="dark"] .health-card .health-ring { background: conic-gradient(currentColor var(--score), #2b4057 0); }
html[data-theme="dark"] .message-template-option.selected,
html[data-theme="dark"] .client-pick-result.selected,
html[data-theme="dark"] .source-choice input:checked + span { color: var(--ink); border-color: #53aef8; background: #123452; }
html[data-theme="dark"] .onboarding { background: radial-gradient(circle at 50% -10%, rgba(65,196,255,.16), transparent 38%), linear-gradient(180deg,#0a192a,#071321); }
html[data-theme="dark"] .tutorial-card,
html[data-theme="dark"] .setup-card { color: var(--ink); border-color: var(--line); background: #102037; }
html[data-theme="dark"] .tutorial-source b,
html[data-theme="dark"] .tutorial-search b { color: var(--ink); }

@media (max-width: 430px) {
  .screen { padding-inline: 12px; }
  .hero-dashboard { min-height: 252px; grid-template-columns: minmax(0,1fr) 112px; padding: 19px 8px 18px 17px; }
  .merchant-hero { display: block !important; width: 108px; height: 166px; border-radius: 29px; }
  .hero-copy h1 { font-size: 27px; }
  .assistant-note { padding: 8px; }
  .assistant-note p { font-size: 10px; }
  .quick-action.premium { min-height: 126px; grid-template-columns: 43px minmax(0,1fr); padding: 14px 12px; }
  .quick-action.premium .quick-action-icon { width: 43px; height: 43px; border-radius: 14px; }
  .quick-action-arrow { display: none; }
  .quick-action.premium .quick-action-copy strong { font-size: 15px; }
  .smart-card { min-height: 137px; padding: 13px; }
  .smart-copy strong.money { font-size: 18px; }
}

@media (max-width: 365px) {
  .hero-dashboard { grid-template-columns: minmax(0,1fr) 94px; }
  .merchant-hero { width: 92px; height: 150px; }
  .hero-greeting { font-size: 10px; }
  .hero-copy h1 { font-size: 24px; }
  .hero-copy .hero-line { font-size: 11px; }
  .assistant-note { display: none; }
  .quick-grid { gap: 8px; }
  .quick-action.premium { min-height: 116px; grid-template-columns: 1fr; align-content: center; gap: 8px; }
  .quick-action.premium .quick-action-icon { width: 40px; height: 40px; }
  .quick-action.premium .quick-action-copy strong { font-size: 14px; }
  .quick-action.premium .quick-action-copy span { display: none; }
  .smart-grid { grid-template-columns: 1fr; }
  .message-template-grid { grid-template-columns: 1fr; }
}


/* CajaFácil Pro V10 — personaje circular nítido y acciones rápidas sobrias */
.hero-dashboard {
  min-height: 236px;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 12px;
  padding: 22px 16px 20px 20px;
}

/* Se restaura el retrato original: circular, limpio y sin recortes rectangulares. */
.merchant-hero {
  width: 124px;
  height: 124px;
  align-self: center;
  justify-self: center;
  overflow: hidden;
  border: 3px solid rgba(99, 209, 255, .92);
  border-radius: 50%;
  background: #0b2443;
  box-shadow:
    0 16px 34px rgba(0, 0, 0, .22),
    0 0 0 6px rgba(65, 196, 255, .10),
    inset 0 1px 0 rgba(255,255,255,.22);
}
.merchant-hero img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 24%;
  transform: scale(1.10);
  image-rendering: auto;
}

/* Botones: color como acento, no como fondo dominante. */
.quick-action.premium {
  --qa-accent: #1875d1;
  --qa-soft: #eaf4ff;
  --qa-border: #d5e5f5;
  --qa-shadow: rgba(21, 76, 133, .10);
  position: relative;
  min-height: 112px;
  padding: 16px 14px;
  display: grid;
  grid-template-columns: 46px minmax(0,1fr) 28px;
  align-items: center;
  gap: 11px;
  overflow: hidden;
  border: 1px solid var(--qa-border);
  border-radius: 20px;
  color: var(--ink);
  background: rgba(255,255,255,.98);
  box-shadow: 0 10px 24px var(--qa-shadow);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.quick-action.premium::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--qa-accent);
  opacity: .92;
}
.quick-action.premium::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(145deg, rgba(255,255,255,.45), transparent 42%);
}
.quick-action.premium .quick-decoration { display: none; }
.quick-action.premium .quick-action-icon {
  position: relative;
  z-index: 1;
  width: 46px;
  height: 46px;
  margin: 0;
  border: 0;
  border-radius: 15px;
  color: var(--qa-accent);
  background: var(--qa-soft);
  box-shadow: none;
}
.quick-action.premium .quick-action-icon svg { width: 23px; height: 23px; }
.quick-action.premium .quick-action-copy strong {
  margin: 0;
  color: var(--ink);
  font-size: clamp(15px, 3.8vw, 17px);
  line-height: 1.15;
  letter-spacing: -.018em;
}
.quick-action.premium .quick-action-copy span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}
.quick-action-arrow {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  color: var(--qa-accent);
  background: var(--qa-soft);
}
.quick-action.premium:hover {
  transform: translateY(-1px);
  border-color: var(--qa-accent);
  box-shadow: 0 14px 30px var(--qa-shadow);
}
.quick-action.premium:active { transform: scale(.985); }
.quick-action.premium:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--qa-accent) 28%, transparent);
  outline-offset: 2px;
}
.quick-action.premium.sale {
  --qa-accent: #167d61;
  --qa-soft: #e8f7f1;
  --qa-border: #cde9df;
  --qa-shadow: rgba(22,125,97,.12);
  background: rgba(255,255,255,.98);
}
.quick-action.premium.credit {
  --qa-accent: #9a680b;
  --qa-soft: #fff5df;
  --qa-border: #f0dfba;
  --qa-shadow: rgba(154,104,11,.11);
  background: rgba(255,255,255,.98);
}
.quick-action.premium.expense {
  --qa-accent: #bd4052;
  --qa-soft: #ffedf0;
  --qa-border: #f1d1d7;
  --qa-shadow: rgba(189,64,82,.11);
  background: rgba(255,255,255,.98);
}
.quick-action.premium.payment {
  --qa-accent: #5549b6;
  --qa-soft: #f0eeff;
  --qa-border: #dcd8f7;
  --qa-shadow: rgba(85,73,182,.11);
  background: rgba(255,255,255,.98);
}

html[data-theme="dark"] .quick-action.premium {
  color: var(--ink);
  border-color: #29435d;
  background: #10253c;
  box-shadow: 0 12px 28px rgba(0,0,0,.18);
}
html[data-theme="dark"] .quick-action.premium .quick-action-copy strong { color: #f4f8fc; }
html[data-theme="dark"] .quick-action.premium .quick-action-copy span { color: #a8bbcd; }
html[data-theme="dark"] .quick-action.premium.sale { --qa-soft:#173f35; --qa-border:#245648; }
html[data-theme="dark"] .quick-action.premium.credit { --qa-soft:#3b301b; --qa-border:#544326; }
html[data-theme="dark"] .quick-action.premium.expense { --qa-soft:#402530; --qa-border:#5a3340; }
html[data-theme="dark"] .quick-action.premium.payment { --qa-soft:#2c2a50; --qa-border:#45406d; }

@media (max-width: 430px) {
  .hero-dashboard {
    min-height: 230px;
    grid-template-columns: minmax(0,1fr) 108px;
    gap: 8px;
    padding: 19px 10px 18px 17px;
  }
  .merchant-hero {
    display: block !important;
    width: 104px;
    height: 104px;
    border-radius: 50%;
  }
  .home-quick-grid { gap: 10px; }
  .quick-action.premium {
    min-height: 98px;
    padding: 13px 11px;
    grid-template-columns: 41px minmax(0,1fr);
    gap: 9px;
  }
  .quick-action.premium .quick-action-icon {
    width: 41px;
    height: 41px;
    border-radius: 13px;
  }
  .quick-action.premium .quick-action-copy strong {
    font-size: 13.5px;
    white-space: nowrap;
  }
  .quick-action.premium .quick-action-copy span,
  .quick-action-arrow { display: none; }
}

@media (max-width: 365px) {
  .hero-dashboard { grid-template-columns: minmax(0,1fr) 92px; }
  .merchant-hero { width: 88px; height: 88px; }
  .quick-action.premium {
    min-height: 92px;
    padding: 12px 9px;
    grid-template-columns: 38px minmax(0,1fr);
    gap: 7px;
  }
  .quick-action.premium .quick-action-icon { width: 38px; height: 38px; }
  .quick-action.premium .quick-action-copy strong { font-size: 12.5px; }
}

/* CajaFácil Pro V10 — búsqueda global, prioridades, reportes y recibos */
.global-search-trigger { background: rgba(69,183,255,.12); border-color: rgba(97,200,255,.24); }

.priority-head { align-items: center; }
.priority-list { display: grid; gap: 9px; margin-bottom: 14px; }
.priority-card {
  width: 100%; min-height: 82px; padding: 12px;
  display: grid; grid-template-columns: 27px 42px minmax(0,1fr) auto; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: rgba(255,255,255,.98);
  text-align: left; box-shadow: 0 8px 24px rgba(11,36,79,.06); cursor: pointer; transition: .16s ease;
}
.priority-card:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(11,36,79,.1); }
.priority-number { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 9px; color: #607087; background: #eef3f8; font-size: 11px; font-weight: 950; }
.priority-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; color: var(--blue); background: #eaf3ff; }
.priority-copy { min-width: 0; display: grid; gap: 4px; }
.priority-copy strong { font-size: 13px; letter-spacing: -.012em; }
.priority-copy small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.priority-cta { display: inline-flex; align-items: center; gap: 3px; color: var(--blue); font-size: 10px; font-weight: 900; white-space: nowrap; }
.priority-card.danger .priority-icon { color: #b9384b; background: #ffeaee; }
.priority-card.warning .priority-icon { color: #926107; background: #fff2d8; }
.priority-card.success .priority-icon { color: #117651; background: #e6f7ef; }
.priority-card.info .priority-icon { color: #285ec4; background: #eaf1ff; }

.global-search-shell { min-height: 420px; }
.global-search-input { height: 54px; padding: 0 13px; display: grid; grid-template-columns: 24px minmax(0,1fr) auto; align-items: center; gap: 9px; border: 1px solid #bfd6ee; border-radius: 17px; background: #f7fbff; box-shadow: inset 0 1px 0 rgba(255,255,255,.9); }
.global-search-input > span { color: var(--blue); display: grid; place-items: center; }
.global-search-input input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 15px; font-weight: 700; }
.global-search-input kbd { padding: 4px 6px; border: 1px solid #d4e0ed; border-radius: 7px; color: var(--muted); background: white; font-size: 9px; font-family: inherit; }
.global-search-results { display: grid; gap: 13px; margin-top: 15px; }
.search-group { display: grid; gap: 6px; }
.search-group-title { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.search-group-title span { min-width: 22px; height: 22px; display: grid; place-items: center; border-radius: 99px; color: var(--blue); background: #eaf3ff; font-weight: 900; }
.global-result { width: 100%; min-height: 62px; padding: 9px 10px; display: grid; grid-template-columns: 40px minmax(0,1fr) 18px; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: white; text-align: left; cursor: pointer; }
.global-result-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; color: var(--blue); background: #edf5ff; }
.global-result > span:nth-child(2) { min-width: 0; }
.global-result strong, .global-result small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.global-result strong { font-size: 12px; }
.global-result small { margin-top: 4px; color: var(--muted); font-size: 9px; }

.client-account-hero { overflow: visible; }
.client-mini-stats { margin-top: 14px; display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
.client-mini-stats > div { padding: 9px 7px; border: 1px solid rgba(13,110,253,.12); border-radius: 13px; background: rgba(255,255,255,.58); }
.client-mini-stats span { display: block; color: var(--muted); font-size: 8px; font-weight: 850; text-transform: uppercase; }
.client-mini-stats strong { display: block; margin-top: 4px; font-size: 11px; }
.client-timeline { position: relative; display: grid; gap: 8px; }
.client-timeline::before { content:""; position:absolute; left:20px; top:22px; bottom:22px; width:2px; background:#dce7f2; }
.client-timeline-row { position:relative; z-index:1; width:100%; min-height:76px; padding:10px; display:grid; grid-template-columns:42px minmax(0,1fr) auto; align-items:center; gap:10px; border:1px solid var(--line); border-radius:17px; color:var(--ink); background:white; text-align:left; cursor:pointer; box-shadow:0 7px 20px rgba(11,36,79,.05); }
.client-timeline-dot { width:42px; height:42px; display:grid; place-items:center; border-radius:14px; color:#91620c; background:#fff2d8; }
.client-timeline-row.payment .client-timeline-dot { color:#117651; background:#e6f7ef; }
.client-timeline-copy { min-width:0; }
.client-timeline-copy strong,.client-timeline-copy small,.client-timeline-copy em { display:block; }
.client-timeline-copy strong { font-size:12px; }
.client-timeline-copy small { margin-top:3px; color:var(--muted); font-size:9px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.client-timeline-copy em { margin-top:5px; color:#53657a; font-size:9px; font-style:normal; font-weight:750; }
.client-timeline-amount { font-size:12px; font-weight:950; white-space:nowrap; }

.report-center { display:grid; gap:13px; }
.report-periods { margin-bottom:0; }
.report-kpi-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:9px; }
.report-kpi { min-height:112px; padding:14px; display:grid; align-content:start; gap:5px; border:1px solid var(--line); border-radius:18px; background:white; box-shadow:0 8px 22px rgba(11,36,79,.05); }
.report-kpi.primary { color:white; border-color:transparent; background:linear-gradient(145deg,#0a5dcb,#103d80); }
.report-kpi span { color:var(--muted); font-size:9px; font-weight:900; text-transform:uppercase; letter-spacing:.06em; }
.report-kpi.primary span,.report-kpi.primary small { color:#c8ddf4; }
.report-kpi strong { font-size:20px; letter-spacing:-.035em; }
.report-kpi small { color:var(--muted); font-size:9px; line-height:1.3; }
.report-kpi small.positive { color:#16845d; }
.report-kpi small.negative { color:#c63f52; }
.report-kpi.primary small.positive,.report-kpi.primary small.negative { color:#d6ebff; }
.report-chart-card { padding-bottom:13px; }
.sales-chart { height:180px; margin-top:16px; display:flex; align-items:flex-end; gap:3px; overflow:hidden; }
.sales-bar-column { flex:1 1 0; height:100%; min-width:3px; display:grid; grid-template-rows:minmax(0,1fr) 18px; align-items:end; }
.sales-bar { width:100%; min-height:4px; border-radius:4px 4px 1px 1px; background:linear-gradient(180deg,#34b6ff,#0d6efd); opacity:.86; }
.sales-bar-column small { padding-top:4px; color:var(--muted); font-size:7px; text-align:center; white-space:nowrap; transform:rotate(-35deg); transform-origin:center; }
.report-split { display:grid; grid-template-columns:1fr; gap:0; }
.report-breakdown { display:grid; gap:11px; margin-top:13px; }
.report-breakdown > div { display:grid; grid-template-columns:100px minmax(0,1fr) auto; align-items:center; gap:8px; }
.report-breakdown span { color:var(--muted); font-size:9px; font-weight:800; }
.report-breakdown strong { font-size:10px; }
.report-progress { height:7px; overflow:hidden; border-radius:99px; background:#eaf0f6; }
.report-progress i { display:block; height:100%; min-width:2px; border-radius:inherit; background:var(--blue); }
.report-progress i.green{background:var(--green)} .report-progress i.amber{background:var(--amber)} .report-progress i.violet{background:var(--violet)} .report-progress i.red{background:var(--red)}
.top-client-list { display:grid; gap:7px; margin-top:12px; }
.top-client-list button { width:100%; padding:9px; display:grid; grid-template-columns:26px minmax(0,1fr) auto; align-items:center; gap:8px; border:1px solid var(--line); border-radius:13px; color:var(--ink); background:#f9fbfd; text-align:left; cursor:pointer; }
.top-client-list button > span { width:24px; height:24px; display:grid; place-items:center; border-radius:8px; color:var(--blue); background:#eaf3ff; font-size:10px; font-weight:900; }
.top-client-list button strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; }
.top-client-list button b { font-size:10px; }
.insight-card { border-color:#cfe3f8; background:linear-gradient(145deg,#f3f9ff,#fff); }
.insight-list { display:grid; gap:8px; margin-top:12px; }
.insight-list > div { display:grid; grid-template-columns:25px 1fr; align-items:start; gap:8px; color:#40566e; font-size:11px; line-height:1.4; }
.insight-list svg { color:var(--blue); }

.receipt-success-mark { margin-bottom:13px; padding:12px; display:flex; align-items:center; gap:10px; border:1px solid #bfe7d5; border-radius:17px; color:#116a4a; background:#ebfaf3; }
.receipt-success-mark > svg { padding:6px; border-radius:12px; color:white; background:#16a56d; }
.receipt-success-mark strong,.receipt-success-mark span { display:block; }
.receipt-success-mark strong { font-size:13px; }
.receipt-success-mark span { margin-top:3px; font-size:10px; }
.receipt-paper { width:min(100%,320px); margin:0 auto 13px; padding:20px 16px; border:1px solid #dbe2e9; border-radius:8px; color:#17202b; background:#fff; box-shadow:0 16px 35px rgba(7,27,58,.12); font-family:"Courier New",monospace; }
.receipt-paper header { text-align:center; border-bottom:1px dashed #9aa7b5; padding-bottom:12px; }
.receipt-logo { width:40px; height:40px; margin:0 auto 7px; display:grid; place-items:center; border-radius:13px; color:white; background:linear-gradient(135deg,var(--blue),var(--teal)); }
.receipt-paper h2 { margin:0 0 4px; font-family:inherit; font-size:17px; }
.receipt-paper header p,.receipt-paper footer { font-size:9px; }
.receipt-meta { padding:10px 0; display:flex; justify-content:space-between; gap:8px; border-bottom:1px dashed #9aa7b5; font-size:8px; }
.receipt-lines { padding:7px 0; }
.receipt-lines > div { display:flex; justify-content:space-between; gap:12px; padding:5px 0; font-size:9px; }
.receipt-lines strong { text-align:right; }
.receipt-total { margin-top:5px; padding:11px 0; display:flex; justify-content:space-between; border-top:2px solid #1c2630; border-bottom:2px solid #1c2630; font-size:16px; font-weight:900; }
.receipt-note { margin:10px 0; font-size:9px; }
.receipt-paper footer { margin-top:13px; text-align:center; }
.receipt-actions { display:grid; grid-template-columns:1fr 1fr; gap:9px; }

/* Ajuste final de iconos de acciones rápidas: más grandes y visualmente centrados. */
.quick-action.premium .quick-action-icon { width:44px; height:44px; border-radius:14px; }
.quick-action.premium .quick-action-icon svg { width:29px; height:29px; stroke-width:1.9; }

html[data-theme="dark"] .priority-card,
html[data-theme="dark"] .global-result,
html[data-theme="dark"] .report-kpi,
html[data-theme="dark"] .client-timeline-row,
html[data-theme="dark"] .top-client-list button { color:var(--ink); border-color:var(--line); background:#102037; }
html[data-theme="dark"] .global-search-input { border-color:#294866; background:#0e2036; }
html[data-theme="dark"] .global-search-input input { color:var(--ink); }
html[data-theme="dark"] .global-search-input kbd { color:#aec0d2; border-color:#354c65; background:#172d45; }
html[data-theme="dark"] .priority-number { color:#b8c9da; background:#1b3148; }
html[data-theme="dark"] .client-timeline::before { background:#29435d; }
html[data-theme="dark"] .client-timeline-copy em { color:#9db0c4; }
html[data-theme="dark"] .report-kpi.primary { background:linear-gradient(145deg,#0b5ebf,#123b72); }
html[data-theme="dark"] .report-progress { background:#21384f; }
html[data-theme="dark"] .insight-card { border-color:#294866; background:linear-gradient(145deg,#10263e,#0d1d31); }
html[data-theme="dark"] .insight-list > div { color:#c2d0df; }
html[data-theme="dark"] .client-mini-stats > div { border-color:#294866; background:rgba(10,31,51,.55); }

@media (max-width:430px) {
  .top-actions { gap:6px; }
  .icon-button { width:38px; height:38px; border-radius:13px; }
  .brand-subtitle { max-width:135px; }
  .priority-card { min-height:78px; grid-template-columns:24px 39px minmax(0,1fr); gap:8px; padding:10px; }
  .priority-icon { width:39px; height:39px; border-radius:13px; }
  .priority-cta { grid-column:3; justify-self:start; margin-top:-1px; }
  .client-mini-stats { grid-template-columns:1fr 1fr; }
  .client-mini-stats > div:last-child { grid-column:1/-1; }
  .report-kpi strong { font-size:17px; }
  .sales-chart { height:150px; }
  .receipt-actions { grid-template-columns:1fr; }
  .quick-action.premium .quick-action-icon { width:42px; height:42px; }
  .quick-action.premium .quick-action-icon svg { width:27px; height:27px; }
}

@media (max-width:365px) {
  .brand-name { font-size:16px; }
  .brand-subtitle { max-width:92px; }
  .icon-button { width:36px; height:36px; }
  .priority-card { grid-template-columns:22px 36px minmax(0,1fr); }
  .priority-icon { width:36px; height:36px; }
  .priority-copy strong { font-size:11.5px; }
  .report-kpi-grid { grid-template-columns:1fr; }
}


/* CajaFácil Pro V11 — pulido final de acciones rápidas y compartir */
.quick-action.premium {
  grid-template-columns: 50px minmax(0,1fr) 30px;
  column-gap: 12px;
}
.quick-action.premium .quick-action-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 15px;
}
.quick-action.premium .quick-action-icon svg {
  width: 32px;
  height: 32px;
  display: block;
  stroke-width: 2;
}
.quick-action-arrow {
  align-self: center;
  justify-self: end;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  line-height: 0;
}
.quick-action-arrow svg { width: 17px; height: 17px; display: block; }

.share-sheet { display: grid; gap: 13px; }
.share-receipt-summary {
  padding: 13px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface-soft, #f5f9fd);
}
.share-receipt-summary > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 14px;
  color: var(--blue);
  background: #e8f3ff;
}
.share-receipt-summary strong,.share-receipt-summary small { display: block; }
.share-receipt-summary small { margin-top: 3px; color: var(--muted); }
.share-options { display: grid; gap: 9px; }
.share-option {
  width: 100%;
  min-height: 70px;
  padding: 11px 12px;
  display: grid;
  grid-template-columns: 43px minmax(0,1fr) 18px;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 17px;
  color: var(--ink);
  background: var(--card, #fff);
  text-align: left;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.share-option:hover { transform: translateY(-1px); border-color: var(--blue); box-shadow: 0 10px 24px rgba(12,64,118,.09); }
.share-option > span:first-child {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--blue);
  background: #eaf4ff;
}
.share-option strong,.share-option small { display: block; }
.share-option strong { font-size: 13px; }
.share-option small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.3; }
.share-option > svg { color: var(--muted); }
.share-option.whatsapp-option > span:first-child { color: #128c58; background: #e8f8ef; }
.share-option.primary-option { border-color: #c8ddf4; background: linear-gradient(145deg,#fff,#f1f7ff); }
.compact-notice { margin: 0; font-size: 10px; }
html[data-theme="dark"] .share-receipt-summary,
html[data-theme="dark"] .share-option { border-color: var(--line); background: #102037; }
html[data-theme="dark"] .share-receipt-summary > span,
html[data-theme="dark"] .share-option > span:first-child { background: #18334e; }
html[data-theme="dark"] .share-option.whatsapp-option > span:first-child { background: #173b31; }

@media (max-width: 430px) {
  .quick-action.premium {
    grid-template-columns: 46px minmax(0,1fr);
    gap: 10px;
  }
  .quick-action.premium .quick-action-icon { width: 46px; height: 46px; border-radius: 14px; }
  .quick-action.premium .quick-action-icon svg { width: 30px; height: 30px; }
}
@media (max-width: 365px) {
  .quick-action.premium { grid-template-columns: 43px minmax(0,1fr); }
  .quick-action.premium .quick-action-icon { width: 43px; height: 43px; }
  .quick-action.premium .quick-action-icon svg { width: 28px; height: 28px; }
}

/* CajaFácil 1.0 RC: estabilidad, privacidad y diagnóstico */
.offline-banner {
  position: sticky;
  top: 64px;
  z-index: 35;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 14px;
  color: #6b4100;
  background: #fff4cf;
  border-bottom: 1px solid #f0d27a;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}
html[data-theme="dark"] .offline-banner { color: #ffe6a1; background: #362b13; border-color: #69551f; }

.release-card {
  border: 1px solid color-mix(in srgb, var(--blue) 24%, var(--line));
  background: linear-gradient(145deg, color-mix(in srgb, var(--blue) 7%, var(--card)), var(--card));
}
.release-status {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px;
  margin-bottom: 12px;
  border-radius: 20px;
  border: 1px solid var(--line);
}
.release-status > span { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 16px; flex: 0 0 auto; }
.release-status.ok { background: color-mix(in srgb, #28a36a 9%, var(--card)); border-color: color-mix(in srgb, #28a36a 28%, var(--line)); }
.release-status.ok > span { color: #168250; background: color-mix(in srgb, #28a36a 14%, var(--card)); }
.release-status.warning { background: color-mix(in srgb, #e39a25 9%, var(--card)); border-color: color-mix(in srgb, #e39a25 30%, var(--line)); }
.release-status.warning > span { color: #b46c00; background: color-mix(in srgb, #e39a25 15%, var(--card)); }
.release-status h2 { margin: 2px 0 3px; }

.diagnostic-stats {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 9px;
  margin-bottom: 12px;
}
.diagnostic-stats > div {
  min-height: 92px;
  padding: 13px;
  display: grid;
  grid-template-columns: 30px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}
.diagnostic-stats span { grid-row: 1 / span 2; width: 30px; height: 30px; display: grid; place-items: center; color: var(--blue); }
.diagnostic-stats strong { font-size: 20px; line-height: 1; }
.diagnostic-stats small { color: var(--muted); font-size: 10px; font-weight: 700; }
.diagnostic-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 10px; }
.diagnostic-grid > div { padding: 11px; border-radius: 14px; background: var(--surface-soft,#f4f7fb); }
.diagnostic-grid span,.diagnostic-grid strong { display: block; }
.diagnostic-grid span { color: var(--muted); font-size: 10px; }
.diagnostic-grid strong { margin-top: 3px; font-size: 12px; }
.diagnostic-list { display: grid; gap: 8px; margin-top: 12px; }
.diagnostic-list > div { display: flex; gap: 8px; align-items: flex-start; padding: 10px; border-radius: 13px; background: color-mix(in srgb, #e39a25 9%, var(--card)); color: var(--ink); font-size: 11px; line-height: 1.4; }
.diagnostic-list svg { flex: 0 0 auto; color: #b46c00; }
.privacy-copy { color: var(--ink); }
.privacy-copy h3 { margin: 17px 0 5px; font-size: 14px; }
.privacy-copy p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
form[aria-busy="true"] { opacity: .82; }
button:disabled { cursor: wait; opacity: .72; }
html[data-theme="dark"] .diagnostic-grid > div { background: #102037; }

@media (min-width: 520px) {
  .diagnostic-stats { grid-template-columns: repeat(4,minmax(0,1fr)); }
}

/* CajaFácil 1.1 — international account foundation */
.auth-shell{min-height:100dvh;display:grid;place-items:center;padding:24px;background:linear-gradient(145deg,#07182d,#0d3b72 55%,#1f76d2)}
.auth-card{width:min(100%,440px);background:var(--surface,#fff);border-radius:28px;padding:24px;box-shadow:0 30px 70px rgba(0,0,0,.28)}
.auth-brand{display:flex;align-items:center;gap:12px;margin-bottom:22px}.auth-brand strong{font-size:1.45rem;color:var(--navy)}.auth-brand strong span{color:var(--blue)}.auth-brand small{display:block;color:var(--muted);margin-top:3px}
.auth-hero{text-align:center;padding:12px 8px 20px}.auth-hero h1{font-size:1.7rem;line-height:1.15;margin:12px 0 8px}.auth-hero p{color:var(--muted);line-height:1.5}.auth-icon{width:62px;height:62px;border-radius:20px;display:grid;place-items:center;margin:auto;background:#eaf3ff;color:var(--blue)}
.auth-language{display:flex;justify-content:center;gap:8px;margin:18px 0}.auth-language button{border:1px solid var(--line);background:var(--surface);border-radius:999px;padding:8px 14px;font-weight:800;color:var(--text)}
.account-status-card{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;padding:14px;border:1px solid var(--line);border-radius:18px;background:var(--surface-soft)}.account-status-card span{display:block;color:var(--muted);font-size:.84rem;margin-top:3px}.account-avatar{width:46px;height:46px;border-radius:15px;display:grid;place-items:center;background:#eaf3ff;color:var(--blue)}
.check-row{display:flex;align-items:center;gap:10px;padding:12px;border:1px solid var(--line);border-radius:14px}.check-row input{width:20px;height:20px}
.client-actions-polished .quick-action-icon{width:52px;height:52px;border-radius:16px;display:grid;place-items:center;margin:0 auto 8px}.client-actions-polished .quick-action-icon svg{width:32px;height:32px;stroke-width:2}.client-actions-polished .quick-action{text-align:center;align-items:center;padding:18px 12px}.client-actions-polished .quick-action strong,.client-actions-polished .quick-action span{width:100%;text-align:center}
@media(max-width:390px){.auth-card{padding:19px;border-radius:23px}.client-actions-polished .quick-action-icon{width:48px;height:48px}.client-actions-polished .quick-action-icon svg{width:29px;height:29px}}

/* CajaFácil 1.4 — autenticación, nube y producción */
.auth-text-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--primary, #1677ff);
  font: inherit;
  font-weight: 750;
  padding: 8px 4px;
  text-align: center;
  cursor: pointer;
}
.auth-text-link:hover,
.auth-text-link:focus-visible { text-decoration: underline; }
.cloud-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid var(--line, #dbe5ef);
  border-radius: 14px;
  background: var(--surface-soft, #f5f8fb);
  font-size: .86rem;
}
.cloud-meta span { color: var(--muted, #607086); }
.cloud-meta strong { text-align: right; }
[data-theme="dark"] .cloud-meta,
body.dark .cloud-meta { background: rgba(255,255,255,.04); }

/* CajaFácil 1.4 — cuenta, privacidad y sincronización protegida */
.cloud-protection-card{display:flex;align-items:center;gap:12px;padding:14px;border:1px solid var(--border);border-radius:18px;background:linear-gradient(135deg,var(--surface),var(--surface-soft));}
.cloud-protection-card .avatar{display:grid;place-items:center;width:42px;height:42px;flex:0 0 42px;border-radius:14px;background:rgba(26,137,255,.12);color:var(--primary);}
.cloud-protection-card>div{display:flex;flex:1;min-width:0;flex-direction:column;gap:3px;}
.cloud-protection-card small{color:var(--muted);line-height:1.35;}
.chip.amber{background:rgba(241,160,35,.14);color:#a95e00;border-color:rgba(241,160,35,.28);}
.sync-compare{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.sync-copy-card{display:flex;min-width:0;flex-direction:column;gap:6px;padding:16px;border:1px solid var(--border);border-radius:18px;background:var(--surface-soft);}
.sync-copy-card>span{color:var(--primary);}
.sync-copy-card small{color:var(--muted);overflow-wrap:anywhere;}
.privacy-actions{margin:14px 0 18px;}
.privacy-copy h3{margin:20px 0 6px;}
.privacy-copy p{line-height:1.58;}
@media(max-width:430px){.sync-compare{grid-template-columns:1fr}.cloud-protection-card{align-items:flex-start}.cloud-protection-card .chip{margin-left:auto}}


/* ===== CajaFácil 1.5 — Resumen premium de cierres ===== */
.history-main-tabs button { min-width: 0; line-height: 1.15; }
.closure-summary-view { display: grid; gap: 12px; }
.closure-date-toolbar {
  display: grid;
  grid-template-columns: 44px minmax(0,1fr) 44px;
  align-items: stretch;
  gap: 8px;
}
.closure-date-nav {
  min-width: 44px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--blue);
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 7px 18px rgba(11,36,79,.05);
}
.closure-date-nav.previous svg { transform: rotate(180deg); }
.closure-date-nav[disabled] { opacity: .35; }
.closure-date-picker {
  min-width: 0;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(11,36,79,.05);
}
.closure-date-picker > span {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.closure-date-picker input {
  width: 100%;
  min-height: 29px;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 14px;
  font-weight: 900;
}
.closure-date-shortcuts {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.closure-selected-date {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.closure-day-hero {
  min-height: 132px;
  margin-bottom: 0;
  padding: 17px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.closure-day-hero h1 { margin: 3px 0 4px; font-size: clamp(29px,8vw,40px); }
.closure-day-hero p { color: #bdd0e7; font-size: 11px; }
.closure-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 9px;
}
.closure-kpi {
  min-width: 0;
  min-height: 128px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(11,36,79,.055);
}
.closure-kpi-icon {
  width: 34px;
  height: 34px;
  margin-bottom: 9px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--blue);
  background: #eaf3ff;
}
.closure-kpi.sale .closure-kpi-icon { color:#167e60; background:#e4f7f0; }
.closure-kpi.collected .closure-kpi-icon { color:#176bc7; background:#e7f2ff; }
.closure-kpi.expense .closure-kpi-icon { color:#c43f53; background:#ffeaee; }
.closure-kpi.movement .closure-kpi-icon { color:#6b57c8; background:#eeeafd; }
.closure-kpi small,
.closure-kpi strong,
.closure-kpi em { display: block; }
.closure-kpi small { min-height: 27px; color:var(--muted); font-size:10px; font-weight:850; line-height:1.25; }
.closure-kpi strong { margin-top:4px; overflow-wrap:anywhere; font-size:clamp(17px,5vw,22px); line-height:1.08; letter-spacing:-.03em; }
.closure-kpi em { margin-top:5px; color:#8a96a8; font-size:9px; font-style:normal; line-height:1.25; }
.closure-box { margin-bottom:0; }
.closure-box-heading h2 { margin-bottom:0; font-size:19px; }
.closure-cash-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  margin-top:13px;
}
.closure-cash-grid > div {
  min-width:0;
  min-height:78px;
  padding:10px;
  border:1px solid #e2e9f2;
  border-radius:15px;
  background:#f7f9fc;
}
.closure-cash-grid span,
.closure-cash-grid strong { display:block; }
.closure-cash-grid span { min-height:24px; color:var(--muted); font-size:9px; font-weight:850; line-height:1.25; }
.closure-cash-grid strong { margin-top:5px; overflow-wrap:anywhere; font-size:14px; line-height:1.2; }
.closure-cash-grid .ok { background:#edf9f4; border-color:#d5efe4; }
.closure-cash-grid .warning { background:#fff8e9; border-color:#f1dfb4; }
.closure-cash-grid .negative { background:#fff0f2; border-color:#f3d4d9; }
.closure-list-head { margin-bottom:0; }
.closure-session-list { display:grid; gap:9px; }
.closure-session-card {
  width:100%;
  padding:12px;
  display:grid;
  grid-template-columns:38px minmax(0,1fr) 28px;
  align-items:center;
  gap:10px;
  border:1px solid var(--line);
  border-radius:19px;
  color:var(--ink);
  background:#fff;
  text-align:left;
  box-shadow:0 8px 22px rgba(11,36,79,.05);
}
.closure-session-card.closed { border-color:#d5e9df; }
.closure-session-index {
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:13px;
  color:#fff;
  background:linear-gradient(145deg,var(--navy-2),var(--blue));
  font-size:11px;
  font-weight:950;
}
.closure-session-main { min-width:0; }
.closure-session-top { display:flex; align-items:center; justify-content:space-between; gap:7px; }
.closure-session-top strong { font-size:13px; }
.closure-session-top em {
  padding:4px 7px;
  border-radius:99px;
  font-size:8px;
  font-style:normal;
  font-weight:900;
}
.closure-session-top em.ok { color:#0a7248; background:#e4f8ee; }
.closure-session-top em.warning { color:#8b5d04; background:#fff3d6; }
.closure-session-top em.blue { color:#0955bc; background:#e3f0ff; }
.closure-session-main > small { display:block; margin-top:3px; color:var(--muted); font-size:9px; }
.closure-session-values {
  margin-top:9px;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;
}
.closure-session-values > span {
  min-width:0;
  padding:7px 8px;
  border-radius:11px;
  background:#f5f8fc;
}
.closure-session-values small,
.closure-session-values b { display:block; }
.closure-session-values small { color:var(--muted); font-size:8px; }
.closure-session-values b { margin-top:2px; overflow-wrap:anywhere; font-size:10px; }
.closure-session-foot { margin-top:7px !important; }
.closure-session-arrow {
  width:28px;
  height:28px;
  display:grid;
  place-items:center;
  border-radius:10px;
  color:var(--blue);
  background:#edf5ff;
}

@media (min-width: 481px) {
  .closure-kpi-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .closure-cash-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .closure-session-values { grid-template-columns:repeat(4,minmax(0,1fr)); }
}

@media (max-width: 390px) {
  .history-main-tabs button { padding-inline:5px; font-size:10px; }
  .closure-day-hero { flex-direction:column; }
  .closure-day-hero .chip { align-self:flex-start; }
  .closure-kpi-grid { grid-template-columns:1fr 1fr !important; }
  .closure-kpi { min-height:122px; padding:11px; }
  .closure-cash-grid { grid-template-columns:1fr 1fr; }
  .closure-session-card { grid-template-columns:34px minmax(0,1fr) 26px; padding:10px; gap:8px; }
  .closure-session-index { width:34px; height:34px; }
}


/* CajaFácil 1.5 RC3 — cuenta obligatoria + pulido móvil */
:root { --safe-top: env(safe-area-inset-top, 0px); }
body { min-height: 100dvh; }
.app-shell {
  min-height: 100dvh;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  overflow: visible;
}
.topbar { padding-top: calc(11px + var(--safe-top)); }
.screen { flex: 1 0 auto; padding-bottom: 22px; }
.bottom-nav {
  position: sticky;
  left: auto;
  bottom: 0;
  width: 100%;
  margin-top: auto;
  transform: none;
  padding-bottom: calc(7px + var(--safe-bottom));
  flex: 0 0 auto;
}
html.keyboard-open .bottom-nav { display: none; }
html.keyboard-open .screen { padding-bottom: 18px; }

.onboarding {
  width: min(100%, 620px);
  min-height: 100dvh;
  padding: 0 14px calc(16px + var(--safe-bottom));
}
.onboarding-header {
  margin: 0 -14px;
  padding: calc(10px + var(--safe-top)) 14px 10px;
  min-height: calc(56px + var(--safe-top));
}
.onboarding-stage {
  flex: 0 1 auto;
  width: 100%;
  min-height: 0;
  padding: 14px 0 10px;
  align-content: start;
  place-items: stretch;
}
.brand-tutorial { display: block; }
.tutorial-card { padding: 17px; border-radius: 22px; }
.tutorial-card h1 { font-size: clamp(23px,6.4vw,29px); line-height: 1.07; }
.tutorial-description { margin: 11px 0; }
.tutorial-list { gap: 7px; }
.tutorial-preview { min-height: 72px; margin-top: 12px; padding: 11px; }
.onboarding-footer { margin-top: auto; gap: 8px; }
.onboarding-actions .btn { min-height: 48px; }
.setup-stage { padding-top: 14px; }
.setup-card { padding: 18px; }

.auth-shell {
  min-height: 100dvh;
  place-items: start center;
  padding: calc(18px + var(--safe-top)) 14px calc(18px + var(--safe-bottom));
  overflow-y: auto;
}
.auth-card-polished {
  width: min(100%, 430px);
  margin: auto 0;
  padding: 20px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 24px;
}
.auth-brand-centered { margin-bottom: 14px; }
.auth-hero.compact { padding: 4px 2px 14px; text-align: left; }
.auth-hero.compact .auth-icon { width: 54px; height: 54px; margin: 0 0 12px; border-radius: 17px; }
.auth-hero.compact h1 { margin: 3px 0 7px; font-size: clamp(26px,7vw,32px); }
.auth-hero.compact p { font-size: 13px; }
.auth-security-note {
  margin-bottom: 14px;
  padding: 10px 12px;
  display: flex;
  gap: 9px;
  align-items: center;
  border: 1px solid #cfe3f5;
  border-radius: 14px;
  color: #244866;
  background: #f1f8fe;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
}
.auth-security-note svg { flex: 0 0 auto; color: var(--blue); }
.auth-mode-switch {
  margin-bottom: 14px;
  padding: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  border-radius: 14px;
  background: #eef3f8;
}
.auth-mode-switch button {
  min-height: 42px;
  border: 0;
  border-radius: 11px;
  color: #64758a;
  background: transparent;
  font-weight: 850;
}
.auth-mode-switch button.active { color: #0b4f9e; background: white; box-shadow: 0 5px 14px rgba(11,36,79,.08); }
.auth-submit { min-height: 50px; }
.auth-legal { margin: -2px 2px 0; text-align: center; line-height: 1.45; }
.auth-language { margin: 12px 0 0; }

.field input[type="number"]::placeholder { color: #9badbf; opacity: 1; }
.amount-input::placeholder { color: #b4c0cd; opacity: .72; }

@media (max-width: 430px) {
  .quick-action { min-height: 92px; padding: 12px; }
  .quick-action strong { margin-top: 8px; font-size: 13px; }
  .metric-card { min-height: 96px; padding: 13px; }
  .auth-card-polished { padding: 18px; border-radius: 22px; }
  .onboarding-wordmark small { display: none; }
}

@media (min-width: 700px) {
  .app-shell { min-height: calc(100dvh - 44px); overflow: hidden; }
  .bottom-nav { bottom: 0; border-radius: 0 0 30px 30px; }
  .onboarding { min-height: calc(100dvh - 44px); }
}

.cloud-managed-card {
  padding: 14px;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  border: 1px solid #cfe4f4;
  border-radius: 18px;
  background: linear-gradient(135deg,#f1f8fe,#f8fcff);
}
.cloud-managed-card > span { width: 40px; height: 40px; flex: 0 0 40px; display:grid; place-items:center; border-radius:13px; color:var(--blue); background:#e4f2ff; }
.cloud-managed-card strong,.cloud-managed-card small { display:block; }
.cloud-managed-card small { margin-top:4px; color:var(--muted); line-height:1.4; }
html[data-theme="dark"] .cloud-managed-card { border-color:#294866; background:linear-gradient(135deg,#10263e,#0d1d31); }

/* CajaFácil 1.5 RC4 — tutorial alineado con login + navegación estable */
.onboarding-auth-theme {
  width: 100%;
  max-width: none;
  min-height: 100dvh;
  padding: calc(18px + var(--safe-top)) 14px calc(18px + var(--safe-bottom));
  display: grid;
  place-items: center;
  background: linear-gradient(145deg,#07182d,#0d3b72 55%,#1f76d2);
}
.onboarding-auth-theme .onboarding-frame {
  width: min(100%, 440px);
  padding: 20px;
  display: grid;
  gap: 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 30px 70px rgba(0,0,0,.28);
}
.onboarding-auth-theme .onboarding-header {
  min-height: 0;
  margin: 0;
  padding: 0;
  color: var(--navy);
  background: transparent;
  border-radius: 0;
}
.onboarding-auth-theme .onboarding-brand { gap: 11px; }
.onboarding-auth-theme .onboarding-wordmark strong { color: var(--navy); font-size: 21px; }
.onboarding-auth-theme .onboarding-wordmark strong span { color: var(--blue); }
.onboarding-auth-theme .onboarding-wordmark small {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0;
  text-transform: none;
}
.onboarding-auth-theme .onboarding-count {
  color: #49718f;
  border-color: #d6e5f2;
  background: #f4f9fd;
}
.onboarding-auth-theme .onboarding-stage {
  min-height: 0;
  padding: 0;
}
.onboarding-auth-theme .tutorial-card {
  width: 100%;
  margin: 0;
  padding: 18px;
  border: 1px solid #d9e7f4;
  border-radius: 22px;
  background: linear-gradient(180deg,#fbfdff,#f5faff);
  box-shadow: none;
  text-align: left;
}
.onboarding-auth-theme .tutorial-card::after { display: none; }
.onboarding-auth-theme .tutorial-card-top { align-items: center; }
.onboarding-auth-theme .tutorial-visual {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: #eaf3ff;
  color: var(--blue);
  box-shadow: none;
}
.onboarding-auth-theme .tutorial-visual span {
  width: 42px;
  height: 42px;
  color: var(--blue);
  background: transparent;
}
.onboarding-auth-theme .tutorial-step-number { color: #d8e3ee; font-size: 25px; }
.onboarding-auth-theme .tutorial-copy { max-width: none; margin: 14px 0 0; }
.onboarding-auth-theme .tutorial-copy .eyebrow { text-align: left; }
.onboarding-auth-theme .tutorial-card h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(24px,6vw,30px);
  line-height: 1.08;
}
.onboarding-auth-theme .tutorial-description {
  max-width: none;
  margin: 10px 0 14px;
  text-align: left;
  line-height: 1.45;
}
.onboarding-auth-theme .tutorial-list { max-width: none; margin: 0; }
.onboarding-auth-theme .tutorial-preview {
  max-width: none;
  margin: 14px 0 0;
  border-color: #d9e7f4;
  background: #fff;
}
.onboarding-auth-theme .onboarding-footer { width: 100%; margin: 0; }
.onboarding-auth-theme .dots { margin: 0; }
.onboarding-auth-theme .dot { background: #d5e1ed; }
.onboarding-auth-theme .dot.active { background: var(--blue); }
.onboarding-auth-theme .btn.primary { background: #1677ef; }
.onboarding-auth-theme .btn.ghost { color: #51677e; border-color: #d7e2ee; background: #f7fafd; }
.onboarding-auth-theme .setup-card {
  width: 100%;
  margin: 0;
  padding: 4px 0 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}
.onboarding-auth-theme .setup-icon { color: var(--blue); background: #eaf3ff; box-shadow: none; }
.onboarding-auth-theme .setup-back { width: 100%; }

/* El estado de pestaña es local: la sincronización nunca debe mover al usuario de pantalla. */
html.syncing .screen { opacity: 1; }

@media (max-width: 390px) {
  .onboarding-auth-theme { padding-inline: 12px; }
  .onboarding-auth-theme .onboarding-frame { padding: 17px; border-radius: 23px; gap: 12px; }
  .onboarding-auth-theme .tutorial-card { padding: 16px; }
  .onboarding-auth-theme .onboarding-wordmark small { display: block; }
  .onboarding-auth-theme .tutorial-card h1 { font-size: 23px; }
}

@media (min-width: 700px) {
  .onboarding-auth-theme { min-height: 100dvh; }
}


/* RC6 · capital del negocio separado de caja */
.auth-install-link{
  width:100%; margin-top:14px; min-height:48px; border:1px solid rgba(38,133,247,.24);
  border-radius:16px; background:rgba(232,243,255,.72); color:#1269c9; font:inherit;
  font-weight:800; display:flex; align-items:center; justify-content:center; gap:9px; padding:11px 16px;
  cursor:pointer;
}
.auth-install-link:active{transform:translateY(1px)}
.install-help{text-align:center; padding:8px 2px 4px}
.install-help h3{margin:12px 0 8px; font-size:clamp(1.25rem,5vw,1.6rem); color:var(--text,#0b1d34)}
.install-help p{color:var(--muted,#64748b); line-height:1.55; margin:0 auto 16px; max-width:34rem}
.install-hero-icon{width:64px;height:64px;margin:0 auto;border-radius:20px;display:grid;place-items:center;background:linear-gradient(145deg,#eaf5ff,#dcecff);color:#1782f4;border:1px solid rgba(38,133,247,.18)}
.install-help .notice{text-align:left;margin-top:14px}
@media (max-width:520px){
  .auth-install-link{border-radius:14px; font-size:.96rem}
  .install-help{padding-bottom:max(4px,env(safe-area-inset-bottom))}
}

/* ===== CajaFácil 1.5 RC8 — monetización protegida ===== */
.cf-ad-slot {
  position: relative;
  width: 100%;
  min-height: 72px;
  margin: 14px 0 4px;
  padding: 18px 8px 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}
.cf-ad-slot[hidden] { display: none !important; }
.cf-ad-label {
  position: absolute;
  top: 5px;
  left: 9px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.cf-ad-slot .adsbygoogle { width: 100%; min-height: 50px; }
.ad-plan-card {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 11px;
  margin: 12px 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
}
.ad-plan-card .ad-plan-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  color: var(--blue);
  background: rgba(26,137,255,.12);
}
.ad-plan-card strong { display: block; font-size: 12px; }
.ad-plan-card div > span { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.35; }
.ad-plan-card.pro .ad-plan-icon { color: var(--green); background: rgba(39,181,107,.12); }
html[data-theme="dark"] .cf-ad-slot,
html[data-theme="dark"] .ad-plan-card { background: rgba(255,255,255,.035); }
@media (max-width: 390px) {
  .ad-plan-card { grid-template-columns: auto minmax(0,1fr); }
  .ad-plan-card > .chip { grid-column: 2; justify-self: start; }
}

.cf-ad-test { min-height: 104px; }
.cf-ad-test-body { min-height:72px; display:grid; place-items:center; align-content:center; gap:2px; border:1px dashed var(--line); border-radius:12px; color:var(--muted); text-align:center; background:rgba(26,137,255,.035); }
.cf-ad-test-body strong { color:var(--text); font-size:12px; }
.cf-ad-test-body span { font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.08em; }
.cf-ad-test-body small { font-size:9px; }

/* CajaFácil 1.6 RC1 · Modo avanzado + inventario */
.top-settings-trigger { color:#fff; background:rgba(255,255,255,.10); border-color:rgba(255,255,255,.14); }
.inventory-screen { padding-bottom:16px; }
.inventory-hero { position:relative; overflow:hidden; display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:14px; padding:20px; border-radius:25px; color:#fff; background:linear-gradient(140deg,#071b3a 0%,#0b376a 58%,#0c7ba4 125%); box-shadow:0 18px 42px rgba(7,27,58,.22); }
.inventory-hero::after { content:""; position:absolute; width:180px; height:180px; right:-58px; top:-80px; border-radius:50%; background:radial-gradient(circle,rgba(87,213,235,.35),rgba(87,213,235,0) 68%); pointer-events:none; }
.inventory-hero h1 { margin:3px 0 4px; font-size:31px; letter-spacing:-.04em; }
.inventory-hero p { margin:0; max-width:310px; color:#cfe8f5; font-size:13px; line-height:1.45; }
.inventory-hero .eyebrow { color:#79dded; }
.scanner-square { position:relative; z-index:1; flex:0 0 auto; width:74px; height:74px; display:grid; place-items:center; align-content:center; gap:3px; border:1px solid rgba(255,255,255,.24); border-radius:22px; color:#fff; background:rgba(255,255,255,.12); box-shadow:inset 0 1px 0 rgba(255,255,255,.18); backdrop-filter:blur(12px); }
.scanner-square small { font-size:10px; font-weight:800; }
.scanner-square.compact { width:48px; height:48px; border-radius:15px; color:var(--navy); border-color:var(--line); background:var(--surface); }
.scanner-square.sale { width:66px; height:62px; border-radius:18px; color:#086a82; border-color:#b7e8ef; background:#eafafd; box-shadow:none; }
.inventory-tabs { display:flex; gap:5px; overflow-x:auto; scrollbar-width:none; margin:0 0 14px; padding:4px; border:1px solid var(--line); border-radius:17px; background:var(--surface); }
.inventory-tabs::-webkit-scrollbar { display:none; }
.inventory-tabs button { flex:1 0 auto; min-height:39px; padding:0 13px; border:0; border-radius:13px; color:var(--muted); background:transparent; font-weight:850; font-size:12px; }
.inventory-tabs button.active { color:#fff; background:linear-gradient(135deg,#123a6d,#15568f); box-shadow:0 7px 18px rgba(18,58,109,.2); }
.inventory-summary-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-bottom:12px; }
.inventory-kpi { min-height:126px; display:flex; flex-direction:column; justify-content:flex-end; padding:15px; border:1px solid var(--line); border-radius:20px; background:linear-gradient(160deg,var(--surface),#f7fbff); box-shadow:0 7px 20px rgba(20,47,78,.06); }
.inventory-kpi > span { width:38px; height:38px; display:grid; place-items:center; margin-bottom:auto; border-radius:13px; color:#15568f; background:#e9f4ff; }
.inventory-kpi small { color:var(--muted); font-size:11px; font-weight:800; }
.inventory-kpi strong { margin-top:3px; color:var(--ink); font-size:23px; letter-spacing:-.035em; }
.inventory-kpi em { margin-top:2px; color:var(--muted); font-style:normal; font-size:10px; }
.inventory-kpi.primary { color:#fff; border-color:transparent; background:linear-gradient(145deg,#0b2e63,#136ea0); }
.inventory-kpi.primary > span { color:#fff; background:rgba(255,255,255,.13); }
.inventory-kpi.primary small,.inventory-kpi.primary strong,.inventory-kpi.primary em { color:#fff; }
.inventory-kpi.primary em { opacity:.72; }
.inventory-kpi.warning { border-color:#f1d18a; background:linear-gradient(150deg,#fffaf0,#fff4d9); }
.inventory-kpi.warning > span { color:#9a6200; background:#ffefbf; }
.inventory-action-row { display:grid; grid-template-columns:1.2fr 1fr; gap:9px; margin-bottom:13px; }
.inventory-duo { display:grid; gap:12px; }
.inventory-panel { padding:15px; }
.section-head.compact { margin-bottom:10px; }
.section-head.compact h2 { font-size:16px; }
.section-head.compact p { font-size:11px; }
.inventory-mini-list { display:grid; gap:7px; }
.inventory-mini-list button { display:flex; align-items:center; gap:10px; width:100%; padding:7px; border:0; border-radius:14px; text-align:left; background:transparent; }
.inventory-mini-list button:active { background:var(--surface-soft); }
.inventory-mini-list button > span:nth-child(2) { flex:1; min-width:0; }
.inventory-mini-list strong,.inventory-mini-list small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.inventory-mini-list small { margin-top:2px; color:var(--muted); font-size:10px; }
.mini-product-thumb,.sale-result-thumb,.sale-cart-thumb,.stock-adjust-thumb { object-fit:cover; border-radius:12px; background:#eef4f8; }
.mini-product-thumb { width:42px; height:42px; flex:0 0 42px; }
.stock-pill { display:inline-flex; align-items:center; justify-content:center; padding:4px 7px; border-radius:999px; font-style:normal; font-size:9px; font-weight:900; white-space:nowrap; }
.stock-pill.green { color:#0f6a46; background:#e3f6ec; }
.stock-pill.amber { color:#916000; background:#fff0c9; }
.stock-pill.danger { color:#a12b32; background:#fde9eb; }
.inventory-empty-mini { padding:15px 8px; display:flex; align-items:center; gap:8px; color:var(--muted); font-size:11px; }
.inventory-move-list { display:grid; gap:8px; }
.inventory-move-list.compact { gap:4px; }
.inventory-move-item { min-height:60px; display:flex; align-items:center; gap:10px; padding:10px 12px; border:1px solid var(--line); border-radius:16px; background:var(--surface); }
.inventory-move-list.compact .inventory-move-item { min-height:52px; padding:7px 4px; border:0; border-bottom:1px solid var(--line); border-radius:0; }
.inventory-move-item > span:nth-child(2) { flex:1; min-width:0; }
.inventory-move-item strong,.inventory-move-item small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.inventory-move-item small { margin-top:2px; color:var(--muted); font-size:10px; }
.inventory-move-item > em { font-size:14px; font-weight:950; font-style:normal; }
.move-icon { width:36px; height:36px; display:grid; place-items:center; flex:0 0 36px; border-radius:12px; }
.move-icon.in { color:#0d7b53; background:#e7f8ef; }
.move-icon.out { color:#b43b45; background:#fcecef; }
.inventory-products-head { display:grid; grid-template-columns:minmax(0,1fr) 48px auto; gap:7px; align-items:center; margin-bottom:12px; }
.inventory-search,.sale-product-search { min-height:48px; display:flex; align-items:center; gap:8px; padding:0 12px; border:1px solid var(--line); border-radius:15px; background:var(--surface); }
.inventory-search input,.sale-product-search input { min-width:0; flex:1; border:0; outline:0; color:var(--ink); background:transparent; font-size:13px; }
.inventory-search span,.sale-product-search span { color:var(--muted); }
.inventory-product-list { display:grid; gap:10px; }
.inventory-product-card { overflow:hidden; border:1px solid var(--line); border-radius:20px; background:var(--surface); box-shadow:0 7px 20px rgba(20,47,78,.05); }
.product-card-main { width:100%; display:grid; grid-template-columns:64px minmax(0,1fr) auto; gap:11px; align-items:center; padding:12px; border:0; text-align:left; background:transparent; }
.product-thumb { width:64px; height:64px; object-fit:cover; border-radius:16px; background:#eef4f8; }
.product-thumb-placeholder { display:grid; place-items:center; color:#5f7c99; }
.product-card-copy { min-width:0; }
.product-card-copy > strong,.product-card-copy > small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.product-card-copy > strong { color:var(--ink); font-size:14px; }
.product-card-copy > small { margin-top:3px; color:var(--muted); font-size:10px; }
.product-price-row { display:flex; align-items:center; gap:7px; margin-top:7px; }
.product-price-row b { color:#0a6592; font-size:15px; }
.product-price-row em { color:var(--muted); font-style:normal; font-size:9px; }
.product-stock { display:flex; flex-direction:column; align-items:flex-end; }
.product-stock > b { color:var(--ink); font-size:21px; line-height:1; }
.product-stock > small { margin:2px 0 6px; color:var(--muted); font-size:9px; }
.product-card-actions { display:grid; grid-template-columns:1fr 1fr; border-top:1px solid var(--line); }
.product-card-actions button { min-height:42px; display:flex; align-items:center; justify-content:center; gap:6px; border:0; color:#45627f; background:transparent; font-size:10px; font-weight:850; }
.product-card-actions button + button { border-left:1px solid var(--line); }
.inventory-empty-state { padding:34px 20px; text-align:center; border:1px dashed #b8c9d9; border-radius:22px; color:var(--muted); background:linear-gradient(180deg,#f8fbfe,#f3f7fb); }
.inventory-empty-state svg { color:#4d8eb7; }
.inventory-empty-state h2 { margin:10px 0 6px; color:var(--ink); font-size:18px; }
.inventory-empty-state p { margin:0 auto 14px; max-width:330px; font-size:12px; line-height:1.5; }
.inventory-empty-state.compact { padding:22px 16px; }
.inventory-category-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.inventory-category-card { min-height:122px; display:flex; flex-direction:column; padding:14px; border:1px solid var(--line); border-radius:18px; background:var(--surface); }
.inventory-category-card > span { width:34px; height:34px; display:grid; place-items:center; margin-bottom:auto; border-radius:11px; color:#15568f; background:#eaf4ff; }
.inventory-category-card strong { margin-top:9px; font-size:13px; }
.inventory-category-card small { margin-top:3px; color:var(--muted); font-size:9px; }
.inventory-category-card b { margin-top:7px; color:#0b658e; font-size:15px; }
.inventory-locked { min-height:calc(100vh - 190px); display:grid; place-items:center; }
.inventory-lock-hero { width:100%; padding:28px 22px; text-align:center; border:1px solid #d6e4ef; border-radius:27px; background:radial-gradient(circle at 50% 0,rgba(73,197,223,.22),transparent 40%),linear-gradient(180deg,#fff,#f3f8fc); box-shadow:0 16px 38px rgba(25,64,95,.09); }
.inventory-lock-icon { width:72px; height:72px; display:grid; place-items:center; margin:0 auto 14px; border-radius:23px; color:#fff; background:linear-gradient(145deg,#0b2e63,#1692b2); box-shadow:0 14px 26px rgba(13,91,129,.22); }
.inventory-lock-hero h1 { margin:7px auto 8px; max-width:360px; color:var(--navy); font-size:27px; line-height:1.08; letter-spacing:-.04em; }
.inventory-lock-hero p { max-width:390px; margin:0 auto 18px; color:var(--muted); font-size:12px; line-height:1.58; }
.inventory-lock-hero .btn { margin-top:7px; }
.advanced-mode-card { display:grid; grid-template-columns:48px minmax(0,1fr) auto; gap:11px; align-items:center; margin-bottom:10px; padding:14px; border:1px solid #cddce8; border-radius:20px; background:linear-gradient(145deg,#f8fbfe,#eef5fa); }
.advanced-mode-card.enabled { border-color:#9bd9cf; background:linear-gradient(145deg,#eefaf6,#e6f6f1); }
.advanced-mode-icon { width:46px; height:46px; display:grid; place-items:center; border-radius:15px; color:#fff; background:linear-gradient(145deg,#0c376d,#0b8ca5); }
.advanced-mode-copy { min-width:0; }
.advanced-mode-copy strong,.advanced-mode-copy small { display:block; }
.advanced-mode-copy strong { color:var(--ink); font-size:14px; }
.advanced-mode-copy small { margin-top:3px; color:var(--muted); font-size:10px; line-height:1.4; }
.advanced-mode-copy .eyebrow { font-size:8px; color:#1486a0; }
.appearance-row { margin-bottom:13px; }
.product-photo-editor { display:flex; align-items:center; gap:12px; }
.product-image-preview { width:94px; height:94px; display:grid; place-items:center; align-content:center; gap:4px; overflow:hidden; border:1px dashed #aac1d3; border-radius:21px; color:#66839d; background:#f2f7fb; font-size:9px; }
.product-image-preview img { width:100%; height:100%; object-fit:cover; }
.product-code-grid,.product-money-grid { display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.input-with-action { display:grid; grid-template-columns:minmax(0,1fr) 48px; gap:6px; }
.input-with-action button { display:grid; place-items:center; border:1px solid #b9dbe5; border-radius:13px; color:#08758c; background:#e9f9fc; }
.stock-adjust-hero { display:flex; align-items:center; gap:14px; margin-bottom:15px; padding:14px; border-radius:19px; background:#f3f8fc; }
.stock-adjust-thumb { width:68px; height:68px; flex:0 0 68px; }
.stock-adjust-hero strong,.stock-adjust-hero span,.stock-adjust-hero b { display:block; }
.stock-adjust-hero span { margin-top:3px; color:var(--muted); font-size:10px; }
.stock-adjust-hero b { margin-top:2px; color:#0b6591; font-size:24px; }
.inventory-sale-tools { margin-bottom:11px; padding:12px; border:1px solid #cbe4ea; border-radius:20px; background:linear-gradient(145deg,#f8fdfe,#eef9fb); }
.inventory-sale-tools.hidden { display:none; }
.inventory-sale-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:9px; }
.inventory-sale-head > div { min-width:0; }
.inventory-sale-head strong,.inventory-sale-head small { display:block; }
.inventory-sale-head strong { color:#0b385d; font-size:14px; }
.inventory-sale-head small { margin-top:2px; color:#648092; font-size:9px; line-height:1.35; }
.inventory-sale-head .eyebrow { color:#0a8aa2; font-size:8px; }
.sale-product-search { min-height:43px; background:#fff; }
.sale-product-results { display:flex; gap:7px; overflow-x:auto; scrollbar-width:none; margin:8px -2px 0; padding:0 2px 4px; }
.sale-product-results::-webkit-scrollbar { display:none; }
.sale-product-results > button { flex:0 0 190px; min-height:58px; display:grid; grid-template-columns:42px minmax(0,1fr) auto 18px; gap:7px; align-items:center; padding:7px; border:1px solid #d8e9ee; border-radius:15px; text-align:left; background:#fff; }
.sale-result-thumb { width:42px; height:42px; }
.sale-product-results strong,.sale-product-results small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sale-product-results strong { color:#173c59; font-size:11px; }
.sale-product-results small { margin-top:2px; color:#718899; font-size:8px; }
.sale-product-results b { color:#08758c; font-size:10px; }
.sale-cart { margin-top:8px; }
.sale-cart-empty { padding:8px 2px 2px; color:#668092; font-size:9px; }
.sale-cart-title { display:flex; justify-content:space-between; align-items:center; padding:6px 1px 5px; }
.sale-cart-title strong { font-size:10px; color:#45657c; }
.sale-cart-title b { color:#0a7289; font-size:13px; }
.sale-cart-row { display:grid; grid-template-columns:42px minmax(0,1fr) auto 30px; gap:8px; align-items:center; padding:7px 0; border-top:1px solid #dcebef; }
.sale-cart-thumb { width:42px; height:42px; }
.sale-cart-row > span { min-width:0; }
.sale-cart-row strong,.sale-cart-row small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sale-cart-row strong { color:#173c59; font-size:11px; }
.sale-cart-row small { margin-top:2px; color:#718899; font-size:8px; }
.qty-control { display:grid; grid-template-columns:28px 38px 28px; align-items:center; overflow:hidden; border:1px solid #c9dce3; border-radius:11px; background:#fff; }
.qty-control button { height:32px; border:0; color:#0b6980; background:#f1f9fb; font-size:16px; font-weight:900; }
.qty-control input { width:38px; height:32px; padding:0; border:0; outline:0; text-align:center; color:#183c54; background:#fff; font-size:11px; font-weight:900; }
.sale-remove { width:30px; height:30px; display:grid; place-items:center; border:0; border-radius:10px; color:#a04a52; background:#fff0f1; }
.scanner-overlay { position:fixed; inset:0; z-index:1200; display:flex; align-items:flex-end; justify-content:center; background:rgba(3,12,24,.78); backdrop-filter:blur(8px); }
.scanner-sheet { width:min(100%,620px); overflow:hidden; border-radius:28px 28px 0 0; color:#fff; background:#071525; box-shadow:0 -20px 60px rgba(0,0,0,.35); padding-bottom:calc(16px + var(--safe-bottom)); }
.scanner-head { min-height:64px; display:grid; grid-template-columns:42px minmax(0,1fr) 30px; gap:10px; align-items:center; padding:10px 14px; }
.scanner-head button { width:40px; height:40px; display:grid; place-items:center; border:0; border-radius:14px; color:#fff; background:rgba(255,255,255,.10); }
.scanner-head strong,.scanner-head small { display:block; }
.scanner-head strong { font-size:15px; }
.scanner-head small { margin-top:2px; color:#9ab4c9; font-size:10px; }
.scanner-head > span { color:#66d8eb; }
.scanner-camera { position:relative; aspect-ratio:4/3; overflow:hidden; background:#02070d; }
.scanner-camera video { width:100%; height:100%; object-fit:cover; }
.scanner-camera::after { content:""; position:absolute; inset:0; background:linear-gradient(90deg,rgba(0,0,0,.45),transparent 20%,transparent 80%,rgba(0,0,0,.45)); pointer-events:none; }
.scanner-frame { position:absolute; z-index:2; left:13%; right:13%; top:27%; height:42%; }
.scanner-frame i { position:absolute; width:34px; height:34px; border-color:#64e3ee; border-style:solid; }
.scanner-frame i:nth-child(1){left:0;top:0;border-width:3px 0 0 3px;border-radius:12px 0 0 0}.scanner-frame i:nth-child(2){right:0;top:0;border-width:3px 3px 0 0;border-radius:0 12px 0 0}.scanner-frame i:nth-child(3){left:0;bottom:0;border-width:0 0 3px 3px;border-radius:0 0 0 12px}.scanner-frame i:nth-child(4){right:0;bottom:0;border-width:0 3px 3px 0;border-radius:0 0 12px 0}
.scanner-frame span { position:absolute; left:6px; right:6px; top:50%; height:2px; background:linear-gradient(90deg,transparent,#64e3ee 20%,#64e3ee 80%,transparent); box-shadow:0 0 10px #64e3ee; animation:scannerSweep 1.8s ease-in-out infinite alternate; }
@keyframes scannerSweep { from{transform:translateY(-58px)} to{transform:translateY(58px)} }
.scanner-status { position:absolute; z-index:3; left:50%; bottom:12px; transform:translateX(-50%); padding:6px 10px; border-radius:999px; color:#d9f7fb; background:rgba(0,20,31,.68); font-size:9px; font-weight:800; white-space:nowrap; }
.scanner-manual { padding:13px 14px 8px; }
.scanner-manual label { display:block; margin-bottom:6px; color:#9ab4c9; font-size:9px; font-weight:800; }
.scanner-manual > div { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:7px; }
.scanner-manual input { min-height:44px; padding:0 12px; border:1px solid #29435a; border-radius:13px; color:#fff; background:#0d2235; outline:0; }
.scanner-help { margin:0; padding:0 14px; color:#7894aa; font-size:8px; line-height:1.4; }
.receipt-product-lines { padding:8px 0; border-top:1px dashed #9aa7b5; }
.receipt-product-lines > div { display:flex; justify-content:space-between; gap:8px; padding:2px 0; font-size:8px; }

html[data-theme="dark"] .inventory-kpi:not(.primary),html[data-theme="dark"] .inventory-product-card,html[data-theme="dark"] .inventory-move-item,html[data-theme="dark"] .inventory-category-card,html[data-theme="dark"] .inventory-tabs,html[data-theme="dark"] .inventory-search { background:#102037; border-color:var(--line); }
html[data-theme="dark"] .inventory-kpi.warning { background:#352d18; border-color:#655323; }
html[data-theme="dark"] .inventory-lock-hero { background:radial-gradient(circle at 50% 0,rgba(73,197,223,.14),transparent 40%),linear-gradient(180deg,#102037,#0b1929); border-color:#29435d; }
html[data-theme="dark"] .advanced-mode-card { background:#102037; border-color:#29435d; }
html[data-theme="dark"] .advanced-mode-card.enabled { background:#102d2a; border-color:#275950; }
html[data-theme="dark"] .inventory-sale-tools { background:#0e2630; border-color:#244b56; }
html[data-theme="dark"] .sale-product-search,html[data-theme="dark"] .sale-product-results > button,html[data-theme="dark"] .qty-control,html[data-theme="dark"] .qty-control input { background:#102037; border-color:#29435d; color:var(--ink); }
html[data-theme="dark"] .qty-control button { background:#153047; }
html[data-theme="dark"] .inventory-sale-head strong,html[data-theme="dark"] .sale-product-results strong,html[data-theme="dark"] .sale-cart-row strong { color:var(--ink); }

@media (min-width:720px) {
  .inventory-summary-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .inventory-duo { grid-template-columns:1fr 1fr; }
  .inventory-category-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
@media (max-width:390px) {
  .inventory-hero { padding:17px; }
  .inventory-hero h1 { font-size:27px; }
  .scanner-square { width:66px; height:66px; }
  .inventory-products-head { grid-template-columns:minmax(0,1fr) 44px; }
  .inventory-products-head .btn { grid-column:1/-1; }
  .product-code-grid,.product-money-grid { grid-template-columns:1fr; }
  .product-card-main { grid-template-columns:56px minmax(0,1fr); }
  .product-thumb { width:56px; height:56px; }
  .product-stock { grid-column:2; flex-direction:row; align-items:center; gap:6px; }
  .product-stock > small { margin:0; }
  .sale-cart-row { grid-template-columns:38px minmax(0,1fr) 30px; }
  .sale-cart-thumb { width:38px; height:38px; }
  .qty-control { grid-column:2/4; justify-self:end; }
}
/* Inventario 1.6 RC1 — estado de producto archivado/inactivo */
.stock-pill.slate{background:rgba(100,116,139,.12);color:#64748b;border-color:rgba(100,116,139,.22)}
.inventory-product-card:has(.stock-pill.slate){opacity:.72}

/* ===== CajaFácil 1.6 RC2 · Modo avanzado comercial ===== */
.inventory-location-pill,.inventory-location-select{display:inline-flex;align-items:center;gap:6px;margin-top:9px;min-height:30px;padding:0 10px;border:1px solid rgba(255,255,255,.2);border-radius:999px;color:#d9f6ff;background:rgba(255,255,255,.1);font-size:10px;font-weight:850}
.inventory-location-select select{max-width:150px;border:0;outline:0;color:inherit;background:transparent;font:inherit}
.inventory-location-select option{color:#10243a;background:#fff}
.inventory-action-row.advanced-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.expiry-note{margin-top:5px!important;color:#a16b00!important;font-weight:800}.expiry-note.danger{color:#bd2936!important}
.purchase-summary-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:12px}.purchase-summary-strip>span{display:flex;flex-direction:column;padding:12px;border:1px solid var(--line);border-radius:16px;background:var(--surface)}.purchase-summary-strip small{color:var(--muted);font-size:9px;font-weight:800}.purchase-summary-strip strong{margin-top:4px;color:var(--ink);font-size:16px}
.purchase-order-list,.count-history{display:grid;gap:9px}.purchase-order-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;padding:14px;border:1px solid var(--line);border-radius:19px;background:var(--surface);box-shadow:0 7px 20px rgba(20,47,78,.05)}.purchase-order-card>div:first-child{min-width:0}.purchase-order-card strong,.purchase-order-card small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.purchase-order-card strong{font-size:14px}.purchase-order-card small{margin-top:4px;color:var(--muted);font-size:9px}.purchase-order-total{text-align:right}.purchase-order-total b{display:block;margin-bottom:5px;font-size:15px;color:var(--navy)}.purchase-order-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:6px;padding-top:7px;border-top:1px solid var(--line)}.purchase-order-actions button{min-height:34px;padding:0 11px;border:1px solid var(--line);border-radius:11px;color:var(--ink);background:var(--surface-soft);font-size:10px;font-weight:850}.purchase-order-actions .primary-mini{color:#fff;border-color:#126f8e;background:#126f8e}
.supplier-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.supplier-card{min-width:0;display:flex;flex-direction:column;align-items:flex-start;padding:14px;border:1px solid var(--line);border-radius:18px;text-align:left;background:var(--surface);box-shadow:0 7px 20px rgba(20,47,78,.04)}.supplier-card .avatar{margin-bottom:10px}.supplier-card strong,.supplier-card small,.supplier-card em{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.supplier-card strong{font-size:13px}.supplier-card small{margin-top:4px;color:var(--muted);font-size:9px}.supplier-card em{margin-top:9px;color:#16728e;font-size:9px;font-style:normal;font-weight:850}
.count-history-card{display:grid;grid-template-columns:38px minmax(0,1fr) auto;gap:10px;align-items:center;padding:12px;border:1px solid var(--line);border-radius:17px;background:var(--surface)}.count-history-card>span:first-child{width:36px;height:36px;display:grid;place-items:center;border-radius:12px;color:#0b7d67;background:#e9f8f3}.count-history-card strong,.count-history-card small{display:block}.count-history-card strong{font-size:12px}.count-history-card small{margin-top:3px;color:var(--muted);font-size:9px}
.analytics-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.analytics-table{display:grid;gap:2px}.analytics-table>div{display:grid;grid-template-columns:24px 40px minmax(0,1fr) auto;gap:8px;align-items:center;padding:8px 0;border-bottom:1px solid var(--line)}.analytics-table .rank{width:22px;height:22px;display:grid;place-items:center;border-radius:8px;color:#145c80;background:#eaf4ff;font-size:9px;font-weight:900}.analytics-table strong,.analytics-table small{display:block}.analytics-table strong{font-size:11px}.analytics-table small{margin-top:2px;color:var(--muted);font-size:8px}.analytics-table b{font-size:11px;color:#0b7c67}
.location-grid{display:grid;gap:9px;margin-bottom:12px}.location-card{display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:10px;align-items:center;padding:13px;border:1px solid var(--line);border-radius:18px;background:var(--surface)}.location-card.active{border-color:#75c9d6;background:linear-gradient(145deg,#f4fdff,#eaf9fb)}.location-card>span{width:40px;height:40px;display:grid;place-items:center;border-radius:13px;color:#146b8b;background:#e7f5fb}.location-card strong,.location-card small{display:block}.location-card small{margin-top:3px;color:var(--muted);font-size:9px}.location-card button{min-height:34px;padding:0 11px;border:0;border-radius:11px;color:#0b6683;background:#e9f7fa;font-size:9px;font-weight:900}
.purchase-lines{display:grid;gap:7px;max-height:55vh;overflow:auto;padding-right:2px}.purchase-lines-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 2px 4px}.purchase-lines-head small{color:var(--muted);font-size:8px}.purchase-line{display:grid;grid-template-columns:42px minmax(0,1fr) 64px 76px;gap:7px;align-items:center;padding:8px;border:1px solid var(--line);border-radius:15px;background:var(--surface-soft)}.purchase-line strong,.purchase-line small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.purchase-line strong{font-size:10px}.purchase-line small{margin-top:2px;color:var(--muted);font-size:8px}.purchase-line input{min-width:0;min-height:38px;padding:0 7px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink);font-size:10px}
.purchase-detail-hero{display:grid;grid-template-columns:46px minmax(0,1fr) auto;gap:10px;align-items:center;margin-bottom:12px;padding:14px;border-radius:18px;color:#fff;background:linear-gradient(145deg,#0b2e63,#116f94)}.purchase-detail-hero>span{width:44px;height:44px;display:grid;place-items:center;border-radius:14px;background:rgba(255,255,255,.12)}.purchase-detail-hero h2{margin:2px 0;font-size:16px}.purchase-detail-hero p{margin:0;color:#cce8f3;font-size:9px}.purchase-detail-hero b{font-size:16px}.purchase-detail-lines{display:grid;gap:6px;margin-bottom:12px}.purchase-detail-lines>div{display:flex;justify-content:space-between;gap:10px;padding:10px 2px;border-bottom:1px solid var(--line)}.purchase-detail-lines strong,.purchase-detail-lines small{display:block}.purchase-detail-lines small{margin-top:2px;color:var(--muted);font-size:8px}
.receive-line{display:grid;grid-template-columns:42px minmax(0,1fr) 70px;gap:7px;align-items:center;padding:9px;border:1px solid var(--line);border-radius:15px;background:var(--surface-soft)}.receive-line>span strong,.receive-line>span small{display:block}.receive-line>span small{margin-top:2px;color:var(--muted);font-size:8px}.receive-line>input{min-height:38px;width:70px;padding:0 8px;border:1px solid var(--line);border-radius:10px;color:var(--ink);background:var(--surface)}.receive-track{grid-column:2/-1;display:grid;grid-template-columns:1fr 1fr 1.35fr;gap:6px}.receive-track input{min-width:0;min-height:36px;padding:0 8px;border:1px solid var(--line);border-radius:10px;color:var(--ink);background:var(--surface);font-size:9px}
.stock-count-top{display:flex;align-items:center;justify-content:space-between;gap:10px}.stock-count-top strong,.stock-count-top small{display:block}.stock-count-top small{margin-top:3px;color:var(--muted);font-size:9px}.stock-count-lines{display:grid;gap:6px;max-height:54vh;overflow:auto}.stock-count-row{display:grid;grid-template-columns:42px minmax(0,1fr) 72px;gap:8px;align-items:center;padding:8px;border:1px solid var(--line);border-radius:14px;background:var(--surface)}.stock-count-row strong,.stock-count-row small{display:block}.stock-count-row strong{font-size:10px}.stock-count-row small{margin-top:2px;color:var(--muted);font-size:8px}.stock-count-row>input{min-width:0;min-height:40px;padding:0 8px;border:1px solid var(--line);border-radius:10px;text-align:center;background:var(--surface-soft);color:var(--ink);font-weight:900}
.restock-list{display:grid;gap:7px;max-height:52vh;overflow:auto}.restock-list>label{display:grid;grid-template-columns:22px minmax(0,1fr) 66px;gap:7px;align-items:center;padding:8px;border:1px solid var(--line);border-radius:14px}.restock-list>label>span{display:grid;grid-template-columns:40px minmax(0,1fr);gap:7px;align-items:center}.restock-list strong,.restock-list small{display:block}.restock-list strong{font-size:10px}.restock-list small{margin-top:2px;color:var(--muted);font-size:8px}.restock-list input[type=number]{width:66px;min-height:38px;padding:0 7px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink)}
.return-lines{display:grid;gap:8px}.return-line{display:grid;grid-template-columns:42px minmax(0,1fr) 66px;gap:8px;align-items:center;padding:9px;border:1px solid var(--line);border-radius:15px;background:var(--surface)}.return-line strong,.return-line small{display:block}.return-line strong{font-size:10px}.return-line small{margin-top:2px;color:var(--muted);font-size:8px}.return-line>input{width:66px;min-height:38px;padding:0 7px;border:1px solid var(--line);border-radius:10px;background:var(--surface-soft);color:var(--ink);text-align:center}.return-line .check-row.compact{grid-column:2/-1;margin:0;min-height:30px;padding:0;border:0;background:transparent}.movement-return-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}.movement-product-lines{display:grid;gap:5px;margin-top:12px;padding-top:10px;border-top:1px solid var(--line)}.movement-product-lines>div{display:flex;justify-content:space-between;gap:10px;font-size:10px}
.label-preview{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:230px;margin-bottom:12px;padding:20px;border:1px dashed #aabfce;border-radius:18px;text-align:center;background:#fff;color:#111}.label-business{font-size:10px;font-weight:800}.label-preview>strong{margin-top:5px;font-size:15px}.label-preview>b{margin:5px 0 8px;font-size:22px}.barcode-svg{width:min(100%,330px);height:62px}.label-preview>small{margin-top:4px;font-size:9px;letter-spacing:.08em}
.team-hero{display:grid;grid-template-columns:50px minmax(0,1fr);gap:11px;align-items:center;padding:14px;border-radius:18px;color:#fff;background:linear-gradient(145deg,#0b2e63,#176f92)}.team-hero>span{width:48px;height:48px;display:grid;place-items:center;border-radius:15px;background:rgba(255,255,255,.12)}.team-hero strong,.team-hero small{display:block}.team-hero small{margin-top:3px;color:#c8e6f1;font-size:9px;line-height:1.4}.operator-current{margin:10px 0;padding:12px;border:1px solid var(--line);border-radius:16px;background:var(--surface-soft)}.operator-current span,.operator-current strong,.operator-current small{display:block}.operator-current span{color:var(--muted);font-size:8px;font-weight:850}.operator-current strong{margin-top:3px;font-size:14px}.operator-current small{margin-top:2px;color:#14708d;font-size:9px}.operator-list{display:grid;gap:6px;margin-bottom:10px}.operator-list button{display:grid;grid-template-columns:38px minmax(0,1fr) auto;gap:9px;align-items:center;padding:9px;border:1px solid var(--line);border-radius:14px;text-align:left;background:var(--surface)}.operator-list button.active{border-color:#80cdd8;background:#effbfc}.operator-list button>span:nth-child(2) strong,.operator-list button>span:nth-child(2) small{display:block}.operator-list button>span:nth-child(2) small{margin-top:2px;color:var(--muted);font-size:8px}.operator-list em{color:#0b7288;font-size:8px;font-style:normal;font-weight:900}

html[data-theme="dark"] .purchase-order-card,html[data-theme="dark"] .supplier-card,html[data-theme="dark"] .count-history-card,html[data-theme="dark"] .location-card,html[data-theme="dark"] .stock-count-row,html[data-theme="dark"] .return-line,html[data-theme="dark"] .operator-list button,html[data-theme="dark"] .purchase-summary-strip>span{background:#102037;border-color:var(--line)}
html[data-theme="dark"] .location-card.active{background:#102d33;border-color:#2c7480}html[data-theme="dark"] .purchase-line,html[data-theme="dark"] .receive-line{background:#0e1d30}html[data-theme="dark"] .label-preview{background:#fff;color:#111}

@media (min-width:760px){.inventory-action-row.advanced-actions{grid-template-columns:repeat(4,minmax(0,1fr))}.supplier-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.location-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.purchase-order-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:480px){.purchase-line{grid-template-columns:38px minmax(0,1fr) 58px}.purchase-line>input:last-child{grid-column:2/-1}.purchase-line>input:nth-last-child(2){width:58px}.receive-line{grid-template-columns:38px minmax(0,1fr) 60px}.analytics-table>div{grid-template-columns:22px 36px minmax(0,1fr)}.analytics-table>div>b{grid-column:3/4}.supplier-grid{grid-template-columns:1fr 1fr}.inventory-tabs button{min-width:max-content}}

.gap-small{gap:6px}
.team-security-card{display:grid;grid-template-columns:38px minmax(0,1fr) auto;gap:9px;align-items:center;margin:0 0 10px;padding:10px 11px;border:1px solid var(--line);border-radius:15px;background:var(--surface)}
.team-security-card>span:first-child{width:36px;height:36px;display:grid;place-items:center;border-radius:12px;background:var(--surface-soft);color:#0b7288}.team-security-card strong,.team-security-card small{display:block}.team-security-card small{margin-top:2px;color:var(--muted);font-size:8px;line-height:1.4}
