body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, sans-serif;
    background: linear-gradient(180deg, #f5efe6 0%, #edf4f0 100%);
    color: #182229;
}

a {
    color: inherit;
    text-decoration: none;
}

.shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: #122029;
    color: #f5f2e8;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-brand {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav a {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
}

.nav a.active,
.nav a:hover {
    background: rgba(255, 255, 255, 0.14);
}

.create-project-drawer {
    display: block;
}

.create-project-drawer > summary {
    display: none;
}

.create-project-drawer > summary::-webkit-details-marker {
    display: none;
}

.mobile-menu-toggle {
    display: none;
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
}

.mobile-menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: #f5f2e8;
}

.content {
    padding: 28px;
}

.topbar {
    margin-bottom: 20px;
}

.muted {
    color: #5e6a70;
}

.panel,
.auth-card,
.stat-card,
.project-card,
.task-card {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(24, 34, 41, 0.08);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(18, 32, 41, 0.08);
}

.panel,
.auth-card {
    padding: 20px;
}

.compact {
    padding: 16px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.capacity-planner-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    align-items: end;
    margin-top: 18px;
}

.capacity-planner-form label {
    display: grid;
    gap: 8px;
}

.capacity-planner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.capacity-planner-card {
    padding: 20px;
    display: grid;
    gap: 14px;
}

.capacity-fit-note {
    margin: 0;
}

.capacity-timeline-panel {
    margin-top: 20px;
}

.capacity-timeline-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: 180px repeat(28, minmax(72px, 1fr));
    gap: 8px;
    overflow-x: auto;
    align-items: stretch;
}

.capacity-timeline-header,
.capacity-timeline-person,
.capacity-day-cell {
    min-height: 72px;
    border-radius: 14px;
    border: 1px solid rgba(24, 34, 41, 0.08);
    background: rgba(255, 255, 255, 0.72);
}

.capacity-timeline-header {
    display: grid;
    place-items: center;
    gap: 2px;
    padding: 10px 8px;
    font-size: 12px;
    color: #415159;
}

.capacity-timeline-header strong {
    font-size: 13px;
    color: #223038;
}

.capacity-timeline-sticky {
    position: sticky;
    left: 0;
    z-index: 2;
    box-shadow: 6px 0 14px rgba(18, 32, 41, 0.04);
}

.capacity-timeline-person {
    display: grid;
    align-content: center;
    gap: 4px;
    padding: 12px;
}

.capacity-day-cell {
    display: grid;
    gap: 10px;
    align-content: center;
    padding: 10px 8px;
    text-align: center;
}

.capacity-day-track {
    height: 10px;
    border-radius: 999px;
    background: #e4ece8;
    overflow: hidden;
}

.capacity-day-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #d76c3d, #4f9d87);
}

.capacity-day-value {
    font-size: 12px;
    font-weight: 700;
    color: #223038;
}

.capacity-day-cell.is-unavailable,
.capacity-timeline-header.is-weekend,
.capacity-day-cell.is-weekend {
    background: rgba(235, 239, 241, 0.78);
}

.capacity-day-cell.is-unavailable .capacity-day-track,
.capacity-day-cell.is-weekend .capacity-day-track {
    background: rgba(24, 34, 41, 0.08);
}

.chart-card {
    display: grid;
    gap: 14px;
}

.donut-wrap {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 16px;
    align-items: center;
}

.donut-chart {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    position: relative;
}

.donut-chart::after {
    content: "";
    position: absolute;
    inset: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
}

.donut-chart span {
    position: relative;
    z-index: 1;
    font-weight: 700;
    font-size: 22px;
}

.chart-legend {
    display: grid;
    gap: 8px;
}

.legend-row,
.mini-bar-row,
.compare-row {
    display: grid;
    gap: 8px;
    align-items: center;
}

.legend-row {
    grid-template-columns: 1fr auto;
}

