/* ═════════════════════════════════════════════════════════════════════
   GESTOR DE TAREFAS v2.0 — VIVIAN COSER ARQUITETOS ASSOCIADOS
   Design system: clean white + green, Inter font
   ═════════════════════════════════════════════════════════════════════ */

/* ─── RESET & BASE ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --vc-green: #3A5C55;
    --vc-green-dark: #2E4A44;
    --vc-green-light: #4A7068;
    --vc-green-soft: #E8F0EE;
    --vc-green-ghost: #F3F7F6;
    --vc-gold: #C9A96E;
    --vc-gold-light: #F5EDDD;
    --text: #1E293B;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    --bg: #F8FAF9;
    --surface: #FFFFFF;
    --surface-hover: #F1F5F9;
    --border: #E2E8F0;
    --border-light: #EDF2F7;
    --border-input: #CBD5E1;
    --primary: #3A5C55;
    --primary-hover: #2E4A44;
    --success: #059669;
    --success-soft: #D1FAE5;
    --warning: #D97706;
    --warning-soft: #FFF7ED;
    --danger: #DC2626;
    --danger-hover: #B91C1C;
    --danger-soft: #FEF2F2;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 4px 12px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.04);
}

html { font-size: 15px; }
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
}

/* ─── LAYOUT BASE (SIDEBAR) ───────────────────────────────────────────── */
body { display: flex; }

/* ─── SIDEBAR ──────────────────────────────────────────────────────────── */
.sidebar {
    width: 250px;
    min-width: 250px;
    height: 100vh;
    position: sticky;
    top: 0;
    left: 0;
    background: linear-gradient(180deg, var(--vc-green-dark) 0%, var(--vc-green) 100%);
    display: flex;
    flex-direction: column;
    z-index: 100;
    box-shadow: 2px 0 16px rgba(0,0,0,0.15);
    overflow-y: auto;
}

/* Brand */
.sidebar-brand {
    padding: 1.5rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.sidebar-logo {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}
.sidebar-brand-text { display: flex; flex-direction: column; }
.sidebar-brand-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
    letter-spacing: -0.2px;
    line-height: 1.1;
}
.sidebar-brand-sub {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.5);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 500;
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: 0.75rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.sidebar-section-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,0.35);
    font-weight: 600;
    padding: 0.85rem 0.6rem 0.35rem;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.65rem;
    border-radius: var(--radius-xs);
    text-decoration: none;
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.15s;
    border: 1px solid transparent;
}
.sidebar-link svg { 
    flex-shrink: 0; 
    opacity: 0.7;
    transition: opacity 0.15s;
}
.sidebar-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}
.sidebar-link:hover svg { opacity: 1; }
.sidebar-link.active {
    color: #fff;
    background: rgba(255,255,255,0.18);
    font-weight: 600;
    border-color: rgba(255,255,255,0.12);
}
.sidebar-link.active svg { opacity: 1; }

/* Link especial: Minhas Tarefas */
.sidebar-link-timer {
    font-weight: 600;
}
/* Link especial: Relatorios */
.sidebar-link-relatorio {
    color: rgba(255,223,0,0.9);
}
.sidebar-link-relatorio:hover {
    color: #FFD700;
    background: rgba(255,223,0,0.1);
}
.sidebar-link-relatorio.active {
    color: #FFD700;
    background: rgba(255,223,0,0.15);
}

/* Footer / User switcher */
.sidebar-footer {
    padding: 0.75rem 0.75rem 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.sidebar-user-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}
.sidebar-user-select {
    flex: 1;
    padding: 0.4rem 0.5rem;
    border-radius: var(--radius-xs);
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.85);
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    min-width: 0;
}
.sidebar-user-select:focus { 
    outline: none; 
    border-color: rgba(255,255,255,0.4); 
}
.sidebar-user-select option { 
    color: var(--text); 
    background: #fff; 
}

/* ─── MAIN CONTENT ─────────────────────────────────────────────────────── */
#app { 
    flex: 1;
    min-width: 0;
    padding: 1.5rem 2rem;
    overflow-x: hidden;
}
.view { display: none; width: 100%; }
.view.active { display: block; width: 100%; }

/* ─── PAGE HEADER ───────────────────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}
.page-header h1 { font-size: 1.5rem; font-weight: 700; color: var(--text); }
.page-header h2 { font-size: 1.2rem; font-weight: 600; color: var(--text); }

/* ─── FILTROS BAR ───────────────────────────────────────────────────────── */
.filtros-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.filtros-bar input,
.filtros-bar select {
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-input);
    background: var(--surface);
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s;
}
.filtros-bar input:focus,
.filtros-bar select:focus {
    outline: none;
    border-color: var(--vc-green);
}

