/* ==========================================
   UK STAMP DUTY CALCULATOR — CalcTechLab
   ========================================== */

/* ---- Hero ---- */
.sd-hero {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f2744 50%, #1a1a2e 100%);
    padding: 3rem 0 2.5rem;
    position: relative;
    overflow: hidden;
}

.sd-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59,130,246,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.sd-hero-badge {
    display: inline-block;
    background: rgba(59,130,246,0.15);
    color: #60a5fa;
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    margin-bottom: 1rem;
    border: 1px solid rgba(59,130,246,0.2);
}

.sd-hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.sd-year-badge {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sd-hero-subtitle {
    font-size: 1.05rem;
    color: #94a3b8;
    max-width: 650px;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
}

.sd-hero-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.sd-hero-features span {
    color: #cbd5e1;
    font-size: 0.85rem;
    font-weight: 500;
}

.sd-hero-features i {
    color: #10b981;
    margin-right: 0.3rem;
}

.sd-rates-badge {
    display: inline-block;
    background: rgba(16,185,129,0.1);
    color: #34d399;
    border: 1px solid rgba(16,185,129,0.2);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
}

/* ---- Tabs ---- */
.sd-tabs {
    background: var(--bs-body-bg);
    border-radius: 12px;
    padding: 0.4rem;
    border: 1px solid rgba(0,0,0,0.08);
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
}

[data-bs-theme="dark"] .sd-tabs {
    background: #1e293b;
    border-color: #334155;
}

.sd-tabs .nav-item { list-style: none; }

.sd-tabs .nav-link {
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.4rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: #64748b;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.sd-tabs .nav-link:hover { color: #3b82f6; }

.sd-tabs .nav-link.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 2px 8px rgba(59,130,246,0.3);
}

.sd-tabs .nav-link i { margin-right: 0.4rem; }

/* ---- Tab Content ---- */
.sd-tab-content { display: none; }
.sd-tab-content.active { display: block; }

/* ---- Cards ---- */
.sd-card {
    background: var(--bs-body-bg);
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    overflow: hidden;
    transition: box-shadow 0.2s;
}

[data-bs-theme="dark"] .sd-card {
    background: #1e293b;
    border-color: #334155;
}

.sd-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }

.sd-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem 0.75rem;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    font-weight: 700;
    font-size: 0.95rem;
    color: #1e293b;
}

[data-bs-theme="dark"] .sd-card-header {
    border-bottom-color: #334155;
    color: #f1f5f9;
}

.sd-card-header i { color: #3b82f6; }

.sd-card-body { padding: 1.25rem; }

/* ---- Region Grid ---- */
.sd-region-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.sd-region-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: var(--bs-body-bg);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    gap: 0.2rem;
}

[data-bs-theme="dark"] .sd-region-btn {
    background: #0f172a;
    border-color: #334155;
}

.sd-region-btn:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
}

.sd-region-btn.active {
    border-color: #3b82f6;
    background: rgba(59,130,246,0.06);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.sd-region-flag { font-size: 1.8rem; line-height: 1; }

.sd-region-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
}

[data-bs-theme="dark"] .sd-region-name { color: #f1f5f9; }

.sd-region-sub {
    font-size: 0.7rem;
    color: #94a3b8;
}

.sd-region-tax {
    font-size: 0.7rem;
    font-weight: 700;
    color: #3b82f6;
    background: rgba(59,130,246,0.1);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    margin-top: 0.2rem;
}

/* ---- Price Input ---- */
.sd-price-input-group {
    display: flex;
    align-items: center;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.sd-price-input-group:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

[data-bs-theme="dark"] .sd-price-input-group {
    border-color: #334155;
    background: #0f172a;
}

.sd-currency {
    padding: 0 1rem;
    font-size: 1.3rem;
    font-weight: 700;
    color: #3b82f6;
    background: #f8fafc;
    border-right: 2px solid #e2e8f0;
    height: 100%;
    display: flex;
    align-items: center;
}

[data-bs-theme="dark"] .sd-currency {
    background: #1e293b;
    border-right-color: #334155;
    color: #60a5fa;
}

.sd-price-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0.8rem 1rem;
    font-size: 1.4rem;
    font-weight: 700;
    background: transparent;
    color: #1e293b;
    width: 100%;
}

[data-bs-theme="dark"] .sd-price-input { color: #f1f5f9; }

.sd-price-display {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.4rem;
    min-height: 1.2rem;
    font-weight: 500;
}

/* ---- Quick Amounts ---- */
.sd-quick-amounts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

.sd-quick-btn {
    padding: 0.3rem 0.7rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: var(--bs-body-bg);
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s;
}

[data-bs-theme="dark"] .sd-quick-btn {
    background: #0f172a;
    border-color: #334155;
    color: #94a3b8;
}

.sd-quick-btn:hover,
.sd-quick-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

/* ---- Buyer Type Grid ---- */
.sd-buyer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
}

.sd-buyer-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.9rem 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: var(--bs-body-bg);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    gap: 0.3rem;
}

