:root {
    --bg: #f7f9fc;
    --surface: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --soft: #94a3b8;
    --primary: #4f7df3;
    --border: #e2e8f0;
    --line: #eef2f7;
    --orange: #f59e0b;
    --green: #35b879;
    --red: #ef6a6a;
    --purple: #8b7cf6;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 14px/1.45 Inter, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
    text-decoration: none;
}

.app-shell {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    min-height: 100vh;
    overflow-y: auto;
    padding: 22px 16px 18px;
    background: var(--surface);
    border-right: 1px solid var(--line);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 9px;
    background: var(--primary);
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(79, 125, 243, .25);
}

.brand strong {
    font-size: 15px;
}

.brand small,
.user-card small {
    display: block;
    margin-top: 2px;
    color: var(--soft);
    font-size: 11px;
}

.brand-sidebar {
    padding: 4px 8px 28px;
}

.nav-label {
    display: block;
    margin: 8px 10px;
    color: var(--soft);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.nav-item:hover,
.nav-item.active {
    background: #eaf0ff;
    color: var(--primary);
}

.nav-item svg,
.nav-item .lucide {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke-width: 2;
}

.mobile-bottom a svg,
.mobile-bottom a .lucide {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    stroke-width: 2;
}

.nav-item b {
    margin-left: auto;
    padding: 1px 7px;
    border-radius: 20px;
    background: #eef2f7;
    font-size: 11px;
}

.nav-item.active b {
    background: #fff;
}

.sidebar-spacer {
    flex: 1;
}

.user-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fbfcfe;
    color: var(--text);
    text-align: left;
}

button.user-card {
    cursor: pointer;
}

button.user-card:hover,
button.user-card[aria-expanded="true"] {
    border-color: #d4def8;
    background: #f4f7ff;
}

.user-menu {
    position: relative;
}

.user-menu-chevron {
    margin-left: auto;
    color: var(--soft);
    font-size: 18px;
    line-height: 1;
}

.user-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 4;
    display: none;
    min-width: 150px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .12);
}

.user-menu-panel.is-open {
    display: block;
}

.user-menu-panel a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.user-menu-panel a:hover {
    background: #f4f7ff;
    color: var(--primary);
}

.user-card strong {
    font-size: 12px;
}

.avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a5b4fc, #818cf8);
    color: #fff;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}

.avatar-small {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
    font-size: 10px;
}

.main-content {
    width: 100%;
    min-width: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    min-height: 68px;
    padding: 12px 36px;
    border-bottom: 1px solid var(--line);
    background: rgba(247, 249, 252, .96);
}

.topbar-title {
    min-width: 0;
}

.topbar h1 {
    margin: 0;
    font-size: 20px;
    letter-spacing: -.02em;
}

.topbar-user {
    flex: 0 0 auto;
    margin-left: auto;
}

.topbar .user-card {
    width: auto;
    min-width: 190px;
}

.page-content {
    max-width: 1360px;
    margin: 0 auto;
    padding: 28px 36px 80px;
}

.page-head,
.section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.page-head {
    margin-bottom: 26px;
}

h1,
h2,
p {
    margin: 0;
}

.page-head h1 {
    font-size: 28px;
    letter-spacing: -.02em;
}

.page-head p,
.section-head p {
    margin-top: 4px;
    color: var(--muted);
}

.head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-btn,
.btn {
    border: 0;
    cursor: pointer;
}

.icon-btn {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    color: var(--muted);
    font-size: 20px;
}

.icon-btn:hover {
    background: #f3f5fa;
}

.btn {
    min-height: 36px;
    padding: 8px 13px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 3px 8px rgba(79, 125, 243, .22);
}

.btn-primary:hover {
    background: #4069df;
}

.btn-secondary {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--muted);
}

.btn-danger {
    background: #fdecec;
    color: #c93b3b;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 26px;
}

.summary-card,
.section-panel {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.summary-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 18px 20px;
}

.summary-card span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.summary-card strong {
    display: block;
    margin-top: 13px;
    font-size: 30px;
    line-height: 1;
}


.charts-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr);
    gap: 16px;
}

