/* ==========================================================================
   CSS VARIABLE DEFINITIONS & SYSTEM THEME (Charcoal & Blue Financial Theme)
   ========================================================================== */
:root {
    /* Colors - Clean Zinc/Slate Dark Palette */
    --bg-app: #09090b;
    --bg-card: #18181b;
    --bg-card-header: #202024;
    --bg-input: #0f0f11;
    --border-color: #27272a;
    
    --text-primary: #f4f4f5;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    
    --accent-primary: #3b82f6;
    --accent-hover: #2563eb;
    --accent-focus: rgba(59, 130, 246, 0.2);
    
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
}

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

body {
    background-color: var(--bg-app);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Subtle, performance-friendly background ambient gradient */
.app-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.04), transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* ==========================================================================
   APP LAYOUT & WORKSPACE
   ========================================================================== */
.app-container {
    width: 100%;
    min-height: 100vh;
    padding: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.app-workspace {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 24px;
    width: 100%;
    max-width: 1400px;
    height: calc(100vh - 48px);
    max-height: 900px;
    align-items: stretch;
}

@media (max-width: 1024px) {
    .app-container {
        padding: 16px;
    }
    .app-workspace {
        grid-template-columns: 1fr;
        height: auto;
        max-height: none;
    }
}

/* ==========================================================================
   COMPONENTS: GLASS-CARD & PANELS
   ========================================================================== */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.config-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}

/* Custom Scrollbars for density scrolling views */
.config-panel::-webkit-scrollbar,
.results-table-container::-webkit-scrollbar,
.modal-card::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.config-panel::-webkit-scrollbar-track,
.results-table-container::-webkit-scrollbar-track,
.modal-card::-webkit-scrollbar-track {
    background: transparent;
}
.config-panel::-webkit-scrollbar-thumb,
.results-table-container::-webkit-scrollbar-thumb,
.modal-card::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}
.config-panel::-webkit-scrollbar-thumb:hover,
.results-table-container::-webkit-scrollbar-thumb:hover,
.modal-card::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.section-title .icon {
    font-size: 16px;
}

/* ==========================================================================
   FORMS & INPUT FIELDS
   ========================================================================== */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.input-prefix {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    pointer-events: none;
}

input[type="number"],
input[type="text"],
select {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 13px;
    padding: 9px 12px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
}

input[type="number"]:focus,
input[type="text"]:focus,
select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--accent-focus);
}

.input-wrapper input[type="number"] {
    padding-left: 28px;
}

/* Disabled custom trigger styling */
.custom-select-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 9px 12px;
    font-size: 13px;
}

.disabled-trigger {
    opacity: 0.65;
    cursor: not-allowed;
    background-color: rgba(255, 255, 255, 0.02);
}

.selected-flag {
    font-size: 16px;
    line-height: 1;
}

.selected-text {
    color: var(--text-secondary);
}

/* ==========================================================================
   METHOD WEIGHTS & SLIDERS
   ========================================================================== */
.weights-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    border-top: 1px dashed var(--border-color);
    padding-top: 16px;
}

.weights-header h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.reset-link {
    font-size: 11px;
    font-weight: 500;
    color: var(--accent-primary);
    cursor: pointer;
    text-decoration: none;
    transition: color 0.15s;
}

.reset-link:hover {
    color: #60a5fa;
    text-decoration: underline;
}

.slider-group {
    gap: 4px;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.slider-label {
    color: var(--text-secondary);
    font-weight: 500;
    cursor: help;
}

.slider-value {
    font-weight: 700;
    color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.1);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: monospace;
}

.slider-help {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.3;
}

/* Custom Range Slider Styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    outline: none;
    margin: 8px 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    border: 2px solid var(--bg-card);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
    transition: background 0.15s, transform 0.1s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #60a5fa;
    transform: scale(1.15);
}

input[type="range"]::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    border: 2px solid var(--bg-card);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
    transition: background 0.15s, transform 0.1s;
}

input[type="range"]::-moz-range-thumb:hover {
    background: #60a5fa;
    transform: scale(1.15);
}

/* ==========================================================================
   SEGMENTED CONTROL (Rounding Radio Buttons)
   ========================================================================== */
