:root{
  --bg:#f4f6f8;--card:#fff;--text:#17202a;--muted:#6b7280;--line:#e5e7eb;
  --navy:#17243a;--soft:#edf1f5;--danger:#b42318;--warn:#9a6700;--ok:#177245;
  --shadow:0 8px 24px rgba(17,24,39,.07)
}
*{box-sizing:border-box}
html{font-size:18px;background:var(--bg)}
body{margin:0;color:var(--text);background:var(--bg);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans KR",sans-serif}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid rgba(23,36,58,.2);outline-offset:2px}
.hidden{display:none!important}
.app-shell{max-width:760px;margin:0 auto;min-height:100%;padding:0 16px 94px}
.app-header{display:flex;align-items:center;gap:12px;padding:18px 0 10px;position:sticky;top:0;background:rgba(244,246,248,.94);backdrop-filter:blur(12px);z-index:10}
.brand-wrap{min-width:0;flex:1}.brand{font-weight:700;font-size:1.55rem;letter-spacing:-.04em}.today{font-size:.78rem;color:var(--muted);margin-top:3px}
.profile-btn{border:1px solid var(--line);background:var(--card);border-radius:999px;min-height:46px;padding:0 14px;font-weight:650;font-size:.82rem;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sync-bar{font-size:.76rem;color:var(--ok);padding:0 2px 8px}
.login-view{padding:56px 0}.login-card{background:var(--card);border:1px solid var(--line);border-radius:28px;padding:32px 22px;text-align:center;box-shadow:var(--shadow)}
.login-mark{width:66px;height:66px;border-radius:20px;background:var(--navy);color:#fff;display:grid;place-items:center;margin:0 auto 20px;font-size:2rem;font-weight:700}
.login-card h1{font-size:1.75rem;line-height:1.22;margin:0 0 12px}.login-card p{color:var(--muted);margin:0 0 24px}.login-note{font-size:.75rem;color:var(--muted);margin-top:12px}
.primary,.secondary,.quick,.text-btn,.nav-btn{border:0}
.primary{background:var(--navy);color:#fff;border-radius:14px;min-height:52px;padding:0 18px;font-weight:650}
.secondary{background:var(--soft);color:var(--text);border-radius:14px;min-height:52px;padding:0 18px;font-weight:600}
.big{width:100%;min-height:58px;font-size:1rem}
.quick-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin:8px 0 14px}
.quick{background:var(--card);border:1px solid var(--line);border-radius:16px;min-height:58px;font-weight:650}
.quick.primary{background:var(--navy);color:#fff;border-color:var(--navy)}
.section-head,.calendar-head{display:flex;align-items:end;justify-content:space-between;gap:10px;margin:22px 2px 10px}.section-head h2,.calendar-head h2{font-size:1.12rem;margin:0;letter-spacing:-.02em}
.text-btn{background:transparent;color:var(--navy);font-weight:650;min-height:40px;padding:0 4px}
.filter-panel{background:var(--card);border:1px solid var(--line);border-radius:20px;padding:15px;margin-bottom:14px}
.filter-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.filter-label{font-size:.76rem;color:var(--muted);font-weight:650;margin:12px 0 6px}
.chips{display:flex;gap:7px;flex-wrap:wrap}.chip{border:1px solid var(--line);background:var(--card);border-radius:999px;min-height:42px;padding:8px 12px;font-size:.8rem;font-weight:600}
.chip.active{background:var(--navy);color:#fff;border-color:var(--navy)}
.stack{display:flex;flex-direction:column;gap:9px}
.card{background:var(--card);border:1px solid var(--line);border-radius:18px;padding:15px;box-shadow:0 2px 8px rgba(0,0,0,.025)}
.task-card{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:start}
.crumb{font-size:.72rem;color:var(--muted);margin-bottom:5px}.task-title{font-size:1rem;font-weight:650;line-height:1.35}.subtask-title{font-size:.84rem;margin-top:4px;color:#46505d}
.badges{display:flex;gap:5px;flex-wrap:wrap;margin-top:9px}.badge{font-size:.69rem;border-radius:999px;background:var(--soft);padding:5px 8px}.badge.hot{background:#fff0ee;color:var(--danger);font-weight:700}.badge.warn{background:#fff7df;color:var(--warn)}.badge.ok{background:#e8f7ef;color:var(--ok)}
.priority{font-size:1.15rem;font-weight:700;min-width:48px;text-align:right}.priority small{display:block;font-size:.62rem;color:var(--muted);font-weight:700}
.hero-event{background:var(--navy);color:#fff;border-radius:22px;padding:18px;margin-top:8px}.hero-event.empty{background:var(--card);color:var(--muted);border:1px dashed var(--line)}.hero-dday{font-weight:700;font-size:.82rem}.hero-title{font-size:1.15rem;font-weight:700;margin-top:4px}.hero-meta{font-size:.8rem;opacity:.8;margin-top:5px}
.progress-card .progress-top{display:flex;justify-content:space-between;gap:8px;align-items:center}.progress-card .project-title{font-weight:650}.progress-card .pct{font-weight:700;font-size:1.05rem}.bar{height:12px;background:var(--soft);border-radius:999px;overflow:hidden;margin-top:11px}.bar span{display:block;height:100%;background:var(--navy)}.meta-row{font-size:.72rem;color:var(--muted);display:flex;gap:9px;flex-wrap:wrap;margin-top:8px}
.empty-card{background:var(--card);border:1px dashed var(--line);border-radius:18px;padding:22px;text-align:center;color:var(--muted);font-size:.84rem}
.muted{font-size:.74rem;color:var(--muted);margin-top:2px}
.calendar-card .calendar-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:11px}.calendar-actions button{min-height:42px;border:1px solid var(--line);background:var(--soft);border-radius:12px;padding:0 11px;font-size:.76rem;font-weight:650}
.page{display:none}.page.active{display:block}
.bottom-nav{position:fixed;left:0;right:0;bottom:0;z-index:20;background:rgba(255,255,255,.97);border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(4,1fr);padding-bottom:env(safe-area-inset-bottom)}
.nav-btn{background:transparent;min-height:70px;color:var(--muted);font-size:.72rem;font-weight:600;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px}.nav-btn span{font-size:1.25rem;line-height:1}.nav-btn.active{color:var(--navy);font-weight:700}
.editor-dialog{border:0;border-radius:24px 24px 0 0;padding:0;width:min(100%,760px);max-width:none;margin:auto 0 0;background:var(--card);max-height:92vh}
.editor-dialog::backdrop{background:rgba(17,24,39,.48)}.editor-dialog form,.editor-dialog>div{padding:18px}.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.dialog-head h3{font-size:1.18rem;margin:0}.round-close{width:44px;height:44px;border:0;border-radius:50%;background:var(--soft);font-size:1.25rem}
.field{margin-top:13px}.field label{display:block;font-size:.78rem;color:#4b5563;font-weight:650;margin-bottom:6px}.field input,.field select,.field textarea{width:100%;min-height:52px;border:1px solid #d7dce2;border-radius:13px;background:#fff;padding:11px 12px;font-size:1rem}.field textarea{min-height:92px;resize:vertical}
.two{display:grid;grid-template-columns:1fr 1fr;gap:10px}.check{display:flex;gap:10px;align-items:center;margin-top:14px}.check input{width:22px;height:22px}.dialog-actions{display:grid;grid-template-columns:1fr 1.4fr;gap:9px;margin-top:18px}
.toast{position:fixed;left:16px;right:16px;bottom:86px;max-width:650px;margin:auto;background:#111827;color:#fff;border-radius:14px;padding:12px 14px;font-size:.8rem;z-index:50}
@media(min-width:720px){.editor-dialog{border-radius:24px;margin:auto;width:min(680px,calc(100% - 40px))}.app-shell{padding-top:8px}}
@media(max-width:390px){html{font-size:17px}.app-shell{padding-left:12px;padding-right:12px}.two{grid-template-columns:1fr}.profile-btn{max-width:125px}.quick{font-size:.82rem}}


/* ===== V2.1 consolidated patch ===== */
.filter-label-row{
  display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:12px
}
.filter-label-row .filter-label{margin:0}
.mini-filter-btn{
  min-height:38px;border:1px solid var(--line);background:var(--card);color:#7a5b00;
  border-radius:999px;padding:0 11px;font-size:.72rem;font-weight:650;white-space:nowrap
}
.mini-filter-btn.active{background:#fff5cc;border-color:#e4c65f;color:#6e5100}

.bottom-nav{grid-template-columns:repeat(4,1fr)}
.nav-btn{
  min-height:74px;font-size:.72rem;font-weight:600;gap:4px;transition:background .15s ease,color .15s ease
}
.nav-icon{
  width:30px;height:30px;display:grid;place-items:center;line-height:1
}
.nav-icon svg{
  width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:2.1;
  stroke-linecap:round;stroke-linejoin:round
}
.nav-progress .nav-icon svg rect{fill:currentColor;stroke:none}
.nav-home{color:#3568c8}
.nav-tasks{color:#24865b}
.nav-progress{color:#7a59bb}
.nav-events{color:#d06a2e}
.nav-btn.active{
  font-weight:700;background:rgba(23,36,58,.035)
}
.nav-home.active{color:#2456b4}
.nav-tasks.active{color:#167046}
.nav-progress.active{color:#6544aa}
.nav-events.active{color:#b9551e}

.gantt-head{align-items:flex-start}
.gantt-wrap{
  overflow-x:auto;background:var(--card);border:1px solid var(--line);border-radius:18px;
  -webkit-overflow-scrolling:touch
}
.gantt-table{min-width:930px}
.gantt-row{
  display:grid;grid-template-columns:158px repeat(25,30px);min-height:38px;border-bottom:1px solid #f0f2f4
}
.gantt-row:last-child{border-bottom:0}
.gantt-label{
  position:sticky;left:0;z-index:2;background:var(--card);display:flex;align-items:center;
  padding:8px 10px;border-right:1px solid var(--line);font-size:.72rem;font-weight:650;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis
}
.gantt-cell{
  border-left:1px solid #f1f3f5;display:flex;align-items:center;justify-content:center;
  font-size:.62rem;color:#89919c;position:relative
}
.gantt-head-row .gantt-cell{background:#fafbfc;font-weight:600}
.gantt-fill::after{
  content:"";position:absolute;inset:7px 1px;border-radius:4px;background:#dce5ef
}
.gantt-today{box-shadow:inset 2px 0 0 #c43c35}
.gantt-fill.gantt-today::after{background:#ead9db}
.gantt-pct{font-size:.62rem;color:var(--muted);margin-left:5px}

@media(max-width:390px){
  .nav-icon{width:29px;height:29px}
  .nav-icon svg{width:27px;height:27px}
  .nav-btn{min-height:72px}
}


/* ===== V2.2 refined project UX + coordinated palette ===== */
.project-chip-wrap{
  display:inline-flex;align-items:center;border:1px solid var(--line);border-radius:999px;
  background:var(--card);overflow:hidden;min-height:42px
}
.project-chip-wrap.selected{border-color:#334155;box-shadow:0 0 0 1px #334155 inset}
.project-chip-wrap .chip{
  border:0;border-radius:0;background:transparent;min-height:40px;padding:8px 12px 8px 7px
}
.project-chip-wrap .chip.active{background:#334155;color:#fff}
.project-star{
  width:40px;min-height:40px;border:0;background:transparent;color:#a0a7b0;
  font-size:1.05rem;display:grid;place-items:center;padding:0 0 0 7px
}
.project-star.on{color:#b88719}
.project-star:active{transform:scale(.96)}

.project-card-actions{display:flex;align-items:center;gap:9px}
.edit-hint{
  font-size:.66rem;color:var(--muted);border:1px solid var(--line);
  border-radius:999px;padding:4px 7px;font-weight:600
}
.progress-card{cursor:pointer}
@media(hover:hover) and (pointer:fine){
  .progress-card:hover{border-color:#cdd3da;background:#fcfcfd}
}

/* Coordinated palette: slate / teal / muted plum / terracotta */
.nav-home{color:#64748B}
.nav-tasks{color:#5A948A}
.nav-progress{color:#877991}
.nav-events{color:#C18470}

.nav-home.active{color:#334155}
.nav-tasks.active{color:#2A7F74}
.nav-progress.active{color:#6D6875}
.nav-events.active{color:#B66A50}

.nav-btn.active{
  background:rgba(51,65,85,.045);
  font-weight:700
}


/* ===== V2.3 dialog identity + favorite gold ===== */
.dialog-head h3{
  display:flex;align-items:center;gap:9px
}
.dialog-kind-icon{
  width:30px;height:30px;display:grid;place-items:center;flex:0 0 auto
}
.dialog-kind-icon svg{
  width:27px;height:27px;fill:none;stroke:currentColor;stroke-width:2.15;
  stroke-linecap:round;stroke-linejoin:round
}
.dialog-kind-icon.project-icon svg rect{fill:currentColor;stroke:none}
.task-icon{color:#2A7F74}
.project-icon{color:#6D6875}
.event-icon{color:#B66A50}

.editor-dialog[data-kind="task"] .dialog-actions .primary{background:#2A7F74}
.editor-dialog[data-kind="project"] .dialog-actions .primary{background:#6D6875}
.editor-dialog[data-kind="event"] .dialog-actions .primary{background:#B66A50}

.editor-dialog[data-kind="task"] .dialog-head h3{color:#245f57}
.editor-dialog[data-kind="project"] .dialog-head h3{color:#5f5866}
.editor-dialog[data-kind="event"] .dialog-head h3{color:#9f5843}

.favorite-field-label{
  display:flex!important;align-items:center;gap:6px
}
.favorite-field-star{
  color:#B8BEC6;font-size:1.1rem;line-height:1
}
.favorite-field-star.on{color:#F4C542}

.favorite-gold{color:#F4C542;font-size:1.02em}
.mini-filter-btn{
  color:#334155!important;background:#fff!important;border-color:#E5E7EB!important
}
.mini-filter-btn.active{
  color:#334155!important;background:#FFF7D6!important;border-color:#F4C542!important;
  box-shadow:0 0 0 1px rgba(244,197,66,.15) inset
}
.project-star.on{color:#F4C542!important}
.project-star{color:#B8BEC6}


/* ===== V2.3.1 project chip unified selected state ===== */
.project-chip-wrap{
  transition:background .15s ease,border-color .15s ease,box-shadow .15s ease;
}
.project-chip-wrap.selected{
  background:#334155 !important;
  border-color:#334155 !important;
  box-shadow:none !important;
}
.project-chip-wrap.selected .project-chip{
  background:transparent !important;
  color:#fff !important;
}
.project-chip-wrap.selected .project-star{
  background:transparent !important;
  color:#F4C542 !important;
}
.project-chip-wrap:not(.selected) .project-chip{
  background:transparent !important;
  color:var(--text) !important;
}
.project-chip-wrap:not(.selected) .project-star.on{
  color:#F4C542 !important;
}
.project-chip-wrap:not(.selected) .project-star:not(.on){
  color:#B8BEC6 !important;
}


/* ===== V2.3.2 favorite state stays visible when project is selected ===== */
.project-chip-wrap.selected .project-star.on{
  color:#F4C542 !important;
}
.project-chip-wrap.selected .project-star:not(.on){
  color:#CBD5E1 !important;
}
.project-chip-wrap:not(.selected) .project-star.on{
  color:#F4C542 !important;
}
.project-chip-wrap:not(.selected) .project-star:not(.on){
  color:#B8BEC6 !important;
}


/* ===== V2.5 visibility / sharing ===== */
.visibility-note{
  margin-top:8px;padding:9px 11px;border-radius:12px;background:#f7f8fa;
  color:var(--muted);font-size:.72rem;line-height:1.45
}
.field-help{
  margin-top:6px;color:var(--muted);font-size:.7rem;line-height:1.4
}
.privacy-badge.private,.privacy-inline.private{color:#6D6875;background:#f0edf3}
.privacy-badge.shared,.privacy-inline.shared{color:#2A7F74;background:#eaf5f2}
.privacy-inline{
  border-radius:999px;padding:3px 7px;font-weight:600
}


/* ===== V2.6 project dashboard ===== */
.dashboard-launcher{
  width:100%;min-height:50px;border:1px solid var(--line);background:var(--card);
  border-radius:16px;margin:-3px 0 14px;padding:0 14px;display:flex;align-items:center;
  gap:9px;color:#334155;font-weight:650;text-align:left
}
.dashboard-launcher.active{border-color:#94A3B8;background:#F8FAFC}
.dashboard-launcher-icon{
  width:28px;height:28px;border-radius:9px;background:#EEF2F6;display:grid;place-items:center;
  color:#6D6875;font-size:1.1rem
}
.dashboard-launcher-sub{margin-left:auto;color:var(--muted);font-size:.7rem;font-weight:500}

.dashboard-top{
  display:flex;align-items:end;gap:12px;justify-content:space-between;margin:10px 0 12px
}
.dashboard-back{white-space:nowrap}
.dashboard-project-select-wrap{min-width:0;flex:1;max-width:430px}
.dashboard-project-select-wrap label{
  display:block;font-size:.7rem;color:var(--muted);font-weight:650;margin-bottom:4px
}
.dashboard-project-select-wrap select{
  width:100%;min-height:48px;border:1px solid var(--line);border-radius:13px;
  background:var(--card);padding:0 12px;font-size:.9rem;font-weight:650
}

.dashboard-project-card{
  display:flex;align-items:center;justify-content:space-between;gap:12px;background:var(--card);
  border:1px solid var(--line);border-radius:18px;padding:15px;margin-bottom:10px
}
.dashboard-project-title{font-size:1.14rem;font-weight:700;margin-top:3px}
.dashboard-edit-project{
  border:1px solid var(--line);background:var(--soft);min-height:40px;border-radius:12px;
  padding:0 10px;color:var(--text);font-size:.72rem;font-weight:650;white-space:nowrap
}

.dashboard-summary{
  display:grid;grid-template-columns:repeat(5,1fr);gap:7px;margin-bottom:15px
}
.dashboard-summary>div{
  background:var(--card);border:1px solid var(--line);border-radius:14px;padding:10px 6px;text-align:center
}
.dashboard-summary b{display:block;font-size:1.02rem}
.dashboard-summary span{display:block;color:var(--muted);font-size:.65rem;margin-top:2px}
.dashboard-progress-mini{background:#F8FAFC!important}

.dashboard-list-head,
.dashboard-task-row{
  display:grid;grid-template-columns:minmax(0,1fr) 100px 82px;gap:8px;align-items:center
}
.dashboard-list-head{
  padding:0 11px 7px;color:var(--muted);font-size:.68rem;font-weight:650
}
.dashboard-list-head span:nth-child(2),
.dashboard-list-head span:nth-child(3){text-align:center}
.dashboard-task-list{display:flex;flex-direction:column;gap:7px}
.dashboard-task-row{
  width:100%;border:1px solid var(--line);background:var(--card);border-radius:14px;
  padding:11px;text-align:left;color:var(--text);min-height:58px
}
.dashboard-task-row:active{background:#F8FAFC}
.dashboard-task-name{min-width:0}
.dashboard-task-name b{
  display:block;font-size:.84rem;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis
}
.dashboard-task-name small{
  display:block;margin-top:2px;color:var(--muted);font-size:.68rem;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis
}
.dashboard-status{
  display:flex;align-items:center;justify-content:center;gap:5px;font-size:.7rem;font-weight:650
}
.dashboard-status.done{color:#2A7F74}
.dashboard-status.doing{color:#6B7280}
.dashboard-status.wait{color:#94A3B8}
.dashboard-status.hold{color:#8B7E91}
.status-symbol{
  width:20px;height:20px;border-radius:50%;display:grid;place-items:center;font-style:normal;
  border:1.5px solid currentColor;font-size:.72rem
}
.dashboard-status.done .status-symbol{background:#EAF5F2}
.status-spinner{
  width:19px;height:19px;border:2px solid #D6DCE2;border-top-color:#2A7F74;
  border-radius:50%;display:inline-block;animation:dontmissSpin 1.2s linear infinite
}
@keyframes dontmissSpin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.status-spinner{animation:none;border-top-color:#2A7F74}}

.dashboard-due{text-align:center;line-height:1.05}
.dashboard-due .dash-date{display:block;font-size:.72rem;font-weight:650}
.dashboard-due small{display:block;color:var(--muted);font-size:.61rem;margin-top:3px}
.dashboard-due .overdue{color:#B42318}
.dashboard-due .today{color:#B9551E}
.dashboard-due .soon{color:#9A6700}
.dash-no-due{font-size:.68rem;color:#A0A7B0}

.project-edit-btn{
  cursor:pointer;font-family:inherit
}

@media(max-width:480px){
  .dashboard-launcher-sub{display:none}
  .dashboard-top{align-items:center}
  .dashboard-list-head,
  .dashboard-task-row{grid-template-columns:minmax(0,1fr) 82px 66px;gap:5px}
  .dashboard-summary{grid-template-columns:repeat(5,1fr);gap:4px}
  .dashboard-summary>div{padding:8px 3px}
  .dashboard-summary b{font-size:.9rem}
  .dashboard-summary span{font-size:.58rem}
  .dashboard-task-row{padding:10px 8px}
  .dashboard-task-name b{font-size:.8rem}
  .dashboard-status{font-size:.64rem;gap:3px}
  .status-symbol,.status-spinner{width:17px;height:17px}
  .dashboard-due .dash-date{font-size:.65rem}
}


/* ===== V2.7 wedding budget / expense management ===== */
.bottom-nav.has-cost{grid-template-columns:repeat(5,1fr)}
.nav-cost{color:#A87C2F}
.nav-cost.active{color:#8A641F}
.cost-icon{color:#A87C2F}
.editor-dialog[data-kind="cost"] .dialog-actions .primary{background:#A87C2F}
.editor-dialog[data-kind="cost"] .dialog-head h3{color:#7B5A21}

.budget-badge{background:#FFF8E7;color:#7A5A1E}
.dashboard-list-head.cost-enabled,
.dashboard-task-list.cost-enabled .dashboard-task-row{
  grid-template-columns:minmax(0,1fr) 92px 74px 116px
}
.dashboard-cost{text-align:right;line-height:1.15}
.dashboard-cost b{display:block;font-size:.66rem;font-weight:650}
.dashboard-cost small{display:block;color:var(--muted);font-size:.58rem;margin-top:3px}
.dashboard-cost.over b,.dashboard-cost.over small{color:#B42318}

.cost-topbar{display:flex;align-items:end;gap:10px;justify-content:space-between;margin:10px 0 12px}
.cost-project-select-wrap{flex:1;max-width:450px}
.cost-project-select-wrap label{display:block;font-size:.7rem;color:var(--muted);font-weight:650;margin-bottom:4px}
.cost-project-select-wrap select{width:100%;min-height:48px;border:1px solid var(--line);border-radius:13px;background:var(--card);padding:0 12px;font-weight:650}
.cost-add-btn{min-height:48px;border:0;border-radius:13px;background:#A87C2F;color:white;padding:0 14px;font-weight:700}

.cost-summary-card{background:var(--card);border:1px solid var(--line);border-radius:20px;padding:16px}
.cost-summary-title{display:flex;align-items:center;justify-content:space-between;gap:10px}
.cost-summary-title h2{margin:3px 0 0;font-size:1.2rem}
.cost-summary-title button{border:1px solid var(--line);background:var(--soft);border-radius:12px;min-height:40px;padding:0 10px;font-size:.7rem;font-weight:650}
.cost-kpis{display:grid;grid-template-columns:repeat(5,1fr);gap:7px;margin-top:13px}
.cost-kpis>div{border:1px solid var(--line);border-radius:13px;padding:10px 7px;background:#FAFBFC}
.cost-kpis span{display:block;color:var(--muted);font-size:.62rem}
.cost-kpis b{display:block;margin-top:4px;font-size:.86rem;line-height:1.2}
.cost-kpis .danger b{color:#B42318}
.cost-progress-wrap{margin-top:14px}
.cost-progress-meta{display:flex;justify-content:space-between;gap:8px;font-size:.72rem}
.cost-progress-bar{position:relative;height:12px;border-radius:999px;background:#EDF0F3;overflow:hidden;margin-top:7px}
.cost-progress-bar span{display:block;height:100%;background:#2A7F74}
.cost-progress-wrap.warning .cost-progress-bar span{background:#D48A32}
.cost-progress-wrap.danger .cost-progress-bar span{background:#B42318}
.cost-progress-bar i{position:absolute;right:0;top:0;height:100%;background:#7F1D1D}
.cost-forecast{margin-top:10px;padding:9px 11px;border-radius:12px;background:#F7F8FA;color:var(--muted);font-size:.7rem}
.cost-forecast.danger{background:#FFF0EE;color:#B42318;font-weight:650}

.cost-task-card{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer}
.cost-task-main{min-width:0}
.cost-task-money{text-align:right;min-width:150px}
.cost-task-money b{display:block;font-size:.78rem}
.cost-task-money small{display:block;color:var(--muted);font-size:.65rem;margin-top:3px}
.cost-task-money.warning b,.cost-task-money.warning small{color:#9A6700}
.cost-task-money.danger b,.cost-task-money.danger small{color:#B42318}

.cost-over-card{background:#FFF7F5;border:1px solid #F4C7C2;border-radius:16px;padding:10px 13px}
.cost-over-card>div{display:flex;justify-content:space-between;gap:12px;padding:7px 0;border-bottom:1px solid #F7DCD8}
.cost-over-card>div:last-child{border-bottom:0}
.cost-over-card b{font-size:.75rem}
.cost-over-card span{color:#B42318;font-size:.72rem;font-weight:700}

.expense-row{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer}
.expense-amount{text-align:right;font-weight:700;white-space:nowrap}
.expense-amount button{display:block;margin:5px 0 0 auto;border:0;background:transparent;color:#B42318;font-size:.64rem;padding:2px 0}

@media(max-width:520px){
  .dashboard-list-head.cost-enabled,
  .dashboard-task-list.cost-enabled .dashboard-task-row{
    grid-template-columns:minmax(0,1fr) 66px 58px 88px
  }
  .dashboard-cost b{font-size:.58rem}
  .dashboard-cost small{font-size:.52rem}
  .cost-kpis{grid-template-columns:repeat(2,1fr)}
  .cost-kpis>div:last-child{grid-column:span 2}
  .cost-task-money{min-width:118px}
  .cost-task-money b{font-size:.7rem}
}


/* ===== V2.7.1 design polish: dusty rose cost palette ===== */
:root{
  --cost:#B87583;
  --cost-active:#9F5F6D;
  --cost-soft:#F8EAED;
  --cost-border:#E8C9D0;
  --cost-text:#7F4D58;
}
.nav-cost{color:#C99AA4!important}
.nav-cost.active{color:var(--cost-active)!important}
.cost-icon{color:var(--cost)!important}
.editor-dialog[data-kind="cost"] .dialog-actions .primary{
  background:var(--cost)!important;
  font-weight:600!important
}
.editor-dialog[data-kind="cost"] .dialog-head h3{color:var(--cost-text)!important}
.cost-add-btn{
  background:var(--cost)!important;
  font-weight:600!important;
  letter-spacing:-.01em
}
.cost-add-btn:active{background:var(--cost-active)!important}
.budget-badge{background:var(--cost-soft)!important;color:var(--cost-text)!important}

.cost-summary-card{padding:17px!important;border-radius:20px!important}
.cost-kpis-main{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:14px}
.cost-kpis-main>div{min-width:0;border:1px solid var(--line);border-radius:14px;padding:12px 9px;background:#FAFBFC}
.cost-kpis-main span,.cost-kpis-sub span{display:block;color:var(--muted);font-size:.62rem;font-weight:500}
.cost-kpis-main b{display:block;margin-top:5px;font-size:.92rem;line-height:1.25;font-weight:650;word-break:keep-all}
.cost-kpis-main .danger{background:#FFF3F1;border-color:#F2C8C2}
.cost-kpis-main .danger span,.cost-kpis-main .danger b{color:#B42318}

.cost-kpis-sub{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}
.cost-kpis-sub>div{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0;border:1px solid var(--line);border-radius:12px;padding:9px 11px;background:#fff}
.cost-kpis-sub b{font-size:.73rem;font-weight:600;white-space:nowrap}

.cost-progress-bar span{background:var(--cost)!important}
.cost-progress-wrap.warning .cost-progress-bar span{background:#D48A32!important}
.cost-progress-wrap.danger .cost-progress-bar span{background:#B42318!important}
.cost-progress-meta{font-weight:500}
.cost-progress-meta b{font-weight:600}
.cost-forecast{margin-top:10px!important;padding:10px 12px!important;line-height:1.45;font-weight:500}

.cost-task-card{padding:15px!important;border-radius:18px!important}
.cost-task-money b{font-weight:600!important}
.cost-task-money small{font-weight:500}
.cost-task-money:not(.warning):not(.danger) b{color:var(--cost-text)}

.expense-row{padding:14px 15px!important;border-radius:17px!important}
.expense-amount{font-weight:600!important}
.expense-amount button{font-weight:500}

.cost-over-card{background:#FFF5F3!important;border-color:#F0CCC7!important}
.cost-over-card b{font-weight:600!important}
.cost-over-card span{font-weight:650!important}

.dashboard-cost b{font-weight:600!important}
.dashboard-cost.over b,.dashboard-cost.over small{color:#B42318!important}

.cost-project-select-wrap select,.cost-add-btn,.cost-summary-title button{border-radius:13px!important}
.cost-summary-title h2{font-weight:650!important}
.cost-summary-title button{font-weight:600!important}
.cost-project-select-wrap label{font-weight:600!important}
.cost-project-select-wrap select{font-weight:600!important}

@media(max-width:520px){
  .cost-kpis-main{gap:5px}
  .cost-kpis-main>div{padding:10px 5px}
  .cost-kpis-main span{font-size:.56rem}
  .cost-kpis-main b{font-size:.76rem}
  .cost-kpis-sub{grid-template-columns:1fr}
  .cost-kpis-sub>div{padding:8px 10px}
  .cost-task-card{gap:8px}
  .cost-task-money{min-width:108px!important}
}

/* ===== V2.7.2 delete actions ===== */
.dialog-actions{
  grid-template-columns:1fr 1.8fr 1fr;
  align-items:stretch
}
.dialog-actions .editor-save-btn{font-weight:700}
.danger-btn{
  min-height:52px;border:1px solid #E7B8B3;background:#FFF5F4;color:#A83F36;
  border-radius:14px;padding:0 14px;font-weight:650
}
.danger-btn:active{background:#FDEAE8}
@media(max-width:390px){
  .dialog-actions{grid-template-columns:.9fr 1.65fr .9fr;gap:7px}
  .danger-btn,.dialog-actions .secondary,.dialog-actions .primary{padding-left:10px;padding-right:10px}
}


/* ===== V2.7.4 UI polish: refined navigation / lighter typography ===== */
:root{
  --bg:#F6F7FB;
  --card:#FFFFFF;
  --text:#162033;
  --muted:#7C8799;
  --line:#E6EAF0;
  --navy:#16284A;
  --soft:#F4F6F9;
  --ok:#2F9E67;
  --accent:#E58D73;
  --accent-soft:rgba(229,141,115,.16);
}
html{background:var(--bg)}
body{background:var(--bg);font-weight:400;letter-spacing:-.01em}
.app-shell{max-width:780px;padding:0 20px 98px}
.app-header{padding:18px 0 12px;background:rgba(246,247,251,.95)}
.brand{font-size:1.7rem;font-weight:700;letter-spacing:-.05em}
.today{font-size:.8rem;color:var(--muted);font-weight:500}
.profile-btn{min-height:48px;padding:0 18px;border-radius:999px;font-weight:600;background:#fff}
.sync-bar{padding:0 2px 10px;font-size:.8rem;font-weight:500;color:var(--ok)}
.quick-actions{gap:12px;margin:10px 0 14px}
.quick{min-height:58px;border-radius:20px;font-weight:600;background:#fff}
.quick.primary{background:var(--navy);border-color:var(--navy);box-shadow:0 10px 22px rgba(22,40,74,.08)}
.dashboard-launcher{min-height:54px;border-radius:18px;padding:0 15px;border-color:var(--line);color:#22304a;font-weight:600;background:#fff}
.dashboard-launcher-icon{width:30px;height:30px;border-radius:10px;background:#F1F3F7;color:#77839A}
.dashboard-launcher-sub{font-size:.72rem;font-weight:500}
.section-head,.calendar-head{margin:24px 2px 12px}
.section-head h2,.calendar-head h2{font-size:1.15rem;font-weight:700;letter-spacing:-.03em}
.text-btn{font-weight:600;color:#22304a}
.card,.empty-card,.filter-panel,.cost-summary-card,.dashboard-project-card,.dashboard-task-row,.cost-task-card,.expense-row{border-radius:20px}
.card,.filter-panel,.cost-summary-card,.dashboard-project-card,.dashboard-task-row,.cost-task-card,.expense-row,.quick,.dashboard-launcher,.profile-btn{box-shadow:0 4px 16px rgba(22,32,51,.03)}
.empty-card{padding:24px;border-style:dashed;color:var(--muted)}
.muted{font-size:.74rem;color:var(--muted);font-weight:500}
.task-title,.progress-card .project-title,.cost-summary-title h2,.dashboard-project-title{font-weight:700}
.crumb,.subtask-title,.meta-row,.badge,.field label,.cost-project-select-wrap label,.dashboard-project-select-wrap label{font-weight:500}
.badge{padding:5px 9px}

/* Refined nav: neutral by default, one elegant accent when active */
.bottom-nav{
  background:rgba(255,255,255,.96)!important;
  border-top:1px solid var(--line)!important;
  box-shadow:0 -10px 30px rgba(22,32,51,.08);
  backdrop-filter:blur(14px);
}
.bottom-nav{grid-template-columns:repeat(4,1fr)!important}
.bottom-nav.has-cost{grid-template-columns:repeat(5,1fr)!important}
.nav-home,.nav-tasks,.nav-progress,.nav-events,.nav-cost,
.nav-home.active,.nav-tasks.active,.nav-progress.active,.nav-events.active,.nav-cost.active{
  color:#8D98A8!important;
}
.nav-btn{
  position:relative;background:transparent!important;min-height:78px;font-size:.74rem;
  font-weight:500!important;gap:5px;color:#8D98A8!important;padding:8px 4px 10px;
  transition:color .18s ease, transform .18s ease;
}
.nav-btn .nav-icon{width:34px;height:34px;position:relative;z-index:1}
.nav-btn .nav-icon svg{width:24px;height:24px;stroke-width:1.95}
.nav-btn.active{
  color:var(--accent)!important;
  font-weight:700!important;
}
.nav-btn.active::before{
  content:"";position:absolute;left:50%;top:4px;transform:translateX(-50%);
  width:62px;height:62px;border-radius:20px;
  background:radial-gradient(circle at center, rgba(229,141,115,.20) 0%, rgba(229,141,115,.12) 42%, rgba(229,141,115,0) 72%);
  filter:blur(.4px);pointer-events:none;
}
.nav-btn.active .nav-icon,
.nav-btn.active .nav-icon svg{color:var(--accent)!important}
.nav-btn:active{transform:translateY(1px)}

/* Calendar actions and pills */
.calendar-head .text-btn{
  min-height:38px;padding:0 12px;border-radius:999px;border:1px solid var(--line);background:#fff;
}
.mini-filter-btn{font-weight:600!important}

/* Cost page polish */
.cost-project-select-wrap select,
.dashboard-project-select-wrap select,
.field input,.field select,.field textarea{
  border-radius:15px;border-color:#DCE3EA;
}
.cost-add-btn{
  min-height:48px;border-radius:15px;background:#D78E8F!important;color:#fff;
  font-weight:600!important;letter-spacing:-.01em;padding:0 16px;
  box-shadow:0 8px 20px rgba(215,142,143,.18);
}
.cost-add-btn:active{background:#C77C7D!important}
.cost-summary-title button,.dashboard-edit-project{
  min-height:40px;border-radius:12px;font-weight:600!important;background:#F6F7FA;border-color:var(--line);
}
.cost-kpis-main b,.cost-kpis-sub b,.expense-amount,.cost-task-money b,.dashboard-cost b{font-weight:600!important}
.cost-summary-card{padding:18px 18px 17px}
.cost-progress-bar{background:#EEF2F5}
.cost-forecast{background:#F7F8FB}

/* Dialog actions */
.primary{background:var(--navy);font-weight:600}
.secondary{font-weight:550}
.dialog-actions .editor-save-btn{font-weight:700;box-shadow:0 10px 22px rgba(22,40,74,.10)}
.danger-btn{font-weight:600}
.dialog-head h3{font-weight:700}
.round-close{background:#F2F5F8}

@media(max-width:520px){
  .app-shell{padding-left:14px;padding-right:14px;padding-bottom:102px}
  .quick{min-height:56px}
  .brand{font-size:1.6rem}
  .dashboard-launcher{min-height:52px}
  .nav-btn{min-height:76px;font-size:.72rem}
  .nav-btn.active::before{width:58px;height:58px;top:6px}
  .cost-add-btn{padding:0 14px}
}

/* ===== V2.7.5 reminders / push notifications ===== */
.reminder-badge{background:#FFF4EE!important;color:#B86448!important;font-weight:600!important}
.notification-setting-card{
  margin-top:12px;padding:14px;border:1px solid var(--line);border-radius:16px;background:#FAFBFD;
  display:flex;align-items:center;justify-content:space-between;gap:12px
}
.notification-setting-card b{font-size:.9rem;font-weight:650}
.notification-actions{display:flex;gap:7px;flex:0 0 auto}
.notification-actions button{min-height:42px;padding:0 11px;border-radius:12px;font-size:.74rem}
@media(max-width:420px){
  .notification-setting-card{align-items:flex-start;flex-direction:column}
  .notification-actions{width:100%}
  .notification-actions button{flex:1}
}
