html {
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, sans-serif;
    background: #f4f7fb;
    color: #1b2432;
    overflow-x: hidden;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

.shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(31, 115, 255, 0.08), transparent 24%),
        linear-gradient(180deg, #f7f9fc 0%, #f2f5fa 100%);
}

.shell.auth-shell {
    grid-template-columns: 1fr;
}

.sidebar {
    background: #ffffff;
    color: #24324a;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-right: 1px solid rgba(36, 50, 74, 0.08);
    box-shadow: 12px 0 36px rgba(17, 37, 66, 0.05);
}

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

.sidebar-brand-mark {
    flex: 1 1 auto;
    padding: 14px 16px;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f5f8ff 100%);
    border: 1px solid rgba(36, 50, 74, 0.08);
    box-shadow: 0 16px 30px rgba(17, 37, 66, 0.08);
}

.sidebar-brand-logo {
    display: block;
    width: 100%;
    height: 62px;
    object-fit: contain;
    object-position: left center;
}

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

.nav-groups {
    gap: 14px;
}

.nav-group {
    display: grid;
    gap: 10px;
}

.nav-group-summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 2px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #7a8aa2;
    cursor: pointer;
}

.nav-group-summary::-webkit-details-marker {
    display: none;
}

.nav-group-summary::after {
    content: "";
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-right: 2px solid #9aabc3;
    border-bottom: 2px solid #9aabc3;
    transform: rotate(45deg);
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.nav-group[open] > .nav-group-summary::after {
    transform: rotate(225deg);
    border-color: #2561d7;
}

.nav-group-links {
    display: grid;
    gap: 10px;
}

.nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f6f8fc;
    border: 1px solid rgba(36, 50, 74, 0.04);
    color: #385074;
    font-weight: 600;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.nav a.active,
.nav a:hover {
    background: linear-gradient(135deg, #eef4ff 0%, #ffffff 100%);
    color: #1b3f8b;
    box-shadow: 0 12px 24px rgba(17, 37, 66, 0.08);
    transform: translateX(2px);
}

.nav-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(30, 117, 255, 0.1), rgba(75, 142, 255, 0.16));
    color: #2561d7;
    font-size: 15px;
    line-height: 1;
    flex: 0 0 auto;
}

.mobile-menu-toggle {
    display: none;
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 12px;
    border: 1px solid rgba(36, 50, 74, 0.08);
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(17, 37, 66, 0.08);
}

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

.content {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 28px 32px;
}

.content.auth-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

.content.auth-content .topbar {
    width: min(340px, 100%);
    margin-bottom: 18px;
    padding: 0;
}

.content.auth-content .topbar-brand {
    width: 100%;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.content.auth-content > * {
    width: min(360px, 100%);
    max-width: 100%;
}

.content.auth-content .auth-card {
    width: min(340px, 100%);
}

.site-footer {
    display: flex;
    justify-content: center;
    gap: 18px;
    padding: 0 28px 24px;
    font-size: 14px;
    color: #718097;
}

.site-footer a {
    color: #4b6388;
}

.site-footer a:hover {
    color: #1b2432;
}

.topbar {
    margin-bottom: 20px;
    width: 100%;
    padding: 8px 4px 18px;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    justify-content: space-between;
    padding: 14px 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(31, 48, 79, 0.08);
    box-shadow: 0 10px 24px rgba(17, 37, 66, 0.06);
}

.topbar-company-logo-wrap {
    width: 72px;
    height: 72px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    padding: 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(24, 34, 41, 0.08);
    box-shadow: 0 12px 28px rgba(18, 32, 41, 0.08);
}

.topbar-company-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.muted {
    color: #5e6a70;
}

.panel,
.auth-card,
.stat-card,
.project-card,
.task-card {
    background: #ffffff;
    border: 1px solid rgba(31, 48, 79, 0.08);
    border-radius: 22px;
    box-shadow: 0 14px 32px rgba(17, 37, 66, 0.08);
}

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

.auth-topbar {
    display: grid;
    justify-items: center;
    gap: 0;
    text-align: center;
    width: 100%;
}

.auth-brand-logo {
    display: block;
    width: min(300px, 100%);
    height: 84px;
    object-fit: contain;
    object-position: center;
    margin: 0 auto;
}

.auth-language-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
}

