/* 
 * ATP System - Estilos Principais
 * Design clean estilo Google com cores pastéis
 */

:root {
    /* Cores Pastéis */
    --primary: #5c6bc0;
    --primary-light: #8e99a4;
    --primary-dark: #3949ab;
    --secondary: #26a69a;
    --accent: #7c4dff;
    
    /* Cores de Status */
    --success: #66bb6a;
    --warning: #ffca28;
    --danger: #ef5350;
    --info: #42a5f5;
    
    /* Cores Pastéis de Fundo */
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e8eef3;
    --bg-card: #ffffff;
    
    /* Texto */
    --text-primary: #2c3e50;
    --text-secondary: #5d6d7e;
    --text-muted: #95a5a6;
    --text-light: #ffffff;
    
    /* Bordas e Sombras */
    --border-color: #e0e6ed;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    
    /* Espaçamentos */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

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

/* Scrollbar fina */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Para Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 transparent;
}

html {
    overflow-y: scroll;
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ============================================
   PÁGINA DE LOGIN - TEMA AZUL #344C96
   ============================================ */
.login-pastel {
    background: #E8EDF5;
}

.login-pastel .login-container {
    background: linear-gradient(135deg, #6B8CD0 0%, #8BA8E0 50%, #A8C0F0 100%);
    flex-direction: column;
}

.login-pastel .login-logo {
    max-width: 140px;
    height: auto;
    margin-bottom: 12px;
}

.login-pastel .admin-link {
    display: block;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
    text-align: center;
}

.login-pastel .admin-link:hover {
    color: #ffffff;
}

.login-pastel .login-card {
    background: #ffffff;
    border: none;
    box-shadow: 0 8px 32px rgba(52, 76, 150, 0.25);
    padding: 32px 28px;
    max-width: 360px;
}

.login-pastel .login-title {
    color: #344C96;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -1px;
}

.login-pastel .login-subtitle {
    color: #5A6B8A;
}

.login-pastel .form-group label {
    color: #3D5175;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.login-pastel .form-group label i,
.login-pastel .form-group label svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    vertical-align: middle;
    color: #5A7AC8;
}

.login-pastel .form-control {
    background: #F5F7FB;
    border: 2px solid #D0D8E8;
    color: #1e293b;
}

.login-pastel .form-control:focus {
    background: #ffffff;
    border-color: #5A7AC8;
    box-shadow: 0 0 0 3px rgba(52, 76, 150, 0.15);
}

.login-pastel .form-control::placeholder {
    color: #8A9BB8;
}

.login-pastel .btn-primary {
    background: linear-gradient(135deg, #344C96 0%, #4A6AB8 100%);
    color: #ffffff;
    font-weight: 600;
    border: none;
}

.login-pastel .btn-primary:hover {
    background: linear-gradient(135deg, #283A73 0%, #344C96 100%);
    box-shadow: 0 4px 16px rgba(52, 76, 150, 0.4);
}

.login-pastel .btn-outline {
    border-color: #5A7AC8;
    color: #344C96;
    background: transparent;
}

.login-pastel .btn-outline:hover {
    background: #E8EDF5;
    border-color: #344C96;
    color: #283A73;
}

.login-pastel .alert-error {
    background: #fef2f2;
    border-left-color: #f87171;
    color: #dc2626;
}

.login-pastel .alert-success {
    background: #f0fdf4;
    border-left-color: #4ade80;
    color: #16a34a;
}

/* Modal no tema azul */
.login-pastel .modal {
    background: #ffffff;
    border: none;
    box-shadow: 0 8px 32px rgba(52, 76, 150, 0.2);
}

.login-pastel .modal-header {
    border-bottom-color: #E8EDF5;
}

.login-pastel .modal-title {
    color: #344C96;
}

.login-pastel .modal-close {
    background: #E8EDF5;
    color: #5A6B8A;
}

.login-pastel .modal-close:hover {
    background: #fecaca;
    color: #dc2626;
}

.login-pastel .modal-footer {
    border-top-color: #E8EDF5;
}

.login-pastel .btn-secondary {
    background: #E8EDF5;
    color: #3D5175;
}

.login-pastel .btn-secondary:hover {
    background: #D0D8E8;
    color: #283A73;
}

.login-pastel .password-strength-text {
    color: #5A6B8A;
}

/* ============================================
   PÁGINA DE LOGIN ADMIN - TEMA VERDE CLEAN
   ============================================ */
.login-admin {
    background: #E8F5E9;
}

.login-admin .login-container {
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 50%, #81C784 100%);
    flex-direction: column;
}

.login-admin .login-logo {
    max-width: 140px;
    height: auto;
    margin-bottom: 12px;
}

.login-admin .login-card {
    background: #ffffff;
    border: none;
    box-shadow: 0 8px 32px rgba(76, 175, 80, 0.25);
    border-radius: 20px;
    max-width: 360px;
}

.login-admin .login-title {
    color: #2E7D32;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -1px;
}

.login-admin .login-subtitle {
    color: #43A047;
    font-weight: 500;
    font-size: 14px;
}

.login-admin .form-group label {
    color: #2E7D32;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.login-admin .form-group label i,
.login-admin .form-group label svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.8;
    color: #43A047;
}

.login-admin .form-control {
    background: #F1F8E9;
    border: 2px solid #C8E6C9;
    color: #1e293b;
}

.login-admin .form-control:focus {
    background: #ffffff;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15);
}

.login-admin .form-control::placeholder {
    color: #81C784;
}

.login-admin .btn-primary {
    background: linear-gradient(135deg, #43A047 0%, #66BB6A 100%);
    color: #ffffff;
    font-weight: 600;
    border: none;
}

.login-admin .btn-primary:hover {
    background: linear-gradient(135deg, #2E7D32 0%, #43A047 100%);
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.4);
}

.login-admin .btn-outline {
    border-color: #4CAF50;
    color: #2E7D32;
    background: transparent;
}

.login-admin .btn-outline:hover {
    background: #E8F5E9;
    border-color: #2E7D32;
    color: #1B5E20;
}

.login-admin .alert-error {
    background: #fef2f2;
    border-left-color: #f87171;
    color: #dc2626;
}

.login-admin .alert-success {
    background: #f0fdf4;
    border-left-color: #4ade80;
    color: #16a34a;
}

.login-admin .alert-info {
    background: #E8F5E9;
    border-left-color: #4CAF50;
    color: #2E7D32;
}

/* Modal no tema admin verde */
.login-admin .modal {
    background: #ffffff;
    border: none;
    box-shadow: 0 8px 32px rgba(76, 175, 80, 0.2);
}

.login-admin .modal-header {
    border-bottom-color: #E8F5E9;
}

.login-admin .modal-title {
    color: #2E7D32;
}

.login-admin .modal-close {
    background: #E8F5E9;
    color: #43A047;
}

.login-admin .modal-close:hover {
    background: #fecaca;
    color: #dc2626;
}

.login-admin .modal-footer {
    border-top-color: #E8F5E9;
}

.login-admin .btn-secondary {
    background: #E8F5E9;
    color: #2E7D32;
}

.login-admin .btn-secondary:hover {
    background: #C8E6C9;
    color: #1B5E20;
}

.login-admin a {
    color: #43A047;
}

.login-admin a:hover {
    color: #2E7D32;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    padding: 48px 40px;
    text-align: center;
}

.login-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* ============================================
   FORMULÁRIOS
   ============================================ */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

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

.form-control {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-secondary);
    box-shadow: 0 0 0 4px rgba(92, 107, 192, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper .form-control {
    padding-left: 48px;
}

.input-icon-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
}

/* ============================================
   BOTÕES
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(92, 107, 192, 0.4);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

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

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #4caf50 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #e53935 100%);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-link {
    background: none;
    color: var(--primary);
    padding: 8px 0;
    font-weight: 500;
}

.btn-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

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

.modal {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
}

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

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

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--danger);
    color: white;
}

.modal-body {
    padding: 28px;
}

.modal-footer {
    padding: 20px 28px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Grid de Formulário */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   HEADER / NAVBAR
   ============================================ */
.navbar {
    background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.navbar-brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-item {
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.navbar-item:hover,
.navbar-item.active {
    background: var(--bg-tertiary);
    color: var(--primary);
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
}

.user-avatar:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Dropdown do Usuário */
.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

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

.user-dropdown-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

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

.user-dropdown-email {
    font-size: 12px;
    color: var(--text-muted);
}

.user-dropdown-menu {
    padding: 8px;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

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

.user-dropdown-item.danger:hover {
    background: #fdeaea;
    color: var(--danger);
}

/* ============================================
   LAYOUT PRINCIPAL
   ============================================ */
.main-content {
    padding: 32px;
    max-width: 1400px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 32px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

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

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

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

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

.card-body {
    padding: 24px;
}

/* ============================================
   GRID DE CATEGORIAS
   ============================================ */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.category-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.category-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.category-icon i, .category-icon svg {
    width: 18px;
    height: 18px;
    color: white;
}

.category-info {
    flex: 1;
}

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

.category-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.category-stats {
    display: flex;
    gap: 16px;
}

.category-stat {
    font-size: 12px;
    color: var(--text-secondary);
}

.category-stat strong {
    color: var(--text-primary);
}

/* ============================================
   LISTA DE DOCUMENTOS
   ============================================ */
.documents-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.document-item {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.document-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.document-icon {
    width: 44px;
    height: 44px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.document-icon i {
    font-size: 20px;
    color: var(--text-secondary);
}

.document-icon.pdf i { color: #e53935; }
.document-icon.image i { color: #43a047; }
.document-icon.doc i { color: #1e88e5; }

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

.document-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.document-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    gap: 16px;
}

.document-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-pendente {
    background: #fff3e0;
    color: #ef6c00;
}

.status-em_analise {
    background: #e3f2fd;
    color: #1976d2;
}

.status-aprovado {
    background: #e8f5e9;
    color: #388e3c;
}

.status-rejeitado {
    background: #ffebee;
    color: #d32f2f;
}

.document-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: var(--primary);
    color: white;
}

.btn-icon.danger:hover {
    background: var(--danger);
}

/* ============================================
   UPLOAD AREA
   ============================================ */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 48px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary);
    background: rgba(92, 107, 192, 0.05);
}

.upload-icon {
    width: 72px;
    height: 72px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.upload-icon i {
    font-size: 32px;
    color: var(--primary);
}

.upload-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

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

.upload-formats {
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================
   ESTATÍSTICAS
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    font-size: 24px;
    color: white;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
}

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

/* ============================================
   ALERTAS / TOASTS
   ============================================ */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #ef5350;
}

.alert-warning {
    background: #fff3e0;
    color: #e65100;
    border-left: 4px solid #ff9800;
}

.alert-info {
    background: #e3f2fd;
    color: #1565c0;
    border-left: 4px solid #2196f3;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    width: 100px;
    height: 100px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.empty-state-icon i {
    font-size: 48px;
    color: var(--text-muted);
}

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

.empty-state-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* ============================================
   PROGRESS BAR
   ============================================ */
.progress-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* ============================================
   RESPONSIVO
   ============================================ */
@media (max-width: 768px) {
    .navbar {
        padding: 0 16px;
    }
    
    .navbar-menu {
        display: none;
    }
    
    .main-content {
        padding: 20px 16px;
    }
    
    .page-title {
        font-size: 22px;
    }
    
    .modal {
        max-width: 100%;
        margin: 0 16px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--bg-tertiary);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* ============================================
   PASSWORD STRENGTH
   ============================================ */
.password-strength {
    margin-top: 8px;
}

.password-strength-bar {
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.password-strength-fill {
    height: 100%;
    transition: all 0.3s ease;
}

.password-strength-text {
    font-size: 11px;
    color: var(--text-muted);
}

.strength-weak .password-strength-fill {
    width: 25%;
    background: var(--danger);
}

.strength-fair .password-strength-fill {
    width: 50%;
    background: var(--warning);
}

.strength-good .password-strength-fill {
    width: 75%;
    background: var(--info);
}

.strength-strong .password-strength-fill {
    width: 100%;
    background: var(--success);
}

/* ============================================
   TABELAS
   ============================================ */
.table-responsive {
    overflow-x: auto;
}

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

.table th,
.table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-tertiary);
}

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

.table td {
    font-size: 14px;
    color: var(--text-primary);
}

/* ============================================
   TABS (ABAS)
   ============================================ */
.tabs {
    display: flex;
    gap: 8px;
    background: var(--bg-secondary);
    padding: 8px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

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

.tab.active {
    background: var(--primary);
    color: white;
}

.tab i, .tab svg {
    width: 18px;
    height: 18px;
}

/* ============================================
   ALUNOS CARDS (DASHBOARD ADMIN)
   ============================================ */
.alunos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 24px;
}

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

.aluno-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.aluno-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-tertiary);
    flex-shrink: 0;
}

.aluno-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.aluno-nome {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.aluno-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

.badge-pendente {
    background: #fff3cd;
    color: #856404;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.status-retificado {
    background: linear-gradient(135deg, #e1bee7 0%, #ce93d8 100%);
    color: #6a1b9a;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-retificado {
    background: #e1bee7;
    color: #6a1b9a;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.aluno-progress {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.aluno-stats {
    display: flex;
    flex-wrap: wrap;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    gap: 6px;
}

.aluno-stat {
    flex: 1 1 auto;
    min-width: 60px;
    text-align: center;
    padding: 6px 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

.stat-number {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-number.text-success {
    color: var(--success);
}

.stat-number.text-danger {
    color: var(--danger);
}

.stat-text {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.aluno-docs-list {
    max-height: 250px;
    overflow-y: auto;
}

.aluno-doc-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

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

.aluno-doc-item:last-child {
    border-bottom: none;
}

.doc-category-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

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

.doc-titulo {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-categoria {
    font-size: 12px;
    color: var(--text-muted);
}

.doc-action {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: var(--text-secondary);
    transition: all 0.2s;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.doc-action:hover {
    background: var(--primary);
    color: white;
}

.doc-action i, .doc-action svg {
    width: 14px;
    height: 14px;
}

.doc-actions {
    display: flex;
    gap: 4px;
}

.doc-action-success:hover {
    background: var(--success);
    color: white;
}

.doc-action-danger:hover {
    background: var(--danger);
    color: white;
}

.doc-action-delete {
    color: #dc2626;
}

.doc-action-delete:hover {
    background: #dc2626;
    color: white;
}

@media (max-width: 768px) {
    .alunos-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   PERÍODO (CONFIGURAÇÕES)
   ============================================ */
.periodo-section {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 24px;
}

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

.periodo-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.periodo-title i, .periodo-title svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.periodo-title h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.periodo-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0 0 20px 0;
}

.periodo-status {
    margin-top: 16px;
}

/* Toggle Switch */
.toggle-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.toggle-switch input {
    display: none;
}

.toggle-slider {
    width: 48px;
    height: 26px;
    background: #ccc;
    border-radius: 26px;
    position: relative;
    transition: background 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--success);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(22px);
}

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

.status-info {
    background: #e3f2fd;
    color: #1565c0;
}

/* ============================================
   AVISOS DE VALIDAÇÃO (UPLOAD)
   ============================================ */
.categoria-info, .horas-aviso {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-top: 8px;
}

.categoria-info i, .categoria-info svg,
.horas-aviso i, .horas-aviso svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.aviso-info {
    background: #e3f2fd;
    color: #1565c0;
}

.aviso-erro {
    background: #fef2f2;
    color: #dc2626;
}

.aviso-sucesso {
    background: #dcfce7;
    color: #16a34a;
}