.legend-key {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.legend-key i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.mini-bars,
.compare-chart {
    display: grid;
    gap: 10px;
}

.mini-bar-row {
    grid-template-columns: 96px 1fr auto;
}

.mini-bar-label {
    font-size: 13px;
    font-weight: 600;
    color: #314148;
}

.mini-bar-track,
.compare-track {
    height: 10px;
    background: #e4ece8;
    border-radius: 999px;
    overflow: hidden;
}

.mini-bar-fill,
.compare-fill {
    height: 100%;
    border-radius: 999px;
}

.mini-bar-fill {
    background: linear-gradient(90deg, #d76c3d, #4f9d87);
}

.mini-bar-value,
.compare-values {
    font-size: 12px;
    color: #5e6a70;
}

.line-chart-wrap {
    display: grid;
    gap: 8px;
}

.line-chart {
    width: 100%;
    height: 120px;
    background: linear-gradient(180deg, rgba(215, 108, 61, 0.08), rgba(79, 157, 135, 0.04));
    border-radius: 14px;
}

.line-labels {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    font-size: 12px;
    color: #5e6a70;
    text-align: center;
}

.compare-row {
    grid-template-columns: 96px 1fr auto;
}

.compare-bars {
    display: grid;
    gap: 6px;
}

.compare-fill.estimate {
    background: #d9b44a;
}

.compare-fill.tracked {
    background: #4f9d87;
}

.compare-values {
    display: grid;
    gap: 2px;
    white-space: nowrap;
}

.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.planning-panel {
    margin: 20px 0;
}

.planning-grid {
    margin-top: 18px;
}

.planning-list {
    display: grid;
    gap: 10px;
}

.planning-item {
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(24, 34, 41, 0.06);
    border-radius: 14px;
    padding: 12px;
    display: grid;
    gap: 10px;
}

.weekly-workload-item {
    gap: 14px;
}

.weekly-workload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.timesheet-planning-strip {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.planning-chip-card {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(24, 34, 41, 0.06);
    border-radius: 14px;
    padding: 12px 14px;
    display: grid;
    gap: 4px;
}

.planning-chip-card strong {
    font-size: 22px;
}

.stat-card {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-card strong {
    font-size: 28px;
}

.panel-head,
.project-card-row,
.task-actions,
.project-meta,
.inline-fields,
.task-meta,
.right-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.project-list,
.task-list,
.split {
    display: grid;
    gap: 16px;
}

.task-list {
    gap: 10px;
}

.split {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin: 20px 0;
}

.project-card,
.task-card {
    padding: 16px;
}

.compact-list-panel {
    padding: 16px;
}

.compact-task {
    padding: 12px 14px;
}

.compact-task form {
    display: grid;
    gap: 8px;
}

.compact-task-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.compact-title {
    font-weight: 600;
    padding: 9px 10px;
}

.compact-description {
    min-height: 54px;
    padding: 9px 10px;
}

.compact-meta {
    font-size: 13px;
    white-space: nowrap;
}

.task-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.task-support-card {
    background: rgba(245, 248, 246, 0.85);
    border: 1px solid rgba(24, 34, 41, 0.08);
    border-radius: 14px;
    padding: 12px;
    display: grid;
    gap: 10px;
}

.ownership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.ownership-stat {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(24, 34, 41, 0.06);
}

.ownership-stat strong {
    font-size: 14px;
}

.activity-list {
    display: grid;
    gap: 10px;
}

.activity-item {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(24, 34, 41, 0.06);
}

.activity-item.warning {
    border-color: rgba(171, 59, 59, 0.22);
    background: rgba(255, 244, 242, 0.9);
}

.activity-item.positive {
    border-color: rgba(79, 157, 135, 0.22);
    background: rgba(241, 249, 245, 0.92);
}

.activity-item p {
    margin: 0;
}

.subtask-list,
.comment-list,
.notification-list,
.search-results {
    display: grid;
    gap: 10px;
}

.subtask-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    align-items: center;
}

.subtask-toggle {
    width: auto;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(24, 34, 41, 0.12);
    background: #eef3ef;
    color: #314148;
    font-size: 12px;
}

.subtask-toggle.done {
    background: #dceee6;
    color: #1c5d49;
}

.subtask-text.done {
    text-decoration: line-through;
    color: #6b777d;
}

.inline-stack {
    display: grid;
    gap: 8px;
}

.comment-item,
.notification-card,
.search-result-card {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(24, 34, 41, 0.08);
    border-radius: 14px;
    padding: 12px;
}

.comment-item p,
.notification-card p,
.search-result-card p {
    margin: 0;
}

.notification-card.unread {
    border-color: rgba(215, 108, 61, 0.4);
    box-shadow: inset 3px 0 0 #d76c3d;
}

.search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.calendar-hero,
.timesheet-hero {
    background:
        radial-gradient(circle at top right, rgba(215, 108, 61, 0.16), transparent 28%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(244, 248, 246, 0.92));
}

.calendar-hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.calendar-hero-top p {
    margin: 6px 0 0;
    max-width: 620px;
}

.calendar-summary-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.calendar-metric {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(24, 34, 41, 0.08);
    border-radius: 16px;
    padding: 14px;
    display: grid;
    gap: 4px;
}

.calendar-metric strong {
    font-size: 24px;
}

.calendar-metric span {
    color: #5e6a70;
    font-size: 13px;
}

.calendar-board-panel {
    position: relative;
    overflow: hidden;
}

.calendar-grid {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
}

.calendar-weekdays {
    margin-bottom: 10px;
}

.calendar-weekday {
    padding: 0 4px;
    font-size: 12px;
    font-weight: 700;
    color: #5e6a70;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.calendar-cell {
    min-height: 150px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 249, 247, 0.86));
    border: 1px solid rgba(24, 34, 41, 0.08);
    border-radius: 16px;
    padding: 12px;
    display: grid;
    gap: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.calendar-cell.outside-month {
    opacity: 0.55;
}

.calendar-cell.today {
    border-color: rgba(215, 108, 61, 0.45);
    box-shadow: inset 0 0 0 1px rgba(215, 108, 61, 0.25);
}

.calendar-cell-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.calendar-day-number {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #edf2ef;
    font-weight: 700;
}

.calendar-day-count {
    min-width: 28px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(24, 34, 41, 0.08);
    color: #314148;
    font-size: 12px;
    text-align: center;
}

.calendar-task-list {
    display: grid;
    gap: 8px;
    align-content: start;
}

.calendar-task-chip {
    display: grid;
    gap: 2px;
    padding: 8px 10px;
    border-radius: 14px;
    border: 1px solid rgba(24, 34, 41, 0.08);
    background: rgba(245, 248, 246, 0.96);
    transition: transform 140ms ease, box-shadow 140ms ease;
    font-size: 12px;
    line-height: 1.25;
}

.calendar-chip-title {
    font-weight: 600;
}

.calendar-task-chip small {
    color: #5e6a70;
    font-size: 11px;
}

.calendar-chip-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.calendar-chip-context {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.calendar-chip-context::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex: 0 0 auto;
}

.calendar-chip-context.task {
    color: #4b647a;
}

.calendar-chip-context.task::before {
    background: #577590;
}

.calendar-chip-context.project {
    color: #9b4b2a;
    font-weight: 700;
}

.calendar-chip-context.project::before {
    background: #d76c3d;
}

.calendar-chip-meta span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-task-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(18, 32, 41, 0.08);
}

.calendar-task-chip.todo {
    border-left: 4px solid #577590;
}

.calendar-task-chip.progress {
    border-left: 4px solid #4f9d87;
}

.calendar-task-chip.blocked {
    border-left: 4px solid #ab3b3b;
}

.calendar-task-chip.done {
    border-left: 4px solid #8aa29e;
}

.calendar-task-chip.project-deadline {
    background: linear-gradient(135deg, rgba(215, 108, 61, 0.12), rgba(255, 255, 255, 0.95));
    border-left-color: #d76c3d;
}

.calendar-more {
    font-size: 12px;
}

.calendar-empty-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(24, 34, 41, 0.14);
    margin-top: 6px;
}

