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

:root {
    /* Color Palette - Clean & Corporate Blue Theme */
    --bg-primary: #f8fafc;        /* Slate 50 - Fundo principal da página */
    --bg-secondary: #ffffff;      /* Branco - Fundo dos painéis e cards */
    --bg-tertiary: #f1f5f9;       /* Slate 100 - Fundo dos inputs e tabelas */
    
    --accent-color: #0284c7;      /* Sky 600 - Azul corporativo principal */
    --accent-hover: #0369a1;      /* Sky 700 - Hover do azul */
    --accent-light: rgba(2, 132, 199, 0.08); /* Azul transparente suave */
    
    /* Text - "Letra Azul" / Tons Marinho e Slate */
    --text-primary: #0f2d59;      /* Azul Marinho Escuro */
    --text-secondary: #334155;    /* Slate 700 - Texto secundário */
    --text-muted: #64748b;        /* Slate 500 - Texto atenuado/dicas */
    
    /* Status Colors */
    --status-waiting: #475569;
    --status-waiting-bg: rgba(71, 85, 105, 0.08);
    
    --status-progress: #2563eb;
    --status-progress-bg: rgba(37, 99, 235, 0.08);
    
    --status-completed: #10b981;
    --status-completed-bg: rgba(16, 185, 129, 0.08);
    
    --info-blue: #0ea5e9;
    --info-blue-bg: rgba(14, 165, 233, 0.08);
    
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.08);
    
    /* Layout & Borders */
    --border-color: #e2e8f0;       /* Slate 200 - Bordas suaves e visíveis */
    --border-focus: rgba(2, 132, 199, 0.4);
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    --box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.05), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

/* Base resets & styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-hover);
}

/* Clean glassmorphism panel helper - Light Mode */
.glass-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
}

/* Navigation bar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, #0f2d59 0%, #173d73 100%);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(15, 45, 89, 0.15);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.3rem;
    color: #ffffff;
}

.brand-icon {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-color);
    background-color: var(--accent-light);
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 2rem auto;
    padding: 0 1.5rem;
    flex-grow: 1;
}

/* Typography styles */
h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

p.subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

/* Button styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--border-radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.2);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(2, 132, 199, 0.3);
}

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

.btn-secondary:hover {
    background-color: #e2e8f0;
    color: var(--text-primary);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

/* Form controls */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.label-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.8rem 1rem;
    border-radius: var(--border-radius-md);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-light);
    background-color: var(--bg-secondary);
}

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

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%230f2d59'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

/* Grid helper */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-waiting {
    background-color: var(--status-waiting-bg);
    color: var(--status-waiting);
    border: 1px solid rgba(71, 85, 105, 0.15);
}

.badge-progress {
    background-color: var(--status-progress-bg);
    color: var(--status-progress);
    border: 1px solid rgba(37, 99, 235, 0.15);
}

.badge-completed {
    background-color: var(--status-completed-bg);
    color: var(--status-completed);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

/* Tooltip UI Component */
.tooltip-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.tooltip-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--info-blue-bg);
    color: var(--info-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    border: 1px solid rgba(14, 165, 233, 0.2);
    transition: all var(--transition-fast);
}

.tooltip-container:hover .tooltip-icon {
    background-color: var(--info-blue);
    color: #ffffff;
    transform: scale(1.1);
}

.tooltip-box {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 250px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 0.8rem;
    line-height: 1.4;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    z-index: 10;
}

.tooltip-box::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: var(--bg-secondary) transparent transparent transparent;
}

.tooltip-container:hover .tooltip-box,
.tooltip-container:focus-within .tooltip-box {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* Admin Dashboard CSS */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-info h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.stat-info p {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

.stat-icon.waiting {
    background-color: var(--status-waiting-bg);
    color: var(--status-waiting);
}

.stat-icon.progress {
    background-color: var(--status-progress-bg);
    color: var(--status-progress);
}

.stat-icon.completed {
    background-color: var(--status-completed-bg);
    color: var(--status-completed);
}

/* Admin Panels */
.admin-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
}

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

.panel-card {
    padding: 2rem;
}

.table-responsive {
    overflow-x: auto;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    text-align: left;
}

.custom-table th, .custom-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.custom-table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.custom-table tbody tr {
    transition: background-color var(--transition-fast);
}

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

.action-btn {
    background: none;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
    font-size: 0.85rem;
    font-weight: 600;
}

.action-btn:hover {
    background-color: var(--accent-light);
    color: var(--accent-hover);
}

/* Notification log panel */
.notification-log {
    margin-top: 2rem;
    padding: 1.5rem;
}

.log-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
    max-height: 180px;
    overflow-y: auto;
}

.log-item {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius-sm);
    background-color: var(--bg-tertiary);
    border-left: 3px solid var(--status-progress);
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
}

.log-item.email-sent {
    border-left-color: var(--status-completed);
}

.log-item .time {
    color: var(--text-muted);
}

/* Client Portal Login */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    padding: 2rem;
}

.login-card {
    max-width: 450px;
    width: 100%;
    padding: 2.5rem;
    text-align: center;
}

.login-card h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.login-card p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Multi-step Form UI */
.form-card {
    max-width: 800px;
    width: 100%;
    margin: 0 auto 3rem auto;
    padding: 2.5rem;
}

.stepper {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 3rem;
}

