/* ============================================
   CONSULTA CPF — STYLE SYSTEM v3
   Theme: Premium Gov
   ============================================ */

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

:root {
    --primary: #1a56db;
    --primary-hover: #1348c0;
    --primary-light: #eff6ff;
    --primary-ultra: #dbeafe;
    --accent: #0ea5e9;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --error: #ef4444;
    --error-light: #fee2e2;
    --cyan: #0ea5e9;
    --cyan-light: #e0f2fe;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-150: #eef0f3;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.06);
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.10), 0 4px 12px rgba(0,0,0,0.06);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.12), 0 8px 24px rgba(0,0,0,0.07);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: #eef2f7;
    color: var(--gray-800);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   UTILITIES
   ============================================ */
.hidden { display: none !important; }

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pulseGlow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(0.88); }
}
@keyframes float1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-30px, 20px); }
}
@keyframes float2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, -30px); }
}
@keyframes float3 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
}
@keyframes msgFade {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ============================================
   AUTH PAGE
   ============================================ */
.auth-body {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f0fe 50%, #f5f3ff 100%);
    padding: 20px;
    position: relative; overflow: hidden;
}
.auth-container {
    position: relative; z-index: 1;
    width: 100%; max-width: 440px;
    animation: fadeInUp 0.6s ease-out;
}
.auth-card {
    background: var(--white);
    border-radius: var(--radius-2xl);
    padding: 48px 40px;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255,255,255,0.9);
}
.auth-header { text-align: center; margin-bottom: 32px; }
.auth-title { font-size: 26px; font-weight: 800; color: var(--gray-900); margin-bottom: 8px; letter-spacing: -0.5px; }
.auth-subtitle { font-size: 15px; color: var(--gray-500); }
.auth-error {
    display: flex; align-items: center; gap: 10px;
    background: var(--error-light); color: var(--error);
    padding: 12px 16px; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 500;
    margin-bottom: 24px;
    border: 1px solid #fca5a5;
    animation: slideDown 0.3s ease-out;
    transition: var(--transition-slow);
}
.auth-form { display: flex; flex-direction: column; gap: 20px; }
.auth-field { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-size: 14px; font-weight: 600; color: var(--gray-700); }
.field-wrapper { position: relative; display: flex; align-items: center; }
.field-icon {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--gray-400); pointer-events: none; z-index: 1;
    display: flex; align-items: center;
}
.field-input {
    width: 100%; height: 52px;
    padding: 0 48px 0 46px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-family: var(--font); font-size: 15px; color: var(--gray-800);
    background: var(--white); transition: var(--transition); outline: none;
}
.field-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}
.field-input::placeholder { color: var(--gray-400); font-size: 14px; }
.field-toggle {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer;
    color: var(--gray-400); display: flex; align-items: center;
    padding: 4px; border-radius: 6px; transition: var(--transition);
}
.field-toggle:hover { color: var(--gray-600); background: var(--gray-100); }

/* auth-logo-icon — sem fundo colorido */
.auth-logo-icon {
    width: 72px; height: 72px;
    border-radius: var(--radius-lg);
    display: flex; align-items: center; justify-content: center;
}
.btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 52px; padding: 0 28px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white; border: none; border-radius: var(--radius-md);
    font-family: var(--font); font-size: 15px; font-weight: 600;
    cursor: pointer; transition: var(--transition);
    box-shadow: 0 4px 14px rgba(26,86,219,0.4);
    position: relative; overflow: hidden;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(26,86,219,0.5); }
.btn-primary:active { transform: translateY(0); }
.btn-full { width: 100%; }
.btn-secondary {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 42px; padding: 0 18px;
    background: var(--white); color: var(--gray-700);
    border: 1.5px solid var(--gray-200); border-radius: var(--radius-md);
    font-family: var(--font); font-size: 14px; font-weight: 500;
    cursor: pointer; transition: var(--transition);
}
.btn-secondary:hover { background: var(--gray-50); border-color: var(--gray-300); }
.btn-loader { display: flex; align-items: center; gap: 8px; }
.auth-footer { text-align: center; margin-top: 24px; font-size: 13px; color: var(--gray-400); }

/* ============================================
   APP LAYOUT
   ============================================ */
.app-body {
    min-height: 100vh;
    display: flex; flex-direction: column;
    background: #eef2f7;
}

/* ============================================
   HEADER
   ============================================ */