.calendar-empty-state {
    margin-top: 16px;
    padding: 18px 20px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(245, 248, 246, 0.95), rgba(255, 255, 255, 0.9));
    border: 1px dashed rgba(24, 34, 41, 0.14);
    text-align: center;
}

.timesheet-filter {
    margin-bottom: 18px;
}

.timesheet-days,
.timesheet-entry-list {
    display: grid;
    gap: 12px;
}

.timesheet-day-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(245, 248, 246, 0.88));
    border: 1px solid rgba(24, 34, 41, 0.08);
    border-radius: 14px;
    padding: 14px;
    display: grid;
    gap: 10px;
}

.timesheet-entry {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(24, 34, 41, 0.08);
}

.timesheet-entry:first-child {
    padding-top: 0;
    border-top: none;
}

.timesheet-rhythm {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
    gap: 12px;
    align-items: end;
    min-height: 220px;
}

.timesheet-rhythm-bar {
    display: grid;
    gap: 8px;
    justify-items: center;
}

.timesheet-rhythm-track {
    height: 150px;
    width: 100%;
    max-width: 54px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(24, 34, 41, 0.06), rgba(24, 34, 41, 0.12));
    padding: 6px;
    display: flex;
    align-items: flex-end;
}

.timesheet-rhythm-fill {
    width: 100%;
    border-radius: 14px;
    background: linear-gradient(180deg, #4f9d87, #d76c3d);
    min-height: 8px;
}

.timesheet-total-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(79, 157, 135, 0.12);
    color: #215c4a;
    font-size: 12px;
    font-weight: 700;
}

