/* =================================================================
   ADMIN TIME TRACKING - ESTILOS MELHORADOS
   Versão otimizada para melhor visualização de informações de tempo
   ================================================================= */

/* ========== CONTAINER PRINCIPAL ========== */
.admin-container {
    padding: 24px;
    max-width: 1800px;
    margin: 0 auto;
    min-height: calc(100vh - 70px);
}

/* ========== BARRA DE FILTROS - MELHORADA ========== */
.filters-bar {
    background: var(--bg-secondary);
    padding: 20px 24px;
    border-radius: 16px;
    margin-bottom: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.filter-group select,
.filter-group input {
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    min-width: 180px;
    transition: all 0.2s;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.filter-group input[type="date"] {
    min-width: 160px;
}

.filter-group input[type="text"] {
    min-width: 280px;
}

/* Botão Exportar */
.filters-bar .btn-primary {
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transition: all 0.2s;
}

.filters-bar .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* ========== CARDS DE RESUMO - MELHORADOS ========== */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 36px;
}

@media (max-width: 1200px) {
    .summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .summary-cards {
        grid-template-columns: 1fr;
    }
}

.summary-card {
    background: var(--bg-secondary);
    padding: 28px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #6366f1;
    border-radius: 4px 0 0 4px;
}

.summary-card:nth-child(1)::before { background: #6366f1; }
.summary-card:nth-child(2)::before { background: #10b981; }
.summary-card:nth-child(3)::before { background: #3b82f6; }
.summary-card:nth-child(4)::before { background: #f59e0b; }

.summary-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.summary-card.alert-card {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #fbbf24;
}

[data-theme="dark"] .summary-card.alert-card {
    background: linear-gradient(135deg, #451a03 0%, #78350f 100%);
    border-color: #92400e;
}

.summary-icon {
    font-size: 32px;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 16px;
    flex-shrink: 0;
}

.summary-content {
    flex: 1;
    min-width: 0;
}

.summary-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-value {
    font-size: 36px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.summary-sublabel {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
    font-weight: 500;
}

/* ========== TABS - MELHORADAS ========== */
.tabs-container {
    margin-bottom: 28px;
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
}

.tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab-button {
    padding: 14px 24px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    border-radius: 12px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-button:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.tab-button.active {
    color: white;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.tab-content.active {
    display: block;
}

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

/* ========== SECTION HEADER ========== */
.section-header {
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
}

.section-header h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ========== OVERVIEW GRID - CARTÕES DE USUÁRIO ========== */
.overview-grid {
    display: grid;
    gap: 24px;
}

.user-overview-card {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s;
}

.user-overview-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.user-overview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    border-bottom: 1px solid var(--border-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-avatar-large {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 22px;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
    flex-shrink: 0;
}

.user-details h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.user-role {
    font-size: 12px;
    color: white;
    padding: 5px 12px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 20px;
    display: inline-block;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-time-badge {
    font-size: 42px;
    font-weight: 800;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-variant-numeric: tabular-nums;
}

.user-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    padding: 24px 28px;
}

.stat-item {
    background: var(--bg-tertiary);
    padding: 20px;
    border-radius: 14px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

/* ========== TABELAS DE DADOS - MELHORADAS ========== */
.data-table-container {
    background: var(--bg-secondary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--bg-tertiary);
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table th {
    padding: 18px 20px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 2px solid var(--border-color);
}

.data-table td {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-primary);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: all 0.2s;
}

.data-table tbody tr:hover {
    background: var(--bg-tertiary);
}

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

.task-title-cell {
    font-weight: 600;
    color: var(--text-primary);
    max-width: 350px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.column-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.time-cell {
    font-weight: 800;
    color: #6366f1;
    font-size: 18px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Timer Ativo com animação */
.time-cell.active {
    color: #10b981;
    position: relative;
}

.time-cell.active::after {
    content: '●';
    margin-left: 8px;
    animation: pulse 1.5s infinite;
    color: #10b981;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.alert-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #fef3c7;
    color: #92400e;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
}

[data-theme="dark"] .alert-badge {
    background: #78350f;
    color: #fde68a;
}

/* ========== BOTÕES DE AÇÃO ========== */
.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-icon {
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-edit {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.btn-edit:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

/* ========== TIMELINE - MELHORADA ========== */
.timeline {
    position: relative;
    padding: 24px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 32px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #6366f1, #8b5cf6, #a855f7);
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    padding: 0 0 32px 80px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: 20px;
    top: 0;
    width: 28px;
    height: 28px;
    background: var(--bg-secondary);
    border: 4px solid #6366f1;
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 0 6px var(--bg-primary);
}

.timeline-marker.active {
    background: #10b981;
    border-color: #10b981;
    animation: pulseMarker 2s infinite;
}

@keyframes pulseMarker {
    0%, 100% { box-shadow: 0 0 0 6px var(--bg-primary), 0 0 0 10px rgba(16, 185, 129, 0.2); }
    50% { box-shadow: 0 0 0 6px var(--bg-primary), 0 0 0 16px rgba(16, 185, 129, 0.1); }
}

.timeline-content {
    background: var(--bg-secondary);
    padding: 20px 24px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 12px;
}

.timeline-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.timeline-time {
    font-size: 22px;
    font-weight: 800;
    color: #6366f1;
    font-variant-numeric: tabular-nums;
}

.timeline-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.timeline-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.timeline-user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.timeline-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-secondary);
}

.timeline-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ========== LOG DE AUDITORIA - MELHORADO ========== */
.audit-item {
    background: var(--bg-secondary);
    border-left: 5px solid #6366f1;
    padding: 20px 24px;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

.audit-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.audit-item.edit {
    border-left-color: #f59e0b;
}

.audit-item.delete {
    border-left-color: #ef4444;
}

.audit-item.create {
    border-left-color: #10b981;
}

.audit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 12px;
}

.audit-action {
    font-weight: 700;
    font-size: 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.audit-timestamp {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    background: var(--bg-tertiary);
    padding: 4px 12px;
    border-radius: 20px;
}

.audit-details {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 8px;
    line-height: 1.6;
}

.audit-changes {
    display: grid;
    gap: 10px;
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    font-size: 14px;
}

.audit-change-row {
    display: flex;
    gap: 16px;
    align-items: center;
}

.audit-before {
    color: #ef4444;
    text-decoration: line-through;
    font-weight: 500;
}

.audit-after {
    color: #10b981;
    font-weight: 700;
}

.audit-arrow {
    color: var(--text-secondary);
}

/* ========== MODAL DE EDIÇÃO - MELHORADO ========== */
.time-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-tertiary);
    padding: 12px 16px;
    border-radius: 12px;
}

.time-input-group span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.time-input {
    width: 80px;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    text-align: center;
    font-size: 20px;
    font-weight: 800;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.time-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.alert-box {
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 14px;
    margin-top: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.alert-box.warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fbbf24;
}

.alert-box.info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #60a5fa;
}

.alert-box.danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #f87171;
}

[data-theme="dark"] .alert-box.warning {
    background: #451a03;
    color: #fde68a;
    border-color: #92400e;
}

[data-theme="dark"] .alert-box.info {
    background: #1e3a5f;
    color: #93c5fd;
    border-color: #3b82f6;
}

[data-theme="dark"] .alert-box.danger {
    background: #450a0a;
    color: #fecaca;
    border-color: #dc2626;
}

/* ========== ESTADOS VAZIOS ========== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.4;
}

.empty-state-text {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.empty-state-subtext {
    font-size: 14px;
    color: var(--text-secondary);
}

/* =================================================================
   OVERVIEW CARDS - VISÃO GERAL POR USUÁRIO
   ================================================================= */

.overview-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.overview-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.overview-card.has-active-timer {
    border-left: 4px solid #10b981;
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.05) 0%, var(--bg-secondary) 100%);
}

.overview-header {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.overview-card .user-avatar-large {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.overview-card .user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.overview-card .user-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.overview-card .user-stats {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.active-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    animation: pulseGlow 2s infinite;
    margin-left: auto;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 8px rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 20px rgba(16, 185, 129, 0.6); }
}

.overview-time {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.overview-time .time-value {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.overview-time .time-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* =================================================================
   USER DETAIL CARDS - DETALHAMENTO POR USUÁRIO
   ================================================================= */

.user-detail-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.user-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    border-bottom: 1px solid var(--border-color);
}

.user-detail-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.user-detail-header .total-time {
    font-size: 24px;
    font-weight: 800;
    color: #6366f1;
    font-variant-numeric: tabular-nums;
}

.user-records {
    padding: 8px;
}

.record-item {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 12px;
    transition: all 0.2s;
    margin: 4px 0;
}

.record-item:hover {
    background: var(--bg-tertiary);
}

.record-item.active {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.1) 0%, transparent 100%);
    border-left: 3px solid #10b981;
}

.record-task {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.record-time {
    font-size: 16px;
    font-weight: 800;
    color: #6366f1;
    font-variant-numeric: tabular-nums;
    min-width: 80px;
    text-align: right;
}

.record-date {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    min-width: 140px;
    text-align: right;
}

.active-indicator {
    color: #10b981;
    font-size: 12px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* =================================================================
   TASK DETAIL CARDS - DETALHAMENTO POR TAREFA
   ================================================================= */

.task-detail-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.task-detail-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.task-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

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

.task-info h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-detail-card .column-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.task-detail-header .total-time {
    font-size: 28px;
    font-weight: 800;
    color: #6366f1;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.task-users {
    font-size: 14px;
    color: var(--text-secondary);
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.task-users strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* =================================================================
   TIMELINE - LINHA DO TEMPO MELHORADA
   ================================================================= */

.timeline {
    position: relative;
    padding: 24px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #6366f1, #8b5cf6, #a855f7);
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    padding: 0 0 28px 70px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item.active .timeline-content {
    border-left: 3px solid #10b981;
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.05) 0%, var(--bg-secondary) 100%);
}

.timeline-marker {
    position: absolute;
    left: 14px;
    top: 4px;
    width: 24px;
    height: 24px;
    background: var(--bg-secondary);
    border: 4px solid #6366f1;
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 0 5px var(--bg-primary);
}

.timeline-marker.active {
    background: #10b981;
    border-color: #10b981;
    animation: pulseMarker 2s infinite;
}

@keyframes pulseMarker {
    0%, 100% { box-shadow: 0 0 0 5px var(--bg-primary), 0 0 0 10px rgba(16, 185, 129, 0.2); }
    50% { box-shadow: 0 0 0 5px var(--bg-primary), 0 0 0 16px rgba(16, 185, 129, 0.1); }
}

.timeline-content {
    background: var(--bg-secondary);
    padding: 20px 24px;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.timeline-user {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeline-user::before {
    content: '👤';
    font-size: 14px;
}

.timeline-date {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    background: var(--bg-tertiary);
    padding: 4px 12px;
    border-radius: 20px;
}

.timeline-task {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-left: 4px;
}

.timeline-duration {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 800;
    color: #6366f1;
    font-variant-numeric: tabular-nums;
}

.timeline-duration .active-badge {
    font-size: 12px;
    padding: 4px 10px;
}

/* =================================================================
   BOTÃO DE EDIÇÃO DE TEMPO (ADMIN)
   ================================================================= */

.btn-edit-time {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0.8;
}

.btn-edit-time:hover {
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.record-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 80px;
    justify-content: flex-end;
}

.record-item.adjusted {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.08) 0%, transparent 100%);
    border-left: 3px solid #f59e0b;
}

.adjusted-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

.timeline-item.adjusted .timeline-content {
    border-left: 3px solid #f59e0b;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.05) 0%, var(--bg-secondary) 100%);
}

.timeline-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.adjustment-note {
    margin-top: 10px;
    padding: 10px 14px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 8px;
    border-left: 3px solid #f59e0b;
}

.adjustment-note small {
    color: #92400e;
    font-size: 13px;
}

/* =================================================================
   MODAL DE EDIÇÃO DE TEMPO
   ================================================================= */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-secondary);
    border-radius: 20px;
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s;
}

.modal-overlay.show .modal {
    transform: translateY(0) scale(1);
}

.modal-header {
    padding: 24px;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    border-bottom: 1px solid var(--border-color);
}

.modal-title-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.modal-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.modal-title-content {
    flex: 1;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.modal-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    transition: all 0.2s;
}

.close-modal:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.info-item.full {
    grid-column: 1 / -1;
}

.info-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.info-value {
    font-size: 24px;
    font-weight: 800;
    color: #6366f1;
    font-variant-numeric: tabular-nums;
}

.time-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.time-input {
    width: 70px;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.2s;
}

.time-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.time-input-group span {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
}

.info-textarea {
    width: 100%;
    min-height: 100px;
    padding: 14px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    background: var(--bg-primary);
    color: var(--text-primary);
    resize: vertical;
    font-family: inherit;
    transition: all 0.2s;
}

.info-textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.info-textarea::placeholder {
    color: var(--text-secondary);
}

.alert-box {
    padding: 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.alert-box.warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #92400e;
}

.alert-box strong {
    display: block;
    margin-bottom: 4px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
}

.modal-actions .btn {
    flex: 1;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.modal-actions .btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.modal-actions .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.modal-actions .btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.modal-actions .btn-secondary:hover {
    background: var(--bg-primary);
    border-color: var(--text-secondary);
}

/* =================================================================
   AUDIT LIST - LOG DE AUDITORIA
   ================================================================= */

.audit-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.audit-item {
    background: var(--bg-secondary);
    border-radius: 14px;
    padding: 18px 22px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.audit-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.audit-icon {
    font-size: 24px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 12px;
    flex-shrink: 0;
}

.audit-content {
    flex: 1;
    min-width: 0;
}

.audit-action {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.audit-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.audit-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ========== INDICADOR DE TIMER ATIVO ========== */
.active-timer-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    animation: glowGreen 2s infinite;
}

@keyframes glowGreen {
    0%, 100% { box-shadow: 0 0 8px rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 20px rgba(16, 185, 129, 0.6); }
}

.active-timer-indicator::before {
    content: '●';
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ========== RESPONSIVO ========== */
@media (max-width: 1024px) {
    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group select,
    .filter-group input {
        width: 100%;
        min-width: unset;
    }

    .user-overview-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .user-time-badge {
        font-size: 32px;
    }
    
    .overview-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .overview-time {
        align-items: flex-start;
        width: 100%;
        padding-top: 16px;
        border-top: 1px solid var(--border-color);
    }
    
    .task-detail-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .task-detail-header .total-time {
        font-size: 24px;
    }
    
    .record-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .record-time,
    .record-date {
        text-align: left;
    }
}

@media (max-width: 768px) {
    .admin-container {
        padding: 16px;
    }

    .summary-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .summary-card {
        padding: 20px;
    }

    .summary-value {
        font-size: 28px;
    }

    .tabs {
        gap: 0;
    }

    .tab-button {
        padding: 12px 16px;
        font-size: 13px;
    }

    .data-table-container {
        overflow-x: auto;
    }

    .data-table th,
    .data-table td {
        padding: 12px 14px;
        font-size: 13px;
    }

    .time-cell {
        font-size: 15px;
    }

    .timeline::before {
        left: 16px;
    }

    .timeline-item {
        padding-left: 50px;
    }

    .timeline-marker {
        left: 6px;
        width: 20px;
        height: 20px;
    }
    
    .overview-card .user-avatar-large {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }
    
    .overview-time .time-value {
        font-size: 26px;
    }
    
    .user-detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .user-detail-header .total-time {
        font-size: 20px;
    }
    
    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .timeline-duration {
        font-size: 16px;
    }
    
    .audit-item {
        flex-direction: column;
        gap: 12px;
    }
    
    .audit-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

/* =================================================================
   COMPONENTES COMPARTILHADOS
   ================================================================= */

/* Logo */
.logo-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity .25s ease-in-out;
    user-select: none;
    pointer-events: none;
}

.logo-dark  { opacity: 1; }
.logo-light { opacity: 0; }

[data-theme="dark"] .logo-dark { opacity: 0; }
[data-theme="dark"] .logo-light { opacity: 1; }

/* ========== USER MENU ========== */
.user-menu-container {
    position: relative;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.user-menu:hover {
    background: var(--bg-secondary);
    border-color: var(--border-hover);
}

.user-menu.active {
    background: var(--bg-secondary);
    border-color: #6366f1;
}

.user-menu-arrow {
    transition: transform 0.3s ease;
    color: var(--text-secondary);
}

.user-menu.active .user-menu-arrow {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 260px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
    overflow: hidden;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.user-dropdown-item:hover {
    background: var(--bg-tertiary);
}

.user-dropdown-item.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    color: #6366f1;
}

.user-dropdown-item .item-icon {
    font-size: 20px;
    width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 6px 0;
}

/* ========== LOGOUT OVERLAY ========== */
.logout-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    backdrop-filter: blur(8px);
    transition: opacity 0.3s ease;
    z-index: 9999;
}

.logout-overlay.show {
    opacity: 1;
}

.logout-box {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 36px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 380px;
    width: 90%;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
}

.logout-overlay.show .logout-box {
    transform: translateY(0) scale(1);
}

.logout-box h2 {
    color: var(--text-primary);
    margin-bottom: 12px;
    font-weight: 800;
    font-size: 22px;
}

.logout-box p {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 28px;
    line-height: 1.5;
}

.logout-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
}

.logout-actions button {
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-cancel:hover {
    background: var(--border-color);
}

.btn-confirm {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

.btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

/* =============================================================================
   1. CARD DE ALERTA ATIVO
   ============================================================================= */

   .summary-card.alert-active {
    border: 2px solid #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
    animation: pulse-alert 2s ease-in-out infinite;
}

@keyframes pulse-alert {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
    }
    50% {
        box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
    }
}

.summary-card.alert-active .summary-icon {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* =============================================================================
   2. BADGES DE STATUS
   ============================================================================= */

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: #10b981;
    color: white;
}

.badge-warning {
    background: #f59e0b;
    color: white;
}

.badge-danger {
    background: #ef4444;
    color: white;
}

.badge-info {
    background: #3b82f6;
    color: white;
}

/* =============================================================================
   3. CARD DE ESTATÍSTICAS DO USUÁRIO MELHORADO
   ============================================================================= */

.user-stats-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.user-stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.user-stats-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.user-stats-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}

.user-stats-info {
    flex: 1;
}

.user-stats-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.user-stats-meta {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.user-stats-time {
    text-align: center;
    padding: 16px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.stats-time-large {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 4px;
}

.stats-time-detail {
    font-size: 12px;
    color: var(--text-secondary);
}

/* =============================================================================
   4. ALERT BOX STYLES
   ============================================================================= */

.alert-box {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-box.warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: #f59e0b;
    color: var(--text-primary);
}

.alert-box.info {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    color: var(--text-primary);
}

.alert-box.danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: var(--text-primary);
}

.alert-box.success {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
    color: var(--text-primary);
}

.alert-box strong {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.alert-box p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.alert-box .btn {
    margin-top: 12px;
}

/* =============================================================================
   5. EMPTY STATE
   ============================================================================= */

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-text {
    font-size: 16px;
    color: var(--text-secondary);
}

/* =============================================================================
   6. BOTÕES PEQUENOS
   ============================================================================= */

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
}

.btn.btn-warning {
    background: #f59e0b;
    color: white;
}

.btn.btn-warning:hover {
    background: #d97706;
}

/* =============================================================================
   7. MODAL DE INCONSISTÊNCIAS
   ============================================================================= */

#inconsistenciesModal .modal {
    max-width: 700px;
}

#inconsistenciesModal ul {
    max-height: 300px;
    overflow-y: auto;
}

#inconsistenciesModal li {
    font-size: 13px;
    line-height: 1.6;
}

/* =============================================================================
   8. INDICADOR DE TIMER ATIVO NO CARD
   ============================================================================= */

.time-record-card.active {
    border-left: 4px solid #10b981;
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
}

.time-record-card.active::before {
    content: '▶️';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 12px;
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.time-record-card.suspicious {
    border-left: 4px solid #ef4444;
}

.time-record-card.suspicious::after {
    content: '⚠️';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 12px;
}

/* =============================================================================
   9. CONTADOR NO TÍTULO DA PÁGINA (FAVICON ALTERNATIVO)
   ============================================================================= */

/* Não é possível estilizar o título da janela com CSS, 
   mas podemos adicionar um indicador visual */

.header-left::after {
    content: attr(data-active-count);
    display: inline-block;
    min-width: 20px;
    height: 20px;
    background: #ef4444;
    color: white;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    line-height: 20px;
    margin-left: 8px;
    padding: 0 6px;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.header-left[data-active-count]:not([data-active-count="0"])::after {
    opacity: 1;
    transform: scale(1);
}

/* =============================================================================
   10. BOTÃO DE SINCRONIZAÇÃO
   ============================================================================= */

.btn-sync {
    position: relative;
    overflow: hidden;
}

.btn-sync.syncing::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* =============================================================================
   11. RESPONSIVIDADE PARA NOVOS ELEMENTOS
   ============================================================================= */

@media (max-width: 768px) {
    .user-stats-card {
        padding: 16px;
    }
    
    .user-stats-avatar {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .stats-time-large {
        font-size: 24px;
    }
    
    .alert-box {
        padding: 12px;
        font-size: 13px;
    }
    
    #inconsistenciesModal .modal {
        max-width: 95%;
        margin: 10px;
    }
}

/* =============================================================================
   12. TEMA ESCURO - AJUSTES PARA NOVOS ELEMENTOS
   ============================================================================= */

[data-theme="dark"] .summary-card.alert-active {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.1) 100%);
}

[data-theme="dark"] .alert-box.warning {
    background: rgba(245, 158, 11, 0.15);
}

[data-theme="dark"] .alert-box.info {
    background: rgba(59, 130, 246, 0.15);
}

[data-theme="dark"] .alert-box.danger {
    background: rgba(239, 68, 68, 0.15);
}

[data-theme="dark"] .alert-box.success {
    background: rgba(16, 185, 129, 0.15);
}

[data-theme="dark"] .user-stats-card:hover {
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.2);
}

/* =============================================================================
   13. ANIMAÇÕES DE TRANSIÇÃO SUAVES
   ============================================================================= */

.user-stats-card,
.alert-box,
.badge {
    animation: fadeIn 0.3s ease-out;
}

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

/* =============================================================================
   14. LOADING STATE PARA SINCRONIZAÇÃO
   ============================================================================= */

.syncing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.syncing-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.syncing-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}