/* =========================================================
   Вектор — task manager
   Vanilla CSS, no external dependencies
   ========================================================= */

:root {
    --bg: #f4f5f9;
    --surface: #ffffff;
    --surface-soft: #f8f9fc;
    --sidebar: #161826;
    --sidebar-soft: #1e2133;
    --sidebar-line: rgba(255, 255, 255, 0.08);
    --text: #172033;
    --text-soft: #4a5468;
    --muted: #7d869a;
    --muted-2: #a1a8b8;
    --border: #e6e8f0;
    --border-strong: #d7dbe7;
    --accent: #6c5ce7;
    --accent-hover: #5b4bd6;
    --accent-soft: #f0edff;
    --accent-soft-2: #e6e1ff;
    --blue: #3b82f6;
    --blue-soft: #eaf2ff;
    --green: #22a06b;
    --green-soft: #e8f8f0;
    --orange: #f59e0b;
    --orange-soft: #fff5e2;
    --red: #e5484d;
    --red-soft: #fff0f0;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --shadow-sm: 0 1px 2px rgba(23, 32, 51, 0.05);
    --shadow: 0 8px 28px rgba(23, 32, 51, 0.08);
    --shadow-lg: 0 24px 70px rgba(13, 18, 32, 0.2);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --sidebar-width: 260px;
    --topbar-height: 68px;
}

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

html {
    height: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100%;
    font-family: var(--font);
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input,
textarea,
select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img,
svg {
    display: block;
}

h1, h2, h3, h4, p {
    margin: 0;
}

ul, ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

[hidden] {
    display: none !important;
}

.hidden {
    display: none !important;
}

::selection {
    background: var(--accent-soft-2);
    color: var(--text);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ---------- Icons ---------- */

.icon {
    width: 20px;
    height: 20px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon--sm {
    width: 16px;
    height: 16px;
}

.icon--lg {
    width: 24px;
    height: 24px;
}

.svg-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 15px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    font-weight: 600;
    font-size: 13.5px;
    line-height: 1.2;
    white-space: nowrap;
    transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .12s ease;
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
}

.btn:active {
    transform: translateY(1px);
}

.btn:disabled,
.btn.is-loading {
    opacity: .65;
    cursor: not-allowed;
    transform: none;
}

.btn--primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 5px 14px rgba(108, 92, 231, .22);
}

.btn--primary:hover {
    background: var(--accent-hover);
}

.btn--soft {
    background: var(--accent-soft);
    color: var(--accent);
}

.btn--soft:hover {
    background: var(--accent-soft-2);
}

.btn--ghost {
    color: var(--text-soft);
}

.btn--ghost:hover {
    background: #f0f2f7;
    color: var(--text);
}

.btn--outline {
    background: var(--surface);
    border-color: var(--border-strong);
    color: var(--text-soft);
    box-shadow: var(--shadow-sm);
}

.btn--outline:hover {
    border-color: #c0c6d5;
    color: var(--text);
}

.btn--danger {
    background: var(--red-soft);
    color: var(--red);
}

.btn--danger:hover {
    background: #ffe1e2;
}

.btn--sm {
    min-height: 32px;
    padding: 6px 11px;
    font-size: 12.5px;
    border-radius: 8px;
}

.btn--lg {
    min-height: 48px;
    padding: 12px 20px;
    font-size: 15px;
    border-radius: 12px;
}

.btn--block {
    width: 100%;
}

.btn--icon {
    width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    border-radius: 9px;
}

.btn--icon.btn--sm {
    width: 30px;
    height: 30px;
    min-height: 30px;
}

.btn.is-loading > .icon {
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---------- Forms ---------- */

.field {
    display: block;
}

.field__label {
    display: block;
    margin-bottom: 7px;
    color: var(--text-soft);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .01em;
}

.field__hint {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.45;
}

.field__control {
    position: relative;
    display: flex;
    align-items: center;
}

.field__control--icon > .icon {
    position: absolute;
    left: 13px;
    width: 18px;
    height: 18px;
    color: var(--muted);
    pointer-events: none;
}

.field__control--icon > input {
    padding-left: 41px;
}

.input,
.textarea,
.select {
    width: 100%;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.input,
.select {
    height: 42px;
    padding: 8px 12px;
}

.textarea {
    min-height: 108px;
    padding: 12px 14px;
    resize: vertical;
    line-height: 1.55;
}

.input::placeholder,
.textarea::placeholder {
    color: #adb3c1;
}

.input:hover,
.textarea:hover,
.select:hover {
    border-color: #c3c8d6;
}

.input:focus,
.textarea:focus,
.select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, .12);
}

.input:disabled,
.textarea:disabled,
.select:disabled {
    background: #f5f6f9;
    color: var(--muted);
    cursor: not-allowed;
}

.select {
    appearance: none;
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237d869a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
}

.select--bare {
    border-color: transparent;
    background-color: transparent;
    font-weight: 600;
    box-shadow: none;
}

.select--bare:hover {
    background-color: #f5f6fa;
    border-color: var(--border);
}

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

.form-grid .field--full {
    grid-column: 1 / -1;
}

.form-alert {
    padding: 11px 13px;
    border: 1px solid #ffd1d3;
    border-radius: 10px;
    background: var(--red-soft);
    color: #b4232a;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 16px;
}

.form-alert--info {
    border-color: #d9e6ff;
    background: var(--blue-soft);
    color: #255ca8;
}

.form-alert--warning {
    border-color: #ffe2a8;
    background: var(--orange-soft);
    color: #8c5a05;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
}

.checkbox {
    display: inline-flex;
    align-items: flex-start;
    gap: 9px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-soft);
}

.checkbox input {
    width: 16px;
    height: 16px;
    margin: 1px 0 0;
    accent-color: var(--accent);
    cursor: pointer;
}

/* ---------- Common ---------- */

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: none;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    user-select: none;
}

.avatar--sm {
    width: 24px;
    height: 24px;
    font-size: 9px;
}

.avatar--lg {
    width: 40px;
    height: 40px;
    font-size: 13px;
}

.avatar--xl {
    width: 52px;
    height: 52px;
    font-size: 16px;
}

.avatar-stack {
    display: flex;
    align-items: center;
}

.avatar-stack .avatar {
    margin-left: -7px;
    border: 2px solid var(--surface);
}

.avatar-stack .avatar:first-child {
    margin-left: 0;
}

.avatar-stack__more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin-left: -7px;
    border-radius: 50%;
    border: 2px solid var(--surface);
    background: #eceef5;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--muted);
}

.dot--gray { background: #8b95a7; }
.dot--blue { background: var(--blue); }
.dot--green { background: var(--green); }
.dot--orange { background: var(--orange); }
.dot--violet { background: var(--accent); }
.dot--red { background: var(--red); }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 22px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f1f3f8;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
}