@media (max-width: 1100px) {
    .calendar-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .calendar-weekdays {
        display: none;
    }
}

@media (max-width: 760px) {
    .calendar-grid,
    .search-form {
        grid-template-columns: 1fr;
    }

    .calendar-hero-top {
        align-items: stretch;
    }

    .timesheet-rhythm {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.compact-controls {
    align-items: center;
    gap: 8px;
}

.compact-controls select,
.compact-controls input {
    width: auto;
    min-width: 110px;
    padding: 8px 10px;
}

.compact-actions {
    justify-content: flex-start;
    gap: 8px;
}

.project-card-actions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-start;
    gap: 8px;
}

.project-details-panel {
    margin-top: 20px;
}

.project-health-panel,
.project-summary-panel {
    margin-top: 20px;
}

.compact-health-grid {
    margin: 12px 0;
}

.project-hero {
    display: grid;
    gap: 14px;
}

.compact-blurb {
    max-width: 720px;
}

.hero-progress-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-progress-copy {
    display: grid;
    gap: 4px;
}

.compact-progress {
    margin: 0;
    height: 8px;
}

.project-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.compact-panel {
    padding: 16px;
}

.project-support-grid {
    margin: 20px 0;
}

.milestone-roadmap-strip {
    margin-top: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 248, 0.92)),
        radial-gradient(circle at top right, rgba(79, 157, 135, 0.12), transparent 28%);
}

.milestone-roadmap-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 1fr);
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}

.milestone-roadmap-card {
    position: relative;
    display: grid;
    gap: 10px;
    min-height: 150px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(24, 34, 41, 0.08);
    box-shadow: 0 16px 36px rgba(18, 32, 41, 0.06);
    color: inherit;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.milestone-roadmap-card:hover {
    transform: translateY(-2px);
    border-color: rgba(79, 157, 135, 0.28);
    box-shadow: 0 18px 38px rgba(18, 32, 41, 0.1);
}

.milestone-roadmap-card::after {
    content: "";
    position: absolute;
    top: 26px;
    left: calc(100% + 8px);
    width: 18px;
    height: 2px;
    background: linear-gradient(90deg, rgba(79, 157, 135, 0.45), rgba(24, 34, 41, 0.12));
}

.milestone-roadmap-card:last-child::after {
    display: none;
}

.milestone-roadmap-top {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.milestone-roadmap-title {
    display: block;
    line-height: 1.3;
}

.milestone-roadmap-date {
    margin: 0;
    font-size: 13px;
}

.milestone-roadmap-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.milestone-section {
    background:
        radial-gradient(circle at top right, rgba(79, 157, 135, 0.12), transparent 24%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 250, 248, 0.92));
}

.milestone-tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.milestone-tool-panel {
    background: rgba(255, 255, 255, 0.8);
}

.milestone-template-list {
    margin-top: 10px;
}

.milestone-template-card {
    background: rgba(247, 250, 248, 0.92);
}

.milestone-empty-state {
    margin-top: 18px;
}

.milestone-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.milestone-card {
    position: relative;
    overflow: hidden;
    scroll-margin-top: 96px;
}

.milestone-card:target {
    border-color: rgba(79, 157, 135, 0.34);
    box-shadow: 0 0 0 3px rgba(79, 157, 135, 0.14), 0 18px 36px rgba(18, 32, 41, 0.1);
}

.milestone-card::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 18px;
    bottom: 18px;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(79, 157, 135, 0.95), rgba(215, 108, 61, 0.55));
}

.milestone-card form {
    padding-left: 16px;
}

.milestone-card-top {
    align-items: flex-start;
}

.milestone-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.milestone-roadmap-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex: 0 0 auto;
    box-shadow: 0 0 0 4px rgba(24, 34, 41, 0.06);
}