/* ─── BUTTONS ───────────────────────────────────────────────────────────── */
.btn {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    border: none;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.btn-primary { background: var(--vc-green); color: #fff; }
.btn-primary:hover { background: var(--vc-green-dark); }
.btn-secondary { 
    background: var(--surface); 
    color: var(--text); 
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { background: var(--surface-hover); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--text); background: var(--surface-hover); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { opacity: 0.9; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-hover); }
.btn-danger-outline {
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
}
.btn-danger-outline:hover { background: var(--danger-soft); }
.btn-sm { padding: 0.3rem 0.65rem; font-size: 0.78rem; }

/* ─── CARDS ─────────────────────────────────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: all 0.15s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}
.card:hover { box-shadow: var(--shadow); border-color: var(--border); }
.card-projeto { cursor: pointer; }
.card-body { flex: 1; }
.card-body h4 { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 0.35rem; }
.card-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    align-items: center;
    margin-top: 0.5rem;
}
.card-obs { font-style: italic; color: var(--text-secondary); max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-actions {
    display: flex;
    gap: 0.35rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-light);
    justify-content: flex-end;
}
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

/* ─── DASHBOARD ─────────────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 1.5rem 1.25rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.stat-value { font-size: 2rem; font-weight: 700; color: var(--vc-green); }
.stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }

.dash-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.dash-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

/* ═══ DASHBOARD REDESIGN ═══ */
.page-subtitle { color: var(--vc-muted); font-size: 0.875rem; margin-top: -0.5rem; margin-bottom: 1.25rem; }

/* Stat Cards Row */
.dash-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.dash-stat-card {
    background: var(--vc-surface);
    border: 1px solid var(--vc-border);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s;
}
.dash-stat-card.clickable { cursor: pointer; }
.dash-stat-card.clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: var(--vc-green);
}
.dash-stat-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dash-stat-body { display: flex; flex-direction: column; }
.dash-stat-num { font-size: 1.75rem; font-weight: 700; color: var(--vc-text); line-height: 1.1; }
.dash-stat-label { font-size: 0.8rem; color: var(--vc-muted); margin-top: 2px; }

/* Bar List (substitui badge-list) */
.bar-list { display: flex; flex-direction: column; gap: 0.5rem; }
.bar-item { }
.bar-label { display: flex; justify-content: space-between; font-size: 0.8rem; margin-bottom: 3px; color: var(--vc-text); }
.bar-label strong { color: var(--vc-green); }
.bar-track { height: 6px; background: var(--vc-bg); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--vc-green); border-radius: 3px; transition: width 0.6s ease; min-width: 4px; }

