/* ==========================================================================
   DESIGN SYSTEM & CUSTOM VARIABLES
   ========================================================================== */
:root {
    /* Color Palette — HSL Based */
    --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-secondary: 'Plus Jakarta Sans', sans-serif;
    
    /* Shared Branding Colors */
    --color-bcv: hsl(150, 84%, 40%);        /* Emerald */
    --color-bcv-bg: rgba(16, 185, 129, 0.1);
    --color-paralelo: hsl(330, 85%, 55%);   /* Pink/Fuchsia */
    --color-paralelo-bg: rgba(236, 72, 153, 0.1);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Layout Tokens */
    --border-radius-sm: 10px;
    --border-radius-md: 18px;
    --border-radius-lg: 28px;
}

/* Dark Theme Variables (Default) */
[data-theme="dark"] {
    --bg-main: #0a0b12;
    --bg-card: rgba(18, 20, 32, 0.65);
    --bg-card-hover: rgba(26, 29, 46, 0.75);
    --border-card: rgba(255, 255, 255, 0.08);
    --border-card-hover: rgba(255, 255, 255, 0.16);
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --color-primary: hsl(24, 95%, 58%);      /* Premium Orange */
    --color-primary-rgb: 249, 115, 22;
    --color-primary-hover: hsl(24, 95%, 64%);
    --bg-primary-light: rgba(249, 115, 22, 0.12);
    
    --input-bg: rgba(13, 14, 24, 0.7);
    --input-border: rgba(255, 255, 255, 0.08);
    --input-focus-border: hsl(24, 95%, 58%);
    --input-focus-glow: rgba(249, 115, 22, 0.2);
    
    --bg-glow-color-1: rgba(249, 115, 22, 0.10);
    --bg-glow-color-2: rgba(236, 72, 153, 0.08);
    
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
    
    --glass-blur: blur(16px);
}

/* Light Theme Variables */
[data-theme="light"] {
    --bg-main: #f5f6fa;
    --bg-card: rgba(255, 255, 255, 0.75);
    --bg-card-hover: rgba(255, 255, 255, 0.9);
    --border-card: rgba(0, 0, 0, 0.05);
    --border-card-hover: rgba(0, 0, 0, 0.12);
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    --color-primary: hsl(24, 95%, 50%);
    --color-primary-rgb: 234, 88, 12;
    --color-primary-hover: hsl(24, 95%, 44%);
    --bg-primary-light: rgba(234, 88, 12, 0.08);
    
    --input-bg: rgba(255, 255, 255, 0.85);
    --input-border: rgba(0, 0, 0, 0.08);
    --input-focus-border: hsl(24, 95%, 50%);
    --input-focus-glow: rgba(234, 88, 12, 0.12);
    
    --bg-glow-color-1: rgba(234, 88, 12, 0.05);
    --bg-glow-color-2: rgba(236, 72, 153, 0.03);
    
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
    
    --glass-blur: blur(12px);
}

/* ==========================================================================
   RESET & FOUNDATIONS
   ========================================================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.5;
    transition: background-color var(--transition-slow), color var(--transition-slow);
}

/* Decorative Glow Spheres */
.bg-glow {
    position: fixed;
    width: 60vw;
    height: 60vw;
    max-width: 800px;
    max-height: 800px;
    border-radius: 50%;
    filter: blur(150px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.8;
    transition: background-color var(--transition-slow);
}

.bg-glow-1 {
    top: -20%;
    left: -10%;
    background-color: var(--bg-glow-color-1);
    animation: pulseGlow 15s infinite alternate ease-in-out;
}

.bg-glow-2 {
    bottom: -20%;
    right: -10%;
    background-color: var(--bg-glow-color-2);
    animation: pulseGlow 18s infinite alternate-reverse ease-in-out;
}

@keyframes pulseGlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(4%, 5%) scale(1.1); }
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--border-card);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ==========================================================================
   APP WRAPPER & CONTAINER
   ========================================================================== */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    gap: 24px;
}