.chart-panel {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

a.summary-card {
    color: inherit;
}

a.summary-card:hover {
    border-color: #d4def8;
    box-shadow: 0 5px 14px rgba(15, 23, 42, .08);
    transform: translateY(-1px);
}

.chart-box {
    position: relative;
    height: 280px;
    padding: 8px 20px 20px;
}

.chart-box-donut {
    height: 230px;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 0 22px 20px;
    color: var(--muted);
    font-size: 12px;
}

.chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.chart-legend b {
    color: var(--text);
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.legend-dot.pending {
    background: var(--orange);
}

.legend-dot.progress {
    background: var(--primary);
}

.legend-dot.done {
    background: var(--green);
}

.summary-card i {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    font-size: 18px;
    font-style: normal;
}

.tone-orange {
    background: #fff5dd;
    color: var(--orange);
}

.tone-blue {
    background: #eaf0ff;
    color: var(--primary);
}

.tone-purple {
    background: #f0edfe;
    color: var(--purple);
}

.tone-green {
    background: #e8f8f1;
    color: var(--green);
}

.tone-red {
    background: #fdecec;
    color: var(--red);
}

.section-panel {
    overflow: visible;
}

.section-head {
    padding: 20px 22px 14px;
}

.section-head h2 {
    font-size: 18px;
}

.tabs {
    display: flex;
    gap: 22px;
    padding: 0 22px;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
}

.tab {
    padding: 10px 0 11px;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    white-space: nowrap;
    font-size: 13px;
}

.tab.active {
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 700;
}

.tab b {
    margin-left: 4px;
    padding: 1px 6px;
    border-radius: 20px;
    background: #eef2f7;
    font-size: 11px;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    border-bottom: 1px solid var(--line);
}

.search-field {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 220px;
    max-width: 340px;
    flex: 1;
    height: 36px;
    padding: 0 12px;
    border-radius: 9px;
    background: #f3f5fa;
    color: var(--soft);
}

.search-field input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
}

.filters select,
.actions-menu select {
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    color: var(--muted);
}

.task-table {
    width: 100%;
}

.table-head,
.task-row {
    display: grid;
    grid-template-columns: minmax(135px, 0.85fr) minmax(235px, 1.45fr) 110px 120px 160px 130px 42px;
    align-items: center;
    gap: 14px;
    padding: 12px 22px;
}

.task-client {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-head {
    color: var(--soft);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.task-row {
    position: relative;
    min-height: 72px;
    border-top: 1px solid var(--line);
    cursor: pointer;
}

.task-row:hover {
    background: #fafbfd;
}

.users-panel {
    overflow: hidden;
}

.users-table-head,
.user-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.2fr) minmax(190px, 1fr) 145px 145px;
    align-items: center;
    gap: 16px;
    padding: 12px 22px;
}

.users-table-head {
    color: var(--soft);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.user-row {
    min-height: 66px;
    border-top: 1px solid var(--line);
    color: inherit;
}

.user-row:hover {
    background: #fafbfd;
}

.clientes-table-head,
.cliente-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.3fr) minmax(140px, 1fr) minmax(160px, 1.1fr) 130px 100px;
    align-items: center;
    gap: 16px;
    padding: 12px 22px;
}

.clientes-table-head {
    color: var(--soft);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.cliente-row {
    min-height: 66px;
    border-top: 1px solid var(--line);
    color: inherit;
}

.cliente-row:hover {
    background: #fafbfd;
}

.user-row strong,
.user-row small {
    display: block;
}

.user-row strong {
    font-size: 13px;
}

.user-row small,
.user-row time {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.profile-chip {
    display: inline-block;
    width: fit-content;
    padding: 4px 8px;
    border-radius: 6px;
    background: #f1f5f9;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.profile-admin {
    background: #eaf0ff;
    color: var(--primary);
}

.drawer-kicker {
    display: block;
    margin-bottom: 4px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.user-edit-form {
    display: grid;
    gap: 16px;
    margin-top: 22px;
}

.user-edit-form label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.user-edit-form label small {
    color: var(--soft);
    font-size: 11px;
    font-weight: 400;
}

.user-edit-form input,
.user-edit-form select {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 9px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
}

.user-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 20;
    background: rgba(15, 23, 42, .28);
}

.user-drawer {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    width: min(500px, 100%);
    height: 100%;
    background: #fff;
    box-shadow: -12px 0 32px rgba(15, 23, 42, .14);
}

@media (max-width: 860px) {
    .users-table-head,
    .clientes-table-head {
        display: none;
    }

    .user-row,
    .cliente-row {
        grid-template-columns: 1fr auto;
        gap: 7px 12px;
        padding: 14px 16px;
    }

    .user-row>.user-cell-name,
    .user-row>.user-cell-email,
    .user-row>time,
    .cliente-row>.cliente-cell-name,
    .cliente-row>.cliente-cell-cnpj,
    .cliente-row>.cliente-cell-email,
    .cliente-row>.cliente-cell-phone {
        grid-column: 1;
    }

    .user-row>.profile-chip,
    .cliente-row>.cliente-cell-status {
        grid-column: 2;
    }

    .user-row>.profile-chip,
    .cliente-row>.cliente-cell-status {
        grid-row: 1;
        align-self: start;
    }

    .user-row>.user-cell-email,
    .cliente-row>.cliente-cell-email,
    .cliente-row>.cliente-cell-phone {
        display: block;
        grid-column: 1 / -1;
        color: var(--muted);
        font-size: 12px;
    }

    .user-row>time {
        margin-top: 0;
    }

    .user-drawer {
        width: 100%;
    }
}

.task-main strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
}

.task-row .task-main small {
    display: none;
}

.task-id {
    display: block;
    margin-bottom: 3px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
}

.task-row.is-done .task-main strong {
    color: var(--soft);
    text-decoration: line-through;
}

.chip {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.priority-baixa {
    background: #f1f5f9;
    color: #64748b;
}

.priority-media,
.status-andamento {
    background: #eaf0ff;
    color: var(--primary);
}

.priority-alta,
.status-pendente {
    background: #fff5dd;
    color: #b47408;
}

.priority-urgente {
    background: #fdecec;
    color: #c93b3b;
}

.status-concluida {
    background: #e8f8f1;
    color: #1f8a56;
}

.assignee {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
}

.task-row time {
    color: var(--muted);
    font-size: 12px;
}

.row-actions {
    display: none;
}

.drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 20;
    background: rgba(15, 23, 42, .28);
}

.drawer {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    width: min(500px, 100%);
    height: 100%;
    background: #fff;
    box-shadow: -12px 0 32px rgba(15, 23, 42, .14);
}

.drawer-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 24px;
    border-bottom: 1px solid var(--line);
}

