:root {
    --ink: #020617;
    --lime: #a3e635;
    --white: #fff;
    --sidebar-open: 172px;
    --sidebar-closed: 64px;
    --bg: rgba(2, 6, 23, .045);
    --chrome: #020617;
    --surface: rgba(255, 255, 255, .92);
    --surface-2: rgba(2, 6, 23, .045);
    --surface-3: rgba(163, 230, 53, .12);
    --text: #020617;
    --muted: rgba(2, 6, 23, .62);
    --line: rgba(2, 6, 23, .12);
    --line-strong: rgba(2, 6, 23, .24);
    --accent-line: rgba(163, 230, 53, .55);
    --shadow: 0 18px 44px rgba(2, 6, 23, .10);
    --shadow-soft: 0 8px 20px rgba(2, 6, 23, .06);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.45;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--ink); }

label {
    color: var(--ink);
    font-size: .73rem;
    font-weight: 800;
    margin-bottom: .42rem;
    text-transform: uppercase;
}

.form-control,
.form-select {
    min-height: 40px;
    color: var(--ink);
    background-color: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: none;
}

.form-control-sm,
.form-select-sm { min-height: 34px; }

.form-control:focus,
.form-select:focus {
    color: var(--ink);
    background-color: var(--white);
    border-color: var(--ink);
    box-shadow: 0 0 0 .18rem rgba(163, 230, 53, .32);
}

.form-control::placeholder { color: rgba(2, 6, 23, .42); }
.form-select option { color: var(--ink); background: var(--white); }

.btn {
    min-height: 40px;
    border-radius: 8px;
    font-weight: 800;
    font-size: .9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.btn-sm {
    min-height: 32px;
    font-size: .82rem;
}

.btn-primary {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--white);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--lime);
    border-color: var(--lime);
    color: var(--ink);
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-danger {
    border-color: var(--line-strong);
    color: var(--ink);
    background: var(--white);
}

.btn-outline-primary:hover,
.btn-outline-secondary:hover,
.btn-outline-danger:hover {
    background: rgba(163, 230, 53, .16);
    border-color: var(--lime);
    color: var(--ink);
}

.text-muted { color: var(--muted) !important; }
.text-danger,
.text-primary { color: var(--ink) !important; }

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--ink);
    --bs-table-hover-bg: rgba(163, 230, 53, .08);
    margin-bottom: 0;
}

.table > :not(caption) > * > * {
    padding: .95rem .8rem;
    border-bottom-color: rgba(2, 6, 23, .08);
    vertical-align: middle;
}

.table thead th {
    background: rgba(2, 6, 23, .055);
    color: rgba(2, 6, 23, .68);
    font-size: .72rem;
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: 0;
    border-bottom: 1px solid var(--line);
}

.table tbody tr:hover { background: rgba(163, 230, 53, .08); }
.table td { color: var(--ink); }
.table td a { color: var(--ink); font-weight: 850; }
.table td a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--lime); }
.table small { color: var(--muted); }

.alert {
    border-radius: 8px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}

.alert-success,
.alert-danger {
    background: rgba(163, 230, 53, .14);
    border-color: rgba(163, 230, 53, .42);
    color: var(--ink);
}

.confirm-modal {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: var(--shadow);
}

.confirm-modal .modal-header,
.confirm-modal .modal-footer { border-color: var(--line); }

.auth-page {
    background: var(--ink);
    color: var(--ink);
}

.login-wrap {
    min-height: 100vh;
    display: flex;
    background: var(--ink);
}

.login-stage {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.login-topbar {
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 0 24px;
    background: rgba(255, 255, 255, .88);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
}

.login-topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.login-back-link {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 50%;
    flex: 0 0 auto;
}

.login-back-link:hover,
.login-back-link:focus {
    color: var(--ink);
    background: rgba(163, 230, 53, .16);
    border-color: var(--lime);
}

.login-back-link:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 .18rem rgba(163, 230, 53, .32);
}

.login-topbar span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    font-size: .84rem;
    font-weight: 850;
}

.login-topbar i { color: var(--ink); }

.login-topbar-badge {
    min-height: 32px;
    padding: 0 10px;
    background: rgba(163, 230, 53, .16);
    border: 1px solid rgba(163, 230, 53, .45);
    border-radius: 999px;
}

.login-panel {
    flex: 1;
    display: grid;
    place-items: center;
    padding: 28px;
}

.login-card {
    width: min(430px, 100%);
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 30px;
    box-shadow: var(--shadow-soft);
}

.login-logo {
    width: 132px;
    height: auto;
    display: block;
    margin: 0 0 20px;
}

.login-card h1 {
    margin: 0 0 22px;
    font-size: 1.45rem;
    font-weight: 860;
    letter-spacing: 0;
}

.login-card label { margin-top: 16px; }

.password-field {
    position: relative;
}

.password-field .form-control {
    padding-right: 46px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    transform: translateY(-50%);
    color: var(--muted);
    background: transparent;
    border: 0;
    border-radius: 7px;
}

.password-toggle:hover,
.password-toggle:focus {
    color: var(--ink);
    background: rgba(163, 230, 53, .16);
    outline: 0;
}

.password-toggle:focus-visible {
    box-shadow: 0 0 0 .18rem rgba(163, 230, 53, .32);
}

.login-card .btn {
    margin-top: 18px !important;
    min-height: 50px;
    font-size: 1rem;
}

.login-card small {
    display: block;
    margin-top: 14px;
}

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

.sidebar {
    width: var(--sidebar-open);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #020617;
    color: var(--white);
    padding: 12px 10px;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    border-right: 1px solid rgba(255, 255, 255, .10);
    transition: width .18s ease;
}

.brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 42px;
    margin-bottom: 12px;
    padding: 0 9px;
    overflow: hidden;
}

.brand-logo { width: 88px; height: auto; display: block; }
.brand-icon { width: 32px; height: 32px; display: none; }

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: inline-grid;
    place-items: center;
    background: var(--lime);
    color: var(--ink);
    font-weight: 900;
}

.nav-menu {
    display: grid;
    gap: 3px;
    align-items: start;
    overflow: hidden;
}

.nav-menu a,
.sidebar-logout {
    position: relative;
    display: flex;
    width: 100%;
    min-width: 0;
    height: 36px;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    color: rgba(255, 255, 255, .74);
    padding: 0 8px;
    border-radius: 7px;
    font-weight: 720;
    font-size: .74rem;
    border: 1px solid transparent;
    white-space: nowrap;
    overflow: hidden;
}

.nav-menu i,
.sidebar-logout i {
    width: 17px;
    flex: 0 0 17px;
    color: rgba(255, 255, 255, .88);
    font-size: .96rem;
    text-align: center;
}

.nav-menu span,
.sidebar-logout span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-badge {
    min-width: 18px;
    height: 18px;
    margin-left: auto;
    padding: 0 5px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    background: var(--lime);
    color: var(--ink);
    border: 1px solid rgba(255, 255, 255, .75);
    font-size: .67rem;
    font-weight: 900;
    line-height: 1;
    flex: 0 0 auto;
}

.nav-menu a:hover,
.nav-menu a.is-active,
.sidebar-logout:hover {
    color: var(--white);
    background: rgba(163, 230, 53, .12);
    border-color: rgba(163, 230, 53, .32);
}

.nav-menu a.is-active i,
.nav-menu a:hover i,
.sidebar-logout:hover i { color: var(--lime); }

.sidebar-footer {
    margin-top: auto;
    padding-top: 12px;
}

.sidebar-footer form {
    margin: 0;
}

.sidebar-logout {
    appearance: none;
    background: transparent;
    font-family: inherit;
    cursor: pointer;
}

.sidebar.is-collapsed { width: var(--sidebar-closed); }

.sidebar.is-collapsed .brand {
    justify-content: center;
    padding: 0;
}

.sidebar.is-collapsed .brand-logo,
.sidebar.is-collapsed .nav-menu span,
.sidebar.is-collapsed .sidebar-logout span { display: none; }

.sidebar.is-collapsed .brand-icon { display: block; }

.sidebar.is-collapsed .nav-badge {
    position: absolute;
    top: 5px;
    right: 9px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: .62rem;
    border-color: #020617;
}

.sidebar.is-collapsed .nav-menu a,
.sidebar.is-collapsed .sidebar-logout {
    justify-content: center;
    padding: 0;
}

.sidebar.is-collapsed .nav-menu i,
.sidebar.is-collapsed .sidebar-logout i {
    width: auto;
    flex-basis: auto;
    font-size: 1.08rem;
}

html.sidebar-expanded .sidebar { width: var(--sidebar-open); }
html.sidebar-expanded .sidebar .brand { justify-content: flex-start; padding: 0 8px; }
html.sidebar-expanded .sidebar .brand-logo { display: block; }
html.sidebar-expanded .sidebar .brand-icon { display: none; }
html.sidebar-expanded .sidebar .nav-menu span,
html.sidebar-expanded .sidebar .sidebar-logout span { display: inline; }
html.sidebar-expanded .sidebar .nav-badge {
    position: static;
    min-width: 18px;
    height: 18px;
    margin-left: auto;
    padding: 0 5px;
    font-size: .67rem;
}
html.sidebar-expanded .sidebar .nav-menu a,
html.sidebar-expanded .sidebar .sidebar-logout { justify-content: flex-start; padding: 0 8px; }
html.sidebar-expanded .sidebar .nav-menu i,
html.sidebar-expanded .sidebar .sidebar-logout i { width: 17px; flex: 0 0 17px; font-size: .96rem; }

html.sidebar-expanded .sidebar + .main {
    margin-left: var(--sidebar-open);
    width: calc(100% - var(--sidebar-open));
}

html.sidebar-collapsed .sidebar { width: var(--sidebar-closed); }

html.sidebar-collapsed .sidebar + .main {
    margin-left: var(--sidebar-closed);
    width: calc(100% - var(--sidebar-closed));
}

.main {
    margin-left: var(--sidebar-open);
    width: calc(100% - var(--sidebar-open));
    min-height: 100vh;
    background: var(--bg);
    transition: margin-left .18s ease, width .18s ease;
}

.sidebar.is-collapsed + .main {
    margin-left: var(--sidebar-closed);
    width: calc(100% - var(--sidebar-closed));
}

.topbar {
    height: 66px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 24px;
    background: rgba(255, 255, 255, .88);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.search-box {
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(2, 6, 23, .055);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    flex: 1;
    max-width: 560px;
    color: var(--muted);
}

.search-box:focus-within {
    background: var(--white);
    border-color: var(--ink);
    box-shadow: 0 0 0 .18rem rgba(163, 230, 53, .25);
}

.search-box input {
    border: 0;
    outline: 0;
    width: 100%;
    background: transparent;
    color: var(--ink);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.icon-btn {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    background: var(--white);
    border-radius: 8px;
    color: var(--ink);
    flex: 0 0 auto;
}

.icon-btn:hover {
    border-color: var(--lime);
    color: var(--ink);
    background: rgba(163, 230, 53, .16);
}

.notify-dot {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 21px;
    height: 21px;
    border-radius: 999px;
    background: var(--lime);
    color: var(--ink);
    display: grid;
    place-items: center;
    font-size: .72rem;
    font-weight: 900;
    border: 2px solid var(--white);
}

.notification-menu {
    width: min(380px, calc(100vw - 24px));
    padding: 9px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.notification-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 8px 12px;
}

.notification-menu-head a {
    color: var(--ink);
    font-weight: 900;
    font-size: .84rem;
    text-decoration: underline;
    text-decoration-color: var(--lime);
}

.notification-mini {
    display: grid;
    gap: 4px;
    padding: 11px;
    border-radius: 8px;
}

.notification-mini:hover { background: rgba(163, 230, 53, .10); }
.notification-mini span { font-weight: 900; color: var(--ink); }
.notification-mini small,
.notification-empty { color: var(--muted); }
.notification-empty { padding: 14px 8px; }

.profile-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 5px 12px 5px 5px;
    background: var(--white);
    color: var(--ink);
    font-weight: 800;
}

.profile-chip > span:last-child {
    min-width: 0;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-chip:hover {
    border-color: var(--lime);
    color: var(--ink);
    background: rgba(163, 230, 53, .12);
}

.avatar {
    width: 32px;
    height: 32px;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    display: inline-grid;
    place-items: center;
    background: var(--ink);
    color: var(--white);
    font-size: .86rem;
    font-weight: 900;
    line-height: 1;
    flex: 0 0 auto;
    overflow: hidden;
}

.avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-lg {
    width: 68px;
    height: 68px;
    font-size: 1.6rem;
}

.content {
    padding: 28px;
    max-width: 1520px;
}

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.page-head h1 {
    margin: 0;
    color: var(--ink);
    font-weight: 880;
    font-size: clamp(1.45rem, 2vw, 1.95rem);
    letter-spacing: 0;
}

.eyebrow {
    color: var(--ink);
    text-transform: uppercase;
    font-size: .72rem;
    font-weight: 900;
    margin: 0 0 6px;
}

.eyebrow::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 7px;
    border-radius: 999px;
    background: var(--lime);
    vertical-align: 1px;
}

.panel,
.metric-card,
.project-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow-soft);
}

.panel { padding: 18px; }

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

.panel-head h2 {
    color: var(--ink);
    font-size: 1rem;
    margin: 0;
    font-weight: 860;
}

.panel-head a {
    color: var(--ink);
    font-weight: 850;
    text-decoration: underline;
    text-decoration-color: var(--lime);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.metric-card {
    padding: 18px;
    min-height: 118px;
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: var(--lime);
}

.metric-card:nth-child(even) { background: rgba(163, 230, 53, .10); }

.metric-card span {
    display: block;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 850;
}

.metric-card strong {
    display: block;
    color: var(--ink);
    font-size: 2rem;
    line-height: 1;
    margin-top: 18px;
    letter-spacing: 0;
}

.badge {
    border-radius: 999px;
    padding: .4rem .62rem;
    font-weight: 850;
    border: 1px solid transparent;
}

.badge-soft-secondary,
.badge-soft-info,
.badge-soft-success,
.badge-soft-warning,
.badge-soft-danger,
.badge-soft-dark {
    background: rgba(2, 6, 23, .055);
    color: var(--ink);
    border-color: rgba(2, 6, 23, .12);
}

.badge-soft-info,
.badge-soft-success {
    background: rgba(163, 230, 53, .18);
    border-color: rgba(163, 230, 53, .44);
}

.badge-soft-warning,
.badge-soft-danger,
.badge-soft-dark {
    background: rgba(2, 6, 23, .08);
    border-color: rgba(2, 6, 23, .18);
}

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

.list-toolbar {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: .86rem;
    font-weight: 760;
    margin-bottom: 4px;
}

.panel > .list-toolbar {
    margin-bottom: 12px;
}

.pagination-wrap {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

.pagination .page-link {
    color: var(--ink);
    border-color: var(--line);
    font-weight: 760;
}

.pagination .page-item.active .page-link {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.project-card {
    position: relative;
    padding: 18px;
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.project-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-line);
    box-shadow: var(--shadow);
}

.project-card h2 {
    font-size: 1rem;
    font-weight: 860;
    margin: 0 0 8px;
    min-width: 0;
}

.project-card h2 a { color: var(--ink); }
.project-card h2 a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--lime); }
.project-card p { color: var(--muted); min-height: 44px; margin-bottom: 16px; }
.project-color { position: absolute; inset: 0 auto 0 0; width: 5px; }

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    color: var(--muted);
    font-size: .88rem;
}

.meta-row b,
.meta-column b { color: var(--ink); }

.project-progress {
    display: grid;
    gap: 8px;
    margin: 2px 0 14px;
}

.project-progress-top,
.project-progress-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.project-progress-top span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 850;
}

.project-progress-top strong {
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1;
}

.project-progress-bar {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(2, 6, 23, .09);
}

.project-progress-bar span {
    display: block;
    width: var(--project-progress, 0%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--lime), color-mix(in srgb, var(--lime) 64%, var(--ink)));
}

.project-progress-foot {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
    flex-wrap: wrap;
}

.project-countdown {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 62%;
    padding: 3px 7px;
    border: 1px solid rgba(2, 6, 23, .1);
    border-radius: 999px;
    background: rgba(2, 6, 23, .045);
    color: var(--ink);
    line-height: 1.15;
    white-space: nowrap;
}

.project-countdown.is-running,
.project-countdown.is-done {
    border-color: rgba(163, 230, 53, .5);
    background: rgba(163, 230, 53, .18);
}

