/* ============================================
   DESIGN SYSTEM - Griffus Logística
   Mobile-First | Vanilla CSS
   ============================================ */

/* --- CSS Variables (Design Tokens) --- */
:root {
    /* Cores Primárias - Griffus */
    --color-primary: #1c62ff;
    --color-primary-light: #4f86ff;
    --color-primary-dark: #0045e6;

    /* Cores de Ação */
    --color-success: #10B981;
    --color-success-light: #D1FAE5;
    --color-danger: #EF4444;
    --color-danger-light: #FEE2E2;
    --color-warning: #F59E0B;
    --color-warning-light: #FEF3C7;
    --color-info: #3B82F6;
    --color-info-light: #DBEAFE;

    /* Neutras */
    --color-bg: #F9FAFB;
    --color-surface: #FFFFFF;
    --color-surface-hover: #F1F5F9;
    --color-border: #E2E8F0;
    --color-text: #1E293B;
    --color-text-secondary: #64748B;
    --color-text-muted: #94A3B8;

    /* Tipografia */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;

    /* Espaçamento */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Bordas */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    /* Sombras */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);

    /* Transições */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

/* --- Layout Utilities --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}

.gap-lg {
    gap: var(--space-lg);
}

.text-center {
    text-align: center;
}

/* --- Typography --- */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-text);
}

h1 {
    font-size: var(--font-size-3xl);
}

h2 {
    font-size: var(--font-size-2xl);
}

h3 {
    font-size: var(--font-size-xl);
}

h4 {
    font-size: var(--font-size-lg);
}

.text-sm {
    font-size: var(--font-size-sm);
}

.text-xs {
    font-size: var(--font-size-xs);
}

.text-muted {
    color: var(--color-text-muted);
}

.text-secondary {
    color: var(--color-text-secondary);
}

/* --- Card Component --- */
.card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    border: none;
    box-shadow: none;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border);
}

/* --- Button System --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.25rem;
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    /* Touch-friendly minimum size */
    min-height: 48px;
    min-width: 48px;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--color-primary-light);
}

.btn-success {
    background: var(--color-success);
    color: #fff;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--color-danger);
    color: #fff;
}

.btn-danger:hover {
    background: #DC2626;
}

.btn-warning {
    background: var(--color-warning);
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-border);
    color: var(--color-text);
}

.btn-outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(28, 98, 255, 0.05);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-lg {
    padding: 1rem 1.5rem;
    font-size: var(--font-size-base);
    min-height: 56px;
}

.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: var(--font-size-xs);
    min-height: 36px;
    min-width: 36px;
}

/* --- Form Elements --- */
.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
}

.form-label {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text-secondary);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    color: var(--color-text);
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition-fast);
    /* Touch-friendly */
    min-height: 48px;
}

/* Customização de selects nativos para o padrão do sistema */
select.form-input,
select.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2em;
    padding-right: 2.5rem;
}
select.form-input::-ms-expand,
select.form-select::-ms-expand {
    display: none;
}

/* Custom Dropdown Component (JS Replaced) */
.custom-dropdown {
    position: relative;
    width: 100%;
}
.custom-dropdown-header {
    padding: 0.75rem 1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: var(--font-size-base);
    color: var(--color-text);
    min-height: 48px;
    transition: border-color var(--transition-fast);
}
.custom-dropdown-header:hover {
    border-color: #cbd5e1;
}
.custom-dropdown.open .custom-dropdown-header {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(28, 98, 255, 0.15);
}
.custom-dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    margin-top: 4px;
    z-index: 2000; /* Alto z-index para sobrepor barras */
    display: none;
    max-height: 250px;
    overflow-y: auto;
}
.custom-dropdown.open .custom-dropdown-list {
    display: block;
}
.custom-dropdown-search {
    padding: 8px;
    position: sticky;
    top: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}
.custom-dropdown-search input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
}
.custom-dropdown-search input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(28, 98, 255, 0.15);
}

.form-input::placeholder {
    color: var(--color-text-muted);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* --- Badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: var(--font-size-xs);
    font-weight: 700;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-pendente {
    background: var(--color-warning-light);
    color: #92400E;
}

.badge-aprovado {
    background: var(--color-success-light);
    color: #065F46;
}

.badge-reprovado {
    background: var(--color-danger);
    color: #FFFFFF;
}

.badge-analise {
    background: var(--color-info-light);
    color: #1E40AF;
}

/* --- Header / Navbar --- */
.navbar {
    background: var(--color-primary-dark);
    color: #fff;
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.navbar-brand img {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.85);
}

/* --- Page Content --- */
.page-content {
    padding: var(--space-lg) var(--space-md);
    flex: 1;
    overflow-y: auto;
}

.page-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: var(--space-lg);
}

