:root { --brand: #123c69; --brand-dark: #0c2949; --page: #f4f7fb; }
body { background: var(--page); color: #1f2937; }
.navbar { background: linear-gradient(110deg, var(--brand-dark), var(--brand)); }
.card { border: 0; border-radius: 14px; box-shadow: 0 4px 18px rgba(15, 23, 42, .07); }
.card-header, .card-footer { border-color: #edf1f5; }
.stat-card { border-left: 4px solid var(--brand); }
.table thead th { background: #f8fafc; color: #64748b; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.btn { border-radius: 9px; }
.form-control, .form-select { border-radius: 9px; }

.auth-page{min-height:100vh;background:linear-gradient(135deg,#eef4fb 0%,#f8fafc 55%,#e8eef7 100%)}
.auth-card{max-width:460px;margin-top:6vh;border-radius:18px}

/* Return Manager */
.page-hero{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:1rem}.eyebrow{display:block;color:#64748b;font-size:.72rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;margin-bottom:.4rem}.metric-card{background:#fff;border-radius:15px;padding:1.25rem 1.35rem;box-shadow:0 4px 18px rgba(15,23,42,.07);border-top:3px solid #cbd5e1}.metric-primary{border-top-color:#2563eb}.metric-info{border-top-color:#0891b2}.metric-warning{border-top-color:#d97706}.metric-success{border-top-color:#16a34a}.metric-label{color:#64748b;font-size:.82rem;font-weight:600}.metric-value{font-size:2rem;font-weight:700;line-height:1.15;margin-top:.35rem}.filter-panel{background:#fff;border-radius:14px;padding:1rem 1.1rem;box-shadow:0 4px 18px rgba(15,23,42,.06)}.return-table td{padding-top:1rem;padding-bottom:1rem}.year-pill{display:inline-flex;align-items:center;justify-content:center;min-width:58px;padding:.28rem .55rem;border-radius:999px;background:#eef4fb;color:#123c69;font-weight:700}.status-badge{display:inline-flex;align-items:center;border-radius:999px;padding:.34rem .62rem;font-size:.72rem;font-weight:700;white-space:nowrap}.status-draft{background:#eef2f7;color:#475569}.status-preparing{background:#e0f2fe;color:#0369a1}.status-review{background:#fef3c7;color:#92400e}.status-ready-to-file{background:#dbeafe;color:#1d4ed8}.status-filed{background:#dcfce7;color:#166534}.status-amended{background:#f3e8ff;color:#7e22ce}.slim-progress{height:7px;background:#e8eef5}.slim-progress .progress-bar{background:linear-gradient(90deg,#123c69,#2f6fae)}.empty-state{text-align:center;padding:3.5rem 1rem}.empty-state.compact{padding:2rem 1rem;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:12px}.empty-state-icon{font-size:2rem;color:#94a3b8}.return-accordion .accordion-item{border:0;border-radius:15px!important;overflow:hidden;box-shadow:0 4px 18px rgba(15,23,42,.07)}.return-accordion .accordion-button{background:#fff;box-shadow:none;padding:1.15rem 1.25rem}.return-accordion .accordion-button:not(.collapsed){color:#0f172a;background:#f8fbff}.tax-year-number{font-size:1.25rem;font-weight:750}.year-status{font-size:.72rem;font-weight:700;padding:.28rem .55rem;border-radius:999px;background:#eef2f7;color:#475569}.year-toolbar{display:flex;flex-wrap:wrap;align-items:end;gap:1rem;padding:1rem;background:#f8fafc;border-radius:12px}.return-card{background:#fff;border:1px solid #e5eaf0;border-radius:14px;padding:1.1rem;transition:transform .15s ease,box-shadow .15s ease}.return-card:hover{transform:translateY(-1px);box-shadow:0 8px 22px rgba(15,23,42,.08)}.return-card-title{font-size:1rem;font-weight:750}.return-meta{display:flex;justify-content:space-between;font-size:.8rem;padding:.65rem .75rem;border-radius:9px;background:#f8fafc;color:#64748b}.return-meta strong{color:#334155}.return-settings{border-top:1px solid #edf1f5;padding-top:.7rem}.return-settings summary{cursor:pointer;color:#64748b;font-size:.8rem;font-weight:600;list-style:none}.return-settings summary::-webkit-details-marker{display:none}.return-settings summary:after{content:'+';float:right}.return-settings[open] summary:after{content:'−'}
@media(max-width:767.98px){.metric-value{font-size:1.6rem}.return-table{min-width:900px}.year-toolbar{display:block}.year-toolbar>form{margin-bottom:.75rem}}
.metric-link{display:inline-block;margin-top:.55rem;font-size:.78rem;font-weight:650;text-decoration:none;color:#2563eb}.portfolio-row{display:flex;justify-content:space-between;align-items:center;padding:.75rem 0;border-bottom:1px solid #eef2f7}.portfolio-row:last-of-type{border-bottom:0}.portfolio-row span{color:#64748b}.portfolio-row strong{font-size:1.15rem}.card-header h2{font-weight:750}

/* v0.4.0 UI Phase 1: Professional application shell */
:root{
  --sidebar-width:274px;
  --sidebar-bg:#0b1f36;
  --sidebar-bg-soft:#102945;
  --sidebar-text:#cbd7e6;
  --sidebar-muted:#7489a3;
  --sidebar-active:#ffffff;
  --accent:#2d72d9;
  --content-bg:#f3f6fa;
  --header-height:76px;
}
*{box-sizing:border-box}
body.app-body{margin:0;background:var(--content-bg);overflow-x:hidden}
.app-shell{min-height:100vh}
.app-sidebar{position:fixed;inset:0 auto 0 0;width:var(--sidebar-width);display:flex;flex-direction:column;background:linear-gradient(180deg,var(--sidebar-bg) 0%,#08182b 100%);color:var(--sidebar-text);z-index:1040;box-shadow:10px 0 30px rgba(15,23,42,.08)}
.sidebar-brand{height:86px;display:flex;align-items:center;justify-content:space-between;padding:0 20px;border-bottom:1px solid rgba(255,255,255,.08)}
.brand-link{display:flex;align-items:center;gap:12px;color:#fff;text-decoration:none;min-width:0}
.brand-mark{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:linear-gradient(135deg,#347fe8,#79adff);font-weight:800;letter-spacing:.03em;box-shadow:0 8px 20px rgba(45,114,217,.32)}
.brand-copy{display:flex;flex-direction:column;min-width:0;line-height:1.1}.brand-copy strong{font-size:1rem;white-space:nowrap}.brand-copy small{margin-top:4px;color:#8ea4bd;font-size:.74rem;letter-spacing:.08em;text-transform:uppercase}
.sidebar-close{border:0;background:transparent;color:#dce7f5;font-size:1.15rem}
.sidebar-nav{flex:1;padding:18px 14px 20px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#2a4059 transparent}
.nav-section-label{padding:16px 12px 7px;color:var(--sidebar-muted);font-size:.67rem;font-weight:800;letter-spacing:.13em;text-transform:uppercase}
.sidebar-link{min-height:44px;display:flex;align-items:center;gap:12px;padding:10px 12px;margin:3px 0;border-radius:10px;color:var(--sidebar-text);text-decoration:none;font-size:.88rem;font-weight:600;transition:background .16s ease,color .16s ease,transform .16s ease}
.sidebar-link i{width:20px;text-align:center;font-size:1.02rem;color:#8fa6c1}.sidebar-link span{flex:1}.sidebar-link small{padding:2px 7px;border-radius:999px;background:rgba(255,255,255,.08);color:#8fa6c1;font-size:.6rem;text-transform:uppercase;letter-spacing:.06em}
.sidebar-link:hover{background:rgba(255,255,255,.07);color:#fff;transform:translateX(2px)}.sidebar-link:hover i{color:#bcd4f1}
.sidebar-link.active{background:linear-gradient(100deg,rgba(45,114,217,.95),rgba(57,129,231,.78));color:var(--sidebar-active);box-shadow:0 8px 18px rgba(13,71,161,.22)}.sidebar-link.active i{color:#fff}
.disabled-link{cursor:not-allowed;opacity:.62}.disabled-link:hover{transform:none;background:transparent;color:var(--sidebar-text)}
.sidebar-subgroup{padding:2px 0 6px 42px;display:grid;gap:4px}.sidebar-subgroup span{color:#7990aa;font-size:.75rem}.sidebar-subgroup i{font-size:.9rem}
.sidebar-user{display:flex;align-items:center;gap:10px;padding:15px 16px;margin:0 14px 14px;border-radius:13px;background:rgba(255,255,255,.065);border:1px solid rgba(255,255,255,.07)}
.user-avatar,.header-user-pill span{width:36px;height:36px;display:grid;place-items:center;border-radius:10px;background:linear-gradient(135deg,#3f82e3,#83b5ff);color:#fff;font-weight:800}.user-copy{display:flex;flex-direction:column;min-width:0;flex:1}.user-copy strong{font-size:.8rem;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-copy small{font-size:.68rem;color:#8fa5bd;margin-top:2px}.user-menu-button{border:0;background:transparent;color:#8fa5bd;padding:4px}.user-menu-button:hover{color:#fff}
.app-main{min-height:100vh;margin-left:var(--sidebar-width)}
.app-header{height:var(--header-height);position:sticky;top:0;z-index:1020;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 30px;background:rgba(255,255,255,.93);backdrop-filter:blur(14px);border-bottom:1px solid #e5eaf0}
.header-title-wrap{display:flex;flex-direction:column;line-height:1.15}.header-title-wrap strong{font-size:.98rem;color:#172033}.header-eyebrow{font-size:.65rem;font-weight:800;letter-spacing:.11em;text-transform:uppercase;color:#8a98aa;margin-bottom:4px}.header-actions{display:flex;align-items:center;gap:12px}.header-search{width:310px;height:42px;align-items:center;gap:9px;padding:0 12px;border:1px solid #dde4ec;border-radius:11px;background:#f8fafc;color:#8a98aa;text-decoration:none;font-size:.78rem}.header-search span{flex:1}.header-search kbd{background:#e9eef5;color:#718096;border:0;border-radius:5px;padding:3px 6px;font-size:.65rem}.header-search:hover{border-color:#aac5ea;background:#fff;color:#47617f}.header-user-pill{align-items:center}
.header-icon-button{width:40px;height:40px;border:1px solid #dce3eb;border-radius:10px;background:#fff;color:#334155;font-size:1.3rem}
.app-content{padding:28px 30px 44px;max-width:1700px;margin:0 auto}
.sidebar-overlay{display:none}

/* Harmonize existing pages with the new shell */
.app-content>.d-flex:first-child,.app-content>.page-hero:first-child{margin-bottom:1.5rem!important}
.app-content h1,.app-content h2,.app-content h3{color:#172033}.app-content .h3{font-weight:760}
.app-content .card{border:1px solid rgba(224,230,237,.75);box-shadow:0 8px 24px rgba(23,32,51,.055)}
.app-content .btn-primary{background:#286fd1;border-color:#286fd1}.app-content .btn-primary:hover{background:#1d5fba;border-color:#1d5fba}

@media(max-width:991.98px){
  .app-sidebar{transform:translateX(-102%);transition:transform .22s ease}
  .app-main{margin-left:0}
  .app-header{padding:0 18px;height:68px}
  .app-content{padding:22px 18px 38px}
  .sidebar-overlay{position:fixed;inset:0;z-index:1035;background:rgba(7,18,32,.5);backdrop-filter:blur(2px)}
  body.sidebar-mobile-open{overflow:hidden}
  body.sidebar-mobile-open .app-sidebar{transform:translateX(0)}
  body.sidebar-mobile-open .sidebar-overlay{display:block}
}
@media(max-width:575.98px){
  .app-content{padding:18px 12px 32px}.header-title-wrap strong{font-size:.88rem}.header-eyebrow{display:none}
}

/* v0.4.0 UI Phase 1 Step 2: Dashboard redesign */
.dashboard-hero{display:flex;align-items:center;justify-content:space-between;gap:1.25rem;padding:8px 2px}.dashboard-title{font-size:1.75rem;font-weight:780;letter-spacing:-.025em;color:#172033}.dashboard-hero-actions{display:flex;gap:.65rem;flex-wrap:wrap}
.overview-card{position:relative;display:flex;align-items:center;gap:1rem;min-height:138px;padding:1.25rem;border-radius:17px;background:#fff;border:1px solid #e4eaf1;text-decoration:none;color:#172033;overflow:hidden;box-shadow:0 8px 25px rgba(23,32,51,.055);transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}.overview-card:before{content:'';position:absolute;inset:auto -38px -48px auto;width:120px;height:120px;border-radius:50%;background:currentColor;opacity:.055}.overview-card:hover{transform:translateY(-3px);box-shadow:0 14px 34px rgba(23,32,51,.1);border-color:#cdd9e8;color:#172033}.overview-icon{width:48px;height:48px;display:grid;place-items:center;border-radius:14px;font-size:1.28rem;flex:0 0 auto}.overview-copy{display:flex;flex-direction:column;min-width:0}.overview-copy small{font-size:.76rem;color:#718096;font-weight:650;text-transform:uppercase;letter-spacing:.055em}.overview-copy strong{font-size:2rem;line-height:1.05;margin:.32rem 0 .28rem}.overview-copy em{font-style:normal;font-size:.76rem;color:#8b98a9}.overview-arrow{position:absolute;right:15px;top:15px;color:#9aa9ba}.overview-blue .overview-icon{background:#e8f1ff;color:#2563eb}.overview-cyan .overview-icon{background:#e1f7fa;color:#087f8c}.overview-amber .overview-icon{background:#fff3dd;color:#c56a08}.overview-green .overview-icon{background:#e7f8ec;color:#16803d}
.dashboard-panel{overflow:hidden}.dashboard-panel-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1.15rem 1.25rem;background:#fff;border-bottom:1px solid #edf1f5}.panel-kicker{display:block;margin-bottom:.3rem;color:#8a98aa;font-size:.65rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase}.dashboard-table thead th{padding:.85rem 1.15rem}.dashboard-table tbody td{padding:1rem 1.15rem;border-color:#edf1f5}.dashboard-table tbody tr:hover{background:#fbfdff}.client-cell{display:flex;align-items:center;gap:.75rem;min-width:200px}.client-cell>div{display:flex;flex-direction:column}.client-cell strong{font-size:.88rem}.client-cell small{color:#8794a5;font-size:.72rem;margin-top:2px}.client-avatar{width:36px;height:36px;display:grid;place-items:center;border-radius:10px;background:linear-gradient(135deg,#2d72d9,#74aaff);color:#fff;font-weight:800;flex:0 0 auto}.client-avatar-soft{background:#edf3fb;color:#2b5f99}.completion-line{display:flex;align-items:center;gap:.65rem}.completion-line span{min-width:36px;font-size:.75rem;font-weight:700;color:#425466}.completion-line .progress{flex:1}
.pipeline-item{margin-bottom:1.15rem}.pipeline-item>div:first-child{display:flex;justify-content:space-between;align-items:center;margin-bottom:.45rem;font-size:.82rem}.pipeline-item>div:first-child span{color:#5f6f82}.pipeline-item>div:first-child strong{color:#243247}.pipeline-item .progress{height:8px;background:#edf1f5}.pipeline-draft{background:#94a3b8}.pipeline-preparing{background:#0ea5e9}.pipeline-review{background:#f59e0b}.pipeline-ready{background:#2563eb}.pipeline-filed{background:#16a34a}.portfolio-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:.65rem;padding-top:1rem;border-top:1px solid #edf1f5}.portfolio-summary div{padding:.75rem;border-radius:11px;background:#f7f9fc;text-align:center}.portfolio-summary small{display:block;color:#8794a5;font-size:.67rem;text-transform:uppercase;letter-spacing:.06em}.portfolio-summary strong{display:block;margin-top:.25rem;font-size:1.15rem;color:#243247}
.quick-actions-card{background:linear-gradient(145deg,#ffffff 0%,#f5f9ff 100%)}.quick-action-list{display:grid;gap:.65rem}.quick-action-list>a{display:flex;align-items:center;gap:.75rem;padding:.8rem .85rem;border:1px solid #e3e9f0;border-radius:12px;background:#fff;color:#243247;text-decoration:none;transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease}.quick-action-list>a:hover{transform:translateX(3px);border-color:#b8cce6;box-shadow:0 7px 18px rgba(23,32,51,.07)}.quick-action-list>a>span{width:38px;height:38px;display:grid;place-items:center;border-radius:10px;background:#edf4ff;color:#2d72d9;font-size:1rem}.quick-action-list>a>div{display:flex;flex-direction:column;flex:1}.quick-action-list strong{font-size:.82rem}.quick-action-list small{font-size:.7rem;color:#8794a5;margin-top:2px}.quick-action-list>a>.bi-chevron-right{color:#9aa9ba;font-size:.8rem}
@media(max-width:767.98px){.dashboard-hero{align-items:flex-start;flex-direction:column}.dashboard-title{font-size:1.45rem}.dashboard-hero-actions{width:100%}.dashboard-hero-actions .btn{flex:1}.overview-card{min-height:120px}.overview-copy strong{font-size:1.7rem}.portfolio-summary{grid-template-columns:1fr}.dashboard-table{min-width:820px}}


/* v0.4.0 UI Phase 1 Step 3: Professional return workspace */
.return-workspace-hero{display:flex;align-items:center;justify-content:space-between;gap:1.5rem;margin-bottom:1rem;padding:1.35rem 1.45rem;border:1px solid #e1e8f0;border-radius:18px;background:linear-gradient(135deg,#fff 0%,#f6f9ff 100%);box-shadow:0 10px 28px rgba(23,32,51,.055)}
.workspace-breadcrumb{display:flex;align-items:center;gap:.45rem;margin-bottom:.55rem;font-size:.72rem;color:#8a98aa}.workspace-breadcrumb a{text-decoration:none;color:#4d75a4}.workspace-breadcrumb i{font-size:.62rem}.workspace-title{font-size:1.65rem;font-weight:790;letter-spacing:-.025em}.workspace-progress-card{min-width:250px;padding:1rem 1.1rem;border-radius:14px;background:#172a43;color:#fff}.workspace-progress-card>div:first-child{display:flex;align-items:center;justify-content:space-between;margin-bottom:.6rem}.workspace-progress-card span{font-size:.72rem;color:#b8c8da}.workspace-progress-card strong{font-size:1.35rem}.workspace-progress-card .progress{height:8px;background:rgba(255,255,255,.16)}.workspace-progress-card .progress-bar{background:linear-gradient(90deg,#4b8ff1,#84b8ff)}
.return-section-nav{display:flex;gap:.45rem;overflow-x:auto;padding:.35rem .1rem .65rem;scrollbar-width:thin}.section-nav-item{display:flex;align-items:center;gap:.42rem;white-space:nowrap;padding:.55rem .78rem;border:1px solid #e0e7ef;border-radius:999px;background:#fff;color:#617084;text-decoration:none;font-size:.72rem;font-weight:700}.section-nav-item:hover{border-color:#a9c1df;color:#265e9f}.section-nav-item.done{background:#edf8f1;border-color:#cae9d3;color:#21703d}.section-nav-item.done i{color:#22a447}
.return-action-bar{position:sticky;top:76px;z-index:1010;display:flex;justify-content:flex-end;gap:.55rem;margin-bottom:1rem;padding:.65rem;border:1px solid #e3e9f0;border-radius:14px;background:rgba(255,255,255,.94);backdrop-filter:blur(12px);box-shadow:0 7px 22px rgba(23,32,51,.07)}
.return-form-section{scroll-margin-top:150px;transition:box-shadow .25s ease,border-color .25s ease}.return-form-section>.card-header{padding:1rem 1.15rem}.return-form-section.section-highlight{border-color:#76a9ee!important;box-shadow:0 0 0 4px rgba(45,114,217,.11),0 12px 30px rgba(23,32,51,.08)}
.workspace-side-panel{top:88px}.diagnostic-card{max-height:380px;overflow:hidden}.diagnostic-card .card-body{max-height:320px;overflow:auto}.diagnostic-item{display:flex;align-items:flex-start;gap:.65rem;padding:.7rem .75rem;margin-bottom:.5rem;border-radius:10px;text-decoration:none;font-size:.75rem;line-height:1.35}.diagnostic-error{background:#fff0f0;color:#9f2727}.diagnostic-warning{background:#fff7e7;color:#8b5a08}.diagnostic-item:hover{filter:brightness(.98)}.diagnostic-empty{display:flex;align-items:center;gap:.6rem;padding:.75rem;border-radius:10px;background:#edf8f1;color:#237342;font-size:.77rem}.workspace-meta-row{display:flex;align-items:center;justify-content:space-between;padding:.38rem 0;border-bottom:1px solid #edf1f5}.workspace-meta-row:last-child{border-bottom:0}.workspace-meta-row span{color:#7d8a9b}.status-pill{display:inline-flex;align-items:center;padding:.4rem .65rem;border-radius:999px;font-size:.68rem;font-weight:800;background:#eaf2ff;color:#285f9e}
@media(max-width:1199.98px){.workspace-side-panel{position:static!important}.return-action-bar{top:68px}.return-workspace-hero{align-items:flex-start;flex-direction:column}.workspace-progress-card{width:100%;min-width:0}}
@media(max-width:575.98px){.return-action-bar{justify-content:flex-start;overflow-x:auto}.return-action-bar .btn{white-space:nowrap}.workspace-title{font-size:1.35rem}.return-workspace-hero{padding:1rem}.section-nav-item{font-size:.68rem}}
