/* ==========================================================================
   Precificação Lucro Real - Modern Design System (Vanilla CSS)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens & CSS Variables
   -------------------------------------------------------------------------- */
:root {
    /* Color Palette - Premium Dark Theme (Default) */
    --bg-app: #090d16;
    --bg-card: rgba(17, 24, 39, 0.75);
    --bg-card-hover: rgba(24, 34, 53, 0.9);
    --bg-card-subtle: rgba(255, 255, 255, 0.03);
    --bg-input: rgba(15, 23, 42, 0.8);
    --bg-input-focus: rgba(15, 23, 42, 1);
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(59, 130, 246, 0.3);
    --border-subtle: rgba(255, 255, 255, 0.05);

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

    /* Brand Accent Colors */
    --brand-primary: #3b82f6;
    --brand-primary-hover: #2563eb;
    --brand-primary-glow: rgba(59, 130, 246, 0.2);

    --success: #10b981;
    --success-hover: #059669;
    --success-glow: rgba(16, 185, 129, 0.2);

    --warning: #f59e0b;
    --warning-hover: #d97706;
    --warning-glow: rgba(245, 158, 11, 0.2);

    --danger: #ef4444;
    --danger-hover: #dc2626;
    --danger-glow: rgba(239, 68, 68, 0.2);

    --accent: #8b5cf6;
    --accent-glow: rgba(139, 92, 246, 0.2);

    /* Shadows & Effects */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.45);
    --shadow-glow: 0 0 25px rgba(59, 130, 246, 0.15);

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;

    --glass-blur: 16px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    --font-heading: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;

    color-scheme: dark;
}

/* Light Theme Variables Override */
[data-theme="light"] {
    --bg-app: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-card-hover: rgba(255, 255, 255, 1);
    --bg-card-subtle: rgba(241, 245, 249, 0.8);
    --bg-input: #ffffff;
    --bg-input-focus: #ffffff;

    --border-color: rgba(226, 232, 240, 0.9);
    --border-hover: rgba(37, 99, 235, 0.4);
    --border-subtle: rgba(203, 213, 225, 0.6);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;

    --brand-primary: #2563eb;
    --brand-primary-hover: #1d4ed8;
    --brand-primary-glow: rgba(37, 99, 235, 0.12);

    --success: #059669;
    --success-glow: rgba(5, 150, 105, 0.12);

    --warning: #d97706;
    --warning-glow: rgba(217, 119, 6, 0.12);

    --danger: #dc2626;
    --danger-glow: rgba(220, 38, 38, 0.12);

    --accent: #7c3aed;
    --accent-glow: rgba(124, 58, 237, 0.12);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.08);
    --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.08);

    color-scheme: light;
}

/* --------------------------------------------------------------------------
   2. Reset & Global Base Styles
   -------------------------------------------------------------------------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-app);
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.08) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.925rem;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.25);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.45);
}

/* Typography Base */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
    letter-spacing: -0.02em;
}

h1 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }
h4 { font-size: 0.95rem; }

p { color: var(--text-secondary); }

a {
    color: var(--brand-primary);
    text-decoration: none;
    transition: var(--transition);
}
a:hover { color: var(--brand-primary-hover); }

/* --------------------------------------------------------------------------
   3. Utility Classes (Grid, Flex, Spacing, Text)
   -------------------------------------------------------------------------- */
/* Grids */
.grid {
    display: grid;
    gap: 1.25rem;
}
.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3-2 { grid-template-columns: 1.15fr 0.85fr; }

