:root {
    --primary: #072DD7;
    --primary-dark: #05219e;
    --primary-light: #eef2ff;
    --secondary: #059669;
    --secondary-dark: #047857;
    --secondary-light: #ecfdf5;
    --accent: #f59e0b;
    --dark: #1e293b;
    --gray-600: #475569;
    --gray-400: #94a3b8;
    --gray-200: #e2e8f0;
    --gray-100: #f1f5f9;
    --light: #f8fafc;
    --white: #ffffff;
    --danger: #dc2626;
    --danger-light: #fef2f2;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-md: 10px;
    --radius-lg: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: #f1f5f9;
    color: var(--dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Institutional Header / Banner */
.portal-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1.25rem 0;
    box-shadow: var(--shadow-md);
}

.portal-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: white;
}

.portal-brand:hover {
    color: #e2e8f0;
}

/* FUNCITERN Logo Styles */
.funcitern-logo-header {
    height: 52px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.funcitern-logo-card {
    height: 80px;
    width: auto;
    object-fit: contain;
    margin-bottom: 0.75rem;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}

.funcitern-logo-comprovante {
    height: 70px;
    width: auto;
    object-fit: contain;
    margin-bottom: 0.75rem;
}

.brand-badge {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Auth Cards (Cadastro & Login) */
.auth-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
}

.auth-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    width: 100%;
    max-width: 540px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 2rem 1.75rem 2rem;
    text-align: center;
    color: white;
}

.auth-header h3 {
    color: white !important;
}

.auth-header p {
    color: rgba(255, 255, 255, 0.85) !important;
}

.auth-body {
    padding: 2rem;
}

.auth-footer {
    background-color: #f8fafc;
    border-top: 1px solid var(--gray-200);
    padding: 1.25rem 2rem;
    text-align: center;
    font-size: 0.9rem;
}

/* Form Elements */
.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 0.35rem;
}

.form-control, .form-select {
    border-radius: 8px;
    border: 1.5px solid var(--gray-200);
    padding: 0.65rem 0.9rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(7, 45, 215, 0.18);
}

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

.input-icon-group .form-control {
    padding-left: 2.5rem;
}

.input-icon-group .input-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    pointer-events: none;
}

/* Bootstrap Color Overrides */
.text-primary {
    color: var(--primary) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

.bg-primary-subtle {
    background-color: rgba(7, 45, 215, 0.12) !important;
    color: var(--primary) !important;
}

.btn-outline-primary {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.btn-outline-primary:hover {
    background-color: var(--primary) !important;
    color: #ffffff !important;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    border: none !important;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #05219e 0%, #031566 100%) !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--dark);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 0.7rem 1.25rem;
    font-weight: 600;
}

.btn-secondary:hover {
    background: var(--gray-200);
    color: var(--dark);
}

.btn-success {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    border: none;
    border-radius: 8px;
    font-weight: 600;
}

.btn-success:hover {
    background: #047857;
}

/* Dashboard Styles */
.dashboard-container {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.candidate-welcome-card {
    background: linear-gradient(135deg, var(--primary) 0%, #031566 100%);
    color: white;
    border-radius: var(--radius-lg);
    padding: 1.75rem 2rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

.candidate-avatar {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.card-custom {
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-custom .card-header {
    background-color: #fafbfc;
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 1.5rem;
    font-weight: 700;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-custom .card-body {
    padding: 1.5rem;
}

/* Status Badges */
.badge-isencao {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-pagamento {
    background-color: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-status-analise {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.badge-status-deferido {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.badge-status-indeferido {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.badge-status-pendente {
    background-color: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

/* Info Grid */
.info-row {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    flex-wrap: wrap;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    width: 200px;
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.9rem;
}

.info-value {
    flex: 1;
    color: var(--dark);
    font-size: 0.95rem;
    word-break: break-word;
}

/* Document Download Cards */
.doc-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.doc-card:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.doc-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.doc-icon {
    font-size: 1.5rem;
    color: #dc2626;
}

.doc-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark);
}

.doc-meta {
    font-size: 0.78rem;
    color: var(--gray-400);
}

/* Nav Tabs Custom */
.nav-pills-custom .nav-link {
    color: var(--gray-600);
    font-weight: 600;
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    transition: all 0.2s;
    background: white;
    border: 1px solid var(--gray-200);
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.nav-pills-custom .nav-link.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.nav-pills-custom .nav-link:hover:not(.active) {
    background: var(--gray-100);
    color: var(--primary);
}

/* Timeline of Appeals / Edital */
.edital-phase-card {
    border-left: 4px solid var(--primary);
    background: white;
    padding: 1rem 1.25rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

/* Footer */
.portal-footer {
    background-color: var(--white);
    border-top: 1px solid var(--gray-200);
    padding: 1.5rem 0;
    color: var(--gray-600);
    font-size: 0.85rem;
    margin-top: auto;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    body {
        background-color: white !important;
    }
    .card-custom {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}
