:root {
    --ink: #102a3c;
    --muted: #667b89;
    --line: #dce5ea;
    --canvas: #f4f7f9;
    --surface: #ffffff;
    --primary: #075c88;
    --primary-dark: #064260;
    --primary-soft: #e8f3f8;
    --accent: #33a6c9;
    --success: #168561;
    --danger: #b83b4b;
    --warning: #c57917;
    --shadow: 0 24px 70px rgba(12, 48, 70, 0.14);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--canvas);
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 3px solid rgba(51, 166, 201, 0.35);
    outline-offset: 2px;
}

.auth-page {
    background: #edf3f6;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(420px, 0.92fr) minmax(520px, 1.08fr);
}

.brand-panel {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    min-height: 100vh;
    padding: clamp(40px, 6vw, 76px);
    color: #ffffff;
    background:
        radial-gradient(circle at 20% 20%, rgba(115, 190, 218, 0.4), transparent 29%),
        radial-gradient(circle at 90% 86%, rgba(89, 153, 182, 0.3), transparent 32%),
        linear-gradient(145deg, #082f49 0%, #0a5277 54%, #123e59 100%);
}

.brand-panel::before,
.brand-panel::after {
    position: absolute;
    z-index: -1;
    content: "";
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
}

.brand-panel::before {
    width: 420px;
    height: 420px;
    top: -210px;
    right: -170px;
    box-shadow: 0 0 0 80px rgba(255, 255, 255, 0.025), 0 0 0 160px rgba(255, 255, 255, 0.018);
}

.brand-panel::after {
    width: 310px;
    height: 310px;
    left: -190px;
    bottom: -150px;
    box-shadow: 0 0 0 68px rgba(255, 255, 255, 0.025);
}

.brand-logo {
    width: min(100%, 410px);
    height: auto;
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(4, 28, 43, 0.22);
}

.brand-copy {
    max-width: 610px;
    margin: auto 0;
    padding: 70px 0;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--primary);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    line-height: 1.2;
    text-transform: uppercase;
}

.eyebrow-light {
    color: #aee4f4;
}

.brand-copy h1 {
    max-width: 590px;
    margin: 0;
    font-size: clamp(2.55rem, 4.6vw, 5.25rem);
    font-weight: 650;
    letter-spacing: -0.055em;
    line-height: 0.98;
}

.brand-copy p {
    max-width: 530px;
    margin: 28px 0 0;
    color: rgba(255, 255, 255, 0.75);
    font-size: clamp(1rem, 1.4vw, 1.24rem);
    line-height: 1.7;
}

.trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 13px 24px;
    color: rgba(255, 255, 255, 0.64);
    font-size: 0.78rem;
    font-weight: 650;
    letter-spacing: 0.02em;
}

.trust-row span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.trust-row span::before {
    width: 6px;
    height: 6px;
    content: "";
    border-radius: 50%;
    background: #77d3e9;
    box-shadow: 0 0 0 4px rgba(119, 211, 233, 0.12);
}

.auth-panel {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: clamp(28px, 6vw, 92px);
    background:
        linear-gradient(rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.82)),
        radial-gradient(circle at 75% 20%, #d1e7f0, transparent 35%);
}

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

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

.mobile-logo-wrap {
    display: none;
}

.auth-card h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(1.9rem, 3vw, 2.7rem);
    font-weight: 720;
    letter-spacing: -0.045em;
    line-height: 1.1;
}

.auth-lead {
    margin: 14px 0 32px;
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.65;
}

.alert {
    margin-bottom: 22px;
    padding: 13px 15px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 0.86rem;
    line-height: 1.55;
}

.alert ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

.alert-error {
    color: #842b38;
    border-color: #f0c8cf;
    background: #fff2f4;
}

.alert-success {
    color: #116b50;
    border-color: #bce5d7;
    background: #eefbf6;
}