.auth-language-switch span {
    font-size: 13px;
}

.auth-language-switch-buttons {
    display: inline-flex;
    padding: 3px;
    border-radius: 999px;
    background: rgba(18, 32, 41, 0.08);
}

.auth-language-switch-buttons button {
    border: 0;
    background: transparent;
    color: #395364;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.auth-language-switch-buttons button.active {
    background: #122029;
    color: #fff;
}

.client-status-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(79, 157, 135, 0.14), transparent 28%),
        linear-gradient(180deg, #f5efe6 0%, #edf4f0 100%);
}

.client-status-shell {
    width: min(1040px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0 64px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-copyright-footer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    padding: 7px 14px;
    margin: auto auto 0;
    text-align: center;
    font-size: 12px;
    color: #6b778c;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(36, 50, 74, 0.1);
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(18, 32, 41, 0.08);
    backdrop-filter: blur(8px);
    align-self: center;
}

.content > .app-copyright-footer {
    margin-top: 24px;
}

.client-status-shell > .app-copyright-footer {
    margin-top: 28px;
}

.client-status-panel {
    display: grid;
    gap: 22px;
    padding: 28px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 247, 0.94)),
        radial-gradient(circle at bottom left, rgba(79, 157, 135, 0.08), transparent 30%);
    border-radius: 28px;
    box-shadow:
        0 30px 80px rgba(18, 32, 41, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.client-status-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.9fr);
    gap: 28px;
    padding: 28px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(79, 157, 135, 0.18), transparent 38%),
        radial-gradient(circle at left center, rgba(215, 108, 61, 0.08), transparent 26%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(241, 247, 244, 0.94));
    border: 1px solid rgba(24, 34, 41, 0.08);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.68),
        0 16px 36px rgba(18, 32, 41, 0.08);
}

.client-status-hero-copy {
    display: grid;
    gap: 14px;
    align-content: start;
}

.client-status-title {
    margin: 0;
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1.02;
    letter-spacing: -0.03em;
}

.client-status-description {
    margin: 0;
    max-width: 56ch;
}

.client-status-description {
    color: #5e6a70;
    font-size: 15px;
}

.client-status-state {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(79, 157, 135, 0.1);
    color: #1f5c4e;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.client-status-hero-side {
    display: grid;
    gap: 16px;
    align-content: start;
    justify-items: stretch;
}

.client-status-progress-card {
    display: grid;
    gap: 10px;
    padding: 22px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(24, 34, 41, 0.08);
    box-shadow: 0 14px 30px rgba(18, 32, 41, 0.08);
}

.client-status-progress-card strong {
    font-size: 42px;
    line-height: 1;
    letter-spacing: -0.04em;
}

.client-status-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 132px;
    height: 80px;
    margin-bottom: 4px;
    padding: 12px 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(24, 34, 41, 0.08);
    box-shadow: 0 18px 42px rgba(18, 32, 41, 0.1);
}

.client-status-brand-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.client-status-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.client-status-summary-grid .stat-card {
    position: relative;
    overflow: hidden;
    padding: 22px 20px;
    min-height: 116px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 248, 0.9));
}

.client-status-summary-grid .stat-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, rgba(215, 108, 61, 0.82), rgba(79, 157, 135, 0.82));
}

.client-status-summary-grid .stat-card strong {
    font-size: 32px;
    letter-spacing: -0.03em;
}

.client-status-summary-grid .stat-card span {
    font-size: 15px;
    color: #42555d;
}

.client-status-progress {
    height: 12px;
    margin: 0;
}

.client-status-stack {
    display: grid;
    gap: 16px;
}

.client-status-milestone-grid,
.client-update-grid {
    display: grid;
    gap: 12px;
}

.client-status-card {
    background: rgba(247, 250, 248, 0.88);
    border: 1px solid rgba(24, 34, 41, 0.08);
    border-radius: 20px;
    padding: 20px;
    display: grid;
    gap: 12px;
    box-shadow: 0 10px 24px rgba(18, 32, 41, 0.04);
}

.client-status-card p,
.client-status-card .muted {
    margin: 0;
}

.client-status-card .task-meta {
    justify-content: flex-start;
    gap: 14px;
}