.segmented-control {
    display: flex;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 2px;
    width: 100%;
}

.segmented-control input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.segmented-control label {
    flex: 1;
    text-align: center;
    padding: 6px 4px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 4px;
    transition: color 0.15s, background-color 0.15s;
    user-select: none;
    text-transform: none;
    letter-spacing: normal;
}

.segmented-control input[type="radio"]:checked + label {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.segmented-control label:hover {
    color: var(--text-primary);
}

/* ==========================================================================
   PRIMARY ACTION BUTTON
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-weight: 600;
    font-size: 13px;
    padding: 10px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    width: 100%;
    margin-top: 8px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background-color: var(--accent-primary);
    color: #ffffff;
}

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

.btn-primary:active {
    transform: scale(0.98);
}

.btn-glow {
    display: none; /* Removed glow element to preserve strictly clean functionality */
}

/* ==========================================================================
   RESULTS PANEL LAYOUT
   ========================================================================== */
.results-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
    height: 100%;
}

/* Quick Analytics widgets grid */
.analytics-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .analytics-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

.analytics-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
}

.card-icon {
    font-size: 18px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.card-icon.blue { background: rgba(59, 130, 246, 0.1); }
.card-icon.green { background: rgba(16, 185, 129, 0.1); }
.card-icon.purple { background: rgba(139, 92, 246, 0.1); }

.card-info {
    display: flex;
    flex-direction: column;
}

.card-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.text-success {
    color: var(--color-success) !important;
}

.text-warning {
    color: var(--color-warning) !important;
}

/* Dashboard filter and sort bar */
.dashboard-controls {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .dashboard-controls {
        flex-direction: column;
        align-items: stretch;
    }
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 320px;
}

@media (max-width: 768px) {
    .search-box {
        max-width: none;
    }
}

.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-box input {
    padding-left: 28px;
}

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

@media (max-width: 480px) {
    .filter-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
}

/* Custom interactive checkbox toggle */
.toggle-group {
    display: flex;
    align-items: center;
}

.toggle-group input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.toggle-switch {
    position: relative;
    width: 32px;
    height: 18px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 9px;
    transition: all 0.2s ease;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all 0.2s ease;
}

input[type="checkbox"]:checked + .toggle-label .toggle-switch {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

input[type="checkbox"]:checked + .toggle-label .toggle-switch::after {
    transform: translateX(14px);
    background: #ffffff;
}

.select-wrapper select {
    padding-right: 28px;
    cursor: pointer;
}

/* ==========================================================================
   RESULTS TABLE & DYNAMIC VIEWS
   ========================================================================== */
.results-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.results-table-container {
    flex: 1;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-card);
    min-height: 0;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    line-height: 1.4;
}

.results-table th {
    position: sticky;
    top: 0;
    background: #1f1f23;
    z-index: 10;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 10px 16px;
    border-bottom: 2px solid var(--border-color);
    text-align: left;
}

.results-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

.results-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.015);
}

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

/* Numerical density alignment settings */
.results-table th.text-right,
.results-table td.text-right {
    text-align: right;
}

.results-table th.text-center,
.results-table td.text-center {
    text-align: center;
}

.results-table td.price-cell {
    text-align: right;
    font-weight: 600;
}

.results-table td.exchange-cell {
    text-align: right;
    color: var(--text-secondary);
}

.results-table td.action-cell {
    text-align: center;
}

.country-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.country-flag {
    font-size: 16px;
    line-height: 1;
}

/* Savings Delta Badges */
.savings-badge {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
}

