:root {
    --navy: #073d4e;
    --navy-deep: #063242;
    --teal: #008d9b;
    --cyan: #09a8d2;
    --yellow: #f5d84f;
    --ink: #193d4b;
    --muted: #6a828d;
    --line: #e3ecef;
    --surface: #ffffff;
    --bg: #f3f7f8;
    --danger: #bd5b4f;
    --amber: #aa7b27;
    --green: #278675;
    --radius: 16px;
    color: var(--ink);
    background: var(--bg);
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; min-width: 320px; background: var(--bg); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: Manrope, Inter, "Segoe UI", sans-serif; }
svg { width: 20px; height: 20px; vertical-align: middle; }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 3px solid #0ba2c5; outline-offset: 3px; }

.skip-link { position: fixed; top: -80px; left: 18px; z-index: 100; padding: 11px 15px; background: #fff; border-radius: 8px; box-shadow: 0 8px 30px #00283233; }
.skip-link:focus { top: 18px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: 248px; display: flex; flex-direction: column; padding: 30px 18px 22px; background: #fff; border-right: 1px solid var(--line); }
.brand { display: block; margin: 0 11px 38px; }
.brand img { display: block; width: 190px; height: auto; }
.workspace-label { margin: 0 16px 14px; color: #7b919b; font-size: .75rem; font-weight: 750; letter-spacing: .08em; }
.workspace-label span { float: right; padding: 3px 6px; margin-top: -3px; color: #5b7f8b; background: #eff5f6; border-radius: 4px; font-size: .69rem; letter-spacing: .04em; }
nav { display: flex; flex-direction: column; gap: 6px; }
.nav-link { position: relative; display: flex; align-items: center; gap: 11px; padding: 14px; color: #667e89; border-radius: 10px; font-size: .875rem; font-weight: 560; transition: .2s ease; }
.nav-link:hover { color: var(--teal); background: #f1f8f9; }
.nav-link.active { color: #007c90; background: #e9f6f8; font-weight: 700; }
.nav-link.active::before { content: ""; position: absolute; left: -18px; width: 3px; height: 22px; background: #079dad; border-radius: 0 4px 4px 0; }
.nav-count { margin-left: auto; padding: 2px 6px; color: #6c818a; background: #edf2f4; border-radius: 5px; font-size: .75rem; }
.nav-count.warm { color: #ad6c22; background: #fff1df; }
.sidebar-bottom { margin-top: auto; padding: 24px 15px 0; }
.small-label { color: #879ba4; font-size: .69rem; font-weight: 750; letter-spacing: .08em; }
.sidebar-bottom p { margin: 11px 0 18px; color: #52727e; font: 650 1.05rem/1.65 Manrope, sans-serif; }
.brand-rule { display: flex; gap: 4px; width: 66px; margin-bottom: 31px; }
.brand-rule i { flex: 1; height: 4px; background: var(--cyan); border-radius: 3px; }
.brand-rule i:nth-child(2) { background: var(--navy); }
.brand-rule i:nth-child(3) { background: var(--yellow); }
.plain-button { display: flex; align-items: center; gap: 8px; padding: 0; color: #69808a; background: none; border: 0; font-size: .75rem; }
.plain-button svg { width: 16px; height: 16px; }

.app-shell { margin-left: 248px; }
.topbar { height: 79px; display: flex; align-items: center; justify-content: space-between; padding: 0 38px; background: #fff; border-bottom: 1px solid var(--line); }
.breadcrumb { display: flex; align-items: center; gap: 13px; color: #728894; font-size: .8125rem; }
.breadcrumb svg { width: 17px; height: 17px; }
.breadcrumb i { color: #bdcbd0; font-style: normal; }
.breadcrumb strong { color: #335564; font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 18px; color: #667f8a; font-size: .69rem; font-weight: 750; letter-spacing: .09em; }
.avatar { width: 35px; height: 35px; display: grid; place-items: center; color: #007d90; background: #eaf5f6; border: 1px solid #c8e4e8; border-radius: 50%; font-size: .8rem; letter-spacing: 0; }
main { max-width: 1640px; padding: 33px 38px 22px; margin: auto; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 27px; }
.eyebrow, .section-kicker { margin-bottom: 8px; color: #748d98; font-size: .69rem; font-weight: 780; letter-spacing: .1em; }
h1 { color: #173d4c; font-size: clamp(1.75rem, 2.3vw, 2.25rem); font-weight: 800; letter-spacing: -.045em; }
h1 span { color: #079aa8; }
.page-heading p { margin-top: 8px; color: var(--muted); font-size: .9375rem; line-height: 1.6; }
.heading-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 11px; white-space: nowrap; }
.data-badge { display: flex; align-items: center; gap: 6px; padding: 5px 8px; color: #347969; background: #eaf7f1; border: 1px solid #cfeadd; border-radius: 5px; font-size: .75rem; font-weight: 650; }
.data-badge svg { width: 14px; height: 14px; }
.snapshot-date { display: flex; align-items: center; gap: 8px; color: #5d7580; font-size: .8125rem; }
.snapshot-date svg { width: 16px; height: 16px; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; margin-bottom: 24px; }
.metric { min-width: 0; padding: 21px 22px; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.metric-main { position: relative; color: #fff; background: linear-gradient(120deg, #075968, #073e50); border-color: transparent; }
.metric-main::after { content: ""; position: absolute; top: -62px; right: -35px; width: 180px; height: 180px; border: 27px solid #ffffff08; border-radius: 50%; pointer-events: none; }
.metric-label { min-height: 36px; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; color: #5c7580; font-size: .8125rem; font-weight: 600; }
.metric-main .metric-label { color: #cce5e9; }
.metric-label [data-icon] { width: 31px; height: 31px; color: #638997; background: #f1f7f8; border-radius: 8px; }
.metric-label svg { width: 17px; height: 17px; }
.metric-main .metric-label [data-icon] { color: #99dae2; background: #ffffff12; }
.metric-value { margin: 8px 0; color: #183f4f; font: 800 2.15rem/1.3 Manrope, sans-serif; letter-spacing: -.04em; }
.metric-main .metric-value { color: #fff; }
.metric-value small { margin-left: 5px; color: inherit; font-size: .9rem; font-weight: 650; letter-spacing: -.02em; }
.metric-foot { min-height: 35px; color: #718892; font-size: .75rem; line-height: 1.55; }
.metric-foot strong { color: #3f6878; font-weight: 700; }
.metric-main .metric-foot { color: #bed9df; }
.metric-main .metric-foot strong { color: #f4dd70; }
.mini-bar { height: 4px; margin-top: 13px; overflow: hidden; background: #e7f0f2; border-radius: 5px; }
.mini-bar i { display: block; height: 100%; background: #109ba7; border-radius: 5px; }
.metric-main .mini-bar { background: #ffffff20; }
.metric-main .mini-bar i { background: #53d1ce; }
.metric-attention .metric-value, .metric-attention .metric-label [data-icon] { color: #a97826; }
.metric-attention .metric-label [data-icon] { background: #fff5e6; }
.metric-done .metric-value, .metric-done .metric-label [data-icon] { color: #22816e; }
.metric-done .metric-label [data-icon] { background: #edf8f3; }

.analysis-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(340px, 1fr); gap: 23px; margin-bottom: 25px; }
.panel { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 23px 25px 0; }
h2 { color: #193e4c; font-size: 1.125rem; font-weight: 760; letter-spacing: -.025em; }
.period-tag { padding: 6px 9px; color: #6a828d; border: 1px solid var(--line); border-radius: 6px; font-size: .75rem; white-space: nowrap; }
.chart-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; padding: 16px 25px 0; }
.chart-summary > strong { font: 800 2rem/1 Manrope, sans-serif; letter-spacing: -.04em; }
.chart-summary > strong span { margin-left: 2px; font-size: 1.1rem; }
.chart-summary p { margin-top: 4px; color: #80959e; font-size: .75rem; }
.trend-gain { display: flex; align-items: center; gap: 4px; color: #208575; font-size: .75rem; font-weight: 650; }
.trend-gain svg { width: 14px; height: 14px; }
.chart-legend { display: flex; align-self: flex-end; gap: 15px; margin: 0 0 4px auto; color: #718791; font-size: .75rem; }
.chart-legend span { display: flex; align-items: center; gap: 6px; }
.legend-line { width: 17px; height: 3px; background: #078e99; border-radius: 3px; }
.legend-line.dashed { height: 0; background: transparent; border-top: 2px dashed #b6cbd1; border-radius: 0; }
.chart-wrap { position: relative; height: 220px; margin: 9px 18px 0; }
.chart-wrap svg { width: 100%; height: 100%; overflow: visible; }
.chart-point { outline: none; cursor: default; }
.chart-point .point-core { opacity: 0; transition: opacity .15s; }
.chart-point:hover .point-core, .chart-point:focus .point-core { opacity: 1; }
.chart-tooltip { position: absolute; z-index: 4; padding: 8px 11px; color: #fff; background: var(--navy-deep); border-radius: 8px; box-shadow: 0 7px 20px #00313b2b; font-size: .75rem; line-height: 1.65; white-space: nowrap; pointer-events: none; transform: translate(-50%, -100%); }
.chart-tooltip[hidden] { display: none; }
.chart-foot, .priority-foot { display: flex; align-items: flex-start; gap: 6px; padding: 10px 25px 18px; color: #8499a2; font-size: .75rem; line-height: 1.6; }
.chart-foot svg, .priority-foot svg { width: 14px; height: 14px; margin-top: 2px; }
.priority-count { width: 29px; height: 29px; display: grid; place-items: center; color: #af751f; background: #fff3df; border-radius: 8px; font-size: .8rem; font-weight: 750; }
.priority-foot-actions { align-items: center; justify-content: space-between; gap: 14px; }
.priority-foot-actions > span { display: flex; align-items: flex-start; gap: 6px; }
.priority-all-button { flex: 0 0 auto; padding: 7px 10px; color: #15788b; background: #edf7f8; border: 1px solid #d2e9ec; border-radius: 7px; font-size: .7rem; font-weight: 750; }
.priority-all-button:hover { color: #fff; background: #087f91; border-color: #087f91; }
.nip-value { color: #315c6b; font-size: .78rem; letter-spacing: .025em; }
.assignment-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.assignment-option { min-width: 0; display: grid; grid-template-columns: auto 34px minmax(0, 1fr); align-items: center; gap: 9px; padding: 10px; background: #f8fbfc; border: 1px solid #e1ebee; border-radius: 9px; cursor: pointer; }
.assignment-option:has(input:checked) { background: #eaf7f7; border-color: #9ed5db; }
.assignment-option input { width: 15px; min-height: auto; margin: 0; accent-color: var(--teal); }
.assignment-option .avatar { width: 32px; height: 32px; }
.assignment-option strong, .assignment-option small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assignment-option strong { color: #365c69; font-size: .75rem; }
.assignment-option small { margin-top: 3px; color: #81959e; font-size: .65rem; }
.assignment-readonly { display: flex; flex-wrap: wrap; gap: 7px; }

.activity-list { display: grid; }
.activity-item { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 13px; align-items: start; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.activity-item:last-child { border-bottom: 0; }
.activity-icon { width: 36px; height: 36px; display: grid; place-items: center; color: #187b8d; background: #eaf6f7; border-radius: 9px; }
.activity-icon svg { width: 17px; height: 17px; }
.activity-icon.action-deleted { color: #a95349; background: #fff0ed; }
.activity-icon.action-created { color: #277c68; background: #eaf7f1; }
.activity-title { color: #66808b; font-size: .8125rem; line-height: 1.55; }
.activity-title strong, .activity-title b { color: #315663; }
.activity-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 5px; color: #91a2a9; font-size: .68rem; }
.activity-meta i { font-style: normal; }
.activity-content p { margin-top: 7px; color: #7a9099; font-size: .75rem; }
.activity-action { padding: 5px 8px; color: #66808a; background: #f1f5f6; border-radius: 6px; font-size: .68rem; font-weight: 700; white-space: nowrap; }
.activity-content details { margin-top: 9px; }
.activity-content summary { color: #18798b; font-size: .7rem; font-weight: 700; cursor: pointer; }
.change-list { display: grid; gap: 5px; padding: 9px; margin-top: 7px; background: #f8fafb; border-radius: 7px; }
.change-list span { display: grid; grid-template-columns: 115px 1fr 1fr; gap: 8px; font-size: .68rem; }
.change-list b { color: #667f89; text-transform: capitalize; }
.change-list del { color: #a66960; }
.change-list ins { color: #277966; text-decoration: none; }

@media (max-width: 720px) {
    .assignment-grid { grid-template-columns: 1fr; }
    .activity-item { grid-template-columns: 34px minmax(0, 1fr); padding: 15px; }
    .activity-action { grid-column: 2; justify-self: start; }
    .change-list span { grid-template-columns: 1fr; }
}
.priorities { padding: 6px 24px 0; }
.priority-item { width: 100%; padding: 18px 0; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); }
.priority-item:last-child { border-bottom: 0; }
.priority-item:hover strong { color: var(--teal); }
.priority-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.priority-top strong { color: #294f5e; font-size: .8125rem; line-height: 1.5; transition: color .15s; }
.priority-top i { flex: 0 0 auto; padding: 3px 6px; color: #b7534d; background: #fff0ec; border-radius: 4px; font-size: .75rem; font-style: normal; font-weight: 700; }
.priority-description { display: flex; align-items: flex-start; gap: 6px; margin-top: 6px; color: #748c96; font-size: .75rem; line-height: 1.55; }
.priority-description svg { width: 14px; height: 14px; margin-top: 2px; }
.empty-state { padding: 28px 10px; text-align: center; color: #708891; }
.empty-state > [data-icon] { width: 38px; height: 38px; margin-bottom: 10px; color: #318774; background: #e9f7f1; border-radius: 50%; }
.empty-state strong { display: block; color: #365f6c; font-size: .875rem; }
.empty-state p { margin-top: 6px; font-size: .75rem; }

.jobs-heading { padding-bottom: 17px; }
.jobs-heading h2 { display: flex; align-items: center; gap: 9px; }
.count-chip { padding: 4px 7px; color: #64808b; background: #eff5f6; border-radius: 5px; font: 700 .75rem/1 Inter, sans-serif; letter-spacing: 0; }
.updated { display: flex; align-items: center; gap: 6px; color: #7e939c; font-size: .75rem; }
.updated svg { width: 14px; height: 14px; }
.table-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; padding: 0 25px 19px; }
.category-tabs { display: flex; width: 100%; gap: 7px; padding-bottom: 3px; overflow-x: auto; scrollbar-width: thin; }
.category-tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; color: #647f89; background: #f4f8f9; border: 1px solid #e3ecef; border-radius: 999px; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.category-tab strong { min-width: 19px; padding: 2px 5px; color: #66818b; background: #e6eef0; border-radius: 999px; font-size: .62rem; text-align: center; }
.category-tab:hover { color: var(--teal); border-color: #bce0e5; }
.category-tab.active { color: #fff; background: var(--navy); border-color: var(--navy); }
.category-tab.active strong { color: var(--navy); background: #fff; }
.category-tab.category-tone-0:not(.active), .project-category.category-tone-0 { color: #087b8a; background: #e6f6f8; border-color: #bfe5e9; }
.category-tab.category-tone-1:not(.active), .project-category.category-tone-1 { color: #76621c; background: #fff4cc; border-color: #f0df9f; }
.category-tab.category-tone-2:not(.active), .project-category.category-tone-2 { color: #28785f; background: #e4f5ee; border-color: #bfe5d6; }
.category-tab.category-tone-3:not(.active), .project-category.category-tone-3 { color: #71528d; background: #f1eafb; border-color: #dccbef; }
.category-tab.category-tone-4:not(.active), .project-category.category-tone-4 { color: #9a572c; background: #fff0e4; border-color: #f3d2b9; }
.category-tab.category-tone-5:not(.active), .project-category.category-tone-5 { color: #355f9a; background: #eaf1fb; border-color: #c9d9ee; }
.status-summary { display: flex; flex-wrap: wrap; gap: 14px 22px; }
.status-summary span { display: flex; align-items: center; gap: 7px; color: #6b828c; font-size: .75rem; }
.status-summary strong { color: #355866; }
.dot { width: 6px; height: 6px; background: #20a994; border-radius: 50%; }
.dot.attention { background: #d4a33e; }
.dot.delayed { background: #cf6e59; }
.dot.done { background: #759fae; }
.filters { display: flex; align-items: center; gap: 8px; }
.search-box { position: relative; display: flex; align-items: center; }
.search-box [data-icon] { position: absolute; left: 10px; color: #7f959e; pointer-events: none; }
.search-box svg { width: 15px; height: 15px; }
.filters input, .filters select { height: 36px; color: #4c6b78; background: #fff; border: 1px solid #dce7ea; border-radius: 8px; font-size: .75rem; }
.filters input { width: 205px; padding: 0 10px 0 32px; }
.filters select { padding: 0 29px 0 10px; }
.filters input::placeholder { color: #9aabb2; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
th { padding: 13px 15px; color: #80959f; background: #f8fafb; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: .69rem; font-weight: 700; letter-spacing: .05em; }
td { padding: 18px 15px; color: #617b87; border-bottom: 1px solid #edf2f4; font-size: .8125rem; }
th:first-child, td:first-child { padding-left: 25px; }
th:last-child, td:last-child { padding-right: 25px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfdfd; }
.progress-column { width: 19%; min-width: 166px; }
.project-title { display: block; padding: 0; color: #264f5f; background: none; border: 0; font-size: .8125rem; font-weight: 700; line-height: 1.5; text-align: left; }
.project-title:hover { color: var(--teal); }
.project-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 5px; }
.project-category { display: inline-flex; padding: 3px 7px; color: #087b8a; background: #e8f6f7; border: 1px solid transparent; border-radius: 999px; font-size: .65rem; font-weight: 750; }
.project-unit { display: flex; align-items: center; gap: 5px; color: #899fa8; font-size: .75rem; }
.project-unit svg { width: 13px; height: 13px; }
.pic { display: flex; align-items: center; gap: 8px; }
.pic-avatar { width: 28px; height: 28px; display: grid; place-items: center; color: #67818d; background: #edf3f6; border-radius: 50%; font-size: .65rem; font-style: normal; font-weight: 750; }
.pic-avatar.tone-1 { color: #548878; background: #e9f5f1; }
.pic-avatar.tone-2 { color: #8874a0; background: #f2eef7; }
.pic-avatar.tone-3 { color: #aa8252; background: #fff1e5; }
.assign-stack { min-width: 74px; display: flex; align-items: center; padding-left: 6px; }
.assign-initial { position: relative; width: 29px; height: 29px; display: grid; place-items: center; margin-left: -6px; color: #537985; background: #e8f1f4; border: 2px solid #fff; border-radius: 50%; font-size: .61rem; font-weight: 800; cursor: default; }
.assign-initial.tone-1 { color: #4d806f; background: #e6f3ee; }
.assign-initial.tone-2 { color: #75628f; background: #eee9f5; }
.assign-initial.tone-3 { color: #9a713f; background: #faeddf; }
.assign-initial::after { content: attr(data-tooltip); position: absolute; left: 50%; bottom: calc(100% + 8px); z-index: 30; width: max-content; max-width: 220px; padding: 6px 8px; color: #fff; background: #173f4d; border-radius: 6px; box-shadow: 0 7px 20px #002d3733; font-size: .68rem; font-weight: 600; line-height: 1.35; opacity: 0; pointer-events: none; transform: translate(-50%, 4px); transition: .15s ease; }
.assign-initial:hover::after, .assign-initial:focus::after { opacity: 1; transform: translate(-50%, 0); }
.assign-empty { color: #9badb4; }
.jobs-panel table { min-width: 1040px; }
.progress-label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; font-size: .75rem; }
.progress-label strong { color: #3e6878; }
.progress-label span { color: #98aab1; }
.progress-bar { position: relative; height: 5px; background: #e9f1f3; border-radius: 6px; }
.progress-fill { display: block; width: var(--progress); height: 100%; background: #139aa5; border-radius: 6px; }
.progress-fill.delayed, .progress-fill.attention { background: #d79d51; }
.progress-fill.done { background: #47978d; }
.progress-target { position: absolute; top: -2px; left: var(--target); width: 2px; height: 9px; background: #617d88; border-radius: 1px; transform: translateX(-1px); }
.delta { color: #b85e4f; font-size: .75rem; font-weight: 650; }
.delta.positive { color: #2d8b7b; }
.delta.neutral { color: #8298a1; }
.status { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 5px; font-size: .75rem; font-weight: 650; }
.status.delayed { color: #b06047; background: #fff0e8; }
.status.attention { color: #9d7d2e; background: #fcf5dd; }
.status.on-track { color: #258a77; background: #eaf7f2; }
.status.done { color: #618795; background: #edf4f7; }
.icon-button { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; padding: 0; color: #8098a2; background: #fff; border: 1px solid #e3ecef; border-radius: 7px; }
.icon-button:hover { color: var(--teal); background: #eff8fa; border-color: #bce0e5; }
.icon-button svg { width: 16px; height: 16px; }
.empty-table { padding: 40px 25px; color: #7d929b; text-align: center; }
.no-results { padding: 35px 20px; color: #718993; border-top: 1px solid var(--line); text-align: center; font-size: .875rem; }
.table-footer { display: flex; justify-content: space-between; gap: 15px; padding: 16px 25px; color: #879ba4; border-top: 1px solid var(--line); font-size: .75rem; }
.table-footer span:last-child { display: flex; align-items: center; gap: 7px; }
.target-marker { width: 2px; height: 10px; background: #617d88; }
footer { display: flex; justify-content: space-between; gap: 18px; padding-top: 24px; color: #899fa8; font-size: .69rem; line-height: 1.6; }
footer i { padding: 0 6px; color: #a9b9c0; font-style: normal; }

dialog { padding: 0; color: var(--ink); background: #fff; border: 0; box-shadow: 0 20px 100px #03242e40; }
dialog::backdrop { background: #07344770; backdrop-filter: blur(4px); }
.detail-dialog { position: fixed; inset: 0 0 0 auto; width: min(640px, 100%); max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; overflow: auto; border-radius: 20px 0 0 20px; }
.detail-top { padding: 28px 32px; background: #f8fbfc; border-bottom: 1px solid var(--line); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.detail-top h2 { margin-top: 20px; font-size: 1.55rem; line-height: 1.4; }
.detail-unit { display: flex; align-items: center; gap: 6px; margin-top: 9px; color: #718a95; font-size: .8125rem; }
.detail-unit svg { width: 14px; height: 14px; }
.detail-top .status { margin-top: 14px; }
.detail-body { padding: 28px 32px; }
.detail-description { color: #68818c; font-size: .9rem; line-height: 1.75; }
.detail-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 18px; margin: 21px 0; background: #f3f8f9; border: 1px solid #e5edef; border-radius: 12px; }
.detail-metrics span { display: block; color: #7b929b; font-size: .75rem; }
.detail-metrics strong { display: block; margin-top: 6px; color: #284f5f; font: 800 1.45rem Manrope, sans-serif; letter-spacing: -.03em; }
.detail-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 25px 0; }
.detail-meta dt { margin-bottom: 6px; color: #82969f; font-size: .75rem; }
.detail-meta dd { margin: 0; color: #426674; font-size: .875rem; font-weight: 650; }
.detail-body h3 { margin: 25px 0 14px; font-size: .95rem; }
.detail-assignees { display: flex; align-items: center; min-height: 29px; }
.detail-assignee { width: 29px; height: 29px; display: grid; place-items: center; margin-left: -6px; color: #17677a; background: #dcf2f4; border: 2px solid #fff; border-radius: 50%; font-size: .67rem; font-weight: 800; }
.detail-assignee:first-child { margin-left: 0; }
.detail-assignee.tone-1 { color: #80611c; background: #fff1c4; }
.detail-assignee.tone-2 { color: #39705f; background: #dff1ea; }
.detail-assignee.tone-3 { color: #6b5682; background: #eee7f6; }
.milestone-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 28px 0 14px; }
.detail-body .milestone-section-head h3 { margin: 0; }
.milestone-section-head > span { color: #82969f; font-size: .72rem; font-weight: 650; }
.milestones { padding: 0; margin: 0; list-style: none; }
.milestones .milestone { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 11px; padding: 0 0 12px; }
.milestones .milestone:last-child { padding-bottom: 0; }
.milestones .milestone:not(:last-child)::before { content: ""; position: absolute; top: 34px; bottom: -1px; left: 17px; width: 2px; background: #dbe8eb; }
.milestone-icon { position: relative; z-index: 1; width: 36px; height: 36px; display: grid; place-items: center; color: #8ca1aa; background: #f0f4f5; border: 1px solid #dfe9ec; border-radius: 50%; box-shadow: 0 0 0 4px #fff; font-size: .72rem; font-weight: 800; }
.milestone-icon svg { width: 14px; height: 14px; }
.milestone-icon.completed { color: #fff; background: #27927a; border-color: #27927a; }
.milestone-icon.current { color: #fff; background: #079ba8; border-color: #079ba8; box-shadow: 0 0 0 4px #fff, 0 0 0 6px #d9f0f2; }
.milestone-card { min-width: 0; padding: 14px; background: #fff; border: 1px solid #e2ecef; border-radius: 12px; }
.milestone.current .milestone-card { background: #f5fbfc; border-color: #b8dfe4; }
.milestone.pending .milestone-card { background: #f8fafb; }
.milestone-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.milestone-name { color: #345967; font-size: .875rem; font-weight: 700; line-height: 1.45; }
.milestone-state { flex: 0 0 auto; padding: 4px 7px; color: #7d929b; background: #edf2f4; border-radius: 999px; font-size: .64rem; font-weight: 800; }
.milestone-state.completed { color: #258a77; background: #eaf7f2; }
.milestone-state.current { color: #087c8a; background: #e5f5f7; }
.milestone-note { margin-top: 6px; color: #7f959e; font-size: .75rem; line-height: 1.55; }
.milestone-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; color: #879ca5; font-size: .69rem; }
.milestone-meta span { display: inline-flex; align-items: center; gap: 5px; }
.milestone-meta svg { width: 12px; height: 12px; }
.milestone-attachments { display: grid; gap: 6px; margin-top: 11px; }
.milestone-attachments a { min-width: 0; display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 8px 9px; color: #167485; background: #eef8f9; border-radius: 8px; font-size: .7rem; font-weight: 700; }
.milestone-attachments a:hover { color: #075968; background: #e2f3f5; }
.milestone-attachments svg { width: 13px; height: 13px; }
.milestone-attachments span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.milestone-attachments small { color: #81969f; font-size: .63rem; font-weight: 600; }
.milestone-empty { padding: 18px; color: #82969f; background: #f7fafb; border-radius: 10px; text-align: center; font-size: .8rem; }
.action-box { padding: 17px; margin-top: 25px; background: #fff8ed; border: 1px solid #f1e3cc; border-radius: 12px; }
.action-box.clear { background: #edf8f5; border-color: #d7ebe4; }
.action-box h3 { display: flex; align-items: center; gap: 7px; margin: 0 0 8px; color: #9c762e; font-size: .8125rem; }
.action-box.clear h3 { color: #35836f; }
.action-box h3 svg { width: 16px; height: 16px; }
.action-box p { color: #816e4e; font-size: .8125rem; line-height: 1.65; }
.action-box.clear p { color: #527a6d; }
.action-box strong { display: block; margin-top: 8px; color: #6e5935; }
.action-box.clear strong { color: #416f62; }
.detail-note { margin-top: 20px; color: #8fa3ab; font-size: .75rem; line-height: 1.65; }
.about-dialog { width: calc(100% - 32px); max-width: 560px; max-height: 90dvh; padding: 27px; border-radius: 18px; }
.about-dialog h2 { margin: 17px 0 13px; font-size: 1.45rem; }
.about-dialog > p, .info-block p { color: #6d848e; font-size: .875rem; line-height: 1.75; }
.info-block { padding: 17px; margin: 20px 0; background: #f3f8f9; border-radius: 10px; }
.info-block strong { display: block; margin-bottom: 7px; color: #345c69; font-size: .875rem; }
.primary-button { padding: 11px 19px; color: #fff; background: var(--navy); border: 0; border-radius: 9px; font-size: .875rem; }
.primary-button:hover { background: #087285; }

@media (max-width: 1220px) {
    .sidebar { width: 220px; padding-left: 14px; padding-right: 14px; }
    .brand img { width: 178px; }
    .nav-link.active::before { left: -14px; }
    .app-shell { margin-left: 220px; }
    .topbar, main { padding-left: 27px; padding-right: 27px; }
    .metric { padding: 17px; }
    .analysis-grid { grid-template-columns: minmax(0, 1.3fr) minmax(325px, 1fr); gap: 18px; }
    .table-tools { align-items: flex-start; }
    .filters { flex-direction: column; align-items: stretch; }
    .filters input, .filters select { width: 190px; }
}

@media (max-width: 1030px) {
    .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .analysis-grid { grid-template-columns: 1fr; }
    .priority-panel .priorities { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
    .priority-item { border-bottom: 0; }
    .priority-top { flex-direction: column; }
    .table-tools { flex-direction: column; }
    .filters { width: 100%; flex-direction: row; }
    .filters .search-box { flex: 1; }
    .filters input { width: 100%; }
}

@media (max-width: 880px) {
    .sidebar { position: static; width: 100%; padding: 15px 22px 0; border-right: 0; border-bottom: 1px solid var(--line); }
    .brand { width: 165px; margin: 0 0 14px; }
    .brand img { width: 165px; }
    .workspace-label, .sidebar-bottom { display: none; }
    .sidebar nav { flex-direction: row; }
    .nav-link { border-radius: 8px 8px 0 0; }
    .nav-link.active::before { inset: auto 10px -1px; width: auto; height: 3px; border-radius: 3px 3px 0 0; }
    .app-shell { margin-left: 0; }
    .topbar { position: absolute; top: 20px; right: 0; height: auto; padding-right: 25px; background: none; border: 0; }
    .breadcrumb { display: none; }
    main { padding-top: 27px; }
}

@media (max-width: 620px) {
    .sidebar { padding: 14px 10px 0; }
    .brand { width: 150px; margin-left: 5px; }
    .brand img { width: 150px; }
    .topbar { top: 20px; padding-right: 16px; }
    .topbar-right > span { display: none; }
    .avatar { width: 30px; height: 30px; }
    .nav-link { flex: 1; justify-content: center; gap: 5px; padding: 11px 7px; font-size: .75rem; text-align: center; }
    .nav-count, .nav-link [data-icon] { display: none; }
    main { padding: 23px 15px 18px; }
    .page-heading { align-items: flex-start; flex-direction: column; gap: 15px; margin-bottom: 20px; }
    .heading-meta { width: 100%; flex-direction: row-reverse; align-items: center; justify-content: space-between; }
    .page-heading p { font-size: .875rem; }
    .metrics { gap: 10px; }
    .metric { padding: 14px; }
    .metric-label { min-height: 43px; font-size: .75rem; }
    .metric-label [data-icon] { width: 22px; height: 22px; }
    .metric-label svg { width: 14px; height: 14px; }
    .metric-value { font-size: 1.8rem; }
    .metric-value small { display: block; margin: 0; font-size: .75rem; }
    .metric-foot { min-height: 54px; }
    .analysis-grid { gap: 19px; }
    .panel-heading { padding: 19px 18px 0; }
    .chart-summary { padding: 15px 18px 0; }
    .chart-legend { width: 100%; justify-content: flex-start; margin-left: 0; }
    .chart-wrap { height: 180px; margin-left: 8px; margin-right: 8px; }
    .chart-foot, .priority-foot { padding-left: 18px; padding-right: 18px; }
    .priority-panel .priorities { display: block; padding: 0 18px; }
    .priority-item { border-bottom: 1px solid var(--line); }
    .priority-top { flex-direction: row; }
    .jobs-heading { flex-direction: column; align-items: flex-start; }
    .table-tools { padding: 0 18px 17px; }
    .status-summary { gap: 10px 16px; }
    .filters { flex-direction: column; }
    .filters input, .filters select { width: 100%; }
    table { min-width: 865px; }
    th:first-child, td:first-child { padding-left: 18px; }
    .table-footer, footer { flex-direction: column; }
    .detail-dialog { border-radius: 0; }
    .detail-top, .detail-body { padding: 23px; }
    .detail-top h2 { font-size: 1.35rem; }
    .detail-metrics { padding: 15px; }
    .detail-metrics strong { font-size: 1.25rem; }
    .milestone-heading { align-items: flex-start; }
}

@media (max-width: 480px) {
    .detail-meta { grid-template-columns: 1fr; gap: 13px; }
    .detail-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .detail-metrics strong { font-size: 1.08rem; }
    .milestone-section-head { align-items: flex-start; }
    .milestones .milestone { grid-template-columns: 31px minmax(0, 1fr); gap: 9px; }
    .milestones .milestone:not(:last-child)::before { left: 14px; top: 30px; }
    .milestone-icon { width: 31px; height: 31px; }
    .milestone-heading { display: block; }
    .milestone-state { display: inline-flex; margin-top: 7px; }
    .milestone-attachments a { grid-template-columns: 15px minmax(0, 1fr); }
    .milestone-attachments small { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}

/* Authentication and management */
.user-link { color: #466774; font-size: .75rem; font-weight: 700; letter-spacing: 0; }
.user-link:hover { color: var(--teal); }
.logout-button { margin-top: 15px; }
.sidebar-bottom p small { color: #80969f; font-size: .7rem; font-weight: 500; }
.add-work-button { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 2px; }
.add-work-button svg { width: 15px; height: 15px; }
.row-actions { display: flex; gap: 6px; }
.flash { display: flex; align-items: flex-start; gap: 10px; padding: 13px 15px; margin-bottom: 20px; border-radius: 10px; font-size: .8125rem; line-height: 1.55; }
.flash svg { width: 18px; height: 18px; margin-top: 1px; }
.flash.success { color: #2d7363; background: #eaf7f2; border: 1px solid #cfe9df; }
.flash.error { color: #965345; background: #fff0eb; border: 1px solid #f0d6ce; }
.flash ul { margin: 5px 0 0; padding-left: 18px; }
.secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 15px; color: #486a77; background: #fff; border: 1px solid #d9e5e8; border-radius: 8px; font-size: .8125rem; font-weight: 650; }
.secondary-button:hover { color: var(--teal); border-color: #aaced5; }
.secondary-button.small { padding: 7px 10px; font-size: .75rem; }
.secondary-button svg { width: 15px; height: 15px; }
.danger-button { padding: 10px 15px; color: #fff; background: #b6544c; border: 0; border-radius: 8px; font-size: .8125rem; font-weight: 650; }
.danger-button:hover { background: #9e453f; }
.icon-button.danger { color: #b65b50; }

.auth-page { min-height: 100dvh; background: #eef4f5; }
.auth-shell { min-height: 100dvh; display: grid; grid-template-columns: minmax(360px, .9fr) minmax(480px, 1.1fr); padding: 0; }
.auth-brand-panel { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 100dvh; padding: 48px clamp(35px, 5vw, 78px); overflow: hidden; color: #fff; background: linear-gradient(145deg, #06495a, #072f40); }
.auth-brand-panel::before { content: ""; position: absolute; top: -150px; right: -160px; width: 440px; height: 440px; border: 60px solid #ffffff08; border-radius: 50%; }
.auth-brand-panel::after { content: ""; position: absolute; right: -25%; bottom: -25%; width: 75%; height: 58%; background: linear-gradient(140deg, transparent, #08a9d31a); transform: skewY(-12deg); }
.auth-brand-panel > * { position: relative; z-index: 1; }
.auth-brand-panel img { width: min(250px, 70%); height: auto; padding: 13px; background: #fff; border-radius: 10px; }
.auth-brand-panel h1 { max-width: 600px; margin-top: 13px; color: #fff; font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1.14; letter-spacing: -.055em; }
.auth-brand-panel h1 span { color: var(--yellow); }
.auth-brand-panel p { max-width: 520px; margin-top: 18px; color: #bfd9df; font-size: 1rem; line-height: 1.75; }
.auth-brand-panel small { color: #8fb5bf; font-size: .75rem; }
.auth-kicker { color: #71d6de; font-size: .72rem; font-weight: 780; letter-spacing: .13em; }
.auth-form-panel { display: grid; place-items: center; padding: 38px; }
.auth-card { width: min(440px, 100%); padding: 38px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 18px 60px #244d5714; }
.auth-card h2 { font-size: 1.65rem; }
.auth-card > p { margin: 8px 0 25px; color: #748a94; font-size: .875rem; line-height: 1.6; }
.auth-card .field { margin-bottom: 17px; }
.auth-card .primary-button { margin-top: 8px; }
.auth-help { margin-top: 18px; color: #8398a1; font-size: .75rem; text-align: center; }
.auth-help a { color: var(--teal); font-weight: 650; }
.form-error { padding: 11px 12px; margin-bottom: 18px; color: #9d5145; background: #fff0eb; border: 1px solid #f0d8d0; border-radius: 8px; font-size: .75rem; line-height: 1.55; }
.form-error ul { margin: 0; padding-left: 18px; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 44px; }
.password-field button { position: absolute; top: 0; right: 0; width: 42px; height: 100%; display: grid; place-items: center; color: #7c929b; background: none; border: 0; }
.password-field button svg { width: 17px; height: 17px; }
.check-field { display: flex; align-items: center; gap: 8px; margin: 2px 0 15px; color: #647c87; font-size: .75rem; }
.check-field input { accent-color: var(--teal); }
.primary-button.full { width: 100%; }

.management-main { max-width: 1500px; }
.editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.editor-heading p { margin-top: 8px; color: var(--muted); font-size: .875rem; }
.editor-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(310px, .75fr); gap: 22px; align-items: start; }
.editor-grid.single { grid-template-columns: 1fr; max-width: 980px; }
.editor-main { display: grid; gap: 22px; }
.editor-side { min-width: 0; }
.form-panel { overflow: visible; }
.form-panel .panel-heading { padding-bottom: 17px; }
.form-body { padding: 0 25px 25px; }
.form-grid { display: grid; gap: 17px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: block; min-width: 0; }
.field > span { display: block; margin-bottom: 7px; color: #58727d; font-size: .75rem; font-weight: 650; }
.field input, .field select, .field textarea { width: 100%; min-height: 41px; padding: 9px 11px; color: #284e5c; background: #fff; border: 1px solid #d9e5e8; border-radius: 8px; font-size: .8125rem; line-height: 1.5; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #58b3be; outline: 3px solid #dff3f5; }
.field input::placeholder, .field textarea::placeholder { color: #a3b2b8; }
.span-two { grid-column: span 2; }
.sticky-panel { position: sticky; top: 20px; }
.form-actions { display: flex; align-items: center; gap: 9px; margin-top: 21px; }
.sticky-actions { position: sticky; bottom: 0; z-index: 5; padding: 13px 0; background: linear-gradient(transparent, var(--bg) 22%); }
.stage-editor-list { display: grid; gap: 11px; }
.stage-editor { display: grid; grid-template-columns: 30px minmax(0, 1fr) 32px; gap: 11px; align-items: center; padding: 13px; background: #f8fbfc; border: 1px solid #e5edef; border-radius: 10px; }
.stage-handle { width: 28px; height: 28px; display: grid; place-items: center; color: #5d7b87; background: #e8f1f3; border-radius: 50%; font-size: .75rem; font-weight: 750; }
.stage-fields { display: grid; grid-template-columns: minmax(180px, 1.4fr) minmax(125px, .65fr) minmax(145px, .7fr); gap: 10px; align-items: end; }
.stage-note { grid-column: 1 / -1; }
.stage-attachments { grid-column: 1 / -1; padding-top: 2px; }
.stage-attachments input[type="file"] { padding: 7px; color: #66808b; background: #fff; }
.stage-attachments input[type="file"]::file-selector-button { padding: 7px 10px; margin-right: 10px; color: #276272; background: #eaf5f6; border: 0; border-radius: 6px; font-size: .72rem; font-weight: 700; cursor: pointer; }
.attachment-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.attachment-chip { max-width: 100%; display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; color: #496d79; background: #fff; border: 1px solid #dbe7ea; border-radius: 7px; font-size: .72rem; }
.attachment-chip > [data-icon] svg { width: 14px; height: 14px; }
.attachment-chip a { max-width: 270px; overflow: hidden; color: #187d91; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.attachment-chip a:hover { text-decoration: underline; }
.attachment-chip small { color: #8ca0a8; white-space: nowrap; }
.attachment-remove { width: 20px; height: 20px; display: grid; place-items: center; padding: 0; color: #ae594f; background: #fff1ed; border: 0; border-radius: 50%; font-size: 1rem; line-height: 1; }
.milestone-attachments { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.milestone-attachments a { display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; color: #13788c; background: #edf7f8; border-radius: 6px; font-size: .68rem; font-weight: 650; }
.milestone-attachments svg { width: 13px; height: 13px; }
.lower-grid { margin-top: 24px; }
.progress-entry { display: grid; grid-template-columns: repeat(3, minmax(105px, .65fr)) minmax(170px, 1.2fr) auto; gap: 11px; align-items: end; }
.progress-entry .primary-button { min-height: 41px; }
.compact-table { overflow-x: auto; border-top: 1px solid var(--line); }
.compact-table table { min-width: 650px; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px; border-color: #edd7d1; }
.danger-zone p { margin-top: 7px; color: #856f69; font-size: .75rem; line-height: 1.55; }

@media (max-width: 1080px) {
    .editor-grid { grid-template-columns: 1fr; }
    .sticky-panel { position: static; }
    .progress-entry { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .progress-entry .primary-button { align-self: end; }
}

@media (max-width: 820px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-brand-panel { min-height: auto; padding: 30px; }
    .auth-brand-panel img { width: 190px; }
    .auth-brand-panel h1 { margin-top: 35px; font-size: 2.2rem; }
    .auth-brand-panel small { margin-top: 35px; }
    .auth-form-panel { padding: 28px 16px; }
    .form-grid.three { grid-template-columns: 1fr; }
    .stage-fields { grid-template-columns: 1fr 1fr; }
    .stage-note { grid-column: span 2; }
}

@media (max-width: 620px) {
    .auth-card { padding: 25px 20px; }
    .auth-brand-panel { padding: 24px 20px; }
    .auth-brand-panel h1 { font-size: 1.8rem; }
    .editor-heading { align-items: flex-start; flex-direction: column; }
    .form-grid.two { grid-template-columns: 1fr; }
    .span-two { grid-column: auto; }
    .form-body { padding: 0 18px 20px; }
    .stage-editor { grid-template-columns: 25px minmax(0, 1fr) 32px; padding: 10px; }
    .stage-fields { grid-template-columns: 1fr; }
    .stage-note { grid-column: auto; }
    .progress-entry { grid-template-columns: 1fr; }
    .danger-zone { align-items: flex-start; flex-direction: column; }
}

/* Layout repair and user management */
.auth-page { overflow-x: hidden; }
.auth-shell { width: 100%; }
.auth-brand-panel { isolation: isolate; }
.auth-form-panel { min-width: 0; background: radial-gradient(circle at 80% 10%, #dff2f4 0, transparent 34%), #f4f8f9; }
.auth-card { position: relative; z-index: 2; }
.auth-card .field > span:first-child { display: block; margin-bottom: 7px; }
.auth-card .password-field { margin-bottom: 0; }
.auth-card input { display: block; }
.auth-card .primary-button { min-height: 45px; font-weight: 750; }
.field small { display: block; margin-top: 7px; color: #82969f; font-size: .7rem; line-height: 1.5; }

.data-panel { overflow: hidden; }
.users-heading { padding-bottom: 18px; }
.responsive-table { width: 100%; overflow-x: auto; }
.management-table { min-width: 680px; table-layout: auto; }
.management-table th, .management-table td { vertical-align: middle; }
.management-table td { white-space: normal; }
.management-table th:first-child, .management-table td:first-child { width: 32%; }
.management-table .action-column { width: 110px; text-align: right; white-space: nowrap; }
.user-cell { display: flex; align-items: center; gap: 11px; min-width: 180px; }
.user-cell strong { display: block; color: #294f5e; font-size: .8125rem; }
.user-cell small { display: block; margin-top: 3px; color: #15927f; font-size: .68rem; font-weight: 650; }
.user-form-layout { display: grid; gap: 22px; max-width: 940px; }
.form-footer { display: flex; gap: 10px; padding: 0 25px 25px; }
.user-danger { min-height: 120px; }
.role-badge { display: inline-flex; align-items: center; padding: 5px 8px; color: #526f7b; background: #edf3f5; border-radius: 6px; font-size: .7rem; font-weight: 750; white-space: nowrap; }
.role-badge.role-admin { color: #8c5a1f; background: #fff1d9; }
.role-badge.role-senior_manager { color: #5b548c; background: #f0edfa; }
.role-badge.role-manager { color: #16758a; background: #e6f5f8; }
.role-badge.role-assistant_manager { color: #3f6f91; background: #eaf2f9; }
.role-badge.role-team_leader { color: #267763; background: #e7f5ef; }
.topbar-role { padding: 5px 8px; color: #557682; background: #eef5f6; border-radius: 6px; font-size: .66rem; font-weight: 700; letter-spacing: 0; text-transform: none; }

.compact-table td { white-space: normal; vertical-align: top; }
.compact-table th:nth-child(4), .compact-table td:nth-child(4) { min-width: 210px; }
.stage-editor { overflow: hidden; }
.stage-fields { min-width: 0; }
.field input, .field select, .field textarea { max-width: 100%; }

@media (max-width: 980px) {
    .auth-shell { grid-template-columns: minmax(300px, .8fr) minmax(420px, 1.2fr); }
    .auth-brand-panel { padding: 38px 32px; }
    .auth-brand-panel h1 { font-size: 2.35rem; }
    .stage-fields { grid-template-columns: 1fr 1fr; }
    .stage-note { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
    .auth-shell { display: block; min-height: 100dvh; }
    .auth-brand-panel { min-height: 245px; justify-content: flex-start; gap: 25px; padding: 26px 24px; }
    .auth-brand-panel img { width: 185px; padding: 9px; }
    .auth-brand-panel h1 { margin-top: 5px; font-size: 1.8rem; }
    .auth-brand-panel p { margin-top: 10px; font-size: .875rem; line-height: 1.55; }
    .auth-brand-panel small { display: none; }
    .auth-form-panel { display: block; padding: 24px 16px 38px; }
    .auth-card { width: min(520px, 100%); padding: 27px 24px; margin: 0 auto; }
}

@media (max-width: 620px) {
    .auth-brand-panel { min-height: 220px; }
    .auth-kicker { font-size: .65rem; }
    .auth-brand-panel h1 { font-size: 1.55rem; }
    .auth-card h2 { font-size: 1.35rem; }
    .management-main { padding-left: 15px; padding-right: 15px; }
    .user-form-layout .form-grid.two { grid-template-columns: 1fr; }
    .form-footer { flex-direction: column; padding: 0 18px 20px; }
    .form-footer .primary-button, .form-footer .secondary-button { width: 100%; }

    .responsive-table { overflow: visible; }
    .management-table { min-width: 0; }
    .management-table thead { display: none; }
    .management-table, .management-table tbody, .management-table tr, .management-table td { display: block; width: 100%; }
    .management-table tr { padding: 10px 16px; border-top: 1px solid var(--line); }
    .management-table td, .management-table td:first-child, .management-table td:last-child { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; width: 100%; padding: 9px 0; border: 0; text-align: left; }
    .management-table td::before { content: attr(data-label); color: #8498a1; font-size: .68rem; font-weight: 750; letter-spacing: .04em; }
    .management-table .action-column { width: 100%; }
    .management-table .action-column .secondary-button { justify-self: start; }
    .user-cell { min-width: 0; }
    .topbar-role { display: none; }
}

/* Mobile application layout */
.mobile-brand { display: none; }

@media (max-width: 880px) {
    .sidebar nav { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; }
    .sidebar .nav-link { flex: 0 0 auto; }
}

@media (max-width: 900px) {
    html { scroll-padding-top: 76px; }
    body:not(.auth-page) { padding-bottom: calc(74px + env(safe-area-inset-bottom)); overflow-x: hidden; }

    .sidebar {
        position: fixed;
        inset: auto 0 0;
        z-index: 60;
        width: 100%;
        padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, .97);
        border: 0;
        border-top: 1px solid #dce8eb;
        box-shadow: 0 -10px 32px rgba(7, 61, 78, .1);
        backdrop-filter: blur(16px);
    }
    .sidebar .brand, .workspace-label, .sidebar-bottom { display: none; }
    .sidebar nav { flex-direction: row; gap: 3px; padding: 0; overflow-x: auto; scrollbar-width: none; }
    .sidebar nav::-webkit-scrollbar { display: none; }
    .sidebar .nav-link {
        flex: 1 0 72px;
        min-width: 72px;
        min-height: 59px;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        padding: 7px 5px;
        border-radius: 10px;
        font-size: .62rem;
        font-weight: 650;
        line-height: 1.18;
        text-align: center;
        white-space: normal;
    }
    .sidebar .nav-link [data-icon] { display: inline-flex; }
    .sidebar .nav-link svg { width: 19px; height: 19px; }
    .sidebar .nav-link.active { color: #006f82; background: #eaf6f8; }
    .sidebar .nav-link.active::before { inset: 0 13px auto; width: auto; height: 3px; border-radius: 0 0 4px 4px; }
    .sidebar .nav-count { display: none; }

    .app-shell { min-width: 0; margin-left: 0; }
    .topbar {
        position: sticky;
        top: 0;
        right: auto;
        z-index: 50;
        width: 100%;
        height: 64px;
        padding: 9px max(15px, env(safe-area-inset-right)) 9px max(15px, env(safe-area-inset-left));
        background: rgba(255, 255, 255, .96);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 7px 24px rgba(7, 61, 78, .06);
        backdrop-filter: blur(14px);
    }
    .mobile-brand { display: block; width: 154px; }
    .mobile-brand img { display: block; width: 100%; height: auto; }
    .breadcrumb { display: none; }
    .topbar-right { margin-left: auto; gap: 8px; }
    .topbar-right .user-link, .topbar-right .topbar-role { display: none; }
    .topbar .avatar { width: 38px; height: 38px; font-size: .78rem; }

    main, .management-main {
        width: 100%;
        padding: 20px max(14px, env(safe-area-inset-right)) 24px max(14px, env(safe-area-inset-left));
    }
    h1 { font-size: clamp(1.65rem, 8vw, 2rem); line-height: 1.15; }
    h2 { line-height: 1.35; }
    .page-heading, .editor-heading { gap: 14px; margin-bottom: 18px; }
    .page-heading p, .editor-heading p { font-size: .82rem; line-height: 1.55; }
    .heading-meta {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 9px;
        width: 100%;
        white-space: normal;
    }
    .heading-meta .add-work-button { grid-column: 1 / -1; width: 100%; margin: 0; }
    .data-badge, .snapshot-date { min-width: 0; font-size: .68rem; }

    .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
    .metric { min-height: 174px; padding: 14px; border-radius: 14px; }
    .metric-label { min-height: 39px; gap: 5px; font-size: .7rem; line-height: 1.35; }
    .metric-label [data-icon] { width: 27px; height: 27px; }
    .metric-value { margin: 7px 0; font-size: clamp(1.55rem, 8vw, 1.9rem); }
    .metric-value small { display: block; margin: 1px 0 0; font-size: .68rem; }
    .metric-foot { min-height: 43px; font-size: .68rem; line-height: 1.45; }

    .analysis-grid { gap: 16px; margin-bottom: 18px; }
    .panel { border-radius: 14px; }
    .panel-heading { flex-wrap: wrap; gap: 10px; padding: 18px 16px 0; }
    .chart-summary { gap: 10px; padding: 14px 16px 0; }
    .chart-summary > strong { font-size: 1.75rem; }
    .chart-legend { width: 100%; justify-content: flex-start; margin: 2px 0 0; }
    .chart-wrap { height: 185px; margin: 7px 5px 0; }
    .chart-foot, .priority-foot { padding: 9px 16px 16px; font-size: .68rem; }
    .priority-panel .priorities { padding: 0 16px; }
    .priority-item { min-height: 70px; padding: 15px 0; }
    .priority-description { font-size: .72rem; }
    .priority-foot-actions { align-items: stretch; flex-direction: column; }
    .priority-all-button { min-height: 42px; }

    .jobs-heading { padding-bottom: 14px; }
    .updated { font-size: .68rem; }
    .table-tools { gap: 14px; padding: 0 16px 16px; }
    .category-tabs {
        width: calc(100% + 16px);
        margin-right: -16px;
        padding-right: 16px;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }
    .category-tabs::-webkit-scrollbar { display: none; }
    .category-tab { min-height: 42px; scroll-snap-align: start; }
    .status-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 12px; width: 100%; }
    .status-summary span { font-size: .69rem; }
    .filters { width: 100%; gap: 9px; }
    .filters input, .filters select { width: 100%; min-height: 46px; font-size: .82rem; }

    .jobs-panel .table-scroll { padding: 0 12px 4px; overflow: visible; }
    .jobs-panel table, .jobs-panel tbody { display: block; width: 100%; min-width: 0; white-space: normal; }
    .jobs-panel thead { display: none; }
    .jobs-panel tbody { display: grid; gap: 12px; }
    .jobs-panel tbody tr {
        position: relative;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 15px 12px;
        width: 100%;
        padding: 16px;
        background: #fff;
        border: 1px solid #dfeaec;
        border-radius: 13px;
        box-shadow: 0 5px 18px rgba(23, 61, 76, .05);
    }
    .jobs-panel tbody tr[hidden] { display: none; }
    .jobs-panel tbody tr:hover { background: #fff; }
    .jobs-panel tbody td,
    .jobs-panel tbody td:first-child,
    .jobs-panel tbody td:last-child {
        display: block;
        min-width: 0;
        padding: 0;
        border: 0;
        white-space: normal;
    }
    .jobs-panel tbody td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 6px;
        color: #8a9da5;
        font-size: .61rem;
        font-weight: 800;
        letter-spacing: .055em;
        text-transform: uppercase;
    }
    .jobs-panel tbody td:nth-child(1), .jobs-panel tbody td:nth-child(4), .jobs-panel tbody td:nth-child(8), .jobs-panel .empty-table { grid-column: 1 / -1; }
    .jobs-panel tbody td:nth-child(1) { padding-bottom: 13px; border-bottom: 1px solid #edf2f4; }
    .jobs-panel tbody td:nth-child(4) { padding: 12px; background: #f5f9fa; border-radius: 10px; }
    .jobs-panel tbody td:nth-child(8) { padding-top: 2px; }
    .jobs-panel .project-title { width: 100%; font-size: .9rem; }
    .jobs-panel .pic { align-items: flex-start; font-size: .75rem; line-height: 1.35; }
    .jobs-panel .progress-column { width: auto; }
    .jobs-panel .progress-bar { height: 7px; }
    .jobs-panel .assign-stack { min-width: 0; }
    .jobs-panel .row-actions { justify-content: flex-end; }
    .jobs-panel .row-actions .icon-button { width: 44px; height: 44px; }
    .jobs-panel .empty-table { padding: 18px; }
    .jobs-panel .empty-table::before { display: none; }
    .table-footer { gap: 8px; padding: 14px 16px; font-size: .68rem; }
    footer { display: none; }

    dialog { max-width: 100vw; }
    .detail-dialog { inset: 0; width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; overscroll-behavior: contain; }
    .detail-top, .detail-body { padding: 20px 16px; }
    .detail-top { padding-top: max(16px, env(safe-area-inset-top)); }
    .detail-dialog .dialog-header { position: sticky; top: 0; z-index: 2; }
    .detail-dialog .icon-button { width: 44px; height: 44px; }
    .detail-top h2 { margin-top: 14px; font-size: 1.3rem; }
    .detail-description { font-size: .82rem; }
    .detail-metrics { gap: 5px; padding: 13px 10px; }
    .detail-metrics span { font-size: .64rem; }
    .detail-metrics strong { font-size: 1.12rem; }
    .detail-meta { gap: 14px 10px; }
    .detail-meta dd { overflow-wrap: anywhere; font-size: .8rem; }
    .milestone-card { padding: 12px; }
    .milestone-attachments a { min-height: 44px; }
    .about-dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px); padding: 20px; border-radius: 16px; }

    .editor-heading > .secondary-button, .editor-heading > .primary-button { width: 100%; min-height: 46px; }
    .form-panel .panel-heading { padding-bottom: 14px; }
    .form-body { padding: 0 16px 18px; }
    .field input, .field select, .field textarea { min-height: 47px; padding: 11px 12px; font-size: 1rem; }
    .field textarea { min-height: 100px; }
    .assignment-option { min-height: 60px; }
    .stage-editor { grid-template-columns: 32px minmax(0, 1fr) 44px; gap: 9px; padding: 12px 10px; align-items: start; }
    .stage-handle { width: 32px; height: 32px; margin-top: 5px; }
    .stage-editor > .icon-button { width: 44px; height: 44px; }
    .stage-attachments input[type="file"] { min-height: 52px; padding: 7px; font-size: .75rem; }
    .attachment-chip { width: 100%; min-height: 44px; }
    .attachment-chip a { flex: 1; max-width: none; }
    .attachment-remove { width: 32px; height: 32px; }
    .form-actions, .form-footer { align-items: stretch; flex-direction: column; gap: 9px; }
    .sticky-actions { position: static; padding: 0; background: none; }
    .form-actions .primary-button, .form-actions .secondary-button,
    .form-footer .primary-button, .form-footer .secondary-button,
    .danger-zone .danger-button { width: 100%; min-height: 48px; }
    .compact-table { -webkit-overflow-scrolling: touch; }
    .danger-zone { padding: 18px 16px; }
    .activity-item { gap: 10px; }
    .activity-action { min-height: 30px; display: inline-flex; align-items: center; }

    .primary-button, .secondary-button, .danger-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; }
    .icon-button { width: 40px; height: 40px; }

    .responsive-table { overflow: visible; }
    .management-table { display: block; width: 100%; min-width: 0; white-space: normal; }
    .management-table thead { display: none; }
    .management-table tbody { display: grid; gap: 12px; width: 100%; padding: 0 12px 12px; }
    .management-table tr {
        display: grid;
        width: 100%;
        padding: 14px 16px;
        background: #fff;
        border: 1px solid #dfeaec;
        border-radius: 13px;
        box-shadow: 0 5px 18px rgba(23, 61, 76, .05);
    }
    .management-table td,
    .management-table td:first-child,
    .management-table td:last-child {
        display: grid;
        grid-template-columns: minmax(92px, .38fr) minmax(0, 1fr);
        gap: 12px;
        width: 100%;
        padding: 10px 0;
        border: 0;
        border-bottom: 1px solid #edf2f4;
        text-align: left;
        white-space: normal;
    }
    .management-table td:last-child { border-bottom: 0; }
    .management-table td::before {
        content: attr(data-label);
        color: #8498a1;
        font-size: .65rem;
        font-weight: 800;
        letter-spacing: .045em;
        text-transform: uppercase;
    }
    .management-table .action-column { width: 100%; }
    .management-table .action-column .secondary-button { justify-self: start; }

    .compact-table { padding: 0 12px 12px; overflow: visible; border-top: 0; }
    .compact-table table, .compact-table tbody { display: block; width: 100%; min-width: 0; white-space: normal; }
    .compact-table thead { display: none; }
    .compact-table tbody { display: grid; gap: 10px; }
    .compact-table tr {
        display: grid;
        padding: 13px 15px;
        background: #f9fbfc;
        border: 1px solid #dfeaec;
        border-radius: 12px;
    }
    .compact-table td,
    .compact-table td:first-child,
    .compact-table td:last-child,
    .compact-table td:nth-child(4) {
        display: grid;
        grid-template-columns: 104px minmax(0, 1fr);
        gap: 10px;
        min-width: 0;
        padding: 8px 0;
        border: 0;
        border-bottom: 1px solid #e8eff1;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .compact-table td:last-child { border-bottom: 0; }
    .compact-table td::before {
        content: attr(data-label);
        color: #8498a1;
        font-size: .64rem;
        font-weight: 800;
        letter-spacing: .04em;
        text-transform: uppercase;
    }
    .compact-table td[data-label="Aksi"] .icon-button { justify-self: start; }
    .compact-table .empty-table { display: block; padding: 16px 0; text-align: center; }
    .compact-table .empty-table::before { display: none; }
}

@media (max-width: 380px) {
    .mobile-brand { width: 140px; }
    .heading-meta { grid-template-columns: 1fr; }
    .heading-meta .add-work-button { grid-column: auto; }
    .metrics { grid-template-columns: 1fr; }
    .metric { min-height: 0; }
    .status-summary { grid-template-columns: 1fr; }
    .jobs-panel tbody tr { grid-template-columns: 1fr; }
    .jobs-panel tbody td { grid-column: 1 / -1; }
    .detail-metrics { grid-template-columns: 1fr; gap: 10px; }
    .detail-metrics > div { display: flex; align-items: center; justify-content: space-between; }
    .detail-metrics strong { margin-top: 0; }
}