.badge--accent { background: var(--accent-soft); color: var(--accent); }
.badge--soft { background: var(--surface-2, #f1f2f6); color: var(--muted); }
.badge--green { background: var(--green-soft); color: var(--green); }
.badge--orange { background: var(--orange-soft); color: #b47406; }
.badge--red { background: var(--red-soft); color: var(--red); }
.badge--blue { background: var(--blue-soft); color: #2563c9; }

.priority-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--muted);
}

.priority-pill::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #abb2c1;
}

.priority-pill--low { color: #718096; }
.priority-pill--low::before { background: #9aa5b5; }
.priority-pill--normal { color: #4d6fa8; }
.priority-pill--normal::before { background: #6b91cf; }
.priority-pill--high { color: #b47406; }
.priority-pill--high::before { background: var(--orange); }
.priority-pill--urgent { color: var(--red); }
.priority-pill--urgent::before { background: var(--red); }

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

/* =========================================================
   Login
   ========================================================= */

.login-body {
    min-height: 100vh;
    background: #f7f7fb;
    overflow-x: hidden;
}

.login-shell {
    display: grid;
    grid-template-columns: minmax(500px, 1.15fr) minmax(420px, .85fr);
    min-height: 100vh;
}

.login-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 38px 54px 26px;
    overflow: hidden;
    background:
        radial-gradient(1000px 520px at 10% 105%, rgba(108, 92, 231, .22), transparent 65%),
        linear-gradient(145deg, #141625 0%, #1b1d32 55%, #171a2b 100%);
    color: #fff;
}

.login-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(circle at 60% 30%, #000 0, transparent 72%);
    pointer-events: none;
}

.login-visual__glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    pointer-events: none;
}

.login-visual__glow--one {
    width: 380px;
    height: 380px;
    left: -160px;
    bottom: -130px;
    background: rgba(108, 92, 231, .32);
}

.login-visual__glow--two {
    width: 280px;
    height: 280px;
    top: 5%;
    right: -120px;
    background: rgba(59, 130, 246, .16);
}

.login-brand {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: #fff;
    width: max-content;
}

.login-brand:hover {
    text-decoration: none;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex: none;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    box-shadow: 0 5px 14px rgba(108, 92, 231, .32);
}

.brand-mark--large {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 20px;
}

.login-brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1.18;
}

.login-brand__text strong {
    font-size: 16px;
    letter-spacing: .01em;
}

.login-brand__text small {
    margin-top: 3px;
    color: rgba(255, 255, 255, .46);
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.login-visual__content {
    position: relative;
    z-index: 2;
    width: min(650px, 100%);
    margin: auto 0;
    padding: 46px 0 24px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 11px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.eyebrow--dark {
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .72);
}

.eyebrow__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #8e7dff;
    box-shadow: 0 0 0 4px rgba(142, 125, 255, .13);
}

.login-visual h1 {
    margin: 21px 0 15px;
    font-size: clamp(38px, 4.3vw, 58px);
    line-height: 1.03;
    letter-spacing: -.045em;
    font-weight: 750;
}

.login-visual__content > p {
    max-width: 520px;
    color: rgba(255, 255, 255, .58);
    font-size: 15px;
    line-height: 1.65;
}

.login-board {
    width: min(590px, 100%);
    margin-top: 36px;
    padding: 13px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 17px;
    background: rgba(255, 255, 255, .045);
    box-shadow: 0 30px 60px rgba(0, 0, 0, .18);
    backdrop-filter: blur(10px);
    transform: perspective(1200px) rotateX(2deg) rotateY(-2deg);
    transform-origin: left center;
}

.login-board__head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 5px 11px;
    color: rgba(255, 255, 255, .68);
    font-size: 11px;
    font-weight: 600;
}

.login-board__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #8e7dff;
}

.login-board__avatars {
    display: flex;
    margin-left: auto;
}

.login-board__avatars i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 21px;
    height: 21px;
    margin-left: -5px;
    border-radius: 50%;
    border: 1.5px solid #24263a;
    background: #393d59;
    color: rgba(255, 255, 255, .7);
    font-style: normal;
    font-size: 7px;
    font-weight: 700;
}

.login-board__cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
}

.login-mini-col {
    min-width: 0;
    padding: 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .035);
}

.login-mini-col__title {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 1px 2px 8px;
    color: rgba(255, 255, 255, .52);
    font-size: 8.5px;
    font-weight: 600;
    white-space: nowrap;
}

.login-mini-col__title b {
    margin-left: auto;
    color: rgba(255, 255, 255, .25);
    font-size: 8px;
}

.login-mini-col .dot {
    width: 5px;
    height: 5px;
}

.mini-card {
    padding: 9px;
    margin-bottom: 6px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .085);
    border: 1px solid rgba(255, 255, 255, .055);
}

.mini-card:last-child {
    margin-bottom: 0;
}

.mini-card--accent {
    background: rgba(108, 92, 231, .22);
    border-color: rgba(142, 125, 255, .28);
}

.mini-card--muted {
    opacity: .6;
}

