/* Nabung production stylesheet: consolidated current UI */
:root {
  --bg:#F8F7F2; --surface:#FFFFFF; --glass:rgba(255,255,255,.72); --ink:#18181B; --muted:#667085; --line:#18181B;
  --violet:#7C5CFC; --violet-soft:#EEE9FF; --butter:#F6DE78; --mint:#BFEBD1; --sky:#CFE6FF; --coral:#FFCABD;
  --success:#167647; --danger:#B93535; --warning:#9A6510; --focus:#5536D7;
  --shadow:4px 4px 0 #18181B; --soft-shadow:0 14px 35px rgba(24,24,27,.08); --radius:18px; --radius-sm:12px;
  --ease:cubic-bezier(.2,.8,.2,1); --topbar:72px; --bottom-nav:76px;
}
*{box-sizing:border-box}
html{background:var(--bg);color:var(--ink);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;line-height:1.5;-webkit-text-size-adjust:100%}
body{margin:0;min-width:320px;background:var(--bg)}
button,input,select,textarea{font:inherit;color:inherit}button,a{ -webkit-tap-highlight-color:transparent }a{color:inherit;text-decoration:none}img{display:block;max-width:100%}svg{display:inline-block;vertical-align:middle;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}p,h1,h2,h3{margin-top:0}.muted{color:var(--muted)}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.skip-link{position:fixed;left:16px;top:10px;z-index:200;transform:translateY(-150%);background:var(--ink);color:#fff;padding:10px 14px;border-radius:10px}.skip-link:focus{transform:none}
:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
.ambient{position:fixed;pointer-events:none;z-index:-1;filter:blur(1px);opacity:.55}.ambient-a{width:380px;height:380px;left:-120px;bottom:-80px;background:radial-gradient(circle,var(--sky),transparent 68%)}.ambient-b{width:420px;height:420px;right:-100px;top:-100px;background:radial-gradient(circle,var(--coral),transparent 70%)}
.brand{display:inline-flex;align-items:center;gap:10px;font-weight:800;letter-spacing:-.03em}.brand-large{font-size:22px}.brand-mark{width:22px;height:22px;display:grid;grid-template-columns:1fr 1fr;gap:2px;transform:rotate(45deg)}.brand-mark span{display:block;background:var(--violet);border-radius:4px}.brand-mark span:nth-child(2){background:#9D84FF}.brand-mark span:nth-child(3){background:#B7A8FF}.brand-mark span:nth-child(4){background:#6547E8}
.topbar{height:var(--topbar);position:sticky;top:0;z-index:60;background:rgba(248,247,242,.82);backdrop-filter:blur(16px);border-bottom:1px solid rgba(24,24,27,.12)}.topbar-inner{height:100%;max-width:1440px;margin:0 auto;padding:0 28px;display:flex;align-items:center;gap:28px}.desktop-nav{display:flex;align-items:center;justify-content:center;gap:4px;flex:1}.nav-link{position:relative;display:inline-flex;align-items:center;gap:8px;padding:10px 13px;border-radius:12px;font-size:14px;font-weight:650;color:#2F2F35}.nav-link.active{background:var(--violet-soft);box-shadow:inset 0 0 0 1px rgba(124,92,252,.22);color:#2B1E75}.nav-link svg{width:18px;height:18px}.unread-badge{min-width:20px;height:20px;padding:0 6px;border:2px solid var(--ink);background:var(--violet);color:#fff;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;font-size:11px;font-weight:800;line-height:1;transition:transform 120ms var(--ease)}.unread-badge.bump{transform:scale(1.1)}
.profile-menu{position:relative}.profile-menu summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:9px;padding:6px 8px;border-radius:14px}.profile-menu summary::-webkit-details-marker{display:none}.profile-summary-copy{display:flex;flex-direction:column;line-height:1.2;max-width:130px}.profile-summary-copy strong{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.profile-summary-copy small{font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.profile-popover{position:absolute;right:0;top:calc(100% + 10px);width:190px;padding:8px;background:var(--surface);border:2px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}.profile-popover a,.profile-popover button{width:100%;border:0;background:none;display:flex;align-items:center;gap:10px;padding:10px;border-radius:9px;text-align:left;cursor:pointer}.profile-popover a:hover,.profile-popover button:hover{background:var(--violet-soft)}.mobile-profile-link{display:none}
.avatar{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:40px;height:40px;border-radius:50%;overflow:hidden;background:var(--violet-soft);border:2px solid var(--line);font-weight:800;font-size:13px}.avatar img{width:100%;height:100%;object-fit:cover}.avatar-xs{width:30px;height:30px;font-size:10px;border-width:1.5px}.avatar-sm{width:36px;height:36px}.avatar-xl{width:104px;height:104px;font-size:28px}.avatar-pair{display:flex}.avatar-pair .avatar+.avatar{margin-left:-9px}
.app-main{max-width:1440px;margin:0 auto;padding:28px 28px 52px;min-height:calc(100vh - var(--topbar))}.bottom-nav{display:none}
.page-header{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:22px}.page-header h1,.mobile-page-title h1{font-size:clamp(27px,3vw,38px);line-height:1.05;letter-spacing:-.045em;margin-bottom:7px}.page-header p{margin:0;color:var(--muted)}.page-actions{display:flex;gap:10px}.eyebrow{font-size:12px;text-transform:uppercase;letter-spacing:.08em;font-weight:800;color:#5D4BC1;margin-bottom:8px}.mobile-page-title{display:none}
.neo-card{background:var(--glass);backdrop-filter:blur(16px);border:2px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:22px;transition:transform 120ms var(--ease)}.card-heading{margin-bottom:18px}.card-heading h2{margin-bottom:4px;font-size:22px;letter-spacing:-.03em}.card-heading p{margin-bottom:0;color:var(--muted)}.card-topline{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.card-topline>div{display:flex;align-items:center;gap:9px}.card-kicker{font-size:13px;font-weight:750}.icon-chip,.value-icon,.empty-icon{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:11px;border:1.5px solid rgba(24,24,27,.65);background:var(--violet-soft)}.icon-chip.violet,.value-icon.violet{background:var(--violet-soft)}.icon-chip.mint,.value-icon.mint{background:var(--mint)}.icon-chip.sky,.value-icon.sky{background:var(--sky)}.icon-chip.coral{background:var(--coral)}.icon-chip.butter{background:var(--butter)}
.button{min-height:44px;border:2px solid var(--line);border-radius:12px;padding:10px 16px;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-weight:750;cursor:pointer;box-shadow:var(--shadow);transition:transform 100ms var(--ease),box-shadow 100ms var(--ease),background 120ms var(--ease);text-align:center}.button:active{transform:translate(2px,2px);box-shadow:1px 1px 0 var(--line)}.button:disabled{opacity:.6;cursor:not-allowed}.button-primary{background:var(--violet);color:#fff}.button-secondary{background:var(--surface)}.button-danger{background:var(--danger);color:#fff}.button-ghost{background:transparent;box-shadow:none}.button-block{width:100%}.button-small{min-height:40px;padding:8px 12px;font-size:13px}.text-link{font-size:13px;color:#4D35B9;font-weight:750;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}.icon-button{width:44px;height:44px;border:1.5px solid rgba(24,24,27,.6);background:rgba(255,255,255,.82);border-radius:11px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:transform 100ms var(--ease),background 120ms}.icon-button:active{transform:translate(1px,1px)}.icon-button.danger,.danger-text{color:var(--danger)}.icon-button.active-pin{background:var(--butter)}
.field{display:grid;gap:7px}.field label{font-size:13px;font-weight:700}.field input,.field select,.field textarea{width:100%;min-height:46px;border:1.5px solid #47474E;border-radius:11px;background:rgba(255,255,255,.93);padding:10px 12px;outline:none;transition:border-color 120ms,box-shadow 120ms}.field textarea{resize:vertical}.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--focus);box-shadow:0 0 0 3px rgba(85,54,215,.13)}.field small{color:var(--muted)}.field-error{min-height:0!important;color:var(--danger)!important;font-size:12px}.field-error:empty{display:none}.form-stack{display:grid;gap:16px}.form-grid{display:grid;gap:14px}.form-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.form-section-title{font-weight:800;padding-top:8px;border-top:1px dashed rgba(24,24,27,.3)}.input-with-icon{position:relative}.input-with-icon>svg{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:#555}.input-with-icon>input{padding-left:42px}.password-wrap .password-toggle{position:absolute;right:4px;top:50%;transform:translateY(-50%);width:38px;height:38px;border:0;background:transparent}.password-wrap input{padding-right:48px}.alert{border:1.5px solid var(--line);border-radius:11px;padding:11px 12px;display:flex;align-items:flex-start;gap:9px;font-size:13px}.alert-error{background:#FFE7E3;color:#70251D}.alert svg{flex:0 0 auto;margin-top:1px}
.auth-body{min-height:100vh;background:linear-gradient(135deg,#fbfaf6 0%,#f8f7f2 45%,#f1ecff 100%)}.auth-shell{min-height:100vh;display:grid;grid-template-columns:minmax(0,1.05fr) minmax(420px,.95fr);max-width:1260px;margin:0 auto;padding:48px;gap:70px;align-items:center}.auth-intro{display:grid;gap:58px}.auth-copy{max-width:650px}.auth-copy h1{font-size:clamp(44px,5.5vw,74px);line-height:.98;letter-spacing:-.06em;margin-bottom:20px}.auth-copy>p:last-child{max-width:570px;color:#4C4C55;font-size:17px}.value-list{display:grid;gap:17px;max-width:520px}.value-item{display:grid;grid-template-columns:48px 1fr;gap:14px;align-items:start}.value-item .value-icon{width:44px;height:44px}.value-item strong{display:block;margin:1px 0 3px}.value-item p{margin:0;color:var(--muted);font-size:14px}.auth-form-wrap{display:flex;justify-content:center}.auth-card{width:min(100%,470px);padding:30px;background:rgba(255,255,255,.76)}.auth-card .button{margin-top:4px}.install-card{max-height:calc(100vh - 64px);overflow:auto}.install-shell{align-items:start;padding-top:36px;padding-bottom:36px}
.dashboard-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));grid-template-areas:"total total total goal goal goal goal goal chart chart chart chart" "contrib contrib contrib recent recent recent recent activity activity activity note note" "contrib contrib contrib recent recent recent recent activity activity activity chat chat";gap:16px;align-items:stretch}.dashboard-total{grid-area:total}.dashboard-goal{grid-area:goal}.dashboard-chart{grid-area:chart}.dashboard-contribution{grid-area:contrib}.dashboard-recent{grid-area:recent}.dashboard-activity{grid-area:activity}.dashboard-note{grid-area:note}.dashboard-chat{grid-area:chat}.dashboard-quick{display:none;grid-area:quick}.dashboard-grid .neo-card{min-width:0}.metric-value{display:block;font-size:clamp(30px,3vw,43px);letter-spacing:-.055em;line-height:1.1;margin:18px 0 11px}.metric-caption{margin:0;color:var(--muted)}.metric-caption strong{color:var(--ink)}.goal-card h2{font-size:19px;margin-bottom:8px}.goal-amount-row{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:12px}.goal-amount-row strong{font-size:29px;letter-spacing:-.045em}.goal-amount-row span{font-weight:800;background:var(--violet-soft);padding:4px 8px;border-radius:8px}.progress{height:16px;border:2px solid var(--line);border-radius:999px;background:#fff;overflow:hidden}.progress span{display:block;width:var(--progress);height:100%;background:linear-gradient(90deg,#6B4BEE,#9D83FF);transition:width 480ms var(--ease)}.goal-meta{display:flex;justify-content:space-between;gap:16px;margin-top:12px}.goal-meta span{display:flex;flex-direction:column}.goal-meta small{color:var(--muted)}.align-right{text-align:right}.contribution-card h2{font-size:18px}.contribution-pair{display:grid;grid-template-columns:1fr 1fr;gap:10px;height:calc(100% - 92px)}.contribution-person{min-width:0;border:1.5px solid rgba(24,24,27,.55);border-radius:14px;padding:14px;display:flex;flex-direction:column;justify-content:center;gap:10px}.mint-surface{background:linear-gradient(180deg,rgba(191,235,209,.83),rgba(236,255,244,.76))}.sky-surface{background:linear-gradient(180deg,rgba(207,230,255,.88),rgba(241,247,255,.8))}.person-line{display:flex;align-items:center;gap:8px;min-width:0}.person-line strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.contribution-value{font-size:18px;letter-spacing:-.03em}.chart-summary{display:grid;margin-bottom:12px}.chart-summary strong{font-size:26px;letter-spacing:-.04em}.chart-summary span{font-size:12px;color:var(--muted)}.mini-chart{height:110px;border-radius:12px;background:linear-gradient(180deg,rgba(124,92,252,.08),rgba(124,92,252,0));position:relative;overflow:hidden}.mini-chart:before,.mini-chart:after{content:"";position:absolute;left:0;right:0;border-top:1px dashed rgba(24,24,27,.12)}.mini-chart:before{top:33%}.mini-chart:after{top:66%}.mini-chart svg{width:100%;height:100%;stroke:var(--violet);stroke-width:2.4}.compact-list{display:grid}.compact-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid rgba(24,24,27,.1)}.compact-row:last-child{border-bottom:0}.compact-main{display:flex;flex-direction:column;min-width:0}.compact-main strong,.compact-main small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.compact-main small{font-size:11px;color:var(--muted)}.amount-positive{color:var(--success);font-size:13px;white-space:nowrap}.pinned-card{background:linear-gradient(145deg,rgba(246,222,120,.85),rgba(255,250,217,.88))}.note-body-preview,.note-body{white-space:pre-wrap;overflow-wrap:anywhere}.note-body-preview{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:5;overflow:hidden;font-size:14px}.pinned-card small{color:#665B35}.activity-list{display:grid}.activity-item{display:grid;grid-template-columns:auto 1fr;gap:10px;padding:9px 0;border-bottom:1px solid rgba(24,24,27,.1)}.activity-item:last-child{border-bottom:0}.activity-item p{margin:0;font-size:13px}.activity-item small{color:var(--muted);font-size:11px}.chat-preview-list{display:grid;gap:10px;margin-bottom:14px}.chat-preview-list>div{border-bottom:1px solid rgba(24,24,27,.1);padding-bottom:8px}.chat-preview-list strong{font-size:12px}.chat-preview-list p{font-size:12px;margin:1px 0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.chat-preview-list small{font-size:10px;color:var(--muted)}.badge{display:inline-flex;min-width:24px;height:24px;border-radius:999px;background:var(--violet);color:#fff;border:1.5px solid var(--line);align-items:center;justify-content:center;font-weight:800;font-size:12px}.empty-state{text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:36px 20px;color:var(--muted)}.empty-state h2,.empty-state h3{color:var(--ink);margin:0}.empty-state p{margin:0;max-width:420px}.empty-state.compact{padding:18px 8px;font-size:13px}.empty-state.large{min-height:320px}.empty-icon{margin-bottom:3px}.empty-compact{color:var(--muted);font-size:13px;padding:32px 0}
.savings-layout{display:grid;grid-template-columns:minmax(340px,430px) minmax(0,1fr);gap:20px;align-items:start}.savings-form{position:sticky;top:calc(var(--topbar) + 20px)}.amount-field{gap:9px}.money-input-wrap{display:flex;align-items:center;border:2px solid var(--line);background:#fff;border-radius:14px;padding:0 14px;box-shadow:2px 2px 0 rgba(24,24,27,.25)}.money-input-wrap span{font-weight:800;font-size:22px}.money-input-wrap input{border:0!important;box-shadow:none!important;min-height:62px!important;font-size:30px;font-weight:800;letter-spacing:-.03em;padding-left:8px!important}.quick-chips{display:flex;flex-wrap:wrap;gap:8px}.chip{min-height:36px;border:1.5px solid var(--line);background:var(--surface);border-radius:999px;padding:6px 11px;font-weight:700;cursor:pointer}.chip:active{background:var(--violet-soft)}.saving-list{display:grid}.saving-list-item{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:start;padding:15px 0;border-bottom:1px solid rgba(24,24,27,.12)}.saving-list-item:last-child{border-bottom:0}.saving-info{display:flex;flex-direction:column;min-width:0}.saving-info>span{font-size:12px;color:var(--muted)}.saving-info p{margin:6px 0 0;color:#47474F;font-size:13px;overflow-wrap:anywhere}.saving-amount{white-space:nowrap;color:var(--success)}.narrow-page{max-width:780px;margin:0 auto}.back-row{margin-bottom:16px}.back-link{display:inline-flex;align-items:center;gap:7px;font-weight:700;color:#4C3AA7}.narrow-page>.savings-form{position:static;max-width:620px;margin:0 auto}
.history-page{display:grid;gap:16px}.filter-bar{display:flex;gap:12px;align-items:end;padding:16px}.field.compact{min-width:145px}.field.compact.grow{flex:1;min-width:190px}.field.compact input,.field.compact select{min-height:40px;padding-top:7px;padding-bottom:7px}.filter-actions{display:flex;gap:8px}.history-card{padding:0;overflow:hidden}.history-table-wrap{overflow-x:auto}.history-table{width:100%;border-collapse:collapse}.history-table th,.history-table td{padding:14px 16px;text-align:left;border-bottom:1px solid rgba(24,24,27,.11);vertical-align:middle}.history-table th{font-size:12px;color:#51515A;background:rgba(255,255,255,.55)}.history-table td{font-size:13px}.history-table tr:last-child td{border-bottom:0}.note-cell{max-width:300px}.user-inline{display:inline-flex;align-items:center;gap:8px;white-space:nowrap}.category-pill{display:inline-flex;align-items:center;min-height:28px;padding:3px 9px;border-radius:999px;background:var(--violet-soft);font-size:12px;font-weight:700;white-space:nowrap}.row-actions{display:flex;justify-content:flex-end;gap:6px}.row-actions .icon-button{width:38px;height:38px}.history-mobile-list,.mobile-filter-trigger{display:none}.pagination{display:flex;gap:7px;justify-content:center;padding:18px;border-top:1px solid rgba(24,24,27,.1)}.pagination a{width:38px;height:38px;border:1.5px solid var(--line);border-radius:10px;display:inline-flex;align-items:center;justify-content:center;background:#fff;font-weight:700}.pagination a.active{background:var(--violet);color:#fff}
.notes-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.note-card{min-height:220px;display:flex;flex-direction:column}.note-card.pinned-note{background:linear-gradient(145deg,rgba(246,222,120,.88),rgba(255,250,217,.92));grid-column:span 2}.note-card h2{font-size:20px;letter-spacing:-.03em;margin-bottom:10px}.note-card .note-body{flex:1;margin-bottom:18px;color:#34343A}.note-card footer{display:flex;justify-content:space-between;align-items:center;gap:8px;color:var(--muted);font-size:11px}.note-actions{display:flex;gap:5px}.note-actions .icon-button{width:36px;height:36px}.pin-label{display:inline-flex;align-items:center;gap:5px;color:#6B5C19}.field-meta{display:flex;justify-content:space-between;align-items:center;gap:12px}.note-dialog .dialog-card{max-width:680px}
.chat-page{height:calc(100dvh - var(--topbar) - 56px);min-height:560px;display:grid;grid-template-rows:auto 1fr;gap:14px}.chat-header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px}.chat-header h1{font-size:25px;margin:0}.chat-header p{margin:0;color:var(--muted);font-size:12px}.chat-panel{min-height:0;padding:0;display:grid;grid-template-rows:1fr auto;position:relative;overflow:hidden}.chat-timeline{overflow-y:auto;padding:24px;display:flex;flex-direction:column;gap:12px;overscroll-behavior:contain}.chat-message{display:flex;gap:8px;max-width:min(74%,680px);align-items:flex-end}.chat-message.mine{align-self:flex-end}.chat-message.partner{align-self:flex-start}.bubble{border:1.5px solid rgba(24,24,27,.65);border-radius:16px;padding:9px 12px;background:var(--surface);box-shadow:2px 2px 0 rgba(24,24,27,.18);min-width:96px}.mine .bubble{background:var(--violet-soft);border-bottom-right-radius:5px}.partner .bubble{background:var(--sky);border-bottom-left-radius:5px}.bubble strong{display:block;font-size:11px;margin-bottom:2px}.bubble p{white-space:pre-wrap;overflow-wrap:anywhere;margin:0 0 3px}.bubble small{display:block;text-align:right;color:#65656F;font-size:10px}.chat-composer{border-top:1.5px solid var(--line);background:rgba(255,255,255,.9);padding:12px;display:grid;grid-template-columns:1fr auto;gap:8px;align-items:end}.chat-composer textarea{width:100%;resize:none;max-height:124px;min-height:46px;border:1.5px solid #555;border-radius:14px;padding:11px 13px;background:#fff}.chat-composer .field-error{grid-column:1/-1}.send-button{width:48px;height:48px;border:2px solid var(--line);border-radius:13px;background:var(--violet);color:#fff;box-shadow:3px 3px 0 var(--line);cursor:pointer}.send-button:active{transform:translate(2px,2px);box-shadow:1px 1px 0 var(--line)}.new-message-pill{position:absolute;right:18px;bottom:78px;border:1.5px solid var(--line);border-radius:999px;background:var(--ink);color:#fff;padding:7px 12px;font-weight:700;z-index:5}.chat-empty{margin:auto}.activity-list-full .activity-item{padding:14px 0}.activity-list-full .activity-item p{font-size:14px}
.settings-stack{display:grid;gap:18px}.profile-hero{display:flex;align-items:center;gap:20px;margin-bottom:22px}.profile-hero h2{margin-bottom:3px;font-size:25px}.profile-hero p{margin:0;color:var(--muted)}.avatar-form{display:flex;gap:16px;align-items:end;padding-top:18px;border-top:1px solid rgba(24,24,27,.12)}.avatar-form .field{flex:1}.subtle-card{background:linear-gradient(145deg,rgba(238,233,255,.76),rgba(255,255,255,.78))}
.dialog{border:0;background:transparent;padding:22px;max-width:none;max-height:none;width:100%;height:100%}.dialog::backdrop{background:rgba(24,24,27,.35);backdrop-filter:blur(4px)}.dialog[open]{display:grid;place-items:center;animation:dialog-in 180ms var(--ease)}.dialog-card{width:min(100%,560px);max-height:calc(100dvh - 44px);overflow:auto;background:rgba(255,255,255,.94);backdrop-filter:blur(16px);border:2px solid var(--line);border-radius:18px;box-shadow:6px 6px 0 var(--line);padding:22px}.dialog-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}.dialog-header h2{margin:0;font-size:24px;letter-spacing:-.035em}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:4px}.confirm-dialog .dialog-card{max-width:460px}.confirm-dialog .dialog-card>p{color:var(--muted)}@keyframes dialog-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.item-menu{position:relative}.item-menu summary{list-style:none;width:40px;height:40px;border:1.5px solid var(--line);border-radius:10px;display:flex;align-items:center;justify-content:center;background:#fff}.item-menu summary::-webkit-details-marker{display:none}.item-menu>div{position:absolute;right:0;top:46px;z-index:10;min-width:145px;background:#fff;border:1.5px solid var(--line);border-radius:10px;box-shadow:var(--shadow);padding:6px}.item-menu button{width:100%;border:0;background:none;padding:9px;display:flex;align-items:center;gap:8px;text-align:left}.toast-region{position:fixed;right:18px;bottom:18px;z-index:300;display:grid;gap:10px;max-width:min(390px,calc(100vw - 32px))}.toast{display:flex;align-items:flex-start;gap:10px;background:var(--ink);color:#fff;border:2px solid var(--ink);border-radius:13px;padding:12px 14px;box-shadow:4px 4px 0 rgba(124,92,252,.8);animation:toast-in 200ms var(--ease)}.toast.error{background:#7A2525;box-shadow:4px 4px 0 #E8A5A5}.toast.out{opacity:0;transform:translateY(6px);transition:180ms var(--ease)}@keyframes toast-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.loading-spinner{width:16px;height:16px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:spin .7s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.skeleton{background:linear-gradient(90deg,rgba(0,0,0,.05),rgba(255,255,255,.5),rgba(0,0,0,.05));background-size:220% 100%;animation:skeleton 1.2s ease-in-out infinite}@keyframes skeleton{to{background-position:-220% 0}}
.highlight-success{animation:highlight-border 600ms var(--ease)}@keyframes highlight-border{0%,100%{box-shadow:var(--shadow)}45%{box-shadow:4px 4px 0 var(--line),0 0 0 4px rgba(22,118,71,.23)}}
@media (hover:hover){.neo-card:hover{transform:translateY(-1px)}.button:hover{filter:brightness(1.02)}.nav-link:hover{background:rgba(238,233,255,.7)}.icon-button:hover{background:var(--violet-soft)}}
@media (max-width:1199px){.topbar-inner{padding:0 20px;gap:16px}.profile-summary-copy{display:none}.nav-link{padding:9px 10px}.dashboard-grid{grid-template-columns:repeat(6,minmax(0,1fr));grid-template-areas:"goal goal goal total total total" "chart chart chart contrib contrib contrib" "recent recent recent activity activity activity" "note note note chat chat chat"}.notes-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.note-card.pinned-note{grid-column:span 2}.app-main{padding:24px 20px 48px}}
@media (max-width:767px){:root{--topbar:60px;--bottom-nav:76px}.ambient-a{width:260px;height:260px}.ambient-b{width:290px;height:290px}.topbar-inner{padding:0 16px}.topbar .brand{font-size:15px}.topbar .brand-mark{width:19px;height:19px}.desktop-nav,.profile-menu{display:none}.mobile-profile-link{display:inline-flex;margin-left:auto}.app-main{padding:18px 16px calc(var(--bottom-nav) + 34px);min-height:calc(100dvh - var(--topbar))}.bottom-nav{position:fixed;z-index:70;left:10px;right:10px;bottom:calc(8px + env(safe-area-inset-bottom));height:var(--bottom-nav);display:grid;grid-template-columns:repeat(5,1fr);align-items:center;background:rgba(255,255,255,.92);backdrop-filter:blur(16px);border:2px solid var(--line);border-radius:20px;box-shadow:4px 4px 0 var(--line);padding:7px 6px}.bottom-link{position:relative;min-width:0;height:58px;display:flex;flex-direction:column;gap:3px;align-items:center;justify-content:center;font-size:10px;color:#5C5C65;font-weight:700;border-radius:12px}.bottom-link.active:not(.bottom-add){color:var(--violet);background:var(--violet-soft)}.bottom-link svg{width:20px;height:20px}.bottom-add{margin-top:-28px}.bottom-add>span{width:50px;height:50px;border:2px solid var(--line);border-radius:16px;background:var(--violet);color:#fff;display:flex;align-items:center;justify-content:center;box-shadow:3px 3px 0 var(--line)}.bottom-add small{font-size:10px;margin-top:1px}.bottom-badge{position:absolute;top:2px;right:8px;min-width:18px;height:18px;font-size:9px}.page-header{align-items:center;margin-bottom:16px}.page-header h1{font-size:29px}.page-header p{font-size:13px}.page-header .button{font-size:0;width:44px;padding:0}.page-header .button svg{margin:0}.mobile-page-title{display:block;margin-bottom:14px}.dashboard-grid{display:flex;flex-direction:column;gap:13px}.dashboard-goal{order:1}.dashboard-total{order:2}.dashboard-quick{display:flex;order:3;align-items:center;justify-content:space-between;gap:16px;background:linear-gradient(145deg,var(--violet-soft),rgba(255,255,255,.9))}.dashboard-quick h2{font-size:18px;margin:7px 0 3px}.dashboard-quick p{margin:0;color:var(--muted);font-size:12px}.dashboard-quick .button{flex:0 0 auto}.dashboard-contribution{order:4}.dashboard-chart{order:5}.dashboard-note{order:6}.dashboard-activity{order:7}.dashboard-recent{order:8}.dashboard-chat{order:9}.dashboard-grid .neo-card{padding:17px}.metric-value{font-size:34px}.goal-amount-row strong{font-size:25px}.contribution-pair{height:auto}.mini-chart{height:120px}.auth-shell{display:block;min-height:100dvh;padding:24px 16px 40px}.auth-intro{gap:24px}.auth-copy{padding-top:18px}.auth-copy h1{font-size:38px;margin-bottom:13px}.auth-copy>p:last-child{font-size:15px}.value-list{display:none}.auth-form-wrap{margin-top:28px}.auth-card{padding:20px}.install-shell .auth-intro{display:none}.install-card{max-height:none}.form-grid.two{grid-template-columns:1fr}.savings-layout{display:block}.desktop-form-panel{display:none}.desktop-only-action{display:none}.recent-savings-panel{padding:16px}.narrow-page>.savings-form{padding:18px}.money-input-wrap input{font-size:28px}.desktop-filter{display:none}.mobile-filter-trigger{display:block}.history-card{background:transparent;border:0;box-shadow:none;padding:0;overflow:visible}.history-table-wrap{display:none}.history-mobile-list{display:grid;gap:12px}.saving-card-mobile{background:var(--glass);backdrop-filter:blur(12px);border:2px solid var(--line);border-radius:15px;box-shadow:3px 3px 0 var(--line);padding:14px}.saving-mobile-top{display:flex;justify-content:space-between;align-items:flex-start}.saving-mobile-top>strong{font-size:22px;letter-spacing:-.04em}.saving-mobile-meta{display:flex;align-items:center;gap:7px;flex-wrap:wrap;color:var(--muted);font-size:12px;margin-top:7px}.saving-card-mobile>p{margin:9px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}.pagination{border:0;padding:16px 0}.notes-grid{grid-template-columns:1fr;gap:12px}.note-card.pinned-note{grid-column:auto}.note-card{min-height:190px;padding:17px}.note-actions{gap:3px}.note-actions .icon-button{width:40px;height:40px}.chat-page{height:calc(100dvh - var(--topbar) - var(--bottom-nav) - 32px);min-height:440px;gap:10px}.chat-header{border:0;box-shadow:none;background:transparent;padding:0 2px 4px}.chat-header>div:first-child p:last-child{display:none}.chat-header h1{font-size:25px}.chat-panel{border-radius:16px;box-shadow:3px 3px 0 var(--line)}.chat-timeline{padding:16px 12px}.chat-message{max-width:88%}.chat-composer{padding:9px;position:sticky;bottom:0}.bubble{font-size:14px}.profile-hero{flex-direction:column;text-align:center}.avatar-form{display:grid;align-items:stretch}.settings-stack .neo-card{padding:17px}.dialog{padding:12px}.dialog[open]{align-items:end}.dialog-card{padding:18px;max-height:calc(100dvh - 24px);border-radius:18px;width:100%}.dialog-actions .button{flex:1}.bottom-sheet{padding:0}.bottom-sheet[open]{place-items:end stretch}.bottom-sheet .dialog-card{border-radius:20px 20px 0 0;max-height:86dvh;box-shadow:0 -4px 0 var(--line);padding-bottom:calc(20px + env(safe-area-inset-bottom))}.toast-region{left:16px;right:16px;bottom:calc(var(--bottom-nav) + 24px);max-width:none}.auth-body .toast-region{bottom:18px}.app-body[data-page="chat"] .bottom-nav{transition:transform 180ms var(--ease)} }
@media (max-width:390px){.app-main{padding-left:12px;padding-right:12px}.bottom-nav{left:6px;right:6px}.neo-card{padding:15px}.contribution-person{padding:10px}.contribution-value{font-size:16px}.goal-meta strong{font-size:13px}.compact-row{grid-template-columns:auto minmax(0,1fr)}.compact-row>.amount-positive{grid-column:2}.chat-message{max-width:92%}}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}.progress span{transition:none!important}}
.mini-chart{overflow:visible}
.mini-chart svg{overflow:visible}
.mini-chart circle{fill:var(--surface);stroke:var(--violet);stroke-width:1;vector-effect:non-scaling-stroke;opacity:.55}
.mini-chart circle.active{fill:var(--violet);opacity:1}
.chart-tooltip{position:absolute;z-index:3;top:4px;transform:translateX(-50%);background:var(--ink);color:#fff;border-radius:8px;padding:5px 8px;font-size:11px;font-weight:700;white-space:nowrap;pointer-events:none}
.goal-edit-preview{display:grid;gap:8px;padding:12px;border:1.5px solid rgba(24,24,27,.35);border-radius:12px;background:var(--violet-soft)}
.goal-edit-preview>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px}
.goal-edit-preview .progress{height:10px}
.goal-edit-preview small{color:var(--muted)}
.metric-value,.goal-amount-row strong,.contribution-value{overflow-wrap:anywhere}
.profile-hero p{overflow-wrap:anywhere}
.button-small{min-height:44px}
.chip{min-height:44px}
.note-actions .icon-button,.row-actions .icon-button{width:44px;height:44px}
.item-menu summary{width:44px;height:44px}
.pagination a{width:44px;height:44px}

/* Auth UI */
:root {
  --v2-bg: #f5f3ee;
  --v2-surface: #fffefd;
  --v2-surface-strong: #ffffff;
  --v2-ink: #15151b;
  --v2-muted: #4f5665;
  --v2-muted-2: #626a79;
  --v2-line: #19191f;
  --v2-violet: #7456f6;
  --v2-violet-deep: #5b3fd1;
  --v2-violet-soft: #eee9ff;
  --v2-mint: #c8f0d7;
  --v2-sky: #d5e9ff;
  --v2-butter: #f8e59a;
  --v2-coral: #ffd2c7;
  --v2-danger: #a92f38;
  --v2-success: #126d45;
  --v2-radius-xl: 26px;
  --v2-radius-lg: 20px;
  --v2-radius-md: 15px;
  --v2-shadow-hard: 5px 5px 0 #19191f;
  --v2-shadow-small: 3px 3px 0 #19191f;
  --v2-shadow-soft: 0 24px 70px rgba(24, 24, 32, .10);
  --v2-ease: cubic-bezier(.2,.8,.2,1);
}

html { background: var(--v2-bg); }
body.ui-v2, body.v2-auth-body { color: var(--v2-ink); background: var(--v2-bg); }
body.ui-v2 { min-height: 100dvh; overflow-x: hidden; }

.ui-v2 *, .v2-auth-body * { min-width: 0; }
.ui-v2 p, .ui-v2 h1, .ui-v2 h2, .ui-v2 h3, .ui-v2 strong, .ui-v2 span,
.v2-auth-body p, .v2-auth-body h1, .v2-auth-body h2, .v2-auth-body h3 { overflow-wrap: anywhere; }

.v2-bg-orb { position: fixed; z-index: -2; pointer-events: none; border-radius: 999px; filter: blur(4px); opacity: .65; }
.v2-bg-orb-a { width: 420px; height: 420px; right: -120px; top: -120px; background: radial-gradient(circle, rgba(116,86,246,.16), rgba(116,86,246,0) 70%); }
.v2-bg-orb-b { width: 520px; height: 520px; left: 20%; bottom: -260px; background: radial-gradient(circle, rgba(200,240,215,.38), rgba(200,240,215,0) 70%); }

.v2-app-shell { display: grid; grid-template-columns: 292px minmax(0, 1fr); min-height: 100dvh; }
.v2-sidebar { position: sticky; top: 0; height: 100dvh; padding: 18px 14px 16px 18px; display: flex; flex-direction: column; gap: 22px; z-index: 50; }
.v2-sidebar::before { content: ""; position: absolute; inset: 14px 8px 14px 14px; z-index: -1; border: 2px solid var(--v2-line); border-radius: 28px; background: rgba(255,255,255,.80); box-shadow: var(--v2-shadow-hard), var(--v2-shadow-soft); backdrop-filter: blur(20px); }
.v2-sidebar-top { display: grid; gap: 18px; padding: 8px 8px 0; }
.v2-brand { display: inline-flex; align-items: center; gap: 10px; width: max-content; font-size: 20px; line-height: 1; font-weight: 850; letter-spacing: -.045em; }
.v2-brand-mark { width: 32px; height: 32px; display: inline-flex; align-items: flex-end; justify-content: center; gap: 3px; padding: 7px 6px; border: 2px solid var(--v2-line); border-radius: 10px; background: var(--v2-violet); box-shadow: 2px 2px 0 var(--v2-line); }
.v2-brand-mark i { display: block; width: 4px; border-radius: 999px; background: #fff; }
.v2-brand-mark i:nth-child(1) { height: 8px; }
.v2-brand-mark i:nth-child(2) { height: 14px; }
.v2-brand-mark i:nth-child(3) { height: 11px; }

.v2-space-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1.5px solid rgba(25,25,31,.28); border-radius: 16px; background: linear-gradient(145deg, rgba(238,233,255,.9), rgba(255,255,255,.78)); }
.v2-space-copy { display: grid; gap: 2px; min-width: 0; }
.v2-space-copy span { font-size: 10px; text-transform: uppercase; letter-spacing: .09em; font-weight: 800; color: var(--v2-muted); }
.v2-space-copy strong { font-size: 13px; line-height: 1.35; }
.v2-avatar-stack { display: flex; flex: 0 0 auto; }
.v2-avatar-stack .avatar + .avatar { margin-left: -8px; }
.v2-avatar-stack .avatar { border: 2px solid #fff; box-shadow: 0 0 0 1px var(--v2-line); }

.v2-sidebar-nav { display: grid; gap: 6px; padding: 0 8px; }
.v2-nav-label { margin: 0 8px 4px; color: var(--v2-muted); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; }
.v2-nav-item { position: relative; width: 100%; min-height: 46px; display: flex; align-items: center; gap: 11px; padding: 8px 11px; border: 1.5px solid transparent; border-radius: 14px; background: transparent; color: #343845; font-weight: 700; text-align: left; cursor: pointer; transition: transform 120ms var(--v2-ease), background 120ms var(--v2-ease), border-color 120ms var(--v2-ease); }
.v2-nav-button { font: inherit; }
.v2-nav-icon { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; background: rgba(25,25,31,.055); color: #343845; }
.v2-nav-icon svg { width: 18px; height: 18px; }
.v2-nav-item.active { border-color: rgba(25,25,31,.9); background: var(--v2-violet-soft); color: var(--v2-ink); box-shadow: 2px 2px 0 var(--v2-line); }
.v2-nav-item.active .v2-nav-icon { background: var(--v2-violet); color: #fff; }
.v2-nav-item.active::after { content: ""; position: absolute; right: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--v2-violet); }
.v2-unread { margin-left: auto; }

.v2-sidebar-bottom { margin-top: auto; display: grid; gap: 12px; padding: 0 8px 8px; }
.v2-quick-add { min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 9px; border: 2px solid var(--v2-line); border-radius: 14px; background: var(--v2-violet); color: #fff; box-shadow: var(--v2-shadow-small); font-weight: 800; transition: transform 100ms var(--v2-ease), box-shadow 100ms var(--v2-ease); }
.v2-quick-add svg { width: 19px; height: 19px; }
.v2-user-card { padding: 10px; border: 1.5px solid rgba(25,25,31,.35); border-radius: 17px; background: rgba(255,255,255,.72); }
.v2-user-main { display: flex; align-items: center; gap: 10px; }
.v2-user-copy { display: grid; gap: 1px; flex: 1; min-width: 0; }
.v2-user-copy strong { font-size: 13px; }
.v2-user-copy small { color: var(--v2-muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-user-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 9px; padding-top: 8px; border-top: 1px solid rgba(25,25,31,.12); }
.v2-user-actions form { margin: 0; }

.v2-workspace { min-width: 0; }
.v2-main { width: 100%; max-width: 1540px; margin: 0 auto; padding: 30px 34px 64px 24px; }
.v2-mobile-header, .v2-bottom-nav { display: none; }

.v2-kicker { color: #515866; font-size: 11px; line-height: 1.2; text-transform: uppercase; letter-spacing: .11em; font-weight: 850; }
.v2-page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 6px 0 24px; }
.v2-page-intro h1 { margin: 6px 0 6px; font-size: clamp(30px, 3vw, 44px); line-height: 1.02; letter-spacing: -.055em; }
.v2-page-intro p { max-width: 720px; margin: 0; color: var(--v2-muted); font-size: 14px; }

.v2-button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 10px 15px; border: 2px solid var(--v2-line); border-radius: 13px; font-weight: 800; cursor: pointer; box-shadow: var(--v2-shadow-small); transition: transform 100ms var(--v2-ease), box-shadow 100ms var(--v2-ease), filter 120ms var(--v2-ease); }
.v2-button-primary { background: var(--v2-violet); color: #fff; }
.v2-button-secondary { background: #fff; color: var(--v2-ink); }
.v2-button-block { width: 100%; }
.v2-button:active, .v2-quick-add:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--v2-line); }
.v2-icon-button { width: 42px; height: 42px; display: inline-grid; place-items: center; flex: 0 0 auto; padding: 0; border: 1.5px solid var(--v2-line); border-radius: 12px; background: rgba(255,255,255,.9); color: var(--v2-ink); cursor: pointer; transition: transform 100ms var(--v2-ease), background 120ms var(--v2-ease); }
.v2-icon-button svg { width: 19px; height: 19px; }
.v2-text-link { color: #4d36c7; font-size: 12px; font-weight: 850; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

.v2-dashboard-grid { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); gap: 18px; align-items: start; }
.v2-card { position: relative; min-width: 0; border: 2px solid var(--v2-line); border-radius: var(--v2-radius-lg); background: rgba(255,255,255,.86); box-shadow: var(--v2-shadow-hard), var(--v2-shadow-soft); backdrop-filter: blur(18px); padding: 21px; }
.v2-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(145deg, rgba(255,255,255,.34), rgba(255,255,255,0) 42%); }
.v2-card > * { position: relative; z-index: 1; }
.v2-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.v2-card-header.compact { align-items: center; margin-bottom: 14px; }
.v2-card-heading-group { display: flex; align-items: center; gap: 11px; min-width: 0; }
.v2-card-heading-group > div { min-width: 0; }
.v2-card-heading-group h2 { margin: 3px 0 0; font-size: 19px; line-height: 1.22; letter-spacing: -.035em; }
.v2-icon-box { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 auto; border: 1.5px solid var(--v2-line); border-radius: 12px; box-shadow: 2px 2px 0 rgba(25,25,31,.86); }
.v2-icon-box svg { width: 19px; height: 19px; }
.v2-icon-box.violet { background: var(--v2-violet-soft); color: var(--v2-violet-deep); }
.v2-icon-box.mint { background: var(--v2-mint); }
.v2-icon-box.sky { background: var(--v2-sky); }
.v2-icon-box.butter { background: var(--v2-butter); }
.v2-icon-box.coral { background: var(--v2-coral); }

.v2-goal-card { grid-column: span 8; min-height: 286px; background: linear-gradient(135deg, rgba(238,233,255,.96), rgba(255,255,255,.92) 56%, rgba(213,233,255,.72)); }
.v2-goal-card .v2-card-header { margin-bottom: 24px; }
.v2-goal-card .v2-card-heading-group h2 { font-size: clamp(21px, 2vw, 28px); }
.v2-goal-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 15px; }
.v2-goal-hero > div:first-child { display: grid; gap: 2px; }
.v2-goal-hero span { color: var(--v2-muted); font-size: 12px; font-weight: 650; }
.v2-goal-hero > div:first-child strong { font-size: clamp(29px, 3.7vw, 48px); line-height: 1; letter-spacing: -.06em; }
.v2-goal-percent { display: grid; gap: 2px; text-align: right; }
.v2-goal-percent strong { font-size: 24px; line-height: 1; color: var(--v2-violet-deep); }
.v2-progress { height: 17px; overflow: hidden; border: 2px solid var(--v2-line); border-radius: 999px; background: rgba(255,255,255,.86); box-shadow: inset 0 1px 0 rgba(0,0,0,.04); }
.v2-progress span { display: block; width: var(--progress, 0%); height: 100%; background: linear-gradient(90deg, var(--v2-violet), #967fff); border-right: 1.5px solid var(--v2-line); transition: width 480ms var(--v2-ease); }
.v2-goal-meta { display: grid; grid-template-columns: 1.25fr 1fr .8fr; gap: 10px; margin-top: 16px; }
.v2-goal-meta div { min-width: 0; padding: 10px 11px; border: 1px solid rgba(25,25,31,.18); border-radius: 12px; background: rgba(255,255,255,.62); }
.v2-goal-meta span { display: block; margin-bottom: 2px; color: var(--v2-muted); font-size: 10px; font-weight: 700; }
.v2-goal-meta strong { display: block; font-size: 12px; line-height: 1.35; }
.v2-goal-empty { display: grid; gap: 15px; align-items: start; max-width: 520px; }
.v2-goal-empty p { margin: 0; color: var(--v2-muted); }
.v2-goal-empty .v2-button { width: max-content; }

.v2-metric-stack { grid-column: span 4; display: grid; gap: 18px; }
.v2-metric-card { min-height: 134px; }
.v2-metric-card p { margin: 7px 0 0; color: var(--v2-muted); font-size: 12px; }
.v2-metric-value { display: block; font-size: clamp(27px, 3vw, 39px); line-height: 1; letter-spacing: -.055em; }
.v2-metric-month { background: linear-gradient(145deg, rgba(213,233,255,.86), rgba(255,255,255,.92)); }

.v2-chart-card { grid-column: span 8; min-height: 330px; }
.v2-chart-total { align-self: center; font-size: 15px; }
.v2-chart { position: relative; height: 210px; margin: 8px 0 0; color: var(--v2-violet); }
.v2-chart svg { width: 100%; height: 100%; overflow: visible; }
.v2-chart-area { fill: url(#v2-chart-fill); stroke: none; }
.v2-chart-line { stroke: currentColor; stroke-width: 2.6; }
.v2-chart-point { fill: #fff; stroke: currentColor; stroke-width: 1.35; opacity: .65; vector-effect: non-scaling-stroke; }
.v2-chart-point.active { fill: currentColor; opacity: 1; }
.v2-chart-tooltip { top: 0; }
.v2-chart-footer { display: flex; justify-content: space-between; color: var(--v2-muted); font-size: 10px; font-weight: 700; }

.v2-contribution-card { grid-column: span 4; min-height: 330px; }
.v2-contribution-list { display: grid; gap: 12px; }
.v2-contribution-item { padding: 12px; border: 1.5px solid rgba(25,25,31,.25); border-radius: 15px; background: rgba(255,255,255,.72); }
.v2-contribution-person { display: flex; align-items: center; gap: 9px; }
.v2-contribution-person > div { display: grid; gap: 1px; }
.v2-contribution-person strong { font-size: 13px; }
.v2-contribution-person span { color: var(--v2-muted); font-size: 10px; }
.v2-contribution-amount { display: block; margin: 12px 0 7px; font-size: 20px; line-height: 1; letter-spacing: -.045em; }
.v2-mini-progress { height: 8px; overflow: hidden; border: 1px solid rgba(25,25,31,.6); border-radius: 999px; background: #fff; }
.v2-mini-progress span { display: block; height: 100%; width: var(--progress, 0%); background: var(--v2-violet); transition: width 480ms var(--v2-ease); }

.v2-recent-card { grid-column: span 7; }
.v2-transaction-list { display: grid; }
.v2-transaction-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 11px; align-items: center; padding: 12px 0; border-top: 1px solid rgba(25,25,31,.11); }
.v2-transaction-row:first-child { border-top: 0; padding-top: 1px; }
.v2-transaction-copy { display: grid; gap: 1px; }
.v2-transaction-copy strong { font-size: 13px; }
.v2-transaction-copy span, .v2-transaction-copy p { color: var(--v2-muted); font-size: 11px; }
.v2-transaction-copy p { margin: 3px 0 0; line-height: 1.4; white-space: normal; }
.v2-transaction-amount { font-size: 13px; white-space: nowrap; color: var(--v2-success); }

.v2-side-stack { grid-column: span 5; display: grid; gap: 18px; }
.v2-note-card { background: linear-gradient(145deg, rgba(248,229,154,.76), rgba(255,255,255,.94) 70%); }
.v2-note-card h2 { margin: 2px 0 9px; font-size: 19px; }
.v2-note-body { margin: 0 0 11px; color: #30333c; white-space: pre-wrap; line-height: 1.55; }
.v2-note-card small { color: var(--v2-muted); }
.v2-chat-card { background: linear-gradient(145deg, rgba(213,233,255,.7), rgba(255,255,255,.94) 70%); }
.v2-count-pill { min-width: 26px; height: 26px; display: inline-grid; place-items: center; border: 1.5px solid var(--v2-line); border-radius: 999px; background: var(--v2-violet); color: #fff; font-size: 11px; font-weight: 850; }
.v2-chat-preview { display: grid; gap: 10px; margin-bottom: 14px; }
.v2-chat-preview > div { padding: 9px 10px; border: 1px solid rgba(25,25,31,.15); border-radius: 12px; background: rgba(255,255,255,.64); }
.v2-chat-preview strong { font-size: 11px; }
.v2-chat-preview p { margin: 2px 0; font-size: 12px; line-height: 1.45; white-space: pre-wrap; }
.v2-chat-preview small { color: var(--v2-muted); font-size: 9px; }

.v2-activity-card { grid-column: span 12; }
.v2-activity-list { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; }
.v2-activity-item { display: flex; align-items: flex-start; gap: 9px; padding: 10px; border: 1px solid rgba(25,25,31,.14); border-radius: 13px; background: rgba(255,255,255,.62); }
.v2-activity-item p { margin: 0; font-size: 11px; line-height: 1.45; }
.v2-activity-item small { display: block; margin-top: 3px; color: var(--v2-muted); font-size: 9px; }
.v2-empty-inline { padding: 12px 0; color: var(--v2-muted); font-size: 13px; }
.v2-empty-state { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px dashed rgba(25,25,31,.35); border-radius: 14px; background: rgba(255,255,255,.48); }
.v2-empty-state > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--v2-violet-soft); }
.v2-empty-state strong { font-size: 13px; }
.v2-empty-state p { margin: 2px 0 0; color: var(--v2-muted); font-size: 11px; }

/* Existing feature views keep their PHP/JS behavior, while the v2 shell gives them a clearer visual rhythm. */
.ui-v2 .page-header { margin: 4px 0 22px; align-items: flex-end; }
.ui-v2 .page-header h1 { margin: 5px 0 5px; color: var(--v2-ink); font-size: clamp(30px,3vw,42px); line-height: 1.04; letter-spacing: -.05em; }
.ui-v2 .page-header p { color: var(--v2-muted); font-size: 13px; }
.ui-v2 .neo-card { height: auto; min-height: 0; border-radius: var(--v2-radius-lg); background: rgba(255,255,255,.86); box-shadow: var(--v2-shadow-hard), var(--v2-shadow-soft); }
.ui-v2 .neo-card p, .ui-v2 .neo-card small, .ui-v2 .muted { color: var(--v2-muted); }
.ui-v2 .neo-card h1, .ui-v2 .neo-card h2, .ui-v2 .neo-card h3, .ui-v2 .neo-card strong { color: var(--v2-ink); }
.ui-v2 .note-body, .ui-v2 .note-body-preview, .ui-v2 .saving-info p, .ui-v2 .note-cell, .ui-v2 .activity-item p { white-space: pre-wrap; overflow-wrap: anywhere; max-width: none; }
.ui-v2 .compact-main, .ui-v2 .saving-info, .ui-v2 .activity-item > div { min-width: 0; }
.ui-v2 .field > small, .ui-v2 .field-meta small { color: var(--v2-muted); }
.ui-v2 input, .ui-v2 textarea, .ui-v2 select { color: var(--v2-ink); background: #fff; }
.ui-v2 input::placeholder, .ui-v2 textarea::placeholder { color: #707786; opacity: 1; }
.ui-v2 .card-kicker, .ui-v2 .eyebrow { color: #505867; }
.ui-v2 .text-link { color: #4d36c7; }
.ui-v2 .settings-stack, .ui-v2 .narrow-page { max-width: 900px; }
.ui-v2 .history-card { overflow: visible; }
.ui-v2 .history-table { min-width: 820px; }
.ui-v2 .history-table-wrap { overflow-x: auto; }
.ui-v2 .note-card { min-height: 0; }
.ui-v2 .notes-grid { align-items: start; }
.ui-v2 .note-card .note-body { display: block; -webkit-line-clamp: unset; overflow: visible; }
.ui-v2 .button { border-radius: 13px; }

.v2-chat-dialog { width: min(480px, calc(100vw - 28px)); max-width: none; height: calc(100dvh - 28px); max-height: none; margin: 14px 14px 14px auto; padding: 0; overflow: visible; border: 0; background: transparent; color: var(--v2-ink); }
.v2-chat-dialog::backdrop { background: rgba(20,20,27,.28); backdrop-filter: blur(5px); }
.v2-chat-dialog[open] { animation: v2-chat-in 190ms var(--v2-ease); }
.v2-chat-panel { height: 100%; display: grid; grid-template-rows: auto minmax(0,1fr) auto; overflow: hidden; border: 2px solid var(--v2-line); border-radius: 24px; background: rgba(255,255,255,.94); box-shadow: 7px 7px 0 var(--v2-line), 0 30px 90px rgba(20,20,27,.22); backdrop-filter: blur(22px); }
.v2-chat-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 18px; border-bottom: 1.5px solid rgba(25,25,31,.18); background: linear-gradient(145deg, rgba(238,233,255,.92), rgba(255,255,255,.82)); }
.v2-chat-heading { display: flex; align-items: center; gap: 13px; }
.v2-chat-heading h2 { margin: 2px 0 0; font-size: 20px; letter-spacing: -.04em; }
.v2-chat-heading p { margin: 1px 0 0; color: var(--v2-muted); font-size: 10px; }
.v2-chat-timeline { position: relative; overflow-y: auto; overscroll-behavior: contain; padding: 18px; scroll-behavior: smooth; }
.v2-chat-loading { display: grid; gap: 10px; width: 70%; }
.v2-chat-loading span { display: block; height: 48px; border-radius: 14px; background: linear-gradient(90deg, #ececf0, #f8f8fa, #ececf0); background-size: 220% 100%; animation: v2-skeleton 1.1s linear infinite; }
.v2-chat-message { display: flex; align-items: flex-end; gap: 8px; max-width: 86%; margin: 10px 0; animation: v2-message-in 160ms var(--v2-ease); }
.v2-chat-message.mine { margin-left: auto; justify-content: flex-end; }
.v2-chat-message.partner { margin-right: auto; }
.v2-chat-bubble { min-width: 0; padding: 10px 12px; border: 1.5px solid var(--v2-line); border-radius: 15px 15px 15px 5px; background: #fff; box-shadow: 2px 2px 0 rgba(25,25,31,.85); }
.v2-chat-message.mine .v2-chat-bubble { border-radius: 15px 15px 5px 15px; background: var(--v2-violet-soft); }
.v2-chat-bubble strong { display: block; margin-bottom: 2px; font-size: 10px; }
.v2-chat-bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.5; }
.v2-chat-bubble small { display: block; margin-top: 4px; color: var(--v2-muted); font-size: 9px; }
.v2-chat-empty { min-height: 100%; display: grid; place-content: center; justify-items: center; text-align: center; padding: 30px; color: var(--v2-muted); }
.v2-chat-empty span { width: 46px; height: 46px; display: grid; place-items: center; margin-bottom: 8px; border: 1.5px solid var(--v2-line); border-radius: 14px; background: var(--v2-sky); }
.v2-chat-empty strong { color: var(--v2-ink); }
.v2-chat-empty p { margin: 3px 0 0; font-size: 12px; }
.v2-chat-composer { position: relative; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; align-items: end; padding: 12px; border-top: 1.5px solid rgba(25,25,31,.16); background: rgba(255,255,255,.96); }
.v2-chat-composer textarea { width: 100%; min-height: 46px; max-height: 124px; resize: none; padding: 11px 12px; border: 1.5px solid var(--v2-line); border-radius: 13px; background: #fff; color: var(--v2-ink); outline: none; }
.v2-chat-composer textarea:focus { box-shadow: 0 0 0 3px rgba(116,86,246,.23); }
.v2-chat-composer .field-error { grid-column: 1 / -1; margin-top: -4px; }
.v2-send-button { width: 46px; height: 46px; display: grid; place-items: center; border: 2px solid var(--v2-line); border-radius: 13px; background: var(--v2-violet); color: #fff; box-shadow: 2px 2px 0 var(--v2-line); cursor: pointer; }
.v2-send-button:active { transform: translate(1px,1px); box-shadow: 1px 1px 0 var(--v2-line); }
.v2-new-message { position: absolute; z-index: 2; left: 50%; bottom: 74px; transform: translateX(-50%); min-height: 36px; padding: 7px 11px; border: 1.5px solid var(--v2-line); border-radius: 999px; background: var(--v2-ink); color: #fff; font-size: 11px; font-weight: 800; }

.v2-enter { opacity: 0; animation: v2-enter 420ms var(--v2-ease) forwards; animation-delay: var(--delay,0ms); }
.unread-badge.bump { animation: v2-badge 140ms var(--v2-ease); }

@keyframes v2-enter { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@keyframes v2-chat-in { from { opacity: 0; transform: translateX(14px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes v2-message-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes v2-badge { 0% { transform: scale(.9); } 100% { transform: scale(1); } }
@keyframes v2-skeleton { to { background-position: -220% 0; } }

@media (hover:hover) {
  .v2-nav-item:hover { transform: translateY(-1px); background: rgba(238,233,255,.58); }
  .v2-button:hover, .v2-quick-add:hover { filter: brightness(1.025); }
  .v2-icon-button:hover { background: var(--v2-violet-soft); }
  .v2-card { transition: transform 120ms var(--v2-ease), box-shadow 120ms var(--v2-ease); }
  .v2-card:hover { transform: translateY(-1px); }
}

@media (max-width: 1199px) {
  .v2-app-shell { grid-template-columns: 242px minmax(0,1fr); }
  .v2-sidebar { padding-left: 12px; }
  .v2-user-copy small { display: none; }
  .v2-main { padding: 28px 22px 58px 18px; }
  .v2-goal-card, .v2-chart-card { grid-column: span 7; }
  .v2-metric-stack, .v2-contribution-card { grid-column: span 5; }
  .v2-recent-card { grid-column: span 7; }
  .v2-side-stack { grid-column: span 5; }
  .v2-activity-list { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 900px) {
  .v2-app-shell { display: block; }
  .v2-sidebar { display: none; }
  .v2-mobile-header { position: sticky; top: 0; z-index: 55; height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 10px 18px; border-bottom: 1px solid rgba(25,25,31,.13); background: rgba(245,243,238,.86); backdrop-filter: blur(18px); }
  .v2-mobile-header .v2-brand { font-size: 18px; }
  .v2-mobile-header .v2-brand-mark { width: 29px; height: 29px; }
  .v2-main { padding: 20px 16px calc(102px + env(safe-area-inset-bottom)); }
  .v2-bottom-nav { position: fixed; z-index: 70; left: 10px; right: 10px; bottom: calc(8px + env(safe-area-inset-bottom)); height: 74px; display: grid; grid-template-columns: repeat(5,1fr); align-items: center; padding: 7px 5px; border: 2px solid var(--v2-line); border-radius: 21px; background: rgba(255,255,255,.94); box-shadow: 4px 4px 0 var(--v2-line), 0 16px 50px rgba(20,20,27,.14); backdrop-filter: blur(18px); }
  .v2-bottom-link { position: relative; min-width: 0; height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0; border: 0; border-radius: 12px; background: transparent; color: #545a67; font: inherit; font-size: 10px; font-weight: 800; }
  .v2-bottom-link svg { width: 20px; height: 20px; }
  .v2-bottom-link.active:not(.v2-bottom-add) { background: var(--v2-violet-soft); color: var(--v2-violet-deep); }
  .v2-bottom-add { margin-top: -25px; }
  .v2-bottom-add > span { width: 50px; height: 50px; display: grid; place-items: center; border: 2px solid var(--v2-line); border-radius: 16px; background: var(--v2-violet); color: #fff; box-shadow: 3px 3px 0 var(--v2-line); }
  .v2-bottom-add small { font-size: 10px; }
  .v2-bottom-badge { position: absolute; top: 2px; right: 7px; }

  .v2-page-intro { align-items: center; margin-top: 2px; }
  .v2-page-intro h1 { font-size: 32px; }
  .v2-page-intro p { font-size: 12px; }
  .v2-page-intro .v2-button { width: 46px; padding: 0; font-size: 0; }
  .v2-page-intro .v2-button svg { width: 20px; height: 20px; }
  .v2-dashboard-grid { display: flex; flex-direction: column; gap: 14px; }
  .v2-dashboard-grid > * { width: 100%; }
  .v2-goal-card { order: 1; }
  .v2-metric-stack { order: 2; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .v2-chart-card { order: 3; }
  .v2-contribution-card { order: 4; }
  .v2-recent-card { order: 5; }
  .v2-side-stack { order: 6; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .v2-activity-card { order: 7; }
  .v2-activity-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .v2-card { padding: 18px; }
  .v2-goal-meta { grid-template-columns: repeat(3,minmax(0,1fr)); }

  .ui-v2 .page-header h1 { font-size: 32px; }
  .ui-v2 .page-header { margin-top: 2px; }
  .ui-v2 .app-main { padding: 0; }
  .ui-v2 .toast-region { bottom: calc(92px + env(safe-area-inset-bottom)); }
}

@media (max-width: 640px) {
  .v2-main { padding-left: 13px; padding-right: 13px; }
  .v2-page-intro { gap: 12px; }
  .v2-page-intro h1 { font-size: 29px; }
  .v2-page-intro p { max-width: 250px; }
  .v2-card { border-radius: 18px; box-shadow: 4px 4px 0 var(--v2-line), 0 16px 40px rgba(24,24,32,.07); }
  .v2-goal-hero { align-items: flex-start; flex-direction: column; gap: 10px; }
  .v2-goal-percent { text-align: left; }
  .v2-goal-meta { grid-template-columns: 1fr; }
  .v2-metric-stack { grid-template-columns: 1fr; }
  .v2-metric-card { min-height: 0; }
  .v2-chart { height: 160px; }
  .v2-card-header { margin-bottom: 14px; }
  .v2-card-heading-group h2 { font-size: 17px; }
  .v2-transaction-row { grid-template-columns: auto minmax(0,1fr); align-items: start; }
  .v2-transaction-amount { grid-column: 2; white-space: normal; font-size: 14px; }
  .v2-side-stack { grid-template-columns: 1fr; }
  .v2-activity-list { grid-template-columns: 1fr; }
  .v2-activity-item p { font-size: 12px; }

  .v2-chat-dialog { width: 100vw; height: 100dvh; margin: 0; }
  .v2-chat-panel { border-width: 0; border-radius: 0; box-shadow: none; }
  .v2-chat-header { padding: 12px 14px; }
  .v2-chat-timeline { padding: 14px 12px; }
  .v2-chat-message { max-width: 90%; }
  .v2-chat-composer { padding: 9px 10px calc(10px + env(safe-area-inset-bottom)); }
  .v2-new-message { bottom: calc(76px + env(safe-area-inset-bottom)); }
}

@media (max-width: 390px) {
  .v2-main { padding-left: 10px; padding-right: 10px; }
  .v2-mobile-header { padding-left: 12px; padding-right: 12px; }
  .v2-bottom-nav { left: 6px; right: 6px; }
  .v2-card { padding: 15px; }
  .v2-metric-value { font-size: 28px; }
  .v2-goal-hero > div:first-child strong { font-size: 30px; }
}

.v2-auth-body { min-height: 100dvh; overflow-x: hidden; background:
  radial-gradient(circle at 12% 18%, rgba(116,86,246,.18), transparent 30%),
  radial-gradient(circle at 92% 90%, rgba(200,240,215,.48), transparent 34%),
  var(--v2-bg); }
.v2-auth-shell { min-height: 100dvh; display: grid; grid-template-columns: minmax(0,1.05fr) minmax(430px,.75fr); gap: clamp(40px,7vw,110px); align-items: center; max-width: 1440px; margin: 0 auto; padding: 52px clamp(28px,6vw,88px); }
.v2-auth-story { align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.v2-brand-auth { margin-bottom: clamp(54px,9vh,100px); }
.v2-auth-copy { max-width: 700px; }
.v2-auth-copy h1 { margin: 10px 0 18px; font-size: clamp(46px,5.3vw,76px); line-height: .98; letter-spacing: -.065em; }
.v2-auth-copy > p:last-child { max-width: 610px; margin: 0; color: var(--v2-muted); font-size: 17px; line-height: 1.65; }
.v2-auth-points { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-top: clamp(36px,7vh,72px); }
.v2-auth-points > div { padding: 14px; border: 1.5px solid rgba(25,25,31,.32); border-radius: 16px; background: rgba(255,255,255,.55); backdrop-filter: blur(12px); }
.v2-auth-points > div > span { width: 34px; height: 34px; display: grid; place-items: center; margin-bottom: 10px; border: 1.5px solid var(--v2-line); border-radius: 10px; background: var(--v2-violet-soft); }
.v2-auth-points strong { display: block; font-size: 12px; }
.v2-auth-points small { display: block; margin-top: 3px; color: var(--v2-muted); font-size: 10px; line-height: 1.45; }
.v2-auth-form-wrap { width: 100%; max-width: 490px; justify-self: end; }
.v2-auth-card { padding: clamp(22px,3vw,34px); border: 2px solid var(--v2-line); border-radius: 26px; background: rgba(255,255,255,.82); box-shadow: 7px 7px 0 var(--v2-line), var(--v2-shadow-soft); backdrop-filter: blur(22px); }
.v2-auth-card-head { margin-bottom: 22px; }
.v2-auth-card-head h2 { margin: 5px 0 5px; font-size: 31px; letter-spacing: -.05em; }
.v2-auth-card-head p { margin: 0; color: var(--v2-muted); font-size: 13px; }
.v2-auth-body .field label { color: var(--v2-ink); font-weight: 750; }
.v2-auth-body input { background: rgba(255,255,255,.95); }
.v2-auth-footnote { margin: 15px auto 0; color: var(--v2-muted); text-align: center; font-size: 11px; }

@media (max-width: 900px) {
  .v2-auth-shell { grid-template-columns: 1fr; max-width: 620px; gap: 30px; padding: 28px 18px 42px; }
  .v2-brand-auth { margin-bottom: 42px; }
  .v2-auth-copy h1 { font-size: clamp(40px,11vw,58px); }
  .v2-auth-copy > p:last-child { font-size: 15px; }
  .v2-auth-points { display: none; }
  .v2-auth-form-wrap { justify-self: stretch; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ui-v2 *, .ui-v2 *::before, .ui-v2 *::after, .v2-auth-body *, .v2-auth-body *::before, .v2-auth-body *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* Current application design system */
:root {
  --v26-font-body: "Avenir Next", "Segoe UI Variable Text", "Segoe UI", Arial, sans-serif;
  --v26-font-display: "Bahnschrift", "Avenir Next Condensed", "DIN Alternate", "Segoe UI Variable Display", "Segoe UI", sans-serif;
  --v26-ink: #17171d;
  --v26-muted: #667082;
  --v26-line: #1d1d24;
  --v26-violet: #7657f6;
  --v26-violet-soft: #f1edff;
  --v26-mint: #eef8f1;
  --v26-sky: #eff4ff;
  --v26-yellow: #fff5d8;
  --v26-surface: rgba(255,255,255,.88);
  --v26-shadow: 4px 4px 0 var(--v26-line);
  --v26-soft-shadow: 0 16px 40px rgba(70,60,120,.10);
  --v26-ease: cubic-bezier(.2,.8,.2,1);
}

body.ui-v26,
.ui-v26 button,
.ui-v26 input,
.ui-v26 textarea,
.ui-v26 select { font-family: var(--v26-font-body); }
.ui-v26 h1,
.ui-v26 h2,
.ui-v26 h3,
.ui-v26 .metric-value,
.ui-v26 .money-input-wrap input { font-family: var(--v26-font-display); letter-spacing: -.025em; }
.ui-v26 .ambient-a,.ui-v26 .ambient-b { display:none; }
.v26-bg { position:fixed; z-index:-1; pointer-events:none; border-radius:50%; filter:blur(84px); opacity:.34; }
.v26-bg-a { width:340px; height:340px; right:3%; top:-90px; background:rgba(119,87,246,.18); }
.v26-bg-b { width:390px; height:390px; left:-160px; bottom:2%; background:rgba(187,226,203,.26); }

.v26-shell { display:grid; grid-template-columns:280px minmax(0,1fr); min-height:100dvh; }
.v26-sidebar { position:sticky; top:0; height:100dvh; padding:24px 20px 22px; display:flex; flex-direction:column; gap:16px; }
.v26-brand { display:flex; align-items:center; gap:14px; color:var(--v26-ink); }
.v26-brand-mark { width:46px; height:46px; flex:0 0 46px; display:grid; grid-template-columns:repeat(3,1fr); gap:4px; padding:8px; border:2px solid var(--v26-line); border-radius:16px; background:#fff; box-shadow:2px 2px 0 var(--v26-line); }
.v26-brand-mark i { display:block; border-radius:999px; background:var(--v26-violet); }
.v26-brand > span:last-child { display:grid; gap:2px; min-width:0; }
.v26-brand strong { font-size:28px; font-weight:650; line-height:1; }
.v26-brand small { color:var(--v26-muted); font-size:13px; }
.v26-nav { display:grid; align-content:start; gap:9px; flex:1; min-height:0; overflow-y:auto; margin-top:10px; padding-right:2px; }
.v26-nav-item { position:relative; min-height:52px; display:flex; align-items:center; gap:13px; padding:0 16px; border-radius:16px; background:transparent; color:var(--v26-ink); font-size:16px; font-weight:550; }
.v26-nav-item svg { width:20px; height:20px; flex:0 0 20px; }
.v26-nav-item.active { background:rgba(255,255,255,.84); box-shadow:2px 2px 0 var(--v26-line); font-weight:650; }
.v26-nav-item.active::before { content:""; position:absolute; left:0; top:15px; width:4px; height:22px; border-radius:999px; background:var(--v26-violet); }
.v26-unread { margin-left:auto; }
.v26-sidebar-footer { display:grid; gap:16px; padding-top:18px; border-top:1px solid rgba(29,29,36,.10); }
.v26-add,.v26-button { min-height:48px; display:inline-flex; align-items:center; justify-content:center; gap:10px; padding:0 18px; border:2px solid var(--v26-line); border-radius:15px; font-size:15px; font-weight:650; box-shadow:3px 3px 0 var(--v26-line); }
.v26-add,.v26-button.primary { background:var(--v26-violet); color:#fff; }
.v26-button.secondary { background:#fff; color:var(--v26-ink); }
.v26-button.full { width:100%; }
.v26-user { display:grid; gap:12px; }
.v26-user-main { display:flex; align-items:center; gap:11px; min-width:0; color:var(--v26-ink); }
.v26-user-main > span:last-child { display:grid; gap:2px; min-width:0; }
.v26-user-main strong { font-size:15px; font-weight:650; }
.v26-user-main small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--v26-muted); font-size:12px; }
.v26-user-actions { display:flex; gap:9px; }
.v26-icon-btn { width:40px; height:40px; display:inline-grid; place-items:center; border:1.75px solid var(--v26-line); border-radius:13px; background:#fff; color:var(--v26-ink); box-shadow:2px 2px 0 var(--v26-line); }
.v26-workspace { min-width:0; }
.v26-main { padding:30px 34px 56px 20px; }
.v26-mobile-head,.v26-bottom-nav { display:none; }

.v26-page-head,.ui-v26 .page-header { display:flex; flex-wrap:wrap; align-items:end; justify-content:space-between; gap:16px 22px; margin-bottom:24px; }
.v26-page-head h1,.ui-v26 .page-header h1 { margin:4px 0 8px; color:var(--v26-ink); font-size:clamp(34px,3.7vw,46px); line-height:1; font-weight:650; }
.v26-page-head p,.ui-v26 .page-header p { max-width:720px; margin:0; color:var(--v26-muted); font-size:15px; line-height:1.6; }
.v26-eyebrow,.v26-label,.ui-v26 .eyebrow,.ui-v26 .card-kicker { color:var(--v26-muted); font-size:11px; font-weight:700; letter-spacing:.09em; text-transform:uppercase; }

.v26-dashboard,.v26-activity-page,.v26-notes-page { display:grid; gap:18px; }
.v26-primary-grid { display:grid; grid-template-columns:minmax(0,1.36fr) minmax(330px,.84fr); gap:18px; align-items:stretch; }
.v26-metric-stack { display:grid; grid-template-columns:1fr; gap:18px; }
.v26-insight-grid { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(320px,.85fr); gap:18px; align-items:stretch; }
.v26-detail-grid,.v26-context-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; align-items:stretch; }

.v26-card { min-width:0; padding:22px; border:2px solid var(--v26-line); border-radius:22px; background:var(--v26-surface); box-shadow:var(--v26-shadow),var(--v26-soft-shadow); }
.v26-card h2 { margin:4px 0 0; color:var(--v26-ink); font-size:18px; line-height:1.2; font-weight:650; }
.v26-card p { margin:0; color:var(--v26-muted); font-size:14px; line-height:1.65; }
.v26-panel-card { min-height:320px; display:flex; flex-direction:column; }
.v26-goal-card { min-height:276px; background:linear-gradient(145deg,rgba(243,240,255,.96),rgba(255,255,255,.9)); }
.v26-metric.mint { background:linear-gradient(145deg,var(--v26-mint),rgba(255,255,255,.92)); }
.v26-metric.sky { background:linear-gradient(145deg,var(--v26-sky),rgba(255,255,255,.92)); }
.v26-note-card { background:linear-gradient(145deg,var(--v26-yellow),rgba(255,255,255,.93)); }
.v26-chat-card { background:linear-gradient(145deg,var(--v26-sky),rgba(255,255,255,.93)); }
.v26-activity-card { background:rgba(251,251,253,.92); }
.v26-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:16px; }
.v26-goal-values { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; margin:18px 0 15px; }
.v26-goal-values span,.v26-goal-foot span,.v26-chart-foot,.v26-contribution-row span,.v26-row span,.v26-card small { color:var(--v26-muted); font-size:13px; line-height:1.5; }
.v26-goal-values strong { display:block; margin-top:4px; color:var(--v26-ink); font-size:clamp(24px,2.4vw,31px); line-height:1.08; font-weight:650; font-variant-numeric:tabular-nums; white-space:nowrap; }
.v26-progress { height:13px; overflow:hidden; border:2px solid var(--v26-line); border-radius:999px; background:#fff; }
.v26-progress span { display:block; width:var(--progress,0%); height:100%; background:linear-gradient(90deg,var(--v26-violet),#9c88ff); transition:width 400ms var(--v26-ease); }
.v26-goal-foot { display:flex; justify-content:space-between; gap:12px; margin-top:12px; }
.v26-goal-foot strong,.v26-accent { color:var(--v26-violet); font-size:14px; font-weight:650; }
.v26-metric { justify-content:center; min-height:129px; display:flex; flex-direction:column; }
.v26-metric > strong { display:block; margin:6px 0 4px; color:var(--v26-ink); font-size:clamp(28px,2.3vw,34px); line-height:1.03; font-weight:650; font-variant-numeric:tabular-nums; white-space:nowrap; }

.v26-chart-card { min-height:300px; }
.v26-chart { height:190px; color:var(--v26-violet); }
.v26-chart svg { width:100%; height:100%; overflow:visible; }
.v26-chart svg line { stroke:rgba(118,87,246,.12); stroke-width:1; }
.v26-chart svg polyline { fill:none; stroke:currentColor; stroke-width:2.25; stroke-linecap:round; stroke-linejoin:round; }
.v26-chart svg circle { fill:#fff; stroke:currentColor; stroke-width:1.75; }
.v26-chart-foot { display:flex; justify-content:space-between; margin-top:8px; }
.v26-ghost-chart { height:140px; display:grid; align-items:end; grid-template-columns:repeat(3,1fr); gap:10px; }
.v26-ghost-chart span { display:block; border-radius:14px 14px 6px 6px; background:linear-gradient(180deg,rgba(118,87,246,.22),rgba(118,87,246,.04)); }
.v26-ghost-chart span:nth-child(1) { height:44%; }
.v26-ghost-chart span:nth-child(2) { height:72%; }
.v26-ghost-chart span:nth-child(3) { height:54%; }

.v26-contribution-list,.v26-list,.v26-recent-list { display:grid; }
.v26-contribution-row { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:12px; align-items:center; padding:14px 0; border-top:1px solid rgba(29,29,36,.11); }
.v26-contribution-row:first-child { padding-top:0; border-top:0; }
.v26-contribution-row > div { display:grid; gap:2px; min-width:0; }
.v26-contribution-row strong { font-size:14px; font-weight:650; overflow-wrap:anywhere; }
.v26-contribution-value { white-space:nowrap; font-variant-numeric:tabular-nums; }
.v26-row { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:12px; align-items:start; padding:13px 0; border-top:1px solid rgba(29,29,36,.10); }
.v26-row:first-child { padding-top:0; border-top:0; }
.v26-row.activity { grid-template-columns:auto minmax(0,1fr); }
.v26-row > div { display:grid; gap:2px; min-width:0; }
.v26-row strong { font-size:14px; font-weight:600; line-height:1.45; overflow-wrap:anywhere; }
.v26-row > strong:last-child { white-space:nowrap; font-variant-numeric:tabular-nums; }
.v26-row .positive,.positive { color:#138559; }
.v26-row.recent p { margin:3px 0 0; color:var(--v26-muted); font-size:13px; line-height:1.5; overflow-wrap:anywhere; }
.v26-preview-list { flex:1; align-content:start; }
.v26-link { color:var(--v26-violet); font-size:13px; font-weight:650; }
.v26-note-title { display:block; margin-bottom:8px; font-size:19px; font-weight:650; }
.v26-note-body,.v26-chat-preview p { margin:0 0 8px !important; color:var(--v26-ink) !important; font-size:14px !important; line-height:1.65 !important; white-space:pre-wrap; overflow-wrap:anywhere; }
.v26-chat-preview { display:grid; gap:10px; margin-bottom:16px; flex:1; }
.v26-chat-preview > div { padding-bottom:10px; border-bottom:1px solid rgba(29,29,36,.10); }
.v26-chat-preview > div:last-child { padding-bottom:0; border-bottom:0; }
.v26-pill { padding:5px 9px; border:1.5px solid var(--v26-line); border-radius:999px; background:#fff; color:var(--v26-violet); font-size:11px; font-weight:700; }
.v26-empty { display:grid; gap:12px; align-content:start; }
.v26-empty-fill,.v26-fill-panel,.v26-preview-empty { flex:1; min-height:180px; align-content:center; }
.v26-preview-empty { min-height:230px; }
.v26-ghost-list,.v26-ghost-note { display:grid; gap:10px; }
.v26-ghost-list span,.v26-ghost-note span { height:12px; border-radius:999px; background:rgba(118,87,246,.12); }
.v26-ghost-list span:nth-child(2n) { width:86%; }
.v26-ghost-list span:nth-child(3n) { width:72%; }
.v26-ghost-note span:nth-child(2n) { width:80%; }

.ui-v26 .neo-card { min-height:0; padding:22px; border:2px solid var(--v26-line); border-radius:22px; background:rgba(255,255,255,.88); box-shadow:var(--v26-shadow),var(--v26-soft-shadow); }
.ui-v26 .neo-card h2 { margin:5px 0 10px; font-size:22px; font-weight:650; line-height:1.15; }
.ui-v26 .neo-card p,.ui-v26 .muted,.ui-v26 .field-hint { color:var(--v26-muted); }
.ui-v26 .money-input-wrap > span { display:inline-flex; align-items:center; white-space:nowrap; writing-mode:horizontal-tb; text-orientation:mixed; font-size:19px; font-weight:650; }
.ui-v26 .money-input-wrap input { width:100%; min-width:0; min-height:64px !important; padding:0 !important; border:0 !important; box-shadow:none !important; background:transparent !important; font-size:30px; font-weight:650; line-height:1.05; }
.ui-v26 .button { min-height:46px; border-radius:14px; font-size:14px; font-weight:650; }
.ui-v26 .chip { min-height:39px; padding:0 13px; font-size:14px; font-weight:600; }
.ui-v26 .dialog-card { border-radius:20px; }
.ui-v26 .dialog-header h2 { font-size:22px; font-weight:650; }
.ui-v26 .history-card { overflow:visible; }

.v26-savings-layout { display:grid; grid-template-columns:minmax(390px,.95fr) minmax(0,1.05fr); gap:18px; align-items:stretch; }
.v26-savings-form-wrap,.v26-savings-form-wrap > .savings-form,.v26-recent-panel { min-width:0; }
.v26-savings-form-wrap > .savings-form,
.v26-recent-panel { min-height:760px; height:100%; }
.v26-savings-form-wrap > .savings-form { position:static; }
.v26-recent-panel { display:flex; flex-direction:column; }
.v26-recent-list { flex:1; align-content:start; }

.v26-notes-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; align-items:stretch; }
.v26-notes-grid-empty { grid-template-columns:repeat(2,minmax(0,1fr)); }
.v26-note-item { min-height:260px; display:flex; flex-direction:column; }
.v26-note-item.pinned { grid-column:span 2; min-height:280px; background:linear-gradient(145deg,var(--v26-yellow),rgba(255,255,255,.94)); }
.v26-note-top { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; margin-bottom:14px; }
.v26-note-content { flex:1; display:grid; align-content:start; gap:8px; }
.v26-note-item h2 { margin:0; font-size:22px; font-weight:650; }
.v26-note-item footer { display:flex; justify-content:space-between; gap:10px; margin-top:14px; color:var(--v26-muted); font-size:12px; }
.v26-empty-tile { min-height:260px; }
.ui-v26 .note-actions { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.ui-v26 .note-actions .icon-button { width:40px; height:40px; }

.v26-activity-page { width:100%; }
.v26-activity-full { width:100%; min-height:520px; }
.v26-activity-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:28px; }
.v26-activity-entry { display:grid; grid-template-columns:auto minmax(0,1fr); gap:12px; align-items:start; padding:14px 0; border-bottom:1px solid rgba(29,29,36,.10); }
.v26-activity-entry > div { display:grid; gap:4px; min-width:0; }
.v26-activity-entry strong { font-size:14px; font-weight:600; line-height:1.5; overflow-wrap:anywhere; }
.v26-activity-entry span:last-child { color:var(--v26-muted); font-size:12px; }

.v26-pagination { display:flex; align-items:center; justify-content:center; gap:7px; margin-top:18px; }
.v26-pagination a { min-width:38px; height:38px; display:inline-grid; place-items:center; border:1.5px solid rgba(29,29,36,.24); border-radius:11px; background:#fff; color:var(--v26-ink); font-size:13px; font-weight:650; }
.v26-pagination a.active { border-color:var(--v26-line); background:var(--v26-violet); color:#fff; box-shadow:2px 2px 0 var(--v26-line); }
.v26-pagination a.next svg { transform:rotate(180deg); }

.v26-enter { animation:v26-enter 260ms var(--v26-ease) both; animation-delay:var(--delay,0ms); }
@keyframes v26-enter { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }
@media (hover:hover) {
  .v26-nav-item:hover { background:rgba(255,255,255,.58); }
  .v26-button:hover,.v26-add:hover,.v26-icon-btn:hover { transform:translateY(-1px); }
}

@media (max-width:1199px) and (min-width:768px) {
  .v26-shell { grid-template-columns:228px minmax(0,1fr); }
  .v26-sidebar { padding-left:14px; padding-right:14px; }
  .v26-main { padding-right:20px; }
  .v26-primary-grid,.v26-insight-grid,.v26-detail-grid,.v26-context-grid,.v26-savings-layout,.v26-activity-grid { grid-template-columns:1fr; }
  .v26-metric-stack { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .v26-savings-form-wrap > .savings-form,.v26-recent-panel { min-height:auto; }
}

@media (max-width:767px) {
  .v26-shell { display:block; }
  .v26-sidebar { display:none; }
  .v26-main { padding:16px 16px calc(94px + env(safe-area-inset-bottom)); }
  .v26-mobile-head { display:flex; align-items:center; justify-content:space-between; padding:15px 16px 4px; }
  .v26-mobile-head .v26-brand-mark { width:36px; height:36px; flex-basis:36px; padding:7px; }
  .v26-mobile-head .v26-brand strong { font-size:18px; }
  .v26-bottom-nav { position:fixed; z-index:70; left:10px; right:10px; bottom:calc(8px + env(safe-area-inset-bottom)); display:grid; grid-template-columns:repeat(5,1fr); align-items:center; min-height:72px; padding:7px 5px; border:2px solid var(--v26-line); border-radius:20px; background:rgba(255,255,255,.93); backdrop-filter:blur(16px); box-shadow:4px 4px 0 var(--v26-line); }
  .v26-bottom-link { position:relative; min-width:0; min-height:55px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; border-radius:12px; color:var(--v26-muted); font-size:10px; font-weight:650; }
  .v26-bottom-link.active:not(.v26-bottom-add) { color:var(--v26-violet); background:var(--v26-violet-soft); }
  .v26-bottom-add { margin-top:-26px; }
  .v26-bottom-add > span { width:48px; height:48px; display:grid; place-items:center; border:2px solid var(--v26-line); border-radius:15px; background:var(--v26-violet); color:#fff; box-shadow:3px 3px 0 var(--v26-line); }
  .v26-mobile-unread { position:absolute; top:2px; right:7px; }
  .v26-page-head,.ui-v26 .page-header { align-items:flex-start; }
  .v26-page-head h1,.ui-v26 .page-header h1 { font-size:31px; }
  .v26-primary-grid,.v26-insight-grid,.v26-detail-grid,.v26-context-grid,.v26-metric-stack,.v26-savings-layout,.v26-notes-grid,.v26-activity-grid { grid-template-columns:1fr; grid-template-rows:none; }
  .v26-note-item.pinned { grid-column:auto; }
  .v26-card,.ui-v26 .neo-card { padding:17px; border-radius:18px; }
  .v26-goal-values { grid-template-columns:1fr; gap:11px; }
  .v26-goal-values strong { font-size:28px; }
  .v26-goal-foot { flex-direction:column; align-items:flex-start; }
  .v26-metric { min-height:112px; }
  .v26-chart { height:150px; }
  .v26-contribution-row,.v26-row { grid-template-columns:auto minmax(0,1fr); }
  .v26-contribution-value,.v26-row > strong:last-child { grid-column:2; justify-self:start; margin-top:2px; }
  .v26-savings-form-wrap > .savings-form,.v26-recent-panel,.v26-activity-full,.v26-note-item,.v26-empty-tile,.v26-panel-card { min-height:auto; }
  .ui-v26 .money-input-wrap input { font-size:28px; }
}

@media (prefers-reduced-motion:reduce) {
  .v26-enter { animation:none; }
  .v26-progress span,.v26-button,.v26-add,.v26-icon-btn { transition:none !important; }
}

/* Current layout/profile/crop refinements */
:root {
  --v271-shadow: 4px 4px 0 var(--v26-line);
}

body.ui-v271,
.ui-v271 button,
.ui-v271 input,
.ui-v271 textarea,
.ui-v271 select {
  font-family: var(--v26-font-body);
}

.ui-v271 h1,
.ui-v271 h2,
.ui-v271 h3,
.ui-v271 .metric-value,
.ui-v271 .money-input-wrap input,
.ui-v271 .v271-goal-values strong,
.ui-v271 .v271-member-value,
.ui-v271 .v271-donut strong,
.ui-v271 .v26-metric > strong {
  font-family: var(--v26-font-display);
  letter-spacing: -.025em;
}

.ui-v271 .v26-card,
.ui-v271 .neo-card,
.ui-v271 .dialog-card {
  box-shadow: var(--v271-shadow), var(--v26-soft-shadow);
}

.ui-v271 .v271-sidebar {
  width: 282px;
}

.ui-v271 .v271-brand strong { font-size: 27px; }
.ui-v271 .v271-nav-item { min-height: 50px; }
.ui-v271 .v271-user-main em {
  display: inline-block;
  margin-top: 2px;
  color: var(--v26-violet);
  font-size: 11px;
  font-weight: 700;
  font-style: normal;
}

.ui-v271 .v271-main { padding-right: 28px; }
.ui-v271 .v271-page-head { margin-bottom: 18px; }
.ui-v271 .v271-page-head h1 { font-size: clamp(34px, 3.5vw, 44px); }
.ui-v271 .v271-page-head p { max-width: 640px; }

.ui-v271 .v271-dashboard,
.ui-v271 .v271-profile-page { display: grid; gap: 18px; }
.ui-v271 .v271-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(285px, .82fr);
  gap: 18px;
  align-items: stretch;
}
.ui-v271 .v271-middle-grid,
.ui-v271 .v271-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .9fr);
  gap: 18px;
  align-items: start;
}
.ui-v271 .v271-lower-grid.secondary { grid-template-columns: minmax(260px, .66fr) minmax(0, 1fr); }
.ui-v271 .v271-metric-stack { display: grid; gap: 18px; }

.ui-v271 .v271-goal-card,
.ui-v271 .v271-chart-card,
.ui-v271 .v271-contribution-card,
.ui-v271 .v271-panel-card,
.ui-v271 .v271-profile-hero,
.ui-v271 .v271-profile-card {
  padding: 22px;
}

.ui-v271 .v271-goal-card { min-height: 230px; }
.ui-v271 .v271-goal-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 14px 0 12px;
}
.ui-v271 .v271-goal-values span,
.ui-v271 .v271-chart-meta span,
.ui-v271 .v271-profile-badges span,
.ui-v271 .v271-inline-help,
.ui-v271 .v271-avatar-help li,
.ui-v271 .v271-contribution-row span,
.ui-v271 .v271-donut span,
.ui-v271 .v271-legend-item span,
.ui-v271 .v271-preview-list span,
.ui-v271 .v271-profile-hero p {
  color: var(--v26-muted);
}
.ui-v271 .v271-goal-values strong { font-size: clamp(24px, 2.2vw, 30px); line-height: 1.05; white-space: nowrap; }

.ui-v271 .v271-metric { min-height: 106px; padding: 20px 22px; }
.ui-v271 .v271-metric > strong { font-size: clamp(26px, 2.2vw, 32px); margin: 4px 0; }

.ui-v271 .v271-chart-card { min-height: 0; align-self: start; }
.ui-v271 .v271-chart-shell { position: relative; margin-top: 8px; padding: 8px 0 0; }
.ui-v271 .v271-chart-svg { display: block; width: 100%; height: auto; aspect-ratio: 700 / 260; }
.ui-v271 .v271-chart-svg .grid { stroke: rgba(118, 87, 246, .12); stroke-width: 1.4; }
.ui-v271 .v271-chart-svg .area { fill: url(#chartFillMt); }
.ui-v271 .v271-chart-svg .line { fill: none; stroke: #7257ff; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.ui-v271 .v271-chart-svg .dot { fill: #fff; stroke: #7257ff; stroke-width: 2.2; transition: r 120ms ease, stroke-width 120ms ease, filter 120ms ease; }
.ui-v271 .v271-chart-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 8px;
}
.ui-v271 .v271-chart-meta strong { display: block; font-size: 14px; font-weight: 650; line-height: 1.45; color: var(--v26-ink); }

.ui-v271 .v271-contribution-card { min-height: 340px; }
.ui-v271 .v271-contribution-head {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 12px;
}
.ui-v271 .v271-donut {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.ui-v271 .v271-donut > div {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: rgba(255,255,255,.94);
  display: grid;
  place-items: center;
  padding: 12px;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(29,29,36,.06);
}
.ui-v271 .v271-donut strong { font-size: 18px; line-height: 1.1; }
.ui-v271 .v271-donut span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.ui-v271 .v271-donut-legend { display: grid; gap: 10px; }
.ui-v271 .v271-legend-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(29,29,36,.08);
  border-radius: 14px;
}
.ui-v271 .v271-legend-item i { width: 12px; height: 12px; border-radius: 999px; display: block; }
.ui-v271 .v271-legend-item strong { font-size: 14px; }
.ui-v271 .v271-contribution-list { display: grid; gap: 10px; }
.ui-v271 .v271-contribution-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid rgba(29,29,36,.09);
}
.ui-v271 .v271-member-left {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}
.ui-v271 .v271-member-left div { min-width: 0; }
.ui-v271 .v271-member-left strong { display: block; margin-bottom: 2px; font-size: 16px; font-weight: 650; overflow-wrap: anywhere; }
.ui-v271 .v271-member-value { white-space: nowrap; font-size: 22px; }

.ui-v271 .v271-panel-card { min-height: 300px; }
.ui-v271 .v271-steady-empty {
  min-height: 180px;
  display: grid;
  align-content: center;
}

.ui-v271 .v27-form-card,
.ui-v271 .v27-recent-card,
.ui-v271 .v27-history-card {
  padding: 20px;
}
.ui-v271 .v27-savings-layout {
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: 18px;
  align-items: start;
}
.ui-v271 .v27-form-card {
  position: static;
}
.ui-v271 .v27-section-head h2,
.ui-v271 .v27-section-head-row h2,
.ui-v271 .v271-profile-hero h2 {
  font-size: 18px;
  line-height: 1.2;
}
.ui-v271 .v27-money-input {
  min-height: 76px;
  padding: 0 18px;
}
.ui-v271 .v27-money-input input {
  font-size: clamp(32px, 4vw, 40px);
  padding-left: 10px;
}
.ui-v271 .v27-money-input span { font-size: 16px; }
.ui-v271 .v27-quick-chips .chip {
  min-width: 76px;
  height: 42px;
  font-size: 14px;
}
.ui-v271 .form-grid.two { gap: 14px; }
.ui-v271 .field label { margin-bottom: 8px; }
.ui-v271 textarea,
.ui-v271 select,
.ui-v271 input[type='text'],
.ui-v271 input[type='email'],
.ui-v271 input[type='password'],
.ui-v271 input[type='date'],
.ui-v271 input[type='month'],
.ui-v271 .input-with-icon,
.ui-v271 .money-input-wrap {
  border-radius: 16px;
}

.ui-v271 .v271-profile-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}
.ui-v271 .v271-profile-hero h2 { margin: 4px 0 6px; }
.ui-v271 .v271-profile-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.ui-v271 .v271-profile-badges span {
  padding: 8px 10px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(29,29,36,.08);
  border-radius: 999px;
  font-size: 13px;
}
.ui-v271 .v271-avatar-inline {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 14px 0;
}
.ui-v271 .v271-avatar-current strong,
.ui-v271 .v271-avatar-help strong,
.ui-v271 .v271-crop-instructions strong { display: block; margin-bottom: 8px; }
.ui-v271 .v271-avatar-current [data-avatar-preview-frame] {
  width: 112px; height: 112px; display: grid; place-items: center;
}
.ui-v271 .v271-avatar-help ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.ui-v271 .v271-avatar-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.ui-v271 .v271-crop-dialog { width: min(900px, calc(100vw - 20px)); }
.ui-v271 .v271-crop-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 18px;
}
.ui-v271 .v271-crop-stage {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border-radius: 24px;
  background: #ebe7df;
  display: grid;
  place-items: center;
  cursor: grab;
}
.ui-v271 .v271-crop-stage.dragging { cursor: grabbing; }
.ui-v271 .v271-crop-stage::after {
  content: '';
  position: absolute;
  width: min(72%, 280px);
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: 0 0 0 999px rgba(23,23,29,.42);
  border: 2px solid rgba(255,255,255,.96);
  pointer-events: none;
}
.ui-v271 [data-crop-image] {
  position: absolute;
  max-width: none;
  max-height: none;
  transform-origin: center center;
  user-select: none;
  pointer-events: none;
}
.ui-v271 .v271-crop-side { display: grid; gap: 14px; align-content: start; }
.ui-v271 .v271-crop-buttons { display: grid; gap: 8px; }
.ui-v271 .v271-crop-preview { display: grid; gap: 8px; }
.ui-v271 .v271-crop-preview div {
  width: 160px; height: 160px; border-radius: 50%; overflow: hidden; background: #ebe7df; border: 1px solid rgba(29,29,36,.12);
}
.ui-v271 .v271-crop-preview canvas { width: 100%; height: 100%; }

@media (max-width: 1220px) {
  .ui-v271 .v271-top-grid,
  .ui-v271 .v271-middle-grid,
  .ui-v271 .v271-lower-grid,
  .ui-v271 .v271-lower-grid.secondary,
  .ui-v271 .v27-savings-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .ui-v271 .v271-main { padding-right: 18px; }
  .ui-v271 .v271-chart-meta,
  .ui-v271 .v271-goal-values,
  .ui-v271 .v271-contribution-head,
  .ui-v271 .v271-avatar-inline,
  .ui-v271 .v271-profile-hero,
  .ui-v271 .v271-crop-body { grid-template-columns: 1fr; }
  .ui-v271 .v271-donut { margin: 0 auto; }
  .ui-v271 .v271-chart-card,
  .ui-v271 .v271-contribution-card,
  .ui-v271 .v271-panel-card,
  .ui-v271 .v271-profile-hero,
  .ui-v271 .v271-profile-card,
  .ui-v271 .v27-form-card,
  .ui-v271 .v27-recent-card,
  .ui-v271 .v27-history-card { padding: 18px; }
}

@media (max-width: 640px) {
  .ui-v271 .v271-page-head h1 { font-size: 32px; }
  .ui-v271 .v271-member-value,
  .ui-v271 .v271-donut strong,
  .ui-v271 .v26-metric > strong,
  .ui-v271 .v271-goal-values strong { font-size: 24px; }
  .ui-v271 .v27-money-input { min-height: 68px; }
  .ui-v271 .v27-money-input input { font-size: 30px; }
  .ui-v271 .v271-crop-stage { min-height: 320px; }
}

/* Current dashboard/savings/history refinements */
/* v2.7.3 additive hotfix: savings alignment, history toolbar, dashboard contribution/chart insight polish */

.ui-v273 .v27-savings-layout {
  display: grid;
  grid-template-columns: minmax(430px, .92fr) minmax(520px, 1.08fr);
  gap: 18px;
  align-items: stretch;
}

.ui-v273 .v27-form-card,
.ui-v273 .v27-recent-card {
  min-width: 0;
  height: 100%;
  min-height: 650px;
}

.ui-v273 .v27-form-card {
  display: flex;
  flex-direction: column;
}

.ui-v273 .v27-savings-form {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ui-v273 .v27-savings-form .v27-submit-button {
  margin-top: auto;
}

.ui-v273 .v27-recent-card {
  display: flex;
  flex-direction: column;
}

.ui-v273 .v27-recent-list {
  flex: 1;
  display: grid;
  align-content: start;
  gap: 0;
}

.ui-v273 .v27-recent-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 13px 0;
  border-top: 1px solid rgba(29, 29, 36, .09);
}

.ui-v273 .v27-recent-item:first-child {
  border-top: 0;
  padding-top: 4px;
}

.ui-v273 .v27-recent-item .avatar {
  width: 40px;
  height: 40px;
}

.ui-v273 .v27-recent-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.ui-v273 .v27-recent-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.ui-v273 .v27-recent-top strong:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.35;
}

.ui-v273 .v27-recent-top .positive {
  white-space: nowrap;
  font-size: 14px;
  line-height: 1.35;
}

.ui-v273 .v27-recent-copy > span,
.ui-v273 .v27-recent-copy > p {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ui-v273 .v27-recent-copy > span {
  font-size: 13px;
  line-height: 1.45;
}

.ui-v273 .v27-recent-copy > p {
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.45;
}

.ui-v273 .v27-recent-card .v26-pagination,
.ui-v273 .v27-recent-card .pagination {
  margin-top: auto;
  padding-top: 16px;
}

.ui-v273 .v27-bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: nowrap;
  padding: 4px 0 10px;
}

.ui-v273 .v27-bulk-check {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}

.ui-v273 .v27-bulk-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
  min-width: 0;
}

.ui-v273 .v27-bulk-counter {
  white-space: nowrap;
  padding-right: 4px;
  font-size: 13px;
  color: var(--v26-muted);
}

.ui-v273 .v27-bulk-actions .button {
  min-height: 40px;
  padding-inline: 13px;
  white-space: nowrap;
}

.ui-v273 [data-delete-all-owned] {
  background: #fff4f4;
  color: #a82929;
  border-color: #b93434;
  box-shadow: 2px 2px 0 #b93434;
}

.ui-v273 .v27-history-table {
  width: 100%;
  table-layout: fixed;
}

.ui-v273 .v27-history-table th,
.ui-v273 .v27-history-table td {
  vertical-align: middle;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.ui-v273 .v27-history-table th:nth-child(1),
.ui-v273 .v27-history-table td:nth-child(1) { width: 42px; }
.ui-v273 .v27-history-table th:nth-child(2),
.ui-v273 .v27-history-table td:nth-child(2) { width: 112px; }
.ui-v273 .v27-history-table th:nth-child(3),
.ui-v273 .v27-history-table td:nth-child(3) { width: 190px; }
.ui-v273 .v27-history-table th:nth-child(4),
.ui-v273 .v27-history-table td:nth-child(4) { width: 130px; }
.ui-v273 .v27-history-table th:nth-child(6),
.ui-v273 .v27-history-table td:nth-child(6) { width: 132px; }
.ui-v273 .v27-history-table th:nth-child(7),
.ui-v273 .v27-history-table td:nth-child(7) { width: 112px; }

.ui-v273 .v27-history-table .user-inline {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-width: 0;
}

.ui-v273 .v27-history-table .row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.ui-v273 .v273-chart-insights {
  display: grid;
  grid-template-columns: 1.1fr .85fr 1.15fr;
  gap: 10px;
  margin-top: 10px;
}

.ui-v273 .v273-insight-card {
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid rgba(29, 29, 36, .09);
  border-radius: 14px;
  background: rgba(255, 255, 255, .72);
}

.ui-v273 .v273-insight-card span {
  display: block;
  margin-bottom: 4px;
  color: var(--v26-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.ui-v273 .v273-insight-card strong {
  display: block;
  min-width: 0;
  color: var(--v26-ink);
  font-family: var(--v26-font-body);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.ui-v273 .v273-donut > div {
  width: 108px;
  height: 108px;
  padding: 10px;
}

.ui-v273 .v273-donut span {
  font-size: 10px;
  letter-spacing: .06em;
}

.ui-v273 .v273-donut strong {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 2px;
  width: 100%;
  color: var(--v26-ink);
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: -.02em;
}

.ui-v273 .v273-donut strong small {
  font-family: var(--v26-font-body);
  font-size: 9px;
  font-weight: 700;
  color: var(--v26-muted);
}

.ui-v273 .v271-legend-item {
  min-width: 0;
}

.ui-v273 .v271-legend-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-v273 .v271-legend-item strong {
  white-space: nowrap;
}

@media (max-width: 1240px) {
  .ui-v273 .v27-savings-layout {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .ui-v273 .v27-form-card,
  .ui-v273 .v27-recent-card {
    min-height: auto;
  }
}

@media (max-width: 1100px) {
  .ui-v273 .v27-bulk-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .ui-v273 .v27-bulk-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .ui-v273 .v273-chart-insights {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .ui-v273 .v27-recent-top {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .ui-v273 .v27-bulk-actions > .button {
    width: 100%;
    justify-content: center;
  }
}

/* Current chat and target spacing refinements */
/* v2.7.5 hotfix — chat styling + dashboard target spacing only. */

/* Target values: keep label and amount as separate rows. */
.ui-v271 .v271-goal-values {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 28px !important;
  align-items: start !important;
  margin: 18px 0 14px !important;
}

.ui-v271 .v271-goal-values > div {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 7px !important;
  align-content: start !important;
  min-width: 0 !important;
}

.ui-v271 .v271-goal-values span {
  display: block !important;
  margin: 0 !important;
  color: var(--v26-muted, #667082) !important;
  font-family: var(--v26-font-body, "Avenir Next", "Segoe UI Variable Text", "Segoe UI", Arial, sans-serif) !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
  font-weight: 500 !important;
}

.ui-v271 .v271-goal-values strong {
  display: block !important;
  margin: 0 !important;
  max-width: 100% !important;
  color: var(--v26-ink, #17171d) !important;
  font-family: var(--v26-font-display, "Bahnschrift", "Avenir Next Condensed", "DIN Alternate", "Segoe UI Variable Display", "Segoe UI", sans-serif) !important;
  font-size: clamp(23px, 2vw, 29px) !important;
  line-height: 1.08 !important;
  font-weight: 650 !important;
  letter-spacing: -.025em !important;
  white-space: nowrap !important;
  font-variant-numeric: tabular-nums !important;
}

/* Chat drawer. The feature already works; this restores its visual system. */
.v2-chat-dialog {
  --chat-ink: var(--v26-ink, #17171d);
  --chat-muted: var(--v26-muted, #667082);
  --chat-line: var(--v26-line, #1d1d24);
  --chat-violet: var(--v26-violet, #7657f6);
  --chat-violet-soft: var(--v26-violet-soft, #f1edff);
  --chat-sky: var(--v26-sky, #eff4ff);
  width: min(470px, calc(100vw - 32px)) !important;
  max-width: none !important;
  height: calc(100dvh - 32px) !important;
  max-height: none !important;
  margin: 16px 16px 16px auto !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--chat-ink) !important;
  font-family: var(--v26-font-body, "Avenir Next", "Segoe UI Variable Text", "Segoe UI", Arial, sans-serif) !important;
}

.v2-chat-dialog::backdrop {
  background: rgba(18, 18, 24, .30) !important;
  backdrop-filter: blur(6px) !important;
}

.v2-chat-dialog[open] {
  animation: v275-chat-in 180ms cubic-bezier(.2,.8,.2,1) both;
}

.v2-chat-panel {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  overflow: hidden !important;
  border: 2px solid var(--chat-line) !important;
  border-radius: 24px !important;
  background: rgba(255,255,255,.97) !important;
  box-shadow: 6px 6px 0 var(--chat-line), 0 28px 80px rgba(20,20,27,.18) !important;
  backdrop-filter: blur(18px) !important;
}

.v2-chat-header {
  min-height: 82px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  padding: 14px 16px !important;
  border-bottom: 1px solid rgba(29,29,36,.10) !important;
  background: linear-gradient(145deg, rgba(241,237,255,.92), rgba(255,255,255,.96)) !important;
}

.v2-chat-heading {
  display: flex !important;
  align-items: center !important;
  gap: 13px !important;
  min-width: 0 !important;
}

.v2-avatar-stack {
  display: flex !important;
  flex: 0 0 auto !important;
  padding-left: 2px !important;
}

.v2-avatar-stack .avatar {
  border: 2px solid #fff !important;
  box-shadow: 0 0 0 1px var(--chat-line) !important;
}

.v2-avatar-stack .avatar + .avatar {
  margin-left: -8px !important;
}

.v2-chat-heading > div:last-child {
  min-width: 0 !important;
}

.v2-kicker {
  display: block !important;
  margin: 0 0 2px !important;
  color: var(--chat-muted) !important;
  font-size: 10px !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
  letter-spacing: .10em !important;
  text-transform: uppercase !important;
}

.v2-chat-heading h2 {
  margin: 0 !important;
  color: var(--chat-ink) !important;
  font-family: var(--v26-font-display, "Bahnschrift", "Avenir Next Condensed", "Segoe UI", sans-serif) !important;
  font-size: 19px !important;
  line-height: 1.12 !important;
  font-weight: 650 !important;
  letter-spacing: -.025em !important;
}

.v2-chat-heading p {
  margin: 3px 0 0 !important;
  max-width: 260px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: var(--chat-muted) !important;
  font-size: 11px !important;
  line-height: 1.3 !important;
}

.v2-icon-button {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
  border: 1.5px solid var(--chat-line) !important;
  border-radius: 13px !important;
  background: #fff !important;
  color: var(--chat-ink) !important;
  box-shadow: 2px 2px 0 var(--chat-line) !important;
  cursor: pointer !important;
}

.v2-icon-button svg,
.v2-send-button svg {
  width: 18px !important;
  height: 18px !important;
}

.v2-chat-timeline {
  position: relative !important;
  min-width: 0 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  padding: 16px 16px 20px !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(118,87,246,.05), transparent 36%),
    rgba(250,250,252,.78) !important;
  scroll-behavior: smooth !important;
}

.v2-chat-loading {
  display: grid !important;
  gap: 10px !important;
  width: 72% !important;
}

.v2-chat-loading span {
  display: block !important;
  height: 50px !important;
  border-radius: 15px !important;
  background: linear-gradient(90deg, #ececf0, #fafafa, #ececf0) !important;
  background-size: 220% 100% !important;
  animation: v275-skeleton 1.1s linear infinite !important;
}

.v2-chat-message {
  display: flex !important;
  align-items: flex-end !important;
  gap: 8px !important;
  max-width: 84% !important;
  margin: 10px 0 !important;
  animation: v275-message-in 150ms cubic-bezier(.2,.8,.2,1) both;
}

.v2-chat-message.mine {
  margin-left: auto !important;
  justify-content: flex-end !important;
}

.v2-chat-message.partner {
  margin-right: auto !important;
}

.v2-chat-bubble {
  min-width: 0 !important;
  padding: 10px 12px !important;
  border: 1.5px solid var(--chat-line) !important;
  border-radius: 16px 16px 16px 5px !important;
  background: #fff !important;
  box-shadow: 2px 2px 0 rgba(29,29,36,.82) !important;
}

.v2-chat-message.mine .v2-chat-bubble {
  border-radius: 16px 16px 5px 16px !important;
  background: var(--chat-violet-soft) !important;
}

.v2-chat-bubble strong {
  display: block !important;
  margin: 0 0 3px !important;
  color: var(--chat-ink) !important;
  font-size: 11px !important;
  line-height: 1.25 !important;
  font-weight: 700 !important;
}

.v2-chat-bubble p {
  margin: 0 !important;
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
  color: var(--chat-ink) !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
}

.v2-chat-bubble small {
  display: block !important;
  margin-top: 5px !important;
  color: var(--chat-muted) !important;
  font-size: 9px !important;
  line-height: 1.3 !important;
}

.v2-chat-empty {
  min-height: 100% !important;
  display: grid !important;
  place-content: center !important;
  justify-items: center !important;
  text-align: center !important;
  padding: 30px !important;
  color: var(--chat-muted) !important;
}

.v2-chat-empty > span {
  width: 46px !important;
  height: 46px !important;
  display: grid !important;
  place-items: center !important;
  margin-bottom: 9px !important;
  border: 1.5px solid var(--chat-line) !important;
  border-radius: 14px !important;
  background: var(--chat-sky) !important;
}

.v2-chat-empty > span svg {
  width: 20px !important;
  height: 20px !important;
}

.v2-chat-empty strong {
  color: var(--chat-ink) !important;
  font-size: 13px !important;
}

.v2-chat-empty p {
  margin: 4px 0 0 !important;
  font-size: 11px !important;
}

.v2-chat-composer {
  position: relative !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 9px !important;
  align-items: end !important;
  padding: 12px !important;
  border-top: 1px solid rgba(29,29,36,.12) !important;
  background: rgba(255,255,255,.98) !important;
}

.v2-chat-composer textarea {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 46px !important;
  max-height: 124px !important;
  resize: none !important;
  padding: 11px 12px !important;
  border: 1.5px solid var(--chat-line) !important;
  border-radius: 13px !important;
  background: #fff !important;
  color: var(--chat-ink) !important;
  font: inherit !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
  outline: none !important;
  box-shadow: none !important;
}

.v2-chat-composer textarea:focus {
  box-shadow: 0 0 0 3px rgba(118,87,246,.18) !important;
}

.v2-chat-composer .field-error {
  grid-column: 1 / -1 !important;
  margin: -4px 0 0 !important;
}

.v2-send-button {
  width: 46px !important;
  height: 46px !important;
  min-width: 46px !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
  border: 2px solid var(--chat-line) !important;
  border-radius: 13px !important;
  background: var(--chat-violet) !important;
  color: #fff !important;
  box-shadow: 2px 2px 0 var(--chat-line) !important;
  cursor: pointer !important;
}

.v2-new-message {
  position: absolute !important;
  z-index: 4 !important;
  left: 50% !important;
  bottom: 74px !important;
  transform: translateX(-50%) !important;
  min-height: 34px !important;
  padding: 7px 11px !important;
  border: 1.5px solid var(--chat-line) !important;
  border-radius: 999px !important;
  background: var(--chat-ink) !important;
  color: #fff !important;
  font-size: 10px !important;
  font-weight: 700 !important;
}

@keyframes v275-chat-in {
  from { opacity: 0; transform: translateX(12px) scale(.992); }
  to { opacity: 1; transform: none; }
}

@keyframes v275-message-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

@keyframes v275-skeleton {
  to { background-position: -220% 0; }
}

@media (hover:hover) {
  .v2-icon-button:hover { background: var(--chat-violet-soft) !important; }
}

@media (max-width: 767px) {
  .ui-v271 .v271-goal-values {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .ui-v271 .v271-goal-values strong {
    font-size: 24px !important;
  }

  .v2-chat-dialog {
    width: 100vw !important;
    height: 100dvh !important;
    margin: 0 !important;
  }

  .v2-chat-panel {
    border-width: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .v2-chat-header {
    padding: 12px 14px !important;
  }

  .v2-chat-timeline {
    padding: 14px 12px !important;
  }

  .v2-chat-message {
    max-width: 90% !important;
  }

  .v2-chat-composer {
    padding: 9px 10px calc(10px + env(safe-area-inset-bottom)) !important;
  }

  .v2-new-message {
    bottom: calc(76px + env(safe-area-inset-bottom)) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .v2-chat-dialog[open],
  .v2-chat-message,
  .v2-chat-loading span {
    animation: none !important;
  }
}

/* Multi-target transactions */
.mt-dashboard { display:grid; gap:18px; }
.mt-page-head { margin-bottom:0 !important; }
.mt-head-actions { display:flex; align-items:flex-end; justify-content:flex-end; flex-wrap:wrap; gap:10px; }
.mt-target-switcher { min-width:210px; display:grid; gap:5px; }
.mt-target-switcher > span { color:var(--v26-muted); font-size:10px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
.mt-target-switcher select { min-height:48px; width:100%; padding:0 38px 0 13px; border:1.75px solid var(--v26-line); border-radius:14px; background:#fff; color:var(--v26-ink); font-weight:650; box-shadow:2px 2px 0 var(--v26-line); }

.mt-summary-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.mt-summary-card { min-height:154px; display:grid; align-content:start; gap:7px; }
.mt-summary-card strong { display:block; margin:5px 0 0; color:var(--v26-ink); font-family:var(--v26-font-display); font-size:clamp(25px,2.4vw,34px); font-weight:650; line-height:1.06; letter-spacing:-.03em; overflow-wrap:anywhere; }
.mt-summary-card p { margin:auto 0 0; color:var(--v26-muted); font-size:12px; line-height:1.5; }

.mt-target-section { display:grid; gap:12px; }
.mt-section-head { margin-bottom:0 !important; padding:0 2px; }
.mt-section-head > span { color:var(--v26-muted); font-size:12px; font-weight:650; }
.mt-target-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.mt-target-card { min-height:190px; padding:18px !important; display:grid; align-content:start; gap:11px; color:var(--v26-ink); transition:transform 120ms var(--v26-ease),box-shadow 120ms var(--v26-ease),background 120ms var(--v26-ease); }
.mt-target-card:hover { transform:translateY(-2px); background:rgba(255,255,255,.98); }
.mt-target-card h3 { margin:0; font-size:21px; font-weight:650; line-height:1.12; }
.mt-target-card-top { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.mt-target-card-top > strong { font-family:var(--v26-font-display); font-size:18px; font-weight:650; }
.mt-status,.mt-type-pill { width:max-content; display:inline-flex; align-items:center; min-height:26px; padding:4px 9px; border:1.25px solid rgba(29,29,36,.65); border-radius:999px; font-size:10px; font-weight:750; letter-spacing:.02em; line-height:1; }
.mt-status.active,.mt-type-pill.deposit { background:#e8f7ee; color:#17633f; }
.mt-status.completed { background:var(--v26-violet-soft); color:#4c37b1; }
.mt-status.archived { background:#f0f0f2; color:#61616c; }
.mt-type-pill.withdrawal { background:#fff0ec; color:#a33832; }
.mt-target-money { display:flex; align-items:baseline; flex-wrap:wrap; gap:5px; }
.mt-target-money strong { font-family:var(--v26-font-display); font-size:22px; font-weight:650; line-height:1.1; }
.mt-target-money span { color:var(--v26-muted); font-size:11px; }
.mt-target-meta { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:7px 12px; color:var(--v26-muted); font-size:10px; }
.mt-target-description { margin:0; color:var(--v26-muted); font-size:12px; line-height:1.55; }
.mt-target-form-note { margin:0; padding:10px 12px; border:1px solid rgba(29,29,36,.18); border-radius:11px; background:rgba(241,237,255,.55); color:var(--v26-muted); font-size:12px; }
.mt-target-dialog .dialog-card { width:min(610px,calc(100vw - 28px)); }

.mt-type-toggle { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.mt-type-toggle label { cursor:pointer; }
.mt-type-toggle input { position:absolute; opacity:0; pointer-events:none; }
.mt-type-toggle span { min-height:46px; display:flex; align-items:center; justify-content:center; gap:8px; padding:9px 12px; border:1.5px solid rgba(29,29,36,.52); border-radius:12px; background:#fff; color:var(--v26-ink); font-size:12px; font-weight:700; transition:background 120ms var(--v26-ease),box-shadow 120ms var(--v26-ease),transform 120ms var(--v26-ease); }
.mt-type-toggle input:checked + span { border-color:var(--v26-line); background:var(--v26-violet-soft); box-shadow:2px 2px 0 var(--v26-line); }
.mt-type-toggle label:nth-child(2) input:checked + span { background:#fff0ec; }
.mt-type-toggle input:focus-visible + span { outline:3px solid var(--focus); outline-offset:2px; }

.positive { color:var(--v26-success,#176c47); }
.negative { color:var(--danger,#b93535); }
.mt-chart-tooltip { position:absolute; z-index:4; top:6px; transform:translateX(-50%); padding:6px 9px; border-radius:9px; background:var(--v26-ink); color:#fff; font-size:10px; font-weight:700; line-height:1.2; white-space:nowrap; pointer-events:none; opacity:0; transition:opacity 120ms var(--v26-ease); }
.mt-chart-tooltip.visible { opacity:1; }
.mt-chart-stats { display:flex; flex-wrap:wrap; align-items:center; gap:8px 18px; margin-top:12px; color:var(--v26-muted); font-size:11px; }
.mt-chart-stats strong { color:var(--v26-ink); }
.mt-table-note { display:block; max-width:260px; margin-top:4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--v26-muted) !important; font-size:10px; }

.mt-savings-layout { align-items:start; }
.mt-savings-layout .mt-transaction-form { position:sticky; top:22px; }
.mt-new-transaction { max-width:650px; margin-inline:auto; }
.mt-history-filter { grid-template-columns:minmax(140px,1fr) minmax(130px,.8fr) minmax(130px,.8fr) minmax(150px,.85fr) minmax(190px,1.3fr) auto; }
.mt-history-table td { vertical-align:middle; }
.mt-history-table .positive,.mt-history-table .negative { white-space:nowrap; }

@media (max-width:1180px) {
  .mt-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .mt-target-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .mt-history-filter { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .mt-history-filter .grow { grid-column:span 2; }
}

@media (max-width:860px) {
  .mt-page-head { align-items:stretch !important; }
  .mt-head-actions { width:100%; justify-content:stretch; }
  .mt-target-switcher { flex:1 1 100%; min-width:0; }
  .mt-head-actions .v26-button { flex:1 1 calc(50% - 5px); }
  .mt-target-grid { grid-template-columns:1fr; }
  .mt-savings-layout .mt-transaction-form { position:static; }
}

@media (max-width:620px) {
  .mt-dashboard { gap:14px; }
  .mt-summary-grid { grid-template-columns:1fr 1fr; gap:10px; }
  .mt-summary-card { min-height:132px; padding:15px !important; }
  .mt-summary-card strong { font-size:23px; }
  .mt-target-card { min-height:172px; padding:15px !important; }
  .mt-target-card h3 { font-size:19px; }
  .mt-target-money strong { font-size:20px; }
  .mt-type-toggle { gap:7px; }
  .mt-type-toggle span { padding-inline:8px; font-size:11px; }
  .mt-head-actions .v26-button { min-height:44px; font-size:12px; }
  .mt-target-switcher select { min-height:44px; }
}

@media (max-width:420px) {
  .mt-summary-grid { grid-template-columns:1fr; }
  .mt-summary-card { min-height:auto; }
}
.mt-dashboard .v271-chart-shell { position:relative; }


/* multi-target hierarchy + chart polish hotfix */
.mt-dashboard .v271-panel-card,
.mt-dashboard .v271-contribution-card { min-height: 0; }
.mt-dashboard .v271-top-grid,
.mt-dashboard .v271-middle-grid,
.mt-dashboard .v271-lower-grid { align-items: start; }
.mt-dashboard .v271-contribution-head { align-items: start; }
.mt-dashboard .v271-donut { flex-shrink: 0; }
.mt-dashboard .v271-donut > div { width: 108px; height: 108px; }
.mt-dashboard .v271-donut strong { font-size: clamp(18px, 1.7vw, 24px); line-height: 1.12; word-break: break-word; }
.mt-dashboard .v271-donut strong small { display:block; font-size: 11px; margin-bottom: 2px; }
.mt-dashboard .v271-donut-legend { display:grid; gap:10px; }
.mt-dashboard .v271-legend-item { min-height: 50px; }
.mt-dashboard .v271-chart-svg .dot.active { r: 7; stroke-width: 3; filter: drop-shadow(0 2px 6px rgba(114, 87, 255, .28)); }
.mt-dashboard .mt-chart-stats { display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.mt-dashboard .mt-chart-stat { padding: 12px 14px; border: 1px solid rgba(29,29,36,.10); border-radius: 16px; background: rgba(255,255,255,.72); display:grid; gap: 4px; }
.mt-dashboard .mt-chart-kicker { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--v26-muted); }
.mt-dashboard .mt-chart-stat strong { font-size: 15px; line-height: 1.25; color: var(--v26-ink); }
.mt-dashboard .mt-chart-stat small { font-size: 11px; color: var(--v26-muted); }
.mt-dashboard .mt-chart-stat .positive { color: var(--v26-success,#176c47); }
.mt-dashboard .mt-chart-stat .negative { color: var(--danger,#b93535); }

.ui-v273 .v27-savings-layout {
  display: grid;
  grid-template-columns: minmax(390px, .96fr) minmax(420px, 1.04fr);
  gap: 18px;
  align-items: start;
}
.ui-v273 .v27-form-card,
.ui-v273 .v27-recent-card {
  min-width: 0;
  min-height: 0;
  height: auto;
  align-self: start;
}
.ui-v273 .v27-form-card {
  position: sticky;
  top: 22px;
}
.ui-v273 .v27-savings-form {
  gap: 16px;
}
.ui-v273 .v27-section-head { margin-bottom: 6px; }
.ui-v273 .v27-money-input { min-height: 72px; }
.ui-v273 .v27-money-input input { font-size: clamp(28px, 2.8vw, 36px); }
.ui-v273 .v27-quick-chips { margin-top: 2px; }
.ui-v273 .v27-recent-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.ui-v273 .v27-recent-shell { display: contents; }
.ui-v273 .v27-recent-list {
  display: grid;
  align-content: start;
  gap: 0;
  min-height: 420px;
}
.ui-v273 .v27-recent-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 13px 0;
  border-top: 1px solid rgba(29,29,36,.09);
}
.ui-v273 .v27-recent-top { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; align-items:start; }
.ui-v273 .v27-recent-top strong:first-child { line-height:1.35; }
.ui-v273 .v27-recent-copy > span,
.ui-v273 .v27-recent-copy > p { line-height: 1.45; }
.ui-v273 .v27-recent-card .v26-pagination,
.ui-v273 .v27-recent-card .pagination {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(29,29,36,.09);
}
.ui-v273 .v27-steady-empty {
  min-height: 420px;
  border: 1px dashed rgba(29,29,36,.14);
  border-radius: 16px;
  background: rgba(255,255,255,.56);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  text-align: center;
  padding: 20px;
}
@media (max-width: 1100px) {
  .ui-v273 .v27-savings-layout { grid-template-columns: 1fr; }
  .ui-v273 .v27-form-card { position: static; }
}
@media (max-width: 900px) {
  .mt-dashboard .mt-chart-stats { grid-template-columns: 1fr; }
}


/* notes, donut, success dialog, target delete */
.mt-notes-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.mt-note-card,
.mt-note-card.pinned {
  position: relative;
  grid-column: auto;
  min-height: 0;
  height: 270px;
  padding: 18px;
  overflow: hidden;
  background: rgba(255,255,255,.78);
}
.mt-note-card.pinned {
  background: linear-gradient(150deg, rgba(255,242,184,.78), rgba(255,255,255,.9));
}
.mt-note-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.mt-note-top .user-inline {
  min-width: 0;
  overflow: hidden;
}
.mt-note-top .user-inline > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mt-note-pin-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid rgba(29,29,36,.12);
  border-radius: 999px;
  background: rgba(255,255,255,.7);
  color: #6b5c19;
  font-size: 10px;
  font-weight: 700;
}
.mt-note-content {
  min-height: 0;
  margin-top: 16px;
}
.mt-note-content h2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.28;
}
.mt-note-preview {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
  color: var(--v26-muted);
  font-size: 13px;
  line-height: 1.55;
}
.mt-note-footer {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 !important;
  padding-top: 12px;
  border-top: 1px solid rgba(29,29,36,.08);
}
.mt-note-detail-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--v26-violet);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.mt-note-actions {
  position: absolute;
  z-index: 2;
  right: 14px;
  top: 52px;
  display: flex;
  gap: 5px;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
}
.mt-note-card:hover .mt-note-actions,
.mt-note-card:focus-within .mt-note-actions {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.mt-note-actions .icon-button {
  width: 34px;
  height: 34px;
  background: rgba(255,255,255,.94);
  box-shadow: 1px 1px 0 rgba(29,29,36,.22);
}
.note-detail-card {
  width: min(720px, 92vw);
  max-height: min(78dvh, 760px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto minmax(0,1fr);
}
.note-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--v26-muted);
  font-size: 12px;
}
.note-detail-body {
  min-height: 0;
  overflow: auto;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(29,29,36,.10);
  border-radius: 16px;
  background: rgba(255,255,255,.72);
  color: var(--v26-ink);
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.mt-dashboard .v271-donut > div {
  overflow: hidden;
}
.mt-dashboard .v271-donut strong {
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(17px, 1.55vw, 22px);
  letter-spacing: -.03em;
}
.mt-dashboard .v271-donut strong small {
  display: block;
  margin: 0 0 2px;
  font-size: 10px;
  letter-spacing: .02em;
}

.success-dialog {
  border: 0;
  padding: 0;
  background: transparent;
  overflow: visible;
}
.success-dialog::backdrop {
  background: rgba(18,18,24,.24);
  backdrop-filter: blur(5px);
}
.success-dialog[open] {
  display: grid;
  place-items: center;
}
.success-dialog-card {
  position: relative;
  width: min(420px, calc(100vw - 32px));
  padding: 28px 26px 25px;
  border: 2px solid var(--v26-line);
  border-radius: 24px;
  background: rgba(255,255,255,.96);
  box-shadow: 7px 7px 0 rgba(29,29,36,.92), 0 24px 60px rgba(29,29,36,.16);
  text-align: center;
  opacity: 0;
  transform: translateY(12px) scale(.96);
  transition: opacity 180ms ease, transform 220ms cubic-bezier(.2,.8,.2,1);
}
.success-dialog.visible .success-dialog-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.success-dialog.leaving .success-dialog-card {
  opacity: 0;
  transform: translateY(6px) scale(.985);
}
.success-dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(29,29,36,.12);
  border-radius: 12px;
  background: rgba(255,255,255,.8);
  color: var(--v26-muted);
  cursor: pointer;
}
.success-dialog-icon {
  width: 74px;
  height: 74px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(23,108,71,.2);
  border-radius: 24px;
  background: rgba(183,234,210,.42);
  color: var(--v26-success,#176c47);
  transform: scale(.7) rotate(-8deg);
  opacity: 0;
}
.success-dialog.visible .success-dialog-icon {
  animation: mt-success-pop 520ms cubic-bezier(.2,.9,.2,1.2) 60ms forwards;
}
.success-dialog-icon svg {
  width: 42px;
  height: 42px;
}
.success-dialog-copy h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}
.success-dialog-copy p {
  max-width: 330px;
  margin: 8px auto 0;
  color: var(--v26-muted);
  font-size: 13px;
  line-height: 1.55;
}
@keyframes mt-success-pop {
  0% { transform: scale(.7) rotate(-8deg); opacity: 0; }
  60% { transform: scale(1.08) rotate(2deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.mt-target-dialog-actions {
  align-items: center;
}
.mt-target-dialog-spacer {
  flex: 1 1 auto;
}
.mt-target-delete-button[hidden] {
  display: none !important;
}
.mt-target-delete-dialog .dialog-card {
  max-width: 520px;
}

@media (max-width: 1180px) {
  .mt-notes-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 880px) {
  .mt-notes-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 700px) {
  .mt-notes-grid { grid-template-columns: 1fr; }
  .mt-note-card, .mt-note-card.pinned { height: 250px; padding: 16px; }
  .mt-note-footer { left: 16px; right: 16px; bottom: 14px; }
  .mt-note-actions { opacity: 1; transform: none; pointer-events: auto; top: 48px; right: 12px; }
  .note-detail-card { max-height: 86dvh; }
  .success-dialog[open] { align-items: center !important; }
  .success-dialog-card { width: calc(100vw - 28px); border-radius: 22px; }
  .mt-target-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .mt-target-delete-button { grid-column: 1 / -1; }
  .mt-target-dialog-spacer { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .success-dialog-card,
  .success-dialog-icon,
  .mt-note-actions { transition: none !important; animation: none !important; }
  .success-dialog.visible .success-dialog-icon { opacity: 1; transform: none; }
}

.mt-target-delete-hint { margin: -2px 0 2px; color: var(--danger,#b93535); font-size: 11px; line-height: 1.45; }


/* readability, note layout, archive visibility, and cross-browser dialogs */
:root { --muted:#4f5968; }
.ui-v26 { --v26-muted:#4f5968; }
.v26-eyebrow,.v26-label,.ui-v26 .eyebrow,.ui-v26 .card-kicker { font-size:12px; letter-spacing:.07em; }
.v26-card small,.v26-row span,.v26-contribution-row span,.v26-goal-foot span { font-size:13px; }
.mt-target-switcher > span,.mt-target-money span,.mt-target-meta,.mt-chart-kicker,.mt-chart-stat small,.mt-table-note { font-size:12px !important; }
.v26-bottom-link { font-size:11px; }

.mt-notes-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;align-items:start}
.mt-note-card,.mt-note-card.pinned{position:relative;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:14px;height:286px;min-height:286px;padding:18px;overflow:hidden;background:rgba(255,255,255,.82)}
.mt-note-card.pinned{background:linear-gradient(150deg,rgba(255,244,196,.78),rgba(255,255,255,.94))}
.mt-note-top{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0}
.mt-note-author{min-width:0;display:grid;grid-template-columns:auto minmax(0,1fr);gap:9px;align-items:center}
.mt-note-author strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
.mt-note-pin-badge{min-height:28px;padding:4px 8px;font-size:12px;color:#5e4c00}
.mt-note-content{min-width:0;min-height:0;margin:0;overflow:hidden}
.mt-note-content h2{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere;word-break:break-word;margin:0 0 9px;font-size:17px;line-height:1.32}
.mt-note-preview{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:5;overflow:hidden;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;margin:0;color:#3f4856;font-size:13px;line-height:1.55}
.mt-note-footer{position:static;display:grid;grid-template-rows:auto auto;gap:10px;margin:0!important;padding-top:11px;border-top:1px solid rgba(29,29,36,.11)}
.mt-note-footer-main{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0}
.mt-note-time{color:#4f5968;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mt-note-detail-link{flex:0 0 auto;min-height:32px;padding:5px 9px;border:1px solid rgba(29,29,36,.14);border-radius:9px;background:#fff;color:#4b35b5;font-size:12px;font-weight:750;cursor:pointer}
.mt-note-actions{position:static;display:flex;justify-content:flex-end;gap:7px;opacity:1;transform:none;pointer-events:auto}
.mt-note-actions .icon-button{width:36px;height:36px;background:#fff;box-shadow:1px 1px 0 rgba(29,29,36,.20)}
.mt-note-empty{max-width:520px;padding:24px}.mt-note-empty h2{margin:0 0 6px}.mt-note-empty p{margin:0 0 16px;color:#4f5968}

.note-detail-dialog{overflow:visible}
.note-detail-card{width:min(720px,calc(100vw - 28px));max-height:min(82dvh,760px);overflow:hidden;display:grid;grid-template-rows:auto auto minmax(0,1fr);gap:12px;padding:22px}
.note-detail-header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:18px;min-width:0}
.note-detail-heading{min-width:0}.note-detail-heading h2{margin:4px 0 0;max-width:100%;font-size:22px;line-height:1.25;overflow-wrap:anywhere;word-break:break-word}
.note-detail-close{flex:0 0 auto}.note-detail-meta{display:flex;align-items:center;flex-wrap:wrap;gap:7px;color:#4f5968;font-size:13px}.note-detail-meta strong{color:var(--v26-ink);font-weight:700}
.note-detail-body{min-width:0;min-height:100px;overflow:auto;margin:2px 0 0;padding:18px;border:1px solid rgba(29,29,36,.12);border-radius:16px;background:#fff;color:#222731;font-size:15px;line-height:1.72;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word}

.mt-dashboard .v271-donut>div{width:110px;height:110px;padding:10px;overflow:hidden}.mt-dashboard .v271-donut strong{display:block;max-width:88px;margin:2px auto 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:18px;line-height:1.15;text-align:center}.mt-dashboard .v271-donut strong small{display:inline;margin-right:2px;font-size:10px}

.mt-archive-section{display:grid;gap:12px}.mt-archive-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.mt-archive-card{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 18px;box-shadow:2px 2px 0 rgba(29,29,36,.75)}.mt-archive-card>div{min-width:0}.mt-archive-card h3{margin:8px 0 3px;font-size:16px;overflow-wrap:anywhere}.mt-archive-card>div>strong{font-size:14px}.mt-status.archived{background:#eceef2;color:#374151}.mt-archive-manage{min-height:38px;padding:7px 11px;box-shadow:2px 2px 0 var(--v26-line)}.mt-target-form-note,.mt-target-delete-hint{font-size:13px!important;color:#3f4856}.mt-target-delete-hint{color:var(--danger,#b93535)}

.dialog[open]:not(.success-dialog) .dialog-card{transform-origin:50% 40%;animation:nb-dialog-in 340ms cubic-bezier(.16,1,.3,1) both}.dialog[open]:not(.success-dialog)::backdrop{animation:nb-backdrop-in 220ms ease-out both}
@keyframes nb-dialog-in{0%{opacity:0;transform:perspective(900px) translateY(20px) rotateX(-7deg) scale(.965)}62%{opacity:1;transform:perspective(900px) translateY(-2px) rotateX(1deg) scale(1.006)}100%{opacity:1;transform:perspective(900px) translateY(0) rotateX(0) scale(1)}}@keyframes nb-backdrop-in{from{opacity:0}to{opacity:1}}
.success-dialog::backdrop{background:rgba(18,18,24,.32);backdrop-filter:blur(5px)}.success-dialog[open]{display:grid;place-items:center}.success-dialog-card{width:min(410px,calc(100vw - 28px));padding:28px 24px 24px;opacity:0;transform-origin:50% 55%;backface-visibility:hidden;will-change:transform,opacity}.success-dialog.visible .success-dialog-card{opacity:1;animation:nb-success-card-in 520ms cubic-bezier(.16,1,.3,1) both}.success-dialog.visible .success-dialog-icon{animation:nb-success-icon-in 620ms cubic-bezier(.16,1,.3,1) 90ms both}.success-dialog.leaving .success-dialog-card{animation:nb-success-card-out 240ms ease-in both}.success-dialog-copy h2{font-size:21px}.success-dialog-copy p{color:#3f4856;font-size:14px;line-height:1.55}
@keyframes nb-success-card-in{0%{opacity:0;transform:perspective(1000px) translateY(26px) rotateX(-11deg) scale(.93)}58%{opacity:1;transform:perspective(1000px) translateY(-3px) rotateX(2deg) scale(1.018)}100%{opacity:1;transform:perspective(1000px) translateY(0) rotateX(0) scale(1)}}@keyframes nb-success-card-out{to{opacity:0;transform:perspective(900px) translateY(10px) rotateX(5deg) scale(.97)}}@keyframes nb-success-icon-in{0%{opacity:0;transform:translateZ(0) scale(.55) rotate(-12deg)}58%{opacity:1;transform:translateZ(0) scale(1.12) rotate(3deg)}78%{transform:translateZ(0) scale(.96) rotate(-1deg)}100%{opacity:1;transform:translateZ(0) scale(1) rotate(0)}}

@media(max-width:1180px){.mt-notes-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.mt-archive-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:880px){.mt-notes-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:700px){.mt-notes-grid,.mt-archive-grid{grid-template-columns:1fr}.mt-note-card,.mt-note-card.pinned{height:272px;min-height:272px;padding:16px}.mt-note-pin-badge span{display:none}.note-detail-card{width:calc(100vw - 20px);max-height:88dvh;padding:18px}.note-detail-heading h2{font-size:20px}.note-detail-body{padding:15px;font-size:14px}.mt-archive-card{align-items:flex-start}}
@media(prefers-reduced-motion:reduce){.dialog[open] .dialog-card,.dialog[open]::backdrop,.success-dialog.visible .success-dialog-card,.success-dialog.visible .success-dialog-icon,.success-dialog.leaving .success-dialog-card{animation:none!important;transform:none!important;opacity:1!important}}