.milestone-roadmap-dot.todo {
    background: #577590;
}

.milestone-roadmap-dot.progress {
    background: #4f9d87;
}

.milestone-roadmap-dot.blocked {
    background: #ab3b3b;
}

.milestone-roadmap-dot.done {
    background: #8aa29e;
}

.milestone-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.milestone-stat-chip {
    background: rgba(245, 248, 246, 0.95);
    border: 1px solid rgba(24, 34, 41, 0.08);
    border-radius: 14px;
    padding: 10px 12px;
    display: grid;
    gap: 3px;
}

.milestone-stat-chip strong {
    font-size: 14px;
}

.milestone-stat-chip span {
    font-size: 12px;
    color: #5e6a70;
}

.milestone-control-row {
    align-items: center;
}

.compact-field-group {
    display: grid;
    gap: 6px;
    margin-top: 8px;
}

.compact-field-group-inline {
    min-width: min(280px, 100%);
}

.compact-field-label {
    font-size: 13px;
    font-weight: 700;
    color: #223038;
}

.compact-field-help {
    margin: 0;
    font-size: 12px;
    color: #5e6a70;
}

.dependency-picker {
    margin-top: 10px;
}

.dependency-search {
    width: 100%;
}

.dependency-selected {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.dependency-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    background: rgba(79, 157, 135, 0.12);
    color: #23453c;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 700;
}

.dependency-chip button {
    width: auto;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 14px;
    line-height: 1;
}

.dependency-options {
    display: grid;
    gap: 8px;
    max-height: 180px;
    overflow: auto;
    padding: 4px 2px 2px;
}

.dependency-options[hidden] {
    display: none;
}

.dependency-idle-hint,
.dependency-empty-hint {
    margin-top: 2px;
}

.dependency-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(24, 34, 41, 0.08);
    background: rgba(255, 255, 255, 0.9);
    color: #223038;
    text-align: left;
}

.dependency-option::after {
    content: "+";
    font-size: 16px;
    color: #5e6a70;
}

.dependency-option.selected {
    border-color: rgba(79, 157, 135, 0.28);
    background: rgba(79, 157, 135, 0.09);
}

.dependency-option.selected::after {
    content: "Added";
    font-size: 12px;
    font-weight: 700;
    color: #2d6354;
}

.dependency-option[hidden] {
    display: none;
}

.health-metrics {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    color: #314148;
    font-size: 14px;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(18, 32, 41, 0.42);
    display: grid;
    place-items: center;
    padding: 20px;
    z-index: 1200;
}

.modal-backdrop[hidden] {
    display: none !important;
}

.modal-card {
    width: min(720px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 20px;
    border: 1px solid rgba(24, 34, 41, 0.08);
    box-shadow: 0 24px 60px rgba(18, 32, 41, 0.2);
    padding: 20px;
}

.side-panel-backdrop {
    place-items: stretch end;
    padding: 0;
}

.side-panel-card {
    width: min(720px, 100vw);
    max-height: 100vh;
    min-height: 100vh;
    border-radius: 24px 0 0 24px;
    padding: 24px;
    box-shadow: -24px 0 60px rgba(18, 32, 41, 0.18);
}

.modal-close {
    width: auto;
    min-width: 38px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #e7ecef;
    color: #182229;
}

body.modal-open {
    overflow: hidden;
}

.project-details-form label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
}

.split-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.workspace-access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.workspace-access-card {
    display: grid;
    gap: 12px;
}

.member-admin-row {
    gap: 10px;
}

.member-admin-row .inline-action-form select {
    min-width: 120px;
    width: auto;
}

.member-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f5f7f7;
    border: 1px solid rgba(24, 34, 41, 0.08);
}

.member-chip input {
    width: auto;
    margin: 0;
}

.small-btn {
    width: auto;
    padding: 7px 11px;
    border-radius: 10px;
    font-size: 13px;
}

.widget-panel {
    padding: 16px;
    display: flex;
    flex-direction: column;
    min-height: 260px;
}

.widget-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-top: 1px solid rgba(24, 34, 41, 0.08);
}

.widget-item:first-of-type {
    border-top: none;
}

.widget-item.stacked {
    display: grid;
    justify-content: stretch;
}

.dashboard-task-item {
    gap: 8px;
    align-content: start;
}

.dashboard-task-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.dashboard-task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dashboard-task-meta .pill {
    max-width: 100%;
}