.mini-tag {
    display: inline-block;
    margin-bottom: 6px;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 6.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.mini-tag--violet { background: rgba(142, 125, 255, .17); color: #bdb2ff; }
.mini-tag--orange { background: rgba(245, 158, 11, .18); color: #ffc766; }

.mini-card p {
    color: rgba(255, 255, 255, .8);
    font-size: 8.5px;
    line-height: 1.4;
    font-weight: 500;
}

.mini-card footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 9px;
    color: rgba(255, 255, 255, .28);
    font-size: 6.5px;
}

.mini-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #705eea;
    color: #fff;
    font-size: 5.5px;
    font-weight: 700;
}

.mini-avatar--blue { background: #3b82f6; }
.mini-avatar--green { background: #22a06b; }

.login-features {
    display: flex;
    gap: 36px;
    margin-top: 33px;
}

.login-features > div {
    display: flex;
    align-items: center;
    gap: 11px;
}

.login-features strong {
    font-size: 25px;
    font-weight: 750;
    letter-spacing: -.04em;
}

.login-features span {
    color: rgba(255, 255, 255, .38);
    font-size: 9.5px;
    line-height: 1.35;
}

.login-visual__foot {
    position: relative;
    z-index: 2;
    color: rgba(255, 255, 255, .24);
    font-size: 10.5px;
    letter-spacing: .01em;
}

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 44px 42px;
    background:
        radial-gradient(600px 400px at 100% 0%, #f0edff 0%, transparent 55%),
        #fbfbfd;
}

.login-panel__inner {
    width: min(392px, 100%);
}

.login-panel__mobile-brand {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    font-size: 17px;
}

.login-card__hi {
    display: inline-block;
    margin-bottom: 9px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.login-card h2 {
    font-size: 28px;
    line-height: 1.16;
    letter-spacing: -.035em;
    font-weight: 750;
    color: #151a28;
}

.login-card__sub {
    margin-top: 9px;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.55;
}

.login-form {
    margin-top: 27px;
}

.login-form .field {
    margin-bottom: 16px;
}

.login-form .input {
    height: 48px;
    border-radius: 11px;
    background: #fff;
}

.login-form .field__control--icon > .icon {
    left: 15px;
}

.login-form .field__control--icon > input {
    padding-left: 45px;
}

.login-form .btn--primary {
    margin-top: 7px;
    min-height: 49px;
    border-radius: 11px;
    font-size: 14.5px;
}

.login-form .btn--primary .icon {
    width: 18px;
    height: 18px;
    margin-left: 2px;
}

.demo-access {
    margin-top: 25px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.demo-access__head {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.demo-access__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 31px;
    height: 31px;
    flex: none;
    border-radius: 9px;
    background: var(--accent-soft);
    color: var(--accent);
}

.demo-access__icon .icon {
    width: 16px;
    height: 16px;
}

.demo-access__head strong {
    display: block;
    font-size: 12.5px;
}

.demo-access__head p {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.demo-access__creds {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 12px 0 10px;
}

.demo-access__creds > div {
    padding: 7px 9px;
    border-radius: 7px;
    background: var(--surface-soft);
}

.demo-access__creds dt {
    color: var(--muted);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.demo-access__creds dd {
    margin: 2px 0 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10.5px;
    color: var(--text-soft);
    overflow-wrap: anywhere;
}

.login-panel__foot {
    margin-top: 29px;
    color: #b0b6c2;
    font-size: 10.5px;
    text-align: center;
}

/* =========================================================
   App shell
   ========================================================= */

.app-body {
    background: var(--bg);
}

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

.sidebar {
    position: fixed;
    z-index: 40;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    width: var(--sidebar-width);
    background: var(--sidebar);
    color: rgba(255, 255, 255, .74);
    overflow: hidden;
}

.sidebar__brand {
    display: flex;
    align-items: center;
    gap: 11px;
    height: var(--topbar-height);
    padding: 0 20px;
    color: #fff;
    flex: none;
}

.sidebar__brand:hover {
    text-decoration: none;
}

.sidebar__brand .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    font-size: 15px;
}

.sidebar__brand strong {
    font-size: 15px;
    letter-spacing: .01em;
}

.sidebar__brand small {
    display: block;
    margin-top: 1px;
    color: rgba(255, 255, 255, .32);
    font-size: 8.5px;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.sidebar__nav {
    flex: 1;
    min-height: 0;
    padding: 7px 12px 16px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .12) transparent;
}

.sidebar__nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar__nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .12);
    border-radius: 4px;
}

.nav-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 19px 10px 7px;
    color: rgba(255, 255, 255, .27);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.nav-label__action {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 19px;
    height: 19px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: rgba(255, 255, 255, .38);
    transition: background .15s, color .15s;
}

.nav-label__action:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.nav-label__action .icon {
    width: 13px;
    height: 13px;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 8px 10px;
    margin-bottom: 2px;
    border-radius: 8px;
    color: rgba(255, 255, 255, .6);
    font-size: 12.5px;
    font-weight: 500;
    transition: background .14s ease, color .14s ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, .05);
    color: rgba(255, 255, 255, .88);
    text-decoration: none;
}

.nav-item.is-active {
    background: rgba(108, 92, 231, .22);
    color: #fff;
    font-weight: 600;
}

.nav-item.is-active::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 9px;
    bottom: 9px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: #8e7dff;
}

.nav-item .icon {
    width: 17px;
    height: 17px;
    color: rgba(255, 255, 255, .42);
}

.nav-item.is-active .icon {
    color: #a99cff;
}

.nav-item__badge {
    margin-left: auto;
    min-width: 20px;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    color: rgba(255, 255, 255, .5);
    font-size: 9.5px;
    font-weight: 600;
    text-align: center;
}

.nav-item.is-active .nav-item__badge {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

.nav-item--muted {
    color: rgba(255, 255, 255, .36);
    font-size: 11.5px;
}

.project-nav__item {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 34px;
    padding: 7px 10px;
    margin-bottom: 1px;
    border-radius: 7px;
    color: rgba(255, 255, 255, .52);
    font-size: 12px;
    transition: background .14s, color .14s;
}

.project-nav__item:hover {
    background: rgba(255, 255, 255, .05);
    color: rgba(255, 255, 255, .85);
    text-decoration: none;
}

.project-nav__item.is-active {
    background: rgba(255, 255, 255, .07);
    color: #fff;
}

.project-nav__dot {
    width: 7px;
    height: 7px;
    flex: none;
    border-radius: 2px;
    transform: rotate(45deg);
}

.project-nav__name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-nav__count {
    color: rgba(255, 255, 255, .25);
    font-size: 9.5px;
}

.sidebar__footer {
    flex: none;
    padding: 12px;
    border-top: 1px solid var(--sidebar-line);
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 7px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #fff;
    text-align: left;
    transition: background .14s;
}

.user-chip:hover {
    background: rgba(255, 255, 255, .06);
}

.user-chip__meta {
    flex: 1;
    min-width: 0;
}

.user-chip__meta strong {
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-chip__meta span {
    display: block;
    margin-top: 1px;
    color: rgba(255, 255, 255, .32);
    font-size: 9.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-chip > .icon {
    width: 15px;
    height: 15px;
    color: rgba(255, 255, 255, .25);
}

.app-main {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    min-height: 100vh;
    margin-left: var(--sidebar-width);
}

.topbar {
    position: sticky;
    z-index: 30;
    top: 0;
    display: flex;
    align-items: center;
    gap: 18px;
    height: var(--topbar-height);
    flex: none;
    padding: 0 28px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(12px);
}

.topbar__left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.topbar__title {
    min-width: 0;
}

.topbar__title strong {
    display: block;
    overflow: hidden;
    color: var(--text);
    font-size: 14px;
    font-weight: 650;
    letter-spacing: -.01em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar__title span {
    display: block;
    margin-top: 1px;
    color: var(--muted);
    font-size: 10.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.topbar__search {
    position: relative;
    display: none;
}

.topbar__search .icon {
    position: absolute;
    left: 11px;
    top: 50%;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    color: var(--muted);
}

.topbar__search input {
    width: 200px;
    height: 36px;
    padding: 0 12px 0 35px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
    font-size: 12px;
}

.mobile-menu {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text-soft);
}

.view {
    flex: 1;
    min-width: 0;
    padding: 26px 30px 40px;
}

.sidebar-scrim {
    display: none;
}

/* ---------- Boot screen ---------- */

.boot-screen {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: var(--bg);
}

.boot-screen p {
    color: var(--muted);
    font-size: 12px;
}

.boot-screen__bar {
    width: 150px;
    height: 3px;
    overflow: hidden;
    border-radius: 99px;
    background: #e4e6ef;
}

.boot-screen__bar span {
    display: block;
    width: 50%;
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
    animation: boot-slide 1.1s ease-in-out infinite alternate;
}

@keyframes boot-slide {
    from { transform: translateX(-20%); }
    to { transform: translateX(120%); }
}

/* =========================================================
   Page headers / projects
   ========================================================= */

.page-head {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
}

.page-head__main {
    flex: 1;
    min-width: 0;
}

.page-head__eyebrow {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.page-head h1 {
    color: var(--text);
    font-size: 26px;
    line-height: 1.18;
    font-weight: 750;
    letter-spacing: -.035em;
}

.page-head__sub {
    margin-top: 6px;
    max-width: 650px;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.55;
}

.page-head__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 5px;
}

.section-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 27px 0 13px;
}

.section-head h2 {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -.01em;
}

.section-head__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 19px;
    padding: 0 6px;
    border-radius: 99px;
    background: #e9ebf3;
    color: var(--muted);
    font-size: 9.5px;
    font-weight: 700;
}

.section-head__link {
    margin-left: auto;
    font-size: 11.5px;
    font-weight: 600;
}

.home-hero {
    position: relative;
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 25px 30px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: linear-gradient(115deg, #1b1d31 0%, #252846 58%, #302d5f 100%);
    color: #fff;
    box-shadow: 0 12px 30px rgba(23, 32, 51, .12);
}

.home-hero::after {
    content: "";
    position: absolute;
    right: -60px;
    top: -100px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(142, 125, 255, .38), transparent 66%);
}

.home-hero__text {
    position: relative;
    z-index: 1;
    flex: 1;
}

.home-hero__date {
    color: rgba(255, 255, 255, .4);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.home-hero h1 {
    margin: 7px 0 7px;
    font-size: 26px;
    line-height: 1.16;
    letter-spacing: -.035em;
}

.home-hero p {
    max-width: 600px;
    color: rgba(255, 255, 255, .5);
    font-size: 12.5px;
}

.home-hero__stats {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 11px;
}

.hero-stat {
    min-width: 104px;
    padding: 13px 15px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 12px;
    background: rgba(255, 255, 255, .055);
    backdrop-filter: blur(6px);
}

.hero-stat strong {
    display: block;
    font-size: 23px;
    line-height: 1.1;
    letter-spacing: -.04em;
}

.hero-stat span {
    display: block;
    margin-top: 4px;
    color: rgba(255, 255, 255, .38);
    font-size: 9.5px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
}

.project-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 190px;
    padding: 18px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    color: var(--text);
    transition: border-color .16s, box-shadow .16s, transform .16s;
}

.project-card:hover {
    border-color: #d5d2fa;
    box-shadow: 0 12px 30px rgba(23, 32, 51, .08);
    transform: translateY(-2px);
    text-decoration: none;
}

.project-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--project-color, var(--accent));
}

.project-card__top {
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-code {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 1px 7px;
    border-radius: 5px;
    background: #f1f2f7;
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .03em;
}

.project-card__menu {
    margin-left: auto;
}

.project-card__title {
    margin-top: 12px;
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.015em;
    line-height: 1.3;
}

.project-card__desc {
    display: -webkit-box;
    margin-top: 5px;
    overflow: hidden;
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.5;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.project-progress {
    margin-top: auto;
    padding-top: 18px;
}

.project-progress__line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 9.5px;
}

.project-progress__line b {
    color: var(--text-soft);
    font-weight: 650;
}

.progress-track {
    height: 4px;
    overflow: hidden;
    border-radius: 99px;
    background: #eef0f5;
}

.progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--project-color, var(--accent));
    transition: width .3s ease;
}

.project-card__foot {
    display: flex;
    align-items: center;
    margin-top: 13px;
}

.project-card__foot .avatar-stack {
    margin-left: -3px;
}

.project-card__foot .avatar,
.project-card__foot .avatar-stack__more {
    width: 24px;
    height: 24px;
    font-size: 8px;
    border-width: 1.5px;
}

.project-card__open {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: auto;
    color: var(--muted);
    font-size: 9.5px;
    font-weight: 600;
}

.project-card__open .icon {
    width: 13px;
    height: 13px;
}

.project-card.is-archived {
    opacity: .7;
}

.my-task-list {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.my-task {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 9px 16px;
    border-bottom: 1px solid #f0f1f6;
    cursor: pointer;
    transition: background .13s;
}

.my-task:last-child {
    border-bottom: 0;
}

.my-task:hover {
    background: #fafaff;
}

.my-task__status {
    width: 7px;
    height: 7px;
    flex: none;
    border-radius: 50%;
}

.my-task__title {
    flex: 1;
    min-width: 0;
}

.my-task__title strong {
    display: block;
    overflow: hidden;
    color: var(--text);
    font-size: 12.5px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.my-task__title span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 9.5px;
}

.my-task__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 10px;
}

.my-task__code {
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 9.5px;
}

.due-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--muted);
    font-size: 10px;
    white-space: nowrap;
}

