﻿/* =========================================================
   NHẮC VIỆC
   Clean responsive UI
   Desktop  : Excel-like table
   Mobile   : Task cards
   Scope    : .nv-page
   ========================================================= */

.nv-page {
    /* ---------- Color ---------- */

    --nv-ink: #172033;
    --nv-ink-strong: #111827;
    --nv-text: #344054;
    --nv-muted: #667085;
    --nv-muted-2: #123e68;
    --nv-bg: #f5f7fb;
    --nv-surface: #ffffff;
    --nv-surface-soft: #f8fafc;
    --nv-line: #e4e9f0;
    --nv-line-strong: #d3dae5;
    --nv-blue: #2563eb;
    --nv-blue-dark: #1d4ed8;
    --nv-blue-soft: #eff6ff;
    --nv-green: #059669;
    --nv-green-soft: #ecfdf5;
    --nv-amber: #d97706;
    --nv-amber-soft: #fffbeb;
    --nv-red: #dc2626;
    --nv-red-soft: #fef2f2;
    --nv-purple: #6941c6;
    --nv-purple-soft: #f5f3ff;
    /* ---------- Radius ---------- */

    --nv-radius-sm: 7px;
    --nv-radius-md: 10px;
    --nv-radius-lg: 14px;
    --nv-radius-xl: 18px;
    /* ---------- Shadow ---------- */

    --nv-shadow-sm: 0 2px 6px rgba(15, 23, 42, .04);
    --nv-shadow-md: 0 8px 22px rgba(15, 23, 42, .06);
    /* ---------- Spacing ---------- */

    --nv-space-1: 4px;
    --nv-space-2: 8px;
    --nv-space-3: 12px;
    --nv-space-4: 16px;
    --nv-space-5: 20px;
    --nv-space-6: 24px;
    max-width: 1500px;
    margin: 0 auto;
    padding: 8px 8px 40px;
    color: var(--nv-ink);
}


    /* =========================================================
   RESET
   ========================================================= */

    .nv-page *,
    .nv-page *::before,
    .nv-page *::after {
        box-sizing: border-box;
    }

    .nv-page button,
    .nv-page input,
    .nv-page select,
    .nv-page textarea {
        font: inherit;
    }

    .nv-page button {
        cursor: pointer;
    }

    .nv-page a {
        color: inherit;
    }


/* =========================================================
   COMMON PANEL
   ========================================================= */

.nv-panel,
.nv-workspace {
    border: 1px solid var(--nv-line);
    border-radius: var(--nv-radius-xl);
    background: var(--nv-surface);
    box-shadow: var(--nv-shadow-md);
}


/* =========================================================
   HERO
   ========================================================= */

.nv-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 160px;
    padding: 28px 32px;
    overflow: hidden;
    border-radius: var(--nv-radius-xl);
    background: radial-gradient( circle at 90% 20%, rgba(96, 165, 250, .28), transparent 32% ), linear-gradient( 135deg, #172554, #1e40af 55%, #2563eb );
    color: #fff;
    box-shadow: 0 16px 36px rgba(30, 64, 175, .16);
}

.nv-hero-copy,
.nv-hero-date {
    position: relative;
    z-index: 1;
}

.nv-eyebrow {
    display: block;
    margin-bottom: 7px;
    color: #bfdbfe;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.nv-hero h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -.035em;
}

.nv-hero p {
    max-width: 620px;
    margin: 9px 0 0;
    color: #dbeafe;
    font-size: 14px;
    line-height: 1.5;
}

.nv-hero-date {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 185px;
    padding: 13px 15px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: var(--nv-radius-md);
    background: rgba(15,23,42,.22);
    backdrop-filter: blur(10px);
}

.nv-hero-date-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 10px;
    background: rgba(255,255,255,.13);
    font-size: 17px;
}

.nv-hero-date small,
.nv-hero-date strong {
    display: block;
}

.nv-hero-date small {
    color: #bfdbfe;
    font-size: 10px;
}

.nv-hero-date strong {
    color: #fff;
    font-size: 13px;
}


/* =========================================================
   KPI
   ========================================================= */

.nv-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.nv-stat {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 100px;
    padding: 17px 18px;
    overflow: hidden;
    border: 1px solid var(--nv-line);
    border-radius: var(--nv-radius-lg);
    background: #fff;
    box-shadow: var(--nv-shadow-sm);
    transition: transform .18s ease, box-shadow .18s ease;
}

    .nv-stat:hover {
        transform: translateY(-2px);
        box-shadow: var(--nv-shadow-md);
    }

