/* ═══════════════════════════════════════════════════════
   TipoDeCambio.info — CSS Design System v4.0
   Dark Mode Fintech Premium
   ═══════════════════════════════════════════════════════ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ── CSS Custom Properties ── */
:root {
    /* Colors - Dark Mode */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: rgba(30, 41, 59, 0.7);
    --bg-card-hover: rgba(51, 65, 85, 0.6);
    --bg-glass: rgba(15, 23, 42, 0.8);
    --bg-nav: rgba(15, 23, 42, 0.85);

    /* Text */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-inverse: #0f172a;

    /* Accents */
    --emerald: #10b981;
    --emerald-light: #34d399;
    --emerald-dark: #059669;
    --emerald-bg: rgba(16, 185, 129, 0.1);
    --coral: #f97316;
    --coral-light: #fb923c;
    --coral-bg: rgba(249, 115, 22, 0.1);
    --sky: #38bdf8;
    --sky-light: #7dd3fc;
    --sky-bg: rgba(56, 189, 248, 0.1);
    --amber: #f59e0b;
    --amber-bg: rgba(245, 158, 11, 0.1);
    --red: #ef4444;
    --red-bg: rgba(239, 68, 68, 0.1);

    /* Borders */
    --border-color: rgba(51, 65, 85, 0.5);
    --border-light: rgba(148, 163, 184, 0.1);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    --shadow-glow-emerald: 0 0 20px rgba(16, 185, 129, 0.15);
    --shadow-glow-coral: 0 0 20px rgba(249, 115, 22, 0.15);
    --shadow-glow-sky: 0 0 20px rgba(56, 189, 248, 0.15);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Layout */
    --nav-height: 64px;
    --max-width: 1200px;
    --sidebar-width: 320px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: var(--sky);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover {
    color: var(--sky-light);
}

img {
    max-width: 100%;
    height: auto;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* ── Utilities ── */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.text-center { text-align: center; }
.text-emerald { color: var(--emerald) !important; }
.text-coral { color: var(--coral) !important; }
.text-sky { color: var(--sky) !important; }
.text-muted { color: var(--text-secondary) !important; }
.text-mono { font-family: var(--font-mono); }

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

/* ══════════════════════════════════════
   NAVBAR
   ══════════════════════════════════════ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--bg-nav);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: background var(--transition-base);
}

.navbar-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.125rem;
    text-decoration: none;
}

.navbar-brand .brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--emerald), var(--sky));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.875rem;
    color: var(--bg-primary);
}

.navbar-brand:hover {
    color: var(--text-primary);
}

.brand-icon-img {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    object-fit: contain;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    list-style: none;
}

.navbar-nav a {
    padding: var(--space-sm) var(--space-md);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.navbar-nav a:hover,
.navbar-nav a.active {
    color: var(--text-primary);
    background: rgba(148, 163, 184, 0.1);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* Language Toggle */
.lang-toggle {
    display: flex;
    align-items: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    padding: 2px;
    gap: 0;
}

.lang-toggle a {
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.lang-toggle a.active {
    background: var(--emerald);
    color: var(--bg-primary);
}

.lang-toggle a:hover:not(.active) {
    color: var(--text-primary);
}

/* Social Icons */
.navbar-social {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.navbar-social a {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    font-size: 1rem;
}

.navbar-social a:hover {
    color: var(--text-primary);
    background: rgba(148, 163, 184, 0.1);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: var(--space-sm);
    line-height: 1;
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    z-index: 999;
    padding: var(--space-xl);
    overflow-y: auto;
}

.mobile-menu.open {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    animation: slideDown 0.3s ease;
}

.mobile-menu a {
    display: block;
    padding: var(--space-md) var(--space-lg);
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.mobile-menu a:hover,
.mobile-menu a.active {
    background: var(--bg-secondary);
}

.mobile-menu .mobile-lang {
    display: flex;
    gap: var(--space-md);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-color);
}

/* ══════════════════════════════════════
   MAIN CONTENT
   ══════════════════════════════════════ */
.main-content {
    padding-top: calc(var(--nav-height) + var(--space-2xl));
    padding-bottom: var(--space-3xl);
    min-height: calc(100vh - var(--nav-height));
}

.page-section {
    margin-bottom: var(--space-3xl);
}

/* ══════════════════════════════════════
   HERO CARD
   ══════════════════════════════════════ */
.hero-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl) var(--space-3xl);
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--emerald), var(--sky), var(--coral));
}

.hero-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 20%, rgba(16, 185, 129, 0.04) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(56, 189, 248, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.hero-subtitle {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-sm);
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--space-xl);
    position: relative;
    z-index: 1;
}

.hero-rates {
    display: flex;
    justify-content: center;
    gap: var(--space-3xl);
    margin-bottom: var(--space-xl);
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
}

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

.hero-rate-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-xs);
}

.hero-rate-label.compra { color: var(--emerald); }
.hero-rate-label.venta { color: var(--coral); }

.hero-rate-value {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.hero-rate-value.compra { color: var(--emerald-light); }
.hero-rate-value.venta { color: var(--coral-light); }

.hero-rate-currency {
    font-size: 1.5rem;
    opacity: 0.7;
}

.hero-euro {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    position: relative;
    z-index: 1;
}

.hero-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    font-size: 0.8rem;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--emerald);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

