/**
 * Calculadora Veicular - Stylesheet Principal
 * Desenvolvido por B20 Conteúdo Digital
 * https://www.b20.com.br
 */

/* ========================================
   CSS VARIABLES - AUTOMOTIVE MAINTENANCE STYLE
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root, :root[data-theme="light"] {
    /* Cores principais - Light Mode */
    --primary-color: #E65100;
    --secondary-color: #1E293B;
    --accent-color: #FFFFFF;
    --surface-color: #FFFFFF;
    --text-color: #0F172A;
    
    /* Cores derivadas */
    --primary-hover: #CC4800;
    --primary-light: #FF7B33;
    --bg-color: #F8FAFC;
    --text-muted: #64748B;
    --border-color: #E2E8F0;
    
    /* Texto dos botões primários */
    --primary-text: #FFFFFF;
    
    /* Spacing */
    --spacing-unit: 8px;
    --spacing-xs: calc(var(--spacing-unit) * 1);
    --spacing-sm: calc(var(--spacing-unit) * 2);
    --spacing-md: calc(var(--spacing-unit) * 3);
    --spacing-lg: calc(var(--spacing-unit) * 4);
    --spacing-xl: calc(var(--spacing-unit) * 6);
    
    /* Border Radius */
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-lg: 24px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --shadow-glow: rgba(230, 81, 0, 0.2);
    
    /* Z-index */
    --z-header: 1000;
    --z-modal: 2000;
    --z-toast: 3000;
}

/* Dark Mode - Automotive/Maintenance */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --primary-color: #FF8A65;
        --primary-hover: #FF7043;
        --primary-light: #FFAB91;
        --bg-color: #0F172A;
        --surface-color: #1E293B;
        --text-color: #F8FAFC;
        --text-muted: #94A3B8;
        --border-color: #334155;
        --primary-text: #0F172A;
        --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.2);
        --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.4);
        --shadow-glow: rgba(255, 138, 101, 0.2);
    }
}

:root[data-theme="dark"] {
    --primary-color: #FF8A65;
    --primary-hover: #FF7043;
    --primary-light: #FFAB91;
    --bg-color: #0F172A;
    --surface-color: #1E293B;
    --text-color: #F8FAFC;
    --text-muted: #94A3B8;
    --border-color: #334155;
    --primary-text: #0F172A;
    --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.4);
    --shadow-glow: rgba(255, 138, 101, 0.2);
}

/* ========================================
   RESET E BASE
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: clamp(14px, 2.5vw, 16px);
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    padding-top: 60px;
    padding-bottom: 70px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ========================================
   HEADER FIXO
   ======================================== */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-md);
    box-shadow: var(--shadow-sm);
    z-index: var(--z-header);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background-color: rgba(11, 14, 17, 0.8);
    border-bottom: 1px solid var(--border-color);
}
[data-theme="light"] .app-header {
    background-color: rgba(255, 255, 255, 0.8);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.header-logo img {
    height: 32px;
    width: auto;
    border-radius: 4px;
}

.header-logo h1 {
    font-size: 1.25rem;
    margin: 0;
}

.desktop-nav {
    display: none;
}

.header-actions {
    display: flex;
    gap: var(--spacing-sm);
}

/* ========================================
   BOTTOM NAVIGATION (MOBILE)
   ======================================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    z-index: var(--z-header);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

:root[data-theme="dark"] .bottom-nav {
    background: rgba(15, 23, 42, 0.85);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: var(--spacing-xs) 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 64px;
    height: 54px;
    border-radius: 16px;
    margin: 0 4px;
}

.nav-item i {
    font-size: 22px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item.active {
    color: var(--primary-color);
    background: rgba(230, 81, 0, 0.08);
}

:root[data-theme="dark"] .nav-item.active {
    background: rgba(255, 138, 101, 0.12);
}

.nav-item.active i {
    transform: translateY(-2px);
}

/* ========================================
   CONTAINER E LAYOUT
   ======================================== */
.container {
    width: 100%;
    max-width: 100%;
    padding: var(--spacing-md);
    margin: 0 auto;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    min-height: 48px;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--primary-text);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--primary-hover);
    color: var(--primary-text);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--shadow-glow);
}

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

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover,
.btn-outline:focus {
    background: var(--primary-color);
    color: white;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
    min-height: 36px;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: var(--spacing-xs);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.btn-icon:hover,
.btn-icon:focus {
    background: var(--border-color);
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.5rem;
    padding: var(--spacing-xs);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero-section {
    padding: var(--spacing-xl) 0;
    text-align: center;
    background-image: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.95)), url('../assets/hero-bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
}

.hero-logo {
    height: 100px;
    width: auto;
    margin: 0 auto var(--spacing-md) auto;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: block;
}

.hero-content {
    margin-bottom: var(--spacing-lg);
}

.hero-title {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
    color: white;
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.25rem);
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: var(--spacing-lg);
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    align-items: center;
}


