.currency-main-rates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 2rem 0;
    padding: 1.5rem 0;
}

.currency-main-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.currency-main-text {
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
}

.currency-main-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000000;
    line-height: 1.2;
}

.currency-main-change {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.currency-main-change.positive {
    color: #10b981;
}

.currency-main-change.negative {
    color: #ef4444;
}

.currency-arrow {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
}

.currency-change-value {
    font-weight: 500;
}

/* Currency EUR Section */
.currency-eur-section {
    margin: 2rem 0 0 0;
}

.currency-eur-title {
    font-weight: 800;
    color: #001e5a;
    margin: 1em 0 0.1em;
}

.currency-eur-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.currency-eur-main {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.currency-eur-amount {
    font-size: 3rem;
    font-weight: 700;
    color: #000000;
    line-height: 1;
}

.currency-eur-unit {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 400;
}

.currency-eur-change {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 2rem;
    font-weight: 500;
}

.currency-eur-change.positive {
    color: #10b981;
}

.currency-eur-change.negative {
    color: #ef4444;
}

.currency-eur-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.currency-eur-change-label {
    font-weight: 500;
}

.currency-eur-change-value {
    font-weight: 600;
}

.currency-eur-change-percent {
    font-weight: 500;
}


.currency-eur-text {
    margin: 0.5rem 0 2rem 0;
    padding: 0;
    line-height: 1.8;
    color: #374151;
    font-size: 1rem;
}

.currency-eur-text p {
    margin: 1rem 0;
    line-height: 1.8;
}

.currency-eur-text p:first-child {
    margin-top: 0;
}

.currency-eur-text p:last-child {
    margin-bottom: 0;
}

.currency-eur-text strong {
    font-weight: 600;
    color: #111827;
}

.currency-eur-text a {
    color: #1d4ed8;
    text-decoration: none;
}

.currency-eur-text a:hover {
    text-decoration: underline;
}

/* Summary list (Featured Snippet friendly) */
.currency-eur-text .currency-eur-summary {
    margin: 1rem 0 0 1.25rem;
    padding: 0;
    list-style: disc;
}

.currency-eur-text .currency-eur-summary li {
    margin: 0.35rem 0;
}

/* USD section */
.currency-usd-section {
    margin: 2rem 0 0 0;
}

.currency-usd-title {
    font-weight: 800;
    color: #001e5a;
    margin: 1em 0 0.1em;
}

.currency-usd-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.currency-usd-main {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.currency-usd-amount {
    font-size: 3rem;
    font-weight: 700;
    color: #000000;
    line-height: 1;
}

.currency-usd-unit {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 400;
}

.currency-usd-change {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.currency-usd-change.positive { color: #10b981; }
.currency-usd-change.negative { color: #ef4444; }

.currency-usd-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.currency-usd-change-value { font-weight: 600; }
.currency-usd-change-percent { font-weight: 500; }

.currency-usd-text {
    margin: 2rem 0;
    padding: 0;
    line-height: 1.8;
    color: #374151;
    font-size: 1rem;
}

.currency-usd-text p {
    margin: 1rem 0;
    line-height: 1.8;
}

.currency-usd-text p:first-child { margin-top: 0; }
.currency-usd-text p:last-child { margin-bottom: 0; }

.currency-usd-text strong {
    font-weight: 600;
    color: #111827;
}

.currency-usd-text a {
    color: #1d4ed8;
    text-decoration: none;
}

.currency-usd-text a:hover { text-decoration: underline; }

.currency-usd-text .currency-usd-summary {
    margin: 1rem 0 0 1.25rem;
    padding: 0;
    list-style: disc;
}

.currency-usd-text .currency-usd-summary li {
    margin: 0.35rem 0;
}

/* USD chart */
.currency-usd-chart-section {
    margin: 2rem 0;
}

.currency-usd-chart-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.75rem 0;
}

.currency-usd-chart-note {
    margin: 0 0 0.75rem 0;
    color: #4b5563;
    line-height: 1.6;
    font-size: 0.95rem;
}

.currency-usd-chart-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0 1rem 0;
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    border-radius: 0;
}

.currency-usd-range-btn {
    appearance: none;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 0.85rem;
    border-radius: 0;
    cursor: pointer;
    line-height: 1.1;
    transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.currency-usd-range-btn:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.currency-usd-range-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.22);
    border-color: #0f766e;
}

.currency-usd-range-btn.is-active {
    border-color: #0f766e;
    background: #0f766e;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(15, 118, 110, 0.22);
    transform: translateY(-1px);
}

.currency-usd-chart {
    width: 100%;
    min-height: 320px;
}

/* EUR chart */
.currency-eur-chart-section {
    margin: 2rem 0;
}

.currency-eur-chart-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.75rem 0;
}

.currency-eur-chart-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0 1rem 0;
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    border-radius: 0;
}

.currency-eur-range-btn {
    appearance: none;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 0.85rem;
    border-radius: 0;
    cursor: pointer;
    line-height: 1.1;
    transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.currency-eur-range-btn:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.currency-eur-range-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
    border-color: #2563eb;
}

.currency-eur-range-btn.is-active {
    border-color: #1d4ed8;
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
    transform: translateY(-1px);
}

.currency-eur-chart {
    width: 100%;
    min-height: 320px;
}

.currency-eur-chart-note {
    margin: 0.75rem 0 0 0;
    color: #4b5563;
    line-height: 1.6;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .currency-eur-chart-controls {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        padding: 0.5rem;
        border-radius: 0;
    }

    .currency-eur-range-btn {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .currency-eur-chart {
        min-height: 280px;
    }

    .currency-eur-chart-note {
        font-size: 0.9rem;
    }

    .currency-usd-chart-controls {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        padding: 0.5rem;
        border-radius: 0;
    }

    .currency-usd-range-btn {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .currency-usd-chart {
        min-height: 280px;
    }

    .currency-usd-chart-note {
        font-size: 0.9rem;
    }
}

/* Currency Rates Styles */
.currency-rates-section {
    margin: 2rem 0;
}

.currency-rates-intro {
    margin-bottom: 1.5rem;
    color: #4b5563;
    line-height: 1.6;
}

.currency-rates-table-wrapper {
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.currency-rates-table-wrapper-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.currency-rates-table-3days {
    min-width: 920px;
}

.currency-rates-table-3days .currency-col-symbol {
    width: 60px;
    min-width: 60px;
}

.currency-rates-table-3days .currency-col-name {
    width: 120px;
    min-width: 120px;
}

.currency-rates-table-3days .currency-col-day {
    width: 170px;
    min-width: 170px;
    text-align: left;
}

/* sticky columns (Simbol + Monedă) */
.currency-rates-table-3days th.currency-col-sticky,
.currency-rates-table-3days td.currency-col-sticky {
    position: sticky;
    background: #ffffff;
    z-index: 2;
}

.currency-rates-table-3days thead th.currency-col-sticky {
    background: #f9fafb;
    z-index: 4;
}

.currency-rates-table-3days .currency-col-symbol {
    left: 0;
    z-index: 3;
}

.currency-rates-table-3days thead .currency-col-symbol {
    z-index: 5;
}

.currency-rates-table-3days .currency-col-name {
    left: 90px;
    z-index: 1;
}

.currency-rates-table-3days thead .currency-col-name {
    z-index: 3;
}

.currency-rates-table-3days td.currency-col-sticky {
    box-shadow: 1px 0 0 #e5e7eb;
}

/* day cell content */
.currency-day-rate {
    font-weight: 700;
    color: #111827;
    font-size: 0.95rem;
    line-height: 1.2;
}

.currency-day-change {
    margin-top: 0.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    line-height: 1.1;
}

.currency-day-change.positive { color: #10b981; }
.currency-day-change.negative { color: #ef4444; }
.currency-day-change.neutral { color: #6b7280; font-weight: 500; }

.currency-day-arrow {
    font-size: 0.95rem;
    line-height: 1;
}

.currency-day-percent {
    font-weight: 500;
    color: inherit;
    opacity: 0.9;
}

.currency-day-na {
    color: #6b7280;
}

.currency-rates-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.currency-rates-table thead {
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
}

.currency-rates-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.currency-rates-table td {
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
    color: #1f2937;
}

.currency-rates-table tbody tr:hover {
    background: #f9fafb;
}

.currency-rates-table tbody tr:last-child td {
    border-bottom: none;
}

.currency-name-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.currency-flag {
    border-radius: 2px;
    object-fit: cover;
    flex-shrink: 0;
}

.currency-rate-value {
    font-weight: 600;
    color: #1f2937;
    font-size: 1rem;
}

.currency-rates-note {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f9fafb;
    border-left: 4px solid #3b82f6;
    border-radius: 4px;
    color: #4b5563;
    font-size: 0.875rem;
    line-height: 1.6;
}

.currency-rates-empty {
    margin: 2rem 0;
    padding: 2rem;
    text-align: center;
    background: #f9fafb;
    border-radius: 8px;
    color: #6b7280;
}

@media (max-width: 768px) {
    .currency-main-rates {
        grid-template-columns: 1fr;
        gap: 0.6rem;
        padding: 1rem 0;
    }

    .currency-main-content {
        justify-content: flex-start;
    }

    .currency-main-amount {
        font-size: 1.25rem;
    }

    .currency-eur-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .currency-eur-amount {
        font-size: 2.5rem;
    }

    .currency-eur-text {
        font-size: 0.9375rem;
        margin: 1.5rem 0;
    }

    .currency-rates-table-wrapper {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .currency-rates-table th,
    .currency-rates-table td {
        padding: 0.25rem 0.2rem;
        font-size: 0.875rem;
    }

    .currency-name-cell {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    /* Pe mobil: doar prima coloană (Simbol) rămâne sticky */
    .currency-rates-table-3days th.currency-col-name,
    .currency-rates-table-3days td.currency-col-name {
        position: static !important;
        left: auto !important;
        z-index: auto !important;
    }

    /* Pe mobil: Simbol rămâne sticky cu z-index mare */
    .currency-rates-table-3days th.currency-col-symbol,
    .currency-rates-table-3days td.currency-col-symbol {
        z-index: 10 !important;
    }

    .currency-rates-table-3days thead th.currency-col-symbol {
        z-index: 11 !important;
    }
}

/* Convertor Valutar și Calculator TVA */
.currency-converter-section {
    border-top: 1px solid #001e5a;
    border-bottom: 1px solid #001e5a;
}

.currency-converter-wrapper,
.currency-tva-calculator {
    margin-bottom: 2rem;
}

.currency-converter-wrapper h2,
.currency-tva-calculator h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #111827;
}

.currency-converter-wrapper h3,
.currency-tva-calculator h3 {
    font-size: 0.875rem;
    font-weight: 400;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.currency-converter-date {
    font-size: 0.875rem;
    font-weight: 400;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.currency-converter-date #currency-date-picker {
    cursor: pointer;
    text-decoration: underline;
    color: #3b82f6;
    transition: color 0.2s ease;
}

.currency-converter-date #currency-date-picker:hover {
    color: #2563eb;
}

/* Stiluri pentru Flatpickr calendar */
.flatpickr-calendar {
    font-family: inherit;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.flatpickr-months {
    background: #001e5a;
    border-radius: 8px 8px 0 0;
    padding: 0.75rem;
}

.flatpickr-month {
    color: #fff;
}

.flatpickr-current-month {
    color: #fff !important;
    font-weight: 600;
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month .numInputWrapper {
    color: #fff !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months option {
    background: #001e5a;
    color: #fff;
}

.flatpickr-current-month .numInputWrapper input {
    color: #fff !important;
    background: transparent;
}

.flatpickr-prev-month,
.flatpickr-next-month {
    color: #fff !important;
    fill: #fff !important;
}

.flatpickr-prev-month:hover,
.flatpickr-next-month:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.flatpickr-monthDropdown-months {
    background: transparent;
    color: #fff !important;
    border: none;
    font-weight: 600;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.flatpickr-monthDropdown-months option {
    background: #001e5a;
    color: #fff;
}

.flatpickr-monthDropdown-months::-ms-expand {
    display: none;
}

/* Stiluri pentru toate elementele din header */
.flatpickr-months * {
    color: #fff !important;
}

.flatpickr-months select,
.flatpickr-months input {
    color: #fff !important;
    background: transparent !important;
}

.flatpickr-months select option {
    background: #001e5a !important;
    color: #fff !important;
}

.flatpickr-weekdays {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.flatpickr-weekday {
    color: #6b7280;
    font-weight: 600;
    font-size: 0.875rem;
}

.flatpickr-day {
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.flatpickr-day:hover {
    background: #e5e7eb;
}

.flatpickr-day.selected {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

.flatpickr-day.selected:hover {
    background: #2563eb;
}

.flatpickr-day.today {
    border-color: #3b82f6;
}

.flatpickr-day.flatpickr-disabled {
    color: #d1d5db;
    cursor: not-allowed;
}

.flatpickr-day.flatpickr-disabled:hover {
    background: transparent;
}

.currency-tva-date {
    font-size: 0.875rem;
    font-weight: 400;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.currency-converter-form,
.currency-tva-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.form-group label.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 400;
}

.form-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.form-control {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    background-color: #fff;
    color: #111827;
}

.form-control.input-sm {
    padding: 0.375rem 0.5rem;
    font-size: 0.875rem;
}

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

.form-control:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control[readonly] {
    background-color: #f9fafb;
    cursor: text;
}

.form-input-wrapper span {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    white-space: nowrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem 0.75rem;
    border: none;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.btn-warning {
    background-color: #f59e0b;
    color: #fff;
}

.btn-warning:hover {
    background-color: #d97706;
}

.btn-gray {
    background-color: #6b7280;
    color: #fff;
}

.btn-gray:hover {
    background-color: #4b5563;
}

.btn .fa {
    font-size: 0.875rem;
}

.copy-text {
    min-width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#switch-currency {
    margin-left: 0.5rem;
}

@media (max-width: 768px) {
    .currency-converter-form,
    .currency-tva-form {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .form-input-wrapper {
        flex-wrap: nowrap;
        align-items: center;
    }

    .form-input-wrapper .form-control {
        flex: 1;
        min-width: 0;
    }

    .form-input-wrapper span {
        flex-shrink: 0;
        white-space: nowrap;
        margin: 0;
    }

    .form-input-wrapper .btn {
        flex-shrink: 0;
    }

    .currency-converter-form .form-group, .currency-tva-form .form-group {
        margin-bottom: 0.5rem;
    }
}

/* Secțiune informativă despre cursul BNR */
.currency-info-section {
    margin: 3rem 0 2rem 0;
    padding: 2rem 0;
    border-top: 1px solid #e5e7eb;
}

.currency-info-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.5rem;
}

.currency-info-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.currency-info-content {
    line-height: 1.7;
    color: #374151;
}

.currency-info-content p {
    margin-bottom: 1rem;
}

.currency-info-content ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.currency-info-content li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.currency-info-content strong {
    font-weight: 600;
    color: #111827;
}

@media (max-width: 768px) {
    .currency-info-section {
        margin: 2rem 0 1.5rem 0;
        padding: 1.5rem 0;
    }

    .currency-info-section h2 {
        font-size: 1.5rem;
    }

    .currency-info-section h3 {
        font-size: 1.125rem;
        margin-top: 1.5rem;
    }
}