/* ==========================================================================
   MAIN HEADER NAVIGATION
   ========================================================================== */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-radius: var(--border-radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    backdrop-filter: var(--glass-blur);
    box-shadow: var(--shadow-sm);
    transition: background var(--transition-smooth), border var(--transition-smooth);
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-wrapper {
    background: var(--bg-primary-light);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(var(--color-primary-rgb), 0.2);
}

.logo-icon {
    color: var(--color-primary);
    width: 24px;
    height: 24px;
}

.brand-text h1 {
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.brand-text h1 span {
    color: var(--color-primary);
}

.sub-brand {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Connection Status Badge */
.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-bcv);
    transition: all var(--transition-fast);
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-bcv);
    border-radius: 50%;
}

.status-badge.pulse .status-dot {
    animation: blinkDot 1.8s infinite ease-in-out;
}

@keyframes blinkDot {
    0%, 100% { opacity: 0.3; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.1); }
}

.status-badge.offline {
    color: var(--color-paralelo);
    background: rgba(236, 72, 153, 0.08);
    border-color: rgba(236, 72, 153, 0.15);
}

.status-badge.offline .status-dot {
    background-color: var(--color-paralelo);
}

/* Theme Switcher Toggle */
.theme-toggle {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    color: var(--text-primary);
    transition: border var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.theme-toggle:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.theme-toggle .sun-icon,
.theme-toggle .moon-icon {
    position: absolute;
    width: 20px;
    height: 20px;
    transition: transform var(--transition-smooth), opacity var(--transition-smooth);
}

[data-theme="dark"] .theme-toggle .sun-icon {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
}

[data-theme="dark"] .theme-toggle .moon-icon {
    transform: translateY(40px) rotate(90deg);
    opacity: 0;
}

[data-theme="light"] .theme-toggle .sun-icon {
    transform: translateY(-40px) rotate(-90deg);
    opacity: 0;
}

[data-theme="light"] .theme-toggle .moon-icon {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
}

/* ==========================================================================
   CARDS COMMON RULES
   ========================================================================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--border-radius-lg);
    padding: 28px;
    backdrop-filter: var(--glass-blur);
    box-shadow: var(--shadow-md);
    transition: background var(--transition-smooth), border var(--transition-smooth), transform var(--transition-smooth), box-shadow var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.card:hover {
    border-color: var(--border-card-hover);
    box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   DASHBOARD GRID LAYOUT
   ========================================================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.grid-col-full {
    grid-column: span 2;
}

/* ==========================================================================
   WELCOME & AUTO-REFRESH CARD
   ========================================================================== */
.welcome-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(var(--color-primary-rgb), 0.05) 100%);
    border-color: var(--border-card);
}

.welcome-content h2 {
    font-family: var(--font-secondary);
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.welcome-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 600px;
}

/* Circular Refresh Timer */
.timer-box {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(0, 0, 0, 0.15);
    padding: 14px 22px;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-card);
}

.timer-circle-wrapper {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.timer-svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.timer-bg-circle {
    fill: none;
    stroke: var(--border-card);
    stroke-width: 6px;
}

.timer-progress-circle {
    fill: none;
    stroke: var(--color-primary);
    stroke-width: 6px;
    stroke-linecap: round;
    stroke-dasharray: 283; /* 2 * PI * r (where r = 45) */
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

.timer-text {
    position: absolute;
    font-family: var(--font-secondary);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.timer-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.timer-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Interactive Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-secondary);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all var(--transition-fast);
    outline: none;
}

.btn-primary {
    background: var(--color-primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.35);
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1.5px);
    box-shadow: 0 6px 16px rgba(var(--color-primary-rgb), 0.5);
}

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

.icon-refresh {
    width: 15px;
    height: 15px;
}

.icon-refresh.spin {
    animation: spinIcon 0.8s ease-in-out;
}

@keyframes spinIcon {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   RATE CARDS
   ========================================================================== */
.rate-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 240px;
    transition: transform var(--transition-smooth), border var(--transition-smooth);
}