/* ========================================
   FEATURES SECTION
   ======================================== */
.features-section {
    padding: var(--spacing-xl) 0;
}

.section-title {
    text-align: center;
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: var(--spacing-lg);
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

.feature-card {
    background: var(--surface-color);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.feature-card:hover,
.feature-card:focus-within {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(230, 81, 0, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-md);
}

:root[data-theme="dark"] .feature-icon {
    background: rgba(255, 138, 101, 0.15);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
}

.feature-card p {
    color: var(--text-muted);
}

/* ========================================
   STATS SECTION
   ======================================== */
.stats-section {
    padding: var(--spacing-xl) 0;
    background: var(--surface-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.stat-card {
    text-align: center;
    padding: var(--spacing-lg);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    font-size: 1rem;
    color: var(--text-muted);
}

/* ========================================
   FAQ SECTION
   ======================================== */
.faq-section {
    padding: var(--spacing-xl) 0;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: var(--spacing-md);
    background: var(--surface-color);
    border: none;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-color);
    transition: var(--transition-fast);
}

.faq-question:hover,
.faq-question:focus {
    background: var(--border-color);
}

.faq-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 var(--spacing-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer:not([hidden]) {
    padding: var(--spacing-md);
    max-height: 500px;
}

.faq-answer p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* ========================================
   CTA SECTION
   ======================================== */
.cta-section {
    padding: var(--spacing-xl) 0;
    text-align: center;
    background: var(--primary-color);
    color: white;
}

.cta-section h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: var(--spacing-md);
}

.cta-section p {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-lg);
    opacity: 0.9;
}

.cta-section .btn-primary {
    background: white;
    color: var(--primary-color);
}

.cta-section .btn-primary:hover,
.cta-section .btn-primary:focus {
    background: var(--primary-hover);
    color: var(--primary-text);
    transform: translateY(-2px);
}

/* ========================================
   FORMS
   ======================================== */
.form {
    width: 100%;
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
    color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 16px;
    font-family: inherit;
    background: var(--bg-color);
    color: var(--text-color);
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

.form-group input:invalid:not(:placeholder-shown),
.form-group select:invalid:not(:placeholder-shown),
.form-group textarea:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-end;
    margin-top: var(--spacing-lg);
}

.error-message {
    display: none;
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: var(--spacing-xs);
}

/* ========================================
   MODAL
   ======================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    padding: var(--spacing-md);
}

.modal[hidden] {
    display: none;
}

.modal-content {
    background: var(--bg-color);
    border-radius: var(--border-radius-lg);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
}

.modal-content .form {
    padding: var(--spacing-md);
}

/* ========================================
   VEHICLES
   ======================================== */
.vehicle-selector-section {
    margin-bottom: var(--spacing-xl);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.section-header h2 {
    font-size: 1.5rem;
    margin: 0;
}

.vehicles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

.vehicle-card {
    background: var(--surface-color);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
}

.vehicle-card:hover,
.vehicle-card:focus-within {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.vehicle-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
}

.vehicle-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xs);
}

.vehicle-card p {
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
}

.vehicle-actions {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
}

.current-vehicle-card {
    background: var(--surface-color);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    border: 1px solid var(--border-color);
}

.current-vehicle-card .vehicle-icon {
    font-size: 2rem;
    margin-bottom: 0;
    color: var(--primary-color);
}

/* ========================================
   EXPENSES
   ======================================== */
.expenses-section {
    margin-top: var(--spacing-xl);
}

.recent-expenses {
    margin-top: var(--spacing-xl);
}

.recent-expenses h3 {
    margin-bottom: var(--spacing-md);
}

.expense-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--surface-color);
    border-radius: var(--border-radius-sm);
    margin-bottom: var(--spacing-sm);
}