/* Flexbox */
.flex-column { display: flex; flex-direction: column; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-align-center { display: flex; align-items: center; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.flex-gap { display: flex; gap: 0.75rem; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.justify-end { justify-content: flex-end; }

/* Spacing Helpers */
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 0.75rem; }
.gap-3 { gap: 1.25rem; }
.gap-4 { gap: 1.75rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }

.my-2 { margin-top: 0.5rem; margin-bottom: 0.5rem; }
.my-3 { margin-top: 1rem; margin-bottom: 1rem; }

.p-0 { padding: 0 !important; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }

/* Visibility & Displays */
.hidden { display: none !important; }
.cursor-pointer { cursor: pointer; }

/* Text Utilities */
.text-primary { color: var(--brand-primary) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-accent { color: var(--accent) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-right { text-align: right; }
.text-center { text-align: center; }

.fw-normal { font-weight: 400; }
.fw-medium { font-weight: 500; }
.fw-bold { font-weight: 700; }

.fs-xs { font-size: 0.75rem; }
.fs-sm { font-size: 0.85rem; }
.fs-md { font-size: 1rem; }
.fs-lg { font-size: 1.25rem; }
.fs-xl { font-size: 1.6rem; }

.rounded { border-radius: var(--radius-md); }
.bg-card-subtle { background: var(--bg-card-subtle); }

.divider {
    border: 0;
    height: 1px;
    background: var(--border-color);
}

/* --------------------------------------------------------------------------
   4. App Header Navigation
   -------------------------------------------------------------------------- */
.app-header {
    background: var(--bg-card);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.header-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0.85rem 1.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.header-icon {
    font-size: 1.5rem;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand-primary), var(--accent));
    padding: 0.65rem;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px var(--brand-primary-glow);
}

.header-title h1 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-title .subtitle {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Header Navigation Bar */
.main-nav {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--bg-card-subtle);
    padding: 0.3rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: var(--transition);
}
.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}
.nav-link.active {
    color: #ffffff !important;
    background: var(--brand-primary);
    box-shadow: 0 2px 8px var(--brand-primary-glow);
}

/* --------------------------------------------------------------------------
   5. Buttons & Badges
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-secondary {
    background: var(--bg-card-subtle);
    color: var(--text-primary);
    border-color: var(--border-color);
}
.btn-secondary:hover {
    background: var(--border-color);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-hover));
    color: #ffffff;
    box-shadow: 0 4px 14px var(--brand-primary-glow);
}
.btn-primary:hover {
    box-shadow: 0 6px 20px var(--brand-primary-glow);
    transform: translateY(-1px);
}

/* Channel Tab Selector Buttons */
.channel-tabs {
    display: flex;
    background: var(--bg-input);
    padding: 0.35rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    gap: 0.35rem;
    flex-wrap: wrap;
}

.btn-channel {
    flex: 1;
    min-width: 130px;
    padding: 0.6rem 0.85rem;
    background: transparent;
    color: var(--text-secondary);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-channel:hover {
    color: var(--text-primary);
    background: var(--bg-card-subtle);
}

.btn-channel.active {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-hover));
    color: #ffffff;
    box-shadow: 0 4px 12px var(--brand-primary-glow);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1;
}

.badge-primary { background: var(--brand-primary-glow); color: var(--brand-primary); border: 1px solid rgba(59, 130, 246, 0.3); }
.badge-info { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(96, 165, 250, 0.3); }
.badge-success { background: var(--success-glow); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-warning { background: var(--warning-glow); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-danger { background: var(--danger-glow); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-secondary { background: var(--bg-card-subtle); color: var(--text-secondary); border: 1px solid var(--border-color); }

/* --------------------------------------------------------------------------
   6. Main Layout & Cards System
   -------------------------------------------------------------------------- */
.main-container {
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    padding: 1.75rem;
    flex: 1;
}

.card {
    background: var(--bg-card);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition);
}

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

.card-compact {
    border-radius: var(--radius-md);
}

.card.border-primary {
    border: 1.5px solid rgba(59, 130, 246, 0.4);
    box-shadow: var(--shadow-glow);
}

.card-header {
    padding: 1.1rem 1.4rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.card-body {
    padding: 1.4rem;
}

.card-compact .card-header {
    padding: 0.85rem 1.2rem;
}
.card-compact .card-body {
    padding: 1.1rem;
}

/* --------------------------------------------------------------------------
   7. File Upload Tiles (Bling ERP)
   -------------------------------------------------------------------------- */
.file-upload-box {
    border: 2px dashed var(--border-color);
    background: var(--bg-input);
    border-radius: var(--radius-md);
    padding: 1.1rem 0.85rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    position: relative;
}

.file-upload-box:hover,
.file-upload-box.dragover {
    border-color: var(--brand-primary);
    background: var(--brand-primary-glow);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.25);
}

.file-upload-box.dragover {
    border-style: solid;
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.15);
}

.upload-icon {
    font-size: 1.6rem;
    color: var(--brand-primary);
    transition: var(--transition);
}

.file-upload-box:hover .upload-icon,
.file-upload-box.dragover .upload-icon {
    transform: scale(1.2) rotate(-4deg);
    color: #3b82f6;
}

.upload-label {
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--text-primary);
}

.upload-subtext {
    font-size: 0.725rem;
    opacity: 0.75;
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   8. SKU Search Autocomplete Dropdown
   -------------------------------------------------------------------------- */
.sku-search-wrapper {
    position: relative;
    width: 100%;
}

.sku-autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 0.4rem);
    left: 0;
    right: 0;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--brand-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    max-height: 280px;
    overflow-y: auto;
    padding: 0.35rem;
    animation: slideDown 0.15s ease-out;
}

