/* Dense, high-contrast workspace. Keep text readable; reduce decorative space. */
:root{--paper:#edf0f4;--ink:#172434;--muted:#536274;--line:#c8d1dc;--green:#175bc1;--lime:#dceaff;--soft:#edf4ff;--orange:#995500;--red:#b42318;--shadow:none;font-size:14px}
body{line-height:1.5}
.shell{grid-template-columns:204px minmax(0,1fr)}
.sidebar{padding:20px 12px 12px;background:#172434;color:#dce5f0;border-right:1px solid #0e1927}
.brand{font-size:23px;letter-spacing:0;padding:0 10px;gap:10px}.brand-icon{width:32px;height:32px;border-radius:4px;background:#2169cf;color:white}
.nav-label{font-size:12px;letter-spacing:0;color:#a5b6c9;margin:28px 12px 8px}
.nav{gap:4px}.nav button{padding:10px 12px;border-radius:3px;color:#d4dfec;font-size:14px;gap:10px;min-height:42px}.nav button:hover{background:#283d55}.nav button.active{background:#2169cf;color:#fff;font-weight:650;box-shadow:inset 3px 0 #8dbbff}.nav button.active::after{display:none}
.side-bottom .user{margin-top:16px}.user{font-size:13px;border-color:#3e5064}.avatar{background:#354b63;color:#fff;border-radius:4px}.user button{padding:6px}
.workspace{max-width:none;padding:0 24px 28px}.topbar{height:58px;gap:12px;border-bottom:1px solid #bcc8d5}.crumb{font-size:13px;color:#43546a}.period-selector{gap:8px}.period-selector select{background:#fff;border:1px solid #aebccc;border-radius:3px;max-width:320px;padding:6px 10px;font-size:14px;min-height:34px}.round{width:34px;height:34px;border-radius:3px;background:#fff;border-color:#aebccc}
.page-head{margin:18px 0 16px;gap:12px}.page-head h1{font-size:24px;font-weight:700;letter-spacing:0}.subtitle{font-size:13px;line-height:1.5;margin-top:4px;color:#536274}
.btn{padding:8px 14px;border-radius:3px;font-size:14px;font-weight:600;min-height:36px;border:1px solid transparent}.btn.secondary{border-color:#aebccc;background:white;color:#213b59}.btn.small{font-size:13px;min-height:32px;padding:5px 10px}.btn.light{color:#174e9e;background:#e4efff;border-color:#a3c5f4}.btn.danger{color:#a32017;border-color:#e5a59e;background:#fff1ef}.btn:disabled{opacity:1;color:#657386;background:#e7ebf0;border-color:#d3dae3}.btn:hover{filter:none;background:#104ba6;color:white}.btn.secondary:hover{background:#edf4ff;color:#124e9f}.link{color:#175bc1;font-size:13px;font-weight:550;padding:4px 2px}.link:hover{text-decoration:underline;color:#10458e}.actions{gap:8px}
.period-summary{padding:12px 16px;gap:12px;border:1px solid #bdcbdc;border-left:4px solid #2169cf;border-radius:3px;margin-bottom:14px;background:#f7faff}.period-summary>div{display:flex;align-items:center;flex-wrap:wrap;gap:8px 24px}.period-summary h2{font-size:15px;font-weight:650}.period-summary p{margin:0;font-size:13px;color:#43546a}
.stats{gap:12px;margin-bottom:16px}.stat{border-radius:3px;padding:12px 16px;border-color:#bdc9d8;border-top:3px solid #7494bb}.stat:nth-child(2){border-top-color:#d49632}.stat:nth-child(3){border-top-color:#458593}.stat:nth-child(4){border-top-color:#2169cf}.stat-label{font-size:14px;color:#33465b;font-weight:600}.stat-label svg{color:#536f90;width:18px;height:18px}.stat-value{font-size:30px;font-weight:700;letter-spacing:0;margin-top:4px;line-height:1.35}.stat-value small{font-size:13px;color:#536274}.stat-foot{font-size:12px;color:#536274;margin-top:4px}
.grid-main{grid-template-columns:minmax(0,1.5fr) minmax(300px,1fr);gap:16px}.panel{border-radius:3px;border-color:#bdc9d8;margin-bottom:16px;box-shadow:none}.panel-head{padding:10px 14px;background:#e8eef5;border-bottom:1px solid #bdc9d8;min-height:46px;gap:10px}.panel-head h2{font-size:15px;font-weight:700}.panel-head small{font-size:12px;color:#4c5f75}.panel-body{padding:14px}.habit-row,.activity-row,.ledger-row{padding:12px 14px;border-bottom:1px solid #d6dee8;gap:12px}.habit-row:nth-child(even),.activity-row:nth-child(even),.ledger-row:nth-child(even){background:#f7f9fc}.habit-row:hover,.activity-row:hover,.ledger-row:hover{background:#eef5ff}.habit-symbol{width:32px;height:32px;border-radius:3px;background:#e6edf6;color:#416087;flex-shrink:0}.habit-symbol.blue{background:#e6edf6;color:#416087}.habit-symbol.orange{background:#e6edf6;color:#416087}.row-title{font-size:15px;font-weight:600;gap:6px}.row-sub{font-size:13px;color:#536274;margin-top:3px;line-height:1.55}.points{font-size:13px;font-weight:600;color:#17539c}.check-btn{width:34px;height:34px;border-radius:3px;border-color:#8da5c1;color:#175bc1;background:#fff}.check-btn svg{width:18px;height:18px}.progress{height:6px;border-radius:2px;background:#dce4ee;margin-top:6px}.progress span{background:#397ccc}.tag{font-size:12px;line-height:1.4;border-radius:3px;background:#e8eef6;color:#36516e;padding:3px 7px}.tag.orange{background:#fff0cd;color:#805100}.tag.red{background:#fde7e4;color:#a1261c}.status-done{background:#dff2e7;color:#17603b}.status-pending{background:#fff0cd;color:#805100}
.empty{padding:23px 16px;font-size:13px}.empty svg{width:24px;height:24px;color:#71849b;margin-bottom:6px}.empty strong{font-weight:600}.empty .btn{margin-top:10px}.week-chart{height:120px;gap:12px}.day-bar i{background:#8eb4e6;border-radius:2px 2px 0 0}.day-bar.today i{background:#2169cf}.day-bar small,.day-bar b{font-size:12px;color:#536274}.activity-time{width:56px;font-size:13px;color:#536274;line-height:1.5}.activity-dot{background:#397ccc;border-radius:2px}.activity-duration{font-size:14px;font-weight:600}.tiny{font-size:13px;line-height:1.6}
.toolbar{gap:12px;margin-bottom:12px;padding:10px 12px;background:#f7f9fc;border:1px solid #c8d1dc;border-radius:3px}.tabs{background:#e3e9f1;padding:3px;border-radius:3px;gap:2px}.tabs button{font-size:13px;padding:6px 13px;border-radius:2px;color:#3d5067}.tabs button.selected{background:#175bc1;color:white;box-shadow:none;font-weight:600}.cards{gap:12px}.item-card{border-radius:3px;padding:16px;min-height:0}.item-card .top{margin-bottom:10px}.item-card h3{font-size:16px;font-weight:650}.item-card p{font-size:13px}.item-card .bottom{padding-top:12px}.reward-visual{display:none}.reward-price{font-size:24px;font-weight:650;letter-spacing:0}.reward-price small{font-size:13px}.positive{color:#167142}.negative{color:#b34425}.ledger-amount{font-size:15px}.banner{background:#edf4ff;border:1px solid #adc8ed;border-left:3px solid #397ccc;color:#345171;border-radius:3px;padding:10px 14px;font-size:13px;margin-bottom:14px}.timer{padding:14px;background:#edf4ff;border:1px solid #9fbee9;border-left:4px solid #2169cf;border-radius:3px;margin-bottom:14px}.timer-digits{font-size:28px;font-weight:650}.dot-live{background:#17854b}.period-card{padding:16px;border-radius:3px;margin-bottom:12px}.period-card.active{border-color:#397ccc;border-left:4px solid #2169cf}.period-card h3{margin-bottom:6px;font-size:16px}.eyebrow{font-size:12px;letter-spacing:0;color:#536274;margin-bottom:4px}
.list-table{font-size:14px}.list-table th{font-size:13px;font-weight:650;color:#344b65;background:#e8eef5;padding:10px 14px;white-space:nowrap;border-bottom:1px solid #b5c3d4}.list-table td{padding:11px 14px;line-height:1.5;vertical-align:middle;border-color:#d2dce7}.list-table tbody tr:nth-child(even){background:#f7f9fc}.list-table tbody tr:hover{background:#edf4ff}.item-table{min-width:880px}.item-table .item-name{min-width:210px;max-width:360px}.item-table .item-name strong{font-size:15px;font-weight:650}.item-table .item-rule{min-width:165px}.item-table .item-status{min-width:135px}.item-table .item-actions{min-width:210px}.item-table .points{white-space:normal}.item-table .actions{flex-wrap:nowrap;gap:10px;margin-top:5px}.item-table .progress{width:110px}.table-wrap{overscroll-behavior-x:contain}.archived{opacity:1;color:#536274}
dialog{border-radius:5px;border-color:#8b9eb7;box-shadow:0 16px 60px #14223540}dialog::backdrop{background:#15233766;backdrop-filter:none}.modal-head{padding:15px 20px;background:#e8eef5}.modal-head h2{font-size:19px;font-weight:650}.modal-body{padding:20px}.modal-foot{padding:12px 20px;background:#edf1f6}.form-grid{gap:15px}.field label{font-size:14px;font-weight:550;color:#293e57}.field input,.field select,.field textarea,.toolbar input,.toolbar select{border-color:#9eadc0;border-radius:3px;padding:8px 10px;min-height:36px;font-size:14px}.field input:focus,.field select:focus,.field textarea:focus{outline:2px solid #397ccc}.field small{font-size:12px;color:#536274}.form-check{font-size:14px}.form-error{font-size:13px;border-radius:3px}.horizontal .label,.horizontal .amount{font-size:13px}.horizontal .bar{background:#dce4ee;border-radius:2px}.horizontal .bar span{background:#397ccc;border-radius:2px}#toast{background:#172434;border-radius:4px;font-size:14px}.auth-shell{background:#edf0f4}.auth-art{background:#172434;padding:48px}.auth-art h1{font-size:32px;font-weight:650}.auth-art p{color:#bacce0}.auth-art .orbit{display:none}.auth-card{max-width:400px;background:#fff;padding:28px;border:1px solid #bdc9d8;border-radius:4px}.auth-card h2{font-size:24px;font-weight:650}.auth-art .brand-icon{background:#2169cf;color:#fff}
button:focus-visible,a:focus-visible{outline:2px solid #3584ee;outline-offset:3px}
@media(max-width:1100px) and (min-width:701px){.shell{grid-template-columns:180px minmax(0,1fr)}.workspace{padding:0 18px 26px}.sidebar{padding:18px 10px}.grid-main{grid-template-columns:1fr}.stats{gap:8px}.stat{padding:12px}.period-summary>div{display:block}.period-summary p{margin-top:4px}}
@media(max-width:700px){.shell{display:block}.sidebar{height:68px;padding:4px 2px;background:#172434;border-top-color:#344b65}.nav{gap:0}.nav button{font-size:11px;min-width:0;padding:7px 4px;gap:4px;min-height:54px}.nav button.active{background:#2169cf;color:#fff;box-shadow:none}.workspace{padding:0 12px 84px}.topbar{height:auto;min-height:58px;flex-wrap:wrap;padding:10px 0;gap:8px}.crumb{font-size:12px}.period-selector{gap:6px}.period-selector select{max-width:210px;font-size:13px}.page-head{margin:16px 0 12px}.page-head h1{font-size:22px}.page-head>.btn{font-size:13px;margin-top:0;padding:7px 10px}.subtitle{font-size:13px}.period-summary{padding:10px 12px}.period-summary>div{display:block}.period-summary p{font-size:12px;margin-top:4px}.stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:12px}.stat{padding:10px 12px}.stat-label{font-size:13px}.stat-value{font-size:28px;margin-top:4px}.stat-foot{font-size:12px}.grid-main{grid-template-columns:1fr;gap:0}.panel-head{padding:10px 12px}.habit-row,.activity-row{padding:12px;gap:9px}.habit-symbol{display:none}.points{font-size:12px}.row-sub{font-size:12px}.panel-body{padding:12px}.toolbar{padding:8px;align-items:flex-start}.toolbar>.actions{width:100%;gap:6px}.toolbar input,.toolbar select{max-width:100%}.cards{grid-template-columns:1fr}.list-table th,.list-table td{padding:10px 12px}.timer{padding:12px}.auth-art{min-height:180px;padding:24px}.auth-art h1{font-size:26px;margin-top:20px}.auth-form{padding:24px 16px}.auth-card{padding:22px}.period-card{padding:14px}.form-grid{gap:12px}}
/* Preserve category and point readability at laptop widths. */
.item-table .item-name{min-width:190px}.item-table .item-rule{min-width:160px}.item-table .item-status{min-width:120px}.item-table .item-actions{min-width:180px}.item-table td:nth-child(2){min-width:110px}.item-table td:nth-child(5){min-width:100px}.item-table .points,.item-table td:nth-child(5) .row-sub{white-space:nowrap}.item-table .actions{gap:7px}
/* Folder-based category selection: native disclosure + explicit selection. */
.category-tree{border:1px solid #aebccc;background:#fff;border-radius:3px;min-width:0;text-align:left}
.category-path{padding:8px 12px;background:#edf3fa;border-bottom:1px solid #c8d1dc;font-size:13px;overflow-wrap:anywhere;color:#43546a}.category-path strong{color:#174e9e;font-weight:600}
.folder-list{padding:6px;max-height:230px;overflow:auto}.folder-list>p{padding:8px}.folder-branch>summary{display:flex;align-items:center;cursor:pointer;list-style:none;gap:2px}.folder-branch>summary::-webkit-details-marker{display:none}.folder-branch>summary::before{content:'▸';width:24px;flex-shrink:0;text-align:center;color:#43546a;font-size:17px}.folder-branch[open]>summary::before{content:'▾'}.folder-children{margin-left:18px;padding-left:7px;border-left:1px solid #c8d1dc}.folder-leaf{padding-left:26px}.folder-choice{display:flex;gap:8px;align-items:center;text-align:left;width:100%;min-height:34px;padding:6px 9px;border-radius:2px;font-size:14px;border:1px solid transparent;overflow-wrap:anywhere}.folder-choice svg{width:18px;height:18px;color:#8d6b21}.folder-choice:hover{background:#edf4ff}.folder-choice.selected{background:#dceaff;border-color:#95b8eb;color:#144d9d;font-weight:650}.folder-choice.selected svg{color:#175bc1}.folder-choice span{min-width:0}.category-filter{position:relative;width:260px;max-width:100%;font-size:14px}.category-filter>summary{display:flex;gap:8px;align-items:center;cursor:pointer;padding:7px 10px;min-height:36px;border:1px solid #9eadc0;background:#fff;border-radius:3px;list-style:none}.category-filter>summary::after{content:'▾';margin-left:auto}.category-filter>summary::-webkit-details-marker{display:none}.category-filter>summary span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.category-filter .category-tree{position:absolute;top:100%;right:0;width:340px;max-width:calc(100vw - 40px);z-index:15;box-shadow:0 8px 24px #17243426;margin-top:4px}.folder-branch>summary:focus-visible{outline:2px solid #397ccc;outline-offset:1px}
[hidden]{display:none!important}.linked-picker{border:1px solid #aebccc;border-radius:3px;background:#fff}.linked-picker>summary{cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 12px;list-style:none}.linked-picker>summary::-webkit-details-marker{display:none}.linked-picker>summary [data-linked-label]{overflow-wrap:anywhere;min-width:0}.linked-picker>summary .link{white-space:nowrap}.linked-content{padding:10px;border-top:1px solid #c8d1dc}.linked-list{max-height:280px;margin-top:6px}.linked-branch>summary{cursor:pointer;padding:7px 4px;font-size:14px}.linked-branch>summary svg{width:17px;height:17px;vertical-align:middle;margin-right:6px;color:#8d6b21}.linked-branch>summary small{color:#536274;margin-left:5px}.linked-list .folder-choice{font-size:13px}.task-tools label{display:flex;align-items:center;gap:7px;white-space:nowrap;font-size:13px}.task-tools label select{width:auto}.task-tools .search{max-width:320px;flex:1}.linked-picker>summary:focus-visible,.linked-branch>summary:focus-visible{outline:2px solid #397ccc}.linked-list p{padding:8px}
@media(max-width:700px){.task-tools .search{max-width:none;flex-basis:100%}.task-tools .actions{flex-wrap:wrap}.linked-picker>summary{font-size:13px}}
/* Brand finish: preserve dense, functional workspace geometry. */
.brand{gap:10px}.brand-logo{width:38px;height:38px;object-fit:contain;border-radius:5px;flex-shrink:0}.sidebar{background:#172434}.sidebar .brand{padding:0 8px 16px;border-bottom:1px solid #34475e}.sidebar .nav-label{margin-top:18px}.nav button{transition:background-color .15s,color .15s}.nav button.active{background:#225fb8;box-shadow:inset 3px 0 #9dc7ff}.panel,.stat,.period-summary{box-shadow:0 1px 2px #17243406}.btn:not(:disabled){transition:background-color .15s,border-color .15s,box-shadow .15s}.btn.secondary:hover{border-color:#709acb;box-shadow:0 1px 3px #17243412}.list-table tbody tr{transition:background-color .12s}.list-table tbody tr:hover{background:#e9f2ff}.modal-head{position:sticky;top:0;z-index:2}.modal-foot{position:sticky;bottom:0;z-index:2}.auth-art{background:#172434;justify-content:flex-start;gap:60px}.auth-identity{margin:auto 0}.auth-identity>img{display:block;width:160px;height:160px;border-radius:12px;margin-bottom:28px}.auth-identity h1{font-size:30px;letter-spacing:.5px}.auth-identity p{font-size:14px;color:#b5c7de;margin-top:12px}.auth-card{box-shadow:0 10px 40px #1724340c;border-top:3px solid #397ccc}.auth-form{background:#edf0f4}.auth-art .brand{font-size:24px}.auth-art .orbit{display:none}
@media(max-width:700px){.sidebar .brand{display:none}.auth-art{gap:20px;min-height:0;padding:22px 26px}.auth-identity{margin:0}.auth-identity>img{display:none}.auth-identity h1{font-size:22px;margin:0}.auth-identity p{font-size:12px;margin-top:6px}.auth-art .brand-logo{width:32px;height:32px}.auth-card{max-width:400px}.modal-head,.modal-foot{padding:12px 16px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important}}

/* Progressive disclosure, shared by task and activity forms. */
.form-more{border:1px solid var(--border,#d5dde7);border-radius:6px;padding:12px;background:#f7f9fc}
.form-more>summary{cursor:pointer;font-weight:600;color:#263c56}
.form-more>.form-grid{margin-top:14px}.form-more>p{margin:10px 0}
.guide-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.guide-grid .panel{margin:0}.guide-grid p,.guide-grid li{line-height:1.85}.guide-grid ol{padding-left:22px}
@media(max-width:800px){.guide-grid{grid-template-columns:1fr}}

.calendar-summary{display:flex;flex-wrap:wrap;gap:20px;margin-bottom:12px}.calendar-summary b{font-size:22px;color:#255aba}.habit-calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;margin:14px 0}.habit-calendar>b{text-align:center}.calendar-day{min-height:80px;padding:8px;border:1px solid #d7dfe9;border-radius:4px;display:flex;flex-direction:column;gap:5px;overflow-wrap:anywhere;font-size:12px}.calendar-day.done{background:#e5f4e9;border-color:#6ba87b}.calendar-day.leave{background:#edf0ff;border-color:#9aa7da}.calendar-day.missed{background:#fff0ed}.calendar-day.recorded{background:#e8f2ff}.calendar-day.rest,.calendar-day.outside,.calendar-day.future{color:#7a8593;background:#f5f6f8}.calendar-day.pending{border:2px solid #3871d7}@media(max-width:600px){.calendar-day{padding:3px;font-size:10px;min-height:65px}}

.planning-layout{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(300px,1fr);gap:18px}.planning-layout .calendar-day{text-align:left;min-height:92px}.calendar-day.selected{outline:2px solid #2c65bf;background:#edf4ff}.calendar-day.is-today strong{color:#2359ad}.planning-item{padding:18px;border-bottom:1px solid #dde3ec;display:grid;gap:10px}.calendar-day.inactive{background:#f5f6f8;color:#7a8593}#planning-content .stats{grid-template-columns:repeat(2,minmax(0,1fr))}@media(max-width:1000px){.planning-layout{grid-template-columns:1fr}}@media(max-width:600px){.planning-layout .calendar-day{min-height:80px;padding:4px}.planning-layout .panel-body{padding:10px}}

.expense-filters{display:flex;flex-wrap:wrap;align-items:end;gap:12px;margin-bottom:16px}.expense-filters label{display:grid;gap:6px;font-size:13px}.expense-filters input{padding:9px;border:1px solid #cbd5e1;border-radius:4px;min-width:150px}.money{font-variant-numeric:tabular-nums;white-space:nowrap}.expense-daily{max-height:390px;overflow:auto}.expense-trend{display:grid;grid-template-columns:45px minmax(40px,1fr) auto;align-items:center;gap:10px;margin:12px 0;font-size:12px}.expense-trend i{display:block;min-height:5px;background:#3472c8;margin:3px 0}.expense-trend .refund-bar{background:#449b75}.expense-category-row{display:grid;gap:7px;margin-bottom:20px}@media(max-width:600px){.expense-filters label,.expense-filters input{width:100%}.expense-trend{grid-template-columns:40px minmax(20px,1fr) auto}}
