/* ===== GLOBAL ===== */
:root {
    --primary: #0d6efd;
    --primary-dark: #0b5ed7;
    --gradient-day: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
    --gradient-night: linear-gradient(135deg, #1a237e 0%, #0d1b4a 100%);
    --gradient-hero: linear-gradient(160deg, #0d47a1 0%, #1976d2 50%, #42a5f5 100%);
}

html, body {
    min-height: 100vh;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #f0f4f8;
}

/* ===== NAVBAR ===== */
.navbar {
    background: linear-gradient(90deg, #0d47a1, #1565c0);
    box-shadow: 0 2px 12px rgba(13, 71, 161, 0.4);
    padding: 14px 0;
}

.navbar-brand {
    font-size: 1.3rem !important;
    letter-spacing: -0.3px;
}

.navbar .nav-link {
    color: rgba(255,255,255,0.85) !important;
    transition: color 0.2s;
}

.navbar .nav-link:hover {
    color: #fff !important;
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: var(--gradient-hero);
    padding: 52px 0 40px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 60%;
    height: 200%;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
    pointer-events: none;
}

.hero-title {
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    color: rgba(255,255,255,0.75);
    font-size: 1rem;
    margin-bottom: 0;
}

/* ===== SEARCH FORM ===== */
.search-form .input-group {
    border-radius: 12px;
    overflow: hidden;
}

.search-form .input-group-text {
    padding-left: 18px;
    border-color: #fff;
}

.search-form .form-control {
    font-size: 1rem;
    border-color: #fff;
    padding: 12px 8px;
}

.search-form .form-control:focus {
    box-shadow: none;
    border-color: #fff;
}

.search-form .btn-primary {
    background: #0d47a1;
    border-color: #0d47a1;
    border-radius: 0 12px 12px 0;
}

/* ===== WEATHER CARD ===== */
.weather-card {
    border-radius: 20px;
    padding: 36px;
    color: white;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    position: relative;
    overflow: hidden;
}

.day-card {
    background: linear-gradient(135deg, #1565c0 0%, #1976d2 40%, #42a5f5 100%);
}

.night-card {
    background: linear-gradient(135deg, #1a237e 0%, #283593 50%, #3949ab 100%);
}

.weather-card::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 50%;
    height: 150%;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    pointer-events: none;
}

.weather-icon-main {
    font-size: 4rem;
    line-height: 1;
    margin-bottom: 8px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.weather-city {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.weather-region {
    font-size: 1.2rem;
    font-weight: 400;
    opacity: 0.8;
}

.weather-country {
    opacity: 0.75;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.weather-temp {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -3px;
    margin-bottom: 4px;
}

.temp-unit {
    font-size: 2rem;
    font-weight: 400;
    opacity: 0.8;
    letter-spacing: 0;
}

.weather-desc {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 4px;
}

.weather-feels {
    font-size: 0.85rem;
    opacity: 0.7;
}

.weather-updated {
    font-size: 0.8rem;
    opacity: 0.6;
    margin-bottom: 0;
}

/* ===== WEATHER STATS ===== */
.weather-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stat-item {
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(4px);
}

.stat-icon {
    font-size: 1.4rem;
    opacity: 0.85;
}

.stat-label {
    font-size: 0.72rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.stat-value {
    font-size: 0.95rem;
    font-weight: 600;
}

/* ===== FORECAST ===== */
.section-title {
    color: #374151;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.forecast-col {
    min-width: 110px;
}

.forecast-card {
    background: white;
    border-radius: 14px;
    padding: 16px 12px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid transparent;
}

.forecast-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.forecast-today {
    border-color: #1976d2;
    background: linear-gradient(135deg, #e3f2fd, #fff);
}

.forecast-day {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #6b7280;
    letter-spacing: 0.5px;
}

.forecast-today .forecast-day {
    color: #1976d2;
}

.forecast-date {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-bottom: 8px;
}

.forecast-icon {
    font-size: 1.8rem;
    margin: 6px 0;
    line-height: 1;
}

.forecast-desc {
    font-size: 0.7rem;
    color: #6b7280;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.forecast-temps {
    display: flex;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.temp-max {
    color: #ef4444;
}

.temp-min {
    color: #3b82f6;
}

.forecast-rain {
    font-size: 0.72rem;
    color: #6b7280;
    margin-top: 4px;
}

/* ===== API INFO CARD ===== */
.api-info-card {
    background: white;
    border-radius: 14px;
    padding: 20px 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    border-left: 4px solid #1976d2;
}

.api-info-icon {
    width: 44px;
    height: 44px;
    background: #e3f2fd;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #1976d2;
    flex-shrink: 0;
}

/* ===== FEATURE CARDS (welcome state) ===== */
.feature-card {
    background: white;
    border-radius: 16px;
    padding: 32px 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    transition: transform 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.feature-card h5 {
    color: #1e293b;
    font-weight: 700;
}

/* ===== QUICK CITIES ===== */
.city-chip {
    border-radius: 20px;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.city-chip:hover {
    background: #1976d2;
    color: white;
    border-color: #1976d2;
    transform: scale(1.05);
}

/* ===== FOOTER ===== */
.footer {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    margin-top: 40px;
}

/* ===== LOGIN PAGE ===== */
.login-body {
    min-height: 100vh;
    background: var(--gradient-hero);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: white;
    border-radius: 20px;
    padding: 40px 36px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

.login-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #1565c0, #42a5f5);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 2rem;
    color: white;
}

.login-icon .bi {
    font-size: 2rem;
    color: white;
}

.login-card .form-control {
    border-color: #e2e8f0;
    border-left: none;
}

.login-card .form-control:focus {
    box-shadow: none;
    border-color: #1976d2;
}

.login-card .input-group-text {
    border-color: #e2e8f0;
    border-right: none;
}

.login-card .btn-primary {
    background: linear-gradient(135deg, #1565c0, #1976d2);
    border: none;
    padding: 12px;
    border-radius: 10px;
    transition: opacity 0.2s, transform 0.1s;
}

.login-card .btn-primary:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.demo-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.demo-card:hover {
    background: #e3f2fd;
    border-color: #90caf9;
    transform: scale(1.02);
}

.demo-card .bi {
    font-size: 1.3rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .weather-card {
        padding: 24px 20px;
    }

    .weather-temp {
        font-size: 4rem;
    }

    .weather-stats {
        margin-top: 24px;
    }

    .login-card {
        padding: 30px 24px;
    }

    .forecast-col {
        min-width: 90px;
    }
}

/* ===== QR CODE PAGE ===== */
.qr-hero {
    background: linear-gradient(160deg, #1b1b2f 0%, #162447 50%, #1f4068 100%);
    padding: 40px 0 36px;
}

.qr-form-card {
    background: white;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Type tabs */
.qr-type-tabs {
    gap: 6px;
    flex-wrap: wrap;
}

.qr-type-tabs .nav-link {
    background: #f1f5f9;
    color: #475569;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    border: 2px solid transparent;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.qr-type-tabs .nav-link:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.qr-type-tabs .nav-link.active {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

/* Error correction options */
.ecc-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.15s;
    min-width: 52px;
    text-align: center;
}

.ecc-option input[type="radio"] {
    display: none;
}

.ecc-option:hover {
    border-color: #93c5fd;
    background: #eff6ff;
}

.ecc-option.selected,
.ecc-option:has(input:checked) {
    border-color: #3b82f6;
    background: #eff6ff;
}

.ecc-label {
    font-weight: 700;
    font-size: 0.9rem;
    color: #1e293b;
}

.ecc-desc {
    font-size: 0.7rem;
    color: #64748b;
}

/* QR Result card */
.qr-result-card {
    background: white;
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    text-align: center;
}

.qr-preview-img {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 12px;
    background: white;
}

/* QR Metadata */
.qr-meta {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    text-align: left;
}

.qr-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #f1f5f9;
    gap: 12px;
}

.qr-meta-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.qr-meta-label {
    font-size: 0.78rem;
    color: #64748b;
    white-space: nowrap;
    font-weight: 500;
}

.qr-meta-value {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1e293b;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Placeholder card */
.qr-placeholder-card {
    background: white;
    border-radius: 20px;
    padding: 40px 28px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 2px dashed #e2e8f0;
}

.qr-placeholder-icon {
    width: 80px;
    height: 80px;
    background: #f1f5f9;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 2.5rem;
    color: #94a3b8;
}

.qr-examples .btn {
    border-radius: 10px;
    transition: all 0.2s;
}

.qr-examples .btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
    transform: translateX(3px);
}

/* API code snippet */
.api-code-snippet {
    background: #1e293b;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.78rem;
}

.api-code-snippet code {
    color: #7dd3fc;
    font-family: 'Courier New', monospace;
}

/* Navbar active link */
.navbar .nav-link.active {
    color: #fff !important;
    background: rgba(255,255,255,0.12);
    border-radius: 6px;
}

/* ===== PAYMENT QR PAGE ===== */
.pay-hero {
    background: linear-gradient(160deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
}

.bank-badge {
    background: rgba(255,255,255,0.15);
    color: white;
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.bank-badge-more {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.6);
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 0.78rem;
}

/* Form card */
.pay-form-card {
    background: white;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Bank search */
.bank-search-wrapper {
    position: relative;
}

.bank-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    max-height: 260px;
    overflow-y: auto;
    z-index: 1000;
}

.bank-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.12s;
}

.bank-option:hover {
    background: #f0f7ff;
}

.bank-logo-mini {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
    letter-spacing: -0.5px;
}

.bank-option-info {
    line-height: 1.3;
}

/* Selected bank pill */
.selected-bank-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f0f7ff;
    border: 1.5px solid #bfdbfe;
    border-radius: 10px;
    padding: 8px 12px;
}

/* Amount presets */
.preset-btn {
    border-radius: 20px;
    font-size: 0.78rem;
    transition: all 0.15s;
}

.preset-btn:hover,
.preset-btn.active {
    background: #1976d2;
    color: white;
    border-color: #1976d2;
}

/* Template options */
.template-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 8px;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}

.template-option input {
    display: none;
}

.template-option:hover {
    border-color: #93c5fd;
    background: #eff6ff;
}

.template-option.selected {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #1d4ed8;
}

/* Payment summary card */
.pay-summary-card {
    background: white;
    border-radius: 16px;
    padding: 20px 22px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.bank-logo-lg {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
    letter-spacing: -0.5px;
}

.pay-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    background: #f8fafc;
    border-radius: 10px;
    padding: 12px;
}

.pay-info-label {
    font-size: 0.72rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 2px;
}

.pay-info-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
    word-break: break-all;
}

/* QR result card */
.pay-qr-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    text-align: center;
}

.vietqr-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(90deg, #e6f4ea, #d7f0df);
    color: #1b7a3e;
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 0.78rem;
    font-weight: 700;
}

.pay-qr-img {
    max-width: 100%;
    width: 320px;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
}

.pay-note {
    background: #f0f9ff;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.78rem;
    color: #475569;
    text-align: left;
}

/* Placeholder */
.pay-placeholder-card {
    background: white;
    border-radius: 20px;
    padding: 36px 28px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 2px dashed #e2e8f0;
}

.pay-placeholder-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f0f4f8, #e2e8f0);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 2.5rem;
    color: #94a3b8;
}

.tip-item {
    padding: 6px 0;
    font-size: 0.88rem;
    color: #374151;
}

/* ===== YODAY BRAND ===== */
.yoday-brand {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: white;
}

.brand-y {
    color: #fbbf24;
}

.brand-app {
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(255,255,255,0.6);
    margin-left: 2px;
    vertical-align: middle;
}

/* ===== EXCHANGE RATE ===== */
.exrate-bank-card {
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.exrate-bank-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.12) !important;
}

.exrate-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

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

.exrate-label {
    font-size: 0.82rem;
    color: #6b7280;
}

.exrate-value {
    font-size: 1rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.exrate-value.buy {
    color: #059669;
}

.exrate-value.transfer {
    color: #0d6efd;
}

.exrate-value.sell {
    color: #dc2626;
}

.exrate-table th {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    font-weight: 600;
    white-space: nowrap;
}

.exrate-table td {
    vertical-align: middle;
    font-variant-numeric: tabular-nums;
}

.bank-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.converter-result {
    font-size: 1.6rem;
    font-weight: 700;
    color: #0d6efd;
    font-variant-numeric: tabular-nums;
}

/* ===== TAX LOOKUP ===== */
.tax-search-form .input-group {
    border-radius: 12px;
    overflow: hidden;
}

.tax-mst-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e8f0fe;
    color: #1a56db;
    font-weight: 700;
    font-size: 1rem;
    padding: 6px 14px;
    border-radius: 8px;
    letter-spacing: 0.04em;
    font-family: monospace;
}

.tax-info-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tax-info-label {
    font-size: 0.78rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.tax-info-value {
    font-size: 0.95rem;
    color: #111827;
}

.toast-msg {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.88rem;
    z-index: 9999;
    animation: fadeInUp 0.2s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.tax-name-search-link {
    color: inherit;
    border-color: #e5e7eb !important;
    transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.tax-name-search-link:hover {
    border-color: #1565c0 !important;
    background: #f0f6ff;
    transform: translateX(2px);
    color: inherit;
}

.tax-name-search-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, #1565c0, #1e88e5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* ═══════════════════════════════════════════════════
   LỊCH NGÀY TỐT
   ═══════════════════════════════════════════════════ */

.cal-hero {
    background: linear-gradient(150deg, #1a237e 0%, #283593 40%, #3949ab 100%);
}

.cal-hero-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.6);
    margin-bottom: 4px;
}

.cal-hero-date {
    font-size: 3.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
}

.cal-hero-month {
    font-size: 1.4rem;
    font-weight: 400;
    color: rgba(255,255,255,0.75);
}

.cal-hero-lunar {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.8);
    margin-top: 6px;
}

/* Can Chi grid (3 columns) */
.cal-canchhi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.cal-cc-item {
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 14px 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cal-cc-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.55);
}

.cal-cc-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
}

.cal-cc-sub {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.65);
}

/* Calendar grid */
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

.cal-header-row {
    margin-bottom: 4px !important;
}

.cal-header-cell {
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 2px;
}

.cal-weekend-hdr {
    color: #dc2626;
}

/* Day cell */
.cal-day {
    position: relative;
    border-radius: 8px;
    padding: 6px 4px 4px;
    cursor: pointer;
    min-height: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px solid transparent;
    transition: border-color 0.15s, transform 0.1s, box-shadow 0.15s;
    background: #f9fafb;
}

.cal-day:hover {
    border-color: #6366f1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99,102,241,0.15);
    z-index: 2;
}

.cal-day--empty {
    background: transparent;
    cursor: default;
    min-height: 64px;
}
.cal-day--empty:hover { transform: none; border-color: transparent; box-shadow: none; }

.cal-day--good   { background: #f0fdf4; }
.cal-day--bad    { background: #fff5f5; }
.cal-day--weekend { opacity: 0.88; }
.cal-day--ky     { background: #fffbeb; }

.cal-day--today {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

.cal-day--selected {
    border-color: #1565c0 !important;
    box-shadow: 0 0 0 3px rgba(21,101,192,0.2) !important;
    background: #e8f0fe !important;
}

.cal-solar {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
    color: #111827;
}

.cal-day--weekend .cal-solar { color: #dc2626; }
.cal-day--today   .cal-solar { color: #4f46e5; }

.cal-lunar {
    font-size: 0.68rem;
    color: #6b7280;
    margin-top: 2px;
    line-height: 1.1;
}

.cal-truc-mini {
    font-size: 0.6rem;
    color: #9ca3af;
    margin-top: auto;
    padding-top: 2px;
}

.cal-day--good .cal-truc-mini  { color: #16a34a; }
.cal-day--bad  .cal-truc-mini  { color: #dc2626; }

/* Legend */
.cal-legend {
    font-size: 0.75rem;
    color: #6b7280;
    display: flex;
    align-items: center;
}
.cal-legend--good   .bi-circle-fill { color: #16a34a; }
.cal-legend--bad    .bi-circle-fill { color: #dc2626; }
.cal-legend--neutral .bi-circle-fill { color: #d1d5db; }
.cal-legend--ky     .bi-circle-fill { color: #d97706; }

/* Detail panel */
.cal-detail-solar {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
}

.cal-detail-lunar {
    font-size: 0.88rem;
    color: #6b7280;
    margin-top: 2px;
}

/* Can Chi chips in detail panel */
.cal-cc-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cal-cc-chip {
    flex: 1;
    min-width: 80px;
    background: #f3f4f6;
    border-radius: 10px;
    padding: 8px 10px;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: #111827;
}

@media (max-width: 768px) {
    .cal-hero-date { font-size: 2.4rem; }
    .cal-canchhi-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .cal-day { min-height: 54px; padding: 4px 2px 3px; }
    .cal-solar { font-size: 1rem; }
    .cal-lunar { font-size: 0.6rem; }
    .cal-truc-mini { display: none; }
}

/* ═══════════════════════════════════════════════════
   TÍNH LƯƠNG GROSS ↔ NET
   ═══════════════════════════════════════════════════ */

.sal-hero {
    background: linear-gradient(150deg, #1b5e20 0%, #2e7d32 45%, #43a047 100%);
}

/* Mode toggle */
.sal-mode-toggle {
    display: flex;
    gap: 6px;
    background: #f3f4f6;
    padding: 4px;
    border-radius: 12px;
}

.sal-mode-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 9px;
    background: transparent;
    font-size: 0.88rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.15s;
}

.sal-mode-btn.active {
    background: #fff;
    color: #1b5e20;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

/* Salary input */
.sal-input {
    font-size: 1.4rem;
    font-weight: 700;
    color: #111827;
    letter-spacing: 0.01em;
}

/* Dependents button */
.sal-dep-btn {
    min-width: 42px;
    font-weight: 600;
}

/* Region radio */
.sal-region-check {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: background 0.12s, border-color 0.12s;
    cursor: pointer;
}
.sal-region-check:has(input:checked) {
    background: #f0fdf4;
    border-color: #16a34a;
}

/* Summary cards */
.sal-summary-card {
    border-radius: 14px;
    padding: 18px 16px;
    color: #fff;
}

.sal-summary--gross {
    background: linear-gradient(135deg, #1565c0, #1e88e5);
}

.sal-summary--net {
    background: linear-gradient(135deg, #1b5e20, #43a047);
}

.sal-summary-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.75);
    margin-bottom: 4px;
}

.sal-summary-value {
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.2;
}

.sal-summary-sub {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.65);
    margin-top: 2px;
}

/* Stat mini cards */
.sal-stat-card {
    background: #f9fafb;
    border-radius: 10px;
    padding: 12px 10px;
    text-align: center;
    border: 1px solid #e5e7eb;
}

.sal-stat-label {
    font-size: 0.7rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.3;
    margin-bottom: 4px;
}

.sal-stat-value {
    font-size: 0.92rem;
    font-weight: 700;
}

.sal-stat-sub {
    font-size: 0.68rem;
    color: #9ca3af;
    margin-top: 1px;
}

/* Breakdown table */
.sal-breakdown-table {
    font-size: 0.88rem;
}

.sal-breakdown-table td {
    padding: 8px 16px;
    vertical-align: middle;
    border-color: #f3f4f6;
}

.sal-row-income td   { background: #f0fdf4; font-weight: 600; }
.sal-row-section td  { background: #f8fafc; font-size: 0.75rem !important; color: #94a3b8; border-bottom: none; }
.sal-row-taxable td  { background: #fffbeb; }
.sal-row-total-tax td { background: #fff5f5; }
.sal-row-net td      { background: #f0fdf4; border-top: 2px solid #16a34a !important; }

.sal-empty-state {
    min-height: 300px;
}

@media (max-width: 768px) {
    .sal-summary-value { font-size: 1rem; }
    .sal-input { font-size: 1.1rem; }
}

/* ===== NTNN — Khai Thuế Nhà Thầu Nước Ngoài ===== */
.ntnn-hero {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 50%, #388e3c 100%);
    padding: 32px 0 28px;
    margin-bottom: 0;
}

.ntnn-icon-wrap {
    width: 56px; height: 56px;
    background: rgba(255,255,255,0.15);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; color: #fff;
    flex-shrink: 0;
}

.ntnn-title {
    font-size: 1.6rem; font-weight: 700;
    color: #fff; margin: 0;
}

.ntnn-subtitle {
    color: rgba(255,255,255,0.75);
    margin: 2px 0 0; font-size: 0.9rem;
}

.ntnn-card { border: none; border-radius: 14px; box-shadow: 0 2px 12px rgba(0,0,0,0.08); }

.ntnn-card-header {
    background: #f8f9fa; border-bottom: 1px solid #e9ecef;
    font-weight: 600; border-radius: 14px 14px 0 0 !important;
    padding: 14px 20px;
}

/* ── Drop zone ── */
.ntnn-dropzone {
    position: relative;
    border: 2px dashed #a8d5a2;
    border-radius: 12px;
    background: #f1f8e9;
    min-height: 160px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    padding: 24px;
}

.ntnn-dropzone:hover,
.ntnn-dropzone--over {
    border-color: #388e3c;
    background: #e8f5e9;
}

.ntnn-drop-icon { font-size: 2.5rem; color: #66bb6a; display: block; margin-bottom: 8px; }
.ntnn-drop-text { font-size: 1rem; font-weight: 600; color: #2e7d32; margin: 0; }
.ntnn-drop-hint { color: #555; font-size: 0.85rem; margin: 4px 0 0; }
.ntnn-browse { color: #1b5e20; font-weight: 600; text-decoration: underline; }

.ntnn-drop-selected {
    display: flex; flex-direction: column;
    align-items: center; gap: 4px;
}

/* ── Sidebar ── */
.ntnn-sheet-badge {
    display: inline-flex; align-items: center;
    background: #e8f5e9; color: #1b5e20;
    padding: 3px 10px; border-radius: 20px;
    font-size: 0.82rem; font-weight: 600;
}

.ntnn-col-list {
    list-style: none; padding: 0; margin: 8px 0 0;
}

.ntnn-col-list li {
    padding: 3px 0;
    border-bottom: 1px solid #f0f0f0;
    color: #444;
}

.col-ref {
    display: inline-block; width: 40px;
    color: #1565c0; font-weight: 600; font-size: 0.78rem;
}

.formula {
    color: #388e3c; font-size: 0.78rem; margin-left: 4px;
}

.ntnn-guide-list { padding-left: 20px; color: #444; }
.ntnn-guide-list li { padding: 3px 0; }

.ntnn-loading {
    background: #e8f5e9; border-radius: 8px; padding: 10px 16px;
}

/* ── Dashboard ── */
.dashboard-hero {
    background: linear-gradient(135deg, #0d47a1 0%, #1565c0 60%, #1976d2 100%);
    color: #fff;
    padding: 48px 0 36px;
    margin-bottom: 0;
}
.dashboard-title {
    font-size: 1.9rem; font-weight: 700; margin-bottom: 6px;
}
.dashboard-subtitle {
    font-size: 1rem; opacity: .8; margin: 0;
}

.dashboard-card {
    display: flex;
    align-items: center;
    gap: 18px;
    background: #fff;
    border-radius: 12px;
    padding: 22px 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    text-decoration: none;
    color: inherit;
    transition: transform .15s, box-shadow .15s;
    height: 100%;
}
.dashboard-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(0,0,0,.13);
    color: inherit;
}
.dashboard-card-icon {
    flex-shrink: 0;
    width: 54px; height: 54px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; color: #fff;
}
.dashboard-card-title {
    font-weight: 700; font-size: 1.05rem; margin-bottom: 4px;
}
.dashboard-card-desc {
    font-size: 0.82rem; color: #666; line-height: 1.4;
}

@media (max-width: 575.98px) {
    .dashboard-hero {
        padding: 24px 0 20px;
    }
    .dashboard-title {
        font-size: 1.15rem;
        margin-bottom: 3px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .dashboard-subtitle {
        font-size: 0.82rem;
    }
    .dashboard-card {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding: 14px 10px;
        text-align: center;
        border-radius: 10px;
    }
    .dashboard-card-icon {
        width: 44px; height: 44px;
        font-size: 1.25rem;
        border-radius: 10px;
    }
    .dashboard-card-title {
        font-size: 0.8rem;
        margin-bottom: 0;
        line-height: 1.2;
    }
    .navbar {
        padding: 10px 0;
    }
    .navbar-brand {
        font-size: 1.1rem !important;
    }
}

/* ── Address Normalizer ── */
.addr-hero {
    background: linear-gradient(135deg, #1a237e 0%, #283593 60%, #3949ab 100%);
    color: #fff; padding: 36px 0 28px;
}
.addr-title    { font-size: 1.7rem; font-weight: 700; margin-bottom: 4px; }
.addr-subtitle { font-size: .95rem; opacity: .8; margin: 0; }
.addr-icon-wrap {
    width: 52px; height: 52px; border-radius: 12px;
    background: rgba(255,255,255,.15);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; flex-shrink: 0;
}

.addr-card        { border: 0; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.addr-card-header {
    background: #f8f9fa; border-bottom: 1px solid #e9ecef;
    font-weight: 600; padding: 12px 18px; border-radius: 12px 12px 0 0;
}

.addr-textarea { font-size: .9rem; resize: vertical; font-family: monospace; }

.addr-placeholder {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 300px; color: #adb5bd;
}
.addr-placeholder-icon { font-size: 4rem; opacity: .4; }

.addr-result-card       { border: 0; border-radius: 10px; box-shadow: 0 1px 6px rgba(0,0,0,.07); }
.addr-result-error      { border-left: 4px solid #dc3545 !important; }
.addr-result-input      { font-size: .88rem; }

.addr-label     { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 3px; }
.addr-label-old { color: #795548; }
.addr-label-new { color: #2e7d32; }

.addr-value     { font-size: .95rem; padding: 6px 10px; background: #f8f9fa; border-radius: 6px; margin-bottom: 4px; }
.addr-value-new { background: #e8f5e9; color: #1b5e20; font-weight: 500; }

/* ── Email Composer ── */
.email-hero {
    background: linear-gradient(135deg, #0a3d62 0%, #1565C0 60%, #1976d2 100%);
    color: #fff; padding: 36px 0 28px;
}
.email-title    { font-size: 1.7rem; font-weight: 700; margin-bottom: 4px; }
.email-subtitle { font-size: .95rem; opacity: .8; margin: 0; }
.email-icon-wrap {
    width: 52px; height: 52px; border-radius: 12px;
    background: rgba(255,255,255,.18);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; flex-shrink: 0;
}

.email-card        { border: 0; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.email-card-header {
    background: #f8f9fa; border-bottom: 1px solid #e9ecef;
    font-weight: 600; padding: 12px 18px;
    border-radius: 12px 12px 0 0 !important;
}

/* Quill editor height */
.ql-container { font-size: 15px; }
.ql-editor     { min-height: 420px; }

/* Custom HTML source toggle button */
.ql-html { width: auto !important; padding: 0 6px !important; }
.ql-html-label {
    font-size: 11px; font-weight: 700; letter-spacing: -.3px;
    color: #444; line-height: 24px;
}
.ql-html.ql-active .ql-html-label { color: #1565C0; }

/* HTML source textarea */
.html-source-editor {
    display: none;
    flex: 1;
    width: 100%;
    min-height: 420px;
    padding: 14px 16px;
    border: 0;
    border-top: 1px solid #e0e0e0;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.65;
    color: #1a1a2e;
    background: #fafbfc;
    resize: none;
    outline: none;
}
.html-source-editor:focus { background: #fff; }

.email-recipient-scroll {
    max-height: 300px; overflow-y: auto;
    font-size: .85rem;
}
.email-recipient-item {
    padding: 6px 14px;
    border-bottom: 1px solid #f0f0f0;
}
.email-recipient-item:last-child { border-bottom: 0; }

/* ── Email Verify ── */
.verify-hero {
    background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 55%, #388E3C 100%);
    color: #fff; padding: 36px 0 28px;
}
.verify-title    { font-size: 1.7rem; font-weight: 700; margin-bottom: 4px; }
.verify-subtitle { font-size: .95rem; opacity: .8; margin: 0; }
.verify-icon-wrap {
    width: 52px; height: 52px; border-radius: 12px;
    background: rgba(255,255,255,.18);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; flex-shrink: 0;
}

.verify-card        { border: 0; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.verify-card-header {
    background: #f8f9fa; border-bottom: 1px solid #e9ecef;
    font-weight: 600; padding: 12px 18px;
    border-radius: 12px 12px 0 0 !important;
}

.verify-tier {
    display: flex; align-items: flex-start; gap: 12px;
}
.verify-tier-badge {
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: .85rem; flex-shrink: 0;
}

.verify-stat-card { transition: box-shadow .15s, transform .15s; }
.verify-stat-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.12) !important; transform: translateY(-2px); cursor: pointer; }

.verify-recommend-card { border-left: 4px solid #0d6efd !important; }
.verify-big-num { font-size: 3rem; font-weight: 800; line-height: 1; margin-bottom: 4px; }