/* ══════════════════════════════════════
   FEATURE CARDS (3-column)
   ══════════════════════════════════════ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-decoration: none;
    display: block;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.feature-card--emerald::before { background: var(--emerald); }
.feature-card--sky::before { background: var(--sky); }
.feature-card--amber::before { background: var(--amber); }

.feature-card:hover {
    border-color: var(--text-muted);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.feature-card--emerald:hover { box-shadow: var(--shadow-glow-emerald); }
.feature-card--sky:hover { box-shadow: var(--shadow-glow-sky); }
.feature-card--amber:hover { box-shadow: var(--shadow-glow-coral); }

.feature-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: var(--space-md);
}

.feature-card--emerald .feature-card-icon { background: var(--emerald-bg); color: var(--emerald); }
.feature-card--sky .feature-card-icon { background: var(--sky-bg); color: var(--sky); }
.feature-card--amber .feature-card-icon { background: var(--amber-bg); color: var(--amber); }

.feature-card-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: var(--space-xs);
}

.feature-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
    line-height: 1.3;
}

.feature-card-value {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
}

.feature-card--emerald .feature-card-value { color: var(--emerald-light); }
.feature-card--sky .feature-card-value { color: var(--sky-light); }

.feature-card-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

.feature-card-action {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.feature-card--emerald .feature-card-action { color: var(--emerald); }
.feature-card--sky .feature-card-action { color: var(--sky); }
.feature-card--amber .feature-card-action { color: var(--amber); background: var(--amber-bg); }

/* ══════════════════════════════════════
   CHART SECTION
   ══════════════════════════════════════ */
.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.chart-title {
    font-size: 1.125rem;
    font-weight: 700;
}

.chart-period-selector {
    display: flex;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    padding: 3px;
    gap: 2px;
}

.chart-period-btn {
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    background: none;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.chart-period-btn:hover {
    color: var(--text-primary);
}

.chart-period-btn.active {
    background: var(--emerald);
    color: var(--bg-primary);
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* ══════════════════════════════════════
   DATA TABLE
   ══════════════════════════════════════ */
.table-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.table-header {
    padding: var(--space-xl) var(--space-xl) 0;
}

.table-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
}

/* Filter Tabs */
.table-filters {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.filter-tab {
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    background: none;
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-tab:hover {
    color: var(--text-primary);
    border-color: var(--border-color);
}

.filter-tab.active {
    color: var(--emerald);
    border-color: var(--emerald);
    background: var(--emerald-bg);
}

/* Search */
.table-search {
    position: relative;
    margin-bottom: var(--space-lg);
}

.table-search input {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    padding-left: 40px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: border-color var(--transition-fast);
    outline: none;
}

.table-search input::placeholder {
    color: var(--text-muted);
}

.table-search input:focus {
    border-color: var(--emerald);
}

.table-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead th {
    padding: var(--space-md) var(--space-lg);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    position: sticky;
    top: 0;
    white-space: nowrap;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--bg-card-hover);
}

.data-table tbody tr:last-child {
    border-bottom: none;
}

.data-table td {
    padding: var(--space-md) var(--space-lg);
    font-size: 0.875rem;
    vertical-align: middle;
}

.data-table .cell-entity {
    font-weight: 500;
    color: var(--text-primary);
    max-width: 300px;
}

.data-table .cell-number {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.9rem;
}

.data-table .cell-number.best-buy {
    color: var(--emerald-light);
    background: var(--emerald-bg);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
}

.data-table .cell-number.best-sell {
    color: var(--sky-light);
    background: var(--sky-bg);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
}

.data-table .cell-spread {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 0.8rem;
}

.data-table .cell-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.table-footer {
    padding: var(--space-md) var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: var(--space-md);
}

/* ══════════════════════════════════════
   CALCULATOR
   ══════════════════════════════════════ */
.calc-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    max-width: 500px;
    margin: 0 auto;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.calc-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--space-sm);
}

.calc-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.calc-group {
    margin-bottom: var(--space-lg);
}

.calc-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-sm);
    display: block;
}

.calc-input-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--transition-fast);
}

.calc-input-wrapper:focus-within {
    border-color: var(--emerald);
}

.calc-input {
    flex: 1;
    padding: var(--space-md) var(--space-lg);
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 600;
    outline: none;
    min-width: 0;
}

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

.calc-currency-select {
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-secondary);
    border: none;
    border-left: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    outline: none;
    min-width: 110px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.calc-swap-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: var(--space-md) auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 1.25rem;
}

.calc-swap-btn:hover {
    background: var(--emerald-bg);
    border-color: var(--emerald);
    color: var(--emerald);
    transform: rotate(180deg);
}

.calc-result {
    background: var(--emerald-bg);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    margin-top: var(--space-xl);
}

.calc-result-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--emerald);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-sm);
}

.calc-result-value {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    color: var(--emerald-light);
}

.calc-result-rate {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: var(--space-sm);
}