.nv-stat-icon {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    border-radius: 13px;
    font-size: 21px;
}

.nv-stat-copy {
    min-width: 0;
}

    .nv-stat-copy small,
    .nv-stat-copy strong {
        display: block;
    }

    .nv-stat-copy small {
        margin-bottom: 5px;
        color: var(--nv-muted);
        font-size: 12px;
        font-weight: 750;
    }

    .nv-stat-copy strong {
        color: var(--nv-ink-strong);
        font-size: 28px;
        line-height: 1;
        font-weight: 800;
    }


/* KPI colors */

.nv-stat-blue .nv-stat-icon {
    background: var(--nv-blue-soft);
    color: var(--nv-blue);
}

.nv-stat-amber .nv-stat-icon {
    background: var(--nv-amber-soft);
    color: var(--nv-amber);
}

.nv-stat-red .nv-stat-icon {
    background: var(--nv-red-soft);
    color: var(--nv-red);
}

.nv-stat-green .nv-stat-icon {
    background: var(--nv-green-soft);
    color: var(--nv-green);
}


/* =========================================================
   ALERT
   ========================================================= */

.nv-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px 15px;
    border: 1px solid;
    border-radius: var(--nv-radius-md);
    font-size: 13px;
}

.nv-alert-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 50%;
    color: #fff;
}

.nv-alert-danger {
    border-color: #fecaca;
    background: #fffafa;
    color: #991b1b;
}

    .nv-alert-danger .nv-alert-icon {
        background: var(--nv-red);
    }

.nv-alert-success {
    border-color: #a7f3d0;
    background: #f6fffb;
    color: #047857;
}

    .nv-alert-success .nv-alert-icon {
        background: var(--nv-green);
    }


/* =========================================================
   COMPOSER
   ========================================================= */

.nv-composer {
    padding: 22px;
    margin-bottom: 18px;
}

.nv-section-heading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nv-section-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: var(--nv-blue-soft);
    color: var(--nv-blue);
    font-size: 20px;
}

.nv-section-heading strong {
    display: block;
    color: var(--nv-ink-strong);
    font-size: 16px;
}

.nv-section-heading small {
    display: block;
    margin-top: 2px;
    color: var(--nv-muted);
    font-size: 12px;
}


/* =========================================================
   FORM
   ========================================================= */

.nv-form-grid {
    display: grid;
    grid-template-columns: 1.3fr 1.3fr 1fr .75fr 1.2fr;
    gap: 12px;
    margin-top: 18px;
}

.nv-field {
    min-width: 0;
}

    .nv-field > span {
        display: block;
        margin-bottom: 6px;
        color: var(--nv-text);
        font-size: 12px;
        font-weight: 700;
    }

        .nv-field > span b {
            color: var(--nv-red);
        }


/* ---------- Input ---------- */

.nv-page .form-input {
    width: 100%;
    height: 42px;
    padding: 8px 11px;
    border: 1px solid #d0d7e2;
    border-radius: var(--nv-radius-md);
    background: #fff;
    color: var(--nv-ink);
    font-size: 13px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

    .nv-page .form-input:hover {
        border-color: #b8c3d3;
    }

    .nv-page .form-input:focus {
        border-color: var(--nv-blue);
        box-shadow: 0 0 0 3px rgba(37,99,235,.10);
    }


/* =========================================================
   ATTACHMENT
   ========================================================= */

.nv-page .task-create-actions {
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin-top: 14px;
}

.nv-page .attachment-picker {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    flex: 1;
    padding: 11px 13px;
    border: 1px dashed #c8d5e8;
    border-radius: var(--nv-radius-md);
    background: #f8faff;
}

.nv-page .attachment-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 9px;
    background: #eaf2ff;
    color: var(--nv-blue);
}

.nv-page .attachment-content {
    min-width: 0;
    flex: 1;
}

.nv-page .attachment-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--nv-text);
    font-size: 12px;
    font-weight: 700;
}

    .nv-page .attachment-label em {
        color: var(--nv-muted);
        font-size: 12px;
        font-style: normal;
    }

    .nv-page .attachment-label input[type="file"] {
        max-width: 280px;
        font-size: 12px;
    }

        .nv-page .attachment-label input[type="file"]::file-selector-button {
            margin-right: 7px;
            padding: 5px 9px;
            border: 0;
            border-radius: 6px;
            background: var(--nv-blue-soft);
            color: var(--nv-blue);
            font-weight: 700;
            cursor: pointer;
        }