.client-status-update-body {
    margin: 0;
    color: #223038;
    white-space: pre-wrap;
    line-height: 1.65;
}

.client-status-milestone-grid .client-status-card,
.client-update-grid .client-status-card {
    background: rgba(255, 255, 255, 0.9);
}

.client-update-grid .client-status-card {
    position: relative;
    padding-left: 24px;
}

.client-update-grid .client-status-card::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 20px;
    bottom: 20px;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(215, 108, 61, 0.85), rgba(79, 157, 135, 0.65));
}

.client-status-stack > .client-status-card:first-child {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 248, 0.9));
}

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

.client-share-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.client-share-link-input {
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
}

.client-update-list {
    display: grid;
    gap: 10px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
}

.client-update-card {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(24, 34, 41, 0.08);
    border-radius: 14px;
    padding: 14px;
    display: grid;
    gap: 10px;
}

.client-update-card p {
    margin: 0;
    white-space: pre-wrap;
}

.client-share-empty {
    margin: 0;
}

@media (max-width: 860px) {
    .client-status-shell {
        width: min(100%, calc(100% - 20px));
        padding: 20px 0 36px;
    }

    .client-status-panel {
        padding: 18px;
    }

    .client-status-hero {
        grid-template-columns: 1fr;
        padding: 18px;
        gap: 18px;
    }

    .client-status-title {
        font-size: 30px;
    }

    .client-status-progress-card strong {
        font-size: 34px;
    }
}

.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: 190px 170px 170px max-content;
    gap: 14px;
    align-items: end;
    margin-top: 18px;
    justify-content: flex-start;
    width: 100%;
}

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

.capacity-planner-form input[type="date"],
.capacity-planner-form input[type="number"] {
    width: 100%;
    min-width: 0;
}

.capacity-planner-form button {
    width: auto;
    min-width: 160px;
}

.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;
    overflow: hidden;
}

.capacity-timeline-scroll {
    margin-top: 16px;
    overflow: auto;
    max-width: 100%;
    max-height: 70vh;
}

.capacity-timeline-grid {
    display: grid;
    grid-template-columns: 124px repeat(28, minmax(42px, 1fr));
    gap: 6px;
    align-items: stretch;
    width: max-content;
    min-width: 100%;
}

.capacity-timeline-header,
.capacity-timeline-person,
.capacity-day-cell {
    min-height: 64px;
    border-radius: 12px;
    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: 8px 4px;
    font-size: 11px;
    color: #415159;
    position: sticky;
    top: 0;
    z-index: 3;
}

.capacity-timeline-header strong {
    font-size: 12px;
    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-header.capacity-timeline-sticky {
    z-index: 5;
}

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

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

.capacity-day-track {
    height: 8px;
    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: 11px;
    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);
}

@media (max-width: 1200px) {
    .capacity-planner-form {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .capacity-planner-form button {
        min-width: 0;
    }
}

.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: 0;
    overflow: hidden;
}

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

.task-editor-accordion {
    display: grid;
}

.task-editor-summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 18px 20px;
    cursor: pointer;
}

.task-editor-summary::-webkit-details-marker {
    display: none;
}

.task-editor-summary::after {
    content: "";
    width: 10px;
    height: 10px;
    margin-left: auto;
    border-right: 2px solid #718097;
    border-bottom: 2px solid #718097;
    transform: rotate(45deg);
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.task-editor-accordion[open] > .task-editor-summary::after {
    transform: rotate(225deg);
    border-color: #2561d7;
}

.task-editor-summary-title {
    font-size: 16px;
    line-height: 1.35;
}

.task-editor-body {
    padding: 0 20px 20px;
}

.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: 14px;
    margin-top: 14px;
}

