* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #f1f5f9;
    --sidebar-bg: #0f172a;
    --sidebar-text: #94a3b8;
    --sidebar-active: #ffffff;
    --sidebar-w: 250px;
    --sidebar-w-collapsed: 68px;
    --topbar-bg: #ffffff;
    --card-bg: #ffffff;
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: #eff6ff;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --success: #10b981;
    --warning: #f59e0b;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.04);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--primary-hover); text-decoration: none; }

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

/* ── Sidebar ── */
.sidebar {
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    border-right: 1px solid rgba(255,255,255,0.04);
    transition: width 0.25s ease;
    overflow: hidden;
    z-index: 60;
}

.sidebar-overlay {
    display: none;
}

.sidebar-header {
    padding: 16px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
}

.sidebar-logo {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.sidebar-logo-img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: contain;
    flex-shrink: 0;
}

.sidebar-brand {
    overflow: hidden;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.sidebar-header h1 {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.3px;
    line-height: 1.2;
}

.sidebar-header .subtitle {
    font-size: 10px;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 1px;
}


.sidebar nav {
    padding: 8px 0;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-section {
    padding: 20px 20px 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.2);
    white-space: nowrap;
    overflow: hidden;
    transition: opacity 0.2s;
}

.nav-section:first-child {
    padding-top: 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 16px;
    margin: 2px 8px;
    border-radius: 8px;
    color: var(--sidebar-text);
    transition: all 0.15s ease;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 400;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
}

.nav-item:hover {
    background: rgba(255,255,255,0.06);
    color: #e2e8f0;
    text-decoration: none;
}

.nav-item.active {
    background: rgba(59, 130, 246, 0.15);
    color: #fff;
    font-weight: 500;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}

.nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.5;
    transition: opacity 0.15s;
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
    opacity: 1;
}

.nav-label {
    transition: opacity 0.2s;
}

/* ── Sidebar collapsed (desktop) ── */
.sidebar-collapsed .sidebar {
    width: var(--sidebar-w-collapsed);
}

.sidebar-collapsed .sidebar-brand,
.sidebar-collapsed .nav-label,
.sidebar-collapsed .nav-section span {
    opacity: 0;
    width: 0;
    overflow: hidden;
    pointer-events: none;
}

.sidebar-collapsed .nav-section {
    padding: 10px 0 4px;
    text-align: center;
    height: 18px;
}

.sidebar-collapsed .nav-section::after {
    content: '';
    display: block;
    width: 24px;
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 0 auto;
}

.sidebar-collapsed .nav-item {
    justify-content: center;
    padding: 10px 0;
    margin: 2px 10px;
    gap: 0;
}

.sidebar-collapsed .nav-icon {
    width: 20px;
    height: 20px;
    opacity: 0.65;
}

.sidebar-collapsed .nav-item.active .nav-icon {
    opacity: 1;
}

.sidebar-collapsed .nav-item.active::before {
    left: -10px;
}

.sidebar-collapsed .sidebar-header {
    padding: 14px 0;
    justify-content: center;
    gap: 0;
}

.sidebar-collapsed .sidebar-logo {
    width: 34px;
    height: 34px;
    font-size: 16px;
}

/* ── Main ── */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* ── Topbar ── */
.topbar {
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 50;
    gap: 12px;
}

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

.topbar-toggle-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.topbar-toggle-btn svg {
    width: 20px;
    height: 20px;
}

.topbar-toggle-btn:hover {
    background: var(--border-light);
    color: var(--text);
}

.toggle-icon-expand { display: none; }
.toggle-icon-collapse { display: block; }

.sidebar-collapsed .toggle-icon-expand { display: block; }
.sidebar-collapsed .toggle-icon-collapse { display: none; }

.topbar-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* ── Content ── */
.content {
    padding: 28px 32px;
    flex: 1;
}

/* ── Cards ── */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
}

.card-header h2 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.1px;
}

/* ── Table ── */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    text-align: left;
    padding: 12px 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 13.5px;
}

.table td:first-child {
    color: var(--text);
    font-weight: 500;
}

.table tbody tr {
    transition: background 0.1s;
}

.table tbody tr:hover {
    background: #f8fafc;
}

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

.table-scroll .table {
    min-width: 900px;
}

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

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

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}

.btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: var(--text);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.25);
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.35);
}

.btn-danger {
    color: var(--danger);
    border-color: #fecaca;
    background: #fff;
}

.btn-danger:hover {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 6px;
}