.due-chip .icon {
    width: 13px;
    height: 13px;
}

.due-chip--soon {
    color: #b47406;
}

.due-chip--overdue {
    color: var(--red);
    font-weight: 600;
}

/* =========================================================
   Board
   ========================================================= */

.board-page {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--topbar-height) - 66px);
}

.board-head {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 18px;
}

.board-head__main {
    flex: 1;
    min-width: 0;
}

.board-head__crumb {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 10.5px;
}

.board-head__crumb .icon {
    width: 12px;
    height: 12px;
}

.board-head h1 {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 25px;
    line-height: 1.2;
    font-weight: 750;
    letter-spacing: -.035em;
}

.board-head__desc {
    margin-top: 5px;
    max-width: 620px;
    color: var(--muted);
    font-size: 12px;
}

.board-head__members {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 11px;
}

.board-head__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 5px;
}

.board-toolbar {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 16px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.filter-search {
    position: relative;
    width: 250px;
    flex: none;
}

.filter-search .icon {
    position: absolute;
    left: 11px;
    top: 50%;
    width: 15px;
    height: 15px;
    color: var(--muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.filter-search input {
    width: 100%;
    height: 34px;
    padding: 0 12px 0 34px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #f6f7fa;
    font-size: 11.5px;
    transition: border-color .15s, background .15s;
}

.filter-search input:focus {
    outline: none;
    border-color: var(--accent);
    background: #fff;
}

.filter-select {
    height: 34px;
    min-width: 142px;
    padding: 0 30px 0 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background-color: #f6f7fa;
    font-size: 11.5px;
}

.toolbar-divider {
    width: 1px;
    height: 22px;
    background: var(--border);
}

.toolbar-check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 7px;
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.toolbar-check input {
    width: 14px;
    height: 14px;
    accent-color: var(--accent);
}

.toolbar-count {
    margin-left: auto;
    padding: 0 9px;
    color: var(--muted);
    font-size: 10px;
    white-space: nowrap;
}

.board-scroll {
    flex: 1;
    min-height: 0;
    margin: 0 -30px;
    padding: 0 30px 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: #cfd3df transparent;
}

.board {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: max-content;
    min-height: 300px;
    height: calc(100vh - 275px);
}

.board-col {
    display: flex;
    flex-direction: column;
    width: 318px;
    min-width: 280px;
    max-height: 100%;
    border: 1px solid #e9ebf2;
    border-radius: 14px;
    background: #eef0f6;
    transition: background .15s, border-color .15s;
}

.board-col.is-dragover {
    border-color: #b8adf7;
    background: #eeebff;
}

.board-col__head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: none;
    padding: 13px 13px 9px;
}

.board-col__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.board-col__title {
    color: var(--text-soft);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .01em;
}

.board-col__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 18px;
    padding: 0 5px;
    border-radius: 99px;
    background: rgba(23, 32, 51, .06);
    color: #8a93a4;
    font-size: 9px;
    font-weight: 700;
}

.board-col__add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-left: auto;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #97a0b0;
    opacity: 0;
    transition: opacity .14s, background .14s, color .14s;
}