.task-support-card {
    background: linear-gradient(180deg, #fbfcff 0%, #f5f8fd 100%);
    border: 1px solid rgba(31, 48, 79, 0.08);
    border-radius: 18px;
    padding: 14px;
    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: #ffffff;
    border: 1px solid rgba(31, 48, 79, 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;
}

.project-dashboard-toolbar {
    grid-template-columns: minmax(240px, 1fr) repeat(4, minmax(160px, 220px)) auto;
    align-items: center;
}

.project-dashboard-toolbar select {
    min-width: 180px;
}

.project-dashboard-toolbar .small-btn {
    width: auto;
    min-width: 96px;
    justify-self: start;
    padding-inline: 18px;
}

.project-index-shell {
    display: grid;
    gap: 18px;
}

.project-index-shell > .panel-head {
    margin-bottom: 0;
}

.project-index-item {
    border-radius: 20px;
    padding: 18px 20px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.project-index-item:hover {
    transform: translateY(-2px);
    border-color: rgba(37, 97, 215, 0.16);
    box-shadow: 0 18px 34px rgba(17, 37, 66, 0.1);
}

.project-index-item h4 {
    margin: 0;
}

.project-create-panel {
    margin-top: 10px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

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

.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: 12px;
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

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

.company-branding-row {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.company-branding-preview {
    width: 150px;
    height: 96px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    padding: 14px 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(24, 34, 41, 0.08);
    box-shadow: 0 14px 34px rgba(18, 32, 41, 0.08);
}

.company-branding-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.company-branding-form-wrap {
    display: grid;
    gap: 10px;
    min-width: min(420px, 100%);
    flex: 1 1 320px;
}

.company-branding-form {
    display: grid;
    gap: 10px;
}

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

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

.project-hero {
    display: grid;
    gap: 10px;
    padding: 18px 20px;
    color: #ffffff;
    background:
        radial-gradient(circle at top left, rgba(110, 175, 255, 0.28), transparent 28%),
        linear-gradient(135deg, #16233f 0%, #273458 54%, #3666d5 100%);
    box-shadow: 0 22px 44px rgba(17, 37, 66, 0.18);
}

.project-hero .panel-head {
    margin-bottom: 2px;
}

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

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

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

.project-hero .muted,
.project-hero .project-meta,
.project-hero .project-meta strong,
.project-hero .hero-progress-copy,
.project-hero .hero-progress-copy strong {
    color: rgba(255, 255, 255, 0.88);
}

.project-hero .badge {
    background: rgba(255, 239, 205, 0.96);
    color: #7c4d02;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.project-hero .health-metrics {
    color: rgba(255, 255, 255, 0.8);
}

.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;
}

.content .panel + .panel {
    margin-top: 18px;
}

.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: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
}

.project-health-inline {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.hero-health-inline {
    gap: 8px;
    margin-bottom: 4px;
}

.compact-status-pill {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    color: #17324f;
}

.roadmap-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.roadmap-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(24, 34, 41, 0.08);
    background: rgba(255, 255, 255, 0.9);
    color: #182229;
    box-shadow: 0 10px 24px rgba(18, 32, 41, 0.08);
}

.roadmap-nav-btn:hover {
    background: rgba(242, 247, 245, 0.98);
    border-color: rgba(79, 157, 135, 0.25);
}

.milestone-roadmap-card {
    position: relative;
    display: grid;
    gap: 10px;
    flex: 0 0 min(280px, calc(100vw - 96px));
    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-align: left;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    scroll-snap-align: start;
}

.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-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.milestone-apply-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 420px;
    flex-wrap: wrap;
}

.milestone-apply-form select {
    min-width: min(360px, 100%);
    flex: 1 1 260px;
}

.milestone-toolbar-actions {
    margin-left: auto;
}

.milestone-toolbar-help {
    margin: 10px 0 0;
}

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

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

.milestone-template-compact-list .widget-item {
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
}

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

.milestone-roadmap-open {
    justify-self: start;
}

.milestone-side-summary {
    margin-bottom: 18px;
}

.process-checklist-table {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.process-checklist-row {
    display: grid;
    grid-template-columns: minmax(120px, 0.85fr) minmax(180px, 1.35fr) minmax(170px, 1.1fr) minmax(135px, 0.85fr) minmax(180px, 1.2fr) minmax(170px, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 10px 12px 10px 16px;
    border-radius: 14px;
    background: rgba(247, 250, 248, 0.92);
    border: 1px solid rgba(24, 34, 41, 0.08);
}

.process-checklist-head {
    background: transparent;
    border: none;
    padding: 0 12px 0 16px;
    color: #627178;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.process-checklist-cell {
    min-width: 0;
}

.process-checklist-cell input {
    margin: 0;
}

.process-checklist-done {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.process-checklist-toggle {
    margin: 0;
}

.process-checklist-completed {
    font-size: 13px;
    color: #627178;
}

.process-checklist-action {
    display: flex;
    justify-content: flex-end;
}

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

.process-checklist-row {
    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;
}

@media (max-width: 1280px) {
    .process-checklist-head {
        display: none;
    }

    .process-checklist-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .process-checklist-row {
        grid-template-columns: 1fr;
    }

    .process-checklist-action {
        justify-content: flex-start;
    }
}

.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;
}

.project-comment-backdrop {
    place-items: center;
    overflow: hidden;
}

.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;
}

.modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.modal-head h3,
.modal-head p {
    margin: 0;
}

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

.modal-card.project-comment-modal {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: min(700px, calc(100vh - 72px));
    overflow: hidden;
    margin: 0 auto;
    transform: translateY(-6vh);
}

.project-comment-modal {
    min-height: 0;
}

.project-comment-inline-form {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.project-comment-inline-form[hidden] {
    display: none !important;
}

.project-comment-inline-form textarea {
    width: 100%;
    min-height: 78px;
}

.project-comment-body {
    display: grid;
    gap: 6px;
}

.project-comment-author {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.project-comment-text {
    white-space: pre-wrap;
}

.project-comment-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.mention-input-wrap {
    position: relative;
}

.mention-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 5;
    display: grid;
    gap: 6px;
    padding: 8px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(24, 34, 41, 0.1);
    box-shadow: 0 16px 32px rgba(18, 32, 41, 0.14);
}

.mention-menu[hidden] {
    display: none !important;
}

.mention-option {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f3f6f7;
    color: #182229;
    text-align: left;
}

.mention-option:hover {
    background: #e6edef;
}

.mention-option strong,
.mention-option span {
    margin: 0;
}

.project-comment-table-wrap {
    flex: 0 0 auto;
    height: min(320px, 36vh);
    overflow-y: auto;
    overflow-x: auto;
    border: 1px solid rgba(24, 34, 41, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
}

.project-comment-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.project-comment-table th,
.project-comment-table td {
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgba(24, 34, 41, 0.08);
}

.project-comment-table th {
    position: sticky;
    top: 0;
    background: #f6f8f9;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5e6a70;
}

.project-comment-table tr:last-child td {
    border-bottom: none;
}

.project-documents-panel {
    scroll-margin-top: 100px;
}

.documents-usage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

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

.documents-table-wrap {
    border: 1px solid rgba(24, 34, 41, 0.08);
    border-radius: 16px;
    overflow: auto;
    background: rgba(255, 255, 255, 0.72);
}

.documents-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.documents-table th,
.documents-table td {
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgba(24, 34, 41, 0.08);
}

.documents-table th {
    background: #f6f8f9;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5e6a70;
}

.documents-table tr:last-child td {
    border-bottom: none;
}

.documents-description {
    margin-top: 6px;
    color: #5e6a70;
    white-space: pre-wrap;
}

.documents-visibility-form {
    display: inline-flex;
}

.documents-visibility-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: auto;
    min-width: 0;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(24, 34, 41, 0.1);
    background: #f5f7f7;
    color: #223038;
    font-size: 12px;
    font-weight: 700;
}

.documents-visibility-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.85;
}

.documents-visibility-toggle.is-visible {
    background: rgba(79, 157, 135, 0.14);
    border-color: rgba(79, 157, 135, 0.24);
    color: #2c5a4d;
}

.documents-visibility-toggle.is-hidden {
    background: rgba(24, 34, 41, 0.06);
    border-color: rgba(24, 34, 41, 0.1);
    color: #5e6a70;
}

.documents-action-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.protocol-list {
    display: grid;
    gap: 12px;
}

.protocol-card {
    border: 1px solid rgba(24, 34, 41, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    overflow: hidden;
}

.protocol-summary {
    list-style: none;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
}

.protocol-summary::-webkit-details-marker {
    display: none;
}

.protocol-summary::after {
    content: "";
    width: 10px;
    height: 10px;
    margin-left: auto;
    margin-top: 4px;
    flex: 0 0 auto;
    border-right: 2px solid #5e6a70;
    border-bottom: 2px solid #5e6a70;
    transform: rotate(45deg);
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.protocol-card[open] > .protocol-summary::after {
    transform: rotate(225deg);
}

.section-accordion {
    overflow: hidden;
}

.section-accordion-summary {
    list-style: none;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    cursor: pointer;
}

.section-accordion-summary::-webkit-details-marker {
    display: none;
}

.section-accordion-summary::after {
    content: "";
    width: 10px;
    height: 10px;
    margin-top: 6px;
    margin-left: auto;
    flex: 0 0 auto;
    border-right: 2px solid #718097;
    border-bottom: 2px solid #718097;
    transform: rotate(45deg);
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.section-accordion[open] > .section-accordion-summary::after {
    transform: rotate(225deg);
    border-color: #2561d7;
}

.section-accordion-body {
    padding: 0 20px 20px;
}

.protocol-summary-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.protocol-card-body {
    display: grid;
    gap: 12px;
    padding: 0 16px 16px;
}

.project-protocols-overview-card {
    display: grid;
    gap: 18px;
    padding: 22px 24px;
    border: 1px solid rgba(24, 34, 41, 0.08);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 255, 0.94));
    box-shadow: 0 14px 32px rgba(34, 61, 107, 0.08);
}

.project-protocols-overview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.project-protocols-overview-copy {
    display: grid;
    gap: 4px;
}

.project-protocols-overview-copy h4 {
    margin: 0;
    font-size: 1.85rem;
    line-height: 1.05;
}

.project-protocols-overview-copy p {
    margin: 0;
    max-width: 560px;
    font-size: 1rem;
}

.project-protocols-overview-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: end;
}

.project-protocols-overview-stat {
    display: grid;
    gap: 6px;
    justify-items: center;
    text-align: center;
    padding: 10px 16px;
}

.project-protocols-overview-stat strong {
    font-size: clamp(3rem, 6vw, 4.4rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
}

.project-protocols-overview-stat span {
    font-size: 1.05rem;
    font-weight: 700;
    color: #6d757f;
}

.project-protocols-overview-stat.is-completed strong {
    color: #124c1f;
}

.project-protocols-overview-stat.is-open strong {
    color: #9d4a17;
}

.project-protocols-overview-note {
    margin: 0;
    font-size: 0.95rem;
}

.protocol-open-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, #182229, #2a4ea8);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(24, 34, 41, 0.18);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.protocol-open-btn:hover,
.protocol-open-btn:focus-visible {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(24, 34, 41, 0.22);
}

.protocol-table-wrap {
    overflow-x: auto;
}

.protocol-table input,
.protocol-table select {
    min-width: 100%;
}

.protocol-form-note {
    margin-top: -2px;
}

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

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

.workspace-overview-card h4 {
    margin: 0 0 4px;
}

.workspace-overview-group {
    display: grid;
    gap: 8px;
}

.workspace-overview-group > strong {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5e6a70;
}

.my-times-hero label {
    display: grid;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #5e6a70;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.my-times-days {
    display: grid;
    gap: 16px;
}

.my-times-day .panel-head {
    align-items: flex-start;
}

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

.my-times-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 260px) auto auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(24, 34, 41, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.74);
}

.my-times-row p {
    margin: 4px 0 0;
}

.my-times-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: #5e6a70;
}

.my-times-duration {
    white-space: nowrap;
}

.time-entry-list {
    display: grid;
    gap: 12px;
}

.time-entry-summary-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
}

.time-entry-summary-pill {
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(222, 234, 247, 0.75);
    color: #1d4158;
    line-height: 1.15;
}

.time-entry-summary-pill strong {
    font-size: 15px;
}

.time-entry-summary-pill small {
    color: #5e6a70;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.time-entry-summary-pill.is-running {
    background: rgba(255, 229, 190, 0.85);
    color: #8a4f00;
}

.time-entry-list-scroll {
    max-height: 420px;
    overflow: auto;
    padding-right: 4px;
}

.side-panel-scroll.time-entry-list-scroll {
    max-height: min(48vh, 520px);
}

.time-entry-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(24, 34, 41, 0.08);
    background: rgba(255, 255, 255, 0.72);
}