.rate-card:hover {
    transform: translateY(-4px);
}

.rate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.source-badge {
    padding: 6px 14px;
    border-radius: 9999px;
    font-family: var(--font-secondary);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.source-badge.bcv {
    background: var(--color-bcv-bg);
    color: var(--color-bcv);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.source-badge.paralelo {
    background: var(--color-paralelo-bg);
    color: var(--color-paralelo);
    border: 1px solid rgba(236, 72, 153, 0.2);
}

.card-icon-wrapper {
    background: var(--input-bg);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-secondary);
    border: 1px solid var(--border-card);
}

/* Rate Display */
.rate-content {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.currency-label {
    font-size: 0.88rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 2px;
}

.rate-display {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
}

.rate-value {
    font-family: var(--font-secondary);
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1;
    color: var(--text-primary);
}

.rate-currency {
    font-family: var(--font-secondary);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-muted);
}

/* Secondary Rate Stats */
.rate-stats {
    display: flex;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 8px 14px;
    border: 1px solid var(--border-card);
    width: fit-content;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
}

.stat-item.border-left {
    border-left: 1px solid var(--border-card);
}

.stat-lbl {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.stat-val {
    font-family: var(--font-secondary);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.rate-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--border-card);
}

.footer-icon {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
}

.update-time {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Decorative Card Gradients */
.bcv-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.paralelo-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

/* ==========================================================================
   SPREAD CARD (BRECHA)
   ========================================================================== */
.spread-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, var(--bg-card) 0%, rgba(255, 255, 255, 0.01) 100%);
    padding: 20px 28px;
    border-left: 4px solid var(--color-primary);
}

.spread-indicator {
    display: flex;
    align-items: center;
    gap: 16px;
}

.spread-icon {
    width: 38px;
    height: 38px;
    color: var(--color-primary);
    background: var(--bg-primary-light);
    padding: 8px;
    border-radius: 10px;
}