.expense-icon {
    font-size: 1.2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(230, 81, 0, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

:root[data-theme="dark"] .expense-icon {
    background: rgba(255, 138, 101, 0.15);
}

.expense-info {
    flex: 1;
}

.expense-info h4 {
    margin: 0 0 4px 0;
    font-size: 1rem;
}

.expense-info p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.expense-description {
    font-style: italic;
}

.expense-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* ========================================
   DASHBOARD
   ======================================== */
.dashboard-header {
    margin-bottom: var(--spacing-lg);
}

.dashboard-controls {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.form-select {
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    background: var(--bg-color);
    color: var(--text-color);
    cursor: pointer;
}

.summary-section {
    margin-bottom: var(--spacing-xl);
}

.summary-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

.summary-card {
    background: var(--surface-color);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.summary-icon {
    font-size: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(230, 81, 0, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

:root[data-theme="dark"] .summary-icon {
    background: rgba(255, 138, 101, 0.15);
}

.summary-content h3 {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

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

.charts-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.chart-container {
    background: var(--surface-color);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
}

.chart-container h3 {
    margin-bottom: var(--spacing-md);
}

.chart-container canvas {
    max-width: 100%;
    height: auto;
}

.expenses-table-section {
    margin-bottom: var(--spacing-xl);
}

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

.expenses-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.expenses-table th,
.expenses-table td {
    padding: var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.expenses-table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.expenses-table tbody tr:hover {
    background: var(--border-color);
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

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

/* ========================================
   EMPTY STATE
   ======================================== */
.empty-state {
    text-align: center;
    padding: var(--spacing-xl);
}

.empty-state h3 {
    margin: var(--spacing-md) 0;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
}

/* ========================================
   CONTACT PAGE
   ======================================== */
.contact-section {
    padding: var(--spacing-lg) 0;
}

.contact-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.contact-header h1 {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    margin-bottom: var(--spacing-md);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
}

.contact-form-container {
    background: var(--surface-color);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.contact-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

.contact-card {
    background: var(--surface-color);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.contact-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.contact-icon {
    font-size: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(230, 81, 0, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-sm);
}

:root[data-theme="dark"] .contact-icon {
    background: rgba(255, 138, 101, 0.15);
}

.contact-card h3 {
    margin-bottom: var(--spacing-sm);
}

.contact-card p {
    color: var(--text-muted);
}

.contact-card a {
    color: var(--primary-color);
    text-decoration: none;
}

.contact-card a:hover,
.contact-card a:focus {
    text-decoration: underline;
}

/* ========================================
   LEGAL PAGES
   ======================================== */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-lg) 0;
}

.legal-content h1 {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    margin-bottom: var(--spacing-sm);
}

.last-updated {
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: var(--spacing-xl);
}

.legal-content section {
    margin-bottom: var(--spacing-xl);
}

.legal-content h2 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
}

.legal-content p {
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
}

.legal-content ul {
    margin-left: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.legal-content li {
    margin-bottom: var(--spacing-xs);
}

.legal-footer {
    text-align: center;
    padding: var(--spacing-lg);
    background: var(--surface-color);
    border-radius: var(--border-radius);
    margin-top: var(--spacing-xl);
}

.legal-footer p {
    margin-bottom: var(--spacing-xs);
}

/* ========================================
   FOOTER
   ======================================== */
.app-footer {
    background: var(--surface-color);
    padding: var(--spacing-lg) 0;
    margin-top: var(--spacing-xl);
}

.footer-content {
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-links a:hover,
.footer-links a:focus {
    color: var(--primary-color);
}

.footer-brand {
    margin-bottom: var(--spacing-xs);
}

.b20-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-fast);
}

.b20-link:hover,
.b20-link:focus {
    text-decoration: underline;
    transform: scale(1.05);
    display: inline-block;
}

.footer-site a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-site a:hover,
.footer-site a:focus {
    color: var(--primary-color);
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */
#toast-container {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    pointer-events: none;
}

.toast {
    background: var(--text-color);
    color: var(--bg-color);
    padding: 12px 24px;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: auto;
    min-width: 250px;
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background: #10b981;
}

.toast.error {
    background: #ef4444;
}

.toast.info {
    background: #3b82f6;
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ========================================
   LANDING PAGE EXTRAS & ANIMATIONS
   ======================================== */
.badge {
    display: inline-block;
    background: rgba(230, 81, 0, 0.15);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    border: 1px solid rgba(230, 81, 0, 0.3);
}

:root[data-theme="dark"] .badge {
    background: rgba(255, 138, 101, 0.15);
    color: var(--primary-light);
    border-color: rgba(255, 138, 101, 0.3);
}

.glass-card {
    background: var(--surface-color);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
}


/* ========================================
   HOW IT WORKS SECTION
   ======================================== */
.how-it-works-section {
    padding: var(--spacing-xl) 0;
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.steps-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.step-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    background: var(--bg-color);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.step-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    opacity: 0.2;
}

.step-content h3 {
    color: var(--text-color);
    margin-bottom: var(--spacing-xs);
    font-size: 1.25rem;
}

/* ========================================
   SHARE SECTION
   ======================================== */
.share-section {
    margin-top: var(--spacing-xxl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.share-header {
    margin-bottom: var(--spacing-lg);
}

.share-header h2 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
}

.share-header p {
    color: var(--text-muted);
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    justify-content: center;
    align-items: center;
}

.btn-whatsapp {
    background-color: #25D366;
    color: white;
}

.btn-whatsapp:hover {
    background-color: #128C7E;
    color: white;
}

.btn-twitter {
    background-color: #1DA1F2;
    color: white;
}

.btn-twitter:hover {
    background-color: #0c85d0;
    color: white;
}

.btn-facebook {
    background-color: #1877F2;
    color: white;
}

.btn-facebook:hover {
    background-color: #0c56b7;
    color: white;
}