.time-entry-card.is-running {
    border-color: rgba(217, 180, 74, 0.28);
    background: rgba(255, 248, 225, 0.72);
}

.time-entry-form,
.time-entry-manual-form {
    gap: 14px;
}

.time-entry-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 16px;
}

.task-time-side-panel .time-entry-fields {
    grid-template-columns: 1fr;
}

.time-entry-billing-row {
    display: grid;
    grid-template-columns: minmax(220px, 320px);
    gap: 10px;
}

.task-time-side-panel .time-entry-billing-row {
    grid-template-columns: 1fr;
}

.task-time-side-panel .time-entry-card {
    padding: 18px;
}

.task-time-side-panel {
    display: grid;
    gap: 16px;
}

.task-time-manual-card {
    margin-top: 4px;
}

.side-panel-backdrop {
    padding: 0;
}

.side-panel-card {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(720px, 100vw);
    height: 100vh;
    max-height: 100vh;
    min-height: 100vh;
    margin: 0;
    box-sizing: border-box;
    overflow: auto;
    border-radius: 24px 0 0 24px;
    padding: 24px 24px 72px;
    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: 9px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

.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;
    padding: 5px;
    border-radius: 999px;
    background: rgba(235, 241, 250, 0.92);
    border: 1px solid rgba(31, 48, 79, 0.06);
}

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

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

