/* Privelle Broker 1.11.0 — sistema visual herdado do design 1.10, com neumorfismo aprofundado. */
/* Privelle 1.10 — material, light and hierarchy. No remote fonts or assets. */
:root {
  --accent: #ff782e;
  --ink: #272321;
  --muted: #70665f;
  --surface: #fffdfa;
  --soft: #f1ece6;
  --line: #ddd5cc;
  --on-accent: #25160e;
  --canvas: #f6f3ee;
  --glass: #fffdfaeb;
  --shadow: 0 12px 40px #50321908, 0 2px 6px #50321904;
  --neo-dark: #a99d8f4a;
  --neo-light: #ffffff;
  --raised: 6px 6px 14px var(--neo-dark), -6px -6px 14px var(--neo-light);
  --control-raised: 6px 7px 15px #9f927f42, -5px -5px 13px #ffffffd9, inset 0 1px 0 #ffffffb8;
  --control-hover: 8px 9px 18px #9f927f4d, -6px -6px 15px #ffffffed, inset 0 1px 0 #fff;
  --control-pressed: inset 4px 4px 9px #a4988845, inset -4px -4px 9px #ffffffd9;
  --panel-raised: 13px 14px 34px #8d806f25, -10px -10px 28px #ffffffb8;
  background: var(--canvas);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
:root[data-theme="dark"] {
  --ink: #f7f2eb;
  --muted: #c3b9ae;
  --surface: #252422;
  --soft: #302e2b;
  --line: #49433d;
  --canvas: #191a19;
  --glass: #252422ef;
  --shadow: 0 12px 40px #0002;
  --neo-dark: #090a0a9c;
  --neo-light: #ffffff08;
  --raised: 7px 7px 16px var(--neo-dark), -5px -5px 13px var(--neo-light);
  --control-raised: 7px 8px 17px #050606a6, -5px -5px 13px #ffffff0a, inset 0 1px 0 #ffffff0a;
  --control-hover: 9px 10px 20px #030404bd, -6px -6px 15px #ffffff0d, inset 0 1px 0 #ffffff0d;
  --control-pressed: inset 5px 5px 11px #050606c2, inset -4px -4px 10px #ffffff08;
  --panel-raised: 14px 16px 38px #00000052, -8px -8px 24px #ffffff05;
}
body { background: var(--canvas); color: var(--ink); }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button {
  min-height: 44px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  box-shadow: var(--control-raised);
  transition: background .18s, box-shadow .18s, transform .18s, filter .18s;
}
button:hover:not(:disabled) { box-shadow: var(--control-hover); }
button:active:not(:disabled) { transform: translateY(1px) scale(.99); box-shadow: var(--control-pressed); }
/* Controles deliberadamente planos; o relevo fica no elemento acionável interno. */
.textbutton, .exit, .shortcuts > button, .app aside nav button, .mobilenav button { box-shadow: none; border-color: transparent; }
.textbutton:hover:not(:disabled), .exit:hover:not(:disabled), .shortcuts > button:hover:not(:disabled), .app aside nav button:hover:not(:disabled), .mobilenav button:hover:not(:disabled) { box-shadow: none; }
.app aside nav button.active, .mobilenav button.active { box-shadow: var(--control-pressed); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #bc4a08; outline-offset: 4px;
}
[data-theme="dark"] :focus-visible { outline-color: #ffb274; }
input, select, textarea { border: 1px solid var(--line); background: var(--surface); min-height: 48px; border-radius: 16px; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
h1, h2 { font-weight: 550; letter-spacing: -.045em; }
h1 { font-size: clamp(28px, 3.3vw, 44px); }
h3 { font-weight: 600; }
strong { font-weight: 600; }
small { font-size: 12px; }
.app { background: radial-gradient(ellipse at 85% 0%, #ffac5e10, transparent 40%), var(--canvas); }
.app aside { width: 228px; margin: 18px 0 18px 18px; border: 1px solid var(--line); border-radius: 30px; padding: 22px 16px; background: var(--surface); box-shadow: var(--shadow); }
.app aside .brand { align-self: center; }
.app aside .brand img { width: 94px; height: 96px; border-radius: 20px; }
.app aside nav { margin-top: 25px; gap: 6px; }
.app aside nav button { min-height: 48px; border-radius: 16px; padding: 12px 16px; color: var(--muted); }
.app aside nav button.active { background: var(--soft); color: var(--ink); box-shadow: inset 3px 0 0 var(--accent); }
.app aside nav button.active svg { color: #c35012; }
[data-theme="dark"] .app aside nav button.active svg { color: #ffae6b; }
.asidebottom { padding: 22px 12px 8px; }
.workspace { margin-left: 246px; }
.workspace header { padding: 32px 40px 24px; gap: 20px; }
.workspace header h2 { font-size: 22px; }
.headeractions { gap: 10px; padding-right: 105px; }
.headeractions select { border-radius: 24px; }
.headeractions .avatar { display: none; }
.headerlogout { border-radius: 24px; }
.theme-toggle { top: 37px; bottom: auto; right: 28px; z-index: 40; min-height: 44px; border-radius: 24px; box-shadow: var(--control-raised); background: var(--glass); }
.workspace main { padding: 8px 40px 30px; }
.pagetitle { margin: 12px 0 28px; }
.pagetitle p { max-width: 52ch; }
.page-kicker { display: block; margin-bottom: 12px; font-size: 10px; letter-spacing: .16em; }
.chip { background: var(--surface); border: 1px solid var(--line); color: var(--muted); padding: 9px 14px; }
.card, .asset, .task, .goal, .reward, .billing-card, .plan-card { border: 1px solid var(--line); border-radius: 26px; background: var(--surface); box-shadow: var(--shadow); }
.card { padding: 25px; }
.dashboard { grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); gap: 22px; }
.balance { padding: 28px 30px; border-radius: 30px; min-height: 260px; color: #342114; border: 1px solid #ffc393;
  background: radial-gradient(ellipse at 92% 8%, #fff5d9 0, transparent 48%), radial-gradient(ellipse at 3% 92%, #f46937 0, transparent 64%), radial-gradient(ellipse at 65% 60%, #ffd985 0, #ffad64 75%);
  box-shadow: 0 16px 34px #d4772720;
}
.balance::after { width: 280px; height: 280px; border: 1px solid #ffffff60; right: -100px; top: 55px; box-shadow: 0 0 0 24px #ffffff14, 0 0 0 49px #ffffff12; }
.balance > * { position: relative; z-index: 1; }
.balance p, .balance small, .balancefoot { color: #4b2c18; }
.balance p { margin-top: 22px; font-size: 13px; }
.balance h2 { font-size: clamp(36px,4vw,58px); font-weight: 500; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.balance h2 small { color: #4b2c18; font-size: 16px; }
.balance button { width: 44px; height: 44px; border: 1px solid #ffffff70; background: #ffffff38; color: #342114; }
.balancefoot { margin-top: 20px; max-width: 95%; line-height: 1.6; }
.balancefoot img { display: none; }
.summary { display: flex; flex-direction: column; align-items: flex-start; background: linear-gradient(145deg,var(--surface),var(--soft)); }
.summary h2 { font-size: clamp(30px,3vw,42px); margin: 14px 0 8px; overflow-wrap: anywhere; }
.summary .textbutton { margin-top: auto; padding-left: 0; }
.roundicon { border-radius: 16px; background: var(--soft); color: var(--ink); flex-shrink: 0; }
.shortcuts { padding: 8px 0; gap: 18px; margin: 24px 0; }
.shortcuts button { color: var(--ink); gap: 12px; font-weight: 500; font-size: 13px; }
.shortcuts button span { background: var(--soft); border: 1px solid var(--line); border-radius: 22px; width: 62px; height: 62px; box-shadow: var(--raised); color: var(--ink); }
.shortcuts button:hover span { background: var(--surface); }
.learnbanner { border-radius: 26px; background: linear-gradient(115deg,var(--soft),var(--surface)); border: 1px solid var(--line); padding: 26px 30px; }
.learnbanner h3 { font-size: 23px; letter-spacing: -.5px; margin: 10px 0; }
.learnbanner p { color: var(--muted); }
.learnbanner > svg { flex-shrink: 0; color: #b75a24; }
.twocol { gap: 22px; }
.listrow { padding: 17px 0; gap: 12px; border-color: var(--line); }
.listrow .grow { min-width: 100px; overflow-wrap: anywhere; }
.listrow > strong { font-variant-numeric: tabular-nums; }
.listrow small { overflow-wrap: anywhere; }
.positive { color: #24734d; }
.purple { color: #b3440e; }
[data-theme="dark"] .positive { color: #8bd7b0; }
[data-theme="dark"] .purple { color: #ffaf78; }
.sectionhead { gap: 12px; flex-wrap: wrap; }
.sectionhead h3 { margin-bottom: 0; }
.segmented { background: var(--soft); padding: 5px; border-radius: 22px; gap: 4px; }
.segmented button { border-radius: 17px; }
.segmented button.active { background: var(--surface); color: var(--ink); box-shadow: var(--control-pressed); }
.overlay { background: #181b2466; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.modal { background: var(--surface); border: 1px solid var(--line); border-radius: 30px; box-shadow: 0 25px 100px #0003; max-height: calc(100dvh - 48px); overscroll-behavior: contain; }
.modal .close { background: var(--soft); min-width: 44px; box-shadow: var(--control-raised); }
.toast { background: var(--ink); color: var(--surface); border-radius: 20px; box-shadow: 0 10px 35px #0003; padding: 16px 22px; max-width: calc(100vw - 32px); }
.demobar { background: var(--soft); color: var(--ink); font-size: 12px; padding: 10px 20px; gap: 8px; flex-wrap: wrap; }
.demobar button { min-height: 36px; font-size: 12px; }
.billing-card { padding: 26px; }
.billing-card form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.billing-card form > p, .billing-card form > button, .billing-card .plan-consent { grid-column: 1/-1; }
.billing-card label { min-width: 0; }
.billing-card input, .billing-card select { width: 100%; }
.billing-card input[type="checkbox"] { width: 20px; min-height: 20px; }
.billing-actions { flex-wrap: wrap; gap: 12px; }
.authpage { background: var(--canvas); }
.authcontent { background: var(--surface); }
.authcontent h1, .authcontent h2 { letter-spacing: -.04em; }
.authcontent .brand img { width: 90px; height: 92px; }
.authcontent form input { background: var(--canvas); }
.authvisual { border-radius: 0 36px 36px 0; }
.more-sheet { color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 30px 30px 0 0; position: fixed; inset: auto 0 0; margin: 0 auto; width: min(100%,540px); max-height: 85dvh; padding: 16px 24px calc(24px + env(safe-area-inset-bottom)); overflow: auto; overscroll-behavior: contain; }
.more-sheet::backdrop { background: #171a2266; backdrop-filter: blur(6px); }
.sheet-handle { width: 36px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 24px; }
.more-sheet h2 { margin: 8px 0 18px; font-size: 27px; }
.more-links { display: grid; gap: 8px; }
.more-links button { background: var(--soft); color: var(--ink); justify-content: flex-start; padding: 12px; border-radius: 18px; box-shadow: var(--control-raised); }
.more-links button > svg:last-child { margin-left: auto; }
.more-links button[aria-current="page"] { outline: 2px solid var(--accent); }
.more-note { font-size: 12px; margin: 24px 0 16px; }
.nav-icon { position: relative; display: inline-flex; }
.nav-notification { position: absolute; top: -2px; right: -4px; width: 7px; height: 7px; background: #b3440e; border-radius: 50%; }
@media (max-width: 1100px) and (min-width: 761px) {
  .app aside { width: 184px; margin-left: 12px; padding: 18px 10px; }
  .workspace { margin-left: 196px; }
  .workspace header, .workspace main { padding-left: 24px; padding-right: 24px; }
  .headeractions { padding-right: 0; }
  .theme-toggle { top: auto; bottom: 22px; right: 22px; }
  .dashboard { grid-template-columns: 1.3fr 1fr; }
  .balance { padding: 24px; }
}
@media (max-width: 760px) {
  :root { font-size: 15px; }
  .app aside { display: none; }
  .workspace { margin-left: 0; width: 100%; padding-bottom: calc(104px + env(safe-area-inset-bottom)); }
  .workspace header { padding: 26px 20px 18px; display: block; }
  .workspace header > div:first-child { padding-right: 90px; }
  .workspace header h2 { font-size: 23px; }
  .headeractions { padding: 14px 0 0; gap: 8px; justify-content: flex-start; }
  .headeractions select { flex: 1; max-width: none; min-width: 90px; }
  .headeractions button { min-height: 44px; }
  .headeractions .iconbutton { display: inline-flex; }
  .headerlogout { padding: 10px 14px; }
  .theme-toggle { position: absolute; top: 23px; right: 20px; bottom: auto; padding: 8px 12px; font-size: 12px; }
  body:has(.demobar) .theme-toggle { top: 23px; }
  .demobar { padding-right: 106px; min-height: 96px; }
  .workspace main { padding: 0 20px 16px; }
  .pagetitle { margin: 12px 0 22px; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
  .pagetitle h1 { font-size: 31px; }
  .pagetitle p { font-size: 14px; line-height: 1.55; }
  .pagetitle .chip { font-size: 11px; }
  .pagetitle > .chip { display: inline-block; }
  .page-kicker { font-size: 9px; letter-spacing: .12em; }
  .dashboard { display: grid; grid-template-columns: minmax(0,1fr); gap: 14px; }
  .balance { padding: 22px; min-height: 244px; border-radius: 28px; }
  .balance h2 { font-size: clamp(35px,10vw,48px); overflow-wrap: anywhere; }
  .balance .row span { font-size: 13px; }
  .balance p { margin-top: 18px; }
  .balancefoot { font-size: 11px; }
  .dashboard .summary { display: grid; grid-template-columns: 46px minmax(0,1fr); column-gap: 14px; padding: 20px; }
  .summary .roundicon { position: static; grid-row: 1/4; align-self: center; }
  .summary > span, .summary h2, .summary p, .summary .textbutton { grid-column: 2; }
  .summary h2 { font-size: 29px; margin: 8px 0; }
  .summary p { font-size: 12px; margin-bottom: 0; }
  .summary .textbutton { position: static; justify-self: start; font-size: 12px; padding-bottom: 0; }
  .shortcuts { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px 6px; margin: 22px 0; padding: 0; }
  .shortcuts button { width: auto; min-width: 0; padding: 6px 0; gap: 10px; font-size: 11px; }
  .shortcuts button span { width: 54px; height: 54px; border-radius: 19px; }
  .shortcuts button:last-child:nth-child(5) { grid-column: 1/-1; flex-direction: row; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; font-size: 13px; padding: 10px; }
  .shortcuts button:last-child:nth-child(5) span { width: 30px; height: 30px; box-shadow: none; background: transparent; border: 0; }
  .learnbanner { padding: 23px; gap: 14px; border-radius: 24px; }
  .learnbanner h3 { font-size: 22px; }
  .learnbanner p { margin-bottom: 0; font-size: 13px; }
  .learnbanner > svg { width: 30px; }
  .card { padding: 20px; border-radius: 24px; }
  .twocol, .assetgrid, .taskgrid, .goalgrid { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .listrow { gap: 10px; }
  .listrow strong { font-size: 13px; }
  .listrow p { font-size: 12px; }
  .listrow .roundicon { width: 36px; height: 36px; border-radius: 12px; }
  .stats { gap: 10px; }
  .stats .card { padding: 16px; }
  .stats h2 { font-size: 25px; overflow-wrap: anywhere; }
  .mobilenav, [data-theme="dark"] .mobilenav { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); position: fixed; inset: auto 12px calc(10px + env(safe-area-inset-bottom)); width: auto; padding: 8px 5px; gap: 2px; background: var(--glass); border: 1px solid var(--line); border-radius: 27px; box-shadow: 0 8px 34px #24170f20, inset 0 1px 0 #ffffff50; backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3); z-index: 50; overflow: visible; }
  .mobilenav button { min-width: 0; padding: 8px 2px; gap: 5px; min-height: 56px; background: transparent; color: var(--muted); font-size: 10px; border-radius: 20px; }
  .mobilenav button.active { color: var(--ink); background: var(--soft); font-weight: 700; }
  .mobilenav button.active::after { content: ''; height: 3px; width: 16px; background: var(--accent); border-radius: 3px; }
  .overlay { align-items: flex-end; padding: 0; }
  .modal { width: 100%; max-width: none; max-height: calc(100dvh - 24px); border-radius: 28px 28px 0 0; margin: 0; padding: 30px 22px calc(28px + env(safe-area-inset-bottom)); }
  .modal h2 { font-size: 26px; padding-right: 34px; }
  input, select, textarea { font-size: 16px; min-height: 50px; }
  .billing-card { padding: 22px; }
  .billing-card form { grid-template-columns: minmax(0,1fr); }
  .billing-actions > button { width: 100%; }
  .toast { bottom: calc(100px + env(safe-area-inset-bottom)); font-size: 13px; }
  footer { flex-wrap: wrap; gap: 12px; padding: 28px 0; }
  .authpage { min-height: 100dvh; height: auto; overflow: auto; }
  .authcontent { min-height: 100dvh; height: auto; overflow: visible; padding: 30px 24px; }
  .authcontent .brand { margin-bottom: 18px; }
  .authcontent .brand img { width: 78px; height: 80px; }
  .authcontent form { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media (prefers-contrast: more) { :root { --line: #72695f; --muted: #49423b; } .mobilenav { backdrop-filter: none; background: var(--surface); } }