.btn-icon {
    padding: 6px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover { background: var(--border-light); color: var(--text); }
.btn-icon.icon-edit:hover { color: var(--primary); background: var(--primary-light); }
.btn-icon.icon-toggle:hover { color: var(--warning); background: #fefce8; }
.btn-icon.icon-delete:hover { color: var(--danger); background: #fef2f2; }
.btn-icon.icon-activate:hover { color: var(--success); background: #ecfdf5; }
.btn-icon svg { width: 16px; height: 16px; }

.action-btns {
    display: flex;
    gap: 2px;
    justify-content: flex-end;
}

/* ── Badges ── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
    letter-spacing: 0.1px;
    white-space: nowrap;
}

.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.badge-planejamento { background: #eef2ff; color: #4338ca; }
.badge-planejamento::before { background: #6366f1; }
.badge-em_andamento, .badge-em-andamento { background: #eff6ff; color: #1d4ed8; }
.badge-em_andamento::before, .badge-em-andamento::before { background: #3b82f6; }
.badge-pausado { background: #fefce8; color: #a16207; }
.badge-pausado::before { background: #f59e0b; }
.badge-concluido, .badge-concluida { background: #ecfdf5; color: #047857; }
.badge-concluido::before, .badge-concluida::before { background: #10b981; }
.badge-cancelado { background: #fef2f2; color: #b91c1c; }
.badge-cancelado::before { background: #ef4444; }
.badge-pendente { background: #f8fafc; color: #475569; }
.badge-pendente::before { background: #94a3b8; }
.badge-bloqueada { background: #fef2f2; color: #b91c1c; }
.badge-bloqueada::before { background: #ef4444; }
.badge-revisao { background: #fefce8; color: #a16207; }
.badge-revisao::before { background: #f59e0b; }

/* ── Forms ── */
.form {
    padding: 28px;
    max-width: 720px;
}

.form-group {
    margin-bottom: 20px;
    flex: 1;
    min-width: 0;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: var(--text);
    transition: all 0.15s;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover { border-color: #cbd5e1; }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.form-group textarea { resize: vertical; min-height: 80px; }

.form-row {
    display: flex;
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
    margin-top: 8px;
}

/* ── Projeto info ── */
.projeto-info { padding: 28px; }

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
}

.info-item { display: flex; flex-direction: column; gap: 4px; }

.info-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
}

.info-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.descricao {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 14px;
}

/* ── Progress bar ── */
.progress-bar {
    width: 100px;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #8b5cf6);
    border-radius: 3px;
    transition: width 0.4s ease;
}

.progress-text {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    margin-left: 8px;
}

/* ── Offcanvas ── */
.offcanvas-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(2px);
    z-index: 100;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.offcanvas-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.offcanvas {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 440px;
    max-width: 100%;
    background: #fff;
    box-shadow: var(--shadow-lg);
    z-index: 101;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.offcanvas.show {
    transform: translateX(0);
}

.offcanvas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.offcanvas-header h3 { font-size: 16px; font-weight: 700; }

.offcanvas-close {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.15s;
}

.offcanvas-close:hover { background: var(--border-light); color: var(--text); }

.offcanvas-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.offcanvas-body .form {
    max-width: none;
}

@media (max-width: 480px) {
    .offcanvas { width: 100%; }
}

/* ── Metrics ── */
.metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.metric-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, transform 0.2s;
}

.metric-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.metric-value {
    font-size: 36px;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
    letter-spacing: -1px;
}

.metric-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
    font-weight: 500;
}

.metric-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

/* ── Chart ── */
.chart-container { padding: 24px; }
.chart-container canvas { display: block; width: 100%; }

/* ── Report filters ── */
.report-filters {
    padding: 20px 24px;
}

.filter-row {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 150px;
}

.filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group select,
.filter-group input[type="date"] {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-family: inherit;
    background: #fff;
    color: var(--text);
}

.filter-group select:focus,
.filter-group input[type="date"]:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-check {
    flex-direction: row;
    align-items: center;
    min-width: auto;
}

.filter-check label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
    white-space: nowrap;
    padding-bottom: 2px;
}

.filter-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.filter-actions {
    flex-direction: row;
    gap: 8px;
    min-width: auto;
}

/* ── Report detail rows ── */
.row-detalhe td {
    background: #f8fafc;
    font-size: 12.5px;
    color: var(--text-muted) !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

.row-detalhe td:first-child {
    color: var(--text-secondary) !important;
    font-weight: 400 !important;
}

.detalhe-marker {
    color: var(--text-muted);
    margin-right: 4px;
}

/* ── List toolbar ── */
.list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}

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

.toolbar-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }

.toolbar-select {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-family: inherit;
    background: #fff;
    color: var(--text);
    cursor: pointer;
}

.toolbar-select:focus { outline: none; border-color: var(--primary); }
.toolbar-total { font-size: 13px; color: var(--text-muted); font-weight: 500; }

/* ── Pagination ── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    gap: 12px;
    flex-wrap: wrap;
}

.pagination-info { font-size: 13px; color: var(--text-muted); }

.pagination-btns {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.pagination-dots { padding: 0 4px; color: var(--text-muted); font-size: 13px; }

/* ── Card header count ── */
.card-header-count {
    font-size: 12px;
    font-weight: 700;
    background: var(--primary-light);
    color: var(--primary);
    padding: 2px 10px;
    border-radius: 10px;
}

/* ── View toggle ── */
.view-toggle {
    display: inline-flex;
    background: var(--border-light);
    border-radius: var(--radius);
    padding: 3px;
    margin-right: 12px;
}

.view-btn {
    padding: 5px 14px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.15s;
}

.view-btn:hover { color: var(--text); background: transparent; border: none; }

.view-btn.active {
    background: #fff;
    color: var(--text);
    border: none;
    box-shadow: var(--shadow-sm);
}

/* ── Kanban ── */
.kanban-board {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 16px;
    min-height: calc(100vh - 160px);
    align-items: flex-start;
}

.kanban-col {
    flex: 1;
    min-width: 220px;
    max-width: 320px;
    background: #f8fafc;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
}

.kanban-col-header {
    padding: 14px 16px;
    border-top: 3px solid #94a3b8;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kanban-col-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.kanban-col-count {
    font-size: 11px;
    font-weight: 700;
    background: rgba(0,0,0,0.06);
    padding: 2px 8px;
    border-radius: 10px;
    color: var(--text-muted);
}

.kanban-col-body {
    padding: 8px;
    flex: 1;
    min-height: 80px;
    transition: background 0.15s;
}

.kanban-col-body.drag-over {
    background: rgba(59, 130, 246, 0.06);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.kanban-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 8px;
    cursor: grab;
    transition: box-shadow 0.15s, transform 0.15s, opacity 0.15s;
}

.kanban-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kanban-card.dragging { opacity: 0.4; cursor: grabbing; }

.kanban-card-title {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.35;
    color: var(--text);
}

.kanban-card-title:hover { color: var(--primary); }

.kanban-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.kanban-card-resp {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 55%;
    font-weight: 500;
}

.kanban-card-prazo {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    background: #f1f5f9;
    white-space: nowrap;
    font-weight: 500;
}

.kanban-card-prazo.kanban-prazo-vencido { background: #fef2f2; color: #b91c1c; }
.kanban-card-prazo.kanban-prazo-proximo { background: #fefce8; color: #a16207; }

.kanban-card-progress { display: flex; align-items: center; gap: 8px; }

.kanban-card-progress-bar {
    flex: 1;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.kanban-card-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #8b5cf6);
    border-radius: 2px;
}

.kanban-card-progress-text {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ── Task counters ── */
.task-counter {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 8px;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.task-counter svg { opacity: 0.6; }

/* ── Pricing ── */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.pricing-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.pricing-current {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59,130,246,0.15);
}

.pricing-name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.pricing-price {
    margin-bottom: 16px;
    white-space: nowrap;
}

.pricing-currency {
    font-size: 13px;
    color: var(--text-muted);
    vertical-align: top;
}

.pricing-amount {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.pricing-period {
    font-size: 14px;
    color: var(--text-muted);
}

.pricing-features {
    list-style: none;
    flex: 1;
    margin-bottom: 24px;
}

.pricing-features li {
    padding: 6px 0;
    font-size: 13.5px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pricing-features li::before {
    content: '✓';
    color: var(--success);
    font-weight: 700;
    font-size: 12px;
}

.pricing-features li.pricing-no {
    color: var(--text-muted);
    text-decoration: line-through;
}

.pricing-features li.pricing-no::before {
    content: '—';
    color: var(--text-muted);
}

/* ── Auth pages ── */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--bg);
}

.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-split {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.auth-hero {
    flex: 1;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    position: relative;
    overflow: hidden;
}

.auth-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 80%;
    height: 200%;
    background: radial-gradient(circle, rgba(59,130,246,0.08) 0%, transparent 70%);
}

.auth-hero::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -20%;
    width: 60%;
    height: 150%;
    background: radial-gradient(circle, rgba(139,92,246,0.06) 0%, transparent 70%);
}

.auth-hero-content {
    position: relative;
    z-index: 1;
    max-width: 440px;
}

.auth-hero-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.auth-hero-logo h1 {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.5px;
}

.auth-hero-tagline {
    font-size: 16px;
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 32px;
}

.auth-illustration {
    margin-bottom: 32px;
}

.auth-illustration img,
.auth-illustration svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 20px rgba(0,0,0,0.2));
}

.auth-hero-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #cbd5e1;
    font-size: 14px;
}

