:root{--bg:#f4f6fa;--surface:#fff;--sidebar:#182233;--sidebar-2:#223047;--text:#182033;--muted:#748094;--line:#e5e9f0;--primary:#4776e6;--radius:16px;--shadow:0 10px 30px rgba(23,32,51,.06)}
*{box-sizing:border-box}html{font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--text);background:var(--bg)}body{margin:0}.app-shell{min-height:100vh;display:grid;grid-template-columns:248px minmax(0,1fr)}.sidebar{position:sticky;top:0;height:100vh;background:linear-gradient(180deg,var(--sidebar),#111a28);color:#eef3fb;padding:24px 16px;display:flex;flex-direction:column;z-index:30}.brand{display:flex;align-items:center;gap:12px;padding:0 8px 24px}.brand-mark{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:#4776e6;font-weight:800}.brand strong,.brand span{display:block}.brand span{font-size:12px;color:#9eabc0;margin-top:3px}.nav-list{display:grid;gap:6px}.nav-item{display:flex;align-items:center;gap:12px;color:#aeb9ca;text-decoration:none;padding:11px 12px;border-radius:10px;font-size:14px}.nav-item:hover,.nav-item.is-active{color:#fff;background:var(--sidebar-2)}.nav-icon{width:22px;text-align:center}.sidebar-footer{margin-top:auto;display:grid;gap:14px}.profile-chip{display:flex;align-items:center;gap:10px;padding:12px;background:rgba(255,255,255,.06);border-radius:12px}.avatar{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#fff;color:#1b2638;font-weight:700;font-size:12px}.profile-chip strong,.profile-chip small{display:block}.profile-chip small{color:#9eabc0;margin-top:2px}.main-area{min-width:0}.topbar{min-height:88px;padding:18px 30px;border-bottom:1px solid var(--line);background:rgba(255,255,255,.9);backdrop-filter:blur(12px);display:flex;align-items:center;gap:16px;position:sticky;top:0;z-index:20}.topbar h1{font-size:24px;margin:2px 0 0}.eyebrow{margin:0;text-transform:uppercase;letter-spacing:.09em;color:var(--muted);font-size:11px;font-weight:700}.topbar-actions{margin-left:auto;display:flex;gap:10px}.primary-button,.secondary-button,.icon-button{border:0;border-radius:10px;padding:10px 14px;font-weight:700;font:inherit}.primary-button{background:var(--primary);color:#fff}.secondary-button{background:#fff;color:var(--text);border:1px solid var(--line)}button:disabled{opacity:1;cursor:default}.mobile-menu{display:none;background:#fff;border:1px solid var(--line)}.page-content{padding:26px 30px 44px;max-width:1600px;margin:0 auto}.summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:18px}.summary-card,.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}.summary-card{padding:18px}.summary-card span,.summary-card small{display:block;color:var(--muted)}.summary-card strong{display:block;font-size:26px;margin:7px 0}.summary-card small{font-size:12px}.panel{padding:20px;margin-top:18px}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}.panel-heading h2{font-size:18px;margin:4px 0 0}.segmented{display:flex;background:#eef1f6;padding:3px;border-radius:10px}.segmented button{border:0;background:transparent;padding:7px 12px;border-radius:8px;color:var(--muted)}.segmented .is-selected{background:#fff;color:var(--text);box-shadow:0 2px 8px rgba(20,29,44,.08)}.week-grid{display:grid;grid-template-columns:160px repeat(7,minmax(105px,1fr));border:1px solid var(--line);border-radius:12px;overflow:auto}.week-corner,.day-head,.project-label{padding:12px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);background:#fafbfd}.day-head{text-align:center}.day-head strong,.day-head span{display:block}.day-head span{font-size:12px;color:var(--muted);margin-top:3px}.day-head.is-today{background:#edf3ff;color:#315fc9}.project-label{display:flex;align-items:center;gap:8px;font-size:13px;min-height:54px}.project-dot{width:8px;height:8px;border-radius:50%}.green{background:#4aa77d}.blue{background:#5d82d9}.orange{background:#e39a52}.purple{background:#8a71d8}.pink{background:#cf6f9f}.timeline-row{grid-column:2/9;display:grid;grid-template-columns:repeat(7,minmax(105px,1fr));min-height:54px;border-bottom:1px solid var(--line);background:repeating-linear-gradient(90deg,transparent 0,transparent calc(14.2857% - 1px),var(--line) calc(14.2857% - 1px),var(--line) 14.2857%)}.timeline-task{grid-column:var(--start)/span var(--span);align-self:center;margin:7px 6px;padding:10px 12px;border-radius:9px;font-size:12px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.green-task{background:#dcefe6;color:#2f7558}.blue-task{background:#dfe8fb;color:#4166b4}.orange-task{background:#f7e7d6;color:#a56a2e}.purple-task{background:#e9e3fa;color:#6550aa}.pink-task{background:#f5e0eb;color:#984e74}.muted{color:var(--muted);font-size:12px}.kanban-grid{display:grid;grid-template-columns:repeat(4,minmax(220px,1fr));gap:14px;overflow:auto}.kanban-column{background:#f7f8fb;border-radius:12px;padding:12px;min-height:210px}.column-title{display:flex;justify-content:space-between;align-items:center;padding:3px 2px 12px;font-size:13px;font-weight:800}.column-title b{background:#e7ebf2;border-radius:999px;padding:3px 8px;font-size:11px}.task-card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:14px;box-shadow:0 5px 14px rgba(23,32,51,.05)}.task-card h3{font-size:14px;margin:7px 0}.task-card p{color:var(--muted);font-size:12px;line-height:1.5;margin:0 0 14px}.task-card>div{display:flex;justify-content:space-between;align-items:center}.task-project{font-size:11px;font-weight:800}.green-text{color:#34805d}.blue-text{color:#4c70c5}.orange-text{color:#b67534}.purple-text{color:#7157bf}.badge{font-size:10px;background:#edf1f6;padding:5px 8px;border-radius:999px}.badge.warning{background:#fff0d9;color:#9a611f}.badge.success{background:#dff2e8;color:#2e7855}.date{font-size:10px;color:var(--muted)}.completed{opacity:.75}.empty-state{text-align:center;padding:70px 20px}.inline-button{display:inline-block;text-decoration:none;margin-top:12px}.mobile-overlay{display:none}
@media(max-width:1100px){.summary-grid{grid-template-columns:repeat(2,1fr)}.kanban-grid{grid-template-columns:repeat(4,260px)}}
@media(max-width:760px){.app-shell{display:block}.sidebar{position:fixed;left:0;transform:translateX(-102%);width:260px;transition:transform .2s ease}.sidebar.is-open{transform:translateX(0)}.mobile-menu{display:inline-grid}.mobile-overlay.is-visible{display:block;position:fixed;inset:0;background:rgba(10,16,26,.45);z-index:25}.topbar{padding:14px 16px}.topbar-actions .secondary-button{display:none}.page-content{padding:18px 14px 32px}.summary-grid{grid-template-columns:1fr}.panel-heading{align-items:flex-start}.week-grid{grid-template-columns:130px repeat(7,105px)}}
.auth-body{min-height:100vh;background:linear-gradient(135deg,#edf2fb 0%,#f8f9fc 55%,#eef2f8 100%)}.auth-shell{min-height:100vh;display:grid;grid-template-columns:minmax(320px,1fr) minmax(380px,520px);align-items:center;gap:70px;max-width:1120px;margin:0 auto;padding:48px 28px}.auth-intro{max-width:560px}.auth-intro h1{font-size:48px;letter-spacing:-.04em;margin:12px 0}.auth-intro>p:last-child{font-size:18px;line-height:1.65;color:var(--muted);max-width:520px}.auth-brand-mark{width:58px;height:58px;border-radius:18px;background:var(--primary);color:#fff;display:grid;place-items:center;font-size:24px;font-weight:800;box-shadow:0 16px 34px rgba(71,118,230,.22)}.auth-card{background:#fff;border:1px solid var(--line);border-radius:22px;padding:34px;box-shadow:0 24px 70px rgba(23,32,51,.12)}.auth-heading{margin-bottom:24px}.auth-heading h2{font-size:27px;margin:12px 0 8px}.auth-heading p{margin:0;color:var(--muted);line-height:1.5}.step-pill{display:inline-flex;background:#edf3ff;color:#315fc9;border-radius:999px;padding:6px 10px;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.05em}.form-stack{display:grid;gap:17px}.field{display:grid;gap:7px;font-size:13px;font-weight:700}.field input{width:100%;border:1px solid #dce2eb;border-radius:11px;padding:12px 13px;background:#fbfcfe;color:var(--text);font:inherit;outline:none}.field input:focus{border-color:#7c9cec;box-shadow:0 0 0 3px rgba(71,118,230,.12);background:#fff}.field small{font-size:11px;font-weight:500;color:var(--muted)}.field .field-error{color:#bf3f49}.full-button{width:100%;padding:13px 16px;cursor:pointer}.alert{border-radius:11px;padding:11px 13px;margin-bottom:16px;font-size:13px;line-height:1.45;border:1px solid transparent}.alert-error{background:#fff0f1;color:#9f313b;border-color:#f3ccd0}.alert-info{background:#edf3ff;color:#315fc9;border-color:#d5e2ff}.alert-success{background:#e7f6ee;color:#2f7558;border-color:#ccebdc}.profile-row{display:flex;gap:8px;align-items:center}.profile-row .profile-chip{flex:1;min-width:0}.logout-button{width:38px;height:38px;border:0;border-radius:10px;background:rgba(255,255,255,.07);color:#b6c1d2;cursor:pointer;font-size:17px}.logout-button:hover{background:rgba(255,255,255,.12);color:#fff}.profile-row form{margin:0}.profile-row form input{display:none}
@media(max-width:820px){.auth-shell{grid-template-columns:1fr;gap:30px;max-width:560px;padding:32px 18px}.auth-intro{text-align:center}.auth-brand-mark{margin:0 auto}.auth-intro h1{font-size:36px}.auth-intro>p:last-child{font-size:15px}.auth-card{padding:26px 22px}}
.button-link{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;box-sizing:border-box}.page-toolbar{display:flex;justify-content:space-between;gap:18px;align-items:center;margin-bottom:20px}.filter-tabs{display:flex;gap:5px;flex-wrap:wrap;background:#eef1f6;padding:4px;border-radius:12px}.filter-tab{text-decoration:none;color:var(--muted);font-size:13px;font-weight:700;padding:8px 12px;border-radius:9px}.filter-tab:hover,.filter-tab.is-active{background:#fff;color:var(--text);box-shadow:0 2px 8px rgba(20,29,44,.08)}.project-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.project-card{position:relative;background:#fff;border:1px solid var(--line);border-top:4px solid var(--project-color);border-radius:var(--radius);padding:20px;text-decoration:none;color:var(--text);box-shadow:var(--shadow);transition:.18s transform,.18s box-shadow}.project-card:hover{transform:translateY(-2px);box-shadow:0 14px 30px rgba(20,29,44,.1)}.project-card-head{display:flex;align-items:center;justify-content:space-between}.project-logo,.project-hero-logo{object-fit:cover;background:#f0f3f8;border:1px solid var(--line)}.project-logo{width:48px;height:48px;border-radius:13px}.project-logo-fallback{display:grid;place-items:center;background:color-mix(in srgb,var(--project-color) 15%,white);color:var(--project-color);font-weight:800}.project-card h2{font-size:18px;margin:17px 0 8px}.project-card p{color:var(--muted);font-size:13px;line-height:1.55;margin:0;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;min-height:60px}.project-meta{display:flex;justify-content:space-between;gap:12px;border-top:1px solid var(--line);padding-top:14px;margin-top:16px;color:var(--muted);font-size:11px}.status-badge{display:inline-flex;padding:5px 9px;border-radius:999px;font-size:10px;font-weight:800;white-space:nowrap}.status-planning{background:#edf1f7;color:#5b687a}.status-active{background:#e1f2e9;color:#2f7558}.status-on_hold{background:#fff0d9;color:#9a611f}.status-completed{background:#e4ecff;color:#4166b4}.status-archived{background:#eeeaf4;color:#756883}.empty-icon{width:54px;height:54px;border-radius:18px;background:#edf3ff;color:#4776e6;display:grid;place-items:center;margin:0 auto 15px;font-size:25px}.empty-state p{color:var(--muted)}.empty-state.compact{padding:40px 20px}.form-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:18px}.project-form .panel{margin-top:0;margin-bottom:18px}.form-section h2{font-size:18px;margin:5px 0 0}.form-grid{display:grid;gap:17px}.two-columns{grid-template-columns:repeat(2,minmax(0,1fr))}.field-wide{grid-column:1/-1}.field textarea,.field select{width:100%;border:1px solid #dce2eb;border-radius:11px;padding:12px 13px;background:#fbfcfe;color:var(--text);font:inherit;outline:none;box-sizing:border-box}.field textarea:focus,.field select:focus{border-color:#7c9cec;box-shadow:0 0 0 3px rgba(71,118,230,.12);background:#fff}.color-field{display:flex;align-items:center;gap:12px;height:44px}.color-field input{width:55px;height:42px;padding:3px}.color-field code{font-size:12px;color:var(--muted)}.logo-panel{text-align:center}.logo-panel h2{margin-bottom:20px}.logo-preview{width:128px;height:128px;border-radius:28px;background:#f2f5fa;border:1px dashed #ccd4e1;margin:0 auto 18px;display:grid;place-items:center;overflow:hidden}.logo-preview img{width:100%;height:100%;object-fit:cover}.logo-preview span{font-size:42px;font-weight:800;color:#4776e6}.upload-button{cursor:pointer;margin-bottom:10px}.upload-button input{display:none}.logo-panel small{display:block;color:var(--muted);line-height:1.45}.section-description{margin:7px 0 0;color:var(--muted);font-size:13px}.custom-fields{display:grid;gap:10px}.custom-field-row{display:grid;grid-template-columns:minmax(160px,.55fr) minmax(220px,1.45fr) 38px;gap:10px}.custom-field-row input{border:1px solid #dce2eb;border-radius:10px;padding:11px 12px;font:inherit;min-width:0}.remove-field{border:1px solid var(--line);border-radius:10px;background:#fff;color:#9f313b;font-size:18px;cursor:pointer}.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:4px}.alert ul{margin:8px 0 0;padding-left:20px}.project-hero{border-top:5px solid var(--project-color);display:flex;justify-content:space-between;gap:24px;align-items:flex-start}.project-identity{display:flex;gap:20px;min-width:0}.project-hero-logo{width:92px;height:92px;border-radius:22px;flex:none}.project-identity h2{font-size:26px;margin:10px 0 8px}.project-identity p{margin:0;color:var(--muted);line-height:1.6;max-width:760px}.hero-badges{display:flex;align-items:center;gap:8px}.color-reference{font-size:10px;color:var(--muted);display:inline-flex;align-items:center;gap:5px}.color-reference i{width:8px;height:8px;background:var(--project-color);border-radius:50%}.hero-actions{display:flex;gap:8px;align-items:center}.hero-actions form{margin:0}.danger-button{border:1px solid #f0c9cd;background:#fff5f5;color:#a83742;border-radius:10px;padding:10px 14px;font:inherit;font-weight:700;cursor:pointer}.project-tabs{display:flex;gap:4px;overflow:auto;margin:18px 0;background:#fff;border:1px solid var(--line);padding:5px;border-radius:12px}.project-tabs a,.project-tabs span{padding:9px 13px;border-radius:9px;font-size:12px;font-weight:700;white-space:nowrap;color:var(--muted);text-decoration:none}.project-tabs .is-active{background:#edf3ff;color:#315fc9}.project-tabs span{opacity:.65}.project-overview-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.project-overview-grid .panel{margin:0}.detail-list{display:grid}.detail-list>div{display:flex;justify-content:space-between;gap:20px;padding:13px 0;border-bottom:1px solid var(--line)}.detail-list>div:last-child{border-bottom:0}.detail-list span{color:var(--muted);font-size:12px}.detail-list strong{text-align:right;font-size:13px;max-width:65%;overflow-wrap:anywhere}.progress-track{height:8px;background:#edf0f5;border-radius:999px;overflow:hidden;margin:18px 0 10px}.progress-track span{display:block;height:100%;background:var(--project-color,#4776e6);transition:width .2s ease}.text-link{color:#4166b4;text-decoration:none;font-size:12px;font-weight:700}.compact-empty{padding:25px 0;color:var(--muted);font-size:13px;text-align:center}.feature-placeholder-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}.feature-placeholder-grid div{padding:16px;border:1px dashed #d8dee8;border-radius:11px;background:#fafbfd}.feature-placeholder-grid b,.feature-placeholder-grid span{display:block}.feature-placeholder-grid b{font-size:13px}.feature-placeholder-grid span{font-size:10px;color:var(--muted);margin-top:5px}.heading-actions{display:flex;align-items:center;gap:13px}.dashboard-project-list{display:grid}.dashboard-project-row{display:flex;align-items:center;gap:13px;padding:13px 4px;border-bottom:1px solid var(--line);text-decoration:none;color:var(--text)}.dashboard-project-row:last-child{border-bottom:0}.dashboard-project-row:hover{background:#fafbfd}.project-dot-large{width:12px;height:12px;border-radius:50%;flex:none}.dashboard-project-main{display:grid;gap:4px;flex:1;min-width:0}.dashboard-project-main strong{font-size:13px}.dashboard-project-main small{font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.row-arrow{color:var(--muted)}.muted-preview p{color:var(--muted);margin-bottom:0}.upcoming-section{margin-top:18px}
@media(max-width:1100px){.project-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.feature-placeholder-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:760px){.page-toolbar{align-items:stretch;flex-direction:column}.project-grid{grid-template-columns:1fr}.form-layout,.project-overview-grid{grid-template-columns:1fr}.two-columns{grid-template-columns:1fr}.field-wide{grid-column:auto}.custom-field-row{grid-template-columns:1fr 38px}.custom-field-row input:nth-child(2){grid-column:1}.custom-field-row .remove-field{grid-column:2;grid-row:1/3}.project-hero{flex-direction:column}.project-identity{flex-direction:column}.hero-actions{width:100%;flex-wrap:wrap}.project-hero-logo{width:76px;height:76px}.feature-placeholder-grid{grid-template-columns:repeat(2,1fr)}.topbar-actions .secondary-button{display:none}}
/* Stage 4: goals */
.goal-list{display:flex;flex-direction:column;gap:10px}.goal-list.compact{gap:8px}.goal-row{display:flex;align-items:center;gap:14px;padding:14px 16px;border:1px solid var(--border,#e7eaf0);border-radius:14px;text-decoration:none;color:inherit;background:#fff;transition:.18s ease}.goal-row:hover{transform:translateY(-1px);box-shadow:0 8px 24px rgba(25,35,58,.07);border-color:#d7dce6}.goal-main,.goal-row>span:first-of-type{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}.goal-main strong,.goal-row strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.goal-row small{color:#7b8495}.goal-project-dot{width:10px;height:10px;border-radius:50%;flex:0 0 auto}.dependency-warning{font-size:12px;font-weight:700;color:#9a6700;background:#fff6d8;border:1px solid #f1dda0;padding:6px 9px;border-radius:999px;white-space:nowrap}.priority-badge{font-size:12px;font-weight:700;padding:6px 9px;border-radius:999px;background:#eef1f6}.priority-high,.priority-critical{background:#fff0ef;color:#b42318}.priority-low{background:#effaf4;color:#18794e}.dependency-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:8px}.dependency-option{display:flex;gap:10px;align-items:flex-start;padding:12px;border:1px solid #e6e9ef;border-radius:12px;background:#fafbfc}.dependency-option input{margin-top:3px}.dependency-option span{display:flex;flex-direction:column;gap:2px}.dependency-option small{color:#7b8495}.field-error{display:block;color:#b42318;margin-top:6px}.alert-danger{background:#fff1f0;color:#9f1c14;border:1px solid #f3c7c3}@media(max-width:720px){.dependency-options{grid-template-columns:1fr}.goal-row{align-items:flex-start;flex-wrap:wrap}.goal-main{width:calc(100% - 24px)}.dependency-warning{margin-left:24px}}

.project-tab-panel[hidden]{display:none!important}


.locale-form { padding: 0 10px 10px; }
.locale-form label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.locale-form select { width: 100%; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); padding: 8px 10px; }
.project-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.field-help { margin: 4px 0 10px; color: var(--muted); font-size: 13px; }
.dependency-picker { display: grid; gap: 8px; max-height: 260px; overflow: auto; padding-right: 4px; }
.dependency-option { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border); border-radius: 10px; padding: 10px; cursor: pointer; }
.dependency-option input { margin-top: 3px; }
.dependency-option span { display: grid; gap: 2px; }
.dependency-option small { color: var(--muted); }

/* Stage 5 Fix 1: progress, task dates and dependency indicators */
.project-card-progress-head{display:flex;justify-content:space-between;align-items:center;margin-top:14px;font-size:11px;color:var(--muted)}
.project-card-progress-head strong{font-size:12px;color:var(--text)}
.project-card-progress{margin:7px 0 13px}
.item-dates{margin-top:3px;color:var(--muted)}
.row-alerts{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}
@media(max-width:760px){.row-alerts{justify-content:flex-start}.goal-row{align-items:flex-start;flex-wrap:wrap}.goal-row .status-badge{margin-left:auto}}

/* Stage 6: Calendar */
.calendar-panel{overflow:hidden}.calendar-heading{align-items:flex-end;gap:20px}.calendar-filters{display:flex;gap:12px;flex-wrap:wrap}.calendar-filters label{display:grid;gap:5px;font-size:11px;color:var(--muted);font-weight:700}.calendar-filters select{min-width:150px;border:1px solid var(--border);border-radius:9px;background:#fff;padding:8px 10px;color:var(--text)}.calendar-legend{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin:0 0 16px;font-size:12px}.calendar-legend span{display:flex;align-items:center;gap:6px}.calendar-legend i{width:10px;height:10px;border-radius:3px}.legend-task{background:#4776e6}.legend-goal{background:#fff;border:2px solid #4776e6}.planner-calendar{min-height:640px}.calendar-empty{padding:12px 14px;margin-bottom:14px;border:1px dashed var(--border);border-radius:10px;color:var(--muted);text-align:center}.fc{--fc-border-color:#e7eaf0;--fc-page-bg-color:#fff;--fc-neutral-bg-color:#f8fafc;--fc-today-bg-color:#eef4ff;font-size:13px}.fc .fc-toolbar-title{font-size:20px}.fc .fc-button-primary{background:#fff;border-color:#d8dee8;color:#2c3445;box-shadow:none}.fc .fc-button-primary:hover,.fc .fc-button-primary:not(:disabled).fc-button-active{background:#eef4ff;border-color:#b9caf7;color:#2856bd}.fc .fc-daygrid-day-number{color:#4b5567;text-decoration:none;padding:7px}.fc .fc-col-header-cell-cushion{color:#6d7687;text-decoration:none;padding:8px 4px}.fc .fc-event{border-radius:5px;padding:1px 3px;cursor:pointer}.fc .calendar-event-goal{background:#fff!important;color:#2c3445!important;border-width:2px!important}.fc .calendar-status-completed{opacity:.58}.fc .calendar-status-archived{opacity:.42}.fc-list-event-title a{text-decoration:none}.project-tab-panel .planner-calendar{min-height:600px}@media(max-width:760px){.calendar-heading{align-items:stretch}.calendar-filters{width:100%}.calendar-filters label{flex:1}.calendar-filters select{min-width:0;width:100%}.planner-calendar{min-height:520px}.fc .fc-toolbar{align-items:flex-start;gap:10px;flex-wrap:wrap}.fc .fc-toolbar-title{font-size:17px}}

/* Stage 6 Fix 1 — keep goal title and dates visible inside outlined calendar events. */
.fc .calendar-event-goal,
.fc .calendar-event-goal .fc-event-main,
.fc .calendar-event-goal .fc-event-main-frame,
.fc .calendar-event-goal .fc-event-title-container {
    color: #2c3445 !important;
}
.fc .planner-event-content {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 5px;
    overflow: hidden;
    line-height: 1.25;
}
.fc .planner-event-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}
.fc .planner-event-date {
    flex: 0 0 auto;
    color: #6d7687;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}
.fc-list-event .planner-event-content {
    overflow: visible;
}

/* Stage 7 — Kanban */
.board-toolbar { margin-bottom: 18px; }
.board-filter-form label { display: grid; gap: 6px; min-width: 220px; }
.board-filter-form label span { font-size: 12px; font-weight: 700; color: var(--muted); }
.kanban-board { display: grid; grid-template-columns: repeat(6, minmax(245px, 1fr)); gap: 14px; overflow-x: auto; padding: 2px 2px 14px; align-items: start; }
.kanban-column { min-width: 245px; border: 1px solid var(--border); border-radius: 16px; background: #f7f9fc; overflow: hidden; }
.kanban-column > header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 13px 14px; border-bottom: 1px solid var(--border); background: #fff; font-size: 13px; font-weight: 800; }
.kanban-column > header strong { display: inline-flex; min-width: 25px; height: 25px; align-items: center; justify-content: center; border-radius: 999px; background: #eef2f7; font-size: 12px; }
.kanban-list { min-height: 100px; padding: 10px; display: grid; gap: 10px; }
.kanban-card { position: relative; display: grid; gap: 8px; padding: 12px; border: 1px solid var(--border); border-left: 4px solid #94a3b8; border-radius: 12px; background: #fff; box-shadow: 0 2px 8px rgba(15,23,42,.05); cursor: grab; }
.kanban-card:active { cursor: grabbing; }
.kanban-card.priority-high { border-left-color: #f59e0b; }
.kanban-card.priority-critical { border-left-color: #dc2626; }
.kanban-card.priority-low { border-left-color: #22c55e; }
.kanban-card a { color: var(--text); text-decoration: none; line-height: 1.35; }
.kanban-card a:hover { text-decoration: underline; }
.kanban-card small { color: var(--muted); line-height: 1.35; }
.kanban-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--muted); }
.kanban-meta .is-overdue { color: #b91c1c; font-weight: 800; }
.kanban-empty { display: none; padding: 18px 12px; text-align: center; color: var(--muted); font-size: 12px; }
.kanban-column.is-empty .kanban-empty { display: block; }
.kanban-ghost { opacity: .35; }
.kanban-chosen { box-shadow: 0 12px 28px rgba(15,23,42,.16); }
.kanban-dragging { transform: rotate(1deg); }
.kanban-board-project { margin-top: 16px; }
@media (max-width: 760px) { .board-filter-form, .board-filter-form label { width: 100%; min-width: 0; } .kanban-board { grid-template-columns: repeat(6, minmax(82vw, 1fr)); } }

/* Stage 7.5 — advanced calendar, collapsible Kanban and localized overview */
.calendar-mode-switch{display:flex;gap:4px;margin:0 0 14px}.segmented{width:max-content;padding:4px;border:1px solid var(--border,#dbe2ea);border-radius:10px;background:#f7f9fc}.segmented button{border:0;background:transparent;padding:8px 13px;border-radius:7px;cursor:pointer;font:inherit}.segmented button.is-selected{background:#fff;box-shadow:0 1px 4px rgba(15,23,42,.12);font-weight:700}
.timeline-planner{min-width:0}.timeline-toolbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.timeline-toolbar>div{display:flex;gap:6px}.timeline-toolbar button{border:1px solid #d7dee8;background:#fff;border-radius:8px;padding:7px 11px;cursor:pointer}.timeline-toolbar strong{text-transform:capitalize}.timeline-shell{overflow:auto;border:1px solid #dbe2ea;border-radius:12px;max-height:68vh}.timeline-table{min-width:1050px;background:#fff}.timeline-row{display:grid;grid-template-columns:280px minmax(720px,1fr);min-height:44px;border-bottom:1px solid #e8edf3}.timeline-header{position:sticky;top:0;z-index:5;background:#fff}.timeline-label{position:sticky;left:0;z-index:3;display:flex;align-items:center;gap:9px;padding:8px 12px;background:#fff;border-right:1px solid #dbe2ea;min-width:0}.timeline-label strong,.timeline-label small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.timeline-label small{color:#6b7280;margin-top:2px}.timeline-label-header{z-index:7}.timeline-days,.timeline-grid{display:grid;grid-template-columns:repeat(var(--timeline-days),minmax(34px,1fr));position:relative}.timeline-day-head{display:flex;flex-direction:column;align-items:center;justify-content:center;border-right:1px solid #edf1f5;padding:5px 0;font-size:11px;color:#64748b}.timeline-day-head strong{font-size:13px;color:#1f2937}.timeline-day-head.is-today,.timeline-grid>span.is-today{background:#edf6ff}.timeline-grid>span{border-right:1px solid #edf1f5}.timeline-bar{position:absolute;left:calc((var(--start) - 1) * (100% / var(--timeline-days)) + 3px);width:calc(var(--span) * (100% / var(--timeline-days)) - 6px);top:11px;height:22px;border-radius:6px;opacity:.9;box-shadow:0 1px 2px rgba(15,23,42,.15)}.timeline-goal .timeline-bar{height:18px;top:13px;background:transparent!important;border:3px solid currentColor}.timeline-type{font-size:12px;color:#64748b}.timeline-project-row{position:sticky;left:0;z-index:4;display:flex;align-items:center;gap:8px;width:280px;min-height:40px;padding:7px 10px;background:#f4f7fb;border-bottom:1px solid #dbe2ea;border-right:1px solid #dbe2ea}.timeline-project-toggle{border:0;background:transparent;cursor:pointer;font-size:19px;padding:0 4px}.timeline-project-items{display:contents}.timeline-empty{padding:30px;color:#64748b}.agenda-dot{width:9px;height:9px;border-radius:50%;display:inline-block;flex:0 0 auto}
.kanban-column{transition:width .2s ease,min-width .2s ease}.kanban-column header{display:flex;align-items:center;gap:8px}.kanban-column-title{flex:1}.kanban-column-toggle{border:0;background:transparent;cursor:pointer;width:25px;height:25px;border-radius:6px;font-size:20px;line-height:1}.kanban-column-toggle:hover{background:rgba(15,23,42,.06)}.kanban-column.is-collapsed{min-width:56px!important;width:56px!important}.kanban-column.is-collapsed header{height:100%;min-height:420px;writing-mode:vertical-rl;transform:rotate(180deg);justify-content:flex-start;padding:12px 8px}.kanban-column.is-collapsed .kanban-column-title{flex:0}.kanban-column.is-collapsed [data-column-count]{margin-top:8px}.kanban-column.is-collapsed .kanban-column-toggle{transform:rotate(180deg)}
.dashboard-planning-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.dashboard-agenda,.dashboard-board-list{display:grid;gap:2px}.dashboard-agenda-item,.dashboard-board-item{display:grid;grid-template-columns:auto auto 1fr;align-items:center;gap:10px;padding:10px;border-radius:9px;color:inherit;text-decoration:none}.dashboard-agenda-item:hover,.dashboard-board-item:hover{background:#f6f8fb}.dashboard-agenda-item small,.dashboard-board-item small{display:block;color:#687386;margin-top:2px}.agenda-date{min-width:82px;font-size:12px;color:#5f6b7a}.dashboard-board-item{grid-template-columns:auto 1fr auto}.dashboard-board-item time{font-size:12px;color:#687386}.mini-progress{display:block;height:5px;border-radius:99px;background:#e8edf3;margin-top:7px;overflow:hidden}.mini-progress>span{display:block;height:100%;border-radius:inherit}.dashboard-project-progress{display:grid;text-align:right}.dashboard-project-progress small{font-size:11px;color:#687386}
@media(max-width:900px){.dashboard-planning-grid{grid-template-columns:1fr}.timeline-row{grid-template-columns:220px minmax(720px,1fr)}.timeline-project-row{width:220px}.dashboard-project-progress{display:none}}
@media(max-width:700px){.fc .fc-toolbar{align-items:flex-start;gap:8px;flex-wrap:wrap}.fc .fc-toolbar-chunk:last-child{display:flex;flex-wrap:wrap}.timeline-row{grid-template-columns:180px minmax(720px,1fr)}.timeline-project-row{width:180px}.calendar-mode-switch{width:100%}.segmented button{flex:1}.dashboard-board-item{grid-template-columns:1fr}.dashboard-board-item time{justify-self:start}}

/* Stage 7.5 Fix 1 — synchronized timeline, bounded collapsed columns, design-aligned overview. */
.calendar-completed-toggle{display:flex!important;align-items:center;align-self:end;gap:8px;min-height:36px;padding:0 4px;font-size:12px!important;color:var(--text)!important;cursor:pointer}.calendar-completed-toggle input{width:16px;height:16px;margin:0}
.timeline-shell{overflow:auto;max-height:68vh;overscroll-behavior:contain}.timeline-table{--timeline-label-width:280px;--timeline-day-width:38px;width:max-content;min-width:100%;background:#fff}.timeline-row{display:grid;grid-template-columns:var(--timeline-label-width) calc(var(--timeline-days) * var(--timeline-day-width));width:max-content;min-height:44px;border-bottom:1px solid #e8edf3}.timeline-days,.timeline-grid{display:grid;grid-template-columns:repeat(var(--timeline-days),var(--timeline-day-width));width:calc(var(--timeline-days) * var(--timeline-day-width));position:relative}.timeline-label{width:var(--timeline-label-width);min-width:var(--timeline-label-width);position:sticky;left:0;z-index:3;background:#fff;border-right:1px solid #dbe2ea}.timeline-header{position:sticky;top:0;z-index:8;background:#fff}.timeline-label-header{z-index:10}.timeline-project-header{background:#f4f7fb;min-height:42px}.timeline-project-header .timeline-grid{background:#f4f7fb}.timeline-project-label{z-index:6;background:#f4f7fb;font-weight:800}.timeline-project-toggle,.timeline-goal-toggle{display:inline-flex;align-items:center;justify-content:center;flex:0 0 24px;width:24px;height:24px;border:0;border-radius:6px;background:transparent;cursor:pointer;font-size:18px;color:#475569}.timeline-project-toggle:hover,.timeline-goal-toggle:hover{background:rgba(15,23,42,.07)}.timeline-goal-row .timeline-label{padding-left:18px;background:#fbfcfe}.timeline-task-child .timeline-label{padding-left:50px}.timeline-task-unassigned .timeline-label{padding-left:30px}.timeline-goal-row{background:#fbfcfe}.timeline-grid>span,.timeline-day-head{width:var(--timeline-day-width);min-width:var(--timeline-day-width)}.timeline-bar{left:calc((var(--start) - 1) * var(--timeline-day-width) + 3px);width:calc(var(--span) * var(--timeline-day-width) - 6px)}
.kanban-column.is-collapsed{height:min(340px,58vh);max-height:340px;align-self:start;overflow:hidden}.kanban-column.is-collapsed header{height:100%;min-height:0;max-height:340px;writing-mode:vertical-rl;transform:rotate(180deg);justify-content:flex-start;padding:12px 8px}.kanban-column.is-collapsed .kanban-column-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-height:235px}
.dashboard-workspace{display:grid;gap:22px}.dashboard-section-heading,.dashboard-timeline-toolbar,.dashboard-kanban-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.dashboard-section-heading h1{margin:2px 0 0;font-size:28px}.dashboard-timeline-card{border:1px solid var(--border);border-radius:16px;background:#fff;overflow:hidden;box-shadow:0 6px 24px rgba(15,23,42,.04)}.dashboard-timeline-toolbar{padding:18px 20px;border-bottom:1px solid var(--border)}.dashboard-timeline-toolbar h2,.dashboard-kanban-heading h2{margin:0}.dashboard-timeline-toolbar span{display:block;margin-top:4px;font-size:12px;color:var(--muted)}.dashboard-week-shell{overflow:auto}.dashboard-week-table{--dashboard-label:210px;--dashboard-day:145px;width:max-content;min-width:100%}.dashboard-week-row{display:grid;grid-template-columns:var(--dashboard-label) calc(7 * var(--dashboard-day));width:max-content;min-height:62px;border-bottom:1px solid #edf0f4}.dashboard-week-header{position:sticky;top:0;z-index:4;min-height:50px;background:#fff}.dashboard-week-project-label{position:sticky;left:0;z-index:3;display:flex;align-items:center;gap:10px;width:var(--dashboard-label);padding:12px 14px;background:#fff;border-right:1px solid #e5e9ef;color:inherit;text-decoration:none}.dashboard-week-header .dashboard-week-project-label{z-index:6;color:var(--muted);font-size:12px;font-weight:700}.dashboard-week-days,.dashboard-week-grid{display:grid;grid-template-columns:repeat(7,var(--dashboard-day));width:calc(7 * var(--dashboard-day));position:relative}.dashboard-week-day{display:flex;align-items:center;justify-content:center;gap:7px;border-right:1px solid #edf0f4;color:#64748b;font-size:11px}.dashboard-week-day strong{font-size:13px;color:#273244}.dashboard-week-day.is-today{color:#2563eb;background:#eff6ff}.dashboard-week-grid{min-height:calc(50px + (var(--lane-count) - 1) * 34px)}.dashboard-week-grid>span{border-right:1px solid #edf0f4}.dashboard-week-grid>span.is-today{background:#eff6ff}.dashboard-week-event{position:absolute;left:calc((var(--start) - 1) * var(--dashboard-day) + 7px);top:calc(10px + var(--lane) * 34px);width:calc(var(--span) * var(--dashboard-day) - 14px);height:27px;display:flex;align-items:center;padding:0 11px;border-radius:7px;background:color-mix(in srgb,var(--project-color) 18%,white);border:1px solid color-mix(in srgb,var(--project-color) 42%,white);color:color-mix(in srgb,var(--project-color) 74%,#111827);font-size:12px;font-weight:700;text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dashboard-week-event-goal{background:#fff;border-width:2px}.dashboard-timeline-empty{padding:32px;color:var(--muted)}.dashboard-kanban-section{display:grid;gap:13px}.dashboard-kanban-grid{display:grid;grid-template-columns:repeat(4,minmax(230px,1fr));gap:14px;overflow-x:auto;padding-bottom:8px}.dashboard-kanban-column{min-width:230px;border:1px solid var(--border);border-radius:14px;background:#f8fafc;overflow:hidden}.dashboard-kanban-column>header{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:1px solid var(--border);font-size:13px;font-weight:800;background:#f1f5f9}.dashboard-kanban-column>header strong{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;border-radius:999px;background:rgba(255,255,255,.75);font-size:11px}.dashboard-kanban-in_progress>header{background:#fff5d9}.dashboard-kanban-waiting>header{background:#f0edff}.dashboard-kanban-completed>header{background:#eaf8ed}.dashboard-kanban-list{display:grid;gap:9px;padding:10px;align-content:start;min-height:220px}.dashboard-kanban-card{display:grid;gap:7px;padding:11px;border:1px solid #e3e8ef;border-radius:10px;background:#fff;color:inherit;text-decoration:none;box-shadow:0 2px 7px rgba(15,23,42,.04)}.dashboard-kanban-card:hover{border-color:#c8d4e4;box-shadow:0 5px 14px rgba(15,23,42,.08)}.dashboard-kanban-card>span{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--muted)}.dashboard-kanban-card time{font-size:11px;color:var(--muted)}.dashboard-kanban-completed .dashboard-kanban-card{opacity:.72}.dashboard-kanban-empty{padding:20px 8px;text-align:center;color:var(--muted);font-size:12px}
@media(max-width:900px){.timeline-table{--timeline-label-width:220px}.dashboard-week-table{--dashboard-label:180px;--dashboard-day:125px}.dashboard-kanban-grid{grid-template-columns:repeat(4,minmax(78vw,1fr))}}
@media(max-width:700px){.calendar-completed-toggle{width:100%}.timeline-table{--timeline-label-width:180px;--timeline-day-width:36px}.dashboard-section-heading{align-items:flex-start;flex-direction:column}.dashboard-section-heading .heading-actions{width:100%;flex-wrap:wrap}.dashboard-week-table{--dashboard-label:155px;--dashboard-day:112px}.dashboard-kanban-grid{grid-template-columns:repeat(4,minmax(86vw,1fr))}}

/* Stage 7.5 Fix 2 — deterministic timeline geometry and compact collapsed Kanban columns. */
.timeline-shell{
    overflow-x:auto;
    overflow-y:auto;
    position:relative;
    max-width:100%;
    scrollbar-gutter:stable;
}
.timeline-table{
    --timeline-label-width:280px;
    --timeline-day-width:40px;
    display:block;
    width:calc(var(--timeline-label-width) + (var(--timeline-days) * var(--timeline-day-width)));
    min-width:calc(var(--timeline-label-width) + (var(--timeline-days) * var(--timeline-day-width)));
}
.timeline-row{
    display:grid !important;
    grid-template-columns:var(--timeline-label-width) calc(var(--timeline-days) * var(--timeline-day-width)) !important;
    width:calc(var(--timeline-label-width) + (var(--timeline-days) * var(--timeline-day-width))) !important;
    min-width:calc(var(--timeline-label-width) + (var(--timeline-days) * var(--timeline-day-width))) !important;
    align-items:stretch;
}
.timeline-label,
.timeline-label-header,
.timeline-project-label{
    position:sticky !important;
    left:0 !important;
    width:var(--timeline-label-width) !important;
    min-width:var(--timeline-label-width) !important;
    max-width:var(--timeline-label-width) !important;
    box-sizing:border-box;
    z-index:12;
    overflow:hidden;
}
.timeline-label > span:last-child{min-width:0;overflow:hidden}
.timeline-label strong,.timeline-label small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.timeline-days,.timeline-grid{
    display:grid !important;
    grid-template-columns:repeat(var(--timeline-days),var(--timeline-day-width)) !important;
    width:calc(var(--timeline-days) * var(--timeline-day-width)) !important;
    min-width:calc(var(--timeline-days) * var(--timeline-day-width)) !important;
    max-width:calc(var(--timeline-days) * var(--timeline-day-width)) !important;
    box-sizing:border-box;
    overflow:visible;
}
.timeline-day-head,.timeline-grid>span{
    width:var(--timeline-day-width) !important;
    min-width:var(--timeline-day-width) !important;
    max-width:var(--timeline-day-width) !important;
    box-sizing:border-box;
    border-right:1px solid #e8edf3;
}
.timeline-header .timeline-label{z-index:22;background:#fff}
.timeline-header{z-index:20}
.timeline-project-label{cursor:pointer;user-select:none}
.timeline-goal-row .timeline-label{cursor:pointer;user-select:none}
.timeline-bar{
    left:calc((var(--start) - 1) * var(--timeline-day-width) + 4px) !important;
    width:calc(var(--span) * var(--timeline-day-width) - 8px) !important;
    box-sizing:border-box;
}
.timeline-row[hidden]{display:none !important}

.kanban-column.is-collapsed{
    min-width:58px !important;
    width:58px !important;
    height:58px !important;
    min-height:58px !important;
    max-height:58px !important;
    align-self:start;
    overflow:hidden;
}
.kanban-column.is-collapsed header{
    width:58px !important;
    height:58px !important;
    min-height:58px !important;
    max-height:58px !important;
    padding:7px !important;
    display:grid !important;
    grid-template-columns:1fr;
    place-items:center;
    writing-mode:horizontal-tb !important;
    transform:none !important;
    gap:2px;
    overflow:hidden;
}
.kanban-column.is-collapsed .kanban-column-title{
    display:none !important;
}
.kanban-column.is-collapsed [data-column-count]{
    margin:0 !important;
}
.kanban-column.is-collapsed .kanban-column-toggle{
    transform:none !important;
    margin:0 !important;
}
@media(max-width:900px){.timeline-table{--timeline-label-width:220px;--timeline-day-width:38px}}
@media(max-width:700px){.timeline-table{--timeline-label-width:180px;--timeline-day-width:36px}}

/* Stage 7.5 Fix 3 — isolated timeline classes, polished planner controls and correct vertical Kanban collapse. */
/* Prevent legacy dashboard .timeline-task rules from touching planner rows. */
.timeline-item-task,
.timeline-item-goal{
    grid-column:auto !important;
    align-self:stretch !important;
    margin:0 !important;
    padding:0 !important;
    border-radius:0 !important;
    font-size:inherit !important;
    font-weight:inherit !important;
    white-space:normal !important;
    overflow:visible !important;
    text-overflow:clip !important;
    background:#fff !important;
    color:inherit !important;
}
.timeline-item-goal{background:#fbfcfe !important}
.timeline-item-row{color:var(--text);text-decoration:none}
.timeline-item-row:hover .timeline-label{background:#f7faff}
.timeline-item-row:hover .timeline-grid{background-color:#fbfdff}
.timeline-goal-row .timeline-label{font-weight:750;color:#273244}
.timeline-task-child .timeline-label,
.timeline-task-unassigned .timeline-label{font-size:13px;color:#334155}
.timeline-task-child .timeline-type,
.timeline-task-unassigned .timeline-type{display:inline-flex;width:20px;height:20px;align-items:center;justify-content:center;border-radius:6px;background:#eef4ff;color:#4776e6;font-size:11px}
.timeline-goal-row .timeline-type{display:inline-flex;width:20px;height:20px;align-items:center;justify-content:center;border-radius:6px;background:#f2edff;color:#7656c8;font-size:11px}
.timeline-project-label,.timeline-goal-row .timeline-label{transition:background .15s ease}
.timeline-project-label:hover{background:#eaf0f8 !important}
.timeline-goal-row .timeline-label:hover{background:#f2f5fa !important}
.timeline-project-toggle,.timeline-goal-toggle{
    border:1px solid #d6deea !important;
    background:#fff !important;
    box-shadow:0 1px 2px rgba(15,23,42,.05);
    color:#475569 !important;
}
.timeline-project-toggle:hover,.timeline-goal-toggle:hover{border-color:#aebbd0 !important;background:#f8fafc !important}
.timeline-toolbar{padding:2px 0 4px}
.timeline-toolbar button{min-height:36px;border:1px solid #d6deea !important;background:#fff !important;color:#334155;font-weight:700;box-shadow:0 1px 2px rgba(15,23,42,.04)}
.timeline-toolbar button:hover{border-color:#9fb0c7 !important;background:#f8fafc !important}
.timeline-toolbar button[data-timeline-today]{padding-inline:14px}
.timeline-bar{z-index:2}
.timeline-item-task .timeline-bar{background:color-mix(in srgb,currentColor 82%,white) !important;color:inherit !important;border:1px solid color-mix(in srgb,currentColor 55%,white);opacity:1}
.timeline-item-goal .timeline-bar{background:color-mix(in srgb,currentColor 8%,white) !important;border:3px solid currentColor !important;opacity:1}
.timeline-project-summary-bar{
    position:absolute;
    z-index:3;
    left:calc((var(--start) - 1) * var(--timeline-day-width) + 4px);
    width:calc(var(--span) * var(--timeline-day-width) - 8px);
    top:10px;
    height:24px;
    border-radius:7px;
    background:color-mix(in srgb,var(--project-color) 26%,white);
    border:2px solid color-mix(in srgb,var(--project-color) 70%,white);
    box-shadow:0 1px 3px rgba(15,23,42,.08);
}
.timeline-project-summary-bar span{position:absolute;right:4px;top:2px;min-width:17px;height:17px;padding:0 5px;display:grid;place-items:center;border-radius:999px;background:var(--project-color);color:#fff;font-size:10px;font-weight:800}

/* Collapsed Kanban columns stay vertical, but stop at the same lower edge as an empty column. */
.kanban-column.is-collapsed{
    min-width:56px !important;
    width:56px !important;
    height:210px !important;
    min-height:210px !important;
    max-height:210px !important;
    align-self:start;
    overflow:hidden;
    padding:0 !important;
}
.kanban-column.is-collapsed header{
    width:56px !important;
    height:210px !important;
    min-height:210px !important;
    max-height:210px !important;
    padding:12px 8px !important;
    display:flex !important;
    flex-direction:row !important;
    justify-content:flex-start !important;
    align-items:center !important;
    writing-mode:vertical-rl !important;
    transform:rotate(180deg) !important;
    gap:8px !important;
    overflow:hidden;
}
.kanban-column.is-collapsed .kanban-column-title{
    display:block !important;
    flex:0 1 auto !important;
    max-height:130px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.kanban-column.is-collapsed [data-column-count]{margin:0 !important;flex:0 0 auto}
.kanban-column.is-collapsed .kanban-column-toggle{transform:rotate(180deg) !important;margin:0 !important;flex:0 0 auto}


/* Stage 7.5 Fix 4 */
.timeline-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px;padding:0!important}.timeline-toolbar>div{display:inline-flex;align-items:center;gap:7px;padding:4px;border:1px solid #e0e6ef;border-radius:12px;background:#f7f9fc}.timeline-toolbar>strong{font-size:16px;color:#1f2937;text-transform:capitalize}.timeline-toolbar button{border-radius:8px!important}.timeline-project-header{min-height:54px;background:#f4f7fb}.timeline-project-label{gap:10px!important;padding:10px 14px!important;background:#f4f7fb!important;border-right:1px solid #dfe6ef!important;font-size:15px}.timeline-item-row{min-height:52px;border-bottom:1px solid #e7ecf3!important}.timeline-item-row .timeline-label{gap:9px!important;padding:9px 14px 9px 22px!important;background:#fff;border-right:1px solid #e1e7ef!important}.timeline-task-child .timeline-label{padding-left:48px!important}.timeline-goal-row .timeline-label{background:#fbfaff!important}.timeline-type{flex:0 0 22px!important}.timeline-label small{margin-top:3px;color:#8793a5;font-size:11px;font-weight:600}.timeline-grid{position:relative;min-height:52px;background-color:#fff}.timeline-project-header .timeline-grid{min-height:54px;background-color:#f4f7fb}.timeline-grid>span.is-today,.timeline-day-head.is-today{background:#eef5ff!important}.timeline-bar{top:12px!important;height:28px!important;border-radius:8px!important;box-shadow:0 2px 5px rgba(15,23,42,.1)!important}.timeline-item-task .timeline-bar{background:color-mix(in srgb,var(--item-color) 78%,white)!important;border:1px solid color-mix(in srgb,var(--item-color) 62%,#64748b)!important;color:var(--item-color)!important}.timeline-item-goal .timeline-bar{top:11px!important;height:30px!important;background:color-mix(in srgb,var(--item-color) 8%,white)!important;border:3px solid var(--item-color)!important}.timeline-project-summary-bar{top:13px!important;height:28px!important}.kanban-board{display:flex!important;align-items:flex-start!important;gap:14px!important;overflow-x:auto!important;grid-template-columns:none!important}.kanban-column{flex:0 0 245px;min-width:245px;transition:flex-basis .2s ease,width .2s ease,min-width .2s ease,transform .2s ease}.kanban-column.is-collapsed{flex:0 0 56px!important;min-width:56px!important;width:56px!important}@media(max-width:760px){.kanban-column{flex-basis:82vw;min-width:82vw}.kanban-column.is-collapsed{flex-basis:56px!important;min-width:56px!important}}


/* Stage 7.5 calendar range hardening */
.fc .fc-timegrid-axis,.fc .fc-timegrid-slot-label,.fc .fc-timegrid-slot-lane{display:none!important}
.fc .fc-timegrid-body,.fc .fc-timegrid-slots{display:none!important}
.planner-event-content{display:flex;flex-direction:column;gap:2px;min-width:0;padding:2px 1px}
.planner-event-project{display:flex;align-items:center;gap:5px;min-width:0;font-size:10px;font-weight:800;opacity:.78}
.planner-event-project i{width:7px;height:7px;border-radius:50%;flex:0 0 auto}
.planner-event-project span,.planner-event-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.planner-event-title{font-size:12px;font-weight:750}
.timeline-view-switch{margin-left:auto}
.timeline-view-switch button{cursor:pointer}
.timeline-view-switch button.is-selected{background:#fff;color:var(--text);box-shadow:0 2px 8px rgba(20,29,44,.08)}
.timeline-table{--timeline-day-width:46px}
.timeline-grid,.timeline-days{isolation:isolate}
.timeline-bar,.timeline-project-summary-bar{position:absolute!important;left:calc((var(--start) - 1) * var(--timeline-day-width) + 4px)!important;width:calc(var(--span) * var(--timeline-day-width) - 8px)!important;min-width:calc(var(--timeline-day-width) - 8px)!important;right:auto!important}
.timeline-project-summary-bar::after{content:attr(data-count);position:absolute;right:6px;top:50%;transform:translateY(-50%);min-width:20px;height:20px;padding:0 5px;border-radius:999px;display:grid;place-items:center;background:#fff;color:var(--item-color);font-size:11px;font-weight:800;box-shadow:0 1px 4px rgba(15,23,42,.12)}
@media(max-width:700px){.timeline-toolbar{align-items:flex-start;flex-wrap:wrap}.timeline-view-switch{width:100%;margin-left:0}.timeline-view-switch button{flex:1}.timeline-table{--timeline-day-width:44px}}

/* Stage 7.5 calendar rebuild: isolated planner based on the working Overview timeline. */
.pp-timeline-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:14px 0 12px}.pp-timeline-nav,.pp-timeline-view{display:flex;align-items:center;gap:6px}.pp-timeline-toolbar button{min-height:36px;padding:0 12px;border:1px solid #d6deea;border-radius:9px;background:#fff;color:#334155;font-weight:750;cursor:pointer}.pp-timeline-toolbar button:hover{background:#f7f9fc;border-color:#aebbd0}.pp-timeline-view button.is-selected{background:#eef4ff;border-color:#b9ccf7;color:#2f67d8}.pp-timeline-toolbar>strong{font-size:16px;text-transform:capitalize}.pp-timeline-shell{overflow:auto;border:1px solid #dfe6ef;border-radius:14px;background:#fff}.pp-timeline-table{--pp-label:300px;--pp-day:46px;width:max-content;min-width:100%}.pp-timeline-row{display:grid;grid-template-columns:var(--pp-label) calc(var(--pp-days) * var(--pp-day));min-height:52px;border-bottom:1px solid #e6ebf2}.pp-timeline-row:last-child{border-bottom:0}.pp-timeline-label{position:sticky;left:0;z-index:4;display:flex;align-items:center;gap:10px;min-width:0;padding:10px 14px;background:#fff;border-right:1px solid #dfe6ef}.pp-timeline-label strong,.pp-timeline-label small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pp-timeline-label small{margin-top:2px;color:#8995a7;font-size:11px}.pp-timeline-copy{min-width:0}.pp-timeline-header{position:sticky;top:0;z-index:8;min-height:54px}.pp-timeline-header .pp-timeline-label{z-index:9;background:#fff}.pp-timeline-days,.pp-timeline-grid{display:grid;grid-template-columns:repeat(var(--pp-days),var(--pp-day));width:calc(var(--pp-days) * var(--pp-day));position:relative}.pp-timeline-day,.pp-timeline-cell{min-width:var(--pp-day);border-right:1px solid #e4eaf2}.pp-timeline-day{display:grid;place-items:center;align-content:center;gap:1px;background:#fff;color:#66748a;font-size:11px}.pp-timeline-day strong{font-size:15px;color:#202a3a}.pp-timeline-day.is-today,.pp-timeline-cell.is-today{background:#edf5ff}.pp-timeline-grid{align-items:center;background:#fff}.pp-timeline-cell{grid-row:1;height:100%;min-height:51px}.pp-timeline-bar{grid-row:1;align-self:center;z-index:2;height:28px;margin:0 4px;border-radius:8px;box-shadow:0 2px 6px rgba(15,23,42,.10);background:color-mix(in srgb,var(--item-color) 78%,white);border:1px solid color-mix(in srgb,var(--item-color) 65%,#64748b)}.pp-timeline-goal-bar{height:30px;background:color-mix(in srgb,var(--item-color) 7%,white);border:3px solid var(--item-color)}.pp-timeline-project{min-height:54px;background:#f4f7fb}.pp-timeline-project .pp-timeline-label,.pp-timeline-project .pp-timeline-grid{background:#f4f7fb}.pp-timeline-project-label{cursor:pointer;font-size:15px}.pp-timeline-project-label:hover,.pp-timeline-goal-row .pp-timeline-label:hover{background:#eef3f9}.pp-timeline-goal-row .pp-timeline-label{background:#fbfaff;font-weight:750}.pp-timeline-task-child .pp-timeline-label{padding-left:52px}.pp-timeline-icon{display:grid;place-items:center;width:22px;height:22px;flex:0 0 22px;border-radius:6px;background:#eef4ff;color:#4776e6;font-size:11px}.pp-timeline-goal .pp-timeline-icon{background:#f2edff;color:#7656c8}.pp-timeline-toggle{display:grid!important;place-items:center!important;width:28px!important;height:28px!important;min-height:28px!important;padding:0!important;border:1px solid #d4deeb!important;border-radius:8px!important;background:#fff!important;color:#50617a!important;font-size:17px!important;line-height:1!important;cursor:pointer}.pp-timeline-item{color:inherit;text-decoration:none}.pp-timeline-item:hover .pp-timeline-grid{background:#fbfdff}.pp-timeline-summary-bar{background:color-mix(in srgb,var(--item-color) 22%,white);border:2px solid var(--item-color)}.pp-timeline-summary-bar::after{content:attr(data-count);position:absolute;right:5px;top:50%;transform:translateY(-50%);min-width:20px;height:20px;padding:0 5px;border-radius:999px;display:grid;place-items:center;background:#fff;color:var(--item-color);font-size:11px;font-weight:800}.pp-timeline-empty{padding:28px;color:#758196;text-align:center}.pp-timeline-row[hidden]{display:none!important}
@media(max-width:900px){.pp-timeline-table{--pp-label:220px;--pp-day:42px}}
@media(max-width:700px){.pp-timeline-toolbar{align-items:flex-start;flex-wrap:wrap}.pp-timeline-view{width:100%}.pp-timeline-view button{flex:1}.pp-timeline-table{--pp-label:180px;--pp-day:40px}}


/* Calendar / planner refinement */
.pp-timeline-table{width:calc(var(--pp-label) + (var(--pp-days) * var(--pp-day)));min-width:calc(var(--pp-label) + (var(--pp-days) * var(--pp-day)));max-width:none}
.pp-timeline-shell{overscroll-behavior-x:contain;scrollbar-gutter:stable}
.pp-timeline-bulk{display:flex;align-items:center;gap:6px}
.pp-timeline-bar.is-open-ended{border-top-right-radius:2px;border-bottom-right-radius:2px}
.pp-timeline-bar.is-open-ended::before{content:"";position:absolute;right:-1px;top:50%;width:12px;height:12px;border-top:2px solid var(--item-color);border-right:2px solid var(--item-color);transform:translateY(-50%) rotate(45deg);background:transparent}
.fc .fc-toolbar{gap:14px;margin-bottom:12px}
.fc .fc-toolbar-chunk{display:flex;align-items:center;gap:6px}
.fc .fc-button-group{gap:6px}
.fc .fc-button-group>.fc-button{border-radius:9px!important;margin:0!important}
.fc .fc-button-primary{min-height:36px;padding:0 12px;border:1px solid #d6deea!important;border-radius:9px!important;background:#fff!important;color:#334155!important;font-weight:750!important;box-shadow:none!important;text-transform:none}
.fc .fc-button-primary:hover{background:#f7f9fc!important;border-color:#aebbd0!important;color:#334155!important}
.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):active{background:#eef4ff!important;border-color:#b9ccf7!important;color:#2f67d8!important}
.fc .fc-toolbar-title{font-size:16px;font-weight:800;text-transform:capitalize}
.calendar-filters{align-items:end}
.calendar-completed-toggle{display:flex!important;grid-template-columns:auto 1fr!important;align-items:center;gap:7px!important;min-height:36px;padding:0 2px;color:var(--text)!important}
@media(max-width:900px){.pp-timeline-toolbar{flex-wrap:wrap}.pp-timeline-bulk{order:4;width:100%}}


/* Calendar Fix 2 — hard-stop planner geometry at the visible period. */
.pp-timeline-shell{max-width:100%;overflow-x:auto;overflow-y:hidden}
.pp-timeline-table{display:inline-block;overflow:hidden;box-sizing:border-box}
.pp-timeline-row{overflow:hidden;box-sizing:border-box;max-width:calc(var(--pp-label) + (var(--pp-days) * var(--pp-day)))}
.pp-timeline-days,.pp-timeline-grid{overflow:hidden;grid-auto-columns:0!important;grid-auto-flow:row!important;box-sizing:border-box}
.pp-timeline-day,.pp-timeline-cell{box-sizing:border-box}

/* Calendar UI refinement: sticky labels, today auto-scroll support and unified event bars. */
.pp-timeline-shell{
    position:relative;
    overflow-x:auto;
    overflow-y:auto;
    isolation:isolate;
}
.pp-timeline-label{
    position:sticky!important;
    left:0!important;
    z-index:12!important;
    box-shadow:8px 0 14px -14px rgba(15,23,42,.55);
}
.pp-timeline-header .pp-timeline-label{
    z-index:20!important;
}
.pp-timeline-project .pp-timeline-label{
    z-index:14!important;
}
.pp-timeline-days,
.pp-timeline-grid{
    z-index:1;
}

/* One visual language for Overview, FullCalendar and Planner bars. */
.pp-timeline-bar,
.dashboard-week-event,
.fc .fc-event.calendar-bar-task,
.fc .fc-event.calendar-bar-goal{
    border-radius:7px!important;
    font-size:12px!important;
    font-weight:700!important;
    line-height:1.2!important;
    box-shadow:none!important;
}
.pp-timeline-task-bar,
.fc .fc-event.calendar-bar-task{
    background:color-mix(in srgb,var(--item-color) 18%,white)!important;
    border:1px solid color-mix(in srgb,var(--item-color) 42%,white)!important;
    color:color-mix(in srgb,var(--item-color) 74%,#111827)!important;
}
.pp-timeline-goal-bar,
.fc .fc-event.calendar-bar-goal{
    background:#fff!important;
    border:2px solid var(--item-color)!important;
    color:color-mix(in srgb,var(--item-color) 78%,#111827)!important;
}
.pp-timeline-bar{
    display:flex;
    align-items:center;
    min-width:0;
    height:27px!important;
    padding:0 10px;
    overflow:hidden;
}
.pp-timeline-goal-bar{
    height:27px!important;
}
.pp-timeline-bar-title{
    display:block;
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.pp-timeline-summary-bar{
    background:color-mix(in srgb,var(--item-color) 18%,white)!important;
    border:1px solid color-mix(in srgb,var(--item-color) 42%,white)!important;
    color:color-mix(in srgb,var(--item-color) 74%,#111827)!important;
}
.pp-timeline-summary-bar .pp-timeline-bar-title{
    padding-right:24px;
}
.fc .fc-event.calendar-bar-task,
.fc .fc-event.calendar-bar-goal{
    padding:2px 6px!important;
    overflow:hidden;
}
.fc .fc-event.calendar-bar-task .planner-event-project,
.fc .fc-event.calendar-bar-goal .planner-event-project{
    opacity:.68;
}
.fc .fc-event.calendar-bar-task .planner-event-title,
.fc .fc-event.calendar-bar-goal .planner-event-title{
    color:inherit!important;
}
.fc .fc-event.is-open-ended,
.pp-timeline-bar.is-open-ended{
    border-top-right-radius:2px!important;
    border-bottom-right-radius:2px!important;
}


/* Calendar UI Fix 2 — deterministic frozen label pane and identical event typography. */
.pp-timeline-label{
    position:relative!important;
    left:auto!important;
    transform:translate3d(var(--pp-scroll-x, 0px),0,0)!important;
    will-change:transform;
    z-index:18!important;
    background-clip:padding-box;
    box-shadow:8px 0 14px -14px rgba(15,23,42,.60);
}
.pp-timeline-header .pp-timeline-label{z-index:24!important}
.pp-timeline-project .pp-timeline-label{z-index:20!important}
.pp-timeline-goal-row .pp-timeline-label,
.pp-timeline-task-child .pp-timeline-label,
.pp-timeline-task-unassigned .pp-timeline-label{z-index:18!important}

/* FullCalendar must use exactly the same dark, project-tinted text as Overview
   and Planner. FullCalendar's built-in theme sometimes injects white text into
   the event main element, so override every text-bearing descendant. */
.fc .fc-event.calendar-bar-task,
.fc .fc-event.calendar-bar-task .fc-event-main,
.fc .fc-event.calendar-bar-task .planner-event-content,
.fc .fc-event.calendar-bar-task .planner-event-project,
.fc .fc-event.calendar-bar-task .planner-event-title{
    color:color-mix(in srgb,var(--item-color) 74%,#111827)!important;
}
.fc .fc-event.calendar-bar-goal,
.fc .fc-event.calendar-bar-goal .fc-event-main,
.fc .fc-event.calendar-bar-goal .planner-event-content,
.fc .fc-event.calendar-bar-goal .planner-event-project,
.fc .fc-event.calendar-bar-goal .planner-event-title{
    color:color-mix(in srgb,var(--item-color) 78%,#111827)!important;
}
.fc .planner-event-content{min-width:0}
.fc .planner-event-project{opacity:.72!important}
.fc .planner-event-title{font-weight:700!important}


/* Stage 8 — Documents */
.brand-mark { min-width: 38px; }
.documents-upload-card { margin-bottom: 20px; }
.document-upload-form { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.file-drop-field { flex: 1 1 420px; display: grid; gap: 8px; font-weight: 700; }
.file-drop-field input { width: 100%; padding: 12px; border: 1px dashed var(--border-color, #d8dee9); border-radius: 10px; background: #fff; }
.documents-table-wrap { overflow-x: auto; }
.documents-table { width: 100%; border-collapse: collapse; }
.documents-table th, .documents-table td { padding: 13px 12px; border-bottom: 1px solid var(--border-color, #e5e7eb); text-align: left; vertical-align: middle; }
.documents-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: #697386; }
.document-name { font-weight: 700; color: inherit; text-decoration: none; }
.document-name:hover { text-decoration: underline; }
.document-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; white-space: nowrap; }
.document-actions form { margin: 0; }
.danger-button { border: 1px solid #efb4b4; background: #fff7f7; color: #a61b1b; border-radius: 9px; padding: 9px 12px; cursor: pointer; font-weight: 700; }
.count-badge { min-width: 32px; height: 32px; padding: 0 9px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: #eef2f7; font-weight: 700; }
.muted-text { color: #697386; font-size: 13px; }
@media (max-width: 760px) { .document-actions { align-items: stretch; flex-direction: column; } .documents-table th:nth-child(2), .documents-table td:nth-child(2) { display:none; } }

/* Stage 8.2 — Document library */
.documents-workspace{display:grid;grid-template-columns:230px minmax(0,1fr);gap:18px;align-items:start}.documents-sidebar{position:sticky;top:18px;padding:14px}.documents-main{min-width:0;display:grid;gap:14px}.documents-side-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.documents-side-label{margin:18px 8px 7px;color:#8490a3;font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.documents-nav{display:grid;gap:3px}.documents-nav a{display:flex;align-items:center;gap:9px;padding:9px 10px;border-radius:9px;color:#4d596c;text-decoration:none;font-weight:700}.documents-nav a:hover,.documents-nav a.is-active{background:#eef4ff;color:#2f67d8}.document-tag-cloud,.document-tags{display:flex;flex-wrap:wrap;gap:5px}.document-tag-cloud span,.document-tags span{display:inline-flex;align-items:center;min-height:22px;padding:2px 8px;border-radius:999px;background:color-mix(in srgb,var(--tag-color) 12%,white);border:1px solid color-mix(in srgb,var(--tag-color) 30%,white);color:color-mix(in srgb,var(--tag-color) 78%,#172033);font-size:11px;font-weight:750}.documents-toolbar-card{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px}.documents-filter-form{display:flex;align-items:center;gap:8px;min-width:0;flex:1}.documents-filter-form select{width:auto;min-width:120px}.documents-search{display:flex;align-items:center;gap:7px;min-width:180px;max-width:380px;flex:1;padding:0 10px;border:1px solid #d8e0eb;border-radius:9px;background:#fff}.documents-search input{width:100%;border:0!important;padding:10px 0!important;outline:0}.documents-view-actions{display:flex;align-items:center;gap:7px}.documents-view-actions .icon-button.is-selected{background:#eaf1ff;color:#2f67d8}.document-dropzone{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px;border:2px dashed #cbd6e6;background:#f9fbff;transition:.15s}.document-dropzone>div{display:grid;gap:4px}.document-dropzone span{color:#718096;font-size:13px}.document-dropzone.is-dragover{border-color:#5b7cfa;background:#eef4ff;transform:translateY(-1px)}.documents-library-card{padding:18px}.documents-collection{display:grid;gap:8px}.document-item{display:grid;grid-template-columns:48px minmax(180px,1fr) minmax(240px,.65fr) auto;gap:14px;align-items:center;padding:11px;border:1px solid #e3e9f1;border-radius:11px;background:#fff}.document-item:hover{border-color:#c4d1e3;box-shadow:0 5px 15px rgba(15,23,42,.05)}.document-icon{width:42px;height:42px;border-radius:10px;display:grid;place-items:center;background:#eef3fb;color:#48617d;font-size:13px;font-weight:850}.document-primary{min-width:0;display:grid;gap:5px}.document-primary>strong,.document-primary>small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.document-primary>small{color:#7b8799}.document-meta{display:grid;grid-template-columns:1fr auto auto;gap:15px;color:#6f7c90;font-size:12px}.document-item-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px}.document-item-actions form{margin:0}.documents-collection.is-grid{grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:12px}.documents-collection.is-grid .document-item{grid-template-columns:1fr;align-content:start;min-height:190px}.documents-collection.is-grid .document-icon{width:58px;height:58px;font-size:16px}.documents-collection.is-grid .document-meta{grid-template-columns:1fr;gap:3px}.documents-collection.is-grid .document-item-actions{justify-content:flex-start;margin-top:auto}.app-dialog{width:min(520px,calc(100vw - 28px));border:0;border-radius:16px;padding:0;box-shadow:0 24px 70px rgba(15,23,42,.26)}.app-dialog::backdrop{background:rgba(15,23,42,.45);backdrop-filter:blur(2px)}.dialog-close-row{display:flex;justify-content:flex-end;padding:10px 10px 0}.dialog-form{display:grid;gap:14px;padding:4px 22px 22px}.dialog-form label{display:grid;gap:7px;font-weight:700}.dialog-form input,.dialog-form select,.dialog-form textarea{width:100%}.dialog-actions{display:flex;align-items:center;gap:9px}.dialog-actions .danger-button{margin-left:auto}
@media(max-width:1050px){.documents-workspace{grid-template-columns:1fr}.documents-sidebar{position:static}.documents-sidebar .documents-nav{display:flex;flex-wrap:wrap}.documents-side-label,.document-tag-cloud{display:none}.document-item{grid-template-columns:48px minmax(160px,1fr) auto}.document-meta{display:none}}
@media(max-width:720px){.documents-toolbar-card,.documents-filter-form{align-items:stretch;flex-direction:column}.documents-view-actions{justify-content:flex-end}.documents-search{max-width:none}.documents-filter-form select{width:100%}.document-dropzone{align-items:stretch;flex-direction:column}.document-item{grid-template-columns:42px minmax(0,1fr)}.document-item-actions{grid-column:1/-1;justify-content:flex-end}.documents-collection.is-grid{grid-template-columns:1fr}}


/* Stage 8.3 — secure universal document preview */
.document-item[tabindex]{outline:none;cursor:default}.document-item[tabindex]:focus,.document-item.is-selected{border-color:#7899ea;box-shadow:0 0 0 3px rgba(91,124,250,.12)}.document-item.is-preview-selected{background:#f5f8ff}.document-preview-dialog{width:min(1180px,calc(100vw - 28px));height:min(820px,calc(100vh - 28px));max-width:none;max-height:none;border:0;border-radius:16px;padding:0;overflow:hidden;background:#fff;box-shadow:0 28px 90px rgba(15,23,42,.35)}.document-preview-dialog::backdrop{background:rgba(10,18,32,.72);backdrop-filter:blur(3px)}.document-preview-shell{height:100%;display:grid;grid-template-columns:minmax(0,1fr) 250px;grid-template-rows:auto minmax(0,1fr);background:#eef2f7}.document-preview-header{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:11px 14px;background:#fff;border-bottom:1px solid #dfe6ef}.document-preview-header>div:first-child{min-width:0;display:grid;gap:2px}.document-preview-header strong,.document-preview-header small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.document-preview-header small{color:#718096}.document-preview-toolbar{display:flex;align-items:center;gap:7px}.document-preview-body{position:relative;min-width:0;min-height:0;display:grid;place-items:center;overflow:auto;padding:22px;background:#202630}.document-preview-properties{padding:18px;background:#fff;border-left:1px solid #dfe6ef;overflow:auto}.document-preview-properties>div{display:grid;gap:4px;padding:12px 0;border-bottom:1px solid #edf1f5}.document-preview-properties span{font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:#8591a3}.document-preview-properties strong{font-size:13px;overflow-wrap:anywhere}.document-preview-properties p{margin-top:18px;color:#7c8798;font-size:12px;line-height:1.5}.document-preview-frame{width:100%;height:100%;border:0;border-radius:6px;background:#fff}.document-preview-image{display:block;max-width:100%;max-height:100%;object-fit:contain;transform-origin:center;transition:transform .18s ease;box-shadow:0 8px 30px rgba(0,0,0,.25)}.document-preview-video{width:min(100%,960px);max-height:100%;background:#000}.document-preview-media{width:min(720px,90%)}.document-preview-text{width:100%;min-height:100%;margin:0;padding:22px;border-radius:8px;background:#fbfcfe;color:#172033;font:13px/1.55 ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere;box-sizing:border-box}.document-preview-loading,.document-preview-error,.document-preview-unsupported{color:#dbe5f1;text-align:center}.document-preview-unsupported{display:grid;place-items:center;gap:10px}.document-preview-unsupported p{margin:0;color:#aeb9c8}.document-preview-file-icon{width:76px;height:76px;border-radius:18px;display:grid;place-items:center;background:#354052;font-size:28px}.document-preview-dialog:fullscreen{width:100vw;height:100vh;border-radius:0}.document-preview-dialog:fullscreen .document-preview-shell{height:100vh}@media(max-width:800px){.document-preview-shell{grid-template-columns:1fr}.document-preview-properties{display:none}.document-preview-header{align-items:flex-start}.document-preview-toolbar{flex-wrap:wrap;justify-content:flex-end}.document-preview-toolbar .secondary-button{display:none}}

/* Stage 8.4 — Notes */
.notes-workspace{display:grid;grid-template-columns:280px minmax(0,1fr);gap:18px;align-items:start}.notes-sidebar{padding:14px;position:sticky;top:18px;max-height:calc(100vh - 36px);display:flex;flex-direction:column}.notes-new-button{text-align:center;justify-content:center}.notes-nav{display:flex;gap:5px;margin:12px 0}.notes-nav a{flex:1;text-align:center;padding:8px;border-radius:8px;text-decoration:none;color:#667085;font-size:12px;font-weight:750}.notes-nav a.is-active,.notes-nav a:hover{background:#eef4ff;color:#2f67d8}.notes-search{display:flex;gap:6px}.notes-search input{min-width:0;width:100%}.notes-list{display:grid;gap:7px;margin-top:12px;overflow:auto}.note-list-item{display:grid;gap:4px;padding:11px;border-left:4px solid var(--note-color);border-radius:9px;background:#fafbfd;text-decoration:none;color:#1e293b}.note-list-item:hover,.note-list-item.is-active{background:#eef4ff}.note-list-title{font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.note-list-item small{color:#778397;font-size:11px;line-height:1.35}.note-list-item time{color:#9aa4b2;font-size:10px}.note-editor-card{min-height:680px;padding:0;overflow:hidden}.note-editor-form{display:grid}.note-editor-head{display:flex;align-items:center;gap:14px;padding:16px;border-bottom:1px solid #e7ecf2}.note-title-input{flex:1;border:0!important;font-size:22px!important;font-weight:800;padding:8px!important;outline:0}.note-head-actions{display:flex;align-items:center;gap:9px}.note-pin{display:flex;align-items:center;gap:5px;font-size:12px;font-weight:700}.note-meta-row{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;padding:12px 16px;background:#fafbfd;border-bottom:1px solid #e7ecf2}.note-meta-row label{display:grid;gap:5px;font-size:11px;font-weight:800;color:#667085}.markdown-toolbar{display:flex;align-items:center;gap:4px;padding:8px 12px;border-bottom:1px solid #e7ecf2;background:#fff}.markdown-toolbar>button,.note-mode-switch button{min-width:32px;height:32px;border:1px solid #d8e0eb;background:#fff;border-radius:7px;cursor:pointer}.markdown-toolbar button:hover,.markdown-toolbar button.is-selected{background:#eef4ff;color:#2f67d8}.note-mode-switch{display:flex;gap:3px;margin-left:auto}.note-compose{display:grid;grid-template-columns:1fr 1fr;min-height:430px}.note-compose textarea{width:100%;min-height:430px;resize:vertical;border:0;border-radius:0;padding:22px;font:14px/1.65 ui-monospace,SFMono-Regular,Menlo,monospace;outline:0;border-right:1px solid #e7ecf2}.note-rendered{padding:22px;overflow:auto;line-height:1.65;overflow-wrap:anywhere}.note-rendered h1,.note-rendered h2,.note-rendered h3{margin:1em 0 .5em}.note-rendered pre{padding:14px;border-radius:9px;background:#172033;color:#e6edf6;overflow:auto}.note-rendered code{padding:2px 5px;border-radius:5px;background:#eef2f7}.note-rendered pre code{padding:0;background:none}.note-rendered blockquote{margin:10px 0;padding:8px 14px;border-left:4px solid #8ea7df;background:#f5f7fb}.md-check.done{text-decoration:line-through;color:#7d8794}.mode-write{grid-template-columns:1fr}.mode-write .note-rendered{display:none}.mode-preview{grid-template-columns:1fr}.mode-preview textarea{display:none}.note-attachments{margin:0 16px 16px;padding:12px;border:1px solid #e1e7ef;border-radius:10px}.note-attachments summary{cursor:pointer;font-weight:800}.note-document-options{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:7px;margin-top:12px}.note-document-options label{display:flex;align-items:center;gap:7px;padding:8px;border-radius:7px;background:#f8fafc;font-size:12px}.note-footer{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-top:1px solid #e7ecf2}.notes-welcome{min-height:680px;display:grid;place-items:center;align-content:center;color:#8792a3;text-align:center}.notes-welcome span{font-size:52px}.note-trash-detail{padding:26px}.note-trash-detail .form-actions{display:flex;gap:9px;margin-top:20px}.empty-state-inline{padding:18px;text-align:center;color:#8792a3}@media(max-width:950px){.notes-workspace{grid-template-columns:1fr}.notes-sidebar{position:static;max-height:none}.notes-list{max-height:280px}.note-meta-row{grid-template-columns:1fr}.note-compose{grid-template-columns:1fr}.note-compose textarea{border-right:0;border-bottom:1px solid #e7ecf2}.note-mode-switch{display:none}}@media(max-width:650px){.note-editor-head{align-items:stretch;flex-direction:column}.note-head-actions{justify-content:space-between;flex-wrap:wrap}.markdown-toolbar{overflow-x:auto}.note-compose{min-height:360px}.note-compose textarea{min-height:360px}}

/* Stage 8.5 — project-scoped Documents and Notes */
.project-context-header{margin-bottom:18px;padding:16px 18px 0;border-top:4px solid var(--project-color,#5b7cfa)}
.project-context-title{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}
.project-module-tabs{margin:0;overflow-x:auto}
.project-module-tabs a.is-active{color:var(--project-color,#5b7cfa);border-bottom-color:var(--project-color,#5b7cfa)}
@media(max-width:760px){.project-context-header{padding:14px 14px 0}.project-context-title{align-items:flex-start;flex-direction:column;gap:8px}}

/* Stage 8.6 — project module layout and site-consistent controls. */
.project-module-hero{margin-bottom:0}
.project-module-tabs{margin-top:14px;margin-bottom:18px}
.project-module-tabs a.is-active{color:var(--primary);border-bottom-color:var(--primary);background:color-mix(in srgb,var(--primary) 7%,white)}
.project-module-panel{padding:0;overflow:hidden}
.project-module-heading{padding:18px 20px;margin:0;border-bottom:1px solid var(--border);background:#fff}
.project-module-heading h2{margin:2px 0 0}
.project-module-primary{display:inline-flex;align-items:center;gap:7px;white-space:nowrap}
.project-module-primary>span{font-size:18px;line-height:1}
.project-module-panel .documents-workspace,
.project-module-panel .notes-workspace{padding:18px;background:#f8fafc}
.project-module-panel .content-card,
.project-module-panel .card{box-shadow:none}

.control-icon-button,
.documents-view-actions .icon-button,
.document-item-actions .icon-button,
.markdown-toolbar>button,
.note-mode-switch button{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--border);background:#fff;color:var(--text);box-shadow:0 1px 2px rgba(15,23,42,.04);transition:border-color .15s,background .15s,color .15s,box-shadow .15s,transform .15s}
.control-icon-button:hover,
.documents-view-actions .icon-button:hover,
.document-item-actions .icon-button:hover,
.markdown-toolbar>button:hover,
.note-mode-switch button:hover{border-color:#b8c6d8;background:#f5f8fc;color:var(--primary);box-shadow:0 3px 9px rgba(15,23,42,.07)}
.control-icon-button:active,
.documents-view-actions .icon-button:active,
.document-item-actions .icon-button:active{transform:translateY(1px)}
.segmented-control{gap:0;padding:3px;border:1px solid var(--border);border-radius:10px;background:#f4f7fb}
.segmented-control .icon-button{border:0;box-shadow:none;border-radius:7px;background:transparent}
.segmented-control .icon-button.is-selected{background:#fff;color:var(--primary);box-shadow:0 1px 4px rgba(15,23,42,.12)}

.documents-sidebar{border:1px solid var(--border);border-radius:12px;background:#fff}
.documents-main{gap:12px}
.documents-toolbar-card{border:1px solid var(--border);border-radius:12px}
.documents-filter-form input,.documents-filter-form select,
.notes-search input,.note-meta-row select{min-height:40px;border-radius:9px;border-color:var(--border);background:#fff}
.documents-filter-form select{padding-right:34px}
.documents-search{min-height:40px;border-radius:9px;background:#fff}
.filter-apply-button{min-height:40px}
.document-dropzone{border-radius:12px}
.documents-library-card{border:1px solid var(--border);border-radius:12px}
.document-item{transition:border-color .15s,box-shadow .15s,transform .15s}
.document-item:hover{transform:translateY(-1px)}
.document-item-actions .icon-button,.document-item-actions .button-link{width:36px;height:36px;border-radius:9px}
.documents-nav a{border:1px solid transparent}
.documents-nav a:hover,.documents-nav a.is-active{border-color:#d8e4f5;background:#eef4ff}

.notes-sidebar,.note-editor-card{border:1px solid var(--border);border-radius:12px;background:#fff}
.notes-nav{padding:3px;border:1px solid var(--border);border-radius:10px;background:#f4f7fb}
.notes-nav a{border-radius:7px}
.notes-nav a.is-active,.notes-nav a:hover{background:#fff;box-shadow:0 1px 4px rgba(15,23,42,.09)}
.site-search-control{display:flex;align-items:center;gap:7px;padding-left:10px;border:1px solid var(--border);border-radius:10px;background:#fff}
.site-search-control>span{color:var(--muted);font-size:16px}
.site-search-control input{border:0!important;outline:0;box-shadow:none!important}
.notes-search-button{min-height:38px;margin:1px;border:0;border-left:1px solid var(--border);border-radius:0 8px 8px 0}
.note-list-item{border:1px solid #e7ecf2;border-left:4px solid var(--note-color);background:#fff;transition:border-color .15s,background .15s,box-shadow .15s}
.note-list-item:hover,.note-list-item.is-active{border-color:#cedaeb;background:#f7faff;box-shadow:0 3px 10px rgba(15,23,42,.05)}
.note-editor-head{background:#fff}
.note-title-input{background:transparent}
.note-head-actions input[type="color"]{width:38px;height:38px;padding:3px;border:1px solid var(--border);border-radius:9px;background:#fff;cursor:pointer}
.markdown-toolbar{gap:5px;padding:9px 12px;background:#f8fafc}
.markdown-toolbar>button,.note-mode-switch button{height:34px;border-radius:8px}
.note-mode-switch{padding:3px;border:1px solid var(--border);border-radius:10px;background:#eef2f7}
.note-mode-switch button{border:0;background:transparent;box-shadow:none}
.note-mode-switch button.is-selected{background:#fff;color:var(--primary);box-shadow:0 1px 4px rgba(15,23,42,.12)}
.note-compose textarea{background:#fff}
.note-attachments{background:#fff}

@media(max-width:760px){
  .project-module-heading{align-items:flex-start;gap:12px}
  .project-module-panel .documents-workspace,.project-module-panel .notes-workspace{padding:12px}
  .documents-toolbar-card{align-items:stretch;flex-direction:column}
  .documents-filter-form{flex-wrap:wrap}
  .documents-search{max-width:none;flex-basis:100%}
  .documents-view-actions{justify-content:flex-end}
  .project-module-primary{width:100%;justify-content:center}
}


/* Stage 8.7 — Documents finalization */
.folder-nav-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px;align-items:center}.folder-nav-row>a{min-width:0}.folder-nav-row>a small{margin-left:auto;opacity:.65}.folder-nav-row>.icon-button{width:30px;height:30px}.documents-bulk-bar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:0 0 14px;border-bottom:1px solid var(--border-color,#e5e7eb);margin-bottom:16px}.documents-bulk-bar label{display:flex;align-items:center;gap:7px}.documents-bulk-bar select{min-width:150px}.document-item{position:relative}.document-select{display:flex;align-items:center;justify-content:center;padding:0 6px}.document-item-content{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;gap:14px;align-items:center;min-width:0;flex:1}.documents-collection.is-grid .document-item-content{display:flex;flex-direction:column;align-items:stretch}.documents-collection.is-grid .document-select{position:absolute;top:10px;left:10px;z-index:2}.documents-collection.is-grid .document-item{padding-top:38px}@media(max-width:800px){.document-item-content{grid-template-columns:auto minmax(0,1fr)}.document-meta,.document-item-actions{grid-column:2}.documents-bulk-bar select{min-width:0;flex:1 1 140px}}

/* Stage 8.8 — Notes Finalization */
.notes-library{padding:18px;background:#f8fafc}.notes-library-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 14px;margin-bottom:16px}.notes-library-toolbar .notes-nav{margin:0;min-width:300px}.notes-filter-form{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex:1}.notes-filter-form .notes-search{min-width:240px;flex:1;max-width:420px}.notes-filter-form select{min-height:40px;max-width:190px;border:1px solid var(--border);border-radius:9px;background:#fff;padding:0 34px 0 10px}.notes-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:14px}.note-card{position:relative;display:flex;flex-direction:column;min-height:230px;border:1px solid var(--border);border-top:5px solid var(--note-color);border-radius:12px;background:#fff;box-shadow:0 2px 8px rgba(15,23,42,.04);overflow:hidden;transition:transform .15s,box-shadow .15s,border-color .15s}.note-card:hover{transform:translateY(-2px);border-color:#c8d5e6;box-shadow:0 8px 20px rgba(15,23,42,.08)}.note-card-main{display:flex;flex:1;flex-direction:column;gap:12px;padding:16px;color:var(--text);text-decoration:none}.note-card-head{display:flex;align-items:flex-start;gap:9px}.note-card-head h3{margin:0;font-size:16px;line-height:1.35;overflow-wrap:anywhere}.note-card-pin{color:var(--note-color);font-size:15px}.note-card-main>p{margin:0;min-height:72px;color:#667085;font-size:13px;line-height:1.55;overflow-wrap:anywhere}.note-card-links{display:flex;flex-wrap:wrap;gap:6px}.note-card-links span{max-width:100%;padding:4px 8px;border-radius:999px;background:#f0f4f9;color:#526277;font-size:11px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.note-card footer{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto;color:#8a96a8;font-size:11px}.note-card-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;padding:9px 12px;border-top:1px solid #edf1f6;background:#fbfcfe}.note-card-actions form{margin:0}.note-card-actions button,.note-card-actions a{min-height:32px;padding:6px 10px;font-size:11px}.notes-empty-state{display:grid;place-items:center;align-content:center;min-height:360px;padding:30px;text-align:center;color:#78869a}.notes-empty-state>span{font-size:48px}.note-editor-dialog{width:min(1100px,calc(100vw - 36px));max-width:none;height:min(850px,calc(100vh - 36px));max-height:none;padding:0;border:0;border-radius:16px;background:#fff;box-shadow:0 24px 80px rgba(15,23,42,.3);overflow:hidden}.note-editor-dialog::backdrop{background:rgba(15,23,42,.55);backdrop-filter:blur(2px)}.note-dialog-shell{display:grid;grid-template-rows:auto minmax(0,1fr);height:100%}.note-dialog-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 18px;border-bottom:1px solid var(--border);background:#f8fafc}.note-dialog-header h2{margin:2px 0 0;font-size:17px}.note-dialog-header .icon-button{width:38px;height:38px;border:1px solid var(--border);border-radius:9px;background:#fff;font-size:24px;cursor:pointer}.note-editor-dialog .note-editor-form{grid-template-rows:auto auto auto minmax(260px,1fr) auto auto;min-height:0;height:100%;overflow:hidden}.note-editor-dialog .note-compose{min-height:0;height:100%;overflow:hidden}.note-editor-dialog .note-compose textarea,.note-editor-dialog .note-rendered{min-height:0;height:100%;overflow:auto}.note-dialog-footer{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 16px;border-top:1px solid var(--border);background:#fff}.note-dialog-footer .form-actions{display:flex;align-items:center;gap:8px}.note-draft-status{color:#7b8798;font-size:11px}.note-editor-dialog .note-attachments{max-height:150px;overflow:auto}.note-editor-dialog .note-meta-row{grid-template-columns:1fr 1fr}.note-editor-dialog .note-title-input{min-width:0}.note-editor-dialog .note-editor-head{padding:10px 16px}.note-editor-dialog .markdown-toolbar{flex-wrap:nowrap;overflow-x:auto}.note-editor-dialog .note-compose.mode-write{grid-template-columns:1fr}.note-editor-dialog .note-compose.mode-write .note-rendered{display:none}.note-editor-dialog .note-compose.mode-preview{grid-template-columns:1fr}.note-editor-dialog .note-compose.mode-preview textarea{display:none}@media(max-width:900px){.notes-library-toolbar{align-items:stretch;flex-direction:column}.notes-library-toolbar .notes-nav{min-width:0}.notes-filter-form{justify-content:stretch;flex-wrap:wrap}.notes-filter-form .notes-search{max-width:none;min-width:100%}.notes-filter-form select{max-width:none;flex:1}.note-editor-dialog{width:calc(100vw - 16px);height:calc(100vh - 16px)}.note-editor-dialog .note-compose{grid-template-columns:1fr}.note-editor-dialog .note-compose textarea{border-right:0}.note-mode-switch{display:flex}}@media(max-width:600px){.notes-library{padding:10px}.notes-card-grid{grid-template-columns:1fr}.notes-filter-form select{flex-basis:100%}.note-dialog-header{padding:10px 12px}.note-editor-dialog .note-meta-row{grid-template-columns:1fr}.note-dialog-footer{align-items:stretch;flex-direction:column}.note-dialog-footer .form-actions{justify-content:flex-end;flex-wrap:wrap}.note-draft-status{order:2}.note-card{min-height:200px}}

/* Stage 9 — additive dashboard expansion. Existing dashboard blocks remain unchanged. */
.dashboard-expansion{display:grid;gap:18px;padding-top:4px}.dashboard-summary-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}.dashboard-metric-card{display:grid;gap:8px;padding:16px 18px;border:1px solid var(--border);border-radius:14px;background:#fff;box-shadow:0 4px 16px rgba(15,23,42,.035)}.dashboard-metric-card span{font-size:11px;font-weight:700;color:var(--muted)}.dashboard-metric-card strong{font-size:25px}.dashboard-metric-card.is-alert{border-color:#efc7cb;background:#fff8f8}.dashboard-insight-grid{display:grid;grid-template-columns:1.2fr .9fr .9fr;gap:18px}.dashboard-expansion .panel{margin:0}.panel-heading-row{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.panel-heading-row h3{margin:2px 0 0}.dashboard-progress-number{font-size:25px}.dashboard-progress-details,.dashboard-health-details{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:13px}.dashboard-progress-details span,.dashboard-health-details span{display:grid;gap:5px;padding:10px;border-radius:10px;background:#f7f9fc;font-size:11px;color:var(--muted)}.dashboard-progress-details strong,.dashboard-health-details strong{font-size:16px;color:var(--text)}.dashboard-health-status{display:flex;align-items:center;gap:9px;margin:12px 0}.dashboard-health-status i{width:10px;height:10px;border-radius:50%;background:#22a06b}.dashboard-health-attention .dashboard-health-status i{background:#d68a00}.dashboard-health-risk .dashboard-health-status i{background:#d14343}.dashboard-snapshot-list{display:grid;margin-top:10px}.dashboard-snapshot-list a{display:flex;justify-content:space-between;gap:14px;padding:11px 4px;border-bottom:1px solid var(--line);text-decoration:none;color:inherit}.dashboard-snapshot-list a:last-child{border-bottom:0}.dashboard-snapshot-list span{font-size:12px;color:var(--muted)}.dashboard-content-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.dashboard-feed-list{display:grid;margin-top:12px}.dashboard-feed-item,.dashboard-activity-item{display:grid;grid-template-columns:95px 1fr;gap:12px;align-items:center;padding:11px 6px;border-bottom:1px solid var(--line);text-decoration:none;color:inherit}.dashboard-feed-item:last-child,.dashboard-activity-item:last-child{border-bottom:0}.dashboard-feed-item time,.dashboard-activity-item time{font-size:11px;color:var(--muted)}.dashboard-feed-item div,.dashboard-activity-item div{min-width:0}.dashboard-feed-item strong,.dashboard-activity-item strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px}.dashboard-feed-item small,.dashboard-activity-item small,.dashboard-asset-card small,.dashboard-note-card small{display:flex;align-items:center;gap:6px;margin-top:4px;color:var(--muted);font-size:11px}.dashboard-feed-item.is-overdue time{color:#b4232f;font-weight:800}.dashboard-feed-item.is-today{background:#f2f7ff;border-radius:9px}.dashboard-activity-item{grid-template-columns:72px 1fr auto}.dashboard-activity-type{font-size:10px;font-weight:800;text-transform:uppercase;color:#65758b}.dashboard-asset-grid,.dashboard-note-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px}.dashboard-asset-card{display:grid;grid-template-columns:42px 1fr;align-items:center;gap:10px;padding:11px;border:1px solid var(--line);border-radius:11px;color:inherit;text-decoration:none;min-width:0}.dashboard-asset-card>div{min-width:0}.dashboard-asset-card strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px}.dashboard-file-icon{display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:9px;background:#eef3fb;color:#5270a3;font-size:9px;font-weight:900}.dashboard-note-card{display:grid;gap:7px;padding:12px;border:1px solid var(--line);border-left:4px solid var(--note-color);border-radius:11px;color:inherit;text-decoration:none;min-width:0}.dashboard-note-card strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px}.dashboard-note-card p{margin:0;color:var(--muted);font-size:11px;line-height:1.45;height:32px;overflow:hidden}.dashboard-quick-actions{flex-wrap:wrap}
@media(max-width:1100px){.dashboard-summary-grid{grid-template-columns:repeat(3,1fr)}.dashboard-insight-grid{grid-template-columns:1fr 1fr}.dashboard-task-snapshot{grid-column:1/-1}}
@media(max-width:760px){.dashboard-summary-grid{grid-template-columns:repeat(2,1fr)}.dashboard-insight-grid,.dashboard-content-grid{grid-template-columns:1fr}.dashboard-task-snapshot{grid-column:auto}.dashboard-asset-grid,.dashboard-note-grid{grid-template-columns:1fr}.dashboard-progress-details,.dashboard-health-details{grid-template-columns:1fr}.dashboard-activity-item{grid-template-columns:64px 1fr}.dashboard-activity-item time{display:none}}

/* Stage 10 — Notifications */
.notification-menu{position:relative}.notification-bell{position:relative;font-size:20px}.notification-badge{position:absolute;right:-5px;top:-6px;display:grid;place-items:center;min-width:18px;height:18px;padding:0 4px;border:2px solid var(--surface,#fff);border-radius:999px;background:#dc2626;color:#fff;font-size:10px;font-weight:800}.notification-popover{position:absolute;z-index:80;top:calc(100% + 10px);right:0;width:min(390px,calc(100vw - 30px));overflow:hidden;border:1px solid var(--border,#e2e8f0);border-radius:16px;background:var(--surface,#fff);box-shadow:0 22px 60px rgba(15,23,42,.18)}.notification-popover-head{display:flex;align-items:center;justify-content:space-between;padding:15px 16px;border-bottom:1px solid var(--border,#e2e8f0)}.notification-popover-head a,.notification-popover-list a{color:inherit;text-decoration:none}.notification-popover-head a{font-size:13px;color:var(--primary,#2563eb)}.notification-popover-list{max-height:370px;overflow:auto}.notification-popover-list a{display:grid;gap:3px;padding:13px 16px;border-bottom:1px solid var(--border,#e2e8f0)}.notification-popover-list a:hover{background:var(--soft,#f8fafc)}.notification-popover-list span,.notification-popover-empty{font-size:13px;color:var(--muted,#64748b)}.notification-popover-empty{margin:0;padding:24px;text-align:center}.notification-layout{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:20px}.notification-list-panel,.notification-settings{padding:0;overflow:hidden}.notification-list-panel .panel-heading,.notification-settings .panel-heading{padding:18px 20px;border-bottom:1px solid var(--border,#e2e8f0)}.notification-list{display:grid}.notification-item{display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:13px;padding:17px 20px;border-bottom:1px solid var(--border,#e2e8f0)}.notification-item.is-unread{background:rgba(37,99,235,.045)}.notification-item.is-unread .notification-title-row strong:before{content:"";display:inline-block;width:7px;height:7px;margin-right:7px;border-radius:999px;background:var(--primary,#2563eb);vertical-align:2px}.notification-type-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;background:var(--soft,#f1f5f9);font-weight:800}.notification-copy{min-width:0}.notification-title-row{display:flex;justify-content:space-between;gap:12px}.notification-title-row time{white-space:nowrap;font-size:12px;color:var(--muted,#64748b)}.notification-copy p{margin:5px 0 8px;color:var(--muted,#64748b)}.project-mini-label{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--muted,#64748b)}.project-mini-label i{width:7px;height:7px;border-radius:999px}.notification-actions{display:flex;align-items:center;gap:8px}.icon-button.compact{width:32px;height:32px}.settings-form{display:grid;gap:0;padding:5px 20px 20px}.setting-toggle{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 0;border-bottom:1px solid var(--border,#e2e8f0)}.setting-toggle span{display:grid;gap:4px}.setting-toggle small{color:var(--muted,#64748b);line-height:1.35}.setting-toggle input{width:19px;height:19px}.settings-form>.primary-button{margin-top:20px}.count-badge{display:inline-grid;place-items:center;min-width:28px;height:28px;padding:0 8px;border-radius:999px;background:var(--soft,#f1f5f9);font-size:12px;font-weight:700}@media(max-width:980px){.notification-layout{grid-template-columns:1fr}}@media(max-width:640px){.notification-item{grid-template-columns:36px minmax(0,1fr)}.notification-actions{grid-column:2}.notification-title-row{display:grid}.topbar-actions .notification-menu{order:-1}}

/* Stage 11 — Recurring Tasks */
.recurrence-fieldset{margin:4px 0 0;padding:18px;border:1px solid var(--border);border-radius:12px;background:#f8fafc}.recurrence-fieldset legend{padding:0 8px;font-weight:700;color:var(--text)}.toggle-row{display:flex;align-items:center;gap:10px;font-weight:650;cursor:pointer}.toggle-row input{width:18px;height:18px}.recurrence-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:16px}.weekday-picker{display:flex;gap:7px;flex-wrap:wrap}.weekday-picker label{cursor:pointer}.weekday-picker input{position:absolute;opacity:0;pointer-events:none}.weekday-picker span{display:inline-flex;min-width:38px;height:36px;align-items:center;justify-content:center;border:1px solid var(--border);border-radius:9px;background:#fff;font-size:.86rem;font-weight:650}.weekday-picker input:checked+span{border-color:var(--primary);background:#eef4ff;color:var(--primary)}.recurrence-badge{display:inline-flex;align-items:center;gap:5px;color:var(--primary)}@media(max-width:700px){.recurrence-grid{grid-template-columns:1fr}.recurrence-grid .span-2{grid-column:auto}}

/* Stage 12 — Project templates */
.template-create-form{display:grid;grid-template-columns:minmax(220px,1.3fr) minmax(220px,1fr) auto auto;gap:16px;align-items:end}.template-create-form .check-field{align-self:center;margin-bottom:12px}.template-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:20px}.template-card{border-top:4px solid var(--project-color);display:flex;flex-direction:column;gap:14px}.template-card-head{display:flex;justify-content:space-between;align-items:center}.template-mark{width:46px;height:46px;border-radius:14px;background:color-mix(in srgb,var(--project-color) 18%,white);color:var(--project-color);display:grid;place-items:center;font-weight:800;font-size:20px}.template-card h2,.template-card p{margin:0}.template-project-form{display:grid;grid-template-columns:1fr 160px;gap:12px;align-items:end}.template-project-form .primary-button{grid-column:1/-1}.template-actions{display:flex;gap:8px;flex-wrap:wrap;padding-top:4px;border-top:1px solid var(--border-color,#e7eaf0)}.template-actions form{margin:0}@media(max-width:900px){.template-create-form{grid-template-columns:1fr 1fr}.template-create-form .primary-button{grid-column:1/-1}.template-project-form{grid-template-columns:1fr}}@media(max-width:640px){.template-create-form{grid-template-columns:1fr}.template-grid{grid-template-columns:1fr}}

/* Stage 12.5 — Dependencies & Timeline Analysis */
.timeline-analysis-panel,
.timeline-project-panel {
    overflow: hidden;
}
.timeline-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 8px 0 16px;
}
.timeline-metrics > div {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--border-color, #e4e8f0);
    border-radius: 12px;
    background: var(--surface-soft, #f8fafc);
}
.timeline-metrics span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted-color, #667085);
    font-size: .78rem;
}
.timeline-metrics strong {
    display: block;
    overflow-wrap: anywhere;
}
.timeline-critical-badge,
.risk-badge,
.inline-critical {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 700;
    line-height: 1;
}
.timeline-critical-badge,
.risk-badge {
    padding: 8px 11px;
    font-size: .78rem;
}
.timeline-critical-badge.is-critical,
.risk-badge.risk-critical,
.inline-critical {
    color: #b42318;
    background: #fee4e2;
}
.timeline-critical-badge.is-flexible,
.risk-badge.risk-low {
    color: #027a48;
    background: #d1fadf;
}
.risk-badge.risk-medium {
    color: #b54708;
    background: #fef0c7;
}
.risk-badge.risk-high {
    color: #c4320a;
    background: #ffead5;
}
.inline-critical {
    margin-left: 8px;
    padding: 4px 7px;
    font-size: .66rem;
    vertical-align: middle;
}
.timeline-alert {
    margin: 12px 0;
    padding: 12px 14px;
    border: 1px solid #fdb022;
    border-radius: 10px;
    color: #93370d;
    background: #fffaeb;
}
.kanban-card.is-critical-task {
    box-shadow: inset 4px 0 0 #d92d20;
}
@media (max-width: 860px) {
    .timeline-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .timeline-metrics { grid-template-columns: 1fr; }
}

/* Stage 12.5 Fix 1: visible critical path indicators */
.legend-critical{background:#dc2626!important;border-radius:2px;width:4px!important}
.fc-event.is-critical-task,.fc-event.calendar-critical-task{box-shadow:inset 4px 0 0 #dc2626,0 0 0 1px rgba(220,38,38,.25)!important}
.planner-event-content.is-critical{position:relative;padding-left:7px}.planner-event-content.is-critical:before{content:"";position:absolute;left:0;top:1px;bottom:1px;width:3px;border-radius:2px;background:#dc2626}
.planner-event-critical-badge,.pp-critical-badge{display:inline-flex;margin-left:6px;padding:1px 5px;border-radius:999px;background:#fee2e2;color:#991b1b;font-size:10px;font-weight:800;line-height:1.4}
.pp-timeline-row.is-critical-task .pp-timeline-label{box-shadow:inset 4px 0 0 #dc2626;background:rgba(254,226,226,.38)}
.pp-timeline-bar.is-critical-task{box-shadow:inset 4px 0 0 #991b1b,0 0 0 2px rgba(220,38,38,.34)!important}
.kanban-card.is-critical-task{border-left:5px solid #dc2626!important;box-shadow:0 0 0 1px rgba(220,38,38,.22),var(--shadow-sm)}
.kanban-card.is-critical-task:hover{box-shadow:0 0 0 2px rgba(220,38,38,.34),var(--shadow-md)}
.critical-task-panel{grid-column:1/-1}.critical-count{display:grid;place-items:center;min-width:32px;height:32px;border-radius:999px;background:#fee2e2;color:#991b1b}.critical-task-list,.dashboard-critical-list{display:grid;gap:8px}.critical-task-link,.dashboard-critical-list a{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid var(--border-color);border-radius:10px;text-decoration:none;color:inherit;background:var(--surface)}.critical-task-link:hover,.dashboard-critical-list a:hover{border-color:#ef4444;background:#fff7f7}.critical-task-link>i,.dashboard-critical-list a>i{width:5px;align-self:stretch;border-radius:4px;background:#dc2626}.critical-task-link span,.dashboard-critical-list a span{display:grid;gap:2px;flex:1}.critical-task-link small,.dashboard-critical-list small{color:var(--muted-text)}.critical-task-link>b{color:#dc2626}.dashboard-critical-panel{margin-bottom:22px}.dashboard-critical-list{grid-template-columns:repeat(auto-fit,minmax(250px,1fr))}.dashboard-critical-list a>b{font-size:11px;text-transform:uppercase;color:#991b1b;background:#fee2e2;padding:3px 7px;border-radius:999px}
@media(max-width:720px){.dashboard-critical-list{grid-template-columns:1fr}.planner-event-critical-badge{display:none}}


/* Stage 12.5 Fix 2: planner clipping and final navigation polish */
.pp-timeline-label{overflow:hidden;background:#fff!important}
.pp-timeline-row.is-critical-task .pp-timeline-label{background:#fff5f5!important;box-shadow:inset 4px 0 0 #dc2626,8px 0 14px -14px rgba(15,23,42,.55)!important}
.pp-timeline-project .pp-timeline-label{background:#f4f7fb!important}
.pp-timeline-goal-row .pp-timeline-label{background:#fbfaff!important}
.pp-timeline-header .pp-timeline-label{background:#fff!important}
.pp-timeline-grid{clip-path:inset(0);overflow:hidden!important}
.pp-timeline-bar.is-critical-task{box-shadow:inset 4px 0 0 #991b1b,0 0 0 1px rgba(220,38,38,.28)!important}
.pp-critical-badge{padding:0 4px;font-size:9px;line-height:1.35;vertical-align:middle}

/* Stage 13: task comments and automatic activity history */
.task-collaboration-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(340px,.85fr);gap:22px;margin-top:22px;align-items:start}.count-badge{display:inline-flex;min-width:28px;height:28px;align-items:center;justify-content:center;border-radius:999px;background:#eef2ff;color:#3730a3;font-weight:800;font-size:12px}.comment-composer{display:grid;gap:10px;padding:14px;border:1px solid var(--border-color);border-radius:14px;background:#fafbff;margin-bottom:18px}.comment-composer textarea,.comment-edit-form textarea{width:100%;min-height:110px;resize:vertical;border:1px solid var(--border-color);border-radius:10px;padding:12px;font:inherit;background:#fff}.comment-composer-footer{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.comment-composer-footer>small{color:var(--muted-text);flex:1}.attachment-picker{display:inline-flex;gap:6px;align-items:center;cursor:pointer;font-weight:700}.attachment-picker input{position:absolute;opacity:0;pointer-events:none}.comment-list{display:grid;gap:14px}.comment-card{display:grid;grid-template-columns:38px minmax(0,1fr);gap:11px;padding:14px 0;border-bottom:1px solid var(--border-color)}.comment-card:last-child{border-bottom:0}.comment-avatar{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:#e0e7ff;color:#3730a3;font-weight:800}.comment-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.comment-meta time,.comment-meta span{font-size:12px;color:var(--muted-text)}.comment-body{margin-top:7px;line-height:1.55;overflow-wrap:anywhere}.comment-body pre{overflow:auto;background:#111827;color:#f9fafb;padding:10px;border-radius:8px}.comment-body code{background:#eef2f7;padding:1px 4px;border-radius:4px}.comment-attachments{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.comment-attachments a{display:inline-flex;align-items:center;gap:6px;padding:7px 9px;border:1px solid var(--border-color);border-radius:9px;text-decoration:none;color:inherit;background:#fff}.comment-attachments small{color:var(--muted-text)}.comment-actions{display:flex;gap:10px;align-items:center;margin-top:8px}.comment-actions form{margin:0}.text-button{border:0;background:none;padding:0;color:#4f46e5;font-weight:700;cursor:pointer}.danger-text{color:#dc2626}.comment-edit-form{display:grid;gap:8px;margin-top:10px}.comment-edit-form>div{display:flex;gap:8px}.activity-filters{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:16px}.activity-filters a{padding:6px 10px;border-radius:999px;text-decoration:none;color:var(--muted-text);font-size:12px;font-weight:700;border:1px solid var(--border-color)}.activity-filters a.is-active{background:#111827;color:#fff;border-color:#111827}.activity-timeline{position:relative;display:grid;gap:0}.activity-day{padding:10px 0 8px;font-weight:800;color:#334155;position:relative}.activity-item{display:grid;grid-template-columns:18px minmax(0,1fr);gap:10px;padding:8px 0 14px 2px;position:relative}.activity-item:before{content:"";position:absolute;left:8px;top:19px;bottom:-4px;width:1px;background:#dbe2ea}.activity-item:last-child:before{display:none}.activity-dot{width:13px;height:13px;border-radius:50%;background:#6366f1;border:3px solid #eef2ff;z-index:1;margin-top:3px}.activity-item p{margin:4px 0;color:#475569;font-size:13px;line-height:1.45}.activity-item del{color:#991b1b;background:#fee2e2;text-decoration:none;padding:1px 4px;border-radius:4px}.activity-item ins{color:#166534;background:#dcfce7;text-decoration:none;padding:1px 4px;border-radius:4px}.activity-item small{color:var(--muted-text)}.activity-comment_added .activity-dot,.activity-comment_updated .activity-dot{background:#16a34a;border-color:#dcfce7}.activity-comment_deleted .activity-dot{background:#dc2626;border-color:#fee2e2}.activity-comment_attachment_added .activity-dot{background:#0284c7;border-color:#e0f2fe}
@media(max-width:980px){.task-collaboration-grid{grid-template-columns:1fr}}

/* Stage 13 Fix 1 — readable comments, modal composer and linked documents */
.comment-heading-actions{display:flex;align-items:center;gap:10px}.task-comments-panel .comment-list{display:grid;gap:0}.task-comments-panel .comment-card{display:block;padding:16px 2px;border-bottom:1px solid var(--border-color)}.task-comments-panel .comment-card:last-child{border-bottom:0}.task-comments-panel .comment-body{margin:0;color:var(--text);font-size:14px;line-height:1.65;white-space:pre-wrap}.comment-footer{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:8px}.comment-footer>small{color:var(--muted-text);font-size:11px}.comment-footer .comment-actions{margin:0;opacity:.72}.comment-footer .text-button{font-size:11px;font-weight:600}.comment-create-dialog{width:min(620px,calc(100vw - 28px))}.comment-create-dialog textarea{min-height:180px;resize:vertical}.task-linked-documents{border-top:1px solid var(--border-color);margin-top:18px;padding-top:18px}.linked-documents-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:10px}.linked-documents-heading h3{display:flex;align-items:center;gap:8px;margin:2px 0 0;font-size:16px}.linked-documents-heading .count-badge{min-width:22px;height:22px;font-size:10px}.linked-document-list{display:grid}.linked-document-row{display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:10px;align-items:center;padding:10px 4px;border-bottom:1px solid var(--border-color);color:inherit;text-decoration:none}.linked-document-row:last-child{border-bottom:0}.linked-document-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:9px;background:#f2f5fa}.linked-document-row strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.linked-document-row small{display:block;color:var(--muted-text);font-size:10px;margin-top:2px}@media(max-width:700px){.comment-footer,.linked-documents-heading{align-items:flex-start;flex-direction:column}.comment-heading-actions{gap:6px}.comment-heading-actions .primary-button{padding:8px 10px}}

/* Stage 13 Fix 2 — hidden edit state, separate task materials, task counters */
.comment-edit-form[hidden],.comment-actions[hidden]{display:none!important}.task-linked-documents-panel{margin-top:22px}.task-linked-documents-panel .linked-documents-heading{margin-bottom:14px}.task-linked-documents-panel .linked-documents-heading h2{display:flex;align-items:center;gap:9px}.task-row-counters{display:flex;align-items:center;gap:10px;margin-top:6px;color:#8a96a8;font-size:11px;font-weight:700}.task-row-counters span{display:inline-flex;align-items:center;gap:3px;white-space:nowrap}@media(max-width:700px){.task-row-counters{gap:8px}.task-linked-documents-panel .linked-documents-heading{align-items:flex-start;flex-direction:column}}


/* Stage 13 final: readable task sections and goal task metrics */
.task-comments-only { grid-template-columns: minmax(0, 1fr); }
.task-history-panel { margin-top: 0; }
.goal-row-with-stats { align-items: center; }
.goal-task-stats { display:flex; flex-wrap:wrap; gap:6px; margin-top:7px; }
.goal-task-stats > span { display:inline-flex; align-items:center; min-height:24px; padding:3px 8px; border:1px solid var(--border-color,#dbe3ef); border-radius:999px; background:var(--surface-soft,#f7f9fc); color:var(--text-muted,#64748b); font-size:12px; font-weight:700; line-height:1; }
.goal-task-stats > span.is-overdue { border-color:#fecaca; background:#fff1f2; color:#dc2626; }
.goal-task-stats > span.is-critical { border-color:#fecaca; background:#fff1f2; color:#b91c1c; }
.goal-task-stats > span.is-blocked { border-color:#fed7aa; background:#fff7ed; color:#c2410c; }
@media (max-width: 720px) { .goal-task-stats { gap:4px; } .goal-task-stats > span { padding:3px 7px; } }


/* Stage 14 — Reports & Analytics */
.reports-page{display:grid;gap:20px}.report-filters{display:flex;align-items:end;gap:14px;padding:18px}.report-filters label{display:grid;gap:6px;min-width:220px}.report-filters label span{font-size:12px;font-weight:700;color:var(--muted,#64748b);text-transform:uppercase;letter-spacing:.04em}.report-filters select{min-height:42px}.report-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}.report-kpi{background:#fff;border:1px solid #e2e8f0;border-radius:18px;padding:18px;box-shadow:0 8px 24px rgba(15,23,42,.04);display:grid;gap:5px}.report-kpi span{font-size:13px;color:#64748b;font-weight:700}.report-kpi strong{font-size:30px;line-height:1;color:#172033}.report-kpi small{color:#94a3b8}.report-kpi-danger{border-left:4px solid #ef4444}.report-kpi-warning{border-left:4px solid #f59e0b}.report-grid-two{display:grid;grid-template-columns:1fr 1fr;gap:20px}.report-panel{padding:20px}.panel-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:18px}.panel-heading h2{margin:3px 0 0;font-size:19px}.report-bars{display:grid;gap:14px}.report-bar-row{display:grid;grid-template-columns:minmax(105px,150px) 1fr 36px;align-items:center;gap:12px;font-size:13px}.report-bar-row>span{font-weight:650}.report-bar-track{height:10px;background:#edf2f7;border-radius:999px;overflow:hidden}.report-bar-track i{display:block;height:100%;background:#4f7ee8;border-radius:999px;min-width:3px}.priority-critical .report-bar-track i{background:#ef4444}.priority-high .report-bar-track i{background:#f59e0b}.priority-low .report-bar-track i{background:#94a3b8}.report-legend{display:flex;gap:14px;font-size:12px;color:#64748b}.report-legend span{display:flex;align-items:center;gap:6px}.report-legend i{width:10px;height:10px;border-radius:3px}.legend-created,.trend-created{background:#cbd5e1}.legend-completed,.trend-completed{background:#4f7ee8}.trend-chart{height:250px;display:grid;grid-template-columns:repeat(6,1fr);gap:18px;align-items:end;border-bottom:1px solid #e2e8f0;padding:12px 18px 0}.trend-month{height:100%;display:grid;grid-template-rows:1fr auto auto;align-items:end;text-align:center;gap:5px}.trend-columns{height:180px;display:flex;align-items:end;justify-content:center;gap:7px}.trend-columns i{width:22px;min-height:3px;border-radius:6px 6px 0 0}.trend-month strong{font-size:11px;color:#64748b}.trend-month span{font-size:12px;font-weight:700;padding-bottom:8px}.report-table-wrap{overflow:auto}.report-table{width:100%;border-collapse:collapse}.report-table th,.report-table td{padding:13px 12px;border-bottom:1px solid #e8edf4;text-align:left;white-space:nowrap}.report-table th{font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:#64748b}.report-table td a{display:flex;align-items:center;gap:8px;font-weight:700;color:inherit;text-decoration:none}.project-dot{display:inline-block;width:9px;height:9px;border-radius:50%;flex:0 0 auto}.progress-cell{display:flex;align-items:center;gap:10px}.mini-progress{width:100px;height:7px;background:#edf2f7;border-radius:99px;overflow:hidden}.mini-progress i{display:block;height:100%;background:#4f7ee8;border-radius:99px}.metric-danger{color:#dc2626;font-weight:800}.metric-warning{color:#d97706;font-weight:800}.attention-list{display:grid}.attention-item{display:flex;align-items:center;gap:12px;padding:13px 4px;border-bottom:1px solid #e8edf4;text-decoration:none;color:inherit}.attention-item:last-child{border-bottom:0}.attention-main{display:grid;gap:3px;min-width:0;flex:1}.attention-main strong,.attention-main small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.attention-main small{color:#64748b}.attention-tags{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:7px}.attention-tags em{font-style:normal}.tag{font-size:11px;font-weight:750;background:#eef2f7;border-radius:999px;padding:5px 8px}.tag-danger{background:#fee2e2;color:#b91c1c}.tag-warning{background:#fef3c7;color:#b45309}.empty-state{color:#94a3b8;padding:18px 0;text-align:center}
@media(max-width:1100px){.report-kpis{grid-template-columns:repeat(3,1fr)}}@media(max-width:800px){.report-filters{align-items:stretch;flex-direction:column}.report-filters label{min-width:0}.report-grid-two{grid-template-columns:1fr}.report-kpis{grid-template-columns:repeat(2,1fr)}.trend-chart{gap:7px;padding-inline:4px}.trend-columns i{width:14px}.report-legend{display:none}}@media(max-width:520px){.report-kpis{grid-template-columns:1fr}.report-bar-row{grid-template-columns:95px 1fr 28px}.attention-item{align-items:flex-start}.attention-tags{max-width:110px}}

/* Stage 15 — Global Search */
.global-search{position:relative}.global-search-trigger{height:42px;min-width:270px;border:1px solid #dbe3ef;background:#fff;border-radius:12px;padding:0 10px;display:flex;align-items:center;gap:9px;color:#667085;cursor:pointer}.global-search-trigger-label{flex:1;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.global-search-trigger kbd{font:600 11px/1 system-ui;border:1px solid #d7dee9;border-bottom-width:2px;border-radius:6px;padding:5px 6px;background:#f8fafc;color:#667085}.global-search-popover{position:absolute;right:0;top:50px;width:min(620px,calc(100vw - 32px));max-height:min(640px,calc(100vh - 90px));z-index:1000;background:#fff;border:1px solid #dbe3ef;border-radius:16px;box-shadow:0 24px 60px rgba(15,23,42,.2);overflow:hidden}.global-search-form{display:flex;align-items:center;gap:10px;padding:13px 15px;border-bottom:1px solid #e7edf5}.global-search-form input{flex:1;border:0;outline:0;font-size:16px;min-width:0}.global-search-close{border:0;background:transparent;font-size:24px;color:#667085;cursor:pointer}.global-search-scope{display:flex;align-items:center;gap:8px;padding:9px 15px;background:#f8fafc;border-bottom:1px solid #e7edf5;font-size:13px;color:#475467}.global-search-results{max-height:430px;overflow:auto;padding:8px}.global-search-hint{padding:28px 18px;text-align:center;color:#667085}.global-search-group h4{display:flex;justify-content:space-between;margin:6px 8px;padding:5px 4px;font-size:12px;text-transform:uppercase;letter-spacing:.06em;color:#667085}.global-search-group h4 span{font-weight:500}.global-search-result{display:flex;gap:11px;align-items:center;padding:10px;border-radius:10px;color:#172033;text-decoration:none}.global-search-result:hover,.global-search-result.is-active{background:#eef4ff}.global-search-result-icon{width:28px;height:28px;border-radius:8px;background:#f0f4f9;display:grid;place-items:center;color:#315a9e}.global-search-result strong{display:block;font-size:14px}.global-search-result small{display:block;color:#667085;margin-top:2px}.global-search-footer{display:flex;justify-content:space-between;gap:10px;border-top:1px solid #e7edf5;background:#f8fafc;padding:9px 14px;font-size:11px;color:#667085}.search-page{max-width:1100px}.search-filter-card{padding:18px}.search-page-bar{display:flex;align-items:center;gap:10px}.search-page-icon{font-size:22px}.search-page-bar input{flex:1;min-width:0;height:44px;border:1px solid #d7dfeb;border-radius:10px;padding:0 13px;font-size:16px}.search-filter-row{display:flex;gap:14px;margin-top:14px}.search-filter-row label{flex:1}.search-filter-row label>span{display:block;font-size:12px;font-weight:700;color:#667085;margin-bottom:5px}.search-filter-row select{width:100%}.search-summary{font-size:13px;color:#667085}.search-group{padding:0;overflow:hidden}.search-group summary{cursor:pointer;display:flex;align-items:center;justify-content:space-between;padding:15px 17px;font-weight:700}.search-group summary::marker{color:#6d7e99}.count-badge{min-width:26px;text-align:center;border-radius:999px;background:#edf3ff;color:#315a9e;padding:3px 8px;font-size:12px}.search-result-list{border-top:1px solid #e8edf4}.search-result-row{display:flex;align-items:center;gap:14px;padding:14px 17px;border-bottom:1px solid #edf1f6;text-decoration:none;color:#172033}.search-result-row:last-child{border-bottom:0}.search-result-row:hover{background:#f8fafc}.search-result-type{width:90px;color:#667085;font-size:12px}.search-result-main{min-width:0;flex:1}.search-result-main strong,.search-result-main small,.search-result-meta{display:block}.search-result-main small{color:#475467;margin-top:4px}.search-result-meta{font-size:12px;color:#98a2b3;margin-top:4px}.search-result-arrow{font-size:24px;color:#98a2b3}.search-result-row mark{background:#fff1a8;color:inherit;border-radius:3px;padding:0 1px}@media(max-width:900px){.global-search-trigger{min-width:42px;width:42px}.global-search-trigger-label,.global-search-trigger kbd{display:none}}@media(max-width:640px){.global-search-popover{position:fixed;left:10px;right:10px;top:10px;width:auto;max-height:calc(100vh - 20px)}.global-search-footer{display:none}.search-page-bar{flex-wrap:wrap}.search-page-bar .button{width:100%}.search-filter-row{flex-direction:column}.search-result-type{display:none}}


/* Stage 16 — user settings */
.settings-page{max-width:1180px;margin:0 auto}.settings-hero{padding:8px 2px}.settings-hero h2{margin:4px 0}.settings-hero p{color:var(--muted-text)}.settings-tabs{position:sticky;top:0;z-index:8;display:flex;gap:7px;overflow:auto;padding:8px;background:rgba(247,249,252,.94);backdrop-filter:blur(8px);border-radius:12px}.settings-tabs a{white-space:nowrap;text-decoration:none;color:#475467;padding:8px 11px;border-radius:8px;font-size:13px;font-weight:700}.settings-tabs a:hover{background:#fff;color:#172033}.settings-sections{display:grid;gap:18px}.settings-section{scroll-margin-top:82px}.settings-profile-grid{display:grid;grid-template-columns:190px minmax(0,1fr);gap:26px}.settings-avatar{display:flex;flex-direction:column;align-items:center;gap:10px}.avatar-preview{width:112px;height:112px;border-radius:28px;overflow:hidden;display:grid;place-items:center;background:#e9efff;color:#315a9e;font-size:38px;font-weight:800}.avatar-preview img,.avatar-image img{width:100%;height:100%;object-fit:cover}.settings-avatar small{text-align:center;color:var(--muted-text)}.settings-toggle-list{display:grid;gap:2px}.dashboard-widget-sort{display:grid;gap:9px}.dashboard-widget-setting{display:flex;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--border-color);border-radius:11px;background:#fff}.dashboard-widget-setting .drag-handle{cursor:grab;color:#98a2b3;font-size:18px}.dashboard-widget-setting label{display:flex;align-items:center;gap:10px;font-weight:700;flex:1}.dashboard-widget-setting.is-dragging{opacity:.55}.settings-save-bar{position:sticky;bottom:12px;display:flex;justify-content:flex-end;padding:12px;border:1px solid var(--border-color);border-radius:13px;background:rgba(255,255,255,.94);box-shadow:0 8px 30px rgba(15,23,42,.12);z-index:7}.security-grid,.maintenance-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.maintenance-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.settings-card{display:grid;gap:12px;padding:16px;border:1px solid var(--border-color);border-radius:13px;background:#fbfcfe}.settings-card h4{margin:0}.session-list{display:grid;gap:8px;max-height:260px;overflow:auto}.session-row{padding:10px;border-radius:9px;background:#fff;border:1px solid var(--border-color)}.session-row strong,.session-row small{display:block}.session-row small{color:var(--muted-text);margin-top:3px}.danger-button{color:#b42318;border-color:#fda29b}.health-line{display:flex;justify-content:space-between;gap:10px;margin:0;padding:7px 0;border-bottom:1px solid var(--border-color)}.health-ok{color:#027a48}.health-bad{color:#b42318}.avatar.avatar-image{overflow:hidden;padding:0}.dashboard-widget-hidden{display:none!important}@media(max-width:850px){.settings-profile-grid,.security-grid,.maintenance-grid{grid-template-columns:1fr}.settings-tabs{margin-inline:-8px}.settings-save-bar{bottom:8px}}

/* Stage 16.1: functional Dashboard widget preferences. */
.dashboard-widget-list{display:grid;gap:18px;min-width:0}
.dashboard-widget-list>[data-dashboard-widget]{min-width:0;margin:0}
.dashboard-assets-widget>.dashboard-content-grid{margin:0}
.dashboard-widget-setting .drag-handle{user-select:none;touch-action:none}
@media(max-width:760px){.settings-section#dashboard .panel-heading-row{align-items:flex-start;gap:12px}.settings-section#dashboard [data-dashboard-reset]{width:100%}}

/* Stage 17 — Security & Backup */
.security-page{max-width:1180px;margin:0 auto;display:grid;gap:18px}.security-score-panel{display:grid;grid-template-columns:140px minmax(0,1fr);align-items:center;gap:24px;padding:24px}.security-score-ring{--score:0;width:118px;height:118px;border-radius:50%;display:grid;place-content:center;text-align:center;background:radial-gradient(circle at center,#fff 58%,transparent 59%),conic-gradient(#315a9e calc(var(--score)*1%),#e6ebf2 0);box-shadow:inset 0 0 0 1px #e2e8f0}.security-score-ring strong{font-size:31px;line-height:1}.security-score-ring span{font-size:12px;color:#667085;margin-top:4px}.security-level{font-weight:800;margin:7px 0}.security-level-excellent{color:#027a48}.security-level-good{color:#175cd3}.security-level-attention{color:#b54708}.security-level-weak{color:#b42318}.security-recommendations{margin:8px 0 0;padding-left:18px;color:#475467}.security-subnav{position:sticky;top:0;z-index:8;display:flex;gap:7px;overflow:auto;padding:8px;background:rgba(247,249,252,.94);backdrop-filter:blur(8px);border-radius:12px}.security-subnav a{white-space:nowrap;text-decoration:none;color:#475467;padding:8px 11px;border-radius:8px;font-size:13px;font-weight:700}.security-subnav a:hover{background:#fff;color:#172033}.security-section{scroll-margin-top:82px}.recovery-codes-card{padding:16px;border:1px solid #a6f4c5;background:#ecfdf3;border-radius:13px;margin-bottom:16px}.recovery-codes-card h4{margin:0 0 6px}.recovery-code-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:12px 0}.recovery-code-grid code,.secret-key-row code{display:block;padding:9px 10px;background:#fff;border:1px solid #d0d5dd;border-radius:8px;font-weight:800;letter-spacing:.06em;text-align:center}.two-factor-setup-grid,.backup-control-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.secret-key-row{display:flex;align-items:center;gap:8px}.secret-key-row code{flex:1;overflow:auto;text-align:left}.provisioning-uri{margin-top:8px}.provisioning-uri code{display:block;white-space:pre-wrap;overflow-wrap:anywhere;margin-top:8px;padding:10px;background:#fff;border-radius:8px;border:1px solid #d0d5dd}.security-inline-form{grid-template-columns:minmax(220px,1fr) minmax(180px,.7fr) minmax(180px,.7fr) auto;align-items:end}.session-policy-form{display:flex;align-items:end;gap:10px;margin-bottom:15px}.session-policy-form .field{min-width:250px}.security-table-wrap{overflow:auto;border:1px solid var(--border-color);border-radius:12px}.security-table{width:100%;border-collapse:collapse;min-width:760px}.security-table th,.security-table td{padding:12px 13px;border-bottom:1px solid var(--border-color);text-align:left;vertical-align:top}.security-table th{font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:#667085;background:#f8fafc}.security-table tr:last-child td{border-bottom:0}.security-table td strong,.security-table td small{display:block}.security-table td small{margin-top:4px;color:#667085}.security-table tr.is-muted{opacity:.58}.table-actions{display:flex;align-items:center;gap:10px;white-space:nowrap}.table-actions form{margin:0}.text-button{border:0;background:transparent;padding:0;color:#315a9e;font:inherit;font-weight:700;text-decoration:none;cursor:pointer}.danger-text{color:#b42318!important}.warning-text{color:#b54708!important}.empty-cell{text-align:center!important;color:#98a2b3;padding:24px!important}.login-result{display:inline-flex;padding:4px 8px;border-radius:999px;font-size:12px;font-weight:800}.login-result-success{background:#dcfae6;color:#067647}.login-result-failed,.login-result-two_factor_failed{background:#fee4e2;color:#b42318}.status-pill.status-ready,.status-pill.status-restored{background:#dcfae6;color:#067647}.status-pill.status-creating{background:#eaf2ff;color:#175cd3}.status-pill.status-failed{background:#fee4e2;color:#b42318}.modal-backdrop{position:fixed;inset:0;z-index:1500;background:rgba(15,23,42,.58);display:grid;place-items:center;padding:20px}.modal-backdrop[hidden]{display:none}.restore-modal-card{width:min(520px,100%);background:#fff;border-radius:16px;padding:22px;position:relative;box-shadow:0 24px 70px rgba(15,23,42,.3)}.restore-modal-card form{display:grid;gap:13px}.modal-close{position:absolute;right:14px;top:10px;border:0;background:transparent;font-size:28px;color:#667085;cursor:pointer}.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:4px}.modal-open{overflow:hidden}@media(max-width:900px){.security-inline-form{grid-template-columns:1fr 1fr}.recovery-code-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:700px){.security-score-panel{grid-template-columns:1fr;text-align:center}.security-score-ring{margin:auto}.security-recommendations{text-align:left}.two-factor-setup-grid,.backup-control-grid,.security-inline-form{grid-template-columns:1fr}.session-policy-form{align-items:stretch;flex-direction:column}.session-policy-form .field{min-width:0}.session-policy-form .secondary-button{width:100%}.recovery-code-grid{grid-template-columns:1fr 1fr}.table-actions{flex-wrap:wrap}}

/* Stage 18 — Final UI and mobile polish */
html{scroll-behavior:smooth;scroll-padding-top:104px}body{min-width:320px;overflow-x:hidden}button,a,input,select,textarea{touch-action:manipulation}button:not(:disabled),select{cursor:pointer}img,svg{max-width:100%}h1,h2,h3,h4,p{overflow-wrap:anywhere}.skip-link{position:fixed;left:14px;top:10px;z-index:3000;transform:translateY(-160%);padding:10px 14px;border-radius:9px;background:#fff;color:#172033;border:2px solid var(--primary);font-weight:800;text-decoration:none;box-shadow:0 12px 30px rgba(15,23,42,.22)}.skip-link:focus{transform:translateY(0)}:where(a,button,input,select,textarea,summary,[tabindex]):focus-visible{outline:3px solid rgba(71,118,230,.34);outline-offset:2px}.app-shell{min-height:100dvh}.main-area{min-height:100dvh}.sidebar{padding-top:max(24px,env(safe-area-inset-top));padding-bottom:max(18px,env(safe-area-inset-bottom));overflow-y:auto;overscroll-behavior:contain}.sidebar-head{display:flex;align-items:flex-start;gap:8px}.brand{min-width:0;flex:1;text-decoration:none;color:inherit}.brand-copy{min-width:0}.brand-copy strong,.brand-copy>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar-close{display:none;width:42px;height:42px;border:0;border-radius:10px;background:rgba(255,255,255,.08);color:#fff;font-size:26px;line-height:1}.nav-list-secondary{padding-top:3px;border-top:1px solid rgba(255,255,255,.08)}.profile-copy{min-width:0}.profile-copy strong,.profile-copy small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.topbar{padding-top:max(18px,env(safe-area-inset-top));min-width:0}.topbar-title{min-width:0}.topbar-title h1{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.topbar-actions{align-items:center;min-width:0}.mobile-overlay{border:0;padding:0;cursor:pointer}.page-content>*:first-child{margin-top:0}.panel,.content-card,.card{min-width:0}.panel-heading,.panel-heading-row,.section-header,.page-toolbar,.form-page-header,.project-module-heading,.dashboard-section-heading,.dashboard-kanban-heading{flex-wrap:wrap}.heading-actions,.hero-actions,.form-actions,.template-actions,.document-item-actions,.notification-actions,.modal-actions{flex-wrap:wrap}.primary-button,.secondary-button,.danger-button,.ghost-button,.button,.icon-button{min-height:42px}.icon-button{min-width:42px;display:inline-grid;place-items:center}.field input,.field select,.field textarea,select,input,textarea{max-width:100%}textarea{resize:vertical}.form-grid,.form-layout,.project-overview-grid,.dashboard-content-grid,.dashboard-insight-grid,.report-grid,.notification-layout{min-width:0}.filter-tabs,.project-tabs,.settings-tabs,.security-subnav,.notes-nav{scrollbar-width:thin;overscroll-behavior-inline:contain}.project-tabs,.settings-tabs,.security-subnav{scroll-snap-type:x proximity}.project-tabs>a,.settings-tabs>a,.security-subnav>a{scroll-snap-align:start}.project-hero,.project-module-hero{overflow:hidden}.project-identity{min-width:0}.project-identity>div:last-child{min-width:0}.project-identity h2,.project-identity h1{overflow-wrap:anywhere}.project-hero-logo{flex:0 0 auto}.hero-actions{justify-content:flex-end}.goal-row,.kanban-card,.note-card,.document-item,.dashboard-feed-item,.dashboard-activity-item,.search-result-row{min-width:0}.goal-main,.note-card-main,.document-item-main,.notification-copy,.dashboard-feed-item>div,.dashboard-activity-item>div{min-width:0}.goal-main strong,.note-card h3,.document-item strong,.notification-copy strong,.dashboard-feed-item strong,.dashboard-activity-item strong{overflow-wrap:anywhere}.report-table-wrap,.security-table-wrap{max-width:100%;overscroll-behavior-inline:contain}.report-table,.security-table{font-variant-numeric:tabular-nums}.modal-backdrop{padding:max(16px,env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));overflow:auto}.restore-modal-card{max-height:calc(100dvh - 32px);overflow:auto}.auth-body{min-height:100dvh}.auth-shell{min-height:100dvh}.auth-card{min-width:0}.auth-help{text-align:center;margin:18px 0 0}.auth-help a{color:#315fc9;font-weight:700}.global-search-trigger,.notification-bell{flex:0 0 auto}.global-search-popover,.notification-popover{max-width:calc(100vw - 24px)}

@media(max-width:1100px){.page-content{padding-inline:22px}.topbar{padding-inline:22px}.project-overview-grid,.dashboard-insight-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.reports-page .report-grid-two{grid-template-columns:1fr}.notification-layout{grid-template-columns:minmax(0,1fr) minmax(260px,340px)}}

@media(max-width:900px){.page-toolbar{align-items:flex-start}.project-hero,.project-module-hero{align-items:flex-start}.hero-actions{width:100%;justify-content:flex-start}.dashboard-summary-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.report-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.notification-layout{grid-template-columns:1fr}.notification-settings{position:static}.document-preview-dialog{width:calc(100vw - 18px);height:calc(100dvh - 18px)}.document-preview-shell{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto}.document-preview-properties{border-left:0;border-top:1px solid #dfe6ef;max-height:190px}.security-table{min-width:680px}}

@media(max-width:760px){html{scroll-padding-top:82px}.app-shell{display:block}.sidebar{width:min(86vw,300px);padding-inline:14px;box-shadow:18px 0 46px rgba(10,16,26,.28)}.sidebar-head{position:sticky;top:0;z-index:2;margin:-8px -4px 8px;padding:8px 4px;background:linear-gradient(180deg,var(--sidebar),rgba(24,34,51,.96))}.sidebar-close{display:grid;place-items:center}.brand{padding-bottom:14px}.nav-item{min-height:44px}.locale-form select{min-height:44px}.mobile-overlay{display:block;position:fixed;inset:0;z-index:25;background:rgba(10,16,26,.5);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .2s ease,visibility .2s ease}.mobile-overlay.is-visible{opacity:1;visibility:visible;pointer-events:auto}.menu-open{overflow:hidden}.topbar{min-height:72px;padding:10px 14px;gap:10px}.topbar-title .eyebrow{display:none}.topbar-title h1{font-size:18px;margin:0;max-width:calc(100vw - 166px)}.topbar-actions{gap:6px}.page-content{padding:16px 12px max(28px,env(safe-area-inset-bottom))}.panel{padding:16px;border-radius:14px;margin-top:14px}.page-toolbar{align-items:stretch;flex-direction:column;margin-bottom:14px}.page-toolbar>.primary-button,.page-toolbar>.button-link{width:100%}.filter-tabs{width:100%;flex-wrap:nowrap;overflow-x:auto}.filter-tab{white-space:nowrap}.panel-heading,.panel-heading-row,.section-header,.form-page-header,.project-module-heading,.dashboard-section-heading,.dashboard-kanban-heading{align-items:flex-start;gap:10px}.panel-heading>.primary-button,.panel-heading>.secondary-button,.panel-heading-row>.primary-button,.panel-heading-row>.secondary-button,.project-module-primary{width:100%}.heading-actions,.hero-actions,.form-actions,.template-actions,.modal-actions{width:100%}.heading-actions>a,.heading-actions>button,.hero-actions>a,.hero-actions>button,.hero-actions>form,.form-actions>a,.form-actions>button,.template-actions>a,.template-actions>button,.template-actions>form{flex:1 1 145px}.hero-actions form button,.template-actions form button{width:100%}.project-hero,.project-module-hero{padding:16px}.project-identity{align-items:flex-start}.project-hero-logo{width:52px;height:52px}.hero-badges{gap:6px}.project-tabs{margin-inline:-16px;padding-inline:16px;overflow-x:auto;flex-wrap:nowrap}.project-tabs a{white-space:nowrap}.project-overview-grid,.dashboard-insight-grid,.dashboard-content-grid,.report-grid,.report-grid-two,.notification-layout{grid-template-columns:1fr}.form-grid,.form-grid.two-columns,.settings-profile-grid,.two-factor-setup-grid,.backup-control-grid,.security-inline-form{grid-template-columns:1fr}.field.span-2,.field.field-span-2,.field.field-wide,.recurrence-fieldset.span-2{grid-column:auto}.form-actions{position:sticky;bottom:0;z-index:6;margin:18px -16px -16px;padding:12px 16px calc(12px + env(safe-area-inset-bottom));background:rgba(255,255,255,.96);border-top:1px solid var(--line);backdrop-filter:blur(8px)}.form-actions .primary-button{order:-1}.summary-grid,.dashboard-summary-grid,.report-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.summary-card,.dashboard-metric-card,.report-kpi{padding:14px}.summary-card strong,.dashboard-metric-card strong,.report-kpi strong{font-size:23px}.goal-row{padding:13px;gap:10px}.goal-row-with-stats{grid-template-columns:auto minmax(0,1fr)}.goal-task-stats,.row-alerts,.task-row-counters{grid-column:1/-1;width:100%;justify-content:flex-start}.kanban-board,.dashboard-kanban-grid{scroll-snap-type:x proximity;padding-bottom:8px}.kanban-column,.dashboard-kanban-column{scroll-snap-align:start}.calendar-filters{display:grid;grid-template-columns:1fr}.calendar-mode-switch,.segmented-control{overflow-x:auto}.calendar-mode-switch button,.segmented-control button{white-space:nowrap}.fc .fc-toolbar{display:grid;grid-template-columns:1fr auto;gap:9px}.fc .fc-toolbar-chunk:nth-child(2){grid-column:1/-1;grid-row:1;text-align:left}.fc .fc-toolbar-chunk:first-child{grid-column:1}.fc .fc-toolbar-chunk:last-child{grid-column:2}.fc .fc-toolbar-title{font-size:17px}.fc .fc-button{min-height:38px;padding:.35em .55em}.document-preview-header{align-items:flex-start}.document-preview-toolbar{flex-wrap:wrap;justify-content:flex-end}.document-preview-body{padding:10px}.document-preview-properties{max-height:150px;padding:12px}.notes-library-toolbar,.notes-filter-form,.documents-toolbar-card,.documents-filter-form{align-items:stretch}.notes-nav{overflow-x:auto;flex-wrap:nowrap}.notes-nav a{white-space:nowrap}.note-card-actions{width:100%}.note-card-actions>*{flex:1}.notification-item{grid-template-columns:auto minmax(0,1fr)}.notification-actions{grid-column:1/-1;padding-left:0}.settings-tabs,.security-subnav{top:72px;margin-inline:-12px;border-radius:0;padding-inline:12px}.settings-save-bar{margin-inline:-4px;bottom:max(8px,env(safe-area-inset-bottom))}.dashboard-widget-setting{align-items:flex-start}.dashboard-widget-setting .drag-handle{padding:7px;margin:-7px}.security-score-panel{padding:18px}.security-table-wrap,.report-table-wrap{margin-inline:-16px;border-radius:0;border-inline:0}.security-table,.report-table{font-size:12px}.security-table th,.security-table td,.report-table th,.report-table td{padding:10px}.global-search-popover{left:8px;right:8px;top:max(8px,env(safe-area-inset-top));width:auto;max-height:calc(100dvh - 16px);border-radius:14px}.notification-popover{position:fixed;top:72px;left:8px;right:8px;width:auto;max-height:calc(100dvh - 84px)}.modal-backdrop{align-items:end;padding:0}.restore-modal-card{width:100%;max-height:92dvh;border-radius:18px 18px 0 0;padding:20px 16px calc(18px + env(safe-area-inset-bottom))}.auth-shell{display:block;padding:22px 14px}.auth-intro{padding:18px 14px 24px}.auth-intro h1{font-size:34px}.auth-intro>p:last-child{margin-inline:auto}.auth-card{padding:24px 18px;border-radius:18px}.auth-brand-mark{width:52px;height:52px;border-radius:16px}.auth-heading h2{font-size:24px}.full-button{min-height:48px}.field input,.field select,.field textarea{font-size:16px}.empty-state{padding:42px 14px}}

@media(max-width:480px){.topbar-title h1{max-width:calc(100vw - 154px)}.global-search-trigger,.notification-bell,.mobile-menu{width:42px;height:42px;padding:0}.summary-grid,.dashboard-summary-grid,.report-kpis{grid-template-columns:1fr 1fr}.dashboard-quick-actions>*{flex-basis:100%}.project-identity{display:grid;grid-template-columns:auto minmax(0,1fr)}.project-identity .hero-badges{grid-column:1/-1}.hero-actions>*{flex-basis:100%}.recovery-code-grid{grid-template-columns:1fr}.secret-key-row{align-items:stretch;flex-direction:column}.document-item-actions>*{flex:1}.search-page-bar{display:grid;grid-template-columns:auto minmax(0,1fr)}.search-page-bar .button{grid-column:1/-1}.search-result-row{padding:12px}.search-result-arrow{display:none}.auth-intro>p:last-child{display:none}}

@media(hover:hover){.primary-button:not(:disabled):hover{filter:brightness(.96);transform:translateY(-1px)}.secondary-button:not(:disabled):hover,.icon-button:not(:disabled):hover,.ghost-button:not(:disabled):hover{border-color:#c8d2e1;background:#f8fafc}.project-card:hover,.note-card:hover,.document-item:hover,.dashboard-metric-card:hover{transform:translateY(-1px);box-shadow:0 14px 34px rgba(23,32,51,.09)}}

@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
@media(max-width:760px){.app-dialog{width:100%;max-width:none;max-height:92dvh;margin:auto 0 0;border-radius:18px 18px 0 0}.app-dialog::backdrop{background:rgba(15,23,42,.58)}.dialog-close-row{position:sticky;top:0;z-index:2;background:#fff}.dialog-form{max-height:calc(92dvh - 52px);overflow:auto;padding:4px 16px calc(18px + env(safe-area-inset-bottom))}.dialog-actions{position:sticky;bottom:0;margin:8px -16px calc(-18px - env(safe-area-inset-bottom));padding:12px 16px calc(12px + env(safe-area-inset-bottom));background:rgba(255,255,255,.97);border-top:1px solid var(--line)}.dialog-actions>*{flex:1}.note-editor-dialog{width:100%;height:100dvh;max-height:none;margin:0;border-radius:0}.note-dialog-header{padding-top:max(10px,env(safe-area-inset-top))}.note-dialog-footer{padding-bottom:max(12px,env(safe-area-inset-bottom))}.comment-create-dialog textarea{min-height:150px}}

/* Stage 18 Fix 1 — restored brand and modern sidebar icon system */
.sidebar-head{position:relative;display:block}
.brand{display:flex;align-items:center;gap:12px;padding:0 8px 24px;min-width:0;text-decoration:none;color:inherit}
.brand>div:last-child{min-width:0}
.brand strong,.brand span{display:block}
.brand strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.brand span{font-size:12px;color:#9eabc0;margin-top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.brand-mark{flex:0 0 38px;width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:#4776e6;color:#fff;font-weight:800;letter-spacing:-.02em;box-shadow:0 8px 20px rgba(71,118,230,.22)}
.nav-icon{width:22px;height:22px;display:grid;place-items:center;flex:0 0 22px;text-align:center}
.nav-icon svg{width:20px;height:20px;display:block;overflow:visible}
.nav-item{transition:background-color .16s ease,color .16s ease,transform .16s ease}
.nav-item.is-active .nav-icon svg{stroke-width:2.1}
.nav-item:hover .nav-icon{transform:translateY(-.5px)}
.sidebar-close svg,.logout-button svg{width:20px;height:20px;display:block}
.logout-button{display:grid;place-items:center}
@media(max-width:760px){
    .sidebar-head{position:sticky;top:0;z-index:2;margin:-8px -4px 8px;padding:8px 4px;background:linear-gradient(180deg,var(--sidebar),rgba(24,34,51,.96))}
    .brand{padding:0 48px 14px 8px}
    .sidebar-close{position:absolute;right:4px;top:5px}
}


/* Production Fix — task checklists and progress rollups */
.task-checklist-panel{margin-top:22px}.task-progress-number{font-size:24px}.task-checklist-progress{margin-bottom:16px}.checklist-add-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;margin-bottom:14px}.checklist-add-form input,.checklist-edit input{min-height:42px;border:1px solid var(--border-color);border-radius:10px;padding:0 12px;font:inherit}.checklist-list{display:grid}.checklist-item{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid var(--border-color)}.checklist-item:last-child{border-bottom:0}.checklist-toggle{width:28px;height:28px;border-radius:8px;border:2px solid #cbd5e1;background:#fff;color:#fff;font-weight:900;cursor:pointer}.checklist-item.is-completed .checklist-toggle{background:#16a34a;border-color:#16a34a}.checklist-edit{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px}.checklist-item.is-completed .checklist-edit input{text-decoration:line-through;color:#94a3b8;background:#f8fafc}.task-inline-progress{display:flex;align-items:center;gap:8px;margin-top:7px;max-width:220px}.task-inline-progress>span{height:6px;flex:1;background:#e8edf5;border-radius:999px;overflow:hidden}.task-inline-progress i{display:block;height:100%;background:#4f7ee8;border-radius:999px}.task-inline-progress b{font-size:11px;color:#64748b;min-width:32px;text-align:right}@media(max-width:700px){.checklist-add-form{grid-template-columns:1fr}.checklist-item{grid-template-columns:auto minmax(0,1fr)}.checklist-item>form:last-child{grid-column:2}.checklist-edit{grid-template-columns:1fr}.task-inline-progress{max-width:none}}

/* Production Fix 2 — task page block order only. */
.task-detail-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:18px;align-items:start}
.task-detail-pair>.panel,.task-detail-pair>.task-collaboration-grid{margin:0;min-width:0}
.task-detail-pair>.task-collaboration-grid{display:block}
.task-detail-pair>.task-collaboration-grid>.panel{margin:0}
.task-dependencies-row{margin-top:18px}
.task-dependencies-row>.panel{margin:0}
.checklist-edit input[readonly]{border-color:transparent;background:transparent;box-shadow:none;padding-left:0;cursor:default}
.checklist-edit.is-editing input{border-color:var(--border-color);background:#fff;padding-left:12px;cursor:text}
@media(max-width:760px){.task-detail-pair{grid-template-columns:1fr}.task-dependencies-row{margin-top:14px}}

/* Production Fix 3 — compact checklist controls and task block order */
.checklist-edit{grid-template-columns:minmax(0,1fr) repeat(3,32px)}
.icon-action-button{position:relative;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:1px solid var(--border-color);border-radius:9px;background:#fff;color:#64748b;cursor:pointer;transition:background .15s ease,border-color .15s ease,color .15s ease,transform .15s ease}
.icon-action-button svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.icon-action-button:hover{background:#f1f5f9;border-color:#cbd5e1;color:#1e293b;transform:translateY(-1px)}
.icon-action-button.is-success{color:#15803d}
.icon-action-button.is-success:hover{background:#f0fdf4;border-color:#86efac;color:#166534}
.icon-action-button.is-danger{color:#dc2626}
.icon-action-button.is-danger:hover{background:#fef2f2;border-color:#fecaca;color:#b91c1c}
.icon-action-button[hidden]{display:none!important}
.icon-action-button::after{content:attr(data-tooltip);position:absolute;left:50%;bottom:calc(100% + 8px);transform:translateX(-50%) translateY(2px);z-index:30;padding:5px 8px;border-radius:6px;background:#0f172a;color:#fff;font-size:11px;font-weight:600;line-height:1;white-space:nowrap;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .15s ease,transform .15s ease,visibility .15s ease}
.icon-action-button::before{content:"";position:absolute;left:50%;bottom:calc(100% + 3px);transform:translateX(-50%);z-index:30;border:5px solid transparent;border-top-color:#0f172a;opacity:0;visibility:hidden;transition:opacity .15s ease,visibility .15s ease}
.icon-action-button:hover::after,.icon-action-button:focus-visible::after,.icon-action-button:hover::before,.icon-action-button:focus-visible::before{opacity:1;visibility:visible;transform:translateX(-50%) translateY(0)}
.task-history-row{margin-top:18px}
.task-history-row>.panel{margin:0}
@media(max-width:700px){.checklist-edit{grid-template-columns:minmax(0,1fr) repeat(3,32px)}.checklist-item>form:last-child{grid-column:auto}.icon-action-button::after,.icon-action-button::before{display:none}}


/* Production Feature 7-8 — status flow and interactive scheduling */
.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}
.task-status-inline-form{margin:0}.status-select{appearance:none;border:1px solid rgba(255,255,255,.18);border-radius:999px;padding:6px 30px 6px 12px;font:700 12px/1.1 inherit;color:inherit;background-color:rgba(255,255,255,.9);background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,transparent 50%);background-position:calc(100% - 14px) 50%,calc(100% - 10px) 50%;background-size:4px 4px,4px 4px;background-repeat:no-repeat;cursor:pointer}.task-hero-actions{align-items:stretch}.task-hero-actions form,.task-hero-actions a{width:100%}.task-hero-actions button{width:100%}
.calendar-heading-actions{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap}.calendar-fullscreen-button{white-space:nowrap}.calendar-fullscreen-open{overflow:hidden}.calendar-panel.is-calendar-fullscreen{position:fixed;inset:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));z-index:1000;margin:0!important;overflow:auto;background:var(--surface,#fff);box-shadow:0 24px 80px rgba(15,23,42,.32);border-radius:18px;padding:18px}.calendar-panel.is-calendar-fullscreen .planner-calendar{min-height:calc(100dvh - 260px)}
.fc-event.calendar-status-waiting,.pp-timeline-row.is-muted-status .pp-timeline-bar,.pp-timeline-bar.is-muted-status{opacity:var(--muted-task-opacity,.6)}.pp-timeline-bar[data-timeline-drag-id]{cursor:grab;touch-action:none}.pp-timeline-bar[data-timeline-drag-id].is-dragging{cursor:grabbing;z-index:15;filter:drop-shadow(0 8px 12px rgba(15,23,42,.25));transition:none!important}.fc-event{cursor:grab}.fc-event:active{cursor:grabbing}
@media(max-width:760px){.calendar-heading-actions{width:100%;display:grid}.calendar-heading-actions .calendar-filters{width:100%}.calendar-panel.is-calendar-fullscreen{inset:0;border-radius:0;padding:14px}.calendar-panel.is-calendar-fullscreen .planner-calendar{min-height:calc(100dvh - 300px)}}


/* Production UX Fix: visible task status selector */
.task-status-detail-form{margin:0;display:flex;justify-content:flex-end}
.task-status-detail-select{min-width:170px;max-width:100%;min-height:36px;padding:7px 34px 7px 12px;border:1px solid #cfd8e6;border-radius:10px;background:#fff;color:#172033;font:700 13px/1.2 inherit;cursor:pointer}
.task-status-detail-select:focus{outline:3px solid rgba(71,118,230,.18);border-color:#4776e6}
.status-badge{display:inline-flex;align-items:center;border-radius:999px;padding:5px 10px;background:#eef3fb;color:#41516a;font-size:12px;font-weight:800}

/* Unified application popups */
.app-popup-dialog{width:min(460px,calc(100vw - 28px));padding:0;border:0;border-radius:18px;background:transparent;box-shadow:none}
.app-popup-dialog::backdrop{background:rgba(15,23,42,.48);backdrop-filter:blur(3px)}
.app-popup-card{display:grid;grid-template-columns:44px minmax(0,1fr);gap:14px;padding:22px;border-radius:18px;background:#fff;box-shadow:0 24px 80px rgba(15,23,42,.28)}
.app-popup-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:13px;background:#eef4ff;color:#4776e6;font-size:22px;font-weight:900}
.app-popup-copy h2{margin:1px 0 7px;font-size:19px;color:#172033}
.app-popup-copy p{margin:0;color:#66748a;line-height:1.5;white-space:pre-line}
.app-popup-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:10px;margin-top:4px}
.app-popup-dialog.is-alert .app-popup-icon{background:#edf8f2;color:#1c9a5f}

/* Planner drag/click separation and fullscreen fitting */
.timeline-drag-active,.timeline-drag-active *{user-select:none!important}
.pp-timeline-bar[data-timeline-drag-id]{-webkit-user-drag:none}
.calendar-panel.is-calendar-fullscreen .timeline-planner{width:100%}
.calendar-panel.is-calendar-fullscreen .pp-timeline-shell{width:100%;max-width:none}
.calendar-panel.is-calendar-fullscreen .pp-timeline-table{min-width:100%}
@media(max-width:700px){
  .task-status-detail-select{min-width:140px}
  .app-popup-card{grid-template-columns:38px minmax(0,1fr);padding:18px}
  .app-popup-icon{width:38px;height:38px}
}

/* Production Fix 7: task deadline state badges */
.task-health-badge{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;border-radius:999px;padding:4px 8px;font-size:11px;font-weight:800;line-height:1.2;border:1px solid transparent}
.task-health-normal{background:#dcfce7;color:#166534;border-color:#bbf7d0}
.task-health-at_risk{background:#fef3c7;color:#92400e;border-color:#fde68a}
.task-health-critical{background:#fee2e2;color:#b91c1c;border-color:#fecaca}
.task-health-overdue{background:#7f1d1d;color:#fff;border-color:#7f1d1d}
.task-health-completed{background:#e0e7ff;color:#3730a3;border-color:#c7d2fe}
.task-health-unscheduled{background:#eef2f7;color:#64748b;border-color:#dbe2ea}
.goal-row>.task-health-badge{margin-left:auto}.kanban-card>.task-health-badge,.dashboard-kanban-card>.task-health-badge{width:max-content;margin-top:7px}.attention-tags .task-health-badge{font-style:normal}


/* Production Fix 8: planner controls, hierarchy and drag interaction */
.calendar-heading-actions{display:flex;align-items:flex-end;justify-content:flex-end;gap:12px;flex-wrap:wrap;min-width:0}
.calendar-heading-actions .calendar-filters{display:flex;align-items:flex-end;justify-content:flex-end;gap:8px;flex-wrap:wrap;min-width:0}
.calendar-completed-toggle{position:relative;display:inline-flex!important;align-items:center!important;gap:8px!important;min-height:38px!important;padding:7px 11px!important;border:1px solid #d9e1ec;border-radius:10px;background:#fff;color:#344054!important;font-size:12px!important;font-weight:750!important;line-height:1.25;white-space:nowrap;cursor:pointer;transition:border-color .15s,background .15s,box-shadow .15s}
.calendar-completed-toggle:hover{background:#f8faff;border-color:#b9c8de}
.calendar-completed-toggle:has(input:checked){background:#eef4ff;border-color:#b8cdf8;color:#2856bd!important;box-shadow:0 0 0 2px rgba(71,118,230,.07)}
.calendar-completed-toggle input{appearance:none;width:18px!important;height:18px!important;flex:0 0 18px;margin:0!important;border:1.5px solid #b7c3d4;border-radius:5px;background:#fff;display:grid;place-items:center}
.calendar-completed-toggle input:checked{border-color:#4776e6;background:#4776e6}
.calendar-completed-toggle input:checked::after{content:'✓';color:#fff;font-size:12px;font-weight:900;line-height:1}

.pp-timeline-icon{width:24px;height:24px;flex:0 0 24px;border-radius:7px;background:color-mix(in srgb,var(--item-color) 10%,white);color:var(--item-color)}
.pp-timeline-icon svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.pp-timeline-icon-goal{width:27px;height:27px;flex-basis:27px;border-radius:9px;background:color-mix(in srgb,var(--item-color) 15%,white);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--item-color) 28%,white)}
.pp-timeline-icon-goal svg{width:19px;height:19px;stroke-width:2.1}
.pp-timeline-goal-row .pp-timeline-copy strong{font-size:14px;font-weight:850;color:#172033}
.pp-timeline-task .pp-timeline-copy strong{font-size:13px;font-weight:650;color:#344054}
.pp-timeline-task-child .pp-timeline-label{padding-left:55px}
.pp-timeline-goal-bar{height:32px;border-width:2px;background:color-mix(in srgb,var(--item-color) 14%,white);box-shadow:0 3px 8px color-mix(in srgb,var(--item-color) 18%,transparent)}
.pp-timeline-task-bar{height:25px;border-width:1px;box-shadow:0 1px 4px rgba(15,23,42,.08)}
.pp-timeline-bar[data-timeline-drag-id]{cursor:grab;touch-action:none;-webkit-user-select:none;user-select:none}
.pp-timeline-bar[data-timeline-drag-id].is-dragging{cursor:grabbing}

@media(max-width:1100px){
  .calendar-heading{align-items:flex-start}
  .calendar-heading-actions{width:100%;justify-content:flex-start}
  .calendar-heading-actions .calendar-filters{justify-content:flex-start;width:100%}
}
@media(max-width:760px){
  .calendar-heading-actions .calendar-filters{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .calendar-heading-actions .calendar-filters>label:not(.calendar-completed-toggle){grid-column:span 1}
  .calendar-completed-toggle{grid-column:1/-1;width:100%;white-space:normal}
}

/* Production Fix 10 — task status inside timeline analysis */
.timeline-analysis-heading{align-items:flex-start;gap:18px}
.timeline-analysis-actions{display:flex;align-items:flex-end;justify-content:flex-end;gap:12px;flex-wrap:wrap}
.timeline-task-status{display:flex;flex-direction:column;align-items:flex-start;gap:5px}
.timeline-task-status>span{font-size:12px;font-weight:700;color:#71809a}
.timeline-analysis-actions .task-status-detail-form{justify-content:flex-start}
@media (max-width:760px){
  .timeline-analysis-heading{align-items:stretch}
  .timeline-analysis-actions{justify-content:space-between;align-items:flex-end;width:100%}
  .timeline-task-status{min-width:0;flex:1}
  .timeline-task-status .task-status-detail-select{width:100%;min-width:0}
}

/* Production Fix 11 — localized activity, timeline status row, equal primary cards */
.task-detail-pair-primary{align-items:stretch}
.task-detail-pair-primary>.panel{height:100%;box-sizing:border-box}
.task-detail-pair-primary>.timeline-analysis-panel{display:flex;flex-direction:column}
.timeline-state-help{margin-bottom:14px}
.timeline-status-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:auto;padding:13px 14px;border:1px solid #dce4ef;border-radius:12px;background:#f8fafc}
.timeline-status-row-label{display:flex;align-items:center;gap:9px;min-width:0;color:#344054;font-size:13px}
.timeline-status-indicator{width:9px;height:9px;flex:0 0 9px;border-radius:50%;background:#4776e6;box-shadow:0 0 0 4px rgba(71,118,230,.1)}
.timeline-status-row .task-status-detail-form{justify-content:flex-end}
.timeline-status-row .task-status-detail-select{min-width:190px;background-color:#fff}
@media(max-width:760px){
  .timeline-status-row{align-items:stretch;flex-direction:column;gap:9px}
  .timeline-status-row .task-status-detail-form,.timeline-status-row label{width:100%}
  .timeline-status-row .task-status-detail-select{width:100%;min-width:0}
}


/* Production Fix 12 — compact checklist action, framed comments, collapsible history and list actions */
.checklist-add-form{align-items:center}.checklist-add-button{width:38px;height:38px;border-radius:11px}.icon-action-button.is-primary{background:#4776e6;border-color:#4776e6;color:#fff}.icon-action-button.is-primary:hover{background:#3868d4;border-color:#3868d4}.comment-card{--comment-accent:#4f77e6}.task-comments-panel .comment-card{padding:14px 16px;border:1px solid color-mix(in srgb,var(--comment-accent) 30%,#dbe3ef);border-left:4px solid var(--comment-accent);border-radius:13px;background:color-mix(in srgb,var(--comment-accent) 4%,#fff);box-shadow:0 4px 14px rgba(15,23,42,.04)}.task-comments-panel .comment-list{gap:12px}.comment-color-picker{display:flex;align-items:center;gap:8px;border:0;padding:0;margin:10px 0 2px}.comment-color-picker legend{float:left;margin-right:4px;color:var(--muted-text);font-size:11px;font-weight:700}.comment-color-picker label{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:999px;cursor:pointer}.comment-color-picker input{position:absolute;opacity:0;pointer-events:none}.comment-color-picker span{display:block;width:20px;height:20px;border-radius:50%;background:var(--swatch);box-shadow:0 0 0 2px #fff,0 0 0 3px #d7dfeb}.comment-color-picker input:checked+span{box-shadow:0 0 0 3px #fff,0 0 0 5px var(--swatch)}.task-history-panel{padding:0;overflow:hidden}.task-history-summary{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 22px;cursor:pointer;list-style:none}.task-history-summary::-webkit-details-marker{display:none}.task-history-summary h2{margin:2px 0 0}.task-history-summary .eyebrow{margin:0}.task-history-chevron{width:10px;height:10px;border-right:2px solid #64748b;border-bottom:2px solid #64748b;transform:rotate(45deg);transition:transform .18s ease}.task-history-panel[open] .task-history-chevron{transform:rotate(225deg)}.task-history-content{padding:0 22px 22px;border-top:1px solid var(--border-color)}.task-history-content .activity-filters{padding-top:16px}.list-page-heading{align-items:center}.list-page-actions{flex-wrap:wrap;justify-content:flex-end}.list-create-dialog{width:min(500px,calc(100vw - 28px))}.dashboard-week-table.is-workweek .dashboard-week-row{grid-template-columns:var(--dashboard-label) calc(5 * var(--dashboard-day))}.dashboard-week-table.is-workweek .dashboard-week-days,.dashboard-week-table.is-workweek .dashboard-week-grid{grid-template-columns:repeat(5,var(--dashboard-day));width:calc(5 * var(--dashboard-day))}.dashboard-week-event.is-muted-status{opacity:var(--dashboard-muted-opacity,.6)}
@media(max-width:700px){.list-page-actions{width:100%;display:grid;grid-template-columns:1fr}.list-page-actions>*{width:100%}.task-history-summary{padding:16px}.task-history-content{padding:0 16px 16px}.comment-color-picker{flex-wrap:wrap}}

/* Production Fix 13 — board picker, project counters, notes, sorting, completed groups and dependencies */
.board-toolbar-heading{align-items:flex-end;gap:18px}.board-project-picker{position:relative;display:grid;grid-template-columns:42px minmax(190px,300px) 22px;align-items:center;gap:10px;min-width:min(100%,360px);padding:9px 12px;border:1px solid #d9e1ec;border-radius:14px;background:linear-gradient(180deg,#fff,#f8fafc);box-shadow:0 6px 18px rgba(30,45,70,.07)}.board-project-picker:focus-within{border-color:#8aa9ef;box-shadow:0 0 0 4px rgba(71,118,230,.11),0 8px 22px rgba(30,45,70,.08)}.board-project-picker-icon{width:38px;height:38px;display:grid;place-items:center;border-radius:11px;background:color-mix(in srgb,var(--picker-color) 15%,white);color:var(--picker-color)}.board-project-picker-icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.board-project-picker label{display:grid;gap:2px;min-width:0}.board-project-picker label>span{font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:#7a8798}.board-project-picker select{appearance:none;width:100%;min-height:auto;padding:0 20px 0 0;border:0;background:transparent;font:inherit;font-size:14px;font-weight:750;color:var(--text);outline:0;cursor:pointer;text-overflow:ellipsis}.board-project-picker-chevron{font-size:18px;color:#718096;pointer-events:none}
.project-card-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin-top:16px}.project-card-stats>span{display:grid;grid-template-columns:20px 1fr;grid-template-rows:auto auto;column-gap:6px;align-items:center;min-width:0;padding:8px 7px;border:1px solid #e3e8f0;border-radius:10px;background:#f8fafc}.project-card-stats svg{grid-row:1/3;width:19px;height:19px;fill:none;stroke:var(--project-color);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.project-card-stats b{font-size:13px;line-height:1}.project-card-stats small{font-size:8px;line-height:1.2;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.note-card-preview{position:relative;flex:1;max-height:132px;overflow:hidden;color:#465266;font-size:12px;line-height:1.48;mask-image:linear-gradient(to bottom,#000 78%,transparent)}.note-card-preview h1,.note-card-preview h2,.note-card-preview h3{margin:0 0 7px;color:var(--text);line-height:1.25}.note-card-preview h1{font-size:16px}.note-card-preview h2{font-size:14px}.note-card-preview h3{font-size:13px}.note-card-preview p{display:block;min-height:0;margin:0 0 6px;color:inherit;font-size:inherit;line-height:inherit;-webkit-line-clamp:unset;overflow:visible}.note-card-preview blockquote{margin:5px 0;padding:5px 8px;border-left:3px solid var(--note-color);background:#f6f8fb;border-radius:0 6px 6px 0}.note-card-preview pre{margin:5px 0;padding:7px;border-radius:7px;background:#172033;color:#eef3ff;overflow:hidden}.note-card-preview code{font-size:11px}.note-card-actions{display:flex;justify-content:flex-end;gap:7px;padding:9px 12px;border-top:1px solid #e6ebf2;background:#fbfcfe}.note-card-actions form{margin:0}.note-card-action{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:34px;padding:7px 10px;border:1px solid #dce3ed;border-radius:9px;background:#fff;color:#48566a;font:inherit;font-size:11px;font-weight:750;cursor:pointer;text-decoration:none}.note-card-action:hover{border-color:#bdc9da;background:#f5f8fc;color:#315fc9}.note-card-action svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.settings-sorting-card{display:grid;grid-template-columns:minmax(210px,.72fr) minmax(0,1.6fr);gap:22px;align-items:start;margin-top:20px;padding:18px;border:1px solid #dfe6ef;border-radius:14px;background:linear-gradient(135deg,#f8faff,#fff)}.settings-sorting-card h4{margin:4px 0 6px;font-size:16px}.settings-sorting-card .muted-text{margin:0}.settings-sorting-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.completed-items-section{margin-top:16px;border:1px solid #dfe5ee;border-radius:12px;background:#f8fafc;overflow:hidden}.completed-items-section>summary{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 15px;cursor:pointer;font-size:13px;font-weight:800;color:#536176;list-style:none}.completed-items-section>summary::-webkit-details-marker{display:none}.completed-items-section>summary:before{content:'›';font-size:20px;line-height:1;transition:transform .15s}.completed-items-section[open]>summary:before{transform:rotate(90deg)}.completed-items-section>summary span{flex:1}.completed-items-section>summary strong{min-width:28px;padding:4px 8px;border-radius:999px;background:#e5ebf4;color:#536176;text-align:center;font-size:11px}.completed-items-list{padding:0 12px 12px;border-top:1px solid #e4e9f0}.completed-items-list .goal-row{background:#fff}
.task-dependencies-panel{position:relative}.dependency-panel-help{margin:-5px 0 14px;line-height:1.5}.task-dependency-list{display:grid;gap:9px}.task-dependency-card{display:grid;grid-template-columns:40px minmax(0,1fr) auto 20px;align-items:center;gap:11px;padding:11px 12px;border:1px solid #dfe5ee;border-radius:12px;background:linear-gradient(180deg,#fff,#fafbfd);color:inherit;text-decoration:none;transition:border-color .15s,box-shadow .15s,transform .15s}.task-dependency-card:hover{border-color:#bfcce0;box-shadow:0 7px 18px rgba(31,45,67,.07);transform:translateY(-1px)}.task-dependency-icon{width:38px;height:38px;display:grid;place-items:center;border-radius:11px;background:#edf3ff;color:#4776e6}.task-dependency-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.task-dependency-copy{display:grid;gap:3px;min-width:0}.task-dependency-copy strong{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.task-dependency-copy small{font-size:10px;color:var(--muted)}.task-dependency-arrow{color:#8a96a8;font-weight:800}
.project-tab-panel.calendar-panel .calendar-heading-actions{max-width:min(100%,860px)}.project-tab-panel.calendar-panel .calendar-display-options{justify-content:flex-end}
@media(max-width:1100px){.project-card-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.settings-sorting-card{grid-template-columns:1fr}.settings-sorting-grid{grid-template-columns:repeat(3,minmax(150px,1fr));overflow-x:auto;padding-bottom:3px}}
@media(max-width:760px){.board-toolbar-heading{align-items:stretch}.board-project-picker{width:100%;min-width:0;grid-template-columns:38px minmax(0,1fr) 20px}.project-card-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.note-card-actions{justify-content:stretch}.note-card-action{flex:1}.settings-sorting-grid{grid-template-columns:1fr;overflow:visible}.task-dependency-card{grid-template-columns:36px minmax(0,1fr) auto}.task-dependency-card .status-badge{grid-column:2}.task-dependency-arrow{display:none}.project-tab-panel.calendar-panel .calendar-heading-actions{width:100%}}

/* Production Fix 13.2: polished dependency picker in task create/edit form */
.task-dependency-form-field{
    padding:16px;
    border:1px solid #dfe5ee;
    border-radius:16px;
    background:linear-gradient(180deg,#fbfcff 0%,#f7f9fc 100%);
}
.task-dependency-form-heading{
    display:flex;
    align-items:center;
    gap:9px;
    color:var(--text);
    font-weight:800;
}
.task-dependency-form-count{
    min-width:24px;
    height:24px;
    display:inline-grid;
    place-items:center;
    padding:0 7px;
    border-radius:999px;
    background:#eaf0ff;
    color:#3f68ca;
    font-size:11px;
    font-weight:800;
}
.task-dependency-form-help{margin:6px 0 13px}
.task-dependency-form-picker{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:9px;
    max-height:340px;
    overflow:auto;
    padding:2px 4px 2px 2px;
    scrollbar-width:thin;
}
.task-dependency-form-option{
    position:relative;
    display:grid;
    grid-template-columns:22px 38px minmax(0,1fr);
    align-items:center;
    gap:10px;
    min-width:0;
    padding:11px 12px;
    border:1px solid #dfe5ee;
    border-radius:13px;
    background:#fff;
    cursor:pointer;
    transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease,background .16s ease;
}
.task-dependency-form-option:hover{
    border-color:#bdc9dc;
    box-shadow:0 7px 20px rgba(31,45,67,.07);
    transform:translateY(-1px);
}
.task-dependency-form-option:has(input:focus-visible){
    outline:3px solid rgba(79,119,230,.18);
    outline-offset:2px;
}
.task-dependency-form-option:has(input:checked){
    border-color:#7697ea;
    background:linear-gradient(180deg,#f8faff,#f1f5ff);
    box-shadow:0 0 0 2px rgba(79,119,230,.09);
}
.task-dependency-form-option>input{
    position:absolute;
    width:1px;
    height:1px;
    opacity:0;
    pointer-events:none;
}
.task-dependency-form-check{
    width:21px;
    height:21px;
    display:grid;
    place-items:center;
    border:1.5px solid #c8d0dc;
    border-radius:7px;
    background:#fff;
    color:transparent;
    transition:.16s ease;
}
.task-dependency-form-check svg{
    width:15px;
    height:15px;
    fill:none;
    stroke:currentColor;
    stroke-width:2.4;
    stroke-linecap:round;
    stroke-linejoin:round;
}
.task-dependency-form-option:has(input:checked) .task-dependency-form-check{
    border-color:#4f77e6;
    background:#4f77e6;
    color:#fff;
}
.task-dependency-form-icon{
    width:38px;
    height:38px;
    display:grid;
    place-items:center;
    border-radius:11px;
    background:color-mix(in srgb,var(--dependency-accent) 12%,#fff);
    color:var(--dependency-accent);
}
.task-dependency-form-icon svg{
    width:20px;
    height:20px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round;
}
.task-dependency-form-copy{
    display:grid;
    gap:6px;
    min-width:0;
}
.task-dependency-form-copy>strong{
    overflow:hidden;
    color:var(--text);
    font-size:13px;
    line-height:1.35;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.task-dependency-form-meta{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:5px;
    min-width:0;
}
.task-dependency-form-meta .status-badge,
.task-dependency-form-meta .priority-badge{
    padding:4px 7px;
    font-size:9px;
    line-height:1;
}
.task-dependency-form-goal,
.task-dependency-form-date{
    max-width:150px;
    overflow:hidden;
    color:var(--muted);
    font-size:10px;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.task-dependency-form-goal::before{content:"◎ ";color:#7584a0}
.task-dependency-form-date{
    display:inline-flex;
    align-items:center;
    gap:4px;
}
.task-dependency-form-date svg{
    width:12px;
    height:12px;
    flex:0 0 auto;
    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round;
}
.task-dependency-form-empty{
    margin:0;
    padding:17px;
    border:1px dashed #ced6e2;
    border-radius:12px;
    background:#fff;
    text-align:center;
}
@media(max-width:860px){
    .task-dependency-form-picker{grid-template-columns:1fr}
}
@media(max-width:520px){
    .task-dependency-form-field{padding:13px}
    .task-dependency-form-option{grid-template-columns:22px 34px minmax(0,1fr);padding:10px}
    .task-dependency-form-icon{width:34px;height:34px}
    .task-dependency-form-meta .priority-badge{display:none}
}

/* Production Fix 13.4 — project-colored tab count badges */
.project-tabs a{display:inline-flex;align-items:center;gap:7px}
.project-tabs .project-tab-count{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:21px;
    height:21px;
    padding:0 6px;
    border-radius:999px;
    background:var(--project-color,#5b7cfa);
    color:#fff;
    font-size:11px;
    font-weight:800;
    line-height:1;
    letter-spacing:0;
    box-shadow:0 1px 3px rgba(20,31,52,.18);
    flex:0 0 auto;
}
.project-tabs a:hover .project-tab-count,
.project-tabs a:focus-visible .project-tab-count{filter:brightness(.96)}
.project-tabs a.is-active .project-tab-count{box-shadow:0 0 0 2px rgba(255,255,255,.72),0 1px 4px rgba(20,31,52,.2)}

/* Production Fix 15: Projects default tab and status counters */
.settings-list-preferences-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.settings-default-project-tab{grid-column:1/-1;padding:13px;border:1px solid #dfe6ef;border-radius:12px;background:#fff}.settings-default-project-tab small{margin-top:6px;color:var(--muted);line-height:1.4}.project-status-tabs{align-items:center}.project-status-tab{display:inline-flex;align-items:center;gap:7px}.project-status-count{min-width:21px;height:21px;display:inline-grid;place-items:center;padding:0 6px;border-radius:999px;background:#dfe5ee;color:#526174;font-size:10px;font-weight:850;line-height:1;box-sizing:border-box;transition:background .15s,color .15s,transform .15s}.project-status-tab:hover .project-status-count,.project-status-tab.is-active .project-status-count{transform:translateY(-1px)}.project-status-count-all{background:#dfe6f1;color:#4d5e76}.project-status-count-planning{background:#e5eaf2;color:#5b687a}.project-status-count-active{background:#dcefe5;color:#2f7558}.project-status-count-on_hold{background:#ffedd2;color:#96601f}.project-status-count-completed{background:#dde7ff;color:#4166b4}.project-status-count-archived{background:#e9e4f0;color:#6f6380}.project-status-tab.is-active .project-status-count{box-shadow:0 0 0 2px #fff,0 0 0 3px currentColor}
@media(max-width:760px){.settings-list-preferences-grid{grid-template-columns:1fr}.settings-default-project-tab{grid-column:auto}.project-status-tab{padding-inline:10px}}


/* Production Fix 16: settings structure, project logos and planner goal hierarchy */
.project-logo,
.project-hero-logo{
  object-fit:contain;
  object-position:center;
  padding:6px;
  box-sizing:border-box;
  background:#fff;
}
.logo-preview img{
  object-fit:contain;
  object-position:center;
  padding:8px;
  box-sizing:border-box;
  background:#fff;
}

#lists .settings-list-preferences-grid{
  margin-top:2px;
}

.pp-timeline-icon-goal{
  width:24px;
  height:24px;
  flex-basis:24px;
  border-radius:7px;
  background:#f2f4f7;
  color:#667085;
  box-shadow:inset 0 0 0 1px #d8dee8;
}
.pp-timeline-icon-goal svg{
  width:16px;
  height:16px;
  stroke-width:1.8;
}
.pp-timeline-goal-row .pp-timeline-copy strong{
  font-size:13px;
  font-weight:600;
  color:#526174;
}
.pp-timeline-task .pp-timeline-copy strong{
  font-size:13px;
  font-weight:700;
  color:#263244;
}
.pp-timeline-goal-row .pp-timeline-label{
  background:#fcfcfd;
}

/* Production Fix 17: background tasks */
.task-background-toggle{
  align-self:stretch;
  min-height:76px;
  border:1px solid #dce4ef;
  border-radius:12px;
  background:#f8fafc;
}
.task-background-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:25px;
  padding:4px 10px;
  border:1px solid #c8d6ee;
  border-radius:999px;
  background:#eef4ff;
  color:#3b5f9d;
  font-size:11px;
  font-weight:800;
  line-height:1;
  white-space:nowrap;
}
.task-background-badge.is-compact{
  min-height:19px;
  margin-left:7px;
  padding:3px 7px;
  font-size:9px;
  font-style:normal;
  vertical-align:middle;
}
.task-health-background{
  border-color:#c8d6ee;
  background:#eef4ff;
  color:#3b5f9d;
}
.background-task-analysis-panel{
  display:flex;
  flex-direction:column;
}
.background-task-callout{
  display:flex;
  align-items:flex-start;
  gap:13px;
  margin:4px 0 18px;
  padding:16px;
  border:1px solid #d8e3f4;
  border-radius:14px;
  background:linear-gradient(135deg,#f7faff,#eef4ff);
}
.background-task-callout-icon{
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  flex:0 0 38px;
  border-radius:11px;
  background:#fff;
  color:#4776e6;
  box-shadow:0 3px 10px rgba(71,118,230,.12);
}
.background-task-callout-icon svg{
  width:21px;
  height:21px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.background-task-callout strong{display:block;margin-bottom:4px;color:#24324a}
.background-task-callout p{margin:0;color:#687890;font-size:12px;line-height:1.5}

.fc .fc-event.is-background-task,
.fc .fc-event.calendar-background-task{
  opacity:.56;
  border-style:dashed!important;
  box-shadow:none!important;
}
.fc .fc-event.is-background-task .planner-event-content,
.fc .fc-event.calendar-background-task .planner-event-content{
  min-height:15px;
  font-size:10px;
}
.pp-timeline-row.is-background-task .pp-timeline-label{opacity:.68}
.pp-timeline-bar.is-background-task{
  height:13px!important;
  opacity:.56;
  border-style:dashed;
  border-width:1px;
  box-shadow:none;
}
.pp-timeline-bar.is-background-task .pp-timeline-bar-title{
  font-size:9px;
  line-height:11px;
}
.dashboard-week-event.is-background-task{
  height:16px;
  opacity:.56;
  border-style:dashed;
  box-shadow:none;
  font-size:10px;
  font-weight:650;
}
@media(max-width:700px){
  .task-background-toggle{grid-column:1/-1}
  .background-task-callout{padding:13px}
}

/* Production Fix 18 — status-accurate dashboard task flow. */
.dashboard-task-flow-section{display:grid;gap:14px;min-width:0}
.dashboard-task-flow-heading{margin-bottom:0}
.dashboard-task-flow-actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.dashboard-task-flow-total{display:inline-flex;align-items:center;min-height:30px;padding:0 11px;border:1px solid #dbe3ee;border-radius:999px;background:#fff;color:#526079;font-size:12px;font-weight:800;white-space:nowrap}
.dashboard-task-flow-grid{display:grid;grid-template-columns:repeat(5,minmax(225px,1fr));gap:12px;overflow-x:auto;padding:2px 1px 10px;scrollbar-width:thin;scroll-snap-type:x proximity}
.dashboard-task-lane{--lane-color:#64748b;min-width:225px;border:1px solid #dfe5ed;border-radius:16px;background:#f8fafc;overflow:hidden;scroll-snap-align:start;box-shadow:0 5px 18px rgba(15,23,42,.035)}
.dashboard-task-lane-planned{--lane-color:#64748b}
.dashboard-task-lane-ready{--lane-color:#3974de}
.dashboard-task-lane-in_progress{--lane-color:#d99016}
.dashboard-task-lane-waiting{--lane-color:#7964db}
.dashboard-task-lane-blocked{--lane-color:#d44747}
.dashboard-task-lane-header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:13px 14px;border-bottom:1px solid color-mix(in srgb,var(--lane-color) 18%,#dfe5ed);background:color-mix(in srgb,var(--lane-color) 9%,#fff)}
.dashboard-task-lane-title{display:flex;align-items:center;gap:8px;color:#172033;font-size:13px;font-weight:800}
.dashboard-task-lane-title>i{width:9px;height:9px;border-radius:999px;background:var(--lane-color);box-shadow:0 0 0 4px color-mix(in srgb,var(--lane-color) 13%,transparent)}
.dashboard-task-lane-header>strong{display:inline-grid;place-items:center;min-width:25px;height:25px;padding:0 7px;border-radius:999px;background:#fff;color:color-mix(in srgb,var(--lane-color) 78%,#172033);font-size:11px;box-shadow:0 1px 4px rgba(15,23,42,.08)}
.dashboard-task-lane-list{display:grid;gap:9px;align-content:start;min-height:250px;padding:10px}
.dashboard-task-lane-empty{display:grid;place-items:center;min-height:96px;padding:14px;text-align:center;color:#8a96a9;font-size:12px}
.dashboard-task-card{display:grid;gap:8px;padding:12px;border:1px solid #e0e6ee;border-left:3px solid var(--lane-color);border-radius:11px;background:#fff;color:inherit;text-decoration:none;box-shadow:0 2px 7px rgba(15,23,42,.04);transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease}
.dashboard-task-card:hover{border-color:color-mix(in srgb,var(--lane-color) 36%,#dfe5ed);box-shadow:0 7px 18px rgba(15,23,42,.09);transform:translateY(-1px)}
.dashboard-task-card-title{display:flex;align-items:flex-start;justify-content:space-between;gap:7px;min-width:0}
.dashboard-task-card-title>strong{min-width:0;color:#172033;font-size:14px;line-height:1.32;overflow-wrap:anywhere}
.dashboard-task-card-context{display:flex;align-items:center;gap:6px;min-width:0;color:#738096;font-size:11px}
.dashboard-task-card-context>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dashboard-task-card-context>b{color:#a2adbd;font-weight:700}
.dashboard-task-card-progress{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px}
.dashboard-task-card-progress>span{height:5px;border-radius:999px;background:#e9edf3;overflow:hidden}
.dashboard-task-card-progress>span>i{display:block;height:100%;border-radius:inherit;background:var(--lane-color)}
.dashboard-task-card-progress>b{color:#66748a;font-size:10px;font-variant-numeric:tabular-nums}
.dashboard-task-card-footer{display:flex;align-items:center;justify-content:space-between;gap:7px;flex-wrap:wrap}
.dashboard-task-card-footer time{color:#6d7a90;font-size:11px;white-space:nowrap}
.dashboard-task-card-footer .task-health-badge{margin:0}
.dashboard-task-card-blocked{display:flex;align-items:center;gap:6px;padding:7px 8px;border-radius:8px;background:#fff0f0;color:#b52f2f;font-size:10px;font-weight:800}
.dashboard-task-card-blocked:before{content:"";width:7px;height:7px;border-radius:999px;background:#dc4040;box-shadow:0 0 0 3px rgba(220,64,64,.12)}
.dashboard-task-lane-more{display:flex;align-items:center;justify-content:center;min-height:34px;border:1px dashed color-mix(in srgb,var(--lane-color) 35%,#d5dde8);border-radius:9px;color:color-mix(in srgb,var(--lane-color) 80%,#263246);font-size:11px;font-weight:800;text-decoration:none;background:color-mix(in srgb,var(--lane-color) 4%,#fff)}
.dashboard-task-lane-more:hover{background:color-mix(in srgb,var(--lane-color) 9%,#fff)}
.dashboard-completed-tasks{border:1px solid #dfe8e2;border-radius:14px;background:#fbfefc;overflow:hidden}
.dashboard-completed-tasks>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;cursor:pointer;list-style:none;color:#294d36;font-size:13px;font-weight:800}
.dashboard-completed-tasks>summary::-webkit-details-marker{display:none}
.dashboard-completed-tasks>summary:after{content:"⌄";margin-left:auto;color:#60826a;font-size:16px;transition:transform .16s ease}
.dashboard-completed-tasks[open]>summary:after{transform:rotate(180deg)}
.dashboard-completed-tasks>summary>strong{display:inline-grid;place-items:center;min-width:24px;height:24px;padding:0 6px;border-radius:999px;background:#e4f4e8;color:#2f7043;font-size:11px}
.dashboard-completed-task-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;padding:0 12px 12px}
.dashboard-completed-task-card{display:grid;gap:5px;padding:10px 11px;border:1px solid #e2ebe4;border-radius:10px;background:#fff;color:inherit;text-decoration:none}
.dashboard-completed-task-card:hover{border-color:#bcd7c3;box-shadow:0 4px 12px rgba(30,87,48,.08)}
.dashboard-completed-task-card>strong{color:#34423a;font-size:12px;overflow-wrap:anywhere}
.dashboard-completed-task-card>span{display:flex;align-items:center;gap:6px;color:#738278;font-size:10px}
.dashboard-completed-task-card time{color:#8b978f;font-size:10px}
@media(max-width:1200px){.dashboard-task-flow-grid{grid-template-columns:repeat(5,minmax(250px,1fr))}.dashboard-completed-task-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.dashboard-task-flow-actions{width:100%;justify-content:space-between}.dashboard-task-flow-grid{grid-template-columns:repeat(5,minmax(84vw,1fr))}.dashboard-task-lane-list{min-height:210px}.dashboard-completed-task-grid{grid-template-columns:1fr}}

/* Production Fix 19 — completed/background bars and goal/task event stacking. */
/* Completed task bars remain visible when enabled, but are intentionally neutral. */
.fc .fc-event.calendar-bar-task.calendar-status-completed,
.pp-timeline-task-bar.is-completed-status{
  --item-color:#94a3b8!important;
  background:#eef1f5!important;
  border-color:#cbd3de!important;
  color:#667085!important;
  opacity:1!important;
  box-shadow:none!important;
}
.fc .fc-event.calendar-bar-task.calendar-status-completed .planner-event-project,
.fc .fc-event.calendar-bar-task.calendar-status-completed .planner-event-title{
  color:#667085!important;
  opacity:1!important;
}
.fc .fc-event.calendar-bar-task.calendar-status-completed .planner-event-project i{
  background:#94a3b8!important;
}
.pp-timeline-task-bar.is-completed-status .pp-timeline-bar-title{
  color:#667085!important;
}

/* Archived task bars stay visually quieter than completed ones. */
.fc .fc-event.calendar-bar-task.calendar-status-archived,
.pp-timeline-task-bar.is-archived-status{
  --item-color:#a8b0bd!important;
  background:#f3f4f6!important;
  border-color:#d8dde5!important;
  color:#7b8493!important;
  opacity:.72!important;
}

/* Background tasks should be compact, not hairline-thin. */
.fc .fc-event.is-background-task,
.fc .fc-event.calendar-background-task{
  min-height:21px!important;
  padding-block:2px!important;
}
.fc .fc-event.is-background-task .planner-event-content,
.fc .fc-event.calendar-background-task .planner-event-content{
  min-height:17px!important;
  font-size:11px!important;
  line-height:1.2!important;
}
.pp-timeline-bar.is-background-task{
  height:19px!important;
  min-height:19px!important;
}
.pp-timeline-bar.is-background-task .pp-timeline-bar-title{
  font-size:10px!important;
  line-height:17px!important;
}

/* Tasks must sit above goal bars when both occupy the same calendar dates. */
.fc .fc-event.calendar-bar-task{z-index:4!important}
.fc .fc-event.calendar-bar-goal{z-index:2!important}


/* Production Fix 20.1 — compact blocked-task markers in calendar and planner bars. */
.fc .fc-event.calendar-status-blocked .planner-event-content{
  position:relative;
  padding-right:21px;
}
.planner-event-blocked-badge,
.pp-timeline-blocked-badge,
.dashboard-week-blocked-badge{
  display:inline-grid;
  place-items:center;
  width:17px;
  height:17px;
  flex:0 0 17px;
  border:1px solid #fdba74;
  border-radius:999px;
  background:#fff7ed;
  color:#b45309;
  box-shadow:0 1px 3px rgba(120,53,15,.16);
}
.planner-event-blocked-badge svg,
.pp-timeline-blocked-badge svg,
.dashboard-week-blocked-badge svg{
  width:10px;
  height:10px;
  fill:none;
  stroke:currentColor;
  stroke-width:2.2;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.planner-event-blocked-badge{
  position:absolute;
  right:1px;
  top:50%;
  transform:translateY(-50%);
  z-index:3;
}
.pp-timeline-bar.is-blocked-status{
  position:relative;
  padding-right:25px;
}
.pp-timeline-blocked-badge{
  position:absolute;
  right:4px;
  top:50%;
  transform:translateY(-50%);
  z-index:4;
}
.dashboard-week-event.is-blocked-status{
  padding-right:29px;
}
.dashboard-week-event.is-blocked-status>span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
}
.dashboard-week-blocked-badge{
  position:absolute;
  right:6px;
  top:50%;
  transform:translateY(-50%);
}
@media(max-width:700px){
  .planner-event-blocked-badge,.pp-timeline-blocked-badge,.dashboard-week-blocked-badge{width:16px;height:16px;flex-basis:16px}
}

/* Production Fix 21 — project lifecycle and planner hierarchy controls. */
.pp-timeline-toggle{
  width:30px!important;
  height:30px!important;
  min-width:30px!important;
  min-height:30px!important;
  flex:0 0 30px!important;
  border:1px solid #cfd9e7!important;
  border-radius:10px!important;
  background:#fff!important;
  color:#53657d!important;
  box-shadow:0 1px 2px rgba(15,23,42,.04)!important;
  transition:border-color .15s ease,background .15s ease,color .15s ease,box-shadow .15s ease!important;
}
.pp-timeline-toggle:hover{
  border-color:#9fb0c7!important;
  background:#f7f9fc!important;
  color:#29415f!important;
  box-shadow:0 3px 8px rgba(15,23,42,.08)!important;
}
.pp-timeline-toggle svg{
  width:17px;
  height:17px;
  fill:none;
  stroke:currentColor;
  stroke-width:2.2;
  stroke-linecap:round;
  stroke-linejoin:round;
  transition:transform .16s ease;
}
.pp-timeline-toggle[aria-expanded="false"] svg{transform:rotate(-90deg)}

.pp-timeline-icon-goal{
  width:23px!important;
  height:23px!important;
  flex:0 0 23px!important;
  border-radius:999px!important;
  background:#f3f5f8!important;
  color:#627087!important;
  box-shadow:inset 0 0 0 1px #d8dfe8!important;
}
.pp-timeline-icon-goal svg{
  width:15px!important;
  height:15px!important;
  stroke-width:1.75!important;
}
.pp-timeline-goal-row .pp-timeline-copy strong{
  font-weight:600!important;
  color:#59677b!important;
}

.pp-timeline-project.is-project-on-hold,
.pp-timeline-project.is-project-on-hold .pp-timeline-label,
.pp-timeline-project.is-project-on-hold .pp-timeline-grid{
  background:#fffaf0!important;
}
.pp-timeline-project-status-badge{
  display:inline-grid;
  place-items:center;
  width:22px;
  height:22px;
  flex:0 0 22px;
  margin-left:auto;
  border-radius:999px;
}
.pp-timeline-project-status-badge.is-on-hold{
  border:1px solid #f1c987;
  background:#fff3d8;
  color:#9a641d;
}
.pp-timeline-project-status-badge svg{
  width:12px;
  height:12px;
  fill:currentColor;
}

/* Production Fix 22 — completed goals follow the same closed-item rules as tasks. */
.fc .fc-event.calendar-bar-goal.calendar-status-completed{
  --item-color:#94a3b8!important;
  background:#f7f8fa!important;
  border-color:#b8c1ce!important;
  color:#667085!important;
  opacity:1!important;
  box-shadow:none!important;
}
.fc .fc-event.calendar-bar-goal.calendar-status-completed .planner-event-project,
.fc .fc-event.calendar-bar-goal.calendar-status-completed .planner-event-title{
  color:#667085!important;
  opacity:1!important;
}
.fc .fc-event.calendar-bar-goal.calendar-status-completed .planner-event-project i{
  background:#94a3b8!important;
}
.pp-timeline-goal-bar.is-completed-status{
  --item-color:#94a3b8!important;
  background:#f7f8fa!important;
  border-color:#b8c1ce!important;
  color:#667085!important;
  opacity:1!important;
  box-shadow:none!important;
}
.pp-timeline-goal-bar.is-completed-status .pp-timeline-bar-title{
  color:#667085!important;
}
.pp-timeline-goal-row.is-completed-status .pp-timeline-label{
  background:#f7f8fa!important;
}
.pp-timeline-goal-row.is-completed-status .pp-timeline-copy strong{
  color:#7a8493!important;
}
.pp-timeline-goal-row.is-completed-status .pp-timeline-icon-goal{
  background:#eef1f5!important;
  color:#7a8493!important;
  box-shadow:inset 0 0 0 1px #cbd3de!important;
}
.fc .fc-event.calendar-bar-goal.calendar-status-archived,
.pp-timeline-goal-bar.is-archived-status{
  --item-color:#a8b0bd!important;
  background:#fafafa!important;
  border-color:#d8dde5!important;
  color:#7b8493!important;
  opacity:.72!important;
  box-shadow:none!important;
}
.pp-timeline-goal-row.is-archived-status{
  opacity:.72;
}

/* Production Fix 23 — project/task template workspace */
.template-type-tabs{display:flex;gap:8px;align-items:center;margin:0 0 18px;padding:5px;background:#eef1f6;border:1px solid var(--line);border-radius:14px;width:max-content;max-width:100%}
.template-type-tab{display:inline-flex;align-items:center;gap:9px;border:0;background:transparent;color:var(--muted);padding:10px 14px;border-radius:10px;font:inherit;font-weight:800;cursor:pointer}
.template-type-tab:hover,.template-type-tab.is-active{background:#fff;color:var(--text);box-shadow:0 2px 10px rgba(20,29,44,.08)}
.template-type-tab-icon{width:22px;height:22px;display:grid;place-items:center;border-radius:7px;background:#e5ebf7;color:#4b6da8;font-size:13px}
.template-type-tab.is-active .template-type-tab-icon{background:#e8f0ff;color:#315fc9}
.template-type-tab b{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 7px;border-radius:999px;background:#edf0f5;color:var(--muted);font-size:11px}
.task-template-create-panel{border-top:4px solid #6f83b7}
.task-template-source-form{grid-template-columns:minmax(180px,.9fr) minmax(240px,1.4fr) minmax(220px,1fr) auto}
.task-template-copy-note{margin:14px 0 0;padding:11px 13px;border-radius:10px;background:#f5f7fb;color:var(--muted);font-size:12px;line-height:1.5}
.task-template-card{--project-color:#7185b6}
.task-template-mark{background:#e8eef9;color:#48679f}
.task-template-properties{display:flex;flex-wrap:wrap;gap:7px;align-items:center}
.task-template-property{display:inline-flex;align-items:center;min-height:25px;padding:4px 9px;border-radius:999px;background:#f0f3f8;color:#5f6d82;font-size:11px;font-weight:800}
.task-template-create-form{grid-template-columns:1fr 1fr}
.task-template-create-form .primary-button{grid-column:1/-1}
.task-template-create-form .field small{line-height:1.45}
@media(max-width:980px){.task-template-source-form{grid-template-columns:1fr 1fr}.task-template-source-form .primary-button{grid-column:1/-1}}
@media(max-width:620px){.template-type-tabs{width:100%}.template-type-tab{flex:1;justify-content:center;padding:9px 10px}.template-type-tab-icon{display:none}.task-template-source-form,.task-template-create-form{grid-template-columns:1fr}}

/* Production Fix 24 — bulk checklist paste parsing */
.checklist-add-form{align-items:start}
.checklist-bulk-field{min-width:0;display:grid;gap:6px}
.checklist-add-form textarea{width:100%;min-height:42px;max-height:144px;border:1px solid var(--border-color);border-radius:10px;padding:10px 12px;font:inherit;line-height:1.45;resize:vertical;overflow:auto;background:#fff;color:var(--text)}
.checklist-add-form textarea:focus{outline:none;border-color:#7da0ef;box-shadow:0 0 0 3px rgba(71,118,230,.12)}
.checklist-bulk-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:18px;color:var(--muted-text)}
.checklist-bulk-meta small{font-size:11px;line-height:1.35}
.checklist-detected-count{flex:0 0 auto;font-weight:800;color:#3f6fd6}
@media(max-width:700px){.checklist-bulk-meta{align-items:flex-start;flex-direction:column;gap:3px}.checklist-add-button{justify-self:end}}

/* Production Fix 25 — reliable schedule dragging and bar edge resizing */
.pp-timeline-bar[data-timeline-drag-id]{position:relative}
.pp-timeline-resize-handle{
  position:absolute;
  top:0;
  bottom:0;
  width:10px;
  z-index:10;
  cursor:ew-resize;
  touch-action:none;
  opacity:.22;
  transition:opacity .14s ease,background .14s ease;
}
.pp-timeline-resize-handle.is-start{left:-1px;border-radius:inherit 0 0 inherit}
.pp-timeline-resize-handle.is-end{right:-1px;border-radius:0 inherit inherit 0}
.pp-timeline-resize-handle::after{
  content:"";
  position:absolute;
  top:50%;
  left:50%;
  width:2px;
  height:11px;
  border-radius:999px;
  background:currentColor;
  transform:translate(-50%,-50%);
  box-shadow:3px 0 0 currentColor;
}
.pp-timeline-bar:hover .pp-timeline-resize-handle,
.pp-timeline-resize-handle:hover,
.pp-timeline-bar.is-resizing .pp-timeline-resize-handle{opacity:.82;background:rgba(255,255,255,.28)}
.pp-timeline-bar.is-resizing{
  z-index:16!important;
  cursor:ew-resize!important;
  filter:drop-shadow(0 8px 12px rgba(15,23,42,.25));
  transition:none!important;
}
.pp-timeline-bar:has(.pp-timeline-resize-handle.is-end) .pp-timeline-blocked-badge{right:12px}

.fc .fc-event .fc-event-resizer{
  width:9px!important;
  min-width:9px!important;
  cursor:ew-resize!important;
  opacity:.28;
  z-index:8!important;
}
.fc .fc-event:hover .fc-event-resizer,
.fc .fc-event.fc-event-resizing .fc-event-resizer{opacity:.9}
.fc .fc-event .fc-event-resizer::after{
  content:"";
  position:absolute;
  top:50%;
  left:50%;
  width:2px;
  height:11px;
  border-radius:999px;
  background:currentColor;
  transform:translate(-50%,-50%);
  box-shadow:3px 0 0 currentColor;
}
.fc .fc-event .fc-event-resizer-start{left:-2px!important}
.fc .fc-event .fc-event-resizer-end{right:-2px!important}
.fc .fc-event .fc-event-resizer:hover{background:rgba(255,255,255,.32)}
@media(hover:none){.pp-timeline-resize-handle,.fc .fc-event .fc-event-resizer{opacity:.55}}

/* Production Fix 25.1 — compact wrapping checklist item text */
.checklist-edit{min-width:0;align-items:start}
.checklist-title-field{display:block;width:100%;min-width:0;min-height:32px;height:32px;margin:0;border:1px solid transparent;border-radius:9px;padding:6px 0;background:transparent;color:var(--text);font:inherit;font-size:13px;line-height:1.42;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;resize:none;overflow:hidden;box-shadow:none;cursor:default}
.checklist-edit.is-editing .checklist-title-field{min-height:38px;border-color:var(--border-color);padding:7px 10px;background:#fff;cursor:text}
.checklist-title-field:focus{outline:none;border-color:#7da0ef;box-shadow:0 0 0 3px rgba(71,118,230,.12)}
.checklist-item.is-completed .checklist-title-field{text-decoration:line-through;color:#94a3b8;background:#f8fafc}
.checklist-item.is-completed .checklist-edit:not(.is-editing) .checklist-title-field{background:transparent}
.checklist-edit>.icon-action-button{margin-top:1px}
@media(max-width:700px){.checklist-title-field{font-size:12.5px;line-height:1.45}}