.nv-page .attachment-picker small {
    display: block;
    margin-top: 5px;
    color: var(--nv-muted);
    font-size: 12px;
}


/* ---------- Selected files ---------- */

.selected-files {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.selected-file {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #fff;
    font-size: 11px;
}

    .selected-file button {
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--nv-red);
        line-height: 1;
    }


/* =========================================================
   BUTTONS
   ========================================================= */

.nv-page .btn-large,
.nv-page .btn-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 15px;
    border-radius: var(--nv-radius-md);
    font-size: 13px;
    font-weight: 700;
    border: 0;
}

.nv-page .task-add-button {
    min-width: 155px;
    background: linear-gradient( 135deg, #2563eb, #1d4ed8 );
    color: #fff;
    box-shadow: 0 5px 13px rgba(37,99,235,.20);
    transition: transform .15s ease, box-shadow .15s ease;
}

    .nv-page .task-add-button:hover:not(:disabled) {
        transform: translateY(-1px);
        box-shadow: 0 8px 18px rgba(37,99,235,.25);
    }

    .nv-page .task-add-button:disabled {
        opacity: .6;
        cursor: wait;
    }


/* =========================================================
   WORKSPACE
   ========================================================= */

.nv-workspace {
    padding: 20px;
}

.nv-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

    .nv-list-header h2 {
        margin: 0;
        color: var(--nv-ink-strong);
        font-size: 19px;
        font-weight: 800;
    }

    .nv-list-header p {
        margin: 3px 0 0;
        color: var(--nv-muted);
        font-size: 11px;
    }

.nv-people-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 11px;
    border: 1px solid #d3dbe7;
    border-radius: 9px;
    background: #fff;
    color: var(--nv-text);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}


/* =========================================================
   TOOLBAR
   ========================================================= */

.nv-page .toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 16px 0;
    padding: 9px;
    border: 1px solid var(--nv-line);
    border-radius: var(--nv-radius-md);
    background: var(--nv-surface-soft);
}

.nv-search {
    position: relative;
    width: min(560px, 100%);
    flex: 1;
}

    .nv-search > span {
        position: absolute;
        left: 11px;
        top: 50%;
        transform: translateY(-50%);
        color: #7b8798;
        font-size: 18px;
        pointer-events: none;
    }

.nv-page .search-box {
    width: 100%;
    height: 38px;
    padding: 0 11px 0 34px;
    border: 1px solid #d4dbe5;
    border-radius: 8px;
    background: #fff;
    color: var(--nv-ink);
    outline: none;
}

.nv-page .hide-done {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    color: var(--nv-text);
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
}

    .nv-page .hide-done input {
        width: 16px;
        height: 16px;
        accent-color: var(--nv-blue);
    }


/* =========================================================
   DESKTOP TASK TABLE
   ========================================================= */

.task-list-desktop {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--nv-line-strong);
    border-radius: 11px;
    background: #fff;
    box-shadow: var(--nv-shadow-sm);
}

.task-table-header,
.task-row {
    display: grid;
    grid-template-columns: 42px minmax(260px, 2.4fr) minmax(120px, 1fr) minmax(115px, .9fr) minmax(150px, 1.2fr) minmax(160px, 1.3fr) 76px;
    min-width: 980px;
}


/* ---------- Header ---------- */

.task-table-header {
    min-height: 42px;
    align-items: center;
    border-bottom: 1px solid var(--nv-line-strong);
    background: #f5f7fa;
    color: #667085;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .04em;
    text-transform: uppercase;
}

    .task-table-header > div {
        min-width: 0;
        padding: 0 10px;
        white-space: nowrap;
    }

    .task-table-header .task-col-check {
        text-align: center;
    }


/* ---------- Row ---------- */

.task-row {
    position: relative;
    min-height: 64px;
    align-items: center;
    border-bottom: 1px solid var(--nv-line);
    background: #fff;
    font-size: 12px;
    transition: background .12s ease, box-shadow .12s ease;
}

    .task-row:last-child {
        border-bottom: 0;
    }

    .task-row:hover {
        background: #f8fbff;
        box-shadow: inset 3px 0 0 var(--nv-blue);
    }

    .task-row > div {
        min-width: 0;
        padding: 8px 10px;
    }