.auth-feature svg {
    color: #10b981;
    flex-shrink: 0;
}

.auth-form-side {
    width: 460px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: var(--bg);
}

.auth-form-side .auth-card {
    width: 100%;
    max-width: 400px;
}

.auth-mobile-logo {
    display: none;
    margin: 0 auto 16px;
}

.auth-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.auth-header {
    text-align: center;
    padding: 32px 32px 0;
}

.auth-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 14px;
}

.auth-form {
    padding: 24px 32px 24px;
}

.auth-footer-text {
    text-align: center;
    padding: 0 32px 24px;
    font-size: 11px;
    color: var(--text-muted);
}

.auth-footer-text a {
    color: var(--text-secondary);
}

.auth-erro {
    background: #fef2f2;
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    margin-bottom: 16px;
}

@media (max-width: 900px) {
    .auth-hero { display: none; }
    .auth-form-side { width: 100%; padding: 20px; }
    .auth-mobile-logo { display: flex; }
    .auth-split { min-height: 100vh; justify-content: center; align-items: center; }
}

/* ── Empresa selector ── */
.empresa-list {
    padding: 8px 16px 16px;
}

.empresa-option {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    cursor: pointer;
    transition: all 0.15s;
    margin-bottom: 8px;
    text-align: left;
}

.empresa-option:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.empresa-option-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    flex-shrink: 0;
}