.savings-badge.green {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.savings-badge.amber {
    background: rgba(245, 158, 11, 0.1);
    color: var(--color-warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Explanatory visual trigger action buttons */
.action-cell button {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 4px 8px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}

.action-cell button:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
    background: rgba(59, 130, 246, 0.05);
}

/* ==========================================================================
   APP STATES (LOADING, ERROR, DYNAMIC HIDDEN)
   ========================================================================== */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 80px 16px;
    text-align: center;
    color: var(--text-secondary);
}

.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(255, 255, 255, 0.05);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.error-state {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: 8px;
    color: #f87171;
    margin-bottom: 16px;
}

.error-icon {
    font-size: 18px;
    line-height: 1;
}

.error-message h4 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}

.error-message p {
    font-size: 12px;
    color: #fca5a5;
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   MODAL OVERLAY & TIMELINE DETAILS
   ========================================================================== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 16px;
}

.modal-card {
    position: relative;
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    animation: modalSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-close {
    position: absolute;
    top: 16px;
    right: 18px;
    font-size: 24px;
    font-weight: 300;
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 14px;
}

.modal-flag {
    font-size: 32px;
    line-height: 1;
}

.modal-title-box h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.modal-title-box p {
    font-size: 12px;
    color: var(--text-secondary);
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Modal Core Comparisons */
.modal-comparison {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
}

.comp-box {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.comp-box.final {
    flex: 1.2;
}

.comp-label {
    font-size: 9px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.comp-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.comp-box.final .comp-value {
    font-size: 16px;
    color: var(--accent-primary);
}

.comp-savings {
    font-size: 11px;
    font-weight: 600;
}

.comp-savings.green { color: var(--color-success); }
.comp-savings.amber { color: var(--color-warning); }

.comp-arrow {
    color: var(--text-muted);
    font-size: 14px;
    user-select: none;
}

/* Modal Information Sections */
.modal-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-section h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 6px;
    margin: 0;
}

/* Metrics Factor Grid */
.factor-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (max-width: 540px) {
    .factor-grid {
        grid-template-columns: 1fr;
    }
}

.factor-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.005);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.factor-icon {
    font-size: 16px;
}

.factor-card h5 {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

.factor-number {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-primary);
    font-family: monospace;
}

.factor-card p {
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.3;
}

/* Pipeline Step Timeline */
.pipeline-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
}

.pipeline-list::before {
    content: '';
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 11px;
    width: 2px;
    background: var(--border-color);
    z-index: 1;
}

.pipeline-list li {
    display: flex;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 11px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.pipeline-list li:hover .step-num {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.step-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.step-content h6 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.step-content p {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.3;
}

/* ==========================================================================
   VAT & TAX CONFIGURATION NEW COMPONENTS
   ========================================================================== */
.vat-settings-group {
    border-top: 1px dashed var(--border-color);
    padding-top: 16px;
    margin-top: 8px;
}

.vat-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.btn-configure-taxes {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    outline: none;
}

.btn-configure-taxes:hover {
    border-color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.05);
}

.tax-modal-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.btn-reset-taxes {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--color-error);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-reset-taxes:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: var(--color-error);
}

.tax-country-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 350px;
    overflow-y: auto;
    padding-right: 4px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-input);
    padding: 8px;
}

.tax-country-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.02);
    transition: background 0.15s;
}

.tax-country-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.tax-country-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.tax-country-info .flag {
    font-size: 18px;
    line-height: 1;
}

.tax-country-info .name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tax-country-info .code {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 1px 4px;
    border-radius: 3px;
}

.tax-input-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tax-rate-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 90px;
}

.tax-rate-input-wrapper input[type="number"] {
    width: 100%;
    padding: 6px 22px 6px 8px;
    text-align: right;
    font-family: monospace;
    font-weight: 600;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 12px;
}

.tax-rate-input-suffix {
    position: absolute;
    right: 8px;
    font-size: 11px;
    color: var(--text-muted);
    pointer-events: none;
}