.drawer-head h2 {
    margin-top: 4px;
    font-size: 20px;
}

.drawer-body {
    overflow-y: auto;
    padding: 24px;
}

.drawer-section {
    padding: 0 0 24px;
    border-bottom: 1px solid var(--line);
}

.drawer-section+.drawer-section {
    padding-top: 24px;
}

.drawer-section h3 {
    margin: 0 0 12px;
    color: var(--text);
    font-size: 14px;
}

.drawer-section h4 {
    margin: 22px 0 10px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.drawer-client {
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 13px;
}

.drawer-client strong {
    color: var(--text);
    font-weight: 600;
}

.drawer-description {
    color: var(--muted);
    white-space: pre-wrap;
}

.drawer-fields {
    display: grid;
    gap: 12px;
}

.drawer-fields form,
.drawer-comment {
    display: grid;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.drawer-fields label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.drawer-fields select,
.drawer-comment textarea {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 9px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
}

.drawer-comment textarea {
    resize: vertical;
}

.drawer-meta,
.drawer-empty {
    color: var(--muted);
    font-size: 12px;
}

.drawer-history {
    display: grid;
    gap: 0;
    position: relative;
    padding-left: 10px;
}

.activity-item {
    position: relative;
    display: flex;
    gap: 12px;
    padding: 0 0 18px 16px;
}

.activity-item:not(:last-child)::before {
    position: absolute;
    top: 10px;
    bottom: 0;
    left: 3px;
    width: 1px;
    background: var(--border);
    content: '';
}

.activity-marker {
    position: absolute;
    top: 3px;
    left: 0;
    width: 7px;
    height: 7px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

.activity-content {
    min-width: 0;
}

.activity-content p {
    margin: 4px 0;
    color: var(--muted);
    font-size: 12px;
}

.activity-change {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.activity-change span {
    padding: 2px 6px;
    border-radius: 4px;
    background: #f4f6fa;
    color: var(--text);
    font-size: 11px;
}

.activity-change b {
    color: var(--soft);
    font-weight: 500;
}

.activity-content small {
    color: var(--soft);
    font-size: 11px;
}

.drawer-delete {
    margin-top: 24px;
}

@media (max-width: 860px) {
    .drawer {
        width: 100%;
    }

    .drawer-head,
    .drawer-body {
        padding: 20px;
    }
}

.row-actions summary {
    cursor: pointer;
    color: var(--soft);
    font-size: 22px;
    list-style: none;
}

.row-actions summary::-webkit-details-marker {
    display: none;
}

.actions-menu {
    position: absolute;
    right: 18px;
    z-index: 3;
    display: grid;
    gap: 8px;
    min-width: 220px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .1);
}

.actions-menu form {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.actions-menu textarea {
    width: 100%;
    min-height: 50px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 7px;
    resize: vertical;
}

.actions-menu .btn {
    padding: 6px 9px;
    font-size: 11px;
}

.feedback {
    margin: 14px 22px 0;
    padding: 10px 12px;
    border-radius: 8px;
}

.feedback p+p {
    margin-top: 4px;
}

.feedback-error {
    background: #fdecec;
    color: #991b1b;
}

.feedback-success {
    background: #e8f8f1;
    color: #166534;
}

.empty-state {
    padding: 48px 22px;
    text-align: center;
    color: var(--soft);
}

.mobile-bottom {
    display: none;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: none;
    place-items: center;
    padding: 16px;
    background: rgba(15, 23, 42, .32);
}

.modal-backdrop.is-open {
    display: grid;
}

.modal {
    width: min(520px, 100%);
    padding: 24px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .1);
}

.modal h2 {
    font-size: 20px;
}

.modal>p {
    margin: 4px 0 20px;
    color: var(--muted);
}

.modal label {
    display: block;
    margin-bottom: 15px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.field-error {
    display: block;
    margin-top: 6px;
    color: #b42318;
    font-size: 12px;
    font-weight: 500;
}

.modal input,
.modal select,
.modal textarea {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 9px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: 0;
    color: var(--text);
}

.modal textarea {
    resize: vertical;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.modal footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 4px;
}

.modal-close {
    float: right;
    border: 0;
    background: transparent;
    color: var(--soft);
    font-size: 24px;
    cursor: pointer;
}

@media (max-width: 860px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        display: none;
    }

    .topbar {
        display: flex;
        justify-content: flex-end;
        min-height: 61px;
        padding: 10px 14px;
        background: rgba(247, 249, 252, .98);
    }

    .topbar h1 {
        font-size: 18px;
    }

    .topbar .user-card {
        min-width: 0;
        max-width: 210px;
        padding: 7px;
    }

    .topbar .user-card small {
        display: none;
    }

    .page-content {
        padding: 18px 14px 92px;
    }

    .page-head {
        margin-bottom: 18px;
    }

    .page-head h1 {
        font-size: 22px;
    }

    .head-actions {
        display: none;
    }

    .summary-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-bottom: 18px;
    }

    .summary-card {
        padding: 14px;
    }

    .summary-card strong {
        font-size: 24px;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .chart-box {
        height: 240px;
    }

    .chart-box-donut {
        height: 220px;
    }

    .section-head {
        padding: 16px 16px 12px;
    }

    .tabs {
        padding: 0 16px;
        gap: 18px;
    }

    .filters {
        padding: 12px 16px;
    }

    .search-field {
        max-width: none;
        flex-basis: 100%;
    }

    .table-head {
        display: none;
    }

    .task-row {
        grid-template-columns: 1fr 34px;
        gap: 8px;
        padding: 14px 16px;
    }

    .task-row > .task-client,
    .task-row > .chip,
    .task-row > .assignee,
    .task-row > time {
        grid-column: 1;
    }

    .task-row>.chip {
        display: inline-block;
        width: max-content;
    }

    .task-row>.assignee,
    .task-row>time {
        margin-top: 2px;
    }

    .row-actions {
        grid-column: 2;
        grid-row: 1 / span 4;
    }

    .mobile-bottom {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 5;
        display: flex;
        align-items: center;
        justify-content: space-around;
        padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
        border-top: 1px solid var(--line);
        background: #fff;
    }

    .mobile-bottom a {
        display: flex;
        flex: 1;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        color: var(--soft);
        font-size: 10px;
    }

    .mobile-bottom a.active {
        color: var(--primary);
    }

    .mobile-fab {
        width: 48px;
        height: 48px;
        margin-top: -22px;
        border: 0;
        border-radius: 14px;
        background: var(--primary);
        color: #fff;
        font-size: 26px;
        box-shadow: 0 8px 20px rgba(79, 125, 243, .35);
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

.drawer-id {
    display: block;
    margin-bottom: 5px;
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .02em;
}

.login-page {
    min-height: 100vh;
    background: radial-gradient(circle at top, #edf3ff 0, var(--bg) 42%, #eef2f7 100%);
}

.login-shell {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 32px 16px;
}

.login-card {
    width: min(420px, 100%);
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 18px 45px rgba(15, 23, 42, .09);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 34px;
}

.login-brand strong {
    display: block;
    font-size: 15px;
}

.login-brand small {
    display: block;
    margin-top: 2px;
    color: var(--soft);
    font-size: 11px;
}

.login-header {
    margin-bottom: 24px;
}

.login-header h1 {
    font-size: 26px;
    letter-spacing: -.02em;
}

.login-header p {
    margin-top: 5px;
    color: var(--muted);
}

.login-feedback {
    margin-bottom: 18px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
}

.login-feedback p+p {
    margin-top: 4px;
}

.login-feedback-success {
    background: #e8f8f1;
    color: #166534;
}

.login-feedback-error {
    background: #fdecec;
    color: #991b1b;
}

.login-form {
    display: grid;
    gap: 17px;
}

.login-field label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.login-field input {
    display: block;
    width: 100%;
    height: 42px;
    padding: 9px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: 0;
    color: var(--text);
}

.login-field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 125, 243, .12);
}

.login-submit {
    width: 100%;
    margin-top: 4px;
}