.empresa-option-info {
    flex: 1;
    min-width: 0;
}

.empresa-option-nome {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.empresa-option-arrow {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.empresa-option:hover .empresa-option-arrow {
    color: var(--primary);
}

/* ── Empresa switch link ── */
.empresa-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: rgba(255,255,255,0.45) !important;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    transition: color 0.15s;
    text-decoration: none !important;
}

.empresa-switch:hover {
    color: rgba(255,255,255,0.8) !important;
}

/* ── Sidebar user ── */
.sidebar-user {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.2);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    transition: opacity 0.2s;
}

.user-name {
    font-size: 13px;
    font-weight: 500;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 11px;
    color: var(--sidebar-text);
    text-transform: capitalize;
}

.user-logout {
    color: var(--sidebar-text);
    padding: 4px;
    border-radius: 6px;
    transition: all 0.15s;
    flex-shrink: 0;
    display: flex;
}

.user-logout svg {
    width: 16px;
    height: 16px;
}

.user-logout:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.sidebar-collapsed .user-info {
    opacity: 0;
    width: 0;
    pointer-events: none;
}

.sidebar-collapsed .user-logout {
    display: none;
}

.sidebar-collapsed .sidebar-user {
    justify-content: center;
    padding: 12px 6px;
}

/* ── Footer ── */
.app-footer {
    padding: 16px 32px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

.app-footer a {
    color: var(--text-secondary);
    font-weight: 500;
}

.app-footer a:hover {
    color: var(--primary);
}

/* ── Impedimento icon ── */
.impedimento-icon {
    color: var(--danger);
    margin-left: 6px;
    vertical-align: middle;
    display: inline-flex;
}

/* ── Topbar search & icons ── */
.topbar-search {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--border-light);
    border-radius: var(--radius);
    padding: 6px 12px;
    border: 1px solid transparent;
    transition: all 0.15s;
}

.topbar-search:focus-within {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.topbar-search svg { color: var(--text-muted); flex-shrink: 0; }

.topbar-search input {
    border: none;
    background: none;
    outline: none;
    font-size: 13px;
    width: 160px;
    color: var(--text);
    font-family: inherit;
}

.topbar-icon-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    color: var(--text-muted);
    transition: all 0.15s;
}

.topbar-icon-btn svg { width: 18px; height: 18px; }
.topbar-icon-btn:hover { background: var(--border-light); color: var(--text); }