.spread-details h3 {
    font-family: var(--font-secondary);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.spread-details p {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.spread-value-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.spread-percentage {
    font-family: var(--font-secondary);
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1.1;
}

.spread-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* ==========================================================================
   INTERACTIVE CURRENCY CONVERTER CARD
   ========================================================================== */
.converter-card {
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.card-header-clean h2 {
    font-family: var(--font-secondary);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.2px;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.title-icon {
    width: 22px;
    height: 22px;
    color: var(--color-primary);
}

.header-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Rate Selectors */
.rate-selectors {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.selector-btn {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--border-radius-md);
    padding: 16px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    transition: all var(--transition-smooth);
}

.selector-btn:hover {
    border-color: var(--color-primary);
    background: var(--bg-card-hover);
}

.radio-indicator {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    position: relative;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.selector-btn.active {
    border-color: var(--color-primary);
    background: var(--bg-primary-light);
    box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.05);
}

.selector-btn.active .radio-indicator {
    border-color: var(--color-primary);
}

.selector-btn.active .radio-indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background-color: var(--color-primary);
    border-radius: 50%;
    animation: scaleIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    0% { transform: translate(-50%, -50%) scale(0); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

.selector-text {
    display: flex;
    flex-direction: column;
}

.selector-title {
    font-family: var(--font-secondary);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.selector-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.selector-btn.active .selector-sub {
    color: var(--color-primary);
    font-weight: 600;
}

/* Inputs Layout */
.converter-inputs {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    position: relative;
}

.input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-prefix {
    position: absolute;
    left: 16px;
    font-family: var(--font-secondary);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 1.1rem;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--border-radius-sm);
    padding: 14px 16px 14px 42px;
    color: var(--text-primary);
    font-family: var(--font-secondary);
    font-size: 1.25rem;
    font-weight: 700;
    outline: none;
    transition: all var(--transition-fast);
}

.input-wrapper input:focus {
    border-color: var(--input-focus-border);
    box-shadow: 0 0 0 4px var(--input-focus-glow);
    background: var(--bg-card-hover);
}

/* Remove number input spin arrows */
.input-wrapper input::-webkit-outer-spin-button,
.input-wrapper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.input-wrapper input[type=number] {
    -moz-appearance: textfield;
}

.input-suffix {
    position: absolute;
    right: 16px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--border-card);
    padding: 4px 8px;
    border-radius: 6px;
    pointer-events: none;
}

/* Swap Buttons */
.swap-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 6px;
}

.btn-swap {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.btn-swap:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: rotate(180deg) scale(1.05);
    box-shadow: 0 4px 10px rgba(var(--color-primary-rgb), 0.15);
}

.swap-icon {
    width: 18px;
    height: 18px;
}

.converter-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.1);
    padding: 10px 16px;
    border-radius: 10px;
    border-left: 3px solid var(--color-primary);
}

.info-icon {
    width: 16px;
    height: 16px;
    color: var(--color-primary);
    flex-shrink: 0;
}

.converter-summary p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ==========================================================================
   APP FOOTER STYLE
   ========================================================================== */
.app-footer {
    margin-top: auto;
    padding: 24px 0 8px;
    text-align: center;
    border-top: 1px solid var(--border-card);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-copy {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.footer-sources {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.footer-sources a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.footer-sources a:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

/* ==========================================================================
   FLOATING TOAST NOTIFICATIONS
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--border-radius-sm);
    padding: 14px 20px;
    backdrop-filter: var(--glass-blur);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 380px;
    animation: toastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: transform var(--transition-smooth), opacity var(--transition-smooth);
}

.toast.removing {
    animation: toastOut 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastIn {
    0% { transform: translateY(40px) scale(0.9); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes toastOut {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(20px) scale(0.9); opacity: 0; }
}

.toast-icon-box {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.toast-icon-box.success {
    background: var(--color-bcv-bg);
    color: var(--color-bcv);
}

.toast-icon-box.error {
    background: var(--color-paralelo-bg);
    color: var(--color-paralelo);
}

.toast-message {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ==========================================================================
   LOADING & SKELETON LOADER ANIMATIONS
   ========================================================================== */
.skeleton-loader {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 8px 0;
}

.sk-line {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.04) 25%, 
        rgba(255, 255, 255, 0.09) 50%, 
        rgba(255, 255, 255, 0.04) 75%
    );
    background-size: 200% 100%;
    animation: skLoading 1.5s infinite linear;
    border-radius: 6px;
}

[data-theme="light"] .sk-line {
    background: linear-gradient(90deg, 
        rgba(0, 0, 0, 0.04) 25%, 
        rgba(0, 0, 0, 0.08) 50%, 
        rgba(0, 0, 0, 0.04) 75%
    );
    background-size: 200% 100%;
}

.sk-line.title {
    width: 60%;
    height: 18px;
}

.sk-line.rate {
    width: 45%;
    height: 38px;
    margin: 4px 0;
}

.sk-line.date {
    width: 80%;
    height: 14px;
}

@keyframes skLoading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .grid-col-full {
        grid-column: span 1;
    }
    
    .welcome-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
        padding: 24px;
    }
    
    .timer-box {
        width: 100%;
        justify-content: space-between;
    }
    
    .welcome-content h2 {
        font-size: 1.5rem;
    }
    
    .rate-value {
        font-size: 2.3rem;
    }
    
    .converter-inputs {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }
    
    .swap-divider {
        padding-bottom: 0;
        margin: -10px 0;
    }
    
    .btn-swap {
        transform: rotate(90deg);
    }
    
    .btn-swap:hover {
        transform: rotate(270deg) scale(1.05);
    }
    
    .rate-selectors {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .brand-text h1 {
        font-size: 1.25rem;
    }
    
    .main-header {
        padding: 12px 16px;
    }
    
    .card {
        padding: 20px;
    }
    
    .rate-stats {
        width: 100%;
        justify-content: space-around;
    }
    
    .toast-container {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }
    
    .toast {
        min-width: unset;
        width: 100%;
    }
}