.project-countdown.is-today,
.project-countdown.is-overdue {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.meta-column {
    display: grid;
    gap: 9px;
    color: var(--muted);
}

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

.task-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 14px;
    align-items: center;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.task-row:hover {
    border-color: var(--accent-line);
    background: rgba(163, 230, 53, .10);
}

.task-table th:last-child,
.task-table td:last-child {
    width: 280px;
    white-space: nowrap;
}

.task-table td {
    white-space: nowrap;
}

.task-table td:first-child {
    min-width: 180px;
    max-width: 360px;
}

.task-row-title {
    display: block;
    color: var(--ink);
    font-weight: 850;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-assignee-avatars {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.task-assignee-avatars > span {
    display: inline-flex;
    align-items: center;
}

.task-assignee-avatars > span + span {
    margin-left: -6px;
}

.task-assignee-avatars .avatar {
    border: 2px solid var(--white);
    box-shadow: 0 1px 0 rgba(2, 6, 23, .08);
}

.task-table-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 7px;
}

.task-table-actions form {
    margin: 0;
}

.task-table-actions .icon-btn {
    width: 34px;
    height: 34px;
}

.task-table-actions .icon-btn:disabled {
    opacity: .38;
    pointer-events: none;
}

.task-table-actions .task-ok-btn {
    min-width: 116px;
    white-space: nowrap;
}

.task-project-picker {
    display: grid;
    gap: 18px;
}

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

.task-project-picker-head h2 {
    margin: 0 0 4px;
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 900;
}

.task-project-picker-head p {
    margin: 0;
    color: var(--muted);
    font-weight: 750;
}

.task-project-select-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    gap: 10px;
    align-items: end;
    max-width: 720px;
}

.task-project-select-form label {
    grid-column: 1 / -1;
    margin: 0;
}

.task-project-option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.task-project-option {
    position: relative;
    min-width: 0;
    display: grid;
    gap: 7px;
    padding: 14px 14px 14px 20px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    color: var(--ink);
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(2, 6, 23, .04);
}

.task-project-option:hover {
    border-color: rgba(163, 230, 53, .9);
    color: var(--ink);
    transform: translateY(-1px);
}

.task-project-option strong,
.task-project-option small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-project-option strong {
    font-size: .98rem;
    font-weight: 900;
}

.task-project-option small {
    color: var(--muted);
    font-weight: 760;
}

.task-project-option-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: .8rem;
    font-weight: 850;
}

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

.task-stage-group {
    padding: 0;
    overflow: hidden;
}

.task-stage-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 54px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
}

.task-stage-toggle {
    appearance: none;
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    text-align: left;
}

.task-stage-toggle i {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    transition: transform .15s ease;
}

