/* ═══════════════════════════════════════════════════════
   PRONAMPE 2026 - Tema Identidade Visual Gov.br
   Cores e padrões baseados em https://www.gov.br
   ═══════════════════════════════════════════════════════ */

:root {
    --gov-blue: #1659BF;
    --gov-blue-dark: #0C326F;
    --gov-blue-hover: #1351B4;
    --gov-navy: #071D41;
    --gov-navy-light: #0F3B5C;
    --gov-link: #2670E8;
    --gov-green: #13562E;
    --gov-green-light: #168E4A;
    --gov-yellow: #FFCD07;
    --gov-yellow-dark: #E5B800;
    --white: #FFFFFF;
    --gray-bg: #F2F2F2;
    --gray-50: #F5F5F5;
    --gray-100: #E8E8E8;
    --gray-200: #D9D9D9;
    --gray-300: #CCCCCC;
    --gray-400: #999999;
    --gray-500: #666666;
    --gray-700: #333333;
    --gray-900: #1A1A1A;
    --red: #D32F2F;
    --red-bg: #FFEBEE;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --transition: 0.2s ease;
    --font: 'Rawline', 'Segoe UI', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
    font-family: var(--font);
    background: var(--gray-bg);
    color: var(--gray-700);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 860px; }

a { color: var(--gov-link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ══ TOP BAR - Faixa preta superior gov.br ══ */
.gov-topbar {
    background: var(--gray-900);
    color: var(--white);
    font-size: 11px;
    padding: 5px 0;
}
.gov-topbar .container { display: flex; align-items: center; gap: 16px; }
.gov-topbar a { color: var(--gray-300); font-size: 11px; }
.gov-topbar a:hover { color: var(--white); text-decoration: underline; }

/* ══ COOKIE BAR ══ */
.cookie-bar {
    background: #E0E0E0;
    padding: 12px 0;
    font-size: 13px;
    color: var(--gray-700);
    display: none;
}
.cookie-bar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.cookie-bar .cookie-text { max-width: 700px; line-height: 1.4; }
.cookie-bar .cookie-btn {
    background: var(--gov-blue);
    color: var(--white);
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}

/* ══ HEADER GOV.BR ══ */
.header {
    background: var(--gov-navy);
    color: var(--white);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
}
.header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}
.header-logo {
    width: auto;
    height: auto;
    background: transparent;
    display: flex;
    align-items: center;
}
.header-logo-svg {
    width: 100px;
    height: 34px;
}
.header-divider {
    width: 1px;
    height: 34px;
    background: rgba(255,255,255,0.3);
}
.header-title h1 {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: 0.2px;
    color: var(--white);
}
.header-title h1 strong {
    font-weight: 700;
    font-size: 15px;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}
.header-btn {
    background: transparent;
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.4);
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.header-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.7);
    text-decoration: none;
}
.header-btn-primary {
    background: var(--gov-yellow);
    color: var(--gray-900);
    border: none;
    font-weight: 700;
    padding: 7px 18px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
}
.header-btn-primary:hover {
    background: var(--gov-yellow-dark);
    text-decoration: none;
}

/* ══ HERO ══ */
.hero {
    background: linear-gradient(135deg, #0F3B5C 0%, #0C326F 100%);
    padding: 48px 0 40px;
    text-align: center;
    color: var(--white);
    border-bottom: none;
}
.hero h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 10px;
}
.hero p {
    font-size: 16px;
    color: rgba(255,255,255,0.85);
    max-width: 600px;
    margin: 0 auto;
}
.hero-highlights {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin-top: 24px;
    flex-wrap: wrap;
}
.hero-highlight {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.08);
    padding: 8px 16px;
    border-radius: 20px;
}
.hero-highlight .icon {
    width: 28px;
    height: 28px;
    background: var(--gov-yellow);
    color: var(--gray-900);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

/* ══ STEPS ══ */
.steps-bar {
    display: flex;
    justify-content: center;
    gap: 0;
    padding: 20px 16px;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    flex-wrap: wrap;
}
.step-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-400);
    white-space: nowrap;
}
.step-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--gray-200);
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    transition: var(--transition);
}
.step-item.active { color: var(--gov-blue); font-weight: 700; }
.step-item.active .step-num { background: var(--gov-blue); color: var(--white); }
.step-item.done { color: var(--gov-blue-dark); }
.step-item.done .step-num { background: var(--gov-blue); color: var(--white); }
.step-line {
    width: 36px;
    height: 2px;
    background: var(--gray-200);
    margin: 0 6px;
    transition: var(--transition);
}
.step-line.done { background: var(--gov-blue); }