.app-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 1px 8px rgba(0,0,0,0.07);
}
.header-inner {
    max-width: 1100px; margin: 0 auto;
    padding: 0 24px; height: 62px;
    display: flex; align-items: center; justify-content: space-between;
}
.header-brand { display: flex; align-items: center; }
.brand-icon {
    display: flex; align-items: center; justify-content: center;
    height: 40px;
    background: none;
    border: none;
    outline: none;
    box-shadow: none;
    padding: 0;
}
.header-end { display: flex; align-items: center; }
.btn-logout {
    display: flex; align-items: center; gap: 7px;
    padding: 8px 16px;
    background: transparent;
    color: var(--gray-500);
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-full);
    font-family: var(--font); font-size: 13px; font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}
.btn-logout:hover {
    background: #fef2f2;
    color: var(--error);
    border-color: #fca5a5;
}

/* ============================================
   SEARCH SECTION
   ============================================ */
.search-section {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 48px 24px;
}
.search-container {
    max-width: 680px; margin: 0 auto;
    display: flex; flex-direction: column; gap: 24px;
    animation: fadeInUp 0.5s ease-out;
}
.search-header { text-align: center; }
.search-title {
    font-size: 30px; font-weight: 800;
    color: var(--gray-900); margin-bottom: 8px;
    letter-spacing: -0.7px;
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--primary) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.search-desc { font-size: 15px; color: var(--gray-500); }
.search-input-group {
    display: flex; align-items: center;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}
.search-input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(26,86,219,0.08);
}
.search-input-icon {
    padding: 0 16px; color: var(--gray-400);
    display: flex; align-items: center; flex-shrink: 0;
}
.search-input {
    flex: 1; height: 60px;
    border: none; outline: none;
    font-family: var(--font); font-size: 18px;
    font-weight: 500; color: var(--gray-800);
    background: transparent; letter-spacing: 1.5px;
}
.search-input::placeholder { color: var(--gray-300); font-weight: 400; letter-spacing: 0.5px; font-size: 16px; }
.btn-search {
    display: flex; align-items: center; gap: 8px;
    height: 60px; padding: 0 28px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white; border: none; cursor: pointer;
    font-family: var(--font); font-size: 15px; font-weight: 600;
    transition: var(--transition); flex-shrink: 0;
    white-space: nowrap;
}
.btn-search:hover { filter: brightness(1.08); }
.btn-search:active { transform: scale(0.98); }
.btn-search .spin-icon { display: none; }
.btn-search.loading .btn-icon, .btn-search.loading .btn-label { display: none; }
.btn-search.loading .spin-icon { display: block !important; animation: spin 0.8s linear infinite; }

/* ============================================
   LOADING — RINGS ONLY
   ============================================ */
.loading-overlay {
    padding: 80px 24px;
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn 0.3s ease;
}
.loading-card {
    background: white;
    border-radius: var(--radius-2xl);
    padding: 56px 48px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    display: flex; flex-direction: column; align-items: center;
    max-width: 340px; width: 100%;
    animation: fadeInUp 0.4s ease;
}
.loading-rings-wrapper {
    position: relative;
    width: 110px; height: 110px;
    margin: 0 auto 28px;
    display: flex; align-items: center; justify-content: center;
}
.loading-ring {
    position: absolute;
    border-radius: 50%;
    border: 3px solid transparent;
}
.loading-ring-1 {
    width: 110px; height: 110px;
    border-top-color: var(--primary);
    border-right-color: rgba(26,86,219,0.15);
    animation: spin 1.1s linear infinite;
}
.loading-ring-2 {
    width: 82px; height: 82px;
    border-top-color: var(--accent);
    border-left-color: rgba(14,165,233,0.15);
    animation: spin 0.8s linear infinite reverse;
}
.loading-ring-3 {
    width: 56px; height: 56px;
    border-top-color: rgba(26,86,219,0.35);
    border-bottom-color: rgba(26,86,219,0.35);
    animation: spin 1.7s linear infinite;
}
.loading-center-icon {
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    animation: pulseGlow 2.2s ease-in-out infinite;
}
.loading-message {
    font-size: 15px; font-weight: 600;
    color: var(--gray-600);
    transition: opacity 0.2s ease;
    animation: msgFade 4s ease-in-out infinite;
}

/* ============================================
   STATE CARDS
   ============================================ */