.stepper::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--bg-tertiary);
    z-index: 1;
}

.stepper-progress {
    position: absolute;
    top: 20px;
    left: 0;
    width: 0%;
    height: 3px;
    background-color: var(--accent-color);
    z-index: 1;
    transition: width var(--transition-normal);
}

.step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    border: 3px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition-normal);
}

.step.active .step-number {
    background-color: var(--bg-secondary);
    border-color: var(--accent-color);
    color: var(--accent-color);
    box-shadow: 0 0 10px rgba(2, 132, 199, 0.15);
}

.step.completed .step-number {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #ffffff;
}

.step-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color var(--transition-normal);
}

.step.active .step-label {
    color: var(--accent-color);
}

.step.completed .step-label {
    color: var(--text-primary);
}

.form-step-content {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.form-step-content.active {
    display: block;
}

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

.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* File Upload Drag & Drop Area */
.file-upload-wrapper {
    position: relative;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 2.5rem;
    text-align: center;
    background-color: var(--bg-primary);
    transition: all var(--transition-normal);
    cursor: pointer;
    margin-bottom: 1.5rem;
}

.file-upload-wrapper.dragover {
    border-color: var(--accent-color);
    background-color: var(--accent-light);
}

.file-upload-icon {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    transition: color var(--transition-fast);
}

.file-upload-wrapper:hover .file-upload-icon {
    color: var(--accent-color);
}

.file-upload-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.file-upload-text span {
    color: var(--accent-color);
    font-weight: 700;
}

.file-upload-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.file-upload-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Selected Files List */
.selected-files-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
}

.file-item-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.file-item-icon {
    color: var(--accent-color);
    font-size: 1.25rem;
}

.file-item-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.file-item-size {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.file-item-remove {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    border-radius: var(--border-radius-sm);
    transition: background-color var(--transition-fast);
}

.file-item-remove:hover {
    background-color: var(--danger-bg);
}

/* Footer */
footer {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    margin-top: auto;
}

/* Success screen */
.success-screen {
    text-align: center;
    padding: 3rem 1.5rem;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--status-completed-bg);
    color: var(--status-completed);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin-bottom: 2rem;
    border: 2px solid rgba(16, 185, 129, 0.2);
    animation: scaleUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Feedback de CPF no Login */
.feedback-message {
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    margin-bottom: 1.25rem;
    text-align: left;
    display: none;
    animation: fadeIn var(--transition-fast) forwards;
}

.success-message {
    background-color: var(--status-completed-bg);
    color: var(--status-completed);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.info-message {
    background-color: var(--info-blue-bg);
    color: var(--accent-color);
    border: 1px solid rgba(2, 132, 199, 0.2);
}

.error-message {
    background-color: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Campos de registro com slideDown suave */
#register-fields {
    animation: slideDown 0.3s ease-out forwards;
    border-top: 1px solid var(--border-color);
    margin-top: 1.25rem;
    padding-top: 1.25rem;
}

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

/* Links da Navbar Escura */
.navbar .nav-link {
    color: rgba(255, 255, 255, 0.7);
}

.navbar .nav-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar .nav-link.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.15);
}

/* Responsividade para Dispositivos Móveis */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
        margin: 1rem auto;
    }
    
    .form-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .stepper {
        margin-bottom: 2rem;
    }

    .step-label {
        font-size: 0.65rem;
        max-width: 80px;
        text-align: center;
    }

    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 576px) {
    .navbar {
        padding: 0.75rem 1rem;
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .brand {
        font-size: 1.1rem;
        justify-content: center;
    }

    .stepper {
        gap: 0.5rem;
    }

    .step-label {
        display: none; /* Esconde os textos longos do stepper em telas muito pequenas */
    }

    .radio-tabs {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .radio-tab {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 100px;
    }

    .radio-tab-label {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }

    /* Empilhar botões de navegação no mobile */
    .form-navigation {
        flex-direction: column-reverse;
        gap: 0.75rem;
        align-items: stretch;
        margin-top: 2rem;
        padding-top: 1.25rem;
    }

    .form-navigation > div {
        width: 100%;
    }

    .form-navigation > div[style*="display: flex"],
    .form-navigation > div {
        display: flex !important;
        flex-direction: column;
        gap: 0.75rem;
    }

    .form-navigation .btn {
        width: 100%;
        margin: 0;
    }
}

/* ASSINATURA GNEO - LIVING CODE */
.dev-signature {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    background: rgba(15, 45, 89, 0.03);
    border: 1px solid rgba(15, 45, 89, 0.1);
    border-radius: 10px;
    color: #64748b;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.dev-signature:hover {
    color: #fff;
    border-color: #d4af37; /* Cor de Destaque (Accent) */
    background: #0f2d59; /* Fundo azul marinho escuro no hover para contrastar com páginas claras */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 45, 89, 0.15);
}

.dev-text {
    display: inline-block;
    min-width: 140px;
    text-align: center;
    transition: text-shadow 0.3s;
}

.dev-signature:hover .dev-text {
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

.dev-signature .tooltip-box {
    position: absolute;
    bottom: 140%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #0f172a;
    color: #f1f5f9;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #1e293b;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 100;
}

.dev-signature:hover .tooltip-box {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.fa-heart.pulse-red {
    color: #ef4444;
    animation: heartBeat 1.5s infinite;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