/* ---------- Check ---------- */

.task-col-check {
    display: flex;
    align-items: center;
    justify-content: center;
}

.task-circle {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    padding: 0;
    border: 2px solid #aeb8c7;
    border-radius: 50%;
    background: #fff;
    color: #fff;
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

    .task-circle:hover:not(:disabled) {
        border-color: var(--nv-blue);
        transform: scale(1.04);
    }

    .task-circle.done {
        border-color: var(--nv-green);
        background: var(--nv-green);
    }


/* =========================================================
   TASK MAIN
   ========================================================= */

.task-col-main {
    min-width: 0;
}

.task-title-line {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.task-row .task-title {
    display: block;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: var(--nv-ink);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-row .task-desc {
    display: block;
    margin: 3px 0 0;
    overflow: hidden;
    color: var(--nv-muted);
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nv-repeat {
    display: inline-flex;
    align-items: center;
    padding: 3px 6px;
    border-radius: 999px;
    background: var(--nv-purple-soft);
    color: var(--nv-purple);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}


/* =========================================================
   STATUS
   ========================================================= */

.task-col-status {
    display: flex;
    align-items: center;
}

.nv-status {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 22px;
    padding: 0 7px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 750;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .nv-status.is-overdue {
        background: var(--nv-red-soft);
        color: #b42318;
    }

    .nv-status.is-today {
        background: var(--nv-amber-soft);
        color: #a15c07;
    }

    .nv-status.is-upcoming {
        background: var(--nv-blue-soft);
        color: var(--nv-blue-dark);
    }

    .nv-status.is-done {
        background: var(--nv-green-soft);
        color: #087f5b;
    }


/* =========================================================
   DEADLINE
   ========================================================= */

.task-date {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

    .task-date strong {
        color: var(--nv-muted-2);
        font-size: 10px;
    }

    .task-date small {
        color: var(--nv-text);
        font-size: 12px;
        font-weight: 750;
    }

.task-row.task-overdue .task-date strong {
    color: var(--nv-red);
}


/* =========================================================
   PERSON
   ========================================================= */

.task-person {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.task-person-icon {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    border-radius: 8px;
    background: #f1f5f9;
    font-size: 11px;
}

.task-person > span:last-child {
    min-width: 0;
    overflow: hidden;
    color: #475467;
    font-size: 12px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* =========================================================
   FILES
   ========================================================= */

.task-file-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.task-file-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    min-width: 0;
    padding: 3px 5px;
    border-radius: 8px;
    background: #f8fafc;
}

.task-file-name {
    min-width: 0;
    overflow: hidden;
    color: #475467;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-file-links {
    display: flex;
    gap: 4px;
    flex: 0 0 auto;
}

    .task-file-links a {
        color: var(--nv-blue);
        font-size: 12px;
        font-weight: 700;
        text-decoration: none;
    }

.task-no-file {
    color: var(--nv-muted-2);
    font-size: 12px;
}


/* =========================================================
   ACTIONS
   ========================================================= */

.task-col-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.nv-page .btn-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    margin: 0;
    border: 1px solid transparent;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 700;
    transition: background .12s ease, border-color .12s ease;
}

    .nv-page .btn-small.warning {
        border-color: #cfe0fb;
        background: var(--nv-blue-soft);
        color: var(--nv-blue-dark);
    }

    .nv-page .btn-small.danger {
        border-color: #f5caca;
        background: var(--nv-red-soft);
        color: #c62828;
    }

    .nv-page .btn-small.success {
        background: var(--nv-green);
        color: #fff;
    }

    .nv-page .btn-small.secondary {
        border-color: #d5dbe5;
        background: #fff;
        color: #475467;
    }


/* =========================================================
   DONE / OVERDUE
   ========================================================= */

.task-row.task-done {
    background: #fbfefc;
}

    .task-row.task-done .task-title {
        color: #7b8492;
        text-decoration: line-through;
    }

    .task-row.task-done .task-desc {
        color: #a0a8b4;
    }

.task-row.task-overdue {
    background: #fffdfd;
}


/* =========================================================
   EDIT MODE
   ========================================================= */

.task-row-edit {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
}

    .task-row-edit .nv-field > span {
        margin-bottom: 3px;
        font-size: 9px;
    }

    .task-row-edit .form-input {
        height: 33px;
        padding: 5px 7px;
        font-size: 10px;
    }


/* =========================================================
   MOBILE CARD
   ========================================================= */

.task-grid-mobile {
    display: none;
}

.nv-page .task-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 11px;
    min-width: 0;
    padding: 15px;
    border: 1px solid var(--nv-line);
    border-radius: var(--nv-radius-lg);
    background: #fff;
    box-shadow: var(--nv-shadow-sm);
    transition: transform .15s ease, box-shadow .15s ease;
}

    .nv-page .task-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--nv-shadow-md);
    }

    .nv-page .task-card::before {
        content: "";
        position: absolute;
        left: 0;
        top: 15px;
        bottom: 15px;
        width: 3px;
        border-radius: 0 3px 3px 0;
        background: var(--nv-blue);
    }

    .nv-page .task-card.task-overdue {
        border-color: #f1d2d2;
        background: #fffdfd;
    }

        .nv-page .task-card.task-overdue::before {
            background: var(--nv-red);
        }

    .nv-page .task-card.task-done {
        border-color: #d9ebe2;
        background: #fbfefc;
        opacity: .82;
    }

        .nv-page .task-card.task-done::before {
            background: var(--nv-green);
        }

.nv-page .task-left {
    flex: 0 0 auto;
    padding-top: 2px;
}

.nv-page .task-content {
    min-width: 0;
    flex: 1;
    padding-bottom: 42px;
}

.nv-task-topline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 7px;
}

.nv-page .task-card .task-title {
    margin: 0;
    color: var(--nv-ink);
    font-size: 16px;
    line-height: 1.35;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.nv-page .task-card .task-desc {
    display: -webkit-box;
    margin: 6px 0 0;
    overflow: hidden;
    color: var(--nv-muted);
    font-size: 12px;
    line-height: 1.5;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}


/* ---------- Mobile meta ---------- */

.nv-page .task-meta {
    display: grid;
    grid-template-columns: minmax(120px, .8fr) minmax(150px, 1.2fr);
    gap: 7px;
    margin-top: 12px;
}

    .nv-page .task-meta > span {
        display: flex;
        align-items: center;
        gap: 7px;
        min-width: 0;
        padding: 8px;
        border: 1px solid #edf0f4;
        border-radius: 8px;
        background: #f8fafc;
    }

    .nv-page .task-meta small,
    .nv-page .task-meta b {
        display: block;
    }

    .nv-page .task-meta small {
        color: var(--nv-muted-2);
        font-size: 8px;
        text-transform: uppercase;
    }

    .nv-page .task-meta b {
        min-width: 0;
        overflow: hidden;
        color: #3d4757;
        font-size: 10px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }


/* ---------- Mobile attachments ---------- */

.nv-page .task-attachments {
    display: grid;
    gap: 5px;
    margin-top: 9px;
}

.nv-page .task-attachment {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 8px;
    border: 1px solid #e5eaf1;
    border-radius: 7px;
    background: #f8fafc;
    font-size: 11px;
}

    .nv-page .task-attachment > span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .nv-page .task-attachment a {
        margin-left: 6px;
        color: var(--nv-blue);
        font-weight: 700;
        text-decoration: none;
    }


/* ---------- Mobile actions ---------- */

.nv-page .task-actions {
    position: absolute;
    right: 14px;
    bottom: 12px;
    left: 52px;
    display: flex;
    justify-content: flex-end;
    gap: 5px;
    padding-top: 8px;
    border-top: 1px solid #edf0f4;
}


/* =========================================================
   EMPTY
   ========================================================= */

.nv-empty {
    padding: 50px 20px;
    text-align: center;
    color: var(--nv-muted);
}

    .nv-empty > span {
        display: grid;
        place-items: center;
        width: 55px;
        height: 55px;
        margin: 0 auto 12px;
        border-radius: 50%;
        background: var(--nv-green-soft);
        color: var(--nv-green);
        font-size: 23px;
    }

    .nv-empty h3 {
        margin: 0;
        color: var(--nv-text);
        font-size: 16px;
    }

    .nv-empty p {
        margin: 4px 0 0;
        font-size: 12px;
    }


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) {

    .nv-page {
        padding-left: 6px;
        padding-right: 6px;
    }

    .nv-hero {
        padding: 24px;
    }

    .nv-form-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .nv-stats {
        gap: 12px;
    }

    .task-table-header,
    .task-row {
        grid-template-columns: 40px minmax(230px, 2fr) 110px 105px 135px 145px 72px;
        min-width: 920px;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

    .nv-page {
        padding: 4px 4px 28px;
    }


    /* ---------- Hero ---------- */

    .nv-hero {
        flex-direction: column;
        align-items: flex-start;
        min-height: auto;
        padding: 22px 20px;
        gap: 16px;
    }

        .nv-hero h1 {
            font-size: 29px;
        }

        .nv-hero p {
            font-size: 13px;
        }

    .nv-hero-date {
        width: 100%;
        min-width: 0;
    }


    /* ---------- KPI ---------- */

    .nv-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin: 14px 0;
    }

    .nv-stat {
        min-height: 84px;
        padding: 13px;
        gap: 10px;
        border-radius: 13px;
    }

    .nv-stat-icon {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
        border-radius: 11px;
        font-size: 18px;
    }

    .nv-stat-copy small {
        font-size: 9px;
    }

    .nv-stat-copy strong {
        font-size: 23px;
    }


    /* ---------- Composer ---------- */

    .nv-composer {
        padding: 16px;
        margin-bottom: 14px;
    }

    .nv-form-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 15px;
    }

    .nv-page .form-input {
        height: 42px;
    }

    .nv-page .task-create-actions {
        flex-direction: column;
    }

    .nv-page .attachment-picker {
        width: 100%;
    }

    .nv-page .attachment-label {
        flex-direction: column;
        align-items: flex-start;
    }

        .nv-page .attachment-label input[type="file"] {
            width: 100%;
            max-width: none;
        }

    .nv-page .task-add-button {
        width: 100%;
    }


    /* ---------- Workspace ---------- */

    .nv-workspace {
        padding: 14px;
        border-radius: 14px;
    }

    .nv-list-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

        .nv-list-header h2 {
            font-size: 17px;
        }

    .nv-people-link {
        width: 100%;
        justify-content: center;
    }


    /* ---------- Toolbar ---------- */

    .nv-page .toolbar {
        flex-direction: column;
        align-items: stretch;
        margin: 13px 0;
        padding: 8px;
    }

    .nv-search {
        width: 100%;
    }

    .nv-page .hide-done {
        padding: 2px;
    }


    /* ---------- Table OFF ---------- */

    .task-list-desktop {
        display: none;
    }


    /* ---------- Cards ON ---------- */

    .task-grid-mobile {
        display: grid;
        grid-template-columns: 1fr;
        gap: 11px;
    }


    /* ---------- Card ---------- */

    .nv-page .task-card {
        padding: 14px;
        gap: 9px;
        border-radius: 13px;
    }

        .nv-page .task-card:hover {
            transform: none;
        }

    .nv-page .task-content {
        padding-bottom: 43px;
    }

    .nv-page .task-card .task-title {
        font-size: 15px;
    }

    .nv-page .task-card .task-desc {
        font-size: 11px;
        -webkit-line-clamp: 3;
    }


    /* ---------- Mobile meta ---------- */

    .nv-page .task-meta {
        grid-template-columns: 1fr;
        gap: 6px;
        margin-top: 10px;
    }

        .nv-page .task-meta > span {
            padding: 7px;
        }


    /* ---------- Mobile action ---------- */

    .nv-page .task-actions {
        right: 12px;
        bottom: 10px;
        left: 49px;
    }

    .nv-page .btn-small {
        height: 29px;
        min-height: 29px;
        padding: 0 9px;
        font-size: 10px;
    }


    /* ---------- Attachment ---------- */

    .nv-page .task-attachment {
        align-items: flex-start;
        flex-direction: column;
    }

        .nv-page .task-attachment > div {
            width: 100%;
        }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 420px) {

    .nv-stats {
        gap: 8px;
    }

    .nv-stat {
        padding: 11px;
        gap: 8px;
    }

    .nv-stat-icon {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        font-size: 16px;
    }

    .nv-stat-copy strong {
        font-size: 21px;
    }

    .nv-workspace {
        padding: 12px;
    }

    .nv-page .task-card {
        padding: 13px;
    }

        .nv-page .task-card .task-title {
            font-size: 14px;
        }
}