.state-card {
    max-width: 500px; margin: 64px auto;
    padding: 56px 40px; text-align: center;
    animation: fadeInUp 0.4s ease;
}
.state-icon {
    width: 72px; height: 72px;
    border-radius: 50%; margin: 0 auto 24px;
    display: flex; align-items: center; justify-content: center;
}
.error-icon { background: var(--error-light); color: var(--error); }
.state-title { font-size: 22px; font-weight: 700; color: var(--gray-800); margin-bottom: 12px; }
.state-msg { font-size: 15px; color: var(--gray-500); margin-bottom: 28px; line-height: 1.7; }
.empty-card {
    background: white; border-radius: var(--radius-2xl);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}
.empty-illustration {
    width: 100px; height: 100px;
    background: var(--primary-ultra); border-radius: 50%;
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 24px; opacity: 0.7;
}
.btn-sm { height: 38px !important; font-size: 13px !important; }

/* ============================================
   RESULTS — SINGLE PAGE
   ============================================ */
.results-section {
    padding: 32px 24px 80px;
    animation: fadeInUp 0.5s ease;
}
.results-container { max-width: 1100px; margin: 0 auto; }

/* Profile banner */
.profile-banner {
    background: white;
    border-radius: var(--radius-2xl);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
    padding: 24px 28px;
    display: flex; align-items: center; gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.profile-avatar-wrap { flex-shrink: 0; }
.profile-avatar {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; font-weight: 800; color: white;
    box-shadow: 0 4px 16px rgba(26,86,219,0.3);
    letter-spacing: -1px;
}
.profile-meta { flex: 1; min-width: 0; }
.results-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px;
    background: var(--success-light); color: var(--success);
    border-radius: var(--radius-full); font-size: 12px; font-weight: 700;
    margin-bottom: 6px;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.profile-name {
    font-size: 24px; font-weight: 800;
    color: var(--gray-900); letter-spacing: -0.4px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.profile-cpf { font-size: 14px; color: var(--gray-500); font-weight: 500; margin-top: 2px; }
.btn-nova {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 20px;
    background: var(--gray-100); color: var(--gray-700);
    border: 1.5px solid var(--gray-200); border-radius: var(--radius-full);
    font-family: var(--font); font-size: 14px; font-weight: 600;
    cursor: pointer; transition: var(--transition);
    white-space: nowrap; flex-shrink: 0;
}
.btn-nova:hover { background: var(--gray-200); border-color: var(--gray-300); }

/* All results */
.all-results {
    display: flex; flex-direction: column; gap: 20px;
}

/* Result block */
.result-block {
    background: white;
    border-radius: var(--radius-xl);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: box-shadow 0.25s ease;
}
.result-block:hover { box-shadow: var(--shadow-lg); }

/* Color accents — top border + header bg */
.result-block.accent-blue  { border-top: 3px solid var(--primary); }
.result-block.accent-orange { border-top: 3px solid var(--warning); }
.result-block.accent-cyan  { border-top: 3px solid var(--cyan); }
.result-block.accent-green { border-top: 3px solid var(--success); }
.result-block.accent-red   { border-top: 3px solid var(--error); }

.result-block.accent-blue  .result-block-header { background: linear-gradient(135deg, #f0f7ff, #fff); }
.result-block.accent-orange .result-block-header { background: linear-gradient(135deg, #fffbeb, #fff); }
.result-block.accent-cyan  .result-block-header { background: linear-gradient(135deg, #f0f9ff, #fff); }
.result-block.accent-green .result-block-header { background: linear-gradient(135deg, #f0fdf4, #fff); }
.result-block.accent-red   .result-block-header { background: linear-gradient(135deg, #fef2f2, #fff); }

.result-block-header {
    display: flex; align-items: center; gap: 14px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
}
.result-block-title {
    font-size: 16px; font-weight: 700; color: var(--gray-800); line-height: 1.2;
}
.result-block-sub { font-size: 12px; color: var(--gray-500); margin-top: 3px; }
.result-block-body { padding: 24px; }

/* Section icon */
.section-icon {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.section-icon.blue   { background: var(--primary-ultra); color: var(--primary); }
.section-icon.green  { background: var(--success-light); color: var(--success); }
.section-icon.orange { background: var(--warning-light); color: #d97706; }

/* Sub section headers */
.section-header {
    display: flex; align-items: center; gap: 12px;
    margin: 28px 0 16px; padding-bottom: 14px;
    border-bottom: 1px solid var(--gray-200);
}
.section-header:first-child { margin-top: 0; }
.section-title { font-size: 14px; font-weight: 700; color: var(--gray-700); }
.section-subtitle { font-size: 12px; color: var(--gray-500); margin-top: 2px; }

/* ============================================
   INFO GRID — IMPROVED
   ============================================ */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.info-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-left: 3px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    transition: border-left-color 0.2s ease, box-shadow 0.2s ease;
}
.info-card:hover {
    border-left-color: var(--primary);
    box-shadow: 0 2px 10px rgba(26,86,219,0.08);
}
.info-card-label {
    font-size: 10px; font-weight: 700; color: var(--gray-400);
    text-transform: uppercase; letter-spacing: 0.9px; margin-bottom: 5px;
}
.info-card-value {
    font-size: 14px; font-weight: 600; color: var(--gray-800); word-break: break-word;
    line-height: 1.4;
}
.info-card-value.large { font-size: 17px; font-weight: 800; color: var(--gray-900); }

/* ============================================
   CONTA CARDS (accordion)
   ============================================ */
.conta-card {
    background: white; border: 1px solid var(--gray-200);
    border-radius: var(--radius-md); overflow: hidden;
    margin-bottom: 14px; transition: box-shadow 0.2s ease;
}
.conta-card:last-child { margin-bottom: 0; }
.conta-card:hover { box-shadow: var(--shadow-md); }
.conta-card-header {
    padding: 14px 18px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap; cursor: pointer;
    user-select: none;
}
.conta-card-title { font-size: 14px; font-weight: 700; color: var(--gray-800); }
.conta-card-addr { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.conta-card-body { padding: 18px; }
.conta-card-body .info-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }

/* Badges */
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: var(--radius-full);
    font-size: 11px; font-weight: 700; white-space: nowrap;
    letter-spacing: 0.3px;
}
.badge-success  { background: var(--success-light); color: #065f46; }
.badge-warning  { background: var(--warning-light); color: #92400e; }
.badge-error    { background: var(--error-light); color: #991b1b; }
.badge-gray     { background: var(--gray-100); color: var(--gray-600); }
.badge-blue     { background: var(--primary-light); color: var(--primary); }

/* History Table */
.history-table-wrapper { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--gray-200); }
.history-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.history-table th {
    background: var(--gray-50); padding: 11px 14px;
    text-align: left; font-weight: 700; font-size: 11px;
    color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.6px;
    border-bottom: 1px solid var(--gray-200); white-space: nowrap;
}
.history-table td {
    padding: 11px 14px; border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700); vertical-align: middle;
}
.history-table tr:last-child td { border-bottom: none; }
.history-table tr:hover td { background: var(--gray-50); }

/* Timeline */
.timeline { display: flex; flex-direction: column; }
.timeline-item {
    display: flex; gap: 14px; align-items: flex-start;
    padding: 10px 0; border-bottom: 1px solid var(--gray-100);
}
.timeline-item:last-child { border-bottom: none; }
.timeline-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--primary); flex-shrink: 0; margin-top: 5px;
    box-shadow: 0 0 0 3px rgba(26,86,219,0.14);
}
.timeline-content { flex: 1; }
.timeline-status { font-size: 13px; font-weight: 600; color: var(--gray-800); margin-bottom: 2px; }
.timeline-date { font-size: 12px; color: var(--gray-400); }

/* Debito Card */
.debito-card {
    background: white; border: 1px solid var(--gray-200);
    border-radius: var(--radius-md); overflow: hidden; margin-bottom: 14px;
}
.debito-card:last-child { margin-bottom: 0; }
.debito-header {
    padding: 14px 18px; background: #fff8f8;
    border-bottom: 1px solid var(--gray-200);
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 12px;
}
.debito-valor { font-size: 22px; font-weight: 800; color: var(--error); }
.debito-body { padding: 16px 18px; }
.debito-body .info-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

/* Pontuação Grid */
.pontuacao-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 14px; margin-bottom: 20px;
}
.pontuacao-item {
    background: var(--gray-50); border: 1px solid var(--gray-200);
    border-radius: var(--radius-md); padding: 16px; text-align: center;
}
.pontuacao-label { font-size: 11px; color: var(--gray-500); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.pontuacao-value { font-size: 28px; font-weight: 800; color: var(--gray-800); }
.pontuacao-points { font-size: 12px; color: var(--gray-400); margin-top: 4px; }

/* Empty inside section */
.tab-empty { text-align: center; padding: 44px 20px; color: var(--gray-400); }
.tab-empty svg { margin-bottom: 14px; opacity: 0.35; }
.tab-empty p { font-size: 14px; }

/* ============================================
   FOOTER
   ============================================ */
.app-main { flex: 1; }
.app-footer {
    text-align: center; padding: 20px;
    font-size: 13px; color: var(--gray-400);
    border-top: 1px solid var(--gray-200); background: white;
}

/* ============================================
   RESPONSIVE — TABLET ≤768px
   ============================================ */
@media (max-width: 768px) {
    .header-inner { padding: 0 16px; }
    .search-section { padding: 32px 16px; }
    .search-title { font-size: 24px; }
    .search-input { height: 54px; font-size: 16px; }
    .btn-search { padding: 0 18px; height: 54px; }
    .btn-label { display: none; }
    .results-section { padding: 20px 14px 60px; }
    .profile-name { font-size: 20px; }
    .profile-banner { padding: 18px 20px; gap: 14px; }
    .result-block-header { padding: 16px 18px; }
    .result-block-body { padding: 18px; }
    .info-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .pontuacao-grid { grid-template-columns: 1fr 1fr; }
    .all-results { gap: 16px; }
    .loading-card { padding: 44px 32px; }
}

/* ============================================
   RESPONSIVE — MOBILE ≤480px (APP-LIKE)
   ============================================ */
@media (max-width: 480px) {
    body { background: #eef2f7; }

    /* Header */
    .header-inner { height: 56px; padding: 0 14px; }
    .brand-logo { height: 32px; }
    .btn-logout { padding: 6px 12px; font-size: 12px; gap: 5px; }
    .btn-logout span { display: none; }

    /* Search */
    .search-section { padding: 24px 14px; }
    .search-container { gap: 18px; }
    .search-title { font-size: 21px; }
    .search-desc { font-size: 13px; }
    .search-input-group { border-radius: 16px; }
    .search-input { height: 52px; font-size: 15px; letter-spacing: 1px; }
    .btn-search { height: 52px; padding: 0 16px; }

    /* Loading */
    .loading-overlay { padding: 48px 14px; }
    .loading-card { padding: 40px 24px; border-radius: 22px; }
    .loading-rings-wrapper { width: 90px; height: 90px; margin-bottom: 22px; }
    .loading-ring-1 { width: 90px; height: 90px; }
    .loading-ring-2 { width: 66px; height: 66px; }
    .loading-ring-3 { width: 44px; height: 44px; }
    .loading-center-icon svg { width: 22px; height: 22px; }
    .loading-message { font-size: 14px; }

    /* Profile banner */
    .profile-banner { padding: 16px; gap: 12px; border-radius: 18px; }
    .profile-avatar { width: 52px; height: 52px; font-size: 22px; }
    .profile-name { font-size: 17px; }
    .profile-cpf { font-size: 13px; }
    .btn-nova { padding: 8px 14px; font-size: 12px; }

    /* Results */
    .results-section { padding: 14px 10px 80px; }
    .all-results { gap: 12px; }
    .result-block { border-radius: 16px; }
    .result-block-header { padding: 14px 16px; gap: 10px; }
    .result-block-body { padding: 14px; }
    .result-block-title { font-size: 14px; }
    .result-block-sub { font-size: 11px; }
    .section-icon { width: 34px; height: 34px; border-radius: 9px; }
    .section-icon svg { width: 16px; height: 16px; }

    /* Info cards 2 columns */
    .info-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .info-card { padding: 11px 13px; border-radius: 10px; }
    .info-card-label { font-size: 9px; }
    .info-card-value { font-size: 13px; }
    .info-card-value.large { font-size: 15px; }

    /* Pontuacao */
    .pontuacao-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .pontuacao-value { font-size: 24px; }

    /* Conta cards */
    .conta-card { border-radius: 12px; }
    .conta-card-header { padding: 12px 14px; }
    .conta-card-body { padding: 13px; }
    .conta-card-body .info-grid { grid-template-columns: 1fr 1fr; }

    /* Debito */
    .debito-header { padding: 12px 14px; }
    .debito-body { padding: 12px 14px; }
    .debito-body .info-grid { grid-template-columns: 1fr 1fr; }
    .debito-valor { font-size: 18px; }

    /* State cards */
    .state-card { padding: 40px 18px; margin: 36px auto; }

    /* Footer */
    .app-footer { padding: 14px; font-size: 12px; }
}

/* iOS safe area */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .app-footer { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
}