.auth-form {
    display: grid;
    gap: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.field {
    display: grid;
    gap: 8px;
    color: #314958;
    font-size: 0.86rem;
    font-weight: 700;
}

.field small {
    color: #7a8c97;
    font-size: 0.73rem;
    font-weight: 500;
    line-height: 1.4;
}

.field input {
    width: 100%;
    min-height: 52px;
    padding: 0 15px;
    color: var(--ink);
    border: 1px solid #ccd9e0;
    border-radius: 11px;
    outline: none;
    background: rgba(255, 255, 255, 0.88);
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field input::placeholder {
    color: #a1adb4;
}

.field input:hover {
    border-color: #9bb3c0;
}

.field input:focus {
    border-color: var(--accent);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(51, 166, 201, 0.12);
}

.password-field {
    position: relative;
    display: block;
}

.password-field input {
    padding-right: 72px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 9px;
    padding: 7px 10px;
    color: var(--primary);
    border: 0;
    border-radius: 7px;
    background: transparent;
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
    transform: translateY(-50%);
}

.password-toggle:hover {
    background: var(--primary-soft);
}

.form-meta {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: #82929c;
    font-size: 0.73rem;
}

.security-note {
    color: var(--success);
    font-weight: 700;
}

.primary-button,
.secondary-button,
.logout-button {
    border-radius: 8px;
    font-weight: 750;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.primary-button {
    min-height: 54px;
    margin-top: 2px;
    padding: 0 20px;
    color: #ffffff;
    border: 0;
    background: linear-gradient(120deg, var(--primary-dark), var(--primary));
    box-shadow: 0 13px 30px rgba(7, 92, 136, 0.22);
}

.primary-button:hover:not(:disabled) {
    box-shadow: 0 17px 36px rgba(7, 92, 136, 0.3);
    transform: translateY(-1px);
}

.primary-button:disabled,
.secondary-button:disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

.support-copy {
    margin: 26px 0 0;
    color: #85939c;
    font-size: 0.78rem;
    text-align: center;
}

.dashboard-page {
    background: var(--canvas);
}

.app-shell {
    min-height: 100vh;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 20;
    color: #ffffff;
    background: rgba(8, 42, 61, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 48px rgba(8, 42, 61, 0.16);
    backdrop-filter: blur(16px);
}

.header-inner {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    width: min(100%, 1680px);
    min-height: 74px;
    margin: 0 auto;
    padding: 10px clamp(18px, 2.2vw, 36px);
}

.header-brand {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 16px 35px rgba(4, 28, 43, 0.18);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.header-brand::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.22) 45%, transparent 70%);
    transform: translateX(-110%);
    transition: transform 550ms ease;
}

.header-brand:hover {
    box-shadow: 0 20px 42px rgba(4, 28, 43, 0.25);
    transform: translateY(-1px);
}

.header-brand:hover::after {
    transform: translateX(110%);
}

.header-brand img {
    display: block;
    width: 100%;
    height: auto;
}

.nav-state,
.menu-toggle {
    display: none;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 2px;
    min-width: 0;
}

.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 10px;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 650;
    text-decoration: none;
    transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.nav-link::after {
    position: absolute;
    right: 10px;
    bottom: 3px;
    left: 10px;
    height: 2px;
    content: "";
    border-radius: 99px;
    background: #62c5e2;
    opacity: 0;
    transform: scaleX(0.35);
    transition: opacity 180ms ease, transform 180ms ease;
}

.nav-link:not(.disabled):hover {
    color: #ffffff;
    border-color: rgba(155, 220, 237, 0.22);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 26px rgba(4, 28, 43, 0.14);
    transform: translateY(-1px);
}

.nav-link:not(.disabled):hover::after,
.nav-link.active::after {
    opacity: 1;
    transform: scaleX(1);
}

.nav-link.active {
    color: #ffffff;
    border-color: rgba(155, 220, 237, 0.24);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.08));
    box-shadow: 0 12px 30px rgba(4, 28, 43, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.nav-dropdown:not(.active):not(:hover) > .nav-dropdown-toggle {
    color: rgba(255, 255, 255, 0.58);
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

.nav-dropdown:not(.active):not(:hover) > .nav-dropdown-toggle::after {
    opacity: 0;
    transform: scaleX(0.35);
}

.nav-link.disabled {
    cursor: default;
    opacity: 0.55;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    border: 1px solid transparent;
    appearance: none;
}

.nav-caret {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.68rem;
    line-height: 1;
    transition: transform 180ms ease;
}

.nav-dropdown:hover .nav-caret,
.nav-dropdown:focus-within .nav-caret {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    z-index: 30;
    display: grid;
    min-width: 238px;
    padding: 8px;
    border: 1px solid rgba(186, 214, 226, 0.72);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 22px 48px rgba(4, 28, 43, 0.22);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 8px);
    transition: opacity 170ms ease, transform 170ms ease;
    backdrop-filter: blur(14px);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.nav-dropdown-menu::before {
    position: absolute;
    top: -7px;
    left: 50%;
    width: 14px;
    height: 14px;
    content: "";
    border-top: 1px solid rgba(186, 214, 226, 0.72);
    border-left: 1px solid rgba(186, 214, 226, 0.72);
    background: rgba(255, 255, 255, 0.96);
    transform: translateX(-50%) rotate(45deg);
}

.nav-dropdown-menu a {
    position: relative;
    display: grid;
    gap: 3px;
    padding: 12px 13px;
    color: var(--ink);
    border-radius: 6px;
    text-decoration: none;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
    color: var(--primary);
    background: var(--primary-soft);
    transform: translateX(2px);
}

.nav-dropdown-menu a span {
    font-size: 0.84rem;
    font-weight: 800;
}

.nav-dropdown-menu a small {
    color: #7f929d;
    font-size: 0.68rem;
    font-weight: 650;
}

.nav-link small {
    color: rgba(255, 255, 255, 0.43);
    font-size: 0.59rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.nav-icon {
    display: none;
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
}

.mini-profile {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 6px 10px 6px 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.07);
}

.avatar {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    color: #ffffff;
    border-radius: 50%;
    background: linear-gradient(145deg, #268cb2, #0b587b);
    font-weight: 800;
}

.avatar {
    width: 34px;
    height: 34px;
    font-size: 0.82rem;
}

.mini-profile > span:last-child {
    display: grid;
    min-width: 0;
}

.mini-profile strong {
    overflow: hidden;
    color: #ffffff;
    font-size: 0.8rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-profile small {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.66rem;
}

.logout-button {
    min-width: 82px;
    min-height: 38px;
    padding: 0 12px;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.75rem;
}

.logout-button:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.09);
}

.dashboard-main {
    min-width: 0;
}

.date-chip {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
    font-weight: 650;
    white-space: nowrap;
}

.dashboard-content {
    width: min(100%, 1680px);
    margin: 0 auto;
    padding: clamp(30px, 3.2vw, 52px);
}

.welcome-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 34px;
}

.welcome-row h1 {
    margin: 0;
    font-size: clamp(2rem, 3.5vw, 3.3rem);
    font-weight: 720;
    letter-spacing: 0;
    line-height: 1.05;
}

.welcome-row p {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.secondary-button {
    min-height: 42px;
    padding: 0 16px;
    color: var(--primary);
    border: 1px solid #c7dae3;
    background: #ffffff;
    font-size: 0.78rem;
    white-space: nowrap;
}

.master-heading > .secondary-button,
.welcome-row > .secondary-button {
    color: #ffffff;
    border-color: var(--primary);
    background: var(--primary);
    box-shadow: 0 8px 20px rgba(7, 92, 136, 0.16);
}

.master-heading > .secondary-button:hover:not(:disabled),
.welcome-row > .secondary-button:hover:not(:disabled) {
    border-color: var(--primary-dark);
    background: var(--primary-dark);
    box-shadow: 0 10px 24px rgba(7, 92, 136, 0.22);
    transform: translateY(-1px);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.analytics-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card {
    position: relative;
    overflow: hidden;
    min-height: 142px;
    padding: 22px;
    border: 1px solid #e1e8ec;
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 10px 30px rgba(20, 58, 78, 0.045);
    color: inherit;
    text-decoration: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.stat-card:hover {
    border-color: #c7dce5;
    box-shadow: 0 14px 32px rgba(20, 58, 78, 0.1);
    transform: translateY(-2px);
}

.stat-card:focus-visible,
.project-row:focus-visible,
.task-row:focus-visible {
    outline: 3px solid rgba(51, 166, 201, 0.35);
    outline-offset: 3px;
}

.stat-card::after {
    display: none;
}

.stat-primary {
    color: #ffffff;
    border-color: transparent;
    background: #075c88;
    box-shadow: 0 15px 35px rgba(7, 92, 136, 0.2);
}

.stat-primary:hover {
    border-color: transparent;
    box-shadow: 0 18px 38px rgba(7, 92, 136, 0.27);
}

.stat-primary::after {
    border-color: rgba(255, 255, 255, 0.08);
}

.stat-warning {
    border-color: #edcfac;
    background: #fffaf4;
}

.stat-label {
    display: block;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 750;
}

.stat-primary .stat-label,
.stat-primary small {
    color: rgba(255, 255, 255, 0.7);
}

.stat-card strong {
    display: block;
    margin: 13px 0 9px;
    font-size: 2.25rem;
    font-weight: 760;
    letter-spacing: 0;
}

.stat-card small {
    color: #8b9aa3;
    font-size: 0.72rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
    align-items: start;
    gap: 24px;
}

.dashboard-grid-single {
    grid-template-columns: 1fr;
}

.panel {
    min-width: 0;
    padding: 27px;
    border: 1px solid #e0e8ec;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 38px rgba(20, 58, 78, 0.055);
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.panel-heading .eyebrow {
    margin-bottom: 6px;
    font-size: 0.65rem;
}

.panel-heading h2 {
    margin: 0;
    font-size: 1.32rem;
    letter-spacing: 0;
}

.panel-count {
    padding: 6px 9px;
    color: #748791;
    border: 1px solid #dce6eb;
    border-radius: 8px;
    background: #f8fafb;
    font-size: 0.67rem;
    font-weight: 700;
}

.empty-state,
.compact-empty {
    display: grid;
    place-items: center;
    min-height: 285px;
    padding: 34px;
    border: 1px dashed #cbdbe2;
    border-radius: 13px;
    background: linear-gradient(145deg, #fbfdfe, #f2f7f9);
    text-align: center;
}

.compact-empty {
    min-height: 285px;
}

.empty-mark,
.check-mark {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    color: var(--primary);
    border-radius: 50%;
    background: var(--primary-soft);
    font-size: 1.05rem;
    font-weight: 850;
}

.empty-state h3,
.compact-empty h3 {
    margin: 14px 0 0;
    font-size: 1.03rem;
}

.empty-state p,
.compact-empty p {
    max-width: 330px;
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.55;
}

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

.project-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 16px;
    border: 1px solid #e4ecef;
    border-radius: 8px;
    background: #fbfdfe;
    color: inherit;
    text-decoration: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.project-row:hover {
    border-color: #c8dce5;
    box-shadow: 0 10px 24px rgba(20, 58, 78, 0.07);
    transform: translateY(-1px);
}

.project-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: var(--primary);
    border: 1px solid #cbe0e9;
    border-radius: 8px;
    background: var(--primary-soft);
    font-size: 0.8rem;
    font-weight: 850;
}

.project-title-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.project-title-block {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
}

.project-title-row h3 {
    overflow: hidden;
    margin: 0;
    font-size: 0.89rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-progress-value {
    flex: 0 0 auto;
    color: var(--primary);
    font-size: 0.71rem;
    font-weight: 800;
}

.project-state,
.task-state-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    color: #147255;
    border: 1px solid #cce7dc;
    border-radius: 999px;
    background: #eef9f5;
    font-size: 0.61rem;
    font-weight: 800;
    text-transform: capitalize;
    white-space: nowrap;
}

.project-info progress {
    display: block;
    width: 100%;
    height: 6px;
    margin: 10px 0;
    overflow: hidden;
    border: 0;
    border-radius: 99px;
    background: #e9eff2;
    appearance: none;
}

.project-info progress::-webkit-progress-bar {
    border-radius: 99px;
    background: #e9eff2;
}

.project-info progress::-webkit-progress-value {
    border-radius: 99px;
    background: linear-gradient(90deg, #1688ad, #51bdd5);
}

.project-info progress::-moz-progress-bar {
    border-radius: 99px;
    background: linear-gradient(90deg, #1688ad, #51bdd5);
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 15px;
    color: #86959e;
    font-size: 0.67rem;
}

.task-row {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 72px;
    padding: 13px 14px;
    border: 1px solid #e5edf1;
    border-radius: 8px;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
    transition: border-color 160ms ease, background 160ms ease;
}

.task-row:hover {
    border-color: #cbdde5;
    background: #fbfdfe;
}

.task-status {
    width: 8px;
    height: 8px;
    border: 2px solid #62b8d0;
    border-radius: 50%;
    box-shadow: 0 0 0 4px #e9f5f8;
}

.task-row h3 {
    overflow: hidden;
    margin: 0;
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-row p {
    margin: 4px 0 0;
    color: #8a99a2;
    font-size: 0.67rem;
}

.task-copy {
    min-width: 0;
}

.task-meta {
    display: grid;
    justify-items: end;
    gap: 6px;
}

.task-state-badge {
    color: var(--primary);
    border-color: #d0e4ec;
    background: var(--primary-soft);
}

.task-row time {
    color: #657b88;
    font-size: 0.67rem;
    font-weight: 750;
}

.master-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 24px;
}

.master-heading h1 {
    margin: 0;
    font-size: clamp(2rem, 3.2vw, 3rem);
    font-weight: 720;
    letter-spacing: 0;
    line-height: 1.05;
}

.master-heading p {
    max-width: 660px;
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.master-panel,
.master-form-panel {
    width: 100%;
}

.master-form-panel {
    position: relative;
    overflow: hidden;
    max-width: 780px;
    margin: 0 auto;
    padding: clamp(24px, 3vw, 34px);
    box-shadow: 0 20px 58px rgba(20, 58, 78, 0.09);
}

.master-form-panel::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    content: "";
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.master-form-heading {
    align-items: flex-start;
    width: min(100%, 780px);
    margin-right: auto;
    margin-left: auto;
}

.master-form-heading .button-link {
    margin-top: 8px;
}

.master-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid #e4edf2;
    border-radius: 15px;
    background:
        linear-gradient(135deg, rgba(232, 243, 248, 0.74), rgba(255, 255, 255, 0.92));
}

.master-filters {
    display: flex;
    flex: 1 1 auto;
    align-items: flex-end;
    gap: 12px;
}

.filter-field {
    display: grid;
    flex: 1 1 280px;
    gap: 7px;
    color: #425c6b;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.filter-field-small {
    flex: 0 0 170px;
}

.filter-field input,
.filter-field select {
    width: 100%;
    min-height: 42px;
    padding: 0 13px;
    color: var(--ink);
    border: 1px solid #cddde5;
    border-radius: 11px;
    outline: none;
    background: #ffffff;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.filter-field input:focus,
.filter-field select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(51, 166, 201, 0.12);
}

.filter-button {
    min-height: 42px;
    padding: 0 18px;
    color: #ffffff;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(120deg, var(--primary-dark), var(--primary));
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 11px 24px rgba(7, 92, 136, 0.18);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.filter-button:hover {
    box-shadow: 0 15px 30px rgba(7, 92, 136, 0.24);
    transform: translateY(-1px);
}

.clear-link {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0;
    color: #6f8390;
    border: 0;
    background: transparent;
    font-size: 0.76rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.clear-link:hover {
    color: var(--primary);
}

.result-count {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    color: var(--primary);
    border: 1px solid #cfe2ea;
    border-radius: 999px;
    background: #ffffff;
    font-size: 0.72rem;
    font-weight: 850;
    white-space: nowrap;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid #e2ebef;
    border-radius: 15px;
    background: #ffffff;
}

.data-table {
    width: 100%;
    min-width: 820px;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th,
.data-table td {
    padding: 16px 18px;
    border-bottom: 1px solid #edf1f3;
    color: #496270;
    font-size: 0.82rem;
    text-align: left;
    vertical-align: middle;
}

.data-table th {
    color: var(--primary);
    background: #f7fbfd;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.data-table td strong {
    color: var(--ink);
}

.data-table tbody tr {
    transition: background 160ms ease;
}

.data-table tbody tr:hover {
    background: #f7fbfd;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: capitalize;
}

.status-badge.is-active {
    color: #0f6f53;
    background: #eaf8f2;
}

.status-badge.is-inactive {
    color: #8c5260;
    background: #fff1f4;
}

.action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    color: var(--primary);
    border: 1px solid #cfe0e8;
    border-radius: 999px;
    background: #ffffff;
    font-size: 0.76rem;
    font-weight: 800;
    text-decoration: none;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.action-button:hover {
    border-color: #b8d4df;
    background: var(--primary-soft);
    box-shadow: 0 8px 18px rgba(7, 92, 136, 0.09);
    transform: translateY(-1px);
}

.empty-table {
    padding: 32px !important;
    color: var(--muted);
    text-align: center !important;
}

.master-message {
    margin-bottom: 18px;
    padding: 13px 15px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.5;
}

.master-message.is-success {
    color: #116b50;
    border-color: #bce5d7;
    background: #eefbf6;
}

.master-message.is-error {
    color: #842b38;
    border-color: #f0c8cf;
    background: #fff2f4;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(7, 33, 49, 0.58);
    backdrop-filter: blur(8px);
}

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

.master-modal {
    position: relative;
    overflow: hidden;
    width: min(100%, 760px);
    max-height: min(90vh, 820px);
    padding: clamp(22px, 3vw, 32px);
    border: 1px solid rgba(207, 224, 232, 0.9);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 28px 90px rgba(4, 28, 43, 0.34);
    overflow-y: auto;
}

.master-modal::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    content: "";
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

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

.modal-heading h2 {
    margin: 0;
    font-size: clamp(1.55rem, 3vw, 2.15rem);
    letter-spacing: -0.04em;
}

.modal-close {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: var(--primary);
    border: 1px solid #d2e2e9;
    border-radius: 50%;
    background: #ffffff;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    transition: background 160ms ease, transform 160ms ease;
}

.modal-close:hover {
    background: var(--primary-soft);
    transform: rotate(8deg);
}

.master-ajax-form {
    display: grid;
    gap: 18px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 4px;
}

.modal-actions .secondary-button,
.modal-actions .primary-button {
    min-width: 130px;
}

.permission-fieldset {
    display: grid;
    gap: 14px;
    max-height: 360px;
    margin: 4px 0 0;
    padding: 14px;
    overflow: auto;
    border: 1px solid #d8e5eb;
    border-radius: 8px;
    background: #f8fbfc;
}

.permission-fieldset legend {
    padding: 0 6px;
    color: #26434f;
    font-size: 0.78rem;
    font-weight: 850;
}

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

.permission-group h3 {
    margin: 0;
    color: #607783;
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.permission-option {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 9px;
    align-items: start;
    padding: 9px;
    border: 1px solid #e3edf1;
    border-radius: 8px;
    background: #ffffff;
}

.permission-option input {
    margin-top: 3px;
}

.permission-option strong,
.permission-option small {
    display: block;
}

.permission-option strong {
    color: #243f4a;
    font-size: 0.78rem;
}

.permission-option small {
    margin-top: 2px;
    color: #6d828c;
    font-size: 0.68rem;
}

.field select,
.field textarea {
    width: 100%;
    padding: 14px 15px;
    color: var(--ink);
    border: 1px solid #ccd9e0;
    border-radius: 11px;
    outline: none;
    background: rgba(255, 255, 255, 0.88);
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field select {
    min-height: 52px;
}

.field textarea {
    min-height: 112px;
    resize: vertical;
}

.field select:hover,
.field textarea:hover {
    border-color: #9bb3c0;
}

.field select:focus,
.field textarea:focus {
    border-color: var(--accent);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(51, 166, 201, 0.12);
}

.manager-team-page-content {
    padding-bottom: 72px;
}

.manager-team-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.manager-team-summary-card {
    position: relative;
    overflow: hidden;
    min-height: 124px;
    padding: 20px 22px;
    border: 1px solid #dfe8ed;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(20, 58, 78, 0.06);
}

.manager-team-summary-card::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    content: "";
    background: var(--primary);
}

.manager-team-summary-card.is-assigned::before {
    background: var(--success);
}

.manager-team-summary-card.is-unassigned::before {
    background: var(--warning);
}

.manager-team-summary-card > span,
.manager-team-summary-card small {
    display: block;
}

.manager-team-summary-card > span {
    color: #58717f;
    font-size: 0.76rem;
    font-weight: 800;
}

.manager-team-summary-card strong {
    display: block;
    margin-top: 8px;
    color: var(--ink);
    font-size: 2rem;
    line-height: 1;
}

.manager-team-summary-card small {
    margin-top: 9px;
    color: #82939d;
    font-size: 0.7rem;
}

.manager-team-workspace {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.manager-team-no-managers {
    grid-column: 1 / -1;
}

.manager-team-sidebar {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 16px;
}

.manager-selector-panel,
.manager-profile-card,
.manager-team-users-panel {
    border: 1px solid #dfe8ed;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(20, 58, 78, 0.07);
}

.manager-selector-panel {
    display: grid;
    gap: 16px;
    padding: 22px;
}

.manager-team-section-label {
    display: block;
    color: var(--primary);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.manager-profile-card {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 14px;
    padding: 22px;
}

.manager-profile-avatar,
.manager-team-user-avatar {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    color: #ffffff;
    border-radius: 50%;
    background: linear-gradient(145deg, #268cb2, #0b587b);
    font-weight: 850;
}

.manager-profile-avatar {
    width: 52px;
    height: 52px;
    font-size: 1rem;
}

.manager-profile-copy {
    min-width: 0;
}

.manager-profile-copy > span {
    color: #81929c;
    font-size: 0.66rem;
    font-weight: 750;
}

.manager-profile-copy strong,
.manager-profile-copy p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.manager-profile-copy strong {
    display: block;
    margin-top: 4px;
    color: var(--ink);
    font-size: 1rem;
}

.manager-profile-copy p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.74rem;
}

.manager-profile-meta,
.manager-profile-total {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.manager-profile-meta {
    padding-top: 14px;
    color: #627986;
    border-top: 1px solid #edf2f4;
    font-size: 0.72rem;
}

.manager-profile-meta > span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.manager-profile-total {
    padding: 13px 14px;
    border-radius: 8px;
    background: var(--primary-soft);
}

.manager-profile-total strong {
    color: var(--primary);
    font-size: 1.3rem;
}

.manager-profile-total span {
    color: #55717f;
    font-size: 0.72rem;
    font-weight: 750;
}

.manager-team-users-panel {
    min-width: 0;
    padding: clamp(20px, 2.4vw, 30px);
}

.manager-team-users-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.manager-team-users-heading h2 {
    margin: 7px 0 0;
    font-size: 1.35rem;
    letter-spacing: 0;
}

.manager-team-users-heading p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.manager-team-toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(150px, 0.42fr) minmax(150px, 0.42fr);
    gap: 12px;
    padding: 16px;
    border: 1px solid #e2ebef;
    border-radius: 8px;
    background: #f7fafb;
}

.manager-team-bulk-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 16px 0;
}

.manager-team-bulk-actions .secondary-button {
    min-height: 38px;
}

.manager-team-user-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 12px;
}

.manager-team-user-card {
    position: relative;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 20px;
    gap: 12px;
    align-items: center;
    min-height: 116px;
    padding: 16px;
    color: inherit;
    border: 1px solid #dfe8ed;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(20, 58, 78, 0.04);
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.manager-team-user-card:hover {
    border-color: #bcd5df;
    box-shadow: 0 10px 24px rgba(20, 58, 78, 0.09);
    transform: translateY(-1px);
}

.manager-team-user-card.is-selected {
    border-color: #55a9c5;
    background: #f0f8fb;
    box-shadow: 0 0 0 2px rgba(51, 166, 201, 0.12), 0 10px 24px rgba(20, 58, 78, 0.08);
}

.manager-team-user-card[hidden],
.manager-team-empty[hidden],
.manager-team-selection-warning[hidden] {
    display: none !important;
}

.manager-team-user-checkbox {
    grid-column: 3;
    grid-row: 1;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--primary);
}

.manager-team-user-avatar {
    grid-column: 1;
    grid-row: 1;
    width: 44px;
    height: 44px;
    font-size: 0.85rem;
}

.manager-team-user-copy {
    grid-column: 2;
    grid-row: 1;
    display: block;
    min-width: 0;
}

.manager-team-user-copy > strong,
.manager-team-full-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.manager-team-user-copy > strong {
    color: var(--ink);
    font-size: 0.86rem;
}

.manager-team-full-name {
    margin-top: 3px;
    color: #718591;
    font-size: 0.7rem;
}

.manager-team-user-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 9px;
}

.manager-team-user-meta small {
    max-width: 100%;
    overflow: hidden;
    padding: 4px 7px;
    color: #55717f;
    border: 1px solid #d8e7ed;
    border-radius: 6px;
    background: #f6fafb;
    font-size: 0.62rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.manager-team-empty {
    grid-column: 1 / -1;
    display: grid;
    justify-items: center;
    gap: 7px;
    min-height: 150px;
    place-content: center;
    padding: 24px;
    color: var(--muted);
    border: 1px dashed #cadbe3;
    border-radius: 8px;
    background: #f8fbfc;
    text-align: center;
}

.manager-team-empty strong {
    color: #405b69;
    font-size: 0.88rem;
}

.manager-team-empty span {
    font-size: 0.72rem;
}

.manager-team-save-bar {
    position: sticky;
    z-index: 5;
    bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 22px;
    padding: 14px 16px;
    border: 1px solid #cbdde5;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 38px rgba(8, 42, 61, 0.16);
    backdrop-filter: blur(12px);
}

.manager-team-save-bar > div {
    display: grid;
    gap: 4px;
}

.manager-team-save-bar > div > strong {
    color: var(--ink);
    font-size: 0.82rem;
}

.manager-team-selection-warning {
    color: #9a5b12;
    font-size: 0.7rem;
    font-weight: 700;
}

.manager-team-save-bar .primary-button {
    min-width: 170px;
    min-height: 46px;
    margin: 0;
}

@media (max-width: 1080px) {
    .auth-shell {
        grid-template-columns: minmax(360px, 0.8fr) minmax(500px, 1.2fr);
    }

    .brand-panel {
        padding: 44px;
    }

    .brand-copy h1 {
        font-size: 3.2rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .manager-team-workspace {
        grid-template-columns: 1fr;
    }

    .manager-team-sidebar {
        position: static;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

}

@media (max-width: 1280px) {
    .header-inner {
        grid-template-columns: 180px minmax(0, 1fr) 42px;
        gap: 12px;
        min-height: 70px;
    }

    .header-brand {
        max-width: 180px;
    }

    .menu-toggle {
        display: inline-grid;
        grid-column: 3;
        grid-row: 1;
        place-items: center;
        justify-self: end;
        width: 42px;
        height: 42px;
        padding: 0;
        border: 1px solid rgba(255, 255, 255, 0.14);
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.08);
        cursor: pointer;
        transition: background 180ms ease, transform 180ms ease, border-color 180ms ease;
    }

    .menu-toggle:hover {
        border-color: rgba(155, 220, 237, 0.28);
        background: rgba(255, 255, 255, 0.14);
    }

    .menu-toggle span {
        display: block;
        width: 18px;
        height: 2px;
        margin: 2px 0;
        border-radius: 99px;
        background: #ffffff;
        transition: transform 180ms ease, opacity 180ms ease;
    }

    .nav-state:checked + .menu-toggle span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .nav-state:checked + .menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    .nav-state:checked + .menu-toggle span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .main-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        display: grid;
        max-height: 0;
        overflow: hidden;
        padding: 0;
        opacity: 0;
        transition: max-height 260ms ease, opacity 180ms ease, padding 180ms ease;
    }

    .nav-state:checked ~ .main-nav {
        max-height: 720px;
        padding: 8px 0 6px;
        opacity: 1;
    }

    .nav-link,
    .nav-dropdown,
    .nav-dropdown-toggle {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        width: 100%;
        border-radius: 8px;
    }

    .nav-dropdown-menu {
        position: static;
        display: grid;
        width: 100%;
        min-width: 0;
        margin: 6px 0 8px;
        padding: 6px;
        border-color: rgba(255, 255, 255, 0.12);
        background: rgba(255, 255, 255, 0.08);
        box-shadow: none;
        opacity: 1;
        pointer-events: auto;
        transform: none;
        backdrop-filter: none;
    }

    .nav-dropdown-menu::before {
        display: none;
    }

    .nav-dropdown-menu a {
        color: rgba(255, 255, 255, 0.82);
    }

    .nav-dropdown-menu a:hover,
    .nav-dropdown-menu a.active {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.12);
        transform: none;
    }

    .nav-dropdown-menu a small {
        color: rgba(255, 255, 255, 0.5);
    }

    .header-actions {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    .date-chip {
        display: none;
    }
}

@media (max-width: 800px) {
    .auth-shell {
        display: block;
    }

    .brand-panel {
        display: none;
    }

    .auth-panel {
        min-height: 100vh;
        padding: 28px 20px;
    }

    .mobile-logo-wrap {
        display: block;
        margin-bottom: 36px;
        padding: 10px;
        border-radius: 12px;
        background: #7595aa;
        box-shadow: 0 10px 30px rgba(12, 48, 70, 0.12);
    }

    .mobile-logo {
        display: block;
        width: 100%;
        height: auto;
        border-radius: 6px;
    }

    .header-inner {
        grid-template-columns: 178px 1fr auto;
        gap: 12px;
        min-height: 70px;
        padding: 10px 16px;
    }

    .header-brand {
        max-width: 178px;
        border-radius: 9px;
    }

    .menu-toggle {
        display: inline-grid;
        place-items: center;
        justify-self: end;
        width: 42px;
        height: 42px;
        padding: 0;
        border: 1px solid rgba(255, 255, 255, 0.14);
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.08);
        cursor: pointer;
        transition: background 180ms ease, transform 180ms ease, border-color 180ms ease;
    }

    .menu-toggle:hover {
        border-color: rgba(155, 220, 237, 0.28);
        background: rgba(255, 255, 255, 0.14);
        transform: translateY(-1px);
    }

    .menu-toggle span {
        display: block;
        width: 18px;
        height: 2px;
        margin: 2px 0;
        border-radius: 99px;
        background: #ffffff;
        transition: transform 180ms ease, opacity 180ms ease;
    }

    .nav-state:checked + .menu-toggle span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .nav-state:checked + .menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    .nav-state:checked + .menu-toggle span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .main-nav {
        grid-column: 1 / -1;
        display: grid;
        max-height: 0;
        overflow: hidden;
        padding: 0;
        opacity: 0;
        transition: max-height 260ms ease, opacity 180ms ease, padding 180ms ease;
    }

    .nav-state:checked ~ .main-nav {
        max-height: 720px;
        padding: 8px 0 6px;
        opacity: 1;
    }

    .nav-link,
    .nav-dropdown,
    .nav-dropdown-toggle {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        width: 100%;
        border-radius: 8px;
    }

    .nav-dropdown-menu {
        position: static;
        display: grid;
        width: 100%;
        min-width: 0;
        margin: 6px 0 8px;
        padding: 6px;
        border-color: rgba(255, 255, 255, 0.12);
        background: rgba(255, 255, 255, 0.08);
        box-shadow: none;
        opacity: 1;
        pointer-events: auto;
        transform: none;
        backdrop-filter: none;
    }

    .nav-dropdown-menu::before {
        display: none;
    }

    .nav-dropdown-menu a {
        color: rgba(255, 255, 255, 0.82);
    }

    .nav-dropdown-menu a:hover,
    .nav-dropdown-menu a.active {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.12);
        transform: none;
    }

    .nav-dropdown-menu a small {
        color: rgba(255, 255, 255, 0.5);
    }

    .header-actions {
        grid-column: 1 / -1;
        grid-row: 3;
        justify-content: space-between;
        order: 4;
        width: 100%;
        padding-top: 8px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mini-profile {
        flex: 1 1 auto;
    }

    .manager-team-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .manager-team-search-field {
        grid-column: 1 / -1;
    }
}

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

    .form-meta {
        display: grid;
        gap: 6px;
    }

    .dashboard-content {
        padding: 28px 17px 36px;
    }

    .welcome-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .master-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .master-toolbar,
    .master-filters {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-field,
    .filter-field-small {
        flex: 1 1 auto;
    }

    .result-count {
        align-self: flex-start;
    }

    .secondary-button {
        width: 100%;
    }

    .date-chip {
        display: none;
    }

    .panel {
        padding: 20px;
    }

    .project-meta {
        gap: 5px 10px;
    }

    .project-title-block {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .task-row {
        grid-template-columns: 8px minmax(0, 1fr) auto;
        gap: 10px;
    }

    .task-state-badge {
        max-width: 88px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .manager-team-summary {
        gap: 8px;
    }

    .manager-team-summary-card {
        min-height: 108px;
        padding: 15px 13px;
    }

    .manager-team-summary-card strong {
        font-size: 1.55rem;
    }

    .manager-team-summary-card small {
        display: none;
    }

    .manager-team-sidebar,
    .manager-team-toolbar {
        grid-template-columns: 1fr;
    }

    .manager-team-search-field {
        grid-column: auto;
    }

    .manager-team-users-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .manager-team-user-grid {
        grid-template-columns: 1fr;
    }

    .manager-team-bulk-actions {
        align-items: stretch;
        flex-direction: column;
        gap: 6px;
    }

    .manager-team-bulk-actions .clear-link {
        justify-content: center;
    }

    .manager-team-save-bar {
        bottom: 8px;
        align-items: stretch;
        flex-direction: column;
    }

    .manager-team-save-bar .primary-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