/* --- Stats Grid --- */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.stat-card {
    background: transparent;
    border: none;
    padding: 0;
    text-align: center;
}

.stat-value {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
    letter-spacing: -0.03em;
}

.stat-label {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-top: 6px;
}

/* --- Task List (Apontamentos) --- */
.task-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.task-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    transition: background var(--transition-fast);
}

.task-item:active {
    background: var(--color-surface-hover);
}

.task-info {
    flex: 1;
}

.task-name {
    font-weight: 600;
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-xs);
}

.task-meta {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}

.task-points {
    font-weight: 800;
    font-size: var(--font-size-lg);
    color: var(--color-primary);
    white-space: nowrap;
}

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn var(--transition-base);
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--color-surface);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: var(--space-xl) var(--space-lg);
    overflow-y: auto;
    animation: slideUp var(--transition-base);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.modal-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: var(--space-sm);
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Camera Preview --- */
.camera-container {
    width: 100%;
    aspect-ratio: 4/3;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    margin-bottom: var(--space-md);
}

.camera-container video,
.camera-container canvas,
.camera-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-btn {
    position: absolute;
    bottom: var(--space-md);
    left: 50%;
    transform: translateX(-50%);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 4px solid var(--color-primary);
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.camera-btn:active {
    transform: translateX(-50%) scale(0.9);
}

/* --- Camera Fullscreen (Mobile First) --- */
.camera-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: #000000;
    z-index: 10005;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.camera-fullscreen video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.camera-top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: max(16px, env(safe-area-inset-top)) 20px 20px;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
}

.camera-icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #FFFFFF;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform var(--transition-fast), background var(--transition-fast);
    pointer-events: auto;
}

.camera-icon-btn:active {
    transform: scale(0.9);
    background: rgba(0, 0, 0, 0.75);
}

.camera-badge-title {
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 6px 16px;
    border-radius: 20px;
}

.camera-bottom-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 20px max(28px, env(safe-area-inset-bottom));
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
}

.camera-shutter-container {
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.camera-shutter-btn {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: transparent;
    border: 4px solid #FFFFFF;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-fast);
    outline: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    -webkit-tap-highlight-color: transparent;
}

.camera-shutter-btn:active {
    transform: scale(0.92);
}

.camera-shutter-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #FFFFFF;
    display: block;
    transition: transform var(--transition-fast), background var(--transition-fast);
}

.camera-shutter-btn:active .camera-shutter-inner {
    background: var(--color-primary);
    transform: scale(0.92);
}

.camera-hint-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.82rem;
    font-weight: 500;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
    letter-spacing: 0.2px;
}

.camera-preview {
    width: 100%;
    border-radius: var(--radius-md);
    border: 2px dashed var(--color-border);
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    margin-bottom: var(--space-md);
}

.camera-preview.has-photo {
    border-style: solid;
    border-color: var(--color-success);
}

.camera-preview img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
}

.camera-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    padding: var(--space-xl);
}

/* --- Toast Notifications --- */
.toast {
    position: fixed;
    top: var(--space-lg);
    right: var(--space-md);
    left: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    color: #fff;
    font-weight: 600;
    font-size: var(--font-size-sm);
    z-index: 2000;
    transform: translateY(-120%);
    transition: transform var(--transition-base);
    box-shadow: var(--shadow-lg);
}

.toast.show {
    transform: translateY(0);
}

.toast-success {
    background: var(--color-success);
}

.toast-error {
    background: var(--color-danger);
}

.toast-warning {
    background: var(--color-warning);
}

/* --- Loading Spinner --- */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1500;
}

.spinner-overlay.active {
    display: flex;
}