.dashboard-task-reason {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.widget-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(24, 34, 41, 0.08);
}

.widget-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #395364;
}

.widget-footer-link:hover {
    color: #182229;
}

.pill.neutral-pill {
    background: #eef3f6;
    color: #4d6472;
}

.widget-link {
    border-radius: 12px;
    transition: background 0.18s ease, transform 0.18s ease;
}

.widget-link:hover {
    background: rgba(24, 34, 41, 0.04);
    transform: translateY(-1px);
}

.workspace-list-form {
    display: grid;
    gap: 10px;
}

.invite-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(24, 34, 41, 0.08);
}

.workspace-select-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    background: #fff;
    color: #182229;
    border: 1px solid rgba(24, 34, 41, 0.08);
}

.nested-panel {
    display: grid;
    gap: 12px;
}

.inactive-workspaces {
    margin-top: 12px;
}

.inactive-card {
    opacity: 0.65;
    cursor: default;
}

.admin-action {
    display: flex;
    align-items: flex-end;
}

.inline-action-form {
    display: flex;
    gap: 8px;
    width: auto;
    justify-content: flex-start;
}

.inline-action-form button {
    width: auto;
}

.tenant-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin-top: 20px;
}

.tenant-card {
    display: grid;
    gap: 14px;
}

.tenant-meta,
.tenant-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tenant-meta {
    color: #5e6a70;
    font-size: 14px;
}

.tenant-actions form {
    width: auto;
}

.pill-row {
    display: flex;
    gap: 8px;
    margin: 8px 0 2px;
    flex-wrap: wrap;
}

.pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
}

.pill.overdue {
    background: #f6d6d8;
    color: #8c2027;
}

.pill.due-soon {
    background: #ffe5be;
    color: #8a4f00;
}

.pill.blocked-note {
    background: #e7ecef;
    color: #314148;
    max-width: 100%;
}

.pill.assignee-pill {
    background: #ddeaf7;
    color: #18456d;
}

.view-switch {
    display: inline-flex;
    gap: 8px;
    margin-top: 14px;
}

.view-switch a,
.link-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 8px 12px;
    background: #e7ecef;
    font-size: 14px;
}

.link-chip.subtle {
    background: #eef2f3;
}

.view-switch a.active {
    background: #122029;
    color: #fff;
}

.project-card.static {
    cursor: default;
}

.progress {
    height: 10px;
    background: #dbe5e0;
    border-radius: 999px;
    overflow: hidden;
    margin: 12px 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #d76c3d, #4f9d87);
}

.badge {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    text-transform: capitalize;
}

.badge.todo {
    background: #e7ecef;
}

.badge.progress {
    background: #ffe7c2;
}

.badge.done {
    background: #d7f0df;
}

.badge.blocked {
    background: #f8d7da;
}

input,
textarea,
select,
button {
    width: 100%;
    box-sizing: border-box;
    border-radius: 12px;
    border: 1px solid #cfd8dc;
    padding: 11px 12px;
    font: inherit;
}

textarea {
    resize: vertical;
    min-height: 90px;
}

button {
    background: #122029;
    color: #fff;
    border: none;
    cursor: pointer;
}

button.secondary {
    background: #d76c3d;
}

button.danger {
    background: #ab3b3b;
}

button.disabled,
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

form {
    display: grid;
    gap: 12px;
}

.flash {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 18px;
}

.flash.success {
    background: #dff3e6;
}

.flash.error {
    background: #f7d9dc;
}

.auth-card {
    max-width: 420px;
    margin: 10vh auto 0;
}

.floating-timer {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #122029;
    color: #fff;
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
    transition: padding 0.2s ease, gap 0.2s ease, transform 0.2s ease;
    z-index: 20;
}

.floating-timer-copy {
    display: grid;
    gap: 2px;
}

.floating-timer-label,
.floating-timer-task {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.72);
}

.floating-timer-meta {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.58);
}

.floating-timer-elapsed {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #fff;
}

.floating-timer.is-live {
    align-items: center;
}

.floating-timer.is-paused {
    background: #26414d;
}

.floating-timer-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.floating-timer-actions button {
    white-space: nowrap;
}

.floating-timer.is-collapsed {
    padding: 12px 14px;
    gap: 0;
    cursor: pointer;
}