.board-col:hover .board-col__add,
.board-col__add:focus-visible {
    opacity: 1;
}

.board-col__add:hover {
    background: rgba(23, 32, 51, .06);
    color: var(--text);
}

.board-col__add .icon {
    width: 15px;
    height: 15px;
}

.board-col__cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 80px;
    padding: 3px 9px 10px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cfd3df transparent;
}

.board-col__cards::-webkit-scrollbar {
    width: 4px;
}

.board-col__cards::-webkit-scrollbar-thumb {
    background: #cdd2de;
    border-radius: 4px;
}

.task-card {
    position: relative;
    padding: 13px;
    border: 1px solid #e7e9f0;
    border-radius: 11px;
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(23, 32, 51, .04);
    cursor: pointer;
    transition: border-color .14s, box-shadow .14s, transform .14s;
}

.task-card:hover {
    border-color: #d8d3fb;
    box-shadow: 0 6px 18px rgba(23, 32, 51, .08);
    transform: translateY(-1px);
}

.task-card.is-dragging {
    opacity: .35;
    transform: rotate(1.5deg);
}

.task-card.is-just-moved {
    animation: card-pop .3s ease;
}

@keyframes card-pop {
    0% { transform: scale(.98); }
    60% { transform: scale(1.01); }
    100% { transform: scale(1); }
}

.task-card__top {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 16px;
}

.task-card__code {
    color: #9ba3b2;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 9px;
    letter-spacing: .01em;
}

.task-card__grip {
    margin-left: auto;
    color: #d2d6e0;
    opacity: 0;
    transition: opacity .14s;
}

.task-card:hover .task-card__grip {
    opacity: 1;
}

.task-card__grip .icon {
    width: 14px;
    height: 14px;
}

.task-card__title {
    margin-top: 7px;
    color: var(--text);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.43;
    letter-spacing: -.006em;
    overflow-wrap: anywhere;
}

.task-card__title.is-done {
    color: var(--muted);
    text-decoration: line-through;
    text-decoration-color: #cfd3dd;
}

.task-card__meta {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 12px;
}

.task-card__meta .priority-pill {
    font-size: 8px;
}

.task-card__meta .due-chip {
    font-size: 9px;
}

.task-card__meta .due-chip .icon {
    width: 12px;
    height: 12px;
}

.task-card__foot {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 11px;
    padding-top: 9px;
    border-top: 1px solid #f2f3f7;
}

.task-card__foot .avatar {
    width: 21px;
    height: 21px;
    font-size: 7.5px;
}

.task-card__unassigned {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #b1b7c4;
    font-size: 9px;
}

.task-card__comments {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: auto;
    color: #a0a8b7;
    font-size: 9px;
}

.task-card__comments .icon {
    width: 13px;
    height: 13px;
}

.task-card__watchers {
    display: flex;
    margin-left: auto;
}

.task-card__watchers .avatar {
    width: 18px;
    height: 18px;
    margin-left: -5px;
    border: 1.5px solid #fff;
    font-size: 6px;
}

.task-card__watchers .avatar:first-child {
    margin-left: 0;
}

.empty-col {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 108px;
    padding: 14px;
    border: 1px dashed #d7dbe6;
    border-radius: 10px;
    color: #a5adbc;
    font-size: 10.5px;
    text-align: center;
}

.column-placeholder {
    height: 3px;
    border-radius: 99px;
    background: var(--accent);
    opacity: .65;
}

/* =========================================================
   Modal
   ========================================================= */

.modal-overlay {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 38px 18px;
    overflow-y: auto;
    background: rgba(18, 21, 35, .52);
    backdrop-filter: blur(4px);
    animation: fade-in .16s ease;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    width: min(620px, 100%);
    margin: auto;
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    animation: modal-in .2s cubic-bezier(.2, .8, .2, 1);
}

@keyframes modal-in {
    from { opacity: 0; transform: translateY(10px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal--task {
    width: min(1040px, 100%);
}

.modal--md {
    width: min(760px, 100%);
}

.modal__head {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px 22px 15px;
}

.modal__head-main {
    flex: 1;
    min-width: 0;
}

.modal__title {
    font-size: 17px;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: -.02em;
}

.modal__sub {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
}

.modal__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: none;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #f4f5f9;
    color: var(--muted);
    transition: background .14s, color .14s;
}

.modal__close:hover {
    background: #eceef4;
    color: var(--text);
}

.modal__close .icon {
    width: 17px;
    height: 17px;
}

.modal__body {
    padding: 0 22px 22px;
}

.modal__body--flush {
    padding: 0;
}

.modal__foot {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 14px 22px;
    border-top: 1px solid var(--border);
    background: #fbfbfd;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.modal__foot-right {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.task-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    min-height: 470px;
}

.task-main {
    min-width: 0;
    padding: 7px 24px 24px;
    border-right: 1px solid var(--border);
}

.task-aside {
    padding: 8px 20px 22px;
    background: #fcfcfe;
    border-radius: 0 0 18px 0;
}

.task-code {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 10px;
}

.task-code__num {
    padding: 2px 6px;
    border-radius: 4px;
    background: #f1f2f7;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 9.5px;
    font-weight: 700;
}

.task-title-input {
    width: 100%;
    padding: 5px 6px;
    margin-left: -6px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font-size: 21px;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: -.025em;
    transition: background .14s, border-color .14s;
}

.task-title-input:hover {
    background: #f8f9fc;
}

.task-title-input:focus {
    outline: none;
    border-color: var(--border-strong);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, .08);
}

.task-description {
    width: 100%;
    min-height: 145px;
    margin-top: 13px;
    padding: 12px 13px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: #f8f9fc;
    color: var(--text-soft);
    font-size: 12.5px;
    line-height: 1.65;
    resize: vertical;
    transition: border-color .14s, background .14s;
}

.task-description:hover {
    background: #f5f6fa;
}

.task-description:focus {
    outline: none;
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, .08);
}

.task-description::placeholder {
    color: #aeb5c2;
}