/* Horas */
.horas-display { display: flex; gap: 1.5rem; margin-bottom: 0.75rem; }
.horas-item { text-align: center; }
.horas-num { font-size: 2rem; font-weight: 700; display: block; }
.horas-unit { font-size: 0.75rem; color: var(--vc-muted); }
.horas-item.realizadas .horas-num { color: var(--vc-green); }
.horas-item.estimadas .horas-num { color: var(--vc-accent-blue, #3498DB); }
.horas-bar-wrapper { height: 8px; background: var(--vc-bg); border-radius: 4px; overflow: hidden; margin-top: 0.25rem; }
.horas-bar { height: 100%; border-radius: 4px; transition: width 0.8s ease; }

/* ═══ PRAZOS ═══ */
.prazos-display { display: flex; gap: 2rem; margin-bottom: 0.75rem; }
.prazos-item { text-align: center; }
.prazos-num { font-size: 2rem; font-weight: 700; display: block; }
.prazos-label { font-size: 0.75rem; color: var(--vc-muted); }
.prazos-item.no-prazo .prazos-num { color: #27AE60; }
.prazos-item.atrasados .prazos-num { color: #E74C3C; }
.prazos-bar-wrapper { 
    display: flex; height: 10px; border-radius: 5px; overflow: hidden;
    background: var(--vc-bg);
}
.prazos-bar-ok { height: 100%; background: #27AE60; transition: width 0.8s ease; }
.prazos-bar-atraso { height: 100%; background: #E74C3C; transition: width 0.8s ease; }

/* ═══ TENDENCIA ═══ */
.dash-tendencia { font-size: 0.72rem; font-weight: 600; margin-left: 4px; }
.tend-up { color: #27AE60; }
.tend-down { color: #E74C3C; }


/* Urgent Tasks */
.dash-urgent { margin: 1rem 0; background: #FFFBF0; border: 1px solid #F0D060; border-radius: 12px; overflow: hidden; }
.dash-urgent-header { padding: 0.75rem 1rem; background: #FFF3CD; }
.dash-urgent-header h3 { margin:0; font-size:0.9rem; color:#856404; }
.dash-urgent-body { padding: 0.5rem 1rem; }
.urgent-group { margin-bottom: 0.5rem; }
.urgent-label { font-size: 0.8rem; font-weight: 600; margin-bottom: 0.3rem; }
.urgent-label.vencida { color: #C0392B; }
.urgent-label.vencendo { color: #D4AC0D; }
.urgent-item { 
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.5rem 0.75rem; border-radius: 8px; cursor: pointer;
    transition: background 0.15s;
}
.urgent-item:hover { background: #FEF9E7; }
.urgent-titulo { font-size: 0.85rem; font-weight: 500; color: var(--vc-text); max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.urgent-meta { font-size: 0.72rem; color: var(--vc-muted); max-width: 35%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.urgent-more { font-size: 0.75rem; color: var(--vc-muted); padding: 0.25rem 0.75rem; }

.dash-card h3 { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: 0.6px; }
.horas-display { display: flex; gap: 1.5rem; }
.horas-num { font-size: 1.5rem; font-weight: 700; color: var(--text); display: block; }
.horas-unit { font-size: 0.8rem; color: var(--text-secondary); }
.badge-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.badge {
    padding: 0.25rem 0.6rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
}
.badge-projeto { background: var(--vc-green-soft); color: var(--vc-green); }
.badge-etapa { background: var(--success-soft); color: var(--success); }

/* ─── PROJETO META ──────────────────────────────────────────────────────── */
.projeto-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
}
.projeto-meta strong { color: var(--text); }

/* ─── STATUS TAGS ───────────────────────────────────────────────────────── */
.status-tag {
    padding: 0.2rem 0.55rem;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}
.status-em-andamento { background: var(--warning-soft); color: #B45309; }
.status-concluido { background: var(--success-soft); color: #047857; }
.status-suspenso { background: #F1F5F9; color: #64748B; }
.status-cancelado { background: var(--danger-soft); color: #B91C1C; }
.status-planejada { background: #F1F5F9; color: #64748B; }
.status-concluida { background: var(--success-soft); color: #047857; }

/* ─── PRIORIDADE ────────────────────────────────────────────────────────── */
.prioridade {
    padding: 0.15rem 0.5rem;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 600;
}
.prioridade-baixa { background: #F1F5F9; color: #64748B; }
.prioridade-media { background: var(--warning-soft); color: #B45309; }
.prioridade-alta { background: var(--danger-soft); color: #B91C1C; }

.prioridade-tag {
    padding: 0.15rem 0.5rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
}
.prioridade-alta { background: var(--danger-soft); color: #B91C1C; }
.prioridade-media { background: var(--warning-soft); color: #B45309; }
.prioridade-baixa { background: #F1F5F9; color: #64748B; }

/* ─── PROGRESSO ─────────────────────────────────────────────────────────── */
.progresso-bar {
    height: 6px;
    background: #F1F5F9;
    border-radius: 3px;
    overflow: hidden;
}
.progresso-fill {
    height: 100%;
    background: var(--vc-green);
    border-radius: 3px;
    transition: width 0.3s;
}

/* ─── TABLE ─────────────────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }
.tarefas-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.tarefas-table th {
    text-align: left;
    padding: 0.6rem 0.75rem;
    border-bottom: 2px solid var(--border);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    background: var(--vc-green-ghost);
}
.tarefas-table td {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
    color: var(--text-secondary);
}
.tarefas-table tr:hover { background: var(--vc-green-ghost); }
.row-concluida { opacity: 0.5; }
.titulo-cell { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acao-cell { white-space: nowrap; text-align: right; }
.link-cell { color: var(--vc-green); text-decoration: none; cursor: pointer; font-weight: 500; }
.link-cell:hover { text-decoration: underline; color: var(--vc-green-dark); }

/* ─── EMPTY STATE ───────────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}
.empty-state p { margin-bottom: 1rem; }

/* ─── MODAIS ────────────────────────────────────────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.5);
    backdrop-filter: blur(4px);
    z-index: 200;
    align-items: center;
    justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    width: 90%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}
.modal-sm { max-width: 400px; }
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
}
.modal-header h3 { font-size: 1.05rem; font-weight: 600; color: var(--text); }
.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 1.25rem; }
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-light);
}

/* ─── FORM ──────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-input);
    background: var(--surface);
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--vc-green);
}
.form-group textarea { resize: vertical; }
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 600px) {
    .form-row { grid-template-columns: 1fr; }
}

/* ─── TOAST ─────────────────────────────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    background: var(--text);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 300;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.25s;
    pointer-events: none;
    box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-error { background: var(--danger); }
.toast-success { background: var(--success); }

/* ─── TIMER BAR ─────────────────────────────────────────────────────────── */
.timer-bar {
    background: var(--vc-green);
    color: #fff;
    padding: 0.5rem 2rem;
    position: sticky;
    top: 0;
    z-index: 99;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.timer-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 100%;
}
.timer-bar-left { display: flex; align-items: center; gap: 0.6rem; }
.timer-dot {
    width: 8px; height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: pulse-dot 1.5s infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.timer-label { font-weight: 600; font-size: 0.85rem; }
.timer-project { font-size: 0.78rem; opacity: 0.8; }
.timer-bar-center { }
.timer-clock { font-size: 1.1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.timer-bar-right { }

/* ─── MINHAS TAREFAS (timer.js) ─────────────────────────────────────────── */
#view-minhas-tarefas .page-header h1 { font-size: 1.4rem; }

.mt-capacity-wrapper {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.mt-capacity {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}
.mt-capacity-label { font-weight: 600; font-size: 0.78rem; color: var(--text-secondary); white-space: nowrap; }
.mt-capacity-bar {
    flex: 1;
    height: 8px;
    background: #F1F5F9;
    border-radius: 100px;
    overflow: hidden;
}
.mt-capacity-fill {
    height: 100%;
    background: var(--vc-green);
    border-radius: 100px;
    transition: width 0.4s ease;
}
.mt-capacity-fill.overload { background: var(--danger); }
.mt-capacity-pct { font-weight: 700; font-size: 0.85rem; color: var(--vc-green); white-space: nowrap; }
.mt-capacity-text { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; display: block; margin-top: 0.25rem; }

.mt-lista {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mt-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-left: 3px solid transparent;
    border-radius: var(--radius-sm);
    transition: all 0.15s;
    box-shadow: var(--shadow-sm);
    margin-bottom: 0.5rem;
}
.mt-card:hover {
    border-left-color: var(--vc-green);
    box-shadow: var(--shadow);
    border-color: var(--border);
}
.mt-card.timer-active {
    border-left-color: var(--vc-green);
    background: var(--vc-green-ghost);
}
.mt-card.prioridade-alta { border-left-color: var(--danger); }
.mt-card.prioridade-media { border-left-color: var(--vc-gold); }
.mt-card.prioridade-baixa { /* default */ }

.mt-play-btn {
    width: 34px; height: 34px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: transparent;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    flex-shrink: 0;
    color: var(--vc-green);
    font-family: inherit;
    padding: 0;
    line-height: 1;
}
.mt-play-btn:hover { background: var(--vc-green-soft); border-color: var(--vc-green); }
.mt-play-btn.running { background: var(--vc-green); color: #fff; border-color: var(--vc-green); animation: pulse-play 2s infinite; }

@keyframes pulse-play {
    0%, 100% { box-shadow: 0 0 0 0 rgba(58,92,85,0.3); }
    50% { box-shadow: 0 0 0 8px rgba(58,92,85,0); }
}

.mt-card-body { flex: 1; min-width: 0; }
.mt-card-titulo {
    font-weight: 600; font-size: 0.85rem; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-bottom: 3px;
}
.mt-card-meta {
    display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap;
    font-size: 0.72rem; color: var(--text-muted);
}
.projeto-link { color: var(--vc-green); font-weight: 500; }

.mt-card-tempo { text-align: right; flex-shrink: 0; }
.mt-tempo-total { font-weight: 600; font-size: 0.85rem; color: var(--text); }
.mt-tempo-label { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* ─── TIMESHEET ────────────────────────────────────────────────────────── */
.timesheet-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.timesheet-table th {
    text-align: left;
    padding: 0.6rem 0.75rem;
    border-bottom: 2px solid var(--border);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--vc-green-ghost);
}
.timesheet-table td {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid var(--border-light);
}
.timesheet-table tr:hover { background: var(--vc-green-ghost); }
.tempo-cell { font-weight: 600; }

/* ─── RESPONSIVE ────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .dash-row { grid-template-columns: 1fr 1fr; }
    .card-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

@media (max-width: 768px) {
    .sidebar { width: 190px; min-width: 190px; }
    .sidebar-brand-name { font-size: 0.75rem; }
    .sidebar-brand-sub { display: none; }
    .sidebar-link { font-size: 0.75rem; padding: 0.45rem 0.45rem; gap: 0.45rem; }
    .sidebar-link svg { width: 15px; height: 15px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .dash-row { grid-template-columns: 1fr; }
    .dash-stats-row { grid-template-columns: repeat(2, 1fr); }
    #app { padding: 1rem; }
}

@media (max-width: 500px) {
    .sidebar { width: 140px; min-width: 140px; }
    .sidebar-brand { padding: 1rem 0.75rem 0.75rem; }
    .sidebar-brand-text { display: none; }
    .sidebar-logo { width: 30px; height: 30px; }
    .sidebar-link { font-size: 0.68rem; padding: 0.4rem 0.35rem; gap: 0.3rem; }
    .sidebar-link svg { width: 14px; height: 14px; }
    .sidebar-section-label { font-size: 0.55rem; padding-left: 0.35rem; }
    .sidebar-footer { padding: 0.5rem; }
    .sidebar-user-avatar { display: none; }
    #app { padding: 0.75rem; }
}

@media (max-width: 500px) {
    .stats-grid { grid-template-columns: 1fr; }
    .card-grid { grid-template-columns: 1fr; }
}

/* ─── CHECKLIST (Subtarefas) ───────────────────────────────────────────── */
.sub-lista { list-style: none; margin-top: 0.5rem; }
.sub-item {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.85rem;
}
.sub-item:last-child { border-bottom: none; }
.sub-check {
    width: 18px; height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.65rem;
    transition: all 0.15s;
    color: transparent;
    background: transparent;
    padding: 0;
}
.sub-check.concluida { background: var(--vc-green); border-color: var(--vc-green); color: #fff; }
.sub-check:hover { border-color: var(--vc-green); }
.sub-titulo { flex: 1; }
.sub-titulo.concluida { text-decoration: line-through; color: var(--text-muted); }
.sub-remover {
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; font-size: 1rem; padding: 0 0.2rem; line-height: 1;
}
.sub-remover:hover { color: var(--danger); }
.sub-add-form { display: flex; gap: 0.4rem; margin-top: 0.5rem; }
.sub-add-form input {
    flex: 1;
    padding: 0.35rem 0.6rem;
    border-radius: var(--radius-xs);
    border: 1px solid var(--border-input);
    font-size: 0.82rem;
    font-family: inherit;
}
.sub-add-form input:focus { outline: none; border-color: var(--vc-green); }
.sub-add-form button {
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-xs);
    background: var(--vc-green);
    color: #fff;
    border: none;
    font-size: 0.82rem;
    cursor: pointer;
    font-weight: 600;
}

/* ─── CONFIRM MODAL ─────────────────────────────────────────────────────── */
#confirm-msg { font-size: 0.95rem; color: var(--text); }

/* ═════════════════════════════════════════════════════════════════════
   GESTÃO DE TAREFAS (VIEW UNIFICADA)
   ═════════════════════════════════════════════════════════════════════ */

/* ─── HEADER COUNTER ───────────────────────────────────────────────────── */
.header-counter {
    background: var(--vc-green-soft);
    color: var(--vc-green);
    padding: 0.3rem 0.75rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ─── FILTROS ──────────────────────────────────────────────────────────── */
.gt-filters {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.gt-filters-top {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.gt-search {
    flex: 1;
    min-width: 220px;
    padding: 0.55rem 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-input);
    background: var(--surface);
    color: var(--text);
    font-size: 0.875rem;
    font-family: inherit;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s;
}
.gt-search:focus { outline: none; border-color: var(--vc-green); }

.gt-date-range {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}
.gt-date-range input {
    width: 120px;
    padding: 0.55rem 0.7rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-input);
    background: var(--surface);
    color: var(--text);
    font-size: 0.85rem;
    font-family: inherit;
    box-shadow: var(--shadow-sm);
}
.gt-date-range input:focus { outline: none; border-color: var(--vc-green); }

.btn-dots {
    background: var(--surface);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.7rem;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
    transition: all 0.15s;
    line-height: 1;
}
.btn-dots:hover { background: var(--surface-hover); border-color: var(--border); }
.btn-dots.open { background: var(--vc-green-soft); border-color: var(--vc-green); color: var(--vc-green); }

/* ─── FILTROS AVANÇADOS ───────────────────────────────────────────────── */
.gt-filters-advanced {
    display: none;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 0;
}
.gt-filters-advanced.open { display: flex; }

.gt-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.gt-filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-start;
}

/* ─── MULTI-SELECT DROPDOWN ────────────────────────────────────────────── */
.gt-multi-select {
    position: relative;
    min-width: 160px;
}

.gt-ms-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-input);
    background: var(--surface);
    color: var(--text);
    font-size: 0.8rem;
    cursor: pointer;
    font-family: inherit;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s;
    white-space: nowrap;
    min-width: 140px;
}
.gt-ms-trigger:hover { border-color: var(--vc-green); }
.gt-ms-trigger.open { border-color: var(--vc-green); background: var(--vc-green-ghost); }

.gt-ms-text {
    flex: 1;
    text-align: left;
}

.gt-ms-arrow {
    font-size: 0.7rem;
    color: var(--text-muted);
    transition: transform 0.2s;
}
.gt-ms-trigger.open .gt-ms-arrow { transform: rotate(180deg); }

/* ─── FILTER TAGS (CHIPS) ─────────────────────────────────────────────── */
.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.5rem;
    border-radius: 100px;
    background: var(--vc-green-soft);
    color: var(--vc-green);
    font-size: 0.72rem;
    font-weight: 500;
}
.filter-tag-remove {
    background: none;
    border: none;
    color: var(--vc-green);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.15s;
}
.filter-tag-remove:hover { opacity: 1; }

/* ─── GT TABLE (GESTÃO DE TAREFAS) ────────────────────────────────────── */
.gt-sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: background 0.15s;
}
.gt-sortable:hover { background: var(--vc-green-ghost); }
.gt-sort-icon {
    font-size: 0.6rem;
    color: var(--vc-green);
    margin-left: 2px;
}

.gt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.gt-table thead th {
    text-align: left;
    padding: 0.55rem 0.6rem;
    border-bottom: 2px solid var(--border);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    background: var(--vc-green-ghost);
}

.gt-check {
    width: 28px;
    text-align: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: color 0.15s;
}
.gt-check:hover { color: var(--vc-green); }
.gt-check.selected { color: var(--vc-green); font-weight: 700; }

.gt-row {
    transition: background 0.1s;
}
.gt-row td {
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
    vertical-align: middle;
}
.gt-row:hover td { background: var(--vc-green-ghost); }
.gt-row.selected td { background: var(--vc-green-soft); }
.gt-row.row-concluida td { opacity: 0.45; }

.gt-titulo {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
}
.gt-titulo:hover { color: var(--vc-green); }

.gt-projeto {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--vc-green);
    font-weight: 500;
}

.gt-etapa {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gt-dias {
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}
.gt-dias.vencido { color: var(--danger); }
.gt-dias.hoje { color: var(--warning); }
.gt-dias.futuro { color: var(--text-muted); }

.gt-data {
    white-space: nowrap;
    font-size: 0.8rem;
}

.gt-horas {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.gt-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--vc-green-soft);
    color: var(--vc-green);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* ─── GT EDITABLE ─────────────────────────────────────────────────────── */
.gt-editable {
    cursor: pointer;
    border-radius: 4px;
    padding: 2px 4px;
    margin: -2px -4px;
    transition: background 0.15s;
}
.gt-editable:hover { background: var(--vc-green-ghost); }
.gt-editable.editing { background: var(--vc-green-soft); outline: 1px solid var(--vc-green); }

/* ─── GT CONTEXT MENU ─────────────────────────────────────────────────── */
.gt-context-menu {
    display: none;
    position: absolute;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    z-index: 9999;
    padding: 6px;
    min-width: 200px;
    animation: menuFadeIn 0.15s ease;
}
@keyframes menuFadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.gt-context-menu.open { display: block; }

.gt-context-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 0.875rem;
    cursor: pointer;
    border-radius: 7px;
    transition: background 0.12s;
    text-align: left;
}
.gt-context-menu button:hover { background: var(--hover); }
.gt-context-menu button svg { flex-shrink: 0; opacity: 0.55; }
.gt-context-menu .menu-item:hover { background: var(--vc-green-ghost); }
.gt-context-menu .menu-item.danger { color: var(--danger); }

/* ─── GT DATA VENCIDA ─────────────────────────────────────────────────── */
.gt-vencida, .gt-vencida .gt-editable { color: var(--danger) !important; font-weight: 600; }

/* ─── GT ACTIONS (BUTTON ROW ABOVE TABLE) ─────────────────────────────── */
.gt-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

/* ─── GT SELECTION BAR ────────────────────────────────────────────────── */
.gt-selection-bar {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--vc-green-soft);
    border: 1px solid var(--vc-green);
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    font-size: 0.82rem;
    color: var(--vc-green);
    font-weight: 500;
}
.gt-selection-bar.has-selection { display: flex; }

/* ─── PRIORIDADES NA GT ───────────────────────────────────────────────── */
.prio-alta { color: var(--danger); font-weight: 600; }
.prio-media { color: var(--warning); font-weight: 600; }
.prio-baixa { color: var(--text-muted); font-weight: 500; }

/* ─── RESPONSIVO GT ───────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .gt-table { font-size: 0.78rem; }
    .gt-table thead th { padding: 0.4rem 0.4rem; font-size: 0.65rem; }
    .gt-row td { padding: 0.4rem 0.4rem; }
    .gt-titulo { max-width: 120px; }
    .gt-projeto { max-width: 100px; }
}

/* ─── GT MULTI-SELECT DROPDOWN ──────────────────────────────────────── */
.gt-ms-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 2px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 260;
    min-width: 200px;
    max-height: 240px;
    overflow-y: auto;
    padding: 0.35rem 0;
}
.gt-multi-select.open .gt-ms-dropdown { display: block; }
.gt-ms-dropdown label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    color: var(--text);
    cursor: pointer;
    transition: background 0.1s;
}
.gt-ms-dropdown label:hover { background: var(--vc-green-ghost); }
.gt-ms-dropdown input[type="checkbox"] {
    accent-color: var(--vc-green);
    width: 14px;
    height: 14px;
}

/* ─── GT ACTIVE TAGS ────────────────────────────────────────────────── */
.gt-active-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding-top: 0.25rem;
}

/* ─── GT TABLE WRAPPER ──────────────────────────────────────────────── */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

/* ─── STATUS TAGS ───────────────────────────────────────────────────── */
.status-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.2px;
}
.status-planejada     { background: #E8EDF2; color: #4A6275; }
.status-em-andamento  { background: #FEF3C7; color: #B45309; }
.status-concluida     { background: #D1FAE5; color: #065F46; }
.status-revisao       { background: #EDE9FE; color: #5B21B6; }
.status-suspenso      { background: #FEE2E2; color: #991B1B; }
.status-cancelado     { background: #F3F4F6; color: #6B7280; text-decoration: line-through; }

/* ─── PRIORIDADE TAGS ───────────────────────────────────────────────── */
.prioridade-tag {
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}
.prioridade-tag.prio-alta  { color: var(--danger); }
.prioridade-tag.prio-media { color: var(--warning); }
.prioridade-tag.prio-baixa { color: var(--text-muted); }

/* ─── GT INLINE EDIT ────────────────────────────────────────────────── */
.gt-inline-input, .gt-inline-select {
    width: 100%;
    padding: 0.35rem 0.45rem;
    border: 2px solid var(--vc-green);
    border-radius: 4px;
    font-size: 0.82rem;
    font-family: inherit;
    color: var(--text);
    background: var(--surface);
    outline: none;
}

/* Botao calendario no inline-edit de data */
.gt-cal-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    color: #A0B0C0;
    cursor: pointer;
    padding: 4px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}
.gt-cal-btn:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}
.gt-cal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px; height: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    flex-shrink: 0;
    border-radius: 4px;
    transition: all 0.15s;
}
.gt-cal-icon:hover { color: var(--vc-green); background: var(--vc-green-soft); }
.gt-date-picker {
    width: 28px; height: 28px;
    padding: 0; margin: 0;
    border: none; outline: none;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
}
.gt-date-picker::-webkit-datetime-edit { display: none; }
.gt-date-picker::-webkit-calendar-picker-indicator { opacity: 1; margin: 0; padding: 0; }
.gt-date-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0.01;
    cursor: pointer;
    border: none;
}
.gt-date-only {
    width: 34px; height: 32px;
    padding: 0; margin: 0;
    border: none; outline: none;
    background: transparent;
    cursor: pointer;
    font-size: 0;
    color: transparent;
}
.gt-date-only::-webkit-datetime-edit { display: none; }
.gt-date-only::-webkit-calendar-picker-indicator { 
    opacity: 1; margin: 0; padding: 2px; 
    width: 24px; height: 24px; cursor: pointer; 
}
    width: 34px; height: 32px;
    padding: 0; margin: 0;
    border: none; outline: none;
    background: transparent;
    cursor: pointer;
    font-size: 0;
    color: transparent;
}
.gt-date-only::-webkit-datetime-edit { display: none; }
.gt-date-only::-webkit-calendar-picker-indicator { 
    opacity: 1; margin: 0; padding: 2px; 
    width: 24px; height: 24px; cursor: pointer; 
}

.gt-inline-select {
    cursor: pointer;
    appearance: auto;
}

/* ─── GT ROW STATUS ─────────────────────────────────────────────────── */
.gt-row.row-concluida td { opacity: 0.45; }

/* ═════════════════════════════════════════════════════════════════════
   DASHBOARD SEMANAL
   ═════════════════════════════════════════════════════════════════════ */

/* ─── KPI GRID (5 COLUNAS) ──────────────────────────────────────────── */
.stats-grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
@media (max-width: 900px) {
    .stats-grid-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
    .stats-grid-5 { grid-template-columns: repeat(2, 1fr); }
}

/* ─── SEMANA NAV ────────────────────────────────────────────────────── */
.ds-semana-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ds-semana-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
    padding: 0.25rem 0.75rem;
    background: var(--vc-green-ghost);
    border-radius: var(--radius-xs);
    white-space: nowrap;
}

/* ─── CHARTS ROW ────────────────────────────────────────────────────── */
.ds-charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
@media (max-width: 800px) {
    .ds-charts-row { grid-template-columns: 1fr; }
}

.ds-chart-card {
    min-height: 180px;
}
.ds-chart-card h3 {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
}

/* ─── BARRAS (HORIZONTAIS) ──────────────────────────────────────────── */
.ds-barras {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.ds-bar-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ds-bar-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    min-width: 110px;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
    font-weight: 500;
}

.ds-bar-track {
    flex: 1;
    height: 22px;
    background: #F1F5F9;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.ds-bar-fill {
    height: 100%;
    background: var(--vc-green);
    border-radius: 4px;
    font-size: 0.7rem;
    color: #fff;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 6px;
    min-width: fit-content;
    transition: width 0.4s ease;
    white-space: nowrap;
}

/* ─── SECTIONS ──────────────────────────────────────────────────────── */
.ds-section {
    margin-bottom: 1.25rem;
}

.ds-section-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.6rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--border-light);
}

/* ─── GRUPOS (ACCORDION) ────────────────────────────────────────────── */
.ds-empty {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
    padding: 1rem;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
}

.ds-grupo {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    margin-bottom: 0.4rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.ds-grupo-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.1s;
    font-size: 0.85rem;
}
.ds-grupo-header:hover { background: var(--vc-green-ghost); }
.ds-grupo-header strong { color: var(--text); }

.ds-grupo-toggle {
    font-size: 0.65rem;
    color: var(--text-muted);
    transition: transform 0.15s;
    width: 14px;
    text-align: center;
}

.ds-grupo-count {
    font-size: 0.72rem;
    color: var(--text-muted);
    background: #F8FAFC;
    padding: 0.15rem 0.5rem;
    border-radius: 100px;
    font-weight: 500;
}

.ds-grupo-body { }
.ds-grupo-body.ds-collapsed { display: none; }

/* ─── TABELA INTERNA DO GRUPO ───────────────────────────────────────── */
.ds-tabela {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.ds-tabela thead th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    background: var(--vc-green-ghost);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-bottom: 1px solid var(--border-light);
}

.ds-tabela td {
    padding: 0.45rem 0.75rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
    vertical-align: middle;
}

.ds-tabela tr:last-child td { border-bottom: none; }
.ds-tabela tbody tr:hover { background: var(--vc-green-ghost); }
.ds-tabela small {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-left: 0.35rem;
}

/* BOTAO REGISTRO MANUAL DE HORAS */
.gt-btn-reg-horas {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--vc-green); color: #fff; border: none;
    font-size: 14px; font-weight: 700; cursor: pointer;
    line-height: 1; padding: 0; margin-left: 4px;
    transition: transform .15s, background .15s;
}
.gt-btn-reg-horas:hover { transform: scale(1.15); background: var(--vc-dark); }

/* MODAL REGISTRO HORAS */
#modal-horas .modal-box { max-width: 420px; }
#modal-horas .form-group { margin-bottom: 0.6rem; }
#modal-horas .form-group label { display: block; font-size: 0.78rem; color: var(--vc-mid); margin-bottom: 0.25rem; }
