/* 
 * CSS Global - Aceleres.ai
 * Padrão: HTML5 + CSS puro (sem frameworks)
 * Fonte: Poppins
 */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap');

* {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Tipografia Global - Padrão Aceleres (em pixels) */
h1 {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

h2 {
    font-size: 24px;
    font-weight: 700;
    color: #374151;
}

h3 {
    font-size: 20px;
    font-weight: 600;
    color: #374151;
}

h4 {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
}

p {
    font-size: 16px;
    color: #374151;
    line-height: 1.6;
}

.text-lg {
    font-size: 18px;
}

.text-base {
    font-size: 16px;
}

.text-sm {
    font-size: 14px;
}

.text-xs {
    font-size: 12px;
}

.text-secondary {
    color: #6b7280;
}

.text-small {
    color: #6b7280;
    font-size: 14px;
}

/* Scores e números grandes */
.score-large {
    font-size: 56px;
    font-weight: 700;
    line-height: 1;
}

.score-medium {
    font-size: 40px;
    font-weight: 700;
    line-height: 1;
}

/* Tamanhos específicos em pixels */
.font-10 { font-size: 10px; }
.font-11 { font-size: 11px; }
.font-12 { font-size: 12px; }
.font-13 { font-size: 13px; }
.font-14 { font-size: 14px; }
.font-15 { font-size: 15px; }
.font-16 { font-size: 16px; }
.font-17 { font-size: 17px; }
.font-18 { font-size: 18px; }
.font-19 { font-size: 19px; }
.font-20 { font-size: 20px; }
.font-22 { font-size: 22px; }
.font-24 { font-size: 24px; }
.font-26 { font-size: 26px; }
.font-28 { font-size: 28px; }
.font-30 { font-size: 30px; }
.font-32 { font-size: 32px; }
.font-36 { font-size: 36px; }
.font-40 { font-size: 40px; }
.font-48 { font-size: 48px; }
.font-56 { font-size: 56px; }
.font-64 { font-size: 64px; }

body {
    background-color: #F0F0F0;
    -webkit-font-smoothing: antialiased;
    margin: 0;
    padding: 0;
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Auth Layout Container */
.auth-container {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

/* Background */
.background {
    pointer-events: none;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 0;
}

.background img {
    width: 100%;
    height: auto;
    user-select: none;
}

/* Main Content */
.main-content {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* Form Container */
.form-container {
    width: 100%;
    max-width: 360px;
    text-align: center;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.logo {
    display: block;
    margin: 0 auto;
    height: 40px;
}

@media (min-width: 768px) {
    .logo {
        height: 48px;
    }
}

.subtitle {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

/* Form Elements */
.form-group {
    margin-bottom: 1rem;
}

.form-group.small {
    margin-bottom: 0.75rem;
}

.label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    text-align: left;
}

.required {
    color: #ef4444;
}

.input {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px 12px;
    font-size: 0.875rem;
    color: #374151;
    outline: none;
    transition: all 0.15s ease;
    text-align: left;
}

.input::placeholder {
    color: #9ca3af;
}

.input:focus {
    border-color: transparent;
    box-shadow: 0 0 0 2px #ef4444;
}

/* Error Messages */
.error-message {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #ef4444;
}

/* Buttons */
.button {
    width: 100%;
    border-radius: 8px;
    background-color: #ef4444;
    padding: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.button:hover {
    background-color: #dc2626;
}

.button:focus {
    outline: none;
    box-shadow: 0 0 0 2px #ef4444, 0 0 0 4px rgba(239, 68, 68, 0.1);
}

/* Links */
.login-link, .register-link {
    margin-top: 1.25rem;
    text-align: center;
}

.login-text, .register-text {
    font-size: 0.875rem;
    color: #4b5563;
}

.login-link a, .register-link a {
    font-size: 0.875rem;
    font-weight: 500;
    color: #ef4444;
    text-decoration: none;
}

.login-link a:hover, .register-link a:hover {
    color: #dc2626;
}

.link {
    color: #ef4444;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.link:hover {
    color: #dc2626;
}

/* Checkbox */
.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.checkbox {
    width: 16px;
    height: 16px;
    margin: 0;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: #ef4444;
}

.checkbox-label {
    font-size: 0.75rem;
    color: #4b5563;
    line-height: 1.4;
    cursor: pointer;
    text-align: left;
}

/* Back Button */
.back-button-container {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 20;
}

.back-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 8px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.15s ease;
    border: none;
}

.back-button:hover {
    background-color: rgba(255, 255, 255, 1);
    color: #374151;
    transform: scale(1.05);
}

.back-button svg {
    flex-shrink: 0;
}

/* Footer */
.footer {
    pointer-events: none;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 1rem;
    text-align: center;
}

.footer p {
    font-size: 0.875rem;
    color: #9ca3af;
}

/* Welcome/Phone Verification */
.verification-container {
    text-align: center;
}

.phone-display {
    font-size: 1.125rem;
    font-weight: 500;
    color: #374151;
    margin: 1rem 0;
}

.code-input {
    max-width: 200px;
    margin: 1rem auto;
    text-align: center;
    font-size: 1.25rem;
    letter-spacing: 0.5rem;
    padding: 15px;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 2rem;
}

.button-secondary {
    background-color: transparent;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.button-secondary:hover {
    background-color: #f9fafb;
    color: #374151;
}

.button-link {
    background-color: transparent;
    color: #ef4444;
    border: none;
    text-decoration: underline;
    padding: 0;
    font-size: 0.875rem;
}

.button-link:hover {
    color: #dc2626;
}

/* Timeline Steps */
.timeline-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(240, 240, 240, 0.95);
    padding: 1rem;
    z-index: 15;
    backdrop-filter: blur(10px);
}

.timeline {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #d1d5db;
    z-index: 1;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    z-index: 2;
}

.timeline-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
}

.timeline-circle.active {
    background-color: #6b7280;
    transform: scale(1.1);
}

.timeline-circle.completed {
    background-color: #10b981;
}

.timeline-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-align: center;
    max-width: 120px;
    line-height: 1.2;
}

.timeline-label.active {
    color: #374151;
    font-weight: 500;
}

/* Responsive Timeline */
@media (max-width: 768px) {
    .timeline-circle {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }
    
    .timeline-label {
        font-size: 0.625rem;
        max-width: 80px;
    }
    
    .timeline-container {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .timeline-circle {
        width: 28px;
        height: 28px;
        font-size: 0.625rem;
    }
    
    .timeline-label {
        font-size: 0.5rem;
        max-width: 60px;
    }
}

/* Responsive */
@media (max-width: 640px) {
    .main-content {
        padding: 1rem 0.75rem 120px 0.75rem; /* Espaço extra para timeline */
    }
    
    .form-container {
        max-width: 320px;
    }
}

@media (min-width: 641px) {
    .main-content {
        padding-bottom: 120px; /* Espaço extra para timeline */
    }
}

/* Nova Topbar Moderna */
.modern-topbar,
.modern-topbar.sidebar-collapsed,
header.modern-topbar,
header.modern-topbar.sidebar-collapsed {
    background: #000000 !important;
    background-image: none !important;
    background-color: #000000 !important;
    height: 80px;
    min-height: 80px;
    max-height: 80px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: fixed;
    top: 0 !important;
    left: 0;
    right: 0;
    z-index: 1001;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    margin-top: 0 !important;
}

/* Logo à esquerda */
.topbar-logo-container {
    display: flex;
    align-items: center;
    height: 100%;
}

.topbar-logo {
    height: 50px;
    max-width: 200px;
    width: 200px;
    object-fit: contain;
    display: block;
}

/* Botão de perfil à direita */
.topbar-profile-container {
    display: flex;
    align-items: center;
    height: 100%;
}

.profile-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #374151;
    border: 2px solid #4b5563;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.profile-btn:hover {
    background-color: #4b5563;
    border-color: #6b7280;
    transform: scale(1.05);
}

.profile-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-btn i {
    color: white;
    font-size: 20px;
}

.profile-btn span {
    color: white;
    font-weight: 600;
    font-size: 18px;
}

/* Dashboard Layout */
body:has(.dashboard-layout) {
    margin: 0;
    padding: 0;
    padding-top: 80px; /* Espaço para topbar */
}

.dashboard-layout {
    display: flex;
    min-height: calc(100vh - 80px);
    background-color: #F0F0F0;
    overflow: hidden;
    width: 100vw;
}

/* Sidebar styles moved to resources/css/components/sidebar.css */

/* Sidebar footer and dashboard styles moved to resources/css/components/sidebar.css */

.dashboard-header {
    background-color: white;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dashboard-content {
    flex: 1;
    padding: 2rem;
    background-color: #f9fafb;
    min-height: calc(100vh - 80px);
}

/* Responsive Dashboard */
@media (max-width: 1024px) {
    .collapsible-sidebar {
        width: 280px;
    }
    
    .collapsible-sidebar.collapsed {
        width: 70px;
    }
    
    .collapsible-sidebar.collapsed .sidebar-text {
        opacity: 0;
        width: 0;
        overflow: hidden;
    }
    
    .collapsible-sidebar.collapsed .sidebar-item {
        justify-content: center;
        padding: 12px 0;
    }
    
    .collapsible-sidebar.collapsed .sidebar-icon {
        margin-right: 0;
    }
    
    .dashboard-main {
        margin-left: 280px;
    }
    
    .dashboard-main.sidebar-collapsed {
        margin-left: 70px;
    }
    
    /* Footer responsivo para tablet */
    .sidebar-footer {
        padding: 0.75rem 0.5rem;
        gap: 0.75rem;
    }
    
    .sidebar-user-avatar {
        width: 44px;
        height: 44px;
    }
    
    .sidebar-logout-btn {
        width: 38px;
        height: 38px;
    }
}

@media (max-width: 768px) {
    .collapsible-sidebar {
        width: 0;
        overflow: hidden;
    }
    
    .dashboard-main {
        margin-left: 0;
    }
    
    .collapsible-sidebar.mobile-open {
        width: 280px;
    }
    
    /* Footer mobile */
    .collapsible-sidebar.mobile-open .sidebar-footer {
        padding: 1rem;
        flex-direction: row;
        gap: 1rem;
        min-height: 80px;
    }
    
    .collapsible-sidebar.mobile-open .sidebar-user-avatar {
        width: 48px;
        height: 48px;
    }
    
    .collapsible-sidebar.mobile-open .sidebar-logout-btn {
        width: 40px;
        height: 40px;
    }
}

/* Melhorias de acessibilidade */
.sidebar-user-avatar:focus,
.sidebar-logout-btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Tooltip para avatar quando colapsado */
.collapsible-sidebar.collapsed .sidebar-user-avatar:hover::after {
    content: attr(title);
    position: absolute;
    left: 80px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #374151;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1002;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    pointer-events: none;
}

/* Modal de Confirmação */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.modal-content {
    background-color: white;
    border-radius: 12px;
    padding: 2rem;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

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

.modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

/* Variações de ícones por tipo */
.modal-icon-danger {
    background-color: #ef4444;
}

.modal-icon-warning {
    background-color: #f59e0b;
}

.modal-icon-success {
    background-color: #22c55e;
}

.modal-icon-info {
    background-color: #3b82f6;
}

.modal-icon-logout {
    background-color: #6b7280;
}

.modal-icon-delete {
    background-color: #dc2626;
}

.modal-icon-default {
    background-color: #6b7280;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 0.5rem 0;
}

.modal-message {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.modal-button {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    min-width: 100px;
}

.modal-button-cancel {
    background-color: #f3f4f6;
    color: #6b7280;
}

.modal-button-cancel:hover {
    background-color: #e5e7eb;
    color: #374151;
}

.modal-button-confirm {
    background-color: #ef4444;
    color: white;
}

.modal-button-confirm:hover {
    background-color: #dc2626;
}

/* Variações de botões por tipo */
.modal-button-danger {
    background-color: #ef4444;
}

.modal-button-danger:hover {
    background-color: #dc2626;
}

.modal-button-warning {
    background-color: #f59e0b;
}

.modal-button-warning:hover {
    background-color: #d97706;
}

.modal-button-success {
    background-color: #22c55e;
}

.modal-button-success:hover {
    background-color: #16a34a;
}

.modal-button-info {
    background-color: #3b82f6;
}

.modal-button-info:hover {
    background-color: #2563eb;
}

.modal-button-logout {
    background-color: #6b7280;
}

.modal-button-logout:hover {
    background-color: #4b5563;
}

.modal-button-delete {
    background-color: #dc2626;
}

.modal-button-delete:hover {
    background-color: #b91c1c;
}

.modal-button-default {
    background-color: #6b7280;
}

.modal-button-default:hover {
    background-color: #4b5563;
}

/* Sidebar Flutuante (removida - agora usando sidebar colapsível) */

/* Responsividade da Topbar */
@media (max-width: 768px) {
    .modern-topbar {
        padding: 0 1rem;
    }
    
    .topbar-logo {
        height: 40px;
        max-width: 160px;
        width: 160px;
    }
    
    .profile-btn {
        width: 45px;
        height: 45px;
    }
    
    .profile-btn i {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .modern-topbar {
        padding: 0 0.75rem;
    }
    
    .topbar-logo {
        height: 35px;
        max-width: 140px;
        width: 140px;
    }
    
    .profile-btn {
        width: 40px;
        height: 40px;
    }
    
    .profile-btn i {
        font-size: 16px;
    }
}

/* FORÇA TOPBAR PRETA - DEVE SER A ÚLTIMA REGRA */
.modern-topbar,
.modern-topbar.sidebar-collapsed,
header.modern-topbar,
header.modern-topbar.sidebar-collapsed {
    background: #000000 !important;
    background-image: none !important;
    background-color: #000000 !important;
}