.task-save-hint {
    min-height: 15px;
    margin-top: 5px;
    color: var(--muted-2);
    font-size: 9.5px;
    text-align: right;
}

.tabs {
    display: flex;
    gap: 3px;
    margin-top: 21px;
    border-bottom: 1px solid var(--border);
}

.tab {
    position: relative;
    padding: 9px 11px 10px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 600;
    transition: color .14s;
}

.tab:hover {
    color: var(--text-soft);
}

.tab.is-active {
    color: var(--accent);
}

.tab.is-active::after {
    content: "";
    position: absolute;
    left: 9px;
    right: 9px;
    bottom: -1px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
}

.tab__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 17px;
    height: 16px;
    margin-left: 4px;
    padding: 0 4px;
    border-radius: 99px;
    background: #eef0f5;
    color: var(--muted);
    font-size: 8.5px;
}

.tab-panel {
    padding-top: 15px;
}

.comments {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.comment {
    display: flex;
    gap: 10px;
}

.comment__body {
    flex: 1;
    min-width: 0;
}

.comment__head {
    display: flex;
    align-items: baseline;
    gap: 7px;
}

.comment__head strong {
    color: var(--text);
    font-size: 11.5px;
    font-weight: 650;
}

.comment__head time {
    color: var(--muted-2);
    font-size: 9.5px;
}

.comment__text {
    margin-top: 4px;
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.comment-form {
    display: flex;
    align-items: flex-end;
    gap: 9px;
    margin-top: 17px;
}

.comment-form textarea {
    min-height: 44px;
    max-height: 150px;
    padding: 10px 12px;
    font-size: 12px;
    resize: none;
}

.comment-form .btn {
    flex: none;
}

.activity {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: var(--muted);
    font-size: 10.5px;
    line-height: 1.55;
}

.activity-item .avatar {
    width: 22px;
    height: 22px;
    font-size: 7px;
}

.activity-item strong {
    color: var(--text-soft);
    font-weight: 600;
}

.activity-item .status-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-soft);
    font-weight: 600;
}

.activity-item .status-inline::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--status-color, #8b95a7);
}

.activity-item time {
    display: block;
    margin-top: 2px;
    color: #b0b7c5;
    font-size: 8.5px;
}

.aside-block {
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.aside-block:last-child {
    border-bottom: 0;
}

.aside-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 9px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.aside-label .icon {
    width: 13px;
    height: 13px;
}

.aside-value {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    font-size: 11.5px;
    color: var(--text-soft);
}

.aside-select {
    width: 100%;
    height: 36px;
    font-size: 11.5px;
}

.status-select-wrap {
    position: relative;
}

.status-select-wrap::before {
    content: "";
    position: absolute;
    z-index: 1;
    left: 12px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--status-color, #8b95a7);
    transform: translateY(-50%);
    pointer-events: none;
}

.status-select-wrap .select {
    padding-left: 27px;
    font-weight: 600;
}

.assignee-card {
    display: flex;
    align-items: center;
    gap: 9px;
}

.assignee-card__meta {
    flex: 1;
    min-width: 0;
}

.assignee-card__meta strong {
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text);
}

.assignee-card__meta span {
    display: block;
    color: var(--muted);
    font-size: 9px;
}

.icon-btn-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 27px;
    height: 27px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #fff;
    color: var(--muted);
}

.icon-btn-inline:hover {
    color: var(--text);
    border-color: var(--border-strong);
}

.icon-btn-inline .icon {
    width: 14px;
    height: 14px;
}

.watchers {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.watcher-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 27px;
    padding: 2px 8px 2px 3px;
    border: 1px solid var(--border);
    border-radius: 99px;
    background: #fff;
    font-size: 9.5px;
    color: var(--text-soft);
}

.watcher-chip .avatar {
    width: 20px;
    height: 20px;
    font-size: 6.5px;
}

.watcher-add {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 27px;
    padding: 0 9px;
    border: 1px dashed var(--border-strong);
    border-radius: 99px;
    background: transparent;
    color: var(--muted);
    font-size: 9.5px;
}

.watcher-add:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.aside-note {
    margin-top: 7px;
    color: var(--muted-2);
    font-size: 9px;
    line-height: 1.45;
}

.aside-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 16px;
}

.aside-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 2px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 10.5px;
    text-align: left;
}

.aside-link:hover {
    color: var(--red);
}

.aside-link--danger {
    color: var(--red);
}

.aside-link--danger:hover {
    color: #c0392b;
}

.aside-link .icon {
    width: 14px;
    height: 14px;
}

.watcher-picker {
    margin-top: 8px;
    padding: 9px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fff;
    box-shadow: var(--shadow);
}

.watcher-picker__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 10.5px;
}

.watcher-picker__item:hover {
    background: #f7f7fc;
}

.watcher-picker__item input {
    width: 14px;
    height: 14px;
    accent-color: var(--accent);
}

.watcher-picker .avatar {
    width: 22px;
    height: 22px;
    font-size: 7px;
}

/* Create task modal */

.task-create-form {
    padding: 0 22px 22px;
}

.task-create-form .field {
    margin-bottom: 14px;
}

.task-create-form .field--title input {
    height: 48px;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -.01em;
}

.task-create-form .textarea {
    min-height: 92px;
}

.task-create-form .form-grid {
    gap: 13px;
}

.member-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 108px;
    overflow-y: auto;
}

.member-picker label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 29px;
    padding: 3px 9px 3px 4px;
    border: 1px solid var(--border);
    border-radius: 99px;
    background: #fff;
    color: var(--text-soft);
    font-size: 10.5px;
    cursor: pointer;
}

.member-picker label:has(input:checked) {
    border-color: #c7bdfa;
    background: var(--accent-soft);
    color: var(--accent);
}

.member-picker input {
    width: 13px;
    height: 13px;
    margin: 0;
    accent-color: var(--accent);
}

.member-picker .avatar {
    width: 21px;
    height: 21px;
    font-size: 6.5px;
}

/* =========================================================
   Admin
   ========================================================= */

.admin-tabs {
    display: flex;
    gap: 3px;
    margin-bottom: 19px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    width: max-content;
    box-shadow: var(--shadow-sm);
}

.admin-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 600;
}

.admin-tab .icon {
    width: 14px;
    height: 14px;
}

.admin-tab:hover {
    color: var(--text-soft);
    background: #f6f7fa;
}

.admin-tab.is-active {
    background: var(--accent-soft);
    color: var(--accent);
}

.table-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.table-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 17px;
    border-bottom: 1px solid var(--border);
}

.table-card__head h2 {
    font-size: 13px;
    font-weight: 700;
}

.table-card__head p {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10.5px;
}

.table-card__head .btn {
    margin-left: auto;
}

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

/* Формы внутри карточек (настройки почты/IMAP) должны иметь те же отступы,
   что и заголовок карточки, иначе поля прилипают к краям. */