/* ══ CARD ══ */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 28px 30px;
    border: 1px solid var(--gray-100);
    margin-bottom: 20px;
}
.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 6px;
}
.card-subtitle {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 20px;
}

/* ══ FORMS ══ */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: var(--gray-700);
    margin-bottom: 5px;
}
.form-group label .required { color: var(--red); }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    color: var(--gray-900);
    background: var(--white);
    transition: var(--transition);
    outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--gov-blue);
    box-shadow: 0 0 0 3px rgba(22, 89, 191, 0.1);
}
.form-group input.error { border-color: var(--red); background: var(--red-bg); }
.form-error { font-size: 12px; color: var(--red); margin-top: 4px; display: none; }
.form-error.show { display: block; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ══ BUTTONS ══ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 24px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    text-decoration: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
    background: var(--gov-blue);
    color: var(--white);
    width: 100%;
}
.btn-primary:hover:not(:disabled) { background: var(--gov-blue-hover); transform: translateY(-1px); }
.btn-outline {
    background: var(--white);
    color: var(--gov-blue);
    border: 1.5px solid var(--gov-blue);
}
.btn-outline:hover { background: #E8F0FE; }
.btn-yellow {
    background: var(--gov-yellow);
    color: var(--gray-900);
    width: 100%;
    padding: 14px;
    font-size: 15px;
}
.btn-yellow:hover:not(:disabled) { background: var(--gov-yellow-dark); }
.btn-sm { padding: 7px 14px; font-size: 12px; border-radius: 18px; }
.btn-group { display: flex; gap: 12px; margin-top: 20px; }
.btn-group .btn { flex: 1; }

/* ══ ALERTS ══ */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    margin-bottom: 14px;
    line-height: 1.5;
}
.alert-info    { background: #E8F0FE; color: #0C326F; border: 1px solid #C5D9F7; }
.alert-warning { background: #FFF8E1; color: #E65100; border: 1px solid #FFE082; }
.alert-success { background: #E8F5E9; color: #1B5E20; border: 1px solid #C8E6C9; }
.alert-danger  { background: var(--red-bg); color: #C62828; border: 1px solid #FFCDD2; }

/* ══ SIMULATOR ══ */
.simulator-box {
    background: #F8F9FA;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
}
.simulator-box label { font-weight: 600; font-size: 14px; color: var(--gray-700); display: block; margin-bottom: 8px; }
.range-group { margin-bottom: 18px; }
.range-values { display: flex; justify-content: space-between; font-size: 11px; color: var(--gray-400); margin-bottom: 4px; }
.range-current { text-align: center; font-weight: 700; font-size: 18px; color: var(--gov-blue-dark); margin-top: 4px; }
input[type="range"] {
    width: 100%;
    height: 6px;
    -webkit-appearance: none; appearance: none;
    background: var(--gray-200); border-radius: 3px; outline: none; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; width: 24px; height: 24px;
    background: var(--gov-blue); border-radius: 50%; cursor: pointer;
    border: 2px solid var(--white); box-shadow: var(--shadow-sm);
}
.sim-result {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    border: 1px solid var(--gray-100);
}
.sim-result .label { font-size: 12px; color: var(--gray-400); }
.sim-result .value { font-size: 20px; font-weight: 800; color: var(--gov-blue-dark); }

/* ══ COMPANY CARD ══ */
.company-card {
    background: #F8F9FA;
    border: 1.5px solid #C5D9F7;
    border-radius: var(--radius-md);
    padding: 16px 18px;
    margin: 14px 0;
}
.company-card h4 { font-size: 15px; font-weight: 700; color: var(--gov-blue-dark); margin-bottom: 10px; }
.info-row {
    display: flex; justify-content: space-between; padding: 4px 0;
    font-size: 13px; border-bottom: 1px solid #E8F0FE; flex-wrap: wrap; gap: 4px;
}
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--gray-400); }
.info-value { font-weight: 600; color: var(--gray-900); text-align: right; }

/* ══ BADGES ══ */
.badge-status { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; }
.badge-active  { background: #C8E6C9; color: #1B5E20; }
.badge-pending { background: #FFF9C4; color: #F57F17; }
.badge-paid    { background: #C8E6C9; color: #1B5E20; }
.badge-rejected { background: #FFCDD2; color: #B71C1C; }

/* ══ PAYMENT BOX ══ */
.payment-box {
    background: #FFF8E1;
    border: 2px solid var(--gov-yellow);
    border-radius: var(--radius-lg);
    padding: 22px;
    text-align: center;
    margin: 16px 0;
}
.payment-box .price { font-size: 34px; font-weight: 900; color: var(--gov-blue-dark); margin: 8px 0; }
.pix-qr {
    width: 160px; height: 160px; background: var(--white);
    border-radius: var(--radius-md); margin: 12px auto;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--gray-200);
}
.pix-key {
    background: var(--white); border: 1px dashed var(--gray-300);
    border-radius: var(--radius-sm); padding: 10px;
    font-family: 'Courier New', monospace; font-size: 12px;
    word-break: break-all; color: var(--gray-700); margin: 6px 0;
}

/* ══ ANALYSIS OVERLAY ══ */
.analysis-overlay {
    position: fixed;
    inset: 0;
    background: rgba(7, 29, 65, 0.85);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.analysis-box {
    background: var(--white);
    border-radius: 16px;
    padding: 36px 40px;
    text-align: center;
    max-width: 520px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.analysis-box h3 { font-size: 17px; font-weight: 700; color: var(--gov-blue-dark); margin-bottom: 6px; }
.analysis-box p { font-size: 13px; color: var(--gray-500); margin-bottom: 20px; }
.banks-grid {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin: 12px 0;
}
.bank-logo {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: #F0F0F0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: var(--gray-700);
    border: 2px solid var(--gray-200);
    transition: all 0.4s ease;
    opacity: 0.3;
    transform: scale(0.8);
}
.bank-logo.checked {
    opacity: 1;
    transform: scale(1);
    border-color: var(--gov-blue);
    background: #E8F0FE;
    box-shadow: 0 0 0 4px rgba(22, 89, 191, 0.15);
}
.bank-logo.checked::after {
    content: '✓';
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    background: var(--gov-blue);
    color: var(--white);
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* ══ SUCCESS BANNER ══ */
.success-banner {
    background: #E8F5E9;
    border: 2px solid #1B5E20;
    border-radius: var(--radius-lg);
    padding: 22px;
    text-align: center;
    margin: 16px 0;
    animation: fadeIn 0.5s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.success-banner h3 { color: #1B5E20; font-size: 18px; margin-bottom: 6px; }
.email-destaque {
    font-size: 16px;
    font-weight: 700;
    color: var(--gov-blue-dark);
    background: #E8F0FE;
    padding: 8px 16px;
    border-radius: 8px;
    display: inline-block;
    margin: 8px 0;
}

/* ══ TRACKING ══ */
.tracking-header {
    background: var(--gov-navy);
    color: var(--white);
    padding: 32px 0;
    text-align: center;
}
.tracking-timeline { position: relative; padding-left: 28px; }
.tracking-timeline::before {
    content: ''; position: absolute; left: 10px; top: 0; bottom: 0;
    width: 3px; background: var(--gray-200);
}
.tracking-step {
    position: relative; padding: 10px 0 10px 18px; border-bottom: 1px solid var(--gray-100);
}
.tracking-step::before {
    content: ''; position: absolute; left: -21px; top: 16px;
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--gray-200); border: 2px solid var(--white);
}
.tracking-step.done::before { background: var(--gov-blue); }
.tracking-step.current::before {
    background: var(--gov-yellow);
    box-shadow: 0 0 0 4px rgba(255, 205, 7, 0.3);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(255, 205, 7, 0.3); }
    50% { box-shadow: 0 0 0 8px rgba(255, 205, 7, 0.1); }
}

/* ══ POLLING ══ */
.polling-indicator {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; color: var(--gray-400); justify-content: center; margin-top: 10px;
}
.polling-dot {
    width: 8px; height: 8px; background: var(--gov-blue);
    border-radius: 50%; animation: pulse-dot 1.5s infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.7); }
}

/* ══ TABLES (ADMIN) ══ */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data-table thead { background: var(--gov-navy); color: var(--white); }
table.data-table th {
    padding: 10px 12px; text-align: left; font-weight: 600;
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
}
table.data-table td { padding: 9px 12px; border-bottom: 1px solid var(--gray-100); }
table.data-table tbody tr:hover { background: #E8F0FE; }

/* ══ DASHBOARD CARDS ══ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card {
    background: var(--white); border-radius: var(--radius-md);
    padding: 18px; border: 1px solid var(--gray-100); box-shadow: var(--shadow-sm);
}
.stat-card .stat-value { font-size: 28px; font-weight: 800; color: var(--gov-blue-dark); }
.stat-card .stat-label { font-size: 12px; color: var(--gray-400); margin-top: 4px; }

/* ══ ADMIN LAYOUT ══ */
.admin-body { display: flex; min-height: calc(100vh - 130px); }
.admin-sidebar {
    width: 230px; background: var(--gov-navy); color: var(--white); padding: 16px 0; flex-shrink: 0;
}
.admin-sidebar a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 20px; color: var(--gray-300); text-decoration: none;
    font-size: 13px; font-weight: 500; transition: var(--transition);
}
.admin-sidebar a:hover, .admin-sidebar a.active { background: var(--gov-blue); color: var(--white); }
.admin-sidebar .sidebar-brand { padding: 8px 20px 18px; font-weight: 800; font-size: 15px; color: var(--gov-yellow); }
.admin-main { flex: 1; padding: 20px; overflow-x: auto; }

/* ══ LOGIN ══ */
.login-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--gov-navy) 0%, var(--gov-blue-dark) 100%);
}
.login-card {
    background: var(--white); border-radius: var(--radius-lg);
    padding: 36px; width: 100%; max-width: 400px; box-shadow: var(--shadow-lg);
}

/* ══ LOADING ══ */
.loading-spinner {
    display: inline-block; width: 18px; height: 18px;
    border: 2.5px solid rgba(255,255,255,0.3); border-top-color: var(--white);
    border-radius: 50%; animation: spin 0.6s linear infinite;
}
.spinner-dark { border-color: rgba(22,89,191,0.2); border-top-color: var(--gov-blue); }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    z-index: 200; align-items: center; justify-content: center;
}
.loading-overlay.show { display: flex; }
.loading-box {
    background: var(--white); border-radius: var(--radius-lg);
    padding: 28px 36px; text-align: center; box-shadow: var(--shadow-lg);
}

/* ══ FOOTER ══ */
.footer {
    background: var(--gov-navy);
    color: var(--gray-400);
    padding: 24px 0;
    font-size: 12px;
    text-align: center;
}
.footer .container { opacity: 0.8; }
.footer strong { color: var(--white); }
.footer-links {
    display: flex; justify-content: center; gap: 20px; flex-wrap: wrap;
    margin-bottom: 10px;
}
.footer-links a { color: var(--gray-300); font-size: 12px; }

/* ══ PROTOCOL BOX ══ */
.protocol-box {
    background: #E8F0FE; border: 1.5px solid #C5D9F7;
    border-radius: var(--radius-md); padding: 14px 18px; text-align: center; margin: 14px 0;
}
.protocol-box .proto {
    font-size: 22px; font-weight: 900; color: var(--gov-blue);
    letter-spacing: 1px; font-family: 'Courier New', monospace;
}

/* ══ TAB NAV ══ */
.tab-nav { display: flex; gap: 0; margin-bottom: 18px; border-bottom: 2px solid var(--gray-200); }
.tab-nav a {
    padding: 9px 18px; text-decoration: none; font-weight: 600;
    font-size: 13px; color: var(--gray-500); border-bottom: 2px solid transparent;
    margin-bottom: -2px; transition: var(--transition);
}
.tab-nav a.active { color: var(--gov-blue); border-bottom-color: var(--gov-blue); }

/* ══ RESPONSIVE ══ */
@media (max-width: 768px) {
    .admin-sidebar { width: 55px; }
    .admin-sidebar a span { display: none; }
    .admin-sidebar .sidebar-brand { font-size: 13px; padding: 6px 10px 16px; }
    .form-row, .stats-grid { grid-template-columns: 1fr; }
    .btn-group { flex-direction: column; }
    .header-title h1 { font-size: 11px; }
    .header-actions { gap: 8px; }
    .header-btn, .header-btn-primary { font-size: 11px; padding: 5px 12px; }
}
@media (max-width: 480px) {
    .card { padding: 18px 14px; }
    .login-card { padding: 22px; }
    .hero h2 { font-size: 20px; }
    .hero-highlights { gap: 10px; }
    .step-item { font-size: 10px; gap: 5px; }
    .step-line { width: 16px; margin: 0 3px; }
    .step-num { width: 22px; height: 22px; font-size: 10px; }
    .bank-logo { width: 42px; height: 42px; }
}