/* --- Checkbox toggle for batch approval --- */
.checkbox-touch {
    width: 24px;
    height: 24px;
    accent-color: var(--color-primary);
    cursor: pointer;
    min-width: 24px;
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
    color: var(--color-text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
    opacity: 0.5;
}

/* --- Animations --- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- Responsive: Tablet & Desktop --- */
@media (min-width: 768px) {
    .modal-overlay {
        align-items: center;
    }

    .modal-content {
        border-radius: var(--radius-lg);
        max-height: 80vh;
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .page-content {
        padding: var(--space-xl) var(--space-2xl);
    }

    .toast {
        left: auto;
        max-width: 400px;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 var(--space-xl);
    }
}


/* -- Animações de Fechamento -- */
@keyframes slideDown {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(100%);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.modal-overlay.closing {
    animation: fadeOut var(--transition-base) forwards;
}

.modal-overlay.closing .modal-content {
    animation: slideDown var(--transition-base) forwards;
}

/* --- Wizard Enterprise --- */
.wizard-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.wizard-back {
    background: none;
    border: none;
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.15s;
}

.wizard-back:hover {
    color: #0f172a;
}

.selection-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.selection-item {
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #ffffff;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.2s, border-color 0.2s;
}

.selection-item:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.selection-item strong {
    font-size: 1rem;
    color: #1e293b;
}

.selection-item span {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 4px;
}

.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
}

.radio-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.radio-card {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    transition: all 0.2s;
    font-size: 0.95rem;
    color: #334155;
}

.radio-card:hover {
    background: #f8fafc;
}

.radio-card input[type="radio"] {
    margin: 0;
}

.selection-summary {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 12px 16px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.selection-summary .title {
    font-weight: 600;
    color: #0f172a;
}

.selection-summary .subtitle {
    font-size: 0.85rem;
    color: #64748b;
}

.btn-text {
    background: none;
    border: none;
    color: var(--primary-color, #2563eb);
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
}

.btn-text:hover {
    text-decoration: underline;
}

/* --- Minimalist Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* --- Badge de Status --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge-analise {
    background: var(--color-warning-light);
    color: #92400E;
}

.badge-aprovado {
    background: var(--color-success-light);
    color: #065F46;
}

.badge-reprovado {
    background: var(--color-danger);
    color: #FFFFFF;
}

.badge-andamento {
    background: #EFF6FF;
    color: #1D4ED8;
}

/* --- Card Em Andamento --- */
@keyframes pulse-border {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(28, 98, 255, 0.25);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(28, 98, 255, 0);
    }
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.task-item-andamento {
    background: linear-gradient(135deg, #EFF6FF 0%, #FFFFFF 100%);
    border: 1.5px solid var(--color-primary);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    cursor: pointer;
    margin-bottom: var(--space-sm);
    animation: pulse-border 2s ease-in-out infinite;
    transition: background var(--transition-fast);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.task-item-andamento:hover {
    background: linear-gradient(135deg, #DBEAFE 0%, #F0F9FF 100%);
}

.task-item-andamento .andamento-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.task-item-andamento .andamento-title {
    font-weight: 700;
    font-size: var(--font-size-base);
    color: var(--color-primary-dark);
}

.andamento-live {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: var(--font-size-xs);
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.andamento-live .dot {
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
    animation: pulse-dot 1.2s ease-in-out infinite;
}

.andamento-timer {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-primary);
    letter-spacing: -0.03em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.andamento-meta {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.andamento-hint {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* --- Modal Novo Apontamento: Altura Padrão e Layout Fixo --- */
#modal-apontamento .modal-content {
    position: relative;
    height: 62vh;
    max-height: 62vh;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    padding: 20px 20px 16px 20px;
    overflow: hidden;
}

@media (min-width: 768px) {
    #modal-apontamento .modal-content {
        height: 480px;
        max-height: 75vh;
        min-height: 440px;
    }
}

#modal-apontamento .modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: #64748b;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
}

#modal-apontamento .modal-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

#modal-apontamento #form-apontamento {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

#modal-apontamento .wizard-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
    display: flex;
    flex-direction: column;
}

#modal-apontamento .wizard-header {
    display: flex;
    align-items: center;
    height: 32px;
    min-height: 32px;
    margin-bottom: 12px;
    padding-right: 40px;
}

#modal-apontamento .wizard-step-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

#modal-apontamento .wizard-step {
    flex: 1;
    min-height: 0;
    display: none;
    flex-direction: column;
}

#modal-apontamento .wizard-step.active {
    display: flex;
}

#modal-apontamento .selection-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 2px;
}

.selection-item {
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    box-sizing: border-box;
}

.selection-item:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.selection-item.selected {
    border-color: var(--color-primary, #2563eb) !important;
    background: #eff6ff !important;
}

.selection-item.selected strong {
    color: var(--color-primary, #2563eb) !important;
}

.wizard-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 14px;
    margin-top: 10px;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
    flex-shrink: 0;
    width: 100%;
}

.wizard-footer .btn {
    flex: 1;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
}

.wizard-footer .btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* --- Real-Time Highlight --- */
@keyframes pulse-green {
    0% { background-color: rgba(46, 213, 115, 0.4); box-shadow: 0 0 0 0 rgba(46, 213, 115, 0.7); }
    50% { background-color: rgba(46, 213, 115, 0.1); box-shadow: 0 0 0 10px rgba(46, 213, 115, 0); }
    100% { background-color: var(--color-surface); box-shadow: 0 0 0 0 rgba(46, 213, 115, 0); }
}

.highlight-new {
    animation: pulse-green 5s ease-out forwards;
    border-left: 4px solid var(--color-aprovado) !important;
}