:root{--bg:#f2f2f7;--card:rgba(255,255,255,.9);--solid:#fff;--text:#111114;--muted:#73737a;--line:rgba(60,60,67,.13);--blue:#007aff;--blue-soft:#e9f3ff;--green:#30b56f;--green-soft:#eaf8f0;--orange:#ff9f0a;--red:#ff3b30;--shadow:0 10px 35px rgba(24,29,39,.07)}
*{box-sizing:border-box}html{background:var(--bg)}body{margin:0;color:var(--text);background:radial-gradient(circle at 90% -5%,rgba(0,122,255,.12),transparent 27rem),var(--bg);font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","PingFang SC","Helvetica Neue",sans-serif;-webkit-font-smoothing:antialiased}button,input{font:inherit}button,a{-webkit-tap-highlight-color:transparent}.hidden{display:none!important}
.app-shell{min-height:100vh;padding-bottom:calc(36px + env(safe-area-inset-bottom))}.topbar{position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;min-height:calc(76px + env(safe-area-inset-top));padding:calc(14px + env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) 12px max(18px,env(safe-area-inset-left));background:rgba(242,242,247,.72);border-bottom:.5px solid var(--line);backdrop-filter:saturate(180%) blur(20px)}.topbar h1{margin:2px 0 0;font-size:22px;letter-spacing:-.02em}.eyebrow,.section-kicker{margin:0;color:var(--muted);font-size:12px;font-weight:600;letter-spacing:.04em}.page-content{width:min(100%,720px);margin:0 auto;padding:18px 14px;display:grid;gap:14px}.icon-button{width:44px;height:44px;padding:0;border:0;border-radius:50%;display:grid;place-items:center;color:var(--blue);background:var(--solid);box-shadow:0 3px 14px rgba(0,0,0,.06);cursor:pointer;font-size:23px}.icon-button.subtle{background:rgba(120,120,128,.1);box-shadow:none}
.hero-card{position:relative;overflow:hidden;padding:22px;border-radius:25px;color:#fff;background:linear-gradient(135deg,#087ef5,#5459ec 72%,#7954df);box-shadow:0 15px 35px rgba(46,94,211,.24)}.hero-card:after{content:"";position:absolute;width:180px;height:180px;border-radius:50%;right:-55px;top:-75px;background:rgba(255,255,255,.13)}.hero-card p{position:relative;z-index:1;margin:0 0 7px;font-size:14px;opacity:.78}.hero-card>strong{position:relative;z-index:1;display:block;font-size:clamp(31px,9vw,45px);letter-spacing:-.045em}.income-split{position:relative;z-index:1;display:flex;flex-wrap:wrap;gap:10px 20px;margin-top:19px;font-size:13px;font-weight:600}.income-split>div{display:flex;align-items:center;gap:7px}.dot{width:8px;height:8px;border-radius:50%;background:#fff}.dot.cash{background:#ffd169}
.section-card{border:.5px solid rgba(255,255,255,.7);border-radius:24px;background:var(--card);box-shadow:var(--shadow);backdrop-filter:blur(18px)}.trend-card{padding:18px 16px 12px}.section-heading,.calendar-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.section-heading h2,.calendar-heading h2{margin:3px 0 0;font-size:20px;letter-spacing:-.02em}.segmented-control{display:flex;padding:2px;border-radius:9px;background:rgba(116,116,128,.12)}.segmented-control button{min-width:48px;height:30px;padding:0 9px;border:0;border-radius:7px;background:transparent;font-size:12px;font-weight:600;cursor:pointer}.segmented-control button.active{background:var(--solid);box-shadow:0 2px 7px rgba(0,0,0,.08)}
.trend-chart{height:142px;padding:16px 2px 0;display:flex;align-items:stretch;gap:7px}.trend-chart.range-30{gap:2px}.bar-column{min-width:0;flex:1;display:flex;flex-direction:column;align-items:center}.bar-stack{width:min(100%,22px);flex:1;display:flex;flex-direction:column-reverse;justify-content:flex-start;overflow:hidden;border-radius:6px 6px 3px 3px;background:rgba(116,116,128,.07)}.range-30 .bar-stack{border-radius:3px 3px 1px 1px}.bar{display:block;width:100%;min-height:0;transition:height .25s ease}.scan-bar{background:var(--blue)}.cash-bar{background:var(--orange)}.bar-column small{height:18px;margin-top:5px;color:var(--muted);font-size:10px}
.calendar-card{position:relative;padding:16px 8px 10px}.calendar-heading{padding:0 8px 13px;text-align:center}.weekday-row,.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.weekday-row span{padding:4px 0 8px;text-align:center;color:var(--muted);font-size:11px;font-weight:600}.day-cell{min-width:0;height:77px;padding:5px 2px;border:0;border-top:.5px solid var(--line);background:transparent;display:flex;flex-direction:column;align-items:center;color:var(--text);cursor:pointer}.day-cell:not(.empty):active{border-radius:10px;background:rgba(0,122,255,.08)}.day-number{width:25px;height:25px;margin-bottom:2px;display:grid;place-items:center;border-radius:50%;font-size:12px;font-weight:600}.day-cell.today .day-number{color:#fff;background:var(--blue)}.day-amount{display:block;width:100%;overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap;font-size:clamp(8px,2.5vw,10px);line-height:17px}.scan-text{color:var(--blue)}.cash-text{color:#b97000}.calendar-loading{position:absolute;inset:60px 0 0;border-radius:0 0 24px 24px;display:flex;align-items:center;justify-content:center;color:var(--muted);background:rgba(255,255,255,.64);backdrop-filter:blur(4px);font-size:13px}.error-banner{width:100%;min-height:44px;padding:10px 14px;border:0;border-radius:13px;color:#9b1c16;background:#ffe8e6;cursor:pointer}
.sheet-layer{position:fixed;inset:0;z-index:50;padding-top:70px;display:flex;align-items:flex-end;justify-content:center;background:rgba(0,0,0,.33)}.bottom-sheet{width:min(100%,720px);max-height:90vh;overflow-y:auto;padding:8px max(16px,env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));border-radius:28px 28px 0 0;background:var(--bg);box-shadow:0 -16px 50px rgba(0,0,0,.17)}.sheet-grabber{width:36px;height:5px;margin:0 auto 8px;border-radius:3px;background:rgba(116,116,128,.35)}.sheet-header{min-height:50px;display:flex;align-items:center;justify-content:space-between}.sheet-header h2{margin:0;font-size:21px}.detail-list{overflow:hidden;border-radius:18px;background:var(--solid)}.detail-row{min-height:62px;margin-left:16px;padding:8px 16px 8px 0;display:grid;grid-template-columns:36px 1fr auto;align-items:center;gap:10px;border-bottom:.5px solid var(--line)}.detail-row strong{font-size:16px}.detail-icon{width:32px;height:32px;display:grid;place-items:center;border-radius:9px;color:#fff;font-size:12px;font-weight:700}.detail-icon.scan{background:var(--blue)}.detail-icon.cash{background:var(--orange)}.total-row{min-height:70px;padding:13px 16px;display:flex;align-items:center;justify-content:space-between}.total-row strong{font-size:23px}
.entry-form{display:grid;gap:12px}.entry-form>label{padding:14px 15px;border-radius:17px;background:var(--solid)}.entry-form label>span{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:13px;font-weight:600}.money-input{min-height:48px;display:flex;align-items:center;gap:7px}.money-input b{font-size:25px}.money-input input{width:100%;border:0;outline:0;color:var(--text);background:transparent;font-size:30px;font-weight:700}.money-input input::placeholder{color:rgba(116,116,128,.35)}.primary-button,.secondary-button,.danger-button{min-height:46px;border:0;border-radius:13px;display:flex;align-items:center;justify-content:center;gap:7px;font-weight:650;text-decoration:none;cursor:pointer}.primary-button{width:100%;color:#fff;background:var(--blue)}.secondary-button{padding:0 14px;color:var(--blue);background:var(--blue-soft)}.danger-button{padding:0 14px;color:var(--red);background:rgba(255,59,48,.1)}button:disabled{opacity:.5}.form-error{margin:3px 2px;color:var(--red);font-size:13px}.success-message{margin:7px 2px 0;color:var(--green);font-size:13px}
.settings-content{display:grid;gap:14px}.settings-section{padding:16px;border-radius:19px;background:var(--solid)}.settings-section h3{margin:0 0 6px;font-size:16px}.settings-section>p{margin:0 0 13px;color:var(--muted);font-size:13px;line-height:1.5}.date-range{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:13px 0}.date-range label{color:var(--muted);font-size:12px}.date-range input{width:100%;height:42px;margin-top:5px;padding:0 9px;border:.5px solid var(--line);border-radius:10px;color:var(--text);background:var(--bg)}.settings-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.new-link-card{margin-top:13px;padding:11px;border-radius:14px;background:var(--green-soft)}.new-link-card input{width:100%;height:39px;margin-bottom:9px;padding:0 9px;border:.5px solid var(--line);border-radius:8px;background:var(--solid);font-size:11px}
.gate-body{min-height:100vh;padding:24px;display:grid;place-items:center}.gate-card{width:min(100%,380px);padding:32px 24px;border-radius:25px;text-align:center;background:var(--card);box-shadow:var(--shadow)}.gate-icon{width:58px;height:58px;margin:auto;border-radius:18px;display:grid;place-items:center;color:#fff;background:linear-gradient(145deg,#087ef5,#6758e7);box-shadow:0 9px 22px rgba(0,122,255,.24);font-size:27px;font-weight:750}.gate-card .gate-kicker{margin:16px 0 4px;color:var(--blue);font-size:13px;font-weight:700}.gate-card h1{margin:0 0 8px;font-size:28px;letter-spacing:-.03em}.gate-card .gate-description{margin:0;color:var(--muted);line-height:1.6}.gate-form{margin-top:24px;display:grid;gap:11px;text-align:left}.gate-form label{margin-left:3px;color:var(--muted);font-size:13px;font-weight:650}.gate-form input{width:100%;height:52px;padding:0 15px;border:1px solid var(--line);border-radius:14px;color:var(--text);background:var(--bg);outline:0;font-size:18px;letter-spacing:.08em}.gate-form input:focus{border-color:var(--blue);box-shadow:0 0 0 4px rgba(0,122,255,.1)}.gate-form .primary-button{margin-top:3px}.gate-card .gate-error{margin:0 3px;color:var(--red);font-size:13px;text-align:left}
@media(min-width:560px){.day-cell{height:87px}}@media(prefers-color-scheme:dark){:root{--bg:#000;--card:rgba(28,28,30,.9);--solid:#1c1c1e;--text:#f5f5f7;--muted:#98989f;--line:rgba(255,255,255,.11);--blue-soft:rgba(0,122,255,.18);--green-soft:rgba(48,181,111,.16);--shadow:none}body{background:radial-gradient(circle at 90% -5%,rgba(0,122,255,.2),transparent 24rem),#000}.topbar{background:rgba(0,0,0,.72)}.calendar-loading{background:rgba(28,28,30,.62)}.cash-text{color:#ffb340}input{color-scheme:dark}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}

/* Professional dashboard refinements */
.topbar-copy{min-width:0}.store-switcher{min-height:34px;margin:0 0 0 -6px;padding:0 6px;border:0;border-radius:10px;display:flex;align-items:center;gap:6px;color:var(--text);background:transparent;cursor:pointer}.store-switcher:hover{background:rgba(116,116,128,.09)}.store-switcher #storeName{max-width:250px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:22px;font-weight:750;letter-spacing:-.02em}.store-chevron{color:var(--blue);font-size:17px;font-weight:700}
.hero-card{padding-bottom:14px}.yesterday-strip{position:relative;z-index:1;margin-top:18px;padding:12px 13px;border:1px solid rgba(255,255,255,.14);border-radius:15px;display:flex;align-items:center;justify-content:space-between;gap:12px;background:rgba(255,255,255,.11);backdrop-filter:blur(10px)}.yesterday-strip>div{display:flex;align-items:baseline;gap:8px}.yesterday-strip>div span{font-size:12px;opacity:.72}.yesterday-strip>div strong{font-size:18px}.yesterday-strip small{display:flex;align-items:center;gap:5px;font-size:10px;opacity:.84}.yesterday-strip small i{width:1px;height:11px;margin:0 3px;background:rgba(255,255,255,.35)}.yesterday-strip b{font-size:11px}
.chart-legend{display:flex;gap:15px;margin:12px 2px 0;color:var(--muted);font-size:11px}.chart-legend span{display:flex;align-items:center;gap:6px}.legend-line{width:17px;height:3px;border-radius:2px}.legend-line.scan{background:var(--blue)}.legend-line.cash{background:var(--orange)}.trend-chart{height:174px;padding:4px 0 0;display:block}.line-chart-svg{width:100%;height:142px;overflow:visible}.chart-grid-line{stroke:var(--line);stroke-width:1;stroke-dasharray:4 6}.scan-area{fill:url(#scanArea)}.curve{fill:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}.scan-curve{stroke:var(--blue)}.cash-curve{stroke:var(--orange);stroke-width:3}.curve-point{stroke:var(--solid);stroke-width:2;vector-effect:non-scaling-stroke}.scan-point{fill:var(--blue)}.cash-point{fill:var(--orange)}.line-labels{height:21px;display:flex;align-items:center;justify-content:space-between;color:var(--muted);font-size:10px}.line-labels span{min-width:0;flex:1;text-align:center}
.calendar-card{padding:18px 10px 12px}.calendar-heading{padding:0 4px 14px}.weekday-row{gap:4px;padding:0 2px 5px}.weekday-row span{font-size:11px}.calendar-grid{gap:4px;padding:0 2px}.day-cell{height:88px;padding:6px 4px;border:1px solid transparent;border-radius:12px;background:rgba(116,116,128,.045);align-items:stretch;transition:transform .15s ease,background .15s ease,border-color .15s ease}.day-cell.empty{visibility:hidden}.day-cell:not(.empty):active{transform:scale(.96);border-radius:12px;background:rgba(0,122,255,.1)}.day-cell.has-income{border-color:rgba(0,122,255,.14);background:linear-gradient(145deg,rgba(0,122,255,.09),rgba(0,122,255,.025))}.day-number{align-self:flex-start;width:23px;height:23px;margin:0 0 5px 1px;font-size:12px}.day-cell.today{border-color:rgba(0,122,255,.42);box-shadow:0 0 0 2px rgba(0,122,255,.08)}.day-cell.today .day-number{box-shadow:0 3px 9px rgba(0,122,255,.28)}.day-channels{display:grid;gap:3px}.income-chip{min-width:0;height:20px;padding:2px 3px 2px 2px;border-radius:6px;display:grid;grid-template-columns:16px minmax(0,1fr);align-items:center;gap:3px;text-align:left}.income-chip b{width:16px;height:16px;border-radius:4px;display:grid;place-items:center;color:#fff;font-size:9px;line-height:1}.income-chip em{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px;font-style:normal;font-weight:700}.scan-chip{color:#0066d6;background:rgba(0,122,255,.09)}.scan-chip b{background:var(--blue)}.cash-chip{color:#a66200;background:rgba(255,159,10,.11)}.cash-chip b{background:var(--orange)}
.store-list{display:grid;gap:9px}.store-option{width:100%;min-height:68px;padding:10px 12px;border:1px solid transparent;border-radius:16px;display:grid;grid-template-columns:42px 1fr auto;align-items:center;gap:11px;text-align:left;color:var(--text);background:var(--solid);cursor:pointer}.store-option.active{border-color:rgba(0,122,255,.24);background:var(--blue-soft)}.store-avatar{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;color:#fff;background:linear-gradient(145deg,#087ef5,#6758e7);font-size:17px;font-weight:750}.store-option>span:nth-child(2){display:grid;gap:4px}.store-option strong{font-size:15px}.store-option small{color:var(--muted);font-size:11px}.store-option i{color:var(--blue);font-size:18px;font-style:normal}.add-store-row{display:grid;grid-template-columns:1fr auto;gap:9px}.add-store-row input{min-width:0;height:44px;padding:0 12px;border:1px solid var(--line);border-radius:12px;color:var(--text);background:var(--bg);outline:0}.add-store-row input:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(0,122,255,.1)}.primary-button.compact{width:auto;padding:0 16px;white-space:nowrap}
@media(max-width:430px){.page-content{padding-left:10px;padding-right:10px}.calendar-card{padding-left:5px;padding-right:5px}.calendar-grid,.weekday-row{gap:2px}.day-cell{height:84px;padding-left:2px;padding-right:2px}.income-chip{grid-template-columns:15px minmax(0,1fr);gap:2px}.income-chip b{width:15px;height:15px;font-size:8px}.income-chip em{font-size:8px}.yesterday-strip{align-items:flex-start;flex-direction:column;gap:5px}}