.topbar-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--primary);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.topbar-badge.badge-alert { background: var(--danger); }
.topbar-alert { color: var(--danger); }

.alertas-dropdown {
    display: none;
    position: absolute;
    top: 56px;
    right: 0;
    width: 300px;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    z-index: 100;
    overflow: hidden;
}

.alertas-dropdown.show { display: block; }

.alertas-title {
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.alerta-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 16px;
    font-size: 13px;
    color: var(--text);
    border-bottom: 1px solid var(--border-light);
    transition: background 0.1s;
}

.alerta-item:hover { background: #f8fafc; }
.alerta-nome { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alerta-prazo { color: var(--danger); font-weight: 600; font-size: 12px; margin-left: 8px; }

/* ── Task detail ── */
.task-detail-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: start;
}

/* ── Comments ── */
.comments-section { padding: 0; }

.comment {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.comment-body { flex: 1; min-width: 0; }

.comment-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 13px;
}

.comment-meta strong { color: var(--text); }
.comment-meta span { color: var(--text-muted); font-size: 12px; }
.comment-text { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

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

.comment-form {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    align-items: flex-end;
}

.comment-form textarea {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    min-height: 40px;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* ── Attachments ── */
.attachments-section { padding: 12px 16px; }

.upload-area { margin-bottom: 12px; }

.attachment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}

.attachment-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    color: var(--text-secondary);
    font-size: 13px;
}

.attachment-info span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-info svg { color: var(--text-muted); flex-shrink: 0; }
.attachment-info:hover { color: var(--primary); }

/* ── Search page ── */
.search-form-page {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.search-form-page input {
    flex: 1;
    padding: 12px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
    background: #fff;
}

.search-form-page input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.search-summary {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

/* ── Activity feed ── */
.activity-feed { padding: 0; }

.activity-item {
    display: flex;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-light);
    align-items: flex-start;
}

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    margin-top: 6px;
    flex-shrink: 0;
}

.dot-tarefa { background: #3b82f6; }
.dot-comentario { background: #8b5cf6; }
.dot-anexo { background: #f59e0b; }
.dot-projeto { background: #10b981; }

.activity-content { flex: 1; }
.activity-text { font-size: 14px; color: var(--text-secondary); line-height: 1.5; }
.activity-text strong { color: var(--text); }
.activity-time { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ── Gantt ── */
.gantt-wrapper {
    overflow: hidden;
}

.gantt-header-print {
    display: none;
}

.gantt-container {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card-bg);
    box-shadow: var(--shadow-sm);
}

.gantt-table {
    border-collapse: collapse;
    table-layout: fixed;
}

.gantt-table th {
    position: sticky;
    top: 0;
    background: #f8fafc;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 0;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    z-index: 2;
}

.gantt-col-task { width: 200px; min-width: 200px; padding: 12px 16px !important; }
.gantt-col-resp { width: 120px; min-width: 120px; padding: 12px 10px !important; }
.gantt-col-dates { width: 60px; min-width: 60px; padding: 12px 8px !important; text-align: center; }
.gantt-col-pct { width: 45px; min-width: 45px; padding: 12px 8px !important; text-align: center; }
.gantt-col-timeline { padding: 0 !important; vertical-align: bottom; }

.gantt-row td {
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
    vertical-align: middle;
}

.gantt-cell-task {
    padding: 10px 16px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.gantt-cell-resp {
    padding: 10px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gantt-cell-date {
    padding: 10px 8px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
}

.gantt-cell-pct {
    padding: 10px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-secondary);
}

.gantt-cell-timeline {
    padding: 0 !important;
    height: 40px;
}

.gantt-bar-area {
    position: relative;
    height: 40px;
    display: flex;
}

.gantt-bg-col {
    height: 100%;
    border-right: 1px solid var(--border-light);
    flex-shrink: 0;
}

.gantt-bg-col.weekend {
    background: #f8fafc;
}

.gantt-bg-col.today {
    background: rgba(59, 130, 246, 0.06);
    border-right-color: rgba(59, 130, 246, 0.15);
}

/* Timeline header */
.gantt-timeline-grid {
    display: flex;
    flex-direction: column;
}

.gantt-months {
    display: flex;
    border-bottom: 1px solid var(--border);
}

.gantt-month {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 8px 8px 4px;
    border-right: 1px solid var(--border);
    white-space: nowrap;
    overflow: hidden;
}

.gantt-days {
    display: flex;
}

.gantt-day {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-muted);
    padding: 4px 0 6px;
    text-align: center;
    border-right: 1px solid var(--border-light);
    flex-shrink: 0;
}

.gantt-day.weekend {
    color: #cbd5e1;
    background: #f8fafc;
}

.gantt-day.today {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    font-weight: 700;
}

/* Bars */
.gantt-bar {
    position: absolute;
    top: 10px;
    height: 20px;
    border-radius: 4px;
    opacity: 0.85;
    transition: opacity 0.15s;
    overflow: hidden;
    z-index: 1;
}

.gantt-bar:hover {
    opacity: 1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.gantt-bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: rgba(255,255,255,0.3);
    border-radius: 4px 0 0 4px;
}

.gantt-bar-label {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Legend */
.gantt-legend {
    display: flex;
    gap: 20px;
    padding: 16px 0;
    flex-wrap: wrap;
}

.gantt-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.gantt-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

/* ── Print ── */
@media print {
    body { background: #fff; }
    .sidebar, .sidebar-overlay, .topbar, .app-footer { display: none !important; }
    .layout { display: block; }
    .main { width: 100%; }
    .content { padding: 0; }
    .gantt-header-print { display: block; margin-bottom: 16px; }
    .gantt-header-print h1 { font-size: 18px; font-weight: 700; }
    .gantt-header-print p { font-size: 12px; color: #666; }
    .gantt-container { border: 1px solid #ddd; box-shadow: none; overflow: visible; }
    .gantt-bar { opacity: 1; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .gantt-bg-col.weekend { background: #f5f5f5; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .gantt-bg-col.today { background: transparent; border-right-color: #ddd; }
    .gantt-day.today { background: transparent; color: inherit; font-weight: 500; }
    .gantt-legend { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .gantt-legend-color { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .topbar-actions { display: none !important; }
}

@page {
    size: landscape;
    margin: 10mm;
}

/* ── Row inativo ── */
.row-inativo { opacity: 0.5; }
.row-inativo:hover { opacity: 0.75; }

/* ── Toast ── */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    border-radius: var(--radius);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    z-index: 200;
    animation: toastIn 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }

@keyframes toastIn {
    from { transform: translateY(16px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ══════════════════════════════
   RESPONSIVE
   ══════════════════════════════ */

/* Tablet */
@media (max-width: 1024px) {
    .content { padding: 24px 20px; }
    .topbar { padding: 0 20px; }
    .table th, .table td { padding: 12px 14px; }
    .form { padding: 24px 20px; }
    .projeto-info { padding: 24px 20px; }
    .card-header { padding: 16px 20px; }
    .metrics { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: var(--sidebar-w);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 70;
    }

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

    .sidebar-open .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 65;
    }

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

    .sidebar-collapsed .sidebar-brand,
    .sidebar-collapsed .nav-label,
    .sidebar-collapsed .nav-section span {
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar-collapsed .nav-section { padding: 20px 20px 6px; text-align: left; height: auto; }
    .sidebar-collapsed .nav-section::after { display: none; }
    .sidebar-collapsed .nav-item { justify-content: flex-start; padding: 9px 16px; margin: 2px 8px; }

    .toggle-icon-collapse { display: none !important; }
    .toggle-icon-expand { display: block !important; }

    .content { padding: 20px 16px; }
    .topbar { padding: 0 16px; }

    .metrics { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .metric-card { padding: 16px; }
    .metric-value { font-size: 28px; }
    .metric-icon { width: 36px; height: 36px; top: 14px; right: 14px; }

    .form-row { flex-direction: column; gap: 0; }
    .form { padding: 20px 16px; }

    .list-toolbar { flex-direction: column; align-items: flex-start; gap: 8px; }

    .topbar-search { display: none; }
    .view-toggle { margin-right: 8px; }
    .topbar-actions { gap: 6px; }
    .task-detail-grid { grid-template-columns: 1fr; }

    .kanban-board { min-height: auto; }
    .kanban-col { min-width: 260px; }

    .info-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }

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

/* Small mobile */
@media (max-width: 480px) {
    .metrics { grid-template-columns: 1fr; }
    .info-grid { grid-template-columns: 1fr; }

    .table th:nth-child(n+5),
    .table td:nth-child(n+5) { display: none; }

    .topbar-title { font-size: 16px; }
    .btn { padding: 8px 14px; font-size: 12px; }
    .btn-primary { font-size: 12px; }
}