.project-comment-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #dde6ea;
    color: #182229;
    border: 1px solid rgba(24, 34, 41, 0.12);
}

.project-comment-trigger:hover {
    background: #d1dde3;
}

.view-switch a.active {
    background: #1f5fd5;
    color: #fff;
    box-shadow: 0 10px 18px rgba(31, 95, 213, 0.22);
}

.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;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: capitalize;
    color: #1b2432;
}

.badge.todo {
    background: #e7ecef;
}

.badge.progress {
    background: #ffe7c2;
    color: #7c4d02;
}

.badge.done {
    background: #d7f0df;
    color: #245942;
}

.badge.blocked {
    background: #f8d7da;
    color: #7c3139;
}

.badge.new-badge {
    background: #dceefc;
    color: #14507a;
}

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;
}

.flash.warning {
    background: #fff0cf;
}

.project-date-risk {
    background: #fff0cf;
    color: #7a4a00;
}

.project-date-risk-text {
    color: #7a4a00;
}

.auth-card {
    max-width: 340px;
    width: min(340px, 100%);
    margin: 0 auto;
}

.auth-card-head {
    display: grid;
    gap: 6px;
    margin-bottom: 16px;
}

.auth-card-head h3,
.auth-card-head p {
    margin: 0;
}

.auth-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    color: #5e6a70;
    font-size: 14px;
    cursor: pointer;
}