[data-bs-theme="dark"] .sd-buyer-btn {
    background: #0f172a;
    border-color: #334155;
}

.sd-buyer-btn i {
    font-size: 1.3rem;
    color: #94a3b8;
    transition: color 0.2s;
}

.sd-buyer-btn span {
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
}

[data-bs-theme="dark"] .sd-buyer-btn span { color: #cbd5e1; }

.sd-buyer-btn small {
    font-size: 0.7rem;
    color: #94a3b8;
}

.sd-buyer-btn:hover,
.sd-buyer-btn.active {
    border-color: #3b82f6;
    background: rgba(59,130,246,0.06);
}

.sd-buyer-btn.active i { color: #3b82f6; }
.sd-buyer-btn.active span { color: #3b82f6; }

/* ---- Toggle Switch ---- */
.sd-option-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

[data-bs-theme="dark"] .sd-option-row {
    border-bottom-color: #334155;
}

.sd-option-row:last-child { border-bottom: none; }

.sd-option-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.sd-option-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
}

[data-bs-theme="dark"] .sd-option-label { color: #f1f5f9; }

.sd-option-label i {
    color: #3b82f6;
    margin-right: 0.3rem;
}

.sd-option-desc {
    font-size: 0.75rem;
    color: #94a3b8;
}

.sd-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.sd-toggle input { opacity: 0; width: 0; height: 0; }

.sd-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #cbd5e1;
    border-radius: 24px;
    transition: 0.3s;
}

.sd-toggle-slider:before {
    position: absolute;
    content: '';
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.sd-toggle input:checked + .sd-toggle-slider { background: #3b82f6; }
.sd-toggle input:checked + .sd-toggle-slider:before { transform: translateX(20px); }

/* ---- Calculate Button ---- */
.sd-btn-calculate {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.sd-btn-calculate:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}

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

/* ---- Rates Info ---- */
.sd-rates-info {
    font-size: 0.78rem;
    color: #64748b;
    text-align: center;
    padding: 0.5rem;
}

.sd-rates-info i { color: #3b82f6; }

/* ---- Placeholder ---- */
.sd-placeholder {
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bs-body-bg);
    border-radius: 16px;
    border: 2px dashed #e2e8f0;
}

[data-bs-theme="dark"] .sd-placeholder {
    background: #1e293b;
    border-color: #334155;
}

.sd-placeholder-inner { text-align: center; padding: 2rem; }

.sd-placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}

.sd-placeholder-inner h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.sd-placeholder-inner p {
    font-size: 0.9rem;
    color: #94a3b8;
    max-width: 350px;
    margin: 0 auto 1.5rem;
}

.sd-placeholder-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    max-width: 320px;
    margin: 0 auto;
}

.sd-placeholder-feature {
    font-size: 0.8rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* ---- Result Hero ---- */
.sd-result-hero {
    background: linear-gradient(135deg, #1e3a5f, #0f2744);
    border-radius: 16px;
    overflow: hidden;
}

.sd-result-hero-inner { padding: 1.5rem; }

.sd-result-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sd-result-item {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.sd-result-label {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.sd-result-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: white;
}

.sd-duty-amount { color: #fca5a5 !important; font-size: 1.6rem !important; }
.sd-total-amount { color: #6ee7b7 !important; }

.sd-result-rate {
    font-size: 0.75rem;
    color: #94a3b8;
}

.sd-result-divider {
    width: 1px;
    height: 60px;
    background: rgba(255,255,255,0.1);
    flex-shrink: 0;
}

/* ---- Authority Badge ---- */
.sd-authority-badge {
    margin-left: auto;
    font-size: 0.7rem;
    font-weight: 600;
    color: #3b82f6;
    background: rgba(59,130,246,0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

/* ---- Table ---- */
.sd-table {
    width: 100%;
    font-size: 0.85rem;
    border-collapse: collapse;
}

.sd-table thead th {
    background: #f1f5f9;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #475569;
    padding: 0.7rem 1rem;
    border-bottom: 2px solid #e2e8f0;
}

[data-bs-theme="dark"] .sd-table thead th {
    background: #0f172a;
    color: #94a3b8;
    border-bottom-color: #334155;
}

.sd-table tbody td {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

[data-bs-theme="dark"] .sd-table tbody td {
    border-bottom-color: #1e293b;
    color: #cbd5e1;
}

.sd-table tfoot td {
    padding: 0.75rem 1rem;
    font-weight: 700;
    background: #f8fafc;
    border-top: 2px solid #e2e8f0;
    color: #1e293b;
}

[data-bs-theme="dark"] .sd-table tfoot td {
    background: #0f172a;
    border-top-color: #334155;
    color: #f1f5f9;
}

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

/* ---- Charts ---- */
.sd-chart-card {
    padding: 1.25rem;
}

.sd-chart-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.75rem;
    text-align: center;
}

[data-bs-theme="dark"] .sd-chart-title { color: #f1f5f9; }

.sd-chart-wrapper {
    position: relative;
    height: 200px;
}

.sd-chart-wrapper-lg {
    position: relative;
    height: 280px;
}

/* ---- Key Facts Grid ---- */
.sd-facts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.sd-fact-item {
    background: #f8fafc;
    border-radius: 10px;
    padding: 0.9rem;
    text-align: center;
}

[data-bs-theme="dark"] .sd-fact-item { background: #0f172a; }

.sd-fact-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 800;
    color: #3b82f6;
}

.sd-fact-label {
    display: block;
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ---- Export Buttons ---- */
.sd-export-row {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.sd-btn-export {
    flex: 1;
    min-width: 110px;
    padding: 0.65rem 0.75rem;
    border: 2px solid;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    background: transparent;
}

.sd-btn-export i { margin-right: 0.3rem; }

.sd-btn-pdf { border-color: #ef4444; color: #ef4444; }
.sd-btn-pdf:hover { background: #ef4444; color: white; }

.sd-btn-csv { border-color: #10b981; color: #10b981; }
.sd-btn-csv:hover { background: #10b981; color: white; }

.sd-btn-print { border-color: #6366f1; color: #6366f1; }
.sd-btn-print:hover { background: #6366f1; color: white; }

.sd-btn-share { border-color: #f59e0b; color: #f59e0b; }
.sd-btn-share:hover { background: #f59e0b; color: white; }

/* ---- Authority Card ---- */
.sd-authority-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: rgba(59,130,246,0.05);
    border: 1px solid rgba(59,130,246,0.15);
    border-radius: 12px;
    font-size: 0.85rem;
    color: #475569;
    flex-wrap: wrap;
}

[data-bs-theme="dark"] .sd-authority-card { color: #cbd5e1; }

.sd-authority-card i { color: #3b82f6; }

/* ---- Authority Card continued ---- */
.sd-authority-card a {
    margin-left: auto;
    color: #3b82f6;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.sd-authority-card a:hover { text-decoration: underline; }

/* ---- Compare Headers ---- */
.sd-compare-a-header { border-top: 3px solid #3b82f6; }
.sd-compare-b-header { border-top: 3px solid #10b981; }

/* ---- Compare Result Cards ---- */
.sd-compare-result-card {
    background: var(--bs-body-bg);
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    padding: 1.25rem;
    text-align: center;
}

[data-bs-theme="dark"] .sd-compare-result-card {
    background: #1e293b;
    border-color: #334155;
}

.sd-compare-result-card.card-a { border-color: #3b82f6; }
.sd-compare-result-card.card-b { border-color: #10b981; }

.sd-compare-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.sd-compare-label.label-a { color: #3b82f6; }
.sd-compare-label.label-b { color: #10b981; }

.sd-compare-duty {
    font-size: 2rem;
    font-weight: 800;
    color: #ef4444;
    margin-bottom: 0.25rem;
}

.sd-compare-rate {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.75rem;
}

.sd-compare-breakdown {
    font-size: 0.8rem;
    color: #475569;
    text-align: left;
}

[data-bs-theme="dark"] .sd-compare-breakdown { color: #cbd5e1; }

.sd-compare-breakdown div {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

[data-bs-theme="dark"] .sd-compare-breakdown div {
    border-bottom-color: #334155;
}

/* ---- Diff Banner ---- */
.sd-diff-banner {
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1px solid #86efac;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

[data-bs-theme="dark"] .sd-diff-banner {
    background: rgba(5,150,105,0.1);
    border-color: rgba(5,150,105,0.3);
}

.sd-diff-banner .sd-diff-icon { font-size: 2rem; }

.sd-diff-text {
    font-size: 1rem;
    color: #475569;
    flex: 1;
}

[data-bs-theme="dark"] .sd-diff-text { color: #cbd5e1; }

.sd-diff-amount {
    font-size: 1.3rem;
    font-weight: 800;
    color: #059669;
}

/* ---- Form Elements ---- */
.sd-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

[data-bs-theme="dark"] .sd-label { color: #94a3b8; }

.sd-input,
.sd-select {
    width: 100%;
    padding: 0.6rem 0.9rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    background: var(--bs-body-bg);
    color: #1e293b;
    transition: all 0.2s;
}

[data-bs-theme="dark"] .sd-input,
[data-bs-theme="dark"] .sd-select {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

.sd-input:focus,
.sd-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
    outline: none;
}

/* ---- Guide Styles ---- */
.sd-guide-intro {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

[data-bs-theme="dark"] .sd-guide-intro { color: #cbd5e1; }

.sd-guide-heading {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #e2e8f0;
}

[data-bs-theme="dark"] .sd-guide-heading {
    color: #f1f5f9;
    border-bottom-color: #334155;
}

.sd-guide-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.sd-guide-alert i { margin-top: 0.1rem; flex-shrink: 0; }

.sd-alert-info {
    background: rgba(59,130,246,0.06);
    border: 1px solid rgba(59,130,246,0.15);
    color: #1e40af;
}

[data-bs-theme="dark"] .sd-alert-info {
    color: #93c5fd;
    background: rgba(59,130,246,0.1);
}

.sd-alert-info i { color: #3b82f6; }

.sd-alert-warning {
    background: rgba(245,158,11,0.06);
    border: 1px solid rgba(245,158,11,0.2);
    color: #92400e;
}

[data-bs-theme="dark"] .sd-alert-warning {
    color: #fcd34d;
    background: rgba(245,158,11,0.1);
}

.sd-alert-warning i { color: #f59e0b; }

/* ---- Rate Badges ---- */
.sd-rate-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
}

.sd-rate-0   { background: #dcfce7; color: #166534; }
.sd-rate-2   { background: #dbeafe; color: #1e40af; }
.sd-rate-4   { background: #fef3c7; color: #92400e; }
.sd-rate-5   { background: #fef3c7; color: #92400e; }
.sd-rate-6   { background: #fed7aa; color: #9a3412; }
.sd-rate-7   { background: #fed7aa; color: #9a3412; }
.sd-rate-10  { background: #fecaca; color: #991b1b; }
.sd-rate-11  { background: #fecaca; color: #991b1b; }
.sd-rate-12  { background: #fca5a5; color: #7f1d1d; }
.sd-rate-14  { background: #fca5a5; color: #7f1d1d; }
.sd-rate-16  { background: #f87171; color: #450a0a; }
.sd-rate-std { background: #e2e8f0; color: #475569; }

[data-bs-theme="dark"] .sd-rate-0  { background: rgba(22,163,74,0.2);  color: #86efac; }
[data-bs-theme="dark"] .sd-rate-2  { background: rgba(59,130,246,0.2); color: #93c5fd; }
[data-bs-theme="dark"] .sd-rate-5  { background: rgba(245,158,11,0.2); color: #fcd34d; }
[data-bs-theme="dark"] .sd-rate-10 { background: rgba(239,68,68,0.2);  color: #fca5a5; }
[data-bs-theme="dark"] .sd-rate-12 { background: rgba(220,38,38,0.2);  color: #f87171; }

/* ---- Rates Table ---- */
.sd-rates-table tbody tr:hover { background: rgba(59,130,246,0.03); }

/* ---- FAQ ---- */
.sd-faq-item {
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

[data-bs-theme="dark"] .sd-faq-item {
    border-bottom-color: #334155;
}

.sd-faq-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    background: transparent;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    text-align: left;
    gap: 1rem;
}

[data-bs-theme="dark"] .sd-faq-btn { color: #f1f5f9; }

.sd-faq-btn i {
    color: #3b82f6;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.sd-faq-btn[aria-expanded="true"] i { transform: rotate(180deg); }

.sd-faq-body {
    padding: 0 0 1rem;
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.7;
}

[data-bs-theme="dark"] .sd-faq-body { color: #cbd5e1; }

/* ---- Resource Links ---- */
.sd-resource-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    font-size: 0.85rem;
    font-weight: 600;
    color: #3b82f6;
    text-decoration: none;
    transition: all 0.2s;
}

[data-bs-theme="dark"] .sd-resource-link {
    border-bottom-color: #334155;
}

.sd-resource-link:last-child { border-bottom: none; }
.sd-resource-link:hover { color: #2563eb; padding-left: 0.3rem; }
.sd-resource-link i { font-size: 0.75rem; flex-shrink: 0; }

/* ---- Related Tools ---- */
.sd-related-tool {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s;
}

[data-bs-theme="dark"] .sd-related-tool {
    color: #cbd5e1;
    border-bottom-color: #334155;
}

.sd-related-tool:last-child { border-bottom: none; }
.sd-related-tool:hover { color: #3b82f6; padding-left: 0.3rem; }
.sd-related-tool i:first-child { color: #3b82f6; width: 16px; }

/* ---- Disclaimer ---- */
.sd-disclaimer-card {
    background: rgba(245,158,11,0.05);
    border: 1px solid rgba(245,158,11,0.2);
    border-radius: 12px;
    padding: 1.25rem;
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.6;
}

[data-bs-theme="dark"] .sd-disclaimer-card { color: #94a3b8; }

.sd-disclaimer-card i {
    color: #f59e0b;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.sd-disclaimer-card h6 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

[data-bs-theme="dark"] .sd-disclaimer-card h6 { color: #f1f5f9; }

.sd-disclaimer-date {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 0;
}

/* ---- Sticky Sidebar ---- */
.sd-sticky-card {
    position: sticky;
    top: 80px;
}

/* ---- Loading Spinner ---- */
.sd-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.sd-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: sd-spin 0.8s linear infinite;
}

@keyframes sd-spin { to { transform: rotate(360deg); } }

/* ---- Toast ---- */
.sd-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1e293b;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 9999;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    white-space: nowrap;
}

.sd-toast.show { transform: translateX(-50%) translateY(0); }

/* ---- Responsive ---- */
@media (max-width: 991px) {
    .sd-hero-title { font-size: 2.2rem; }
    .sd-sticky-card { position: static; }
}

@media (max-width: 767px) {
    .sd-hero { padding: 2rem 0 1.5rem; }
    .sd-hero-title { font-size: 1.8rem; }
    .sd-hero-subtitle { font-size: 0.9rem; }
    .sd-hero-features { gap: 0.5rem; }
    .sd-hero-features span { font-size: 0.75rem; }
    .sd-result-row { flex-direction: column; gap: 1rem; }
    .sd-result-divider { width: 60px; height: 1px; }
    .sd-result-value { font-size: 1.2rem; }
    .sd-duty-amount { font-size: 1.4rem !important; }
    .sd-facts-grid { grid-template-columns: repeat(2, 1fr); }
    .sd-tabs .nav-link { padding: 0.5rem 0.8rem; font-size: 0.78rem; }
    .sd-tabs .nav-link i { display: none; }
    .sd-chart-wrapper { height: 180px; }
    .sd-region-grid { grid-template-columns: repeat(3, 1fr); }
    .sd-buyer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .sd-region-flag { font-size: 1.4rem; }
    .sd-region-name { font-size: 0.75rem; }
    .sd-export-row { flex-direction: column; }
    .sd-btn-export { min-width: unset; }
    .sd-placeholder-features { grid-template-columns: 1fr; }
}

/* ---- Print ---- */
@media print {
    .sd-hero, .sd-tabs, .sd-btn-calculate,
    .sd-export-row, .sd-placeholder,
    .sd-quick-amounts, .sd-buyer-grid,
    .sd-region-grid, .sd-sticky-card { display: none !important; }
    .sd-card { box-shadow: none; border: 1px solid #ddd; }
    .sd-result-hero { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
