:root {
  --forest: #123e2f;
  --forest-2: #1a5742;
  --forest-3: #0c2c22;
  --gold: #d7ad72;
  --gold-soft: #f0dfc5;
  --cream: #f5f0e7;
  --paper: #fffdf9;
  --ink: #1e2a24;
  --muted: #7c837d;
  --line: #eae3d7;
  --coral: #c96350;
  --green: #367a5d;
  --shadow: 0 18px 45px rgba(19, 53, 40, .10);
  --radius: 20px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: #0b251d;
  color: var(--ink);
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { border: 0; cursor: pointer; color: inherit; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 20px; height: 20px; display: inline-block; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.icon.sm { width: 16px; height: 16px; }
.muted { color: var(--muted); }
.eyebrow { margin: 0; font-size: 10px; letter-spacing: .18em; font-weight: 700; color: var(--muted); }

/* Desktop presentation */
.stage {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  gap: clamp(40px, 8vw, 130px); padding: 22px;
  background:
    radial-gradient(900px 600px at 12% 12%, rgba(215,173,114,.13), transparent 60%),
    radial-gradient(800px 700px at 92% 88%, rgba(54,122,93,.18), transparent 60%),
    #0b251d;
}
.side-copy { width: 390px; color: #f8f3e9; display: none; }
.side-brand { display: flex; align-items: center; gap: 11px; font-size: 11px; letter-spacing: .18em; font-weight: 700; color: #e8d8bc; }
.side-mark { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid rgba(215,173,114,.7); border-radius: 11px; color: var(--gold); font-family: "Fraunces", serif; font-size: 13px; letter-spacing: 0; }
.side-copy .eyebrow { color: #b9c7bb; margin-top: 78px; }
.side-copy h1 { font-family: "Fraunces", serif; font-size: 58px; line-height: .98; font-weight: 500; margin: 16px 0 24px; letter-spacing: -.03em; }
.side-copy h1 em { color: var(--gold); font-style: italic; }
.side-lead { font-size: 15px; line-height: 1.65; color: #c4d0c5; max-width: 330px; }
.side-points { display: flex; flex-direction: column; gap: 14px; margin-top: 34px; font-size: 13px; color: #d8e0d6; }
.side-points span { display: flex; align-items: center; gap: 10px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); display: inline-block; box-shadow: 0 0 0 4px rgba(215,173,114,.12); }
.side-footer { margin-top: 110px; color: #8da195; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }

/* Phone shell */
.phone {
  width: 430px; height: min(920px, calc(100vh - 44px));
  background: var(--cream); border-radius: 34px; overflow: hidden;
  display: flex; flex-direction: column; position: relative;
  box-shadow: 0 40px 90px rgba(0, 0, 0, .38), 0 0 0 1px rgba(255,255,255,.06);
}
.statusbar {
  height: 32px; flex: none; padding: 8px 22px 0;
  display: flex; justify-content: space-between; align-items: center;
  background: var(--forest); color: #f4efe4; font-size: 10px; font-weight: 700;
}
.status-icons { display: flex; align-items: center; gap: 7px; font-size: 9px; }
.signal { letter-spacing: -2px; font-size: 8px; }
.battery { width: 17px; height: 8px; border: 1px solid #f4efe4; border-radius: 2px; position: relative; }
.battery:after { content: ""; position: absolute; left: 2px; top: 2px; bottom: 2px; width: 10px; background: var(--gold); border-radius: 1px; }

.topbar {
  height: 64px; flex: none; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--forest); color: #fffdf7;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  display: grid; place-items: center; width: 36px; height: 36px;
  border-radius: 11px; border: 1px solid rgba(215,173,114,.65);
  color: var(--gold); font-family: "Fraunces", serif; font-weight: 600; font-size: 13px;
  background: rgba(255,255,255,.04);
}
.brand-text { display: flex; flex-direction: column; gap: 1px; }
.brand-text strong { font-size: 10px; letter-spacing: .16em; font-weight: 700; }
.brand-text span { font-size: 10px; color: #b8c9bc; }
.icon-button {
  position: relative; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255,255,255,.07); color: #fffdf7;
}
.notif-dot { position: absolute; right: 8px; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2px var(--forest); }

.main {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  padding: 22px 20px 96px; scrollbar-width: none;
}
.main::-webkit-scrollbar { display: none; }
.view { display: none; animation: rise .32s ease both; }
.view.is-active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.greeting-row { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; }
.greeting-row h2, .page-head h2 { font-family: "Fraunces", serif; font-size: 32px; font-weight: 500; letter-spacing: -.03em; margin: 6px 0 0; line-height: 1.05; }
.greeting-row h2 em, .page-head h2 em { color: var(--forest-2); font-style: italic; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; background: var(--gold-soft);
  color: var(--forest); border: 1px solid #dfc9a6; font-weight: 700; font-size: 14px;
}
.avatar.lg { width: 54px; height: 54px; font-size: 18px; }

.hero {
  position: relative; overflow: hidden; border-radius: 24px; padding: 20px 20px 18px;
  color: #fffdf8; background: linear-gradient(140deg, #164c38, #0e3327 72%);
  box-shadow: 0 16px 30px rgba(14,51,39,.2);
}
.hero-glow { position: absolute; width: 230px; height: 230px; right: -86px; top: -100px; border-radius: 50%; background: radial-gradient(circle, rgba(215,173,114,.32), transparent 68%); }
.hero-top { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.hero-chip { font-size: 9px; letter-spacing: .14em; font-weight: 700; color: var(--gold); background: rgba(215,173,114,.1); border: 1px solid rgba(215,173,114,.25); padding: 5px 8px; border-radius: 99px; }
.hero-date { color: #a9bcae; font-size: 9px; letter-spacing: .12em; }
.hero-label { margin: 24px 0 1px; color: #b9cbbd; font-size: 11px; }
.hero-amount { margin: 0; font-family: "Fraunces", serif; font-size: 38px; letter-spacing: -.03em; line-height: 1.1; }
.hero-amount small { font-family: "DM Sans", sans-serif; font-size: 17px; font-weight: 500; color: var(--gold); }
.hero-note { margin: 4px 0 18px; color: #b9cbbd; font-size: 11px; }
.hero-cta {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  background: var(--gold); color: #163a2a; font-weight: 700; font-size: 12px;
  padding: 9px 13px; border-radius: 99px;
}

.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 24px; }
.quick { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 3px; border-radius: 15px; background: var(--paper); color: var(--ink); box-shadow: 0 5px 15px rgba(30,42,36,.055); font-size: 10px; font-weight: 600; }
.quick-icon { width: 31px; height: 31px; border-radius: 10px; display: grid; place-items: center; background: #edf3ec; color: var(--forest-2); }
.quick-icon .icon { width: 16px; height: 16px; }
.quick-badge { position: absolute; top: 8px; right: 15px; min-width: 14px; height: 14px; border-radius: 99px; display: grid; place-items: center; background: var(--coral); color: #fff; font-size: 8px; font-style: normal; }

.section-head { display: flex; justify-content: space-between; align-items: center; margin: 0 0 10px; }
.section-head h3 { font-family: "Fraunces", serif; font-size: 18px; font-weight: 500; margin: 0; letter-spacing: -.02em; }
.text-btn { background: none; color: var(--forest-2); font-size: 11px; font-weight: 700; padding: 3px 0; }

.chart-card, .invoice-card, .doc-item, .notice, .call-item, .mini-stat { background: var(--paper); border: 1px solid rgba(234,227,215,.72); }
.chart-card { border-radius: var(--radius); padding: 16px 16px 12px; box-shadow: 0 8px 20px rgba(30,42,36,.045); }
.chart-meta { display: flex; justify-content: space-between; align-items: flex-start; }
.chart-meta div { display: flex; flex-direction: column; gap: 2px; }
.chart-meta .muted { font-size: 10px; }
.chart-meta strong { font-size: 17px; letter-spacing: -.02em; }
.trend { font-size: 10px; color: var(--green); background: #e9f3ea; border-radius: 99px; padding: 4px 7px; font-weight: 700; }
.chart { margin-top: 15px; }
.chart-bars { height: 100px; display: flex; align-items: flex-end; gap: 11px; padding: 0 2px; border-bottom: 1px solid var(--line); }
.bar { flex: 1; height: var(--h); border-radius: 7px 7px 2px 2px; background: #dfe9df; position: relative; min-height: 12px; }
.bar i { position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translateX(-50%); font-style: normal; font-size: 8px; color: #9daaa0; }
.bar.is-current { background: linear-gradient(180deg, var(--forest-2), #2c7156); }
.bar.is-current i { color: var(--forest-2); font-weight: 700; }
.chart-labels { display: flex; justify-content: space-between; padding: 7px 2px 0; color: #a0a89f; font-size: 9px; }

.activity-list { display: flex; flex-direction: column; gap: 8px; }
.activity { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: transparent; text-align: left; }
.activity:hover { background: rgba(255,255,255,.5); }
.activity-icon { width: 35px; height: 35px; flex: none; border-radius: 11px; display: grid; place-items: center; }
.activity-icon .icon { width: 16px; height: 16px; }
.activity-icon.green { background: #e9f2e9; color: var(--green); }
.activity-icon.gold { background: #f7eedf; color: #9b7137; }
.activity-icon.coral { background: #f8e9e4; color: var(--coral); }
.activity-copy { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.activity-copy strong { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-copy small { font-size: 9px; color: var(--muted); }
.chevron { color: #aeb5ad; width: 16px; height: 16px; }
.pill { font-size: 8px; padding: 4px 7px; border-radius: 99px; white-space: nowrap; font-weight: 700; }
.soft-green { background: #e8f2e8; color: var(--green); }
.unread-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--coral); flex: none; }

.page-head { margin: 2px 0 18px; }
.page-head h2 { font-size: 31px; }
.page-lead { font-size: 11px; line-height: 1.5; color: var(--muted); margin: 7px 0 0; max-width: 310px; }
.stat-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 16px; }
.mini-stat { border-radius: 17px; padding: 13px; display: flex; flex-direction: column; gap: 2px; }
.mini-stat .muted { font-size: 9px; }
.mini-stat strong { font-size: 18px; letter-spacing: -.03em; }
.mini-stat small { font-size: 9px; }
.coral-text { color: var(--coral); }
.green-text { color: var(--green); }
.chips { display: flex; gap: 7px; margin-bottom: 12px; }
.chip { padding: 7px 11px; border-radius: 99px; background: var(--paper); border: 1px solid var(--line); font-size: 10px; font-weight: 600; color: var(--muted); }
.chip.is-active { background: var(--forest); border-color: var(--forest); color: #fffdf7; }
.invoice-list, .doc-list, .notice-list, .call-list { display: flex; flex-direction: column; gap: 9px; }
.invoice-card { border-radius: 18px; padding: 14px; display: flex; align-items: center; gap: 11px; box-shadow: 0 5px 14px rgba(30,42,36,.035); }
.invoice-icon { width: 39px; height: 39px; flex: none; display: grid; place-items: center; border-radius: 12px; background: #f3ede2; color: #9b7137; }
.invoice-icon .icon { width: 18px; height: 18px; }
.invoice-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.invoice-info strong { font-size: 12px; font-weight: 600; }
.invoice-info small { font-size: 9px; color: var(--muted); }
.invoice-amount { text-align: right; display: flex; flex-direction: column; gap: 4px; }
.invoice-amount strong { font-size: 13px; letter-spacing: -.02em; }
.status { font-size: 8px; padding: 4px 6px; border-radius: 99px; font-weight: 700; }
.status.pendiente { background: #f8e9e4; color: var(--coral); }
.status.pagada { background: #e8f2e8; color: var(--green); }
.status.vencida { background: #f3e0dc; color: #a13e2f; }
.download-btn { width: 29px; height: 29px; border-radius: 9px; display: grid; place-items: center; background: #f4f0e7; color: var(--forest-2); }
.download-btn .icon { width: 14px; height: 14px; }

.upload-zone { width: 100%; display: flex; align-items: center; gap: 11px; text-align: left; padding: 14px; margin-bottom: 14px; border-radius: 18px; border: 1px dashed #cfbfa4; background: #fbf7ef; color: var(--ink); }
.upload-icon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--gold-soft); color: #7d5b2e; flex: none; }
.upload-icon .icon { width: 17px; height: 17px; }
.upload-zone > span:nth-child(2) { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.upload-zone strong { font-size: 11px; }
.upload-zone small { color: var(--muted); font-size: 9px; }
.upload-plus { color: #a78a61; }
.folder-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 20px; }
.folder { text-align: left; padding: 12px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); display: grid; grid-template-columns: 30px 1fr; align-items: center; column-gap: 8px; }
.folder-icon { grid-row: span 2; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: #edf3ec; color: var(--forest-2); }
.folder-icon .icon { width: 15px; height: 15px; }
.folder strong { font-size: 10px; font-weight: 600; }
.folder small { font-size: 8px; color: var(--muted); }
.doc-item { display: flex; align-items: center; gap: 10px; padding: 11px; border-radius: 15px; }
.doc-type { width: 34px; height: 38px; flex: none; border-radius: 7px; display: grid; place-items: center; background: #f8ebe7; color: #b04f3e; font-size: 8px; font-weight: 800; }
.doc-type.pdf { background: #f8ebe7; color: #b04f3e; }
.doc-type.img { background: #e9f1ed; color: var(--green); }
.doc-type.txt { background: #f1f0e8; color: #6e756b; }
.doc-info { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.doc-info strong { font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-info small { font-size: 8px; color: var(--muted); }

.notice { display: flex; gap: 11px; padding: 14px; border-radius: 17px; position: relative; }
.notice.is-unread { border-color: #dcc6a5; background: #fffbf4; }
.notice-icon { width: 34px; height: 34px; flex: none; border-radius: 11px; display: grid; place-items: center; background: #f5e9d5; color: #9b7137; }
.notice-icon .icon { width: 16px; height: 16px; }
.notice-copy { flex: 1; }
.notice-copy strong { font-size: 11px; display: block; margin-bottom: 2px; }
.notice-copy p { margin: 0; font-size: 10px; line-height: 1.45; color: var(--muted); }
.notice-copy small { display: block; margin-top: 6px; font-size: 8px; color: #a4aaa3; }
.notice .unread-dot { margin-top: 5px; }

.call-hero { display: flex; align-items: center; gap: 12px; padding: 15px; border-radius: 20px; color: #fffdf7; background: linear-gradient(130deg, #174c38, #0e3024); box-shadow: 0 12px 24px rgba(14,51,39,.14); margin-bottom: 20px; }
.call-orb { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--gold-soft); color: var(--forest); font-family: "Fraunces", serif; font-weight: 600; font-size: 14px; border: 2px solid rgba(255,255,255,.25); }
.call-copy { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.call-copy strong { font-family: "Fraunces", serif; font-size: 20px; font-weight: 500; }
.call-copy small { color: #b9cbbd; font-size: 9px; }
.online { display: flex; align-items: center; gap: 4px; font-size: 8px; color: #b9e2c7; margin-top: 2px; }
.online i { width: 5px; height: 5px; border-radius: 50%; background: #8bd19f; display: inline-block; }
.call-button { width: 43px; height: 43px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #153a2a; }
.call-button .icon { width: 18px; height: 18px; }
.call-button.is-active { background: var(--coral); color: white; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(201,99,80,.4); } 50% { box-shadow: 0 0 0 7px rgba(201,99,80,0); } }
.call-item { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 15px; }
.call-dir { width: 31px; height: 31px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.call-dir.in { background: #e9f2e9; color: var(--green); }
.call-dir.out { background: #f5e9d5; color: #9b7137; }
.call-dir .icon { width: 14px; height: 14px; }
.call-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.call-info strong { font-size: 11px; font-weight: 600; }
.call-info small { font-size: 8px; color: var(--muted); }
.call-duration { color: var(--muted); font-size: 9px; }
.call-play { width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; background: #f4f0e7; color: var(--forest-2); }
.call-play .icon { width: 12px; height: 12px; }

.bottom-nav {
  position: absolute; left: 0; right: 0; bottom: 0; height: 76px;
  padding: 7px 9px max(7px, env(safe-area-inset-bottom));
  display: flex; justify-content: space-around; align-items: center;
  background: rgba(255,253,249,.94); backdrop-filter: blur(14px);
  border-top: 1px solid rgba(234,227,215,.9);
}
.nav-item { position: relative; background: transparent; min-width: 56px; display: flex; flex-direction: column; align-items: center; gap: 3px; color: #a2a8a1; font-size: 8px; font-weight: 600; padding: 6px 3px; border-radius: 10px; }
.nav-item .icon { width: 19px; height: 19px; stroke-width: 1.6; }
.nav-item.is-active { color: var(--forest); }
.nav-item.is-active .icon { stroke-width: 2.1; }
.nav-item.is-active:after { content: ""; position: absolute; bottom: -2px; width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }
.nav-dot { position: absolute; top: 5px; right: 17px; width: 5px; height: 5px; border-radius: 50%; background: var(--coral); }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 18px);
  background: #173b2d; color: #fffdf7; padding: 10px 15px; border-radius: 99px;
  font-size: 11px; opacity: 0; pointer-events: none; transition: .25s ease; z-index: 50;
  box-shadow: 0 12px 30px rgba(0,0,0,.25); max-width: 86vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.sheet-backdrop { position: fixed; inset: 0; background: rgba(9,25,19,.4); opacity: 0; pointer-events: none; transition: .25s; z-index: 60; }
.sheet-backdrop.show { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; z-index: 61; left: 50%; bottom: 0; width: min(430px, 100%);
  transform: translate(-50%, 105%); transition: transform .3s cubic-bezier(.22,.8,.26,1);
  background: var(--paper); border-radius: 28px 28px 0 0; padding: 12px 22px 28px;
}
.sheet.show { transform: translate(-50%, 0); }
.sheet-handle { width: 38px; height: 4px; border-radius: 99px; background: #ddd4c5; margin: 0 auto 16px; }
.sheet-close { position: absolute; right: 14px; top: 18px; background: #f2ece1; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.sheet-close .icon { width: 14px; height: 14px; }
.profile-head { display: flex; align-items: center; gap: 12px; margin: 12px 0 20px; }
.profile-head div { display: flex; flex-direction: column; gap: 2px; }
.profile-head strong { font-family: "Fraunces", serif; font-size: 20px; font-weight: 500; }
.profile-head small { color: var(--muted); font-size: 10px; }
.profile-row { display: flex; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 11px; }
.profile-row span { color: var(--muted); }
.profile-row strong { font-weight: 600; text-align: right; }
.sheet-note { display: flex; align-items: center; gap: 7px; color: var(--green); background: #eaf3ea; border-radius: 12px; padding: 10px; margin-top: 18px; font-size: 9px; }

@media (min-width: 900px) {
  .side-copy { display: block; }
}
@media (max-width: 899px) {
  .stage { padding: 0; display: block; background: var(--cream); }
  .phone { width: 100%; height: 100dvh; max-height: none; border-radius: 0; box-shadow: none; }
  .statusbar { padding-top: max(8px, env(safe-area-inset-top)); height: calc(32px + env(safe-area-inset-top)); }
  .bottom-nav { height: calc(76px + env(safe-area-inset-bottom)); }
}
@media (max-width: 370px) {
  .main { padding-left: 15px; padding-right: 15px; }
  .quick-grid { gap: 5px; }
  .quick { font-size: 9px; }
  .brand-text strong { font-size: 9px; }
  .hero-amount { font-size: 33px; }
}