.table-wrap > form {
    padding: 16px 17px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11.5px;
}

.data-table th {
    padding: 9px 16px;
    border-bottom: 1px solid var(--border);
    background: #fbfbfd;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .06em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f2f7;
    color: var(--text-soft);
    vertical-align: middle;
}

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

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

.data-table .cell-user {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 170px;
}

.cell-user__meta strong {
    display: block;
    color: var(--text);
    font-size: 11.5px;
    font-weight: 600;
}

.cell-user__meta span {
    display: block;
    margin-top: 1px;
    color: var(--muted);
    font-size: 9.5px;
}

.cell-actions {
    display: flex;
    justify-content: flex-end;
    gap: 5px;
}

.cell-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 9.5px;
    color: var(--muted);
}

.status-dot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-soft);
    font-size: 10.5px;
    white-space: nowrap;
}

.status-dot::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #abb3c2;
}

.status-dot--active::before {
    background: var(--green);
    box-shadow: 0 0 0 3px rgba(34, 160, 107, .1);
}

.status-dot--blocked::before {
    background: #a7afbd;
}

.admin-project-cell {
    display: flex;
    align-items: center;
    gap: 9px;
}

.admin-project-cell__color {
    width: 8px;
    height: 26px;
    flex: none;
    border-radius: 3px;
}

.admin-project-cell strong {
    display: block;
    color: var(--text);
    font-weight: 600;
}

.admin-project-cell span {
    display: block;
    color: var(--muted);
    font-size: 9.5px;
}

.mail-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 7px;
    border-radius: 99px;
    font-size: 9px;
    font-weight: 700;
    white-space: nowrap;
}

.mail-status::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

.mail-status--sent {
    background: var(--green-soft);
    color: var(--green);
}

.mail-status--sent::before { background: var(--green); }

.mail-status--pending {
    background: var(--orange-soft);
    color: #a36a05;
}

.mail-status--pending::before { background: var(--orange); }

.mail-status--failed {
    background: var(--red-soft);
    color: var(--red);
}

.mail-status--failed::before { background: var(--red); }

.mail-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    padding: 12px 15px;
    border: 1px solid #dfe3f2;
    border-radius: 11px;
    background: linear-gradient(100deg, #f7f6ff, #fbfcff);
}

.mail-info__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 9px;
    background: var(--accent-soft);
    color: var(--accent);
}

.mail-info__icon .icon {
    width: 17px;
    height: 17px;
}

.mail-info__text {
    flex: 1;
    min-width: 0;
}

.mail-info__text strong {
    display: block;
    font-size: 11.5px;
}

.mail-info__text p {
    margin-top: 1px;
    color: var(--muted);
    font-size: 10px;
}

.mail-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.mail-stat {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
}

.mail-stat strong {
    display: block;
    font-size: 20px;
    line-height: 1.1;
    letter-spacing: -.03em;
}

.mail-stat span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.mail-error {
    display: block;
    max-width: 220px;
    margin-top: 2px;
    overflow: hidden;
    color: var(--red);
    font-size: 8.5px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mail-subject {
    display: block;
    max-width: 290px;
    overflow: hidden;
    color: var(--text-soft);
    font-size: 10.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =========================================================
   Empty states, toasts, misc
   ========================================================= */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 46px 24px;
    border: 1px dashed #dce0ea;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .55);
    text-align: center;
}

.empty-state__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    margin-bottom: 13px;
    border-radius: 14px;
    background: #eeecff;
    color: var(--accent);
}

.empty-state__icon .icon {
    width: 24px;
    height: 24px;
}

.empty-state h3 {
    font-size: 14px;
    font-weight: 700;
}

.empty-state p {
    max-width: 330px;
    margin: 5px 0 15px;
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.55;
}

.toast-stack {
    position: fixed;
    z-index: 200;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: min(360px, calc(100vw - 40px));
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 34px rgba(23, 32, 51, .16);
    color: var(--text-soft);
    font-size: 11.5px;
    line-height: 1.45;
    pointer-events: auto;
    animation: toast-in .22s ease;
}

.toast.is-out {
    animation: toast-out .18s ease forwards;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-out {
    to { opacity: 0; transform: translateY(8px); }
}

.toast__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex: none;
    border-radius: 50%;
    background: var(--green-soft);
    color: var(--green);
}

.toast--error .toast__icon {
    background: var(--red-soft);
    color: var(--red);
}

.toast--info .toast__icon {
    background: var(--accent-soft);
    color: var(--accent);
}

.toast__icon .icon {
    width: 13px;
    height: 13px;
}

.toast__text {
    flex: 1;
    padding-top: 3px;
}

.toast__close {
    border: 0;
    background: transparent;
    color: var(--muted-2);
    padding: 2px;
}

.menu {
    position: absolute;
    z-index: 70;
    min-width: 190px;
    padding: 5px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--shadow);
    animation: fade-in .12s ease;
}

.menu__item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 9px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-soft);
    font-size: 11.5px;
    text-align: left;
}

.menu__item:hover {
    background: #f5f6fa;
    color: var(--text);
}

.menu__item .icon {
    width: 15px;
    height: 15px;
}

.menu__item--danger {
    color: var(--red);
}

.menu__item--danger:hover {
    background: var(--red-soft);
    color: var(--red);
}

.menu__divider {
    height: 1px;
    margin: 4px 2px;
    background: var(--border);
}

.user-menu {
    position: fixed;
    z-index: 90;
    width: 220px;
    bottom: 70px;
    left: 12px;
}

.user-menu__head {
    padding: 8px 9px 10px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}

.user-menu__head strong {
    display: block;
    font-size: 11.5px;
}

.user-menu__head span {
    display: block;
    margin-top: 1px;
    color: var(--muted);
    font-size: 9.5px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.skeleton {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    background: #eef0f5;
}

.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent);
    animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}

.loading-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 240px;
    color: var(--muted);
    font-size: 12px;
}

.loading-panel .spinner {
    border-color: #e1e3ec;
    border-top-color: var(--accent);
}