.sku-autocomplete-dropdown .dropdown-item {
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    border-bottom: 1px solid var(--border-subtle);
}

.sku-autocomplete-dropdown .dropdown-item:last-child {
    border-bottom: none;
}

.sku-autocomplete-dropdown .dropdown-item:hover,
.hover-highlight:hover {
    background: var(--brand-primary-glow);
    cursor: pointer;
}

/* --------------------------------------------------------------------------
   9. Form Controls, Labels & Inputs
   -------------------------------------------------------------------------- */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.form-control {
    width: 100%;
    padding: 0.6rem 0.85rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    background-color: var(--bg-input-focus);
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px var(--brand-primary-glow);
}

.form-control-lg {
    padding: 0.8rem 1.1rem;
    font-size: 1.05rem;
    font-weight: 600;
}

.form-control[readonly] {
    opacity: 0.75;
    cursor: not-allowed;
    background-color: var(--bg-card-subtle);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.1rem;
    padding-right: 2.2rem;
}

/* Checkbox & Switch Labels */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 1.15rem;
    height: 1.15rem;
    accent-color: var(--brand-primary);
    cursor: pointer;
    border-radius: var(--radius-sm);
}

/* Input Group */
.input-group {
    display: flex;
    align-items: center;
}

.input-group .form-control {
    border-radius: 0;
}
.input-group .form-control:first-child,
.input-group-text:first-child {
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
}
.input-group .form-control:last-child,
.input-group-text:last-child {
    border-top-right-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

.input-group-text {
    padding: 0.6rem 0.85rem;
    background: var(--bg-card-subtle);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   10. Metric Callout Cards & DRE Display
   -------------------------------------------------------------------------- */
.purchase-credits-box {
    background: var(--bg-card-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.stat-card {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.stat-label {
    font-size: 0.775rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.1;
}

.stat-subtext {
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   11. DRE Table Styles
   -------------------------------------------------------------------------- */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.875rem;
}

.table th {
    padding: 0.85rem 1.25rem;
    font-family: var(--font-heading);
    font-size: 0.775rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    background: var(--bg-card-subtle);
    border-bottom: 1px solid var(--border-color);
}

.table td {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-primary);
    transition: var(--transition);
}

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

.table-active td {
    background: rgba(59, 130, 246, 0.08) !important;
    color: var(--brand-primary) !important;
}

.table-success td {
    background: rgba(16, 185, 129, 0.08) !important;
    color: var(--success) !important;
}

/* --------------------------------------------------------------------------
   12. Keyframe Animations
   -------------------------------------------------------------------------- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   13. Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
    .grid-3-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: 1rem;
    }
    
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }

    .header-container {
        padding: 0.75rem 1rem;
    }

    .header-title h1 {
        font-size: 1.15rem;
    }
    .header-title .subtitle {
        display: none;
    }

    .btn-channel {
        min-width: 100%;
    }
}

/* --------------------------------------------------------------------------
   14. Tax Calculation Info Button & Modal Popover
   -------------------------------------------------------------------------- */
.btn-tax-info {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 2px 5px;
    margin-left: 6px;
    font-size: 0.85rem;
    color: var(--brand-primary);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    vertical-align: middle;
}

.btn-tax-info:hover {
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.15);
    transform: scale(1.15);
}

.tax-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

.tax-modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 520px;
    padding: 24px;
    color: var(--text-primary);
    animation: slideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.tax-modal-header h4 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.tax-modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
    padding: 4px;
}

.tax-modal-close:hover {
    color: var(--danger);
}

.tax-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.tax-detail-box {
    background: var(--bg-card-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
}

.tax-detail-box h5 {
    margin: 0 0 10px 0;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.tax-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.tax-detail-row:last-child {
    margin-bottom: 0;
}

.tax-detail-row span.label {
    color: var(--text-muted);
}

.tax-detail-row span.value {
    font-weight: 600;
    color: var(--text-primary);
}

.tax-modal-notes {
    font-size: 0.82rem;
    color: var(--text-secondary);
    background: rgba(59, 130, 246, 0.08);
    border-left: 3px solid var(--brand-primary);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    line-height: 1.4;
}