.task-stage-title {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.task-stage-title strong {
    overflow: hidden;
    color: var(--ink);
    font-size: .98rem;
    font-weight: 900;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-stage-title small {
    overflow: hidden;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-stage-summary {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 7px;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 800;
}

.task-stage-summary > span {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(2, 6, 23, .035);
}

.task-stage-pin {
    width: 32px;
    height: 32px;
}

.task-stage-group.is-pinned .task-stage-pin {
    border-color: var(--lime);
    background: rgba(163, 230, 53, .18);
}

.task-stage-progress {
    height: 3px;
    background: rgba(2, 6, 23, .06);
}

.task-stage-progress span {
    display: block;
    height: 100%;
    background: var(--lime);
}

.task-stage-body {
    display: grid;
}

.task-module-group {
    display: grid;
    border-top: 1px solid rgba(2, 6, 23, .075);
    background: color-mix(in srgb, var(--task-module-color, #64748b) 4%, #fff);
}

.task-module-group:first-child {
    border-top: 0;
}

.task-module-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 42px;
    padding: 7px 10px 7px 14px;
    border-left: 4px solid var(--task-module-color, #64748b);
    border-bottom: 1px solid rgba(2, 6, 23, .06);
    background: color-mix(in srgb, var(--task-module-color, #64748b) 8%, #fff);
}

.task-module-title {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.task-module-title strong {
    overflow: hidden;
    color: var(--ink);
    font-size: .86rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-module-number {
    min-height: 23px;
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    border: 1px solid color-mix(in srgb, var(--task-module-color, #64748b) 36%, rgba(2, 6, 23, .14));
    border-radius: 999px;
    background: rgba(255, 255, 255, .78);
    color: var(--ink);
    font-size: .72rem;
    font-weight: 900;
    white-space: nowrap;
}

.task-module-color {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: var(--task-module-color, #64748b);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--task-module-color, #64748b) 18%, transparent);
    flex: 0 0 auto;
}

.task-module-summary {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 850;
}

.task-module-summary > span {
    min-height: 25px;
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    border: 1px solid rgba(2, 6, 23, .10);
    border-radius: 999px;
    background: rgba(255, 255, 255, .72);
}

.task-module-summary .btn {
    min-height: 28px;
}

.task-module-body {
    display: grid;
}

.task-module-create-grid {
    display: grid;
    grid-template-columns: minmax(92px, 120px) minmax(220px, 1fr) minmax(84px, 110px);
    align-items: end;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(2, 6, 23, .025);
}

.task-module-create-grid label {
    display: block;
    margin: 0 0 3px;
    color: var(--muted);
    font-size: .68rem;
    font-weight: 850;
}

.task-module-create-color .form-control-color {
    width: 100%;
    min-width: 54px;
    height: 31px;
    padding: 3px;
}

.task-stage-group.is-collapsed .task-stage-toggle i {
    transform: rotate(-90deg);
}

.task-stage-group.is-collapsed .task-stage-body {
    display: none;
}

.task-stage-row {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(78px, auto) minmax(95px, auto) minmax(78px, auto) minmax(86px, auto) minmax(192px, auto);
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 9px 12px;
    border-bottom: 1px solid rgba(2, 6, 23, .075);
}

.task-stage-row[data-task-priority="urgente"] {
    box-shadow: inset 4px 0 #dc2626;
}

.task-stage-row[data-task-priority="alta"] {
    box-shadow: inset 4px 0 #d97706;
}

.task-stage-row[data-task-priority="media"] {
    box-shadow: inset 4px 0 #2563eb;
}

.task-stage-row[data-task-priority="baja"] {
    box-shadow: inset 4px 0 #64748b;
}

.task-status-quick-form {
    margin: 0;
}

.task-status-select {
    min-width: 132px;
    width: auto;
    font-weight: 850;
    border-color: color-mix(in srgb, var(--task-status-color, #64748b) 42%, rgba(2, 6, 23, .16));
    background-color: color-mix(in srgb, var(--task-status-color, #64748b) 12%, #fff);
}

.task-status-select[data-status-select-status="pendiente"] {
    --task-status-color: #64748b;
}

.task-status-select[data-status-select-status="en_progreso"] {
    --task-status-color: #2563eb;
}

.task-status-select[data-status-select-status="a_revision"] {
    --task-status-color: #d97706;
}

.task-status-select[data-status-select-status="finalizada"] {
    --task-status-color: #16a34a;
}

.task-status-select[data-status-select-status="con_correcciones"] {
    --task-status-color: #ea580c;
}

.task-status-select[data-status-select-status="pausada"] {
    --task-status-color: #7c3aed;
}

.task-status-select[data-status-select-status="cancelada"] {
    --task-status-color: #dc2626;
}

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

.task-stage-row:hover {
    background: rgba(163, 230, 53, .08);
}

.task-stage-row-empty {
    grid-template-columns: 1fr;
    color: var(--muted);
    font-weight: 800;
}

.task-stage-row-empty:hover {
    background: transparent;
}

.task-stage-task {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
}

.task-code {
    min-width: 42px;
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--white);
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
}

.task-stage-task a {
    overflow: hidden;
    color: var(--ink);
    font-weight: 900;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-stage-task a:hover {
    text-decoration: underline;
    text-decoration-color: var(--lime);
}

.task-stage-assignees {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.task-stage-assignees > span {
    display: inline-flex;
    align-items: center;
}

.task-stage-assignees > span + span {
    margin-left: -6px;
}

.task-stage-assignees .avatar {
    border: 2px solid var(--white);
}

.task-stage-date {
    color: var(--ink);
    font-size: .82rem;
    font-weight: 760;
    white-space: nowrap;
}

.task-stage-empty {
    min-height: 180px;
    display: grid;
    place-items: center;
    gap: 8px;
    color: var(--muted);
    text-align: center;
}

.task-stage-empty i {
    color: var(--ink);
    font-size: 1.8rem;
}

.task-stage-empty p {
    margin: 0;
    font-weight: 800;
}

.status-form {
    display: flex;
    gap: 12px;
    max-width: 520px;
}

.comment-form {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.comment-list { display: grid; gap: 14px; }

.comment {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.comment > div {
    min-width: 0;
}

.comment p { margin: 8px 0 0; }
.comment small,
.feed-item span,
.message-item small {
    color: var(--muted);
    display: block;
}

.attachment-form {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

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

.attachment-item {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: var(--surface-2);
}

.attachment-item:hover {
    border-color: var(--accent-line);
    background: rgba(163, 230, 53, .10);
}

.attachment-item i {
    color: var(--ink);
    font-size: 1.2rem;
}

.attachment-item span {
    display: grid;
    font-weight: 800;
    min-width: 0;
}

.attachment-item small {
    color: var(--muted);
    font-weight: 500;
    overflow-wrap: anywhere;
}

.feed-item,
.message-item,
.notification-row {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 13px;
    margin-bottom: 11px;
    background: var(--surface-2);
}

.feed-item strong,
.message-item strong,
.notification-row strong { color: var(--ink); }

.is-unread {
    border-color: var(--accent-line);
    background: rgba(163, 230, 53, .12);
}

.message-item p,
.notification-row p {
    margin: 8px 0;
    color: var(--ink);
}

.notification-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.user-line {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

.user-line > div {
    min-width: 0;
}

.user-line small {
    display: block;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-panel {
    display: flex;
    align-items: center;
    gap: 18px;
}

.profile-panel h2 {
    color: var(--ink);
    margin: 0 0 4px;
    font-weight: 860;
}

.profile-panel p {
    color: var(--muted);
    margin-bottom: 12px;
}

.kanban-board {
    display: flex;
    align-items: stretch;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    min-height: 72vh;
    padding: 14px 14px 18px;
    border: 1px solid rgba(2, 6, 23, .12);
    border-radius: 10px;
    background:
        linear-gradient(rgba(15, 23, 42, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, .035) 1px, transparent 1px),
        #fff;
    background-size: 32px 32px;
}

.kanban-column {
    background: rgba(2, 6, 23, .045);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
    min-height: calc(72vh - 32px);
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    transition: background .15s ease, border-color .15s ease, flex .18s ease, opacity .15s ease;
}

.kanban-column.is-over {
    background: rgba(163, 230, 53, .12);
    background: color-mix(in srgb, var(--kanban-status-color, var(--lime)) 10%, #fff);
    border-color: var(--kanban-status-color, var(--lime));
}

.kanban-column[data-drop-allowed="0"] { opacity: .78; }

.kanban-column header {
    margin-bottom: 14px;
}

.kanban-column-toggle {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--ink);
    background: rgba(255, 255, 255, .8);
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 9px;
    padding: 7px 8px;
    overflow: hidden;
    text-align: left;
}

.kanban-column-toggle:hover,
.kanban-column-toggle:focus {
    border-color: var(--kanban-status-color, var(--lime));
    outline: none;
}

.kanban-column-title,
.kanban-column-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.kanban-column-title {
    flex: 1 1 auto;
    font-size: .95rem;
    font-weight: 860;
    overflow: hidden;
}

.kanban-column-title > span:last-child {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kanban-column-actions {
    flex: 0 0 auto;
}

.kanban-status-dot {
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    border-radius: 999px;
    background: var(--kanban-status-color, var(--lime));
    box-shadow: 0 0 0 3px rgba(163, 230, 53, .16);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--kanban-status-color, var(--lime)) 18%, transparent);
}

.kanban-count {
    flex: 0 0 auto;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--white);
    display: grid;
    place-items: center;
    font-weight: 860;
    border: 1px solid var(--line);
    color: var(--ink);
}

.kanban-column-actions i {
    flex: 0 0 auto;
    color: var(--muted);
    line-height: 1;
    transition: transform .15s ease;
}

.kanban-column-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: calc(72vh - 104px);
}

.kanban-column.is-collapsed {
    flex: .42 1 0;
    min-height: calc(72vh - 32px);
    padding: 8px;
}

.kanban-column.is-collapsed .kanban-column-body {
    display: none;
}

.kanban-column.is-collapsed header {
    display: flex;
    flex: 1 1 auto;
    margin-bottom: 0;
}

.kanban-column.is-collapsed .kanban-column-toggle {
    min-height: 100%;
    height: 100%;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px 7px;
}

.kanban-column.is-collapsed .kanban-column-title {
    flex: 0 1 auto;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    max-height: 190px;
}

.kanban-column.is-collapsed .kanban-column-title > span:last-child {
    white-space: nowrap;
}

.kanban-column.is-collapsed .kanban-column-actions {
    flex-direction: column-reverse;
}

.kanban-column.is-collapsed .kanban-column-actions i {
    transform: rotate(-90deg);
}

.kanban-card {
    background: var(--white);
    border: 1px solid var(--line);
    border: 1px solid color-mix(in srgb, var(--kanban-card-color, var(--line)) 58%, var(--line));
    border-left: 4px solid var(--kanban-card-color, var(--line));
    border-radius: 9px;
    padding: 13px;
    margin-bottom: 12px;
    min-width: 0;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: border-color .15s ease, transform .15s ease, opacity .15s ease;
}

.kanban-card.is-dragging {
    opacity: .55;
    transform: rotate(1deg);
}

.kanban-card-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.kanban-card-head a {
    color: var(--ink);
    font-weight: 860;
    min-width: 0;
    overflow-wrap: anywhere;
}

.kanban-card-head a:hover {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--lime);
}

.kanban-card p {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--muted);
    min-width: 0;
    overflow-wrap: anywhere;
}

.kanban-card p span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    flex: 0 0 auto;
}

.kanban-card .badge {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

.kanban-card .meta-row {
    min-width: 0;
}

.kanban-card .meta-row small {
    min-width: 0;
    overflow-wrap: anywhere;
}

.kanban-card .form-select {
    width: 100%;
    min-width: 0;
}

.kanban-empty {
    border: 1px dashed rgba(2, 6, 23, .18);
    border-radius: 9px;
    padding: 13px;
    text-align: center;
    background: rgba(255, 255, 255, .62);
}

.kanban-column[data-kanban-status],
.kanban-card[data-kanban-card-status] {
    --kanban-status-color: #a3e635;
    --kanban-card-color: #a3e635;
}

@media (max-width: 1180px) {
    .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 991px) {
    .sidebar { width: var(--sidebar-closed); }
    .sidebar .brand-logo,
    .sidebar .nav-menu span,
    .sidebar .sidebar-logout span { display: none; }
    .sidebar .brand { justify-content: center; padding: 0; }
    .sidebar .brand-icon { display: block; }
    .sidebar .nav-badge {
        position: absolute;
        top: 5px;
        right: 9px;
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        font-size: .62rem;
        border-color: #020617;
    }
    .sidebar .nav-menu a,
    .sidebar .sidebar-logout { justify-content: center; padding: 0; }
    .sidebar .nav-menu i,
    .sidebar .sidebar-logout i { width: auto; flex-basis: auto; font-size: 1.08rem; }
    .sidebar:not(.is-collapsed) { width: var(--sidebar-open); }
    .sidebar:not(.is-collapsed) .brand { justify-content: flex-start; padding: 0 8px; }
    .sidebar:not(.is-collapsed) .brand-logo { display: block; }
    .sidebar:not(.is-collapsed) .brand-icon { display: none; }
    .sidebar:not(.is-collapsed) .nav-menu span,
    .sidebar:not(.is-collapsed) .sidebar-logout span { display: inline; }
    .sidebar:not(.is-collapsed) .nav-badge {
        position: static;
        min-width: 18px;
        height: 18px;
        margin-left: auto;
        padding: 0 5px;
        font-size: .67rem;
    }
    .sidebar:not(.is-collapsed) .nav-menu a,
    .sidebar:not(.is-collapsed) .sidebar-logout { justify-content: flex-start; padding: 0 8px; }
    .sidebar:not(.is-collapsed) .nav-menu i,
    .sidebar:not(.is-collapsed) .sidebar-logout i { width: 17px; flex: 0 0 17px; font-size: .96rem; }
}

@media (max-width: 720px) {
    html.sidebar-expanded .sidebar + .main,
    html.sidebar-collapsed .sidebar + .main,
    .sidebar.is-collapsed + .main,
    .main {
        margin-left: var(--sidebar-closed);
        width: calc(100% - var(--sidebar-closed));
    }

    .content { padding: 20px 14px; }
    .topbar { padding-left: 14px; padding-right: 14px; }
    .search-box { display: none; }
    .topbar-actions { gap: 8px; }
    .sidebar { padding: 12px 8px; }
    .sidebar:not(.is-collapsed) { width: min(var(--sidebar-open), 82vw); }
    .sidebar:not(.is-collapsed) + .main {
        margin-left: min(var(--sidebar-open), 82vw);
        width: calc(100% - min(var(--sidebar-open), 82vw));
    }
    .page-head {
        align-items: flex-start;
        flex-direction: column;
    }
    .metric-grid,
    .card-grid { grid-template-columns: 1fr; }
    .task-row { grid-template-columns: 1fr; }
    .task-table-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    .status-form,
    .notification-row,
    .profile-panel {
        flex-direction: column;
        align-items: stretch;
    }
    .login-stage {
        width: 100%;
        min-height: 100vh;
    }
    .login-topbar {
        min-height: 54px;
        padding: 0 14px;
    }
    .login-panel {
        place-items: start center;
        padding: 20px 14px;
    }
    .login-card { padding: 24px; }
}

/* Modern UI refresh.
   Brand palette is locked to #a3e635, #020617 and white. */
:root {
    --ink: #020617;
    --lime: #a3e635;
    --accent: #a3e635;
    --accent-2: #a3e635;
    --danger: #020617;
    --warning: #020617;
    --white: #fff;
    --sidebar-open: 172px;
    --sidebar-closed: 64px;
    --bg: rgba(2, 6, 23, .045);
    --chrome: #020617;
    --surface: rgba(255, 255, 255, .96);
    --surface-2: rgba(2, 6, 23, .035);
    --surface-3: rgba(163, 230, 53, .12);
    --text: #020617;
    --muted: rgba(2, 6, 23, .62);
    --line: rgba(15, 23, 42, .10);
    --line-strong: rgba(15, 23, 42, .18);
    --accent-line: rgba(163, 230, 53, .50);
    --ring: rgba(163, 230, 53, .30);
    --shadow: 0 18px 50px rgba(15, 23, 42, .12);
    --shadow-soft: 0 10px 28px rgba(15, 23, 42, .07);
    --radius: 8px;
}

html {
    background: var(--bg);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background:
        radial-gradient(circle at top left, rgba(163, 230, 53, .12), transparent 30rem),
        linear-gradient(180deg, #fff 0%, rgba(2, 6, 23, .045) 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    font-weight: 450;
    line-height: 1.5;
}

h1,
h2,
h3,
h4,
h5,
h6,
.page-head h1,
.panel-head h2,
.project-card h2,
.kanban-column h2,
.login-card h1 {
    font-family: "Inter Tight", Inter, ui-sans-serif, system-ui, sans-serif;
    letter-spacing: 0;
}

a,
.table td a,
.project-card h2 a,
.kanban-card-head a {
    color: var(--ink);
    text-decoration: none;
}

a:hover,
.table td a:hover,
.project-card h2 a:hover,
.kanban-card-head a:hover {
    color: var(--ink);
    text-decoration: none;
}

label {
    color: rgba(2, 6, 23, .66);
    font-size: .74rem;
    font-weight: 750;
    letter-spacing: 0;
    text-transform: none;
}

.form-control,
.form-select {
    min-height: 42px;
    color: var(--ink);
    background-color: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
    font-weight: 500;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.form-control-sm,
.form-select-sm {
    min-height: 34px;
    font-size: .84rem;
}

.form-control:focus,
.form-select:focus,
.search-box:focus-within {
    color: var(--ink);
    background-color: #fff;
    border-color: var(--accent);
    box-shadow: 0 0 0 .2rem var(--ring);
}

.form-control::placeholder {
    color: rgba(2, 6, 23, .38);
}

.btn {
    min-height: 40px;
    border-radius: var(--radius);
    font-size: .9rem;
    font-weight: 750;
    letter-spacing: 0;
    box-shadow: none;
    transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, background .14s ease, color .14s ease;
}

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

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: #020617;
    border-color: #020617;
    color: #fff;
    box-shadow: 0 10px 22px rgba(2, 6, 23, .18);
}

.btn-primary:hover,
.btn-primary:focus {
    background: #a3e635;
    border-color: #a3e635;
    color: #020617;
    box-shadow: 0 14px 28px rgba(163, 230, 53, .26);
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-danger {
    background: #fff;
    border-color: var(--line);
    color: #020617;
}

.btn-outline-primary:hover,
.btn-outline-secondary:hover {
    background: rgba(163, 230, 53, .16);
    border-color: rgba(163, 230, 53, .55);
    color: #020617;
}

.btn-outline-danger:hover {
    background: rgba(2, 6, 23, .06);
    border-color: rgba(2, 6, 23, .22);
    color: #020617;
}

.text-danger {
    color: var(--danger) !important;
}

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--ink);
    --bs-table-hover-bg: rgba(163, 230, 53, .08);
    border-collapse: separate;
    border-spacing: 0;
}

.table > :not(caption) > * > * {
    padding: .92rem .86rem;
    border-bottom-color: rgba(15, 23, 42, .075);
}

.table thead th {
    background: rgba(2, 6, 23, .035);
    color: rgba(2, 6, 23, .64);
    font-size: .72rem;
    font-weight: 800;
    text-transform: none;
    border-bottom: 1px solid var(--line);
}

.table tbody tr {
    transition: background .14s ease;
}

.table tbody tr:hover {
    background: rgba(163, 230, 53, .08);
}

.table td a {
    font-weight: 750;
}

.table small,
.text-muted {
    color: var(--muted) !important;
}

.alert {
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    font-weight: 600;
}

.flash-toast-stack {
    position: fixed;
    right: 26px;
    bottom: 24px;
    z-index: 1080;
    display: grid;
    gap: 10px;
    width: min(360px, calc(100vw - 32px));
    pointer-events: none;
}

.flash-toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    padding: 14px 16px;
    border-radius: 8px;
    box-shadow: 0 18px 38px rgba(2, 6, 23, .16);
    transition: opacity .28s ease, transform .28s ease;
    pointer-events: auto;
}

.flash-toast.fade {
    opacity: 0;
    transform: translateY(8px);
}

.flash-toast i {
    flex: 0 0 auto;
    margin-top: 2px;
}

.global-chat-notice {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1075;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 26px;
    gap: 10px;
    align-items: center;
    width: min(330px, calc(100vw - 28px));
    padding: 10px 12px;
    border: 1px solid rgba(2, 6, 23, .10);
    border-radius: 12px;
    background: rgba(255, 255, 255, .96);
    color: var(--ink);
    box-shadow: 0 18px 44px rgba(2, 6, 23, .18);
    opacity: 0;
    pointer-events: none;
    text-decoration: none;
    transform: translateY(10px);
    transition: opacity .18s ease, transform .18s ease, border-color .18s ease;
}

.global-chat-notice.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.global-chat-notice:hover,
.global-chat-notice:focus {
    border-color: rgba(34, 197, 94, .42);
    color: var(--ink);
}

.global-chat-notice-avatar {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    overflow: hidden;
    border-radius: 50%;
    background: #d9fdd3;
    color: var(--ink);
    font-weight: 900;
}

.global-chat-notice-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.global-chat-notice-body {
    display: grid;
    min-width: 0;
    gap: 1px;
}

.global-chat-notice-body strong,
.global-chat-notice-body span,
.global-chat-notice-body small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.global-chat-notice-body strong {
    font-size: .86rem;
    font-weight: 900;
}

.global-chat-notice-body span {
    color: rgba(2, 6, 23, .76);
    font-size: .8rem;
}

.global-chat-notice-body small {
    color: var(--muted);
    font-size: .7rem;
    font-weight: 800;
}

.global-chat-notice-close {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: rgba(2, 6, 23, .55);
    font-size: .76rem;
}

.global-chat-notice-close:hover,
.global-chat-notice-close:focus {
    background: rgba(2, 6, 23, .08);
    color: var(--ink);
}

.alert-success {
    background: rgba(163, 230, 53, .16);
    border-color: rgba(163, 230, 53, .45);
    color: #020617;
}

.alert-danger {
    background: #fff;
    border-color: rgba(2, 6, 23, .22);
    color: #020617;
}

.app-shell {
    background: transparent;
}

.sidebar {
    background: #020617;
    border-right: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 14px 0 32px rgba(15, 23, 42, .12);
}

.brand {
    height: 42px;
    margin-bottom: 12px;
}

.nav-menu {
    gap: 3px;
}

.nav-menu a,
.sidebar-logout {
    height: 36px;
    color: rgba(255, 255, 255, .68);
    border-radius: var(--radius);
    font-size: .74rem;
    font-weight: 650;
}

.nav-menu i,
.sidebar-logout i {
    color: rgba(255, 255, 255, .72);
}

.nav-menu a:hover,
.nav-menu a.is-active,
.sidebar-logout:hover {
    color: #fff;
    background: rgba(255, 255, 255, .095);
    border-color: rgba(255, 255, 255, .12);
}

.nav-menu a.is-active {
    box-shadow: inset 3px 0 0 var(--accent-2);
}

.nav-menu a.is-active i,
.nav-menu a:hover i,
.sidebar-logout:hover i {
    color: #a3e635;
}

.main {
    background: transparent;
}

.topbar {
    height: 68px;
    background: rgba(255, 255, 255, .88);
    border-bottom: 1px solid rgba(15, 23, 42, .08);
    backdrop-filter: blur(16px);
}

.search-box {
    height: 42px;
    background: rgba(255, 255, 255, .82);
    border-color: rgba(15, 23, 42, .09);
    color: var(--muted);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.search-box input {
    font-weight: 550;
}

.icon-btn {
    width: 39px;
    height: 39px;
    background: rgba(255, 255, 255, .92);
    border-color: var(--line);
    border-radius: var(--radius);
    color: #020617;
    transition: transform .14s ease, background .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease;
}

.icon-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(163, 230, 53, .55);
    color: #020617;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.notify-dot {
    background: #a3e635;
    color: #020617;
    border-color: #fff;
}

.notification-menu,
.confirm-modal {
    border-radius: 12px;
    border-color: var(--line);
    box-shadow: var(--shadow);
}

.notification-menu-head a,
.panel-head a {
    color: #020617;
    font-weight: 750;
    text-decoration: underline;
    text-decoration-color: #a3e635;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.notification-mini:hover {
    background: rgba(163, 230, 53, .10);
}

.profile-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 42px;
    padding: 5px 12px 5px 5px;
    border-radius: 12px;
    border-color: var(--line);
    background: rgba(255, 255, 255, .92);
    color: #020617;
    font-weight: 700;
}

.profile-chip > span:last-child {
    min-width: 0;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-chip:hover {
    border-color: rgba(163, 230, 53, .55);
    color: #020617;
    background: #fff;
}

.avatar {
    width: 32px;
    height: 32px;
    aspect-ratio: 1 / 1;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    background: #020617;
    color: #fff;
    border-radius: 8px;
    font-size: .86rem;
    font-weight: 800;
    line-height: 1;
    overflow: hidden;
}

.avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-sm {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    font-size: .78rem;
}

.avatar-xs {
    width: 22px;
    height: 22px;
    font-size: .68rem;
    border-radius: 6px;
}

.avatar-lg {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    font-size: 1.55rem;
}

.content {
    padding: 30px;
    max-width: 1560px;
}

.page-head {
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 22px;
    border-bottom: 1px solid rgba(15, 23, 42, .08);
}

.page-head h1 {
    color: var(--ink);
    font-size: clamp(1.75rem, 2vw, 2.2rem);
    font-weight: 850;
}

.eyebrow {
    color: rgba(2, 6, 23, .62);
    font-size: .79rem;
    font-weight: 750;
    text-transform: none;
}

.eyebrow::before {
    width: 7px;
    height: 7px;
    background: var(--accent-2);
}

.panel,
.metric-card,
.project-card {
    background: var(--surface);
    border-color: rgba(15, 23, 42, .085);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
}

.panel {
    padding: 20px;
}

.panel-head h2 {
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 800;
}

.metric-grid {
    gap: 16px;
}

.metric-card {
    min-height: 124px;
    padding: 20px;
    transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}

.metric-card::before {
    width: 0;
}

.metric-card::after {
    content: "";
    position: absolute;
    top: 18px;
    right: 18px;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(163, 230, 53, .18);
}

.metric-card:nth-child(even) {
    background: var(--surface);
}

.metric-card:nth-child(2)::after {
    background: rgba(163, 230, 53, .18);
}

.metric-card:nth-child(3)::after {
    background: rgba(163, 230, 53, .18);
}

.metric-card:nth-child(4)::after {
    background: rgba(163, 230, 53, .18);
}

.metric-card:nth-child(5)::after {
    background: rgba(163, 230, 53, .18);
}

.metric-card:hover,
.project-card:hover,
.kanban-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-line);
    box-shadow: var(--shadow);
}

.metric-card span {
    color: rgba(2, 6, 23, .62);
    font-size: .84rem;
    font-weight: 700;
}

.metric-card strong {
    color: #020617;
    font-size: 2.15rem;
    font-weight: 850;
}

.badge {
    border-radius: 999px;
    padding: .36rem .62rem;
    font-size: .76rem;
    font-weight: 750;
}

.badge-soft-secondary {
    background: rgba(100, 116, 139, .14);
    color: #020617;
    border-color: rgba(100, 116, 139, .32);
}

.badge-soft-info {
    background: rgba(37, 99, 235, .12);
    color: #020617;
    border-color: rgba(37, 99, 235, .34);
}

.badge-soft-success {
    background: rgba(22, 163, 74, .14);
    color: #020617;
    border-color: rgba(22, 163, 74, .34);
}

.badge-soft-warning {
    background: rgba(217, 119, 6, .16);
    color: #020617;
    border-color: rgba(217, 119, 6, .36);
}

.badge-soft-danger {
    background: rgba(220, 38, 38, .14);
    color: #020617;
    border-color: rgba(220, 38, 38, .34);
}

.badge-soft-dark {
    background: #312e81;
    color: #fff;
    border-color: #312e81;
}

.project-card {
    padding: 20px;
}

.project-card h2 {
    font-size: 1.05rem;
    font-weight: 800;
}

.project-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.project-card-head h2 {
    flex: 1 1 auto;
}

.project-card-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.project-card-actions form {
    margin: 0;
}

.project-card p {
    color: var(--muted);
}

.project-color {
    width: 4px;
}

.meta-row,
.meta-column {
    color: var(--muted);
}

.task-row,
.comment,
.attachment-item,
.feed-item,
.message-item,
.notification-row {
    background: rgba(2, 6, 23, .035);
    border-color: rgba(15, 23, 42, .08);
    border-radius: var(--radius);
}

.task-row:hover,
.attachment-item:hover,
.notification-mini.is-unread,
.feed-item.is-unread,
.notification-row.is-unread,
.is-unread {
    background: rgba(163, 230, 53, .12);
    border-color: rgba(163, 230, 53, .45);
}

.assignee-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.assignee-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.assignee-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    margin: 0;
    padding: 5px 10px 5px 6px;
    color: #020617;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
    font-size: .88rem;
    font-weight: 700;
    text-transform: none;
    transition: border-color .14s ease, background .14s ease, color .14s ease, box-shadow .14s ease;
}

.assignee-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.assignee-option:has(input:checked) {
    color: #020617;
    background: rgba(163, 230, 53, .16);
    border-color: rgba(163, 230, 53, .55);
    box-shadow: 0 0 0 .16rem rgba(163, 230, 53, .16);
}

.avatar-upload-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
}

.avatar-upload-cell .form-control {
    min-width: 0;
}

.assignee-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    color: #020617;
    font-weight: 750;
    white-space: nowrap;
}

.assignee-pill-compact {
    gap: 6px;
    font-size: .82rem;
}

.approval-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    background: rgba(14, 165, 233, .08);
    border: 1px solid rgba(14, 165, 233, .2);
    border-radius: var(--radius);
}

.approval-box small {
    display: block;
    color: var(--muted);
}

.approval-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.approval-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 9px 5px 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: #475569;
    font-weight: 700;
}

.approval-item.is-approved {
    color: #14532d;
    background: rgba(34, 197, 94, .12);
    border-color: rgba(34, 197, 94, .3);
}

.approval-item small {
    font-weight: 800;
}

.task-show-page {
    max-width: 1320px;
}

.task-show-head {
    align-items: center;
}

.task-show-head > .task-title-wrap {
    flex: 1 1 auto;
}

.task-show-head h1 {
    overflow-wrap: anywhere;
}

.task-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

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

.task-back-link {
    align-self: center;
}

.task-head-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.task-show-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
    gap: 14px;
    align-items: start;
}

.task-show-main,
.task-show-sidebar {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.task-show-sidebar {
    position: sticky;
    top: 76px;
}

.task-description-panel {
    min-height: 190px;
}

.task-description-copy {
    color: #020617;
    font-size: .94rem;
    line-height: 1.62;
    overflow-wrap: anywhere;
}

.task-status-current {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 38px;
    margin-bottom: 10px;
    padding: 9px 10px;
    background: rgba(2, 6, 23, .035);
    border: 1px solid rgba(2, 6, 23, .08);
    border-radius: var(--radius);
}

.task-status-current small,
.task-permission-note {
    color: var(--muted);
    font-weight: 700;
}

.task-status-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    max-width: none;
}

.task-permission-note {
    margin: 8px 0 0;
    font-size: .78rem;
}

.task-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

.task-facts div {
    min-width: 0;
    padding: 9px 10px;
    background: rgba(2, 6, 23, .035);
    border: 1px solid rgba(2, 6, 23, .08);
    border-radius: var(--radius);
}

.task-facts dt {
    color: var(--muted);
    font-size: .68rem;
    font-weight: 900;
    text-transform: uppercase;
}

.task-facts dd {
    margin: 3px 0 0;
    color: #020617;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.task-assignee-list {
    display: grid;
    gap: 7px;
}

.task-assignee-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 8px 10px;
    background: rgba(2, 6, 23, .035);
    border: 1px solid rgba(2, 6, 23, .08);
    border-radius: var(--radius);
    font-weight: 800;
}

.task-assignee-row span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.task-approval-panel .approval-box {
    margin-bottom: 10px;
    background: rgba(163, 230, 53, .12);
    border-color: rgba(163, 230, 53, .38);
}

.task-approval-panel .approval-box form,
.task-approval-panel .approval-box .btn {
    width: 100%;
}

.task-approval-panel .approval-list {
    gap: 7px;
}

.task-comments-panel .comment-form .btn {
    justify-self: start;
}

.task-history-panel .feed-item:last-child {
    margin-bottom: 0;
}

.task-attachments-panel .attachment-item span {
    overflow-wrap: anywhere;
}

.kanban-board {
    gap: 18px;
}

.kanban-column {
    background: rgba(2, 6, 23, .045);
    border-color: rgba(15, 23, 42, .08);
    border-radius: 12px;
    padding: 14px;
}

.kanban-column.is-over {
    background: rgba(163, 230, 53, .12);
    border-color: rgba(163, 230, 53, .55);
}

.kanban-column header {
    gap: 10px;
}

.kanban-column h2 {
    font-weight: 800;
}

.kanban-column header span {
    background: #fff;
    color: #020617;
    border-color: var(--line);
}

.kanban-column-toggle {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: rgba(2, 6, 23, .62);
}

.kanban-column-toggle:hover {
    color: #020617;
    border-color: rgba(163, 230, 53, .55);
}

.kanban-column.is-collapsed {
    grid-auto-rows: min-content;
    min-height: 0;
}

.kanban-column.is-collapsed .kanban-column-body {
    display: none;
}

.kanban-card {
    border-radius: 10px;
    border-color: rgba(15, 23, 42, .08);
    box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
    transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}

.kanban-card p {
    color: var(--muted);
}

.kanban-empty {
    color: var(--muted);
    font-size: .9rem;
    padding: 18px 10px;
    text-align: center;
}

.kanban-column[data-kanban-status],
.kanban-card[data-kanban-card-status] {
    --kanban-status-color: #64748b;
    --kanban-card-color: #64748b;
}

.kanban-column[data-kanban-status="pendiente"],
.kanban-card[data-kanban-card-status="pendiente"] {
    --kanban-status-color: #64748b;
    --kanban-card-color: #64748b;
}

.kanban-column[data-kanban-status="en_progreso"],
.kanban-card[data-kanban-card-status="en_progreso"] {
    --kanban-status-color: #2563eb;
    --kanban-card-color: #2563eb;
}

.kanban-column[data-kanban-status="a_revision"],
.kanban-card[data-kanban-card-status="a_revision"] {
    --kanban-status-color: #d97706;
    --kanban-card-color: #d97706;
}

.kanban-column[data-kanban-status="finalizada"],
.kanban-card[data-kanban-card-status="finalizada"] {
    --kanban-status-color: #16a34a;
    --kanban-card-color: #16a34a;
}

.kanban-column[data-kanban-status="con_correcciones"],
.kanban-card[data-kanban-card-status="con_correcciones"] {
    --kanban-status-color: #ea580c;
    --kanban-card-color: #ea580c;
}

.kanban-column[data-kanban-status="pausada"],
.kanban-card[data-kanban-card-status="pausada"] {
    --kanban-status-color: #7c3aed;
    --kanban-card-color: #7c3aed;
}

.kanban-column[data-kanban-status="cancelada"],
.kanban-card[data-kanban-card-status="cancelada"] {
    --kanban-status-color: #dc2626;
    --kanban-card-color: #dc2626;
}

.kanban-column[data-kanban-status] {
    border-top: 3px solid var(--kanban-status-color);
}

.kanban-column[data-kanban-status].is-over {
    background: color-mix(in srgb, var(--kanban-status-color) 12%, #fff);
    border-color: var(--kanban-status-color);
}

.kanban-column[data-kanban-status] .kanban-column-toggle:hover,
.kanban-column[data-kanban-status] .kanban-column-toggle:focus {
    border-color: var(--kanban-status-color);
}

.kanban-column[data-kanban-status] .kanban-status-dot {
    background: var(--kanban-status-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--kanban-status-color) 18%, transparent);
}

.kanban-card[data-kanban-card-status] {
    background: color-mix(in srgb, var(--kanban-card-color) 7%, #fff);
    border-color: color-mix(in srgb, var(--kanban-card-color) 36%, rgba(15, 23, 42, .1));
    border-left-color: var(--kanban-card-color);
    box-shadow: 0 8px 18px color-mix(in srgb, var(--kanban-card-color) 12%, rgba(15, 23, 42, .06));
}

.kanban-card[data-kanban-card-status]:hover {
    border-color: color-mix(in srgb, var(--kanban-card-color) 54%, rgba(15, 23, 42, .12));
    border-left-color: var(--kanban-card-color);
}

.kanban-page-head {
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
}

.kanban-page-head .eyebrow {
    display: none;
}

.kanban-page-head h1 {
    font-size: 1.55rem;
}

.kanban-head-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.kanban-total {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    color: #020617;
    background: rgba(163, 230, 53, .16);
    border: 1px solid rgba(163, 230, 53, .45);
    border-radius: 999px;
    font-size: .84rem;
    font-weight: 800;
}

.kanban-filter-panel {
    padding: 0;
    overflow: hidden;
}

.kanban-filter-panel summary {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    color: #020617;
    cursor: pointer;
    list-style: none;
}

.kanban-filter-panel summary::-webkit-details-marker {
    display: none;
}

.kanban-filter-panel summary span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 850;
}

.kanban-filter-panel summary small {
    color: var(--muted);
    font-weight: 650;
}

.kanban-filter-panel[open] summary {
    border-bottom: 1px solid var(--line);
}

.kanban-filter-panel form {
    padding: 14px;
}

.kanban-board {
    min-height: calc(100vh - 235px);
    overflow-x: hidden;
    overflow-y: visible;
    align-items: flex-start;
    scroll-padding-left: 14px;
}

.kanban-column {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    min-height: calc(100vh - 270px);
}

.kanban-column.is-collapsed {
    flex: 0 0 76px;
    min-width: 76px;
    max-width: 76px;
}

.kanban-column-toggle {
    width: 100%;
    height: auto;
    min-height: 40px;
    display: flex;
}

.kanban-column.is-collapsed .kanban-column-toggle {
    min-height: calc(100vh - 310px);
}

@media (max-width: 720px) {
    .content {
        padding: 22px 14px;
    }

    .flash-toast-stack {
        right: 14px;
        bottom: 14px;
        left: 14px;
        width: auto;
    }

    .topbar {
        padding-left: 14px;
        padding-right: 14px;
    }

    .page-head {
        align-items: flex-start;
    }

    .page-head h1 {
        font-size: 1.55rem;
    }

    .panel,
    .project-card,
    .metric-card {
        border-radius: 10px;
    }

    .assignee-picker {
        display: grid;
        grid-template-columns: 1fr;
    }

    .assignee-option {
        width: 100%;
    }
}

/* Content-first page rhythm shared across the app. */
.content {
    padding-top: 22px;
}

.page-head {
    align-items: center;
    min-height: 44px;
    margin-bottom: 12px;
    padding-bottom: 12px;
}

.page-head .eyebrow {
    display: none;
}

.page-head h1 {
    font-size: clamp(1.45rem, 1.6vw, 1.75rem);
    line-height: 1.15;
}

.page-head > div:first-child {
    min-width: 0;
}

.page-head > div:first-child h1 {
    overflow-wrap: anywhere;
}

.page-head .btn {
    min-height: 36px;
}

.panel {
    padding: 16px;
}

.panel.mb-4,
.metric-grid {
    margin-bottom: 14px !important;
}

.panel-head {
    margin-bottom: 12px;
}

.panel-head h2 {
    font-size: .98rem;
}

.filter-panel,
.kanban-filter-panel {
    padding: 0;
    overflow: hidden;
}

.filter-panel summary,
.kanban-filter-panel summary {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    color: #020617;
    cursor: pointer;
    list-style: none;
}

.filter-panel summary::-webkit-details-marker,
.kanban-filter-panel summary::-webkit-details-marker {
    display: none;
}

.filter-panel summary span,
.kanban-filter-panel summary span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 850;
}

.filter-panel summary small,
.kanban-filter-panel summary small {
    color: var(--muted);
    font-weight: 650;
}

.filter-panel[open] summary,
.kanban-filter-panel[open] summary {
    border-bottom: 1px solid var(--line);
}

.filter-panel form,
.kanban-filter-panel form {
    padding: 14px;
}

.compose-panel textarea {
    min-height: 96px;
}

.metric-grid {
    grid-template-columns: repeat(5, minmax(130px, 1fr));
    gap: 12px;
}

.metric-card {
    min-height: 92px;
    padding: 14px 16px;
}

.metric-card::after {
    top: 14px;
    right: 14px;
    width: 24px;
    height: 24px;
}

.metric-card strong {
    margin-top: 10px;
    font-size: 1.75rem;
}

.status-metric {
    --metric-color: #64748b;
    background: #fff;
    border-color: color-mix(in srgb, var(--metric-color) 38%, rgba(15, 23, 42, .1));
    box-shadow: 0 8px 18px rgba(15, 23, 42, .055);
}

.status-metric::before {
    width: 4px;
    background: var(--metric-color);
}

.status-metric::after {
    display: none;
}

.status-metric span {
    color: #020617;
}

.status-metric strong {
    color: #020617;
}

.status-metric[data-metric-status="pendiente"] {
    --metric-color: #64748b;
}

.status-metric[data-metric-status="en_progreso"] {
    --metric-color: #2563eb;
}

.status-metric[data-metric-status="a_revision"] {
    --metric-color: #d97706;
}

.status-metric[data-metric-status="finalizada"] {
    --metric-color: #16a34a;
}

.status-metric[data-metric-status="vencidas"] {
    --metric-color: #dc2626;
}

.card-grid {
    gap: 14px;
}

.project-card {
    padding: 16px;
}

.project-card p {
    min-height: 32px;
    margin-bottom: 12px;
}

.table > :not(caption) > * > * {
    padding: .72rem .76rem;
}

.task-row,
.message-item,
.notification-row,
.feed-item,
.comment,
.attachment-item {
    padding: 11px;
    margin-bottom: 9px;
}

.message-item p,
.notification-row p {
    margin: 6px 0;
}

.profile-panel {
    padding: 16px;
}

.kanban-page-head {
    margin-bottom: 12px;
    padding-bottom: 12px;
}

.kanban-board {
    min-height: calc(100vh - 225px);
}

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

@media (max-width: 720px) {
    .content {
        padding-top: 18px;
    }

    .page-head {
        align-items: stretch;
        gap: 10px;
    }

    .page-head h1 {
        font-size: 1.35rem;
    }

    .page-head .btn,
    .page-head form,
    .page-head > a {
        width: 100%;
    }

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

    .filter-panel summary,
    .kanban-filter-panel summary {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

    .kanban-board {
        flex-direction: column;
        gap: 12px;
        overflow-x: hidden;
    }

    .kanban-column,
    .kanban-column.is-collapsed {
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
        max-width: none;
        min-height: auto;
    }

    .kanban-column.is-collapsed header {
        display: block;
    }

    .kanban-column.is-collapsed .kanban-column-toggle {
        min-height: 40px;
        height: auto;
        flex-direction: row;
        justify-content: space-between;
    }

    .kanban-column.is-collapsed .kanban-column-title {
        writing-mode: horizontal-tb;
        transform: none;
        max-height: none;
    }

    .kanban-column.is-collapsed .kanban-column-actions {
        flex-direction: row;
    }

    .kanban-column.is-collapsed .kanban-column-actions i {
        transform: rotate(-90deg);
    }
}

.general-note-modal {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.general-note-modal .modal-header,
.general-note-modal .modal-footer {
    border-color: var(--line);
}

.general-note-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: rgba(2, 6, 23, .035);
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
}

.note-tool {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    color: var(--ink);
}

.note-tool:hover,
.note-tool:focus {
    border-color: rgba(163, 230, 53, .55);
    background: rgba(163, 230, 53, .14);
    color: var(--ink);
}

.note-tool-separator {
    width: 1px;
    height: 24px;
    flex: 0 0 auto;
    background: var(--line);
    margin: 0 2px;
}

.general-note-editor {
    min-height: 300px;
    max-height: min(58vh, 560px);
    overflow: auto;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    color: var(--ink);
    outline: 0;
    line-height: 1.55;
}

.general-note-editor:focus {
    border-color: var(--ink);
    box-shadow: 0 0 0 .18rem rgba(163, 230, 53, .25);
}

.general-note-editor:empty::before {
    content: attr(data-placeholder);
    color: rgba(2, 6, 23, .42);
}

.general-note-editor a {
    color: var(--ink);
    font-weight: 800;
    text-decoration: underline;
    text-decoration-color: var(--lime);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.general-note-editor p,
.general-note-editor ul,
.general-note-editor ol {
    margin: 0 0 10px;
}

.general-note-editor p:last-child,
.general-note-editor ul:last-child,
.general-note-editor ol:last-child {
    margin-bottom: 0;
}

.general-note-meta {
    min-height: 22px;
    margin-top: 10px;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 650;
}

@media (max-width: 720px) {
    .general-note-modal .modal-body {
        padding: 14px;
    }

    .general-note-editor {
        min-height: 260px;
        max-height: 56vh;
    }
}

.public-share-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.excalidraw-body .content {
    max-width: none;
    padding: 0;
}

.excalidraw-page {
    min-height: calc(100vh - 66px);
    display: flex;
    flex-direction: column;
    background: #fff;
}

.public-page .excalidraw-page {
    min-height: 100vh;
}

.bare-page .excalidraw-page {
    min-height: 100vh;
}

.excalidraw-topbar {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 9px 16px;
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 12;
}

.public-page .excalidraw-topbar {
    background: var(--chrome);
    border-bottom-color: rgba(255, 255, 255, .10);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .12);
}

.excalidraw-title {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.excalidraw-title img {
    width: 104px;
    height: auto;
    display: block;
}

.excalidraw-title p {
    margin: 0;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 800;
}

.public-page .excalidraw-title p {
    color: rgba(255, 255, 255, .68);
}

.excalidraw-title h1 {
    margin: 0;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 850;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.public-page .excalidraw-title h1 {
    color: var(--white);
}

.excalidraw-sync {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.excalidraw-assign-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.excalidraw-assign-form .form-select {
    width: min(260px, 34vw);
    min-width: 170px;
}

.excalidraw-workspace {
    position: relative;
    flex: 1 1 auto;
    height: calc(100vh - 124px);
    min-height: 520px;
    width: 100%;
}

.public-page .excalidraw-workspace {
    height: calc(100vh - 58px);
    min-height: 520px;
}

.bare-page .excalidraw-workspace {
    height: calc(100vh - 58px);
    min-height: 520px;
}

.excalidraw-root-host,
.excalidraw-workspace .excalidraw {
    height: 100%;
    width: 100%;
}

.excalidraw-workspace[data-pan-cursor="1"] canvas {
    cursor: grab !important;
}

.excalidraw-workspace[data-pan-cursor="1"].is-panning canvas {
    cursor: grabbing !important;
}

.excalidraw-workspace .layer-ui__sidebar,
.excalidraw-workspace [data-testid="library-menu"] {
    display: none !important;
}

.excalidraw-workspace .App-menu_top__left,
.excalidraw-workspace .main-menu-trigger,
.excalidraw-workspace .sidebar-trigger,
.excalidraw-workspace .sidebar-trigger__label-element {
    visibility: hidden !important;
    pointer-events: none !important;
}

.excalidraw-workspace .help-icon,
.excalidraw-workspace .disable-zen-mode,
.excalidraw-workspace .mobile-misc-tools-container,
.excalidraw-workspace .scroll-back-to-content {
    display: none !important;
}

.excalidraw-loading,
.excalidraw-error {
    min-height: inherit;
    display: grid;
    place-items: center;
    gap: 10px;
    color: var(--muted);
    font-weight: 800;
}

.excalidraw-loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 720px) {
    .excalidraw-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .excalidraw-sync,
    .excalidraw-assign-form {
        width: 100%;
    }

    .excalidraw-assign-form .form-select {
        width: 100%;
        min-width: 0;
    }
}

.public-page {
    background: rgba(2, 6, 23, .045);
}

.public-board-shell {
    min-height: 100vh;
}

.public-board-topbar {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 24px;
    background: var(--chrome);
    border-bottom: 1px solid rgba(255, 255, 255, .10);
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .12);
}

.public-board-brand img {
    width: 112px;
    height: auto;
    display: block;
}

.public-board-mode {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 10px;
    color: var(--white);
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    font-size: .84rem;
    font-weight: 800;
    white-space: nowrap;
}

.public-board-mode i {
    color: var(--lime);
}

.public-board-main {
    padding: 24px;
}

.public-board-head .eyebrow {
    display: block;
}

.public-board-description {
    max-width: 920px;
    margin: 0 0 14px;
    color: var(--muted);
    font-weight: 650;
}

.public-kanban-board {
    min-height: calc(100vh - 172px);
}

.public-kanban-board .kanban-column[data-drop-allowed="0"] {
    opacity: 1;
}

.public-kanban-card {
    cursor: default;
}

.public-kanban-card:hover {
    transform: none;
}

.public-kanban-card .kanban-card-head strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #020617;
    font-weight: 850;
    line-height: 1.25;
}

.public-task-description {
    display: -webkit-box;
    margin-bottom: 10px;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

@media (max-width: 720px) {
    .public-share-box {
        grid-template-columns: 1fr;
    }

    .public-board-topbar,
    .public-board-main {
        padding-left: 14px;
        padding-right: 14px;
    }
}

.project-show-page .project-show-head {
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
}

.project-show-page .project-show-head h1 {
    font-size: 1.45rem;
    line-height: 1.12;
}

.project-show-page .eyebrow {
    margin-bottom: 3px;
    font-size: .68rem;
}

.project-show-page .panel {
    padding: 12px;
}

.project-show-page .panel-head {
    margin-bottom: 8px;
}

.project-show-page .panel-head h2 {
    font-size: .9rem;
}

.project-show-page .btn {
    min-height: 32px;
    padding-top: .28rem;
    padding-bottom: .28rem;
}

.project-show-page .form-control,
.project-show-page .form-select {
    min-height: 34px;
    padding-top: .34rem;
    padding-bottom: .34rem;
    font-size: .84rem;
}

.project-task-head {
    align-items: center;
}

.project-task-count {
    min-width: 26px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(2, 6, 23, .12);
    border-radius: 999px;
    color: #020617;
    background: rgba(163, 230, 53, .2);
    font-size: .78rem;
    font-weight: 900;
}

.project-show-page .task-list {
    gap: 6px;
}

.project-task-grid-head {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 96px 86px 104px 92px;
    gap: 12px;
    align-items: center;
    padding: 0 10px 4px;
    color: #64748b;
    font-size: .66rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.project-task-grid-head span:not(:first-child) {
    text-align: center;
}

.project-task-stage-row {
    display: flex;
    align-items: center;
    min-height: 30px;
    margin-top: 8px;
    padding: 8px 10px 4px;
    color: #334155;
    font-size: .78rem;
    font-weight: 900;
    border-top: 1px solid rgba(15, 23, 42, .08);
}

.project-task-stage-row:first-of-type,
.project-task-grid-head + .project-task-stage-row {
    margin-top: 0;
    border-top: 0;
}

.project-show-page .project-task-row {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 96px 86px 104px 92px;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 9px 10px;
}

.project-task-main {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.project-task-main strong {
    display: flex;
    align-items: baseline;
    gap: 7px;
    min-width: 0;
    color: #020617;
    font-size: .94rem;
    line-height: 1.2;
}

.project-task-main strong > span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-task-code {
    flex: 0 0 auto;
    color: #475569;
    font-size: .72rem;
    font-weight: 900;
}

.project-task-main small,
.project-task-date,
.project-task-assignees small {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 700;
}

.project-task-cell,
.project-task-date,
.project-task-assignees {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.project-task-date {
    gap: 5px;
    white-space: nowrap;
}

.project-task-assignees {
    justify-content: flex-end;
    padding-right: 2px;
}

.project-task-assignees .avatar,
.project-task-more {
    border: 2px solid #fff;
    box-shadow: 0 1px 0 rgba(2, 6, 23, .08);
}

.project-task-assignees .avatar + .avatar,
.project-task-assignees .avatar + .project-task-more {
    margin-left: -7px;
}

.project-task-more {
    width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    color: #020617;
    background: #e2e8f0;
    border-radius: 6px;
    font-size: .66rem;
    font-weight: 900;
}

.project-show-page .badge {
    width: 100%;
    max-width: 86px;
    padding: .26rem .48rem;
    font-size: .72rem;
    text-align: center;
}

.compact-share-panel {
    padding: 0 !important;
    overflow: hidden;
}

.compact-share-panel summary {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    list-style: none;
}

.compact-share-panel summary::-webkit-details-marker {
    display: none;
}

.compact-share-panel summary span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #020617;
    font-size: .86rem;
    font-weight: 850;
}

.compact-share-panel summary small {
    color: var(--muted);
    font-size: .74rem;
    font-weight: 700;
}

.compact-share-panel[open] summary {
    border-bottom: 1px solid var(--line);
}

.compact-share-body {
    padding: 10px 12px 12px;
}

.project-delete-options {
    overflow: hidden;
    border: 1px solid rgba(2, 6, 23, .12);
    border-radius: 8px;
    background: rgba(2, 6, 23, .035);
}

.project-delete-options summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 38px;
    padding: 9px 12px;
    cursor: pointer;
    color: var(--ink);
    font-size: .84rem;
    font-weight: 850;
    list-style: none;
}

.project-delete-options summary::-webkit-details-marker {
    display: none;
}

.project-delete-options-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px 12px;
    border-top: 1px solid rgba(2, 6, 23, .1);
}

.project-delete-options-body p {
    margin: 0;
    color: var(--muted);
    font-size: .8rem;
}

.project-show-page .comment-form {
    gap: 8px;
    margin-bottom: 10px;
}

.project-chat-panel {
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 0;
    height: 100%;
    padding: 0;
    overflow: visible;
    background:
        radial-gradient(circle at 12px 12px, rgba(15, 23, 42, .035) 1px, transparent 1.5px),
        linear-gradient(180deg, #eef2f0, #e7eee9);
    background-size: 22px 22px, auto;
}

.project-chat-panel:not(.messages-chat-panel) {
    min-height: 460px;
    height: min(72vh, 720px);
}

.project-chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex: 0 0 auto;
    min-height: 66px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(2, 6, 23, .08);
    background: #f8fafc;
}

.project-chat-head-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.project-chat-starred-toggle {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, .06);
    color: rgba(15, 23, 42, .62);
}

.project-chat-starred-toggle:hover,
.project-chat-starred-toggle:focus {
    background: rgba(250, 204, 21, .18);
    color: #a16207;
    outline: none;
}

.project-chat-head span {
    font-size: .72rem;
    font-weight: 800;
    color: var(--muted);
}

.project-chat-head small {
    display: block;
    max-width: 620px;
    margin-top: 2px;
    color: var(--muted);
    font-size: .76rem;
    line-height: 1.25;
}

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

.project-chat-title h2 {
    max-width: min(52vw, 560px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-chat-description {
    flex: 0 0 auto;
    margin: 0;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(2, 6, 23, .08);
    color: var(--muted);
    font-size: .82rem;
    line-height: 1.35;
}

.project-chat-pinned {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    min-height: 48px;
    padding: 6px 10px 6px 16px;
    border-bottom: 1px solid rgba(2, 6, 23, .08);
    background: rgba(248, 250, 252, .96);
    color: var(--ink);
}

.project-chat-pinned[hidden] {
    display: none;
}

.project-chat-pinned-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1 1 auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
}

.project-chat-pinned-main > span {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 10px;
    background: rgba(15, 23, 42, .07);
    color: rgba(15, 23, 42, .62);
    font-size: 1rem;
}

.project-chat-pinned-main strong {
    min-width: 0;
    overflow: hidden;
    color: rgba(15, 23, 42, .82);
    font-size: .9rem;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-chat-pinned-main:hover,
.project-chat-pinned-main:focus,
.project-chat-pinned-more:hover,
.project-chat-pinned-more:focus {
    background: #fff;
    outline: none;
}

.project-chat-pinned-main:hover > span,
.project-chat-pinned-main:focus > span {
    background: rgba(34, 197, 94, .14);
    color: var(--ink);
}

.project-chat-pinned-more {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: rgba(15, 23, 42, .62);
}

.project-chat-pinned-more[hidden] {
    display: none;
}

.project-chat-pinned-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 8px;
    z-index: 12;
    width: min(330px, calc(100% - 16px));
    max-height: 240px;
    padding: 6px;
    overflow-y: auto;
    border: 1px solid rgba(2, 6, 23, .10);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 38px rgba(15, 23, 42, .18);
}

.project-chat-pinned-menu[hidden] {
    display: none;
}

.project-chat-pinned-menu button {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--ink);
    text-align: left;
}

.project-chat-pinned-menu button:hover,
.project-chat-pinned-menu button:focus {
    background: rgba(34, 197, 94, .10);
    outline: none;
}

.project-chat-pinned-menu i {
    color: rgba(15, 23, 42, .52);
}

.project-chat-pinned-menu span {
    display: grid;
    min-width: 0;
}

.project-chat-pinned-menu b,
.project-chat-pinned-menu small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-chat-pinned-menu b {
    font-size: .78rem;
    font-weight: 900;
}

.project-chat-pinned-menu small {
    color: var(--muted);
    font-size: .74rem;
    font-weight: 750;
}

.project-chat-list {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 6px;
    min-height: 0;
    padding: 16px 18px 132px;
    overflow-y: auto;
    background: transparent;
}

.project-chat-message {
    display: flex;
    align-items: flex-end;
    gap: 7px;
    justify-content: flex-start;
    position: relative;
    width: fit-content;
    max-width: min(86%, 640px);
    align-self: flex-start;
}

.project-chat-message.is-mine {
    justify-content: flex-end;
    align-self: flex-end;
}

.project-chat-message.is-mine .project-chat-bubble {
    margin-left: auto;
}

.project-chat-day {
    align-self: center;
    margin: 8px 0 6px;
    padding: 4px 10px;
    border: 1px solid rgba(2, 6, 23, .07);
    border-radius: 999px;
    background: rgba(255, 255, 255, .72);
    color: rgba(2, 6, 23, .54);
    font-size: .68rem;
    font-weight: 800;
    line-height: 1.2;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .04);
}

.project-chat-avatar {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .85);
    border-radius: 50%;
    background: #f8fafc;
    color: var(--ink);
    font-size: .72rem;
    font-weight: 900;
    box-shadow: 0 2px 6px rgba(15, 23, 42, .12);
}

.project-chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-chat-bubble {
    position: relative;
    width: fit-content;
    max-width: 100%;
    padding: 6px 8px 5px;
    border: 1px solid rgba(2, 6, 23, .055);
    border-radius: 7px 7px 7px 2px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
}

.project-chat-message.is-mine .project-chat-bubble {
    border-color: rgba(34, 197, 94, .16);
    border-radius: 7px 7px 2px 7px;
    background: #d9fdd3;
}

.project-chat-author {
    display: block;
    margin-bottom: 2px;
    color: var(--ink);
    font-size: .74rem;
    font-weight: 900;
}

.project-chat-content-row {
    display: flex;
    align-items: flex-start;
    gap: 5px;
}

.project-chat-bubble p {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0 0 1px;
    color: var(--ink);
    font-size: .88rem;
    line-height: 1.38;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.project-chat-message.is-deleted .project-chat-bubble p {
    color: rgba(2, 6, 23, .52);
    font-style: italic;
}

.project-chat-bubble p a {
    color: #047857;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.project-chat-message.is-mine .project-chat-bubble p a {
    color: #065f46;
}

.project-chat-time {
    display: block;
    margin-left: 36px;
    color: rgba(2, 6, 23, .48);
    font-size: .64rem;
    line-height: 1;
    text-align: right;
    white-space: nowrap;
}

.project-chat-actions {
    display: flex;
    position: relative;
}

.project-chat-menu-toggle {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(2, 6, 23, .07);
    color: rgba(2, 6, 23, .62);
    font-size: .72rem;
}

.project-chat-menu-toggle:hover,
.project-chat-menu-toggle:focus,
.project-chat-menu-toggle[aria-expanded="true"] {
    background: rgba(2, 6, 23, .14);
    color: var(--ink);
}

.project-chat-menu {
    position: absolute;
    left: calc(100% + 5px);
    right: auto;
    top: calc(100% + 6px);
    bottom: auto;
    z-index: 8;
    display: grid;
    width: max-content;
    min-width: 158px;
    max-width: min(196px, calc(100vw - 28px));
    overflow: hidden;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 8px;
    background: #141414;
    box-shadow: 0 14px 32px rgba(2, 6, 23, .28);
}

.project-chat-message.is-mine .project-chat-menu {
    right: calc(100% + 5px);
    left: auto;
}

.project-chat-menu.is-open-up {
    top: auto;
    bottom: calc(100% + 6px);
}

.project-chat-menu[hidden] {
    display: none;
}

.project-chat-menu button {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 6px;
    align-items: center;
    width: 100%;
    min-height: 28px;
    padding: 5px 7px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #f8fafc;
    font-size: .78rem;
    font-weight: 800;
    text-align: left;
}

.project-chat-menu button i {
    font-size: .78rem;
    line-height: 1;
}

.project-chat-menu button:hover,
.project-chat-menu button:focus {
    background: rgba(255, 255, 255, .10);
}

.project-chat-menu button[data-chat-delete] {
    color: #fecaca;
}

.project-chat-reply,
.project-chat-flag,
.project-chat-reactions {
    display: flex;
    max-width: 100%;
    margin-top: 5px;
}

.project-chat-reply {
    padding: 5px 7px;
    border-left: 3px solid rgba(34, 197, 94, .55);
    border-radius: 6px;
    background: rgba(255, 255, 255, .48);
    color: rgba(2, 6, 23, .64);
    cursor: pointer;
    font-size: .74rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.project-chat-reply:hover,
.project-chat-reply:focus {
    background: rgba(34, 197, 94, .14);
    color: var(--ink);
    outline: none;
}

.project-chat-message.is-jump-highlight .project-chat-bubble {
    animation: project-chat-jump-highlight 1.8s ease;
}

@keyframes project-chat-jump-highlight {
    0%,
    100% {
        box-shadow: 0 10px 26px rgba(15, 23, 42, .08);
    }

    25%,
    70% {
        box-shadow: 0 0 0 3px rgba(34, 197, 94, .35), 0 14px 32px rgba(15, 23, 42, .16);
    }
}

.project-chat-flag {
    color: rgba(2, 6, 23, .50);
    font-size: .68rem;
    font-weight: 900;
}

.project-chat-reactions {
    position: absolute;
    right: -7px;
    bottom: -15px;
    z-index: 3;
    flex-wrap: nowrap;
    gap: 2px;
}

.project-chat-message:not(.is-mine) .project-chat-reactions {
    right: auto;
    left: -7px;
}

.project-chat-message-badges {
    display: inline-flex;
    position: absolute;
    left: -10px;
    bottom: 5px;
    z-index: 2;
    flex-direction: column;
    gap: 2px;
    color: #ca8a04;
    font-size: .68rem;
    line-height: 1;
}

.project-chat-message.is-mine .project-chat-message-badges {
    right: -10px;
    left: auto;
}

.project-chat-message-badges i {
    display: inline-grid;
    place-items: center;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 2px 5px rgba(15, 23, 42, .14);
}

.project-chat-message-badges .bi-pin-angle-fill {
    color: rgba(15, 23, 42, .58);
}

.project-chat-reactions button {
    min-width: 24px;
    min-height: 22px;
    padding: 1px 6px;
    border: 1px solid rgba(2, 6, 23, .10);
    border-radius: 999px;
    background: rgba(255, 255, 255, .96);
    color: var(--ink);
    font-size: .78rem;
    font-weight: 900;
    box-shadow: 0 3px 9px rgba(2, 6, 23, .16);
}

.project-chat-reactions button.is-mine {
    border-color: rgba(34, 197, 94, .36);
    background: rgba(34, 197, 94, .18);
}

.project-chat-react-actions {
    display: flex;
    position: relative;
}

.project-chat-side-actions {
    display: grid;
    position: absolute;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    gap: 3px;
    opacity: 0;
    transition: opacity .16s ease;
}

.project-chat-message:hover .project-chat-side-actions,
.project-chat-message:focus-within .project-chat-side-actions,
.project-chat-side-actions.is-open {
    opacity: 1;
}

.project-chat-message.is-mine .project-chat-side-actions {
    right: auto;
    left: -30px;
}

.project-chat-react-toggle {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(2, 6, 23, .06);
    color: rgba(2, 6, 23, .58);
    font-size: .78rem;
}

.project-chat-react-toggle:hover,
.project-chat-react-toggle:focus,
.project-chat-react-toggle[aria-expanded="true"] {
    background: rgba(2, 6, 23, .14);
    color: var(--ink);
}

.project-chat-reaction-picker {
    position: absolute;
    left: calc(100% + 5px);
    right: auto;
    top: 0;
    bottom: auto;
    z-index: 9;
    display: grid;
    grid-template-columns: repeat(6, 28px);
    gap: 2px;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 999px;
    background: #141414;
    box-shadow: 0 12px 26px rgba(2, 6, 23, .26);
}

.project-chat-message.is-mine .project-chat-reaction-picker {
    right: calc(100% + 5px);
    left: auto;
}

.project-chat-reaction-picker.is-open-up {
    top: auto;
    bottom: 0;
}

.project-chat-reaction-picker[hidden] {
    display: none;
}

.project-chat-reaction-picker button {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    font-size: 1rem;
}

.project-chat-reaction-picker button:hover,
.project-chat-reaction-picker button:focus {
    background: rgba(255, 255, 255, .12);
}

.project-chat-empty,
.project-chat-readonly {
    margin: 0;
    color: var(--muted);
    font-size: .84rem;
}

.project-chat-form {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 14px;
    z-index: 2;
    gap: 10px;
    align-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.project-chat-reply-compose {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 10px;
    border: 1px solid rgba(2, 6, 23, .08);
    border-radius: 8px;
    background: rgba(255, 255, 255, .96);
    color: rgba(2, 6, 23, .68);
    font-size: .78rem;
    font-weight: 800;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .10);
}

.project-chat-reply-compose[hidden] {
    display: none;
}

.project-chat-reply-compose span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-chat-reply-compose button {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(2, 6, 23, .07);
    color: var(--ink);
}

.project-chat-info-dialog {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(2, 6, 23, .22);
    backdrop-filter: blur(2px);
}

.project-chat-info-card {
    width: min(360px, 100%);
    overflow: hidden;
    border: 1px solid rgba(2, 6, 23, .10);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 18px 46px rgba(2, 6, 23, .24);
}

.project-chat-info-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(2, 6, 23, .08);
    background: #f8fafc;
}

.project-chat-info-head strong {
    color: var(--ink);
    font-size: .96rem;
    font-weight: 900;
}

.project-chat-info-head button {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(2, 6, 23, .06);
    color: var(--ink);
}

.project-chat-info-card dl {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 14px;
}

.project-chat-info-card dl > div {
    display: grid;
    gap: 2px;
}

.project-chat-info-card dt,
.project-chat-info-read strong {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.project-chat-info-card dd {
    margin: 0;
    color: var(--ink);
    font-size: .88rem;
    font-weight: 800;
}

.project-chat-info-read {
    padding: 0 14px 14px;
}

.project-chat-info-read ul {
    display: grid;
    gap: 6px;
    max-height: 180px;
    padding: 0;
    margin: 8px 0 0;
    overflow-y: auto;
    list-style: none;
}

.project-chat-info-read li {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 8px;
    border-radius: 7px;
    background: #f8fafc;
    color: var(--ink);
    font-size: .82rem;
    font-weight: 800;
}

.project-chat-info-read li small,
.project-chat-info-read p {
    margin: 0;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 700;
}

.project-chat-reactions-card .project-chat-info-read {
    padding-top: 14px;
}

.project-chat-starred-card {
    width: min(390px, 100%);
}

.project-chat-starred-list {
    display: grid;
    gap: 6px;
    max-height: 260px;
    padding: 14px;
    overflow-y: auto;
}

.project-chat-starred-list button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px;
    border: 0;
    border-radius: 8px;
    background: #f8fafc;
    color: var(--ink);
    text-align: left;
}

.project-chat-starred-list button:hover,
.project-chat-starred-list button:focus {
    background: rgba(250, 204, 21, .16);
    outline: none;
}

.project-chat-starred-list i {
    color: #ca8a04;
}

.project-chat-starred-list span {
    display: grid;
    min-width: 0;
}

.project-chat-starred-list b,
.project-chat-starred-list small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-chat-starred-list b {
    font-size: .82rem;
    font-weight: 900;
}

.project-chat-starred-list small,
.project-chat-starred-list p {
    margin: 0;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
}

.project-chat-delete-card {
    width: min(360px, 100%);
}

.project-chat-delete-body {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 14px 10px;
}

.project-chat-delete-body span {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 50%;
    background: rgba(239, 68, 68, .12);
    color: #b91c1c;
}

.project-chat-delete-body p {
    margin: 0;
    color: rgba(15, 23, 42, .78);
    font-size: .88rem;
    font-weight: 800;
    line-height: 1.35;
}

.project-chat-delete-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 8px 14px 14px;
}

.project-chat-delete-actions button {
    min-height: 34px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 900;
}

.project-chat-delete-actions button[data-chat-delete-cancel] {
    background: rgba(15, 23, 42, .07);
    color: var(--ink);
}

.project-chat-delete-actions button[data-chat-delete-confirm] {
    background: #dc2626;
    color: #fff;
}

.project-chat-delete-actions button:hover,
.project-chat-delete-actions button:focus {
    filter: brightness(.96);
    outline: none;
}

.project-chat-forward-card {
    width: min(390px, 100%);
}

.project-chat-forward-body {
    display: grid;
    gap: 8px;
    padding: 16px 14px 10px;
}

.project-chat-forward-body label {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.project-chat-forward-body select,
.project-chat-forward-body input {
    width: 100%;
    min-height: 40px;
    padding: 0 10px;
    border: 1px solid rgba(2, 6, 23, .12);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--ink);
    font-size: .88rem;
    font-weight: 800;
}

.project-chat-forward-empty {
    margin: 0;
    padding: 10px;
    border-radius: 8px;
    background: #f8fafc;
    color: var(--muted);
    font-size: .84rem;
    font-weight: 800;
}

.project-chat-forward-body select:focus,
.project-chat-forward-body input:focus {
    border-color: rgba(34, 197, 94, .48);
    background: #fff;
    outline: none;
}

.project-chat-delete-actions button:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.project-chat-reaction-user {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.project-chat-reaction-user img,
.project-chat-reaction-user > i {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 50%;
    background: rgba(34, 197, 94, .14);
    color: var(--ink);
    object-fit: cover;
}

.project-chat-reaction-user span {
    display: grid;
    min-width: 0;
}

.project-chat-reaction-user b {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-chat-reaction-value {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.project-chat-reaction-value strong {
    flex: 0 0 auto;
    font-size: 1.1rem;
}

.project-chat-reaction-value button {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, .08);
    color: rgba(15, 23, 42, .68);
    font-size: .72rem;
}

.project-chat-reaction-value button:hover,
.project-chat-reaction-value button:focus {
    background: rgba(239, 68, 68, .14);
    color: #b91c1c;
}

.project-chat-emoji-btn {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(2, 6, 23, .08);
    border-radius: 50%;
    background: rgba(255, 255, 255, .96);
    color: rgba(2, 6, 23, .68);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .10);
}

.project-chat-emoji-btn:hover,
.project-chat-emoji-btn:focus {
    border-color: rgba(34, 197, 94, .35);
    background: rgba(34, 197, 94, .14);
    color: var(--ink);
}

.project-chat-emoji-picker {
    position: absolute;
    left: 0;
    bottom: 52px;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(8, 34px);
    gap: 4px;
    padding: 8px;
    max-height: min(292px, 42vh);
    overflow-y: auto;
    border: 1px solid rgba(2, 6, 23, .10);
    border-radius: 12px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .18);
    overscroll-behavior: contain;
}

.project-chat-emoji-picker[hidden] {
    display: none;
}

.project-chat-emoji-picker button {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    font-size: 1.08rem;
    line-height: 1;
}

.project-chat-emoji-picker button:hover,
.project-chat-emoji-picker button:focus {
    background: rgba(34, 197, 94, .14);
}

.project-chat-form textarea {
    min-height: 44px;
    max-height: 104px;
    padding: 11px 16px;
    border: 1px solid rgba(2, 6, 23, .08);
    border-radius: 999px;
    background: rgba(255, 255, 255, .96);
    resize: none;
    overflow-y: auto;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .10);
}

.project-chat-form textarea:focus {
    border-color: rgba(2, 6, 23, .28);
    box-shadow: 0 0 0 .18rem rgba(163, 230, 53, .20), 0 8px 22px rgba(15, 23, 42, .10);
}

.project-chat-form .btn {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 50%;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .16);
}

.project-chat-send-btn {
    align-self: center;
}

.project-chat-readonly {
    padding: 10px 16px 14px;
    border-top: 1px solid rgba(2, 6, 23, .08);
}

.messages-chat-layout {
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
    height: clamp(620px, calc(100dvh - 112px), 860px);
    overflow: visible;
    border: 1px solid rgba(2, 6, 23, .08);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(2, 6, 23, .08);
}

.messages-project-list {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    border-right: 1px solid rgba(2, 6, 23, .08);
    box-shadow: none;
}

.messages-project-head {
    flex: 0 0 auto;
    min-height: 66px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(2, 6, 23, .08);
    background: #f8fafc;
}

.messages-project-head h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 900;
}

.messages-project-head span {
    color: var(--muted);
    font-size: .74rem;
    font-weight: 800;
}

.messages-project-items {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    background: #fff;
}

.messages-project-link {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 66px;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid rgba(2, 6, 23, .06);
    border-radius: 0;
    background: #fff;
    color: var(--ink);
    text-decoration: none;
    transition: background .18s ease;
}

.messages-project-link:hover,
.messages-project-link.is-active {
    background: rgba(220, 252, 231, .58);
    color: var(--ink);
}

.messages-project-avatar {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--chat-color, #a3e635);
    background: color-mix(in srgb, var(--chat-color, #a3e635) 72%, #fff);
    color: var(--ink);
    font-size: .95rem;
    font-weight: 900;
}

.messages-project-main {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.messages-project-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    gap: 8px;
}

.messages-project-link strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .88rem;
    font-weight: 900;
}

.messages-project-link small {
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    display: -webkit-box;
    font-size: .74rem;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.messages-project-link time {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: .74rem;
}

.messages-unread-count {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #22c55e;
    color: #fff;
    font-size: .68rem;
    font-weight: 900;
}

.messages-chat-panel {
    min-height: 0;
    max-height: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

.messages-chat-panel-empty {
    min-height: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.messages-notifications-drawer {
    margin-top: 10px;
}

.messages-notifications-drawer > summary {
    cursor: pointer;
    width: fit-content;
    margin-bottom: 12px;
    padding: 8px 12px;
    border: 1px solid rgba(2, 6, 23, .10);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font-size: .84rem;
    font-weight: 900;
}

.project-show-page .message-item,
.project-show-page .feed-item {
    padding: 8px 10px;
    margin-bottom: 7px;
}

.project-show-page .message-item p {
    display: -webkit-box;
    margin: 4px 0;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.project-show-page .meta-column {
    gap: 5px;
    font-size: .84rem;
}

.project-show-page .project-side-column .panel > p {
    margin-bottom: 8px;
    font-size: .84rem;
}

.project-show-page .user-line {
    gap: 8px;
    padding: 6px 0;
}

.project-show-page .user-line .avatar {
    width: 30px;
    height: 30px;
}

.project-show-page .user-line strong,
.project-show-page .message-item strong,
.project-show-page .feed-item strong {
    font-size: .84rem;
}

.project-show-page .user-line small,
.project-show-page .message-item small,
.project-show-page .feed-item span {
    font-size: .74rem;
}

@media (max-width: 991px) {
    .messages-chat-layout {
        grid-template-columns: 1fr;
        grid-template-rows: 138px minmax(0, 1fr);
        height: calc(100dvh - 96px);
        min-height: 520px;
    }

    .messages-project-list {
        min-height: 0;
        border-right: 0;
        border-bottom: 1px solid rgba(2, 6, 23, .08);
    }

    .messages-project-head {
        min-height: 48px;
        padding: 8px 12px;
    }

    .messages-project-items {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(220px, 76vw);
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 4px;
    }

    .messages-project-link {
        border-right: 1px solid rgba(2, 6, 23, .06);
        border-bottom: 0;
    }

    .messages-chat-panel {
        min-height: 0;
        max-height: none;
    }

    .project-chat-panel {
        min-height: 0;
        max-height: none;
    }

    .project-chat-bubble {
        max-width: 86%;
    }

    .project-chat-title h2 {
        max-width: 48vw;
    }

    .project-task-grid-head {
        display: none;
    }

    .project-show-page .project-task-row {
        grid-template-columns: 1fr auto;
        gap: 8px 10px;
    }

    .project-task-main {
        grid-column: 1 / -1;
    }

    .project-task-cell,
    .project-task-date,
    .project-task-assignees {
        justify-content: flex-start;
    }

    .project-task-date {
        justify-content: flex-end;
    }

    .project-task-assignees {
        justify-content: flex-end;
    }
}

/* Compact density for the authenticated app screens. */
body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) {
    font-size: 13.5px;
    line-height: 1.38;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .content {
    padding: 18px 22px;
    transition: opacity .16s ease, transform .16s ease;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .content.is-filter-loading {
    opacity: .72;
    pointer-events: none;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .content.is-content-swapping {
    opacity: .35;
    transform: translateY(4px);
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .topbar {
    min-height: 54px;
    padding-inline: 18px;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .search-box {
    height: 36px;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 7px;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .profile-chip {
    min-height: 34px;
    padding: 4px 10px 4px 4px;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .page-head {
    align-items: center;
    min-height: 0;
    margin-bottom: 12px;
    padding-bottom: 10px;
    gap: 12px;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .page-head h1 {
    font-size: clamp(1.28rem, 1.45vw, 1.62rem);
    line-height: 1.12;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .eyebrow {
    margin-bottom: 3px;
    font-size: .67rem;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) label {
    margin-bottom: .25rem;
    font-size: .68rem;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .btn {
    min-height: 34px;
    padding: .34rem .68rem;
    border-radius: 7px;
    font-size: .84rem;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .btn-sm {
    min-height: 29px;
    padding: .22rem .52rem;
    font-size: .76rem;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .form-control,
body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .form-select {
    min-height: 34px;
    padding-top: .34rem;
    padding-bottom: .34rem;
    border-radius: 7px;
    font-size: .84rem;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) textarea.form-control {
    min-height: 72px;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .form-control-sm,
body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .form-select-sm {
    min-height: 30px;
    font-size: .78rem;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .panel,
body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .metric-card,
body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .project-card {
    border-radius: 8px;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .panel {
    padding: 12px;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .panel.mb-4,
body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .panel.mb-3,
body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .metric-grid {
    margin-bottom: 10px !important;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .panel.mt-4 {
    margin-top: 10px !important;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .panel-head {
    margin-bottom: 8px;
    gap: 10px;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .panel-head h2 {
    font-size: .9rem;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .content > .row,
body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .content .row.g-4,
body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .content .row.g-3 {
    --bs-gutter-x: .85rem;
    --bs-gutter-y: .85rem;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .filter-panel,
body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .kanban-filter-panel {
    padding: 0;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .filter-panel summary,
body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .kanban-filter-panel summary {
    min-height: 36px;
    padding: 7px 11px;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .filter-panel form,
body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .kanban-filter-panel form {
    padding: 10px;
}

@media (min-width: 992px) {
    body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .kanban-filter-panel form > div:first-of-type {
        width: 25%;
    }
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .table > :not(caption) > * > * {
    padding: .52rem .6rem;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .table thead th {
    font-size: .66rem;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .badge {
    padding: .25rem .46rem;
    font-size: .7rem;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .metric-grid {
    gap: 10px;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .metric-card {
    min-height: 78px;
    padding: 12px;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .metric-card strong {
    margin-top: 7px;
    font-size: 1.45rem;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .card-grid {
    gap: 10px;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .list-toolbar {
    font-size: .76rem;
    margin-bottom: 0;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .pagination-wrap {
    margin-top: 10px;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .pagination .page-link {
    padding: .28rem .5rem;
    font-size: .78rem;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .project-card {
    padding: 12px;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .project-card h2 {
    margin-bottom: 5px;
    font-size: .94rem;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .project-card p {
    min-height: 24px;
    margin-bottom: 8px;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .project-progress {
    gap: 6px;
    margin: 0 0 8px;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .project-progress-top strong {
    font-size: .96rem;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .project-progress-bar {
    height: 7px;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .project-progress-foot {
    font-size: .72rem;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .project-countdown {
    padding: 2px 6px;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .meta-row {
    gap: 6px 10px;
    font-size: .8rem;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .task-list,
body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .comment-list,
body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .attachment-list {
    gap: 7px;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .task-row,
body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .comment,
body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .attachment-item,
body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .feed-item,
body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .message-item,
body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .notification-row {
    padding: 8px 10px;
    margin-bottom: 7px;
    border-radius: 7px;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .comment-form {
    gap: 8px;
    margin-bottom: 10px;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .message-item p,
body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .notification-row p {
    margin: 4px 0;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .user-line {
    gap: 8px;
    padding: 6px 0;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .assignee-option {
    min-height: 32px;
    padding: 4px 9px 4px 5px;
    font-size: .8rem;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .avatar {
    width: 30px;
    height: 30px;
    border-radius: 7px;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .avatar-sm {
    width: 24px;
    height: 24px;
    border-radius: 6px;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .avatar-xs {
    width: 20px;
    height: 20px;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .avatar-lg {
    width: 58px;
    height: 58px;
    border-radius: 12px;
    font-size: 1.25rem;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .kanban-page-head {
    margin-bottom: 8px;
    padding-bottom: 8px;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .kanban-board {
    gap: 10px;
    min-height: calc(100vh - 205px);
    padding: 10px;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .kanban-column {
    min-height: calc(100vh - 235px);
    padding: 10px;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .kanban-column header {
    margin-bottom: 8px;
    gap: 8px;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .kanban-column-toggle {
    min-height: 34px;
    padding: 5px 7px;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .kanban-card {
    padding: 9px;
    margin-bottom: 8px;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .kanban-card-head {
    margin-bottom: 7px;
    gap: 8px;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .kanban-card p {
    margin-bottom: 7px;
    gap: 6px;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .modal-header,
body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .modal-footer {
    padding: 10px 14px;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .modal-body {
    padding: 14px;
}

@media (max-width: 720px) {
    body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .content {
        padding: 14px 12px;
    }

    body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .page-head {
        gap: 8px;
        margin-bottom: 10px;
    }

    body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .page-head h1 {
        font-size: 1.28rem;
    }
}

@media (max-width: 991px) {
    .task-show-page {
        max-width: none;
    }

    .task-show-layout {
        grid-template-columns: 1fr;
    }

    .task-show-sidebar {
        position: static;
    }
}

@media (max-width: 720px) {
    .task-show-head {
        align-items: stretch;
    }

    .task-title-wrap {
        width: 100%;
        text-align: left;
    }

    .task-title-copy {
        flex: 1 1 auto;
    }

    .task-head-actions,
    .task-head-actions .btn {
        width: 100%;
    }

    .task-head-actions {
        justify-content: stretch;
    }

    .task-head-actions .badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 34px;
        width: 100%;
    }

    .task-status-form,
    .task-facts {
        grid-template-columns: 1fr;
    }

    .task-comments-panel .comment-form .btn {
        width: 100%;
    }
}

/* Mobile shell pass: keep content full-width and move navigation out of the reading column. */
@media (max-width: 720px) {
    body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) {
        overflow-x: hidden;
    }

    body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .app-shell {
        display: block;
        min-height: 100vh;
    }

    html.sidebar-expanded .sidebar,
    html.sidebar-collapsed .sidebar,
    .sidebar,
    .sidebar.is-collapsed,
    .sidebar:not(.is-collapsed) {
        inset: auto 0 0 0;
        width: 100%;
        height: 64px;
        min-height: 64px;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        padding: 8px 10px;
        border-top: 1px solid rgba(255, 255, 255, .10);
        border-right: 0;
        box-shadow: 0 -10px 28px rgba(15, 23, 42, .14);
    }

    html.sidebar-expanded .sidebar + .main,
    html.sidebar-collapsed .sidebar + .main,
    .sidebar.is-collapsed + .main,
    .sidebar:not(.is-collapsed) + .main,
    .main {
        width: 100%;
        margin-left: 0;
    }

    .brand,
    html.sidebar-expanded .sidebar .brand,
    html.sidebar-collapsed .sidebar .brand {
        width: 40px;
        height: 44px;
        flex: 0 0 40px;
        justify-content: center;
        margin: 0;
        padding: 0;
    }

    .brand-logo,
    html.sidebar-expanded .sidebar .brand-logo,
    html.sidebar-collapsed .sidebar .brand-logo {
        display: none;
    }

    .brand-icon,
    html.sidebar-expanded .sidebar .brand-icon,
    html.sidebar-collapsed .sidebar .brand-icon {
        display: block;
        width: 30px;
        height: 30px;
    }

    .nav-menu {
        display: flex;
        flex: 1 1 auto;
        min-width: 0;
        gap: 6px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 1px 2px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .nav-menu::-webkit-scrollbar {
        display: none;
    }

    .nav-menu a,
    .sidebar-logout,
    html.sidebar-expanded .sidebar .nav-menu a,
    html.sidebar-expanded .sidebar .sidebar-logout,
    html.sidebar-collapsed .sidebar .nav-menu a,
    html.sidebar-collapsed .sidebar .sidebar-logout {
        width: 42px;
        height: 42px;
        flex: 0 0 42px;
        justify-content: center;
        padding: 0;
    }

    .nav-menu span,
    .sidebar-logout span,
    html.sidebar-expanded .sidebar .nav-menu span,
    html.sidebar-expanded .sidebar .sidebar-logout span,
    html.sidebar-collapsed .sidebar .nav-menu span,
    html.sidebar-collapsed .sidebar .sidebar-logout span {
        display: none;
    }

    .nav-menu i,
    .sidebar-logout i,
    html.sidebar-expanded .sidebar .nav-menu i,
    html.sidebar-expanded .sidebar .sidebar-logout i,
    html.sidebar-collapsed .sidebar .nav-menu i,
    html.sidebar-collapsed .sidebar .sidebar-logout i {
        width: auto;
        flex-basis: auto;
        font-size: 1.08rem;
    }

    .sidebar-footer {
        flex: 0 0 auto;
        margin: 0;
        padding: 0;
    }

    .sidebar-footer form {
        margin: 0;
    }

    .nav-badge,
    html.sidebar-expanded .sidebar .nav-badge,
    html.sidebar-collapsed .sidebar .nav-badge {
        position: absolute;
        top: 3px;
        right: 3px;
        min-width: 16px;
        height: 16px;
        margin: 0;
        padding: 0 4px;
        border-color: #020617;
        font-size: .62rem;
    }

    .topbar {
        height: 60px;
        padding-inline: 12px;
    }

    body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .topbar {
        min-height: 60px;
        padding-inline: 12px;
    }

    .topbar-actions {
        gap: 7px;
    }

    [data-toggle-sidebar] {
        display: none;
    }

    .notification-menu {
        max-width: calc(100vw - 20px);
    }

    body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .content {
        width: 100%;
        padding: 14px 12px 82px;
        max-width: none;
    }

    .page-head {
        align-items: stretch;
        text-align: center;
    }

    .page-head > div:first-child,
    .kanban-head-actions {
        width: 100%;
    }

    .page-head .d-flex,
    .kanban-head-actions {
        justify-content: stretch;
    }

    .page-head > .d-flex {
        display: grid !important;
        width: 100%;
        grid-template-columns: 1fr;
    }

    .page-head .btn,
    .page-head form,
    .page-head > a,
    .kanban-head-actions .btn,
    .kanban-head-actions form {
        width: 100%;
    }

    .kanban-total {
        justify-content: center;
        width: 100%;
    }

    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-responsive .table {
        min-width: 620px;
    }

    .modal-dialog {
        margin: 10px;
    }

    .modal-footer {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .modal-footer .btn,
    .modal-footer form {
        width: 100%;
        margin: 0 !important;
    }

    body.modal-open .sidebar {
        display: none;
    }

    .assignee-actions,
    .public-share-box {
        grid-template-columns: 1fr;
    }

    .assignee-actions {
        display: grid;
        gap: 8px;
    }

    .kanban-board,
    body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .kanban-board {
        min-height: 0;
        gap: 10px;
        padding: 10px;
    }

    .kanban-column,
    .kanban-column.is-collapsed,
    body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .kanban-column {
        width: 100%;
        min-width: 0;
        max-width: none;
        min-height: 0;
        padding: 10px;
    }

    .kanban-column-body {
        min-height: 84px;
    }

    .kanban-empty {
        padding: 16px 10px;
    }

    .kanban-column.is-collapsed .kanban-column-toggle,
    body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .kanban-column-toggle {
        min-height: 38px;
    }

    .public-board-main {
        padding-bottom: 18px;
    }
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .task-stage-group.panel {
    padding: 0;
}

.landing-page {
    min-height: 100vh;
    background: #020617;
    color: #f8fafc;
}

.landing-nav {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 clamp(18px, 4vw, 58px);
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    background: rgba(2, 6, 23, .92);
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: blur(12px);
}

.landing-brand img {
    width: 122px;
    height: auto;
    display: block;
}

.landing-nav nav {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 850;
}

.landing-nav nav > a:not(.btn) {
    color: rgba(248, 250, 252, .72);
}

.landing-nav nav > a:not(.btn):hover,
.landing-nav nav > a:not(.btn):focus {
    color: #fff;
}

.landing-page .btn-primary {
    background: var(--lime);
    border-color: var(--lime);
    color: var(--ink);
}

.landing-page .btn-primary:hover,
.landing-page .btn-primary:focus {
    background: #bef264;
    border-color: #bef264;
    color: var(--ink);
}

.landing-page .btn-outline-secondary {
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .25);
    color: #f8fafc;
}

.landing-page .btn-outline-secondary:hover,
.landing-page .btn-outline-secondary:focus {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .46);
    color: #fff;
}

.landing-hero {
    min-height: calc(100svh - 132px);
    display: grid;
    grid-template-columns: minmax(0, .82fr) minmax(360px, 1.18fr);
    align-items: center;
    gap: clamp(24px, 4vw, 64px);
    padding: clamp(34px, 5vw, 70px) clamp(18px, 4vw, 58px) clamp(42px, 5vw, 72px);
    overflow: hidden;
}

.landing-hero-copy {
    max-width: 620px;
}

.landing-page .eyebrow {
    color: inherit;
}

.landing-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(3rem, 8vw, 7rem);
    line-height: .9;
    font-weight: 920;
    letter-spacing: 0;
    color: #fff;
}

.landing-hero-copy > p:not(.eyebrow) {
    margin: 0;
    max-width: 560px;
    color: rgba(248, 250, 252, .74);
    font-size: clamp(1rem, 1.25vw, 1.18rem);
}

.landing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.landing-proof-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.landing-proof-list span {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 11px;
    color: rgba(248, 250, 252, .86);
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 850;
}

.landing-proof-list i {
    color: var(--lime);
}

.landing-product {
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 8px;
    background: #f8fafc;
    box-shadow: 0 28px 70px rgba(0, 0, 0, .38);
    overflow: hidden;
    color: var(--ink);
}

.landing-product-top {
    min-height: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    background: var(--ink);
    color: #fff;
}

.landing-product-top span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--lime);
}

.landing-product-top strong {
    margin-left: 8px;
    font-size: .86rem;
}

.landing-product-top small {
    margin-left: auto;
    color: rgba(255, 255, 255, .68);
    font-weight: 850;
}

.landing-product-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 14px 14px 0;
}

.landing-product-summary article {
    min-height: 76px;
    padding: 13px;
    background: #fff;
    border: 1px solid rgba(2, 6, 23, .10);
    border-radius: 8px;
}

.landing-product-summary span {
    display: block;
    color: rgba(2, 6, 23, .58);
    font-size: .75rem;
    font-weight: 850;
}

.landing-product-summary strong {
    display: block;
    margin-top: 10px;
    font-size: 1.55rem;
    line-height: 1;
    font-weight: 920;
}

.landing-product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 14px;
}

.landing-product-grid section {
    min-height: 330px;
    padding: 12px;
    background: #fff;
    border: 1px solid rgba(2, 6, 23, .10);
    border-radius: 8px;
}

.landing-product-grid small {
    display: block;
    margin-bottom: 12px;
    color: var(--muted);
    font-weight: 900;
    text-transform: uppercase;
}

.landing-product-grid article {
    display: grid;
    gap: 6px;
    min-height: 104px;
    padding: 12px;
    margin-bottom: 10px;
    background: rgba(163, 230, 53, .11);
    border: 1px solid rgba(163, 230, 53, .42);
    border-radius: 8px;
}

.landing-product-grid article:nth-of-type(even) {
    background: rgba(2, 6, 23, .045);
    border-color: var(--line);
}

.landing-product-grid b {
    font-size: .94rem;
}

.landing-product-grid span {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 760;
}

.landing-product-grid em {
    justify-self: start;
    padding: 3px 7px;
    color: rgba(2, 6, 23, .72);
    background: rgba(2, 6, 23, .055);
    border-radius: 999px;
    font-size: .68rem;
    font-style: normal;
    font-weight: 900;
}

.landing-system,
.landing-band,
.landing-access,
.landing-contact {
    padding: clamp(34px, 5vw, 72px) clamp(18px, 4vw, 58px);
}

.landing-system,
.landing-access,
.landing-contact {
    background: #fff;
    color: var(--ink);
}

.landing-band {
    background: #f8fafc;
    color: var(--ink);
    border-top: 1px solid rgba(2, 6, 23, .08);
    border-bottom: 1px solid rgba(2, 6, 23, .08);
}

.landing-section-head {
    max-width: 760px;
    margin-bottom: 22px;
}

.landing-section-head h2,
.landing-access h2 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    line-height: 1.05;
    font-weight: 900;
}

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

.landing-system-grid article {
    min-height: 180px;
    padding: 20px;
    background: #fff;
    border: 1px solid rgba(2, 6, 23, .10);
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
}

.landing-system-grid span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-bottom: 18px;
    color: var(--ink);
    background: rgba(163, 230, 53, .28);
    border: 1px solid rgba(163, 230, 53, .58);
    border-radius: 8px;
    font-weight: 920;
}

.landing-system-grid h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
    font-weight: 900;
}

.landing-system-grid p {
    margin: 0;
    color: var(--muted);
}

.landing-feature-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.landing-feature-grid article {
    min-height: 190px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.landing-feature-grid i {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    margin-bottom: 18px;
    border-radius: 8px;
    background: var(--ink);
    color: var(--lime);
    font-size: 1.25rem;
}

.landing-feature-grid h3 {
    margin: 0 0 8px;
    font-size: 1.04rem;
    font-weight: 900;
}

.landing-feature-grid p,
.landing-access p {
    margin: 0;
    color: var(--muted);
}

.landing-access {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    background: #020617;
    color: #fff;
    border-top: 1px solid rgba(255, 255, 255, .12);
}

.landing-access p {
    color: rgba(248, 250, 252, .70);
}

.landing-contact {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(320px, .82fr);
    gap: clamp(24px, 5vw, 72px);
    align-items: start;
    background: #f8fafc;
    border-top: 1px solid rgba(2, 6, 23, .08);
}

.landing-contact-copy {
    max-width: 560px;
}

.landing-contact h2 {
    margin: 0 0 14px;
    font-size: clamp(1.55rem, 3vw, 2.25rem);
    line-height: 1.05;
    font-weight: 900;
}

.landing-contact p {
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
}

.landing-contact-card {
    display: grid;
    gap: 22px;
    padding: clamp(22px, 3vw, 32px);
    background: #fff;
    border: 1px solid rgba(2, 6, 23, .12);
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
}

.landing-contact-card article {
    display: grid;
    gap: 5px;
}

.landing-contact-card strong {
    color: var(--ink);
    font-size: .98rem;
    font-weight: 900;
}

.landing-contact-card a {
    color: rgba(2, 6, 23, .74);
    font-size: 1rem;
}

.landing-contact-card a:hover,
.landing-contact-card a:focus {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--lime);
}

.landing-footer {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 24px clamp(18px, 4vw, 58px);
    color: rgba(248, 250, 252, .78);
    background: #18181b;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.landing-footer a {
    color: #f8fafc;
    font-weight: 850;
}

.landing-footer a:hover,
.landing-footer a:focus {
    color: var(--lime);
}

@media (max-width: 980px) {
    .landing-hero,
    .landing-access,
    .landing-contact {
        grid-template-columns: 1fr;
    }

    .landing-product-grid,
    .landing-feature-grid,
    .landing-system-grid {
        grid-template-columns: 1fr 1fr;
    }

    .landing-product-grid section {
        min-height: 240px;
    }
}

@media (max-width: 640px) {
    .landing-nav {
        min-height: 72px;
        align-items: center;
        flex-direction: row;
        padding-block: 0;
    }

    .landing-brand img {
        width: 114px;
    }

    .landing-nav nav {
        width: auto;
        justify-content: flex-end;
        gap: 8px;
        margin-left: auto;
        overflow: visible;
    }

    .landing-nav nav > a:not(.btn) {
        display: none;
    }

    .landing-nav .btn {
        min-height: 40px;
    }

    .landing-hero {
        min-height: 0;
        gap: 24px;
        padding-block: 30px 38px;
    }

    .landing-actions,
    .landing-actions .btn {
        width: 100%;
    }

    .landing-proof-list {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

    .landing-proof-list::-webkit-scrollbar {
        display: none;
    }

    .landing-proof-list span {
        flex: 0 0 auto;
    }

    .landing-product-grid,
    .landing-feature-grid,
    .landing-system-grid {
        grid-template-columns: 1fr;
    }

    .landing-product-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
        padding: 10px;
    }

    .landing-product-summary article {
        min-height: 66px;
        padding: 9px;
    }

    .landing-product-summary span {
        font-size: .66rem;
    }

    .landing-product-summary strong {
        margin-top: 8px;
        font-size: 1.25rem;
    }

    .landing-product-grid {
        display: none;
    }

    .landing-access .btn {
        width: 100%;
    }

    .landing-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

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

.report-card {
    min-height: 210px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
}

.report-icon {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    margin-bottom: 14px;
    border-radius: 8px;
    background: var(--ink);
    color: var(--lime);
    font-size: 1.22rem;
}

.report-card h2 {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 900;
}

.report-card p {
    margin: 0;
    color: var(--muted);
}

.report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.report-preview-panel {
    padding: 0;
    overflow: hidden;
}

.report-preview-panel .panel-head {
    padding: 14px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--line);
}

.report-preview-table {
    max-height: calc(100vh - 230px);
}

.report-preview-table .table {
    min-width: 980px;
}

.report-preview-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}

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

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

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .task-stage-head {
    min-height: 46px;
    padding: 8px 10px;
}

body:not(.auth-page):not(.public-page):not(.bare-page):not(.excalidraw-body) .task-stage-row {
    min-height: 46px;
    padding: 7px 10px;
}

@media (max-width: 1080px) {
    .task-stage-row {
        grid-template-columns: minmax(220px, 1fr) minmax(70px, auto) minmax(86px, auto) minmax(78px, auto) minmax(160px, auto);
    }

    .task-stage-row > .badge:nth-of-type(2) {
        display: none;
    }
}

@media (max-width: 760px) {
    .task-project-picker-head,
    .task-project-select-form {
        grid-template-columns: 1fr;
    }

    .task-project-picker-head {
        display: grid;
    }

    .task-project-picker-head .btn,
    .task-project-select-form .btn {
        width: 100%;
    }

    .task-stage-head {
        align-items: stretch;
        flex-direction: column;
    }

    .task-stage-summary {
        justify-content: flex-start;
    }

    .task-stage-summary .btn {
        flex: 1 1 110px;
    }

    .task-module-head {
        align-items: stretch;
        flex-direction: column;
    }

    .task-module-summary {
        justify-content: flex-start;
    }

    .task-module-summary .btn {
        flex: 1 1 110px;
    }

    .task-stage-row {
        grid-template-columns: 1fr;
        gap: 8px;
        align-items: stretch;
    }

    .task-stage-task a {
        white-space: normal;
    }

    .task-stage-assignees,
    .task-stage-date,
    .task-stage-row > .badge {
        justify-self: start;
    }

    .task-stage-row .task-table-actions {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        justify-content: stretch;
    }

    .task-stage-row .task-table-actions form {
        width: auto;
    }

    .task-stage-row .task-table-actions .btn {
        flex: 1 1 118px;
        width: auto;
    }
}

body.app-action-messages {
    overflow: hidden;
}

body.app-action-messages .app-shell,
body.app-action-messages .main {
    height: 100dvh;
    min-height: 0;
}

body.app-action-messages .content {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - 66px);
    max-width: none;
    padding: 10px 12px;
    overflow: hidden;
}

body.app-action-messages .messages-chat-layout {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    max-height: none;
    margin-bottom: 0 !important;
}

body.app-action-messages .messages-notifications-drawer {
    display: none;
}

body.app-action-messages .project-chat-form textarea.form-control {
    min-height: 44px;
    max-height: 104px;
}

body.app-action-messages .project-chat-list,
body.app-action-messages .messages-project-items {
    overscroll-behavior: contain;
}

.survey-card .project-color {
    background: var(--lime);
}

.survey-builder {
    display: grid;
    gap: 12px;
}

.survey-create-page {
    display: grid;
    gap: 0;
}

.survey-create-actions {
    position: sticky;
    bottom: 14px;
    z-index: 3;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px;
    background: rgba(255, 255, 255, .92);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
}

.survey-detail-head {
    align-items: flex-start;
}

.survey-detail-head h1 {
    margin-bottom: 6px;
}

.survey-detail-head p:not(.eyebrow) {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
}

.survey-detail-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.survey-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.survey-overview-grid article {
    min-height: 96px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.survey-overview-grid span,
.survey-overview-grid small {
    display: block;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 820;
}

.survey-overview-grid strong {
    display: block;
    margin: 4px 0;
    color: var(--ink);
    font-size: 1.55rem;
    font-weight: 930;
    line-height: 1.1;
}

.survey-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 16px;
    align-items: start;
}

.survey-detail-main,
.survey-detail-side {
    display: grid;
    gap: 16px;
}

.survey-detail-side {
    position: sticky;
    top: 84px;
}

.survey-respondent-list {
    display: grid;
    gap: 8px;
}

.survey-respondent-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(150px, auto) auto;
    align-items: center;
    gap: 12px;
    min-height: 72px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.survey-respondent-row:hover {
    border-color: var(--accent-line);
    background: rgba(163, 230, 53, .07);
}

.survey-respondent-avatar {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    background: var(--ink);
    color: #fff;
    font-size: .82rem;
    font-weight: 900;
}

.survey-respondent-person,
.survey-respondent-meta {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.survey-respondent-person strong,
.survey-respondent-meta strong {
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.survey-respondent-person span,
.survey-respondent-meta span {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 760;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.survey-empty-state {
    min-height: 180px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 8px;
    padding: 20px;
    border: 1px dashed var(--line-strong);
    border-radius: 8px;
    text-align: center;
    color: var(--muted);
}

.survey-empty-state i {
    color: var(--lime);
    font-size: 2rem;
}

.survey-empty-state strong {
    color: var(--ink);
}

.survey-question-mini-list {
    display: grid;
    gap: 8px;
}

.survey-question-mini-list article {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    padding: 10px 0;
    border-top: 1px solid rgba(2, 6, 23, .08);
}

.survey-question-mini-list article:first-child {
    border-top: 0;
    padding-top: 0;
}

.survey-question-mini-list b {
    width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(163, 230, 53, .20);
    border: 1px solid rgba(163, 230, 53, .48);
}

.survey-question-mini-list span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.survey-question-mini-list strong {
    color: var(--ink);
    font-size: .88rem;
    line-height: 1.25;
}

.survey-question-mini-list small {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 800;
}

.survey-builder.is-readonly {
    opacity: .82;
}

.survey-builder-head,
.survey-question-top,
.survey-preview-head,
.survey-response-head,
.survey-public-question-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.survey-builder-head h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 880;
}

.survey-add-question-row {
    display: flex;
    justify-content: flex-end;
    padding-top: 2px;
}

.survey-question-list,
.survey-question-preview,
.survey-metric-list,
.survey-response-list,
.survey-public-form {
    display: grid;
    gap: 12px;
}

.survey-question-item,
.survey-preview-question,
.survey-metric-item,
.survey-response-item {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.survey-metric-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.survey-metric-strip div {
    min-height: 72px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(2, 6, 23, .025);
}

.survey-metric-strip span,
.survey-metric-head small,
.survey-response-head small {
    display: block;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 820;
}

.survey-metric-strip strong {
    display: block;
    margin-top: 4px;
    color: var(--ink);
    font-size: 1.25rem;
    font-weight: 920;
}

.survey-metric-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.survey-metric-head strong {
    display: block;
    color: var(--ink);
    font-size: .96rem;
    font-weight: 880;
}

.survey-metric-head > span {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: .8rem;
    font-weight: 850;
}

.survey-progress {
    height: 8px;
    margin: 12px 0;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(2, 6, 23, .08);
}

.survey-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--lime);
}

.survey-progress.is-slim {
    height: 6px;
    margin: 6px 0 0;
}

.survey-question-totals {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.survey-question-totals span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 30px;
    padding: 5px 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    font-size: .8rem;
    font-weight: 790;
}

.survey-question-totals b {
    color: var(--ink);
}

.survey-option-bars {
    display: grid;
    gap: 10px;
}

.survey-option-bar {
    display: grid;
    gap: 2px;
}

.survey-option-bar > div:first-child {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.survey-option-bar span {
    min-width: 0;
    color: var(--ink);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.survey-option-bar strong {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: .8rem;
    font-weight: 850;
}

.survey-option-metrics,
.survey-rating-metrics div {
    display: grid;
    gap: 8px;
}

.survey-option-metrics div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-top: 1px solid rgba(2, 6, 23, .08);
}

.survey-option-metrics span,
.survey-text-samples p {
    min-width: 0;
    margin: 0;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.survey-option-metrics strong,
.survey-rating-metrics strong {
    flex: 0 0 auto;
    font-weight: 880;
}

.survey-rating-metrics > strong {
    display: block;
    margin-bottom: 8px;
}

.survey-rating-metrics div {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.survey-rating-metrics span {
    display: grid;
    gap: 2px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    text-align: center;
    font-weight: 850;
}

.survey-rating-metrics span b {
    color: var(--ink);
    font-size: 1rem;
}

.survey-text-samples {
    display: grid;
    gap: 8px;
}

.survey-text-samples p {
    padding: 10px;
    border-left: 3px solid var(--lime);
    background: rgba(2, 6, 23, .025);
}

.survey-response-modal .modal-header small {
    color: var(--muted);
    font-size: .8rem;
    font-weight: 800;
}

.survey-response-identity {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.survey-response-identity span {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    font-size: .84rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.survey-response-identity i {
    color: var(--muted);
}

.survey-response-readonly {
    display: grid;
    gap: 10px;
}

.survey-response-readonly article {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(2, 6, 23, .018);
}

.survey-response-readonly small {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 830;
}

.survey-response-readonly strong {
    display: block;
    color: var(--ink);
}

.survey-response-readonly p {
    margin: 10px 0 0;
    padding-top: 10px;
    border-top: 1px solid rgba(2, 6, 23, .08);
    color: var(--ink);
    overflow-wrap: anywhere;
}

.survey-question-top {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) minmax(180px, 240px) auto;
}

.survey-question-number {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(163, 230, 53, .20);
    border: 1px solid rgba(163, 230, 53, .48);
    font-weight: 900;
}

.survey-question-order {
    display: inline-flex;
    gap: 4px;
}

.survey-question-order .icon-btn {
    width: 30px;
    height: 30px;
}

.survey-question-order .icon-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.survey-question-options {
    margin-top: 12px;
}

.survey-required-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    color: var(--ink);
    text-transform: none;
    font-size: .86rem;
}

.survey-preview-head {
    align-items: flex-start;
}

.survey-preview-head strong,
.survey-response-head strong {
    color: var(--ink);
    font-size: .96rem;
}

.survey-preview-head span,
.survey-response-head span,
.survey-public-question-head span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 850;
}

.survey-preview-options,
.survey-choice-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.survey-preview-options span,
.survey-choice-list label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(2, 6, 23, .025);
}

.survey-choice-list label {
    cursor: pointer;
}

.survey-choice-list input,
.survey-rating-input input {
    accent-color: var(--ink);
}

.survey-text-preview {
    min-height: 40px;
    margin-top: 12px;
    padding: 10px;
    color: var(--muted);
    border: 1px dashed var(--line-strong);
    border-radius: 8px;
}

.survey-rating-preview,
.survey-rating-input {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.survey-rating-preview span,
.survey-rating-input span {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font-weight: 900;
}

.survey-rating-input label {
    cursor: pointer;
}

.survey-rating-input input {
    position: absolute;
    opacity: 0;
}

.survey-rating-input input:checked + span {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.survey-answer-line {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 12px;
    padding: 9px 0;
    border-top: 1px solid rgba(2, 6, 23, .08);
}

.survey-answer-line span {
    color: var(--muted);
    font-weight: 760;
}

.survey-answer-line strong {
    font-weight: 850;
}

.survey-public-shell {
    min-height: 100vh;
    background: #f8fafc;
}

.survey-public-main {
    width: min(880px, calc(100% - 28px));
    margin: 0 auto;
    padding: 28px 0 44px;
}

.survey-public-head {
    padding-bottom: 18px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.survey-public-head h1 {
    margin: 0 0 10px;
    font-size: clamp(1.7rem, 4vw, 2.6rem);
    font-weight: 900;
}

.survey-public-head p {
    max-width: 720px;
    margin: 0 0 12px;
    color: var(--muted);
}

.survey-public-question h2 {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 880;
}

.survey-respondent-panel,
.survey-public-question {
    box-shadow: none;
}

.survey-public-submit {
    width: 100%;
    min-height: 52px;
}

.survey-public-complete {
    min-height: calc(100vh - 160px);
    display: grid;
    align-content: center;
    justify-items: center;
    text-align: center;
}

.survey-public-complete i {
    color: var(--lime);
    font-size: 3rem;
}

.survey-public-complete h1 {
    margin: 12px 0 8px;
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 900;
}

.survey-public-complete p {
    margin: 0;
    color: var(--muted);
}

.survey-mini-list {
    display: grid;
    gap: 8px;
}

.survey-mini-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 54px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.survey-mini-item:hover {
    border-color: var(--accent-line);
    background: rgba(163, 230, 53, .09);
}

.survey-mini-item span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.survey-mini-item strong,
.survey-mini-item small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.survey-mini-item small {
    color: var(--muted);
}

.survey-mini-item b {
    min-width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(163, 230, 53, .22);
    border: 1px solid rgba(163, 230, 53, .48);
}

@media (max-width: 991px) {
    body.app-action-messages .content {
        height: calc(100dvh - 66px);
        padding: 8px;
    }

    body.app-action-messages .messages-chat-layout {
        height: auto;
        min-height: 0;
    }

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

    .survey-detail-layout {
        grid-template-columns: 1fr;
    }

    .survey-detail-side {
        position: static;
    }

    .survey-response-identity {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .survey-question-top,
    .survey-metric-strip,
    .survey-answer-line {
        grid-template-columns: 1fr;
    }

    .survey-builder-head,
    .survey-preview-head,
    .survey-metric-head,
    .survey-response-head,
    .survey-public-question-head {
        align-items: stretch;
        flex-direction: column;
    }

    .survey-question-top .icon-btn {
        width: 100%;
    }

    .survey-add-question-row .btn {
        width: 100%;
    }

    .survey-create-actions {
        position: static;
        display: grid;
        grid-template-columns: 1fr;
    }

    .survey-detail-actions,
    .survey-detail-actions .btn,
    .survey-respondent-row .btn {
        width: 100%;
    }

    .survey-overview-grid,
    .survey-respondent-row,
    .survey-option-bar > div:first-child {
        grid-template-columns: 1fr;
    }

    .survey-respondent-row {
        align-items: stretch;
    }

    .survey-respondent-meta {
        justify-items: start;
    }

    .survey-rating-metrics div {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