/* =========================================================
   Responsive
   ========================================================= */

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

    .home-hero__stats {
        display: none;
    }
}

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

    .login-visual {
        padding: 32px 36px 22px;
    }

    .login-visual h1 {
        font-size: 40px;
    }

    .task-layout {
        grid-template-columns: minmax(0, 1fr) 270px;
    }
}

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

    .login-visual {
        display: none;
    }

    .login-panel {
        min-height: 100vh;
        padding: 36px 24px;
        background:
            radial-gradient(500px 350px at 50% 0%, #eeebff 0%, transparent 60%),
            #fbfbfd;
    }

    .login-panel__mobile-brand {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform .22s ease;
        box-shadow: 20px 0 50px rgba(0, 0, 0, .2);
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    .sidebar-scrim {
        position: fixed;
        z-index: 35;
        inset: 0;
        display: block;
        background: rgba(15, 18, 30, .4);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s;
    }

    .sidebar-scrim.is-visible {
        opacity: 1;
        pointer-events: auto;
    }

    .app-main {
        margin-left: 0;
    }

    .mobile-menu {
        display: inline-flex;
    }

    .view {
        padding: 22px 20px 34px;
    }

    .board-scroll {
        margin: 0 -20px;
        padding: 0 20px 12px;
    }
}

@media (max-width: 820px) {
    .task-layout {
        grid-template-columns: 1fr;
    }

    .task-main {
        padding: 7px 19px 20px;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .task-aside {
        padding: 8px 19px 20px;
        border-radius: 0;
    }

    .modal-overlay {
        padding: 16px 10px;
    }

    .modal {
        border-radius: 14px;
    }

    .modal__head,
    .modal__body,
    .task-create-form {
        padding-left: 16px;
        padding-right: 16px;
    }

    .modal--task {
        width: 100%;
    }

    .topbar {
        padding: 0 18px;
    }

    .filter-search {
        flex: 1;
        width: auto;
    }

    .board-toolbar {
        flex-wrap: wrap;
    }

    .toolbar-count {
        display: none;
    }

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

    .home-hero {
        padding: 22px;
    }

    .home-hero h1 {
        font-size: 22px;
    }

    .page-head {
        flex-direction: column;
        gap: 12px;
    }

    .page-head__actions {
        width: 100%;
        flex-wrap: wrap;
        padding-top: 0;
    }
}

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

    .view {
        padding: 18px 14px 30px;
    }

    .board-scroll {
        margin: 0 -14px;
        padding: 0 14px 12px;
    }

    .board-head {
        flex-direction: column;
        gap: 10px;
    }

    .board-head__actions {
        width: 100%;
    }

    .board-head__actions .btn--primary {
        flex: 1;
    }

    .board {
        height: calc(100vh - 300px);
    }

    .board-col {
        width: 286px;
    }

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

    .topbar__title span {
        display: none;
    }

    .topbar {
        height: 60px;
    }

    .modal__foot {
        flex-wrap: wrap;
    }

    .mail-stats {
        grid-template-columns: 1fr 1fr;
    }

    .my-task__meta .due-chip {
        display: none;
    }

    .login-card h2 {
        font-size: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}

/* =========================================================
   Additions: settings, confirm, color picker
   ========================================================= */

.sidebar-empty {
    margin: 6px 10px;
    color: rgba(255, 255, 255, .28);
    font-size: 10px;
    line-height: 1.5;
}

.my-task {
    width: 100%;
    border: 0;
    border-bottom: 1px solid #f0f1f6;
    background: transparent;
    font: inherit;
    text-align: left;
}

.my-task:last-child {
    border-bottom: 0;
}

.modal--sm {
    width: min(450px, 100%);
}

.confirm-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
    border-radius: 11px;
    background: var(--accent-soft);
    color: var(--accent);
}

.confirm-icon--danger {
    background: var(--red-soft);
    color: var(--red);
}

.confirm-icon .icon {
    width: 19px;
    height: 19px;
}

.confirm-text {
    color: var(--text-soft);
    font-size: 12.5px;
    line-height: 1.6;
}

.settings-tabs {
    display: flex;
    gap: 3px;
    margin-bottom: 18px;
    padding: 4px;
    border-radius: 9px;
    background: #f4f5f9;
}

.settings-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

.settings-tab:hover {
    color: var(--text-soft);
}

.settings-tab.is-active {
    background: #fff;
    color: var(--accent);
    box-shadow: var(--shadow-sm);
}

.settings-tab .icon {
    width: 14px;
    height: 14px;
}

.settings-hint {
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
}

.settings-members {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.settings-member {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 8px 11px;
    border-bottom: 1px solid #f0f2f7;
    background: #fff;
}

.settings-member:last-child {
    border-bottom: 0;
}

.settings-member__meta {
    flex: 1;
    min-width: 0;
}

.settings-member .select {
    max-width: 210px;
    flex-shrink: 0;
}

.settings-member__meta strong {
    display: block;
    color: var(--text);
    font-size: 11.5px;
    font-weight: 600;
}

.settings-member__meta span {
    display: block;
    margin-top: 1px;
    color: var(--muted);
    font-size: 9px;
}

.settings-role {
    width: 146px;
    height: 32px;
    font-size: 10.5px;
}

.settings-add {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.settings-add .select {
    flex: 1;
    height: 37px;
    font-size: 11px;
}

.settings-add .btn {
    flex: none;
}

.settings-empty {
    padding: 20px;
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}

.color-picker {
    display: flex;
    align-items: center;
    gap: 14px;
}

.color-input {
    width: 40px;
    height: 40px;
    flex: none;
    padding: 3px;
    overflow: hidden;
    border: 1px solid var(--border-strong);
    border-radius: 9px;
    background: #fff;
    cursor: pointer;
}

.color-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-input::-webkit-color-swatch {
    border: 0;
    border-radius: 6px;
}

.color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.color-swatch {
    width: 22px;
    height: 22px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px var(--border-strong);
    transition: transform .12s, box-shadow .12s;
}

.color-swatch:hover {
    transform: scale(1.12);
}

.color-swatch.is-active {
    box-shadow: 0 0 0 2px var(--accent);
}

.status-preview {
    margin-top: 18px;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-soft);
}

.status-preview__list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 7px;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border-radius: 99px;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text-soft);
    font-size: 10px;
    font-weight: 600;
}

.status-chip::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--status-color, #8b95a7);
}

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

.status-editor__row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border, #e4e7ef);
    border-radius: 12px;
    background: var(--surface, #fff);
}

.status-editor__row .color-input {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 8px;
}

.status-editor__name {
    flex: 1 1 auto;
    min-width: 140px;
}

.status-editor__done {
    display: inline-flex;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}

.status-editor__done input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

.status-editor__actions {
    display: inline-flex;
    gap: 4px;
    margin-left: auto;
}

.status-editor__actions .icon-btn-inline:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.admin-tab:hover {
    text-decoration: none;
}

.mail-info code {
    padding: 1px 4px;
    border-radius: 4px;
    background: rgba(108, 92, 231, .08);
    color: var(--accent);
    font-size: 9.5px;
}

.comment-form {
    flex-wrap: wrap;
}

.comment-form .form-alert {
    flex-basis: 100%;
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .topbar-task-label {
        display: none;
    }

    .settings-role {
        width: 118px;
    }

    .color-picker {
        align-items: flex-start;
        flex-direction: column;
        gap: 9px;
    }
}

@media (max-width: 640px) {
    .status-editor__row {
        flex-wrap: wrap;
    }

    .status-editor__name {
        min-width: 100%;
        order: 3;
    }

    .table-wrap > form {
        padding: 12px 12px;
    }

    .settings-member {
        flex-wrap: wrap;
    }

    .settings-member .select {
        max-width: 100%;
        width: 100%;
        order: 3;
    }
}