.auth-checkbox input {
    width: 16px;
    height: 16px;
    margin: 0;
}

.auth-legal-links {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 14px;
    font-size: 13px;
}

.auth-legal-links a {
    color: #5e6a70;
}

.auth-legal-links a:hover {
    color: #182229;
}

.legal-page {
    max-width: 920px;
    margin: 0 auto;
    display: grid;
    gap: 18px;
}

.legal-notice {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #fef2d9;
    border: 1px solid rgba(188, 140, 52, 0.22);
    color: #5f4a17;
}

.legal-section {
    display: grid;
    gap: 8px;
}

.legal-section h4,
.legal-section p {
    margin: 0;
}

.legal-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
}

.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-toggle {
    display: none;
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 18px;
    line-height: 1;
}

.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;
    color: #182229;
    background: #dde6ea;
    border: 1px solid rgba(24, 34, 41, 0.12);
}

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

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

@media (max-width: 960px) {
    body.auth-page {
        height: 100dvh;
        overflow: hidden;
    }

    body.auth-page .shell.auth-shell {
        min-height: 100dvh;
        height: 100dvh;
        overflow: hidden;
    }

    .shell {
        grid-template-columns: 1fr;
    }

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

    .sidebar-brand-mark {
        padding: 10px 12px;
    }

    .sidebar-brand-logo {
        height: 52px;
    }

    .topbar-company-logo-wrap {
        width: 60px;
        height: 60px;
        padding: 8px;
        border-radius: 18px;
    }

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

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

    .content.auth-content {
        display: grid;
        grid-template-columns: 1fr;
        justify-items: center;
        align-content: center;
        min-height: 100dvh;
        height: 100dvh;
        padding: 20px 0 24px;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .app-copyright-footer {
        padding: 6px 12px;
        font-size: 11px;
    }

    .content.auth-content .app-copyright-footer {
        display: none;
    }

    body.auth-page .content.auth-content > * {
        width: min(320px, calc(100vw - 96px));
        max-width: min(320px, calc(100vw - 96px));
        min-width: 0;
        margin-left: auto;
        margin-right: auto;
    }

    body.auth-page .content.auth-content .topbar {
        width: min(320px, calc(100vw - 96px));
        max-width: min(320px, calc(100vw - 96px));
        margin-bottom: 0;
        padding: 0;
    }

    .content.auth-content .topbar-brand {
        padding: 0;
        border-radius: 0;
    }

    .auth-brand-logo {
        width: min(260px, 100%);
        height: 64px;
    }

    body.auth-page .auth-card {
        width: min(320px, calc(100vw - 96px));
        max-width: min(320px, calc(100vw - 96px));
        margin-left: auto;
        margin-right: auto;
    }

    body.auth-page .flash {
        width: min(320px, calc(100vw - 96px));
        max-width: min(320px, calc(100vw - 96px));
        margin-left: auto;
        margin-right: auto;
    }

    .site-footer {
        padding: 0 18px 18px;
        flex-wrap: wrap;
    }

    .nav {
        display: none;
    }

    .sidebar.menu-open .nav-groups {
        display: grid;
        gap: 12px;
    }

    .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: 12px;
    }

    .floating-timer {
        left: auto;
        right: 14px;
        bottom: 14px;
        justify-content: flex-start;
        gap: 10px;
        padding: 10px 12px;
        border-radius: 18px;
        max-width: calc(100vw - 28px);
    }

    .floating-timer-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .floating-timer.is-mobile-collapsed {
        width: 56px;
        min-width: 56px;
        height: 56px;
        padding: 0;
        border-radius: 999px;
        justify-content: center;
    }

    .floating-timer.is-mobile-collapsed .floating-timer-copy,
    .floating-timer.is-mobile-collapsed .floating-timer-actions {
        display: none;
    }

    .floating-timer.is-mobile-collapsed .floating-timer-toggle {
        margin: 0;
        width: 56px;
        min-width: 56px;
        height: 56px;
        background: transparent;
        border: none;
    }

    .floating-timer.is-mobile-expanded {
        left: 14px;
        right: 14px;
        justify-content: space-between;
        padding: 12px 14px;
        border-radius: 18px;
    }

    .floating-timer.is-mobile-expanded .floating-timer-toggle {
        width: 38px;
        min-width: 38px;
        height: 38px;
    }

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

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

    .milestone-roadmap-card {
        flex-basis: min(240px, calc(100vw - 72px));
        min-height: 138px;
    }

    .roadmap-controls {
        display: none;
    }

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

    .my-times-row {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .my-times-meta {
        align-items: flex-start;
    }

    .project-hero {
        padding: 16px 16px 18px;
        gap: 8px;
    }

    .project-hero .panel-head {
        gap: 10px;
        margin-bottom: 4px;
    }

    .project-hero .right-meta {
        gap: 8px;
    }

    .project-hero .badge {
        padding: 6px 10px;
        font-size: 11px;
    }

    .protocol-summary {
        flex-direction: column;
    }

    .protocol-summary-meta {
        justify-content: flex-start;
    }

    .project-protocols-overview-card {
        padding: 18px;
        gap: 16px;
    }

    .project-protocols-overview-head {
        flex-direction: column;
        align-items: stretch;
    }

    .project-protocols-overview-copy h4 {
        font-size: 1.5rem;
    }

    .project-protocols-overview-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .project-protocols-overview-stat {
        justify-items: flex-start;
        text-align: left;
        padding: 0;
    }

    .project-protocols-overview-stat strong {
        font-size: 3.2rem;
    }

    .protocol-open-btn {
        width: 100%;
    }

    .time-entry-fields {
        grid-template-columns: 1fr;
    }
}