.calc-convert-btn {
    width: 100%;
    padding: var(--space-md) var(--space-xl);
    background: linear-gradient(135deg, var(--emerald-dark), var(--emerald));
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    margin-top: var(--space-lg);
}

.calc-convert-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow-emerald);
}

/* ══════════════════════════════════════
   HISTORICAL / FORMS
   ══════════════════════════════════════ */
.hist-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    max-width: 700px;
    margin: 0 auto;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.hist-tabs {
    display: flex;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    padding: 3px;
    margin-bottom: var(--space-2xl);
}

.hist-tab {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    background: none;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.hist-tab.active {
    background: var(--emerald);
    color: var(--bg-primary);
}

.hist-tab:hover:not(.active) {
    color: var(--text-primary);
}

.hist-form-group {
    margin-bottom: var(--space-lg);
}

.hist-form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.hist-form-group input[type="date"] {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: border-color var(--transition-fast);
    color-scheme: dark;
}

.hist-form-group input[type="date"]:focus {
    border-color: var(--emerald);
}

.hist-date-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.hist-panel {
    display: none;
}

.hist-panel.active {
    display: block;
}

/* ══════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-xl);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    line-height: 1.5;
}

.btn-primary {
    background: linear-gradient(135deg, var(--emerald-dark), var(--emerald));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow-emerald);
    color: white;
}

.btn-outline {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.btn-sm {
    padding: 4px 12px;
    font-size: 0.75rem;
}

.btn-block {
    width: 100%;
}

/* ══════════════════════════════════════
   DISCLAIMER
   ══════════════════════════════════════ */
.disclaimer {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg) var(--space-xl);
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.7;
    border-left: 3px solid var(--amber);
}

/* ══════════════════════════════════════
   AD CONTAINERS
   ══════════════════════════════════════ */
.ad-container {
    margin: var(--space-xl) 0;
    padding: var(--space-sm);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: rgba(30, 41, 59, 0.3);
    text-align: center;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ad-label {
    display: block;
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-xs);
    opacity: 0.5;
}

.ad-sidebar {
    min-height: 250px;
}

/* ══════════════════════════════════════
   FOOTER
   ══════════════════════════════════════ */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-3xl);
    margin-bottom: var(--space-2xl);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    text-decoration: none;
}

.footer-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 340px;
}

.footer-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-links a {
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--emerald);
}

.footer-social-links {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.footer-social-links a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    font-size: 1rem;
}

.footer-social-links a:hover {
    background: var(--emerald-bg);
    color: var(--emerald);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: var(--space-md);
}

/* ══════════════════════════════════════
   PAGE HEADERS
   ══════════════════════════════════════ */
.page-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: var(--space-sm);
}

.page-header p {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ══════════════════════════════════════
   CONTACT FORM
   ══════════════════════════════════════ */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--emerald);
}

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

/* ══════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════ */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children animations */
.cards-grid .feature-card:nth-child(1) { transition-delay: 0.1s; }
.cards-grid .feature-card:nth-child(2) { transition-delay: 0.2s; }
.cards-grid .feature-card:nth-child(3) { transition-delay: 0.3s; }

/* ══════════════════════════════════════
   RESPONSIVE DESIGN
   ══════════════════════════════════════ */

/* Tablet */
@media (max-width: 1024px) {
    .navbar-nav {
        display: none;
    }
    
    .navbar-social {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --nav-height: 56px;
    }
    
    .container {
        padding: 0 var(--space-md);
    }
    
    .hero-card {
        padding: var(--space-xl) var(--space-lg);
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-rates {
        gap: var(--space-2xl);
    }
    
    .hero-rate-value {
        font-size: 2rem;
    }
    
    .hero-rate-currency {
        font-size: 1.125rem;
    }
    
    .chart-container {
        height: 220px;
    }
    
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .table-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .table-filters::-webkit-scrollbar {
        display: none;
    }
    
    .data-table {
        font-size: 0.8rem;
    }
    
    .data-table thead th,
    .data-table td {
        padding: var(--space-sm) var(--space-md);
    }
    
    .data-table .cell-entity {
        max-width: 150px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .hist-date-row {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .calc-card,
    .hist-card {
        padding: var(--space-xl) var(--space-lg);
    }
    
    .calc-result-value {
        font-size: 1.5rem;
    }
    
    .desktop-only-ad {
        display: none;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .hero-rates {
        flex-direction: column;
        gap: var(--space-lg);
    }
    
    .lang-toggle {
        display: none;
    }
    
    .navbar-brand span {
        font-size: 0.95rem;
    }
}

/* Table responsive scroll */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Hide on mobile helper */
@media (max-width: 768px) {
    .hide-mobile { display: none !important; }
}

@media (min-width: 769px) {
    .hide-desktop { display: none !important; }
}

/* ══════════════════════════════════════
   SCROLLBAR
   ══════════════════════════════════════ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ══════════════════════════════════════
   SELECTION
   ══════════════════════════════════════ */
::selection {
    background: rgba(16, 185, 129, 0.3);
    color: var(--text-primary);
}

/* ══════════════════════════════════════
   LOADING SKELETON
   ══════════════════════════════════════ */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

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