.floating-timer.is-collapsed .floating-timer-label,
.floating-timer.is-collapsed .floating-timer-task,
.floating-timer.is-collapsed .floating-timer-meta,
.floating-timer.is-collapsed .floating-timer-actions {
    display: none;
}

.floating-timer.is-collapsed .floating-timer-copy {
    gap: 0;
}

.toast-container {
    position: fixed;
    right: 20px;
    top: 20px;
    display: grid;
    gap: 10px;
    z-index: 1000;
}

.toast {
    padding: 12px 14px;
    border-radius: 14px;
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.success {
    background: #1d6a54;
}

.toast.error {
    background: #a63c44;
}

.toast.hide {
    opacity: 0;
    transform: translateY(-6px);
}

.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(18, 32, 41, 0.28);
    display: grid;
    place-items: center;
    z-index: 1200;
    padding: 20px;
}

.confirm-dialog {
    width: min(420px, 100%);
    display: grid;
    gap: 14px;
    padding: 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(24, 34, 41, 0.08);
    box-shadow: 0 16px 40px rgba(18, 32, 41, 0.18);
}

.confirm-dialog h4,
.confirm-dialog p {
    margin: 0;
}

.confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(240px, 1fr));
    gap: 16px;
    align-items: start;
}

.project-kanban-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 16px;
    align-items: start;
}

.kanban-panel {
    padding: 16px;
}

.kanban-column {
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(24, 34, 41, 0.08);
    border-radius: 18px;
    padding: 14px;
}

.kanban-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.kanban-dropzone {
    min-height: 200px;
    display: grid;
    gap: 12px;
}

.kanban-dropzone.drag-over {
    background: rgba(215, 108, 61, 0.08);
    border-radius: 14px;
}

.kanban-card {
    background: #fff;
    border-radius: 16px;
    padding: 12px;
    border: 1px solid rgba(24, 34, 41, 0.08);
    box-shadow: 0 8px 24px rgba(18, 32, 41, 0.08);
    cursor: grab;
}

.kanban-card p {
    margin: 8px 0;
    font-size: 14px;
    color: #4d5a60;
}

.kanban-card .task-actions {
    justify-content: flex-start;
}

.kanban-card button.secondary,
.kanban-card .link-chip {
    width: auto;
    padding: 6px 10px;
    font-size: 13px;
}

.kanban-card.dragging {
    opacity: 0.55;
}

.project-kanban-card {
    cursor: grab;
}

@media (max-width: 960px) {
    .shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: 1;
        position: relative;
        top: auto;
        z-index: 20;
        padding: 16px 16px 12px;
        gap: 12px;
    }

    .sidebar h1 {
        margin: 0 0 6px;
        font-size: 30px;
    }

    .sidebar > div .muted {
        display: none;
    }

    .mobile-menu-toggle {
        display: inline-block;
    }

    .content {
        order: 2;
        padding: 18px;
    }

    .nav {
        display: none;
    }

    .nav a {
        white-space: normal;
        text-align: left;
        padding: 11px 10px;
        border-radius: 14px;
        font-size: 14px;
    }

    .sidebar.menu-open .nav {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .create-project-drawer > summary {
        display: block;
        list-style: none;
        cursor: pointer;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 16px;
        padding: 14px 16px;
        font-weight: 700;
    }

    .create-project-drawer > summary::after {
        content: "+";
        float: right;
        font-size: 18px;
        line-height: 1;
    }

    .create-project-drawer[open] > summary::after {
        content: "-";
    }

    .create-project-drawer > .panel {
        margin-top: 10px;
    }

    .create-project-drawer {
        display: none;
    }

    .sidebar.menu-open .create-project-drawer {
        display: block;
    }

    .create-project-drawer:not([open]) > .panel {
        display: none;
    }

    .floating-timer {
        left: 16px;
        right: 16px;
        justify-content: space-between;
        border-radius: 18px;
    }

    .kanban-board {
        grid-template-columns: 1fr;
    }

    .project-kanban-board {
        grid-template-columns: 1fr;
    }

    .milestone-roadmap-track {
        grid-auto-columns: minmax(190px, 78vw);
    }

    .milestone-roadmap-card {
        min-height: 138px;
    }

    .side-panel-card {
        width: 100vw;
        border-radius: 0;
        padding: 18px;
    }
}

@media (min-width: 961px) {
    .create-project-drawer:not([open]) > .panel {
        display: block;
    }
}
