:root {
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-subtle: #f1f5f9;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --border-color: #e2e8f0;
    --border-focus: #3b82f6;
    
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --primary-glow: rgba(37, 99, 235, 0.15);

    --success-bg: #ecfdf5;
    --success-text: #059669;
    --success-border: #a7f3d0;

    --warning-bg: #fffbeb;
    --warning-text: #d97706;
    --warning-border: #fde68a;

    --danger-bg: #fef2f2;
    --danger-text: #dc2626;
    --danger-border: #fecaca;

    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.app-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px var(--primary-glow);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.brand-title .accent-text {
    color: var(--primary);
}

.brand-badge {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    padding: 7px 13px;
    border-radius: var(--radius-full);
    background: var(--bg-card-subtle);
    transition: all 0.2s ease;
}

.nav-item:hover {
    color: var(--primary);
    background: var(--primary-light);
}

/* Hero Section - Compact Above-the-Fold Design */
.hero-section {
    padding: 22px 0 18px;
    text-align: center;
}

.hero-container {
    max-width: 1200px;
    width: 100%;
}

.hero-top-row {
    margin-bottom: 16px;
}

.hero-title {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.025em;
    margin: 0 auto 6px;
    max-width: 820px;
}

.gradient-text {
    background: linear-gradient(135deg, #2563eb, #0284c7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 13.5px;
    color: var(--text-muted);
    margin: 0 auto;
    max-width: 680px;
    line-height: 1.5;
}

/* Search Card */
.search-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    box-shadow: var(--shadow-lg);
}

.search-form {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
}

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

.search-icon {
    position: absolute;
    left: 16px;
    color: var(--text-light);
    pointer-events: none;
}

.search-input {
    width: 100%;
    height: 48px;
    padding: 0 44px 0 46px;
    font-size: 15px;
    font-family: var(--font-mono);
    font-weight: 500;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #f8fafc;
    transition: all 0.2s ease;
    outline: none;
}

.search-input.font-sans-input {
    font-family: var(--font-sans);
}

.search-input:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.clear-btn {
    position: absolute;
    right: 14px;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 16px;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
}

.clear-btn:hover {
    color: var(--text-main);
    background: #e2e8f0;
}

.submit-btn {
    height: 52px;
    padding: 0 28px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px var(--primary-glow);
    white-space: nowrap;
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
}

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

.btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s linear infinite;
}

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

/* Quick Tags */
.quick-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.tags-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
}

.tag-btn {
    background: var(--bg-card-subtle);
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: #bfdbfe;
}

/* Results Section */
.results-section {
    padding: 16px 0 48px;
}

.result-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-badge {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap !important;
    word-break: keep-all;
    line-height: 1.25;
}

.status-active {
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid var(--success-border);
}

.status-inactive {
    background: var(--danger-bg);
    color: var(--danger-text);
    border: 1px solid var(--danger-border);
}

.status-closed {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.status-pill {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap !important;
    word-break: keep-all;
    line-height: 1.25;
}

.status-pill-active {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.status-pill-closed {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.timing-badge {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-card-subtle);
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.cache-badge {
    font-size: 12px;
    font-weight: 700;
    color: #0284c7;
    background: #e0f2fe;
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

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

.btn-invoice-copy {
    background: var(--primary-light) !important;
    color: var(--primary) !important;
    border-color: #bfdbfe !important;
    font-weight: 700 !important;
}

.btn-invoice-copy:hover {
    background: var(--primary) !important;
    color: #ffffff !important;
}

.copied-state {
    background: #dcfce7 !important;
    color: #15803d !important;
    border-color: #86efac !important;
    font-weight: 700 !important;
}

.btn-export-excel {
    background: #f0fdf4 !important;
    color: #15803d !important;
    border-color: #86efac !important;
    font-weight: 700 !important;
}

.btn-export-excel:hover {
    background: #16a34a !important;
    color: #ffffff !important;
    border-color: #16a34a !important;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.25);
}

/* Company Card */
.company-card, .card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
}

.mt-6 {
    margin-top: 24px;
}

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.company-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.3;
}

.copy-icon-btn {
    background: transparent;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.copy-icon-btn:hover {
    color: var(--primary);
    background: var(--primary-light);
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 32px;
}

.col-span-2 {
    grid-column: span 2;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-light);
    letter-spacing: 0.05em;
}

.info-value {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-main);
    word-break: break-word;
}

.info-val-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.copy-small-btn {
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.copy-small-btn:hover {
    background: var(--primary);
    color: #ffffff;
}

/* Industries Section */
.card-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.title-with-badge {
    display: flex;
    align-items: center;
    gap: 10px;
}

.count-badge {
    background: var(--bg-card-subtle);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.filter-input {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 13px;
    outline: none;
    width: 220px;
}

.filter-input:focus {
    border-color: var(--primary);
}

.industries-table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    position: relative;
    background: #ffffff;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f8fafc;
}

.industries-table-wrapper::-webkit-scrollbar {
    height: 7px;
}

.industries-table-wrapper::-webkit-scrollbar-track {
    background: #f8fafc;
    border-radius: 4px;
}

.industries-table-wrapper::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.industries-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.industries-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: left;
}

.industries-table th {
    background: var(--bg-card-subtle);
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-color);
}

.industries-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

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

.industries-table tr:hover td {
    background: #fbfcfe;
}

.industry-code {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--primary);
}

.industry-detail {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.4;
}

.primary-badge {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    display: inline-block;
}

.secondary-badge {
    background: var(--bg-card-subtle);
    color: var(--text-light);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    display: inline-block;
}

/* JSON Viewer */
.json-viewer {
    background: #0f172a;
    color: #e2e8f0;
    padding: 20px;
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.5;
    overflow-x: auto;
    max-height: 450px;
}

/* Error Section */
.error-section {
    padding: 32px 0;
}

.error-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 48px 24px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: var(--shadow-md);
}

.error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.error-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 8px;
}

.error-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.retry-btn {
    padding: 10px 24px;
    background: var(--primary);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
}

/* History Section */
.history-section {
    padding: 24px 0 48px;
    margin-top: auto;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.history-header h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.clear-history-btn {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 12px;
    cursor: pointer;
}

.clear-history-btn:hover {
    color: var(--danger-text);
}

.history-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.history-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.history-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.history-chip-code {
    font-family: var(--font-mono);
    font-weight: 700;
}

.history-chip-name {
    color: var(--text-muted);
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Footer */
.footer {
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    padding: 24px 0;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

.footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.footer-sub {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0f172a;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateY(0);
}

.toast.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

/* Mode Tabs (Segmented Control) */
.mode-tabs {
    display: inline-flex;
    align-items: center;
    background: #e2e8f0;
    padding: 4px;
    border-radius: var(--radius-full);
    margin-bottom: 20px;
    gap: 4px;
    max-width: 100%;
}

.mode-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap !important;
}

.mode-tab.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.mode-tab:hover:not(.active) {
    color: var(--text-main);
}

/* Batch Input Card */
.batch-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.batch-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}

.batch-actions {
    display: flex;
    gap: 8px;
}

.sample-btn {
    background: var(--bg-card-subtle);
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.sample-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: #bfdbfe;
}

.batch-textarea {
    width: 100%;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #f8fafc;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.6;
    outline: none;
    resize: vertical;
    transition: all 0.2s;
}

.batch-textarea:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.batch-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.batch-count-badge {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

/* Batch Results Header & Stats */
.batch-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 18px;
}

.summary-stats {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-pill {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
}

.stat-total {
    background: var(--bg-card-subtle);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.stat-found {
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid var(--success-border);
}

.stat-missing {
    background: var(--danger-bg);
    color: var(--danger-text);
    border: 1px solid var(--danger-border);
}

.batch-table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Unified 1200px container for data tables */
#batchResultsSection .container,
#convertBatchResultsSection .container {
    max-width: 1200px;
    width: 100%;
    padding: 0 20px;
}

.batch-table-card {
    padding: 12px 14px !important;
    overflow: hidden;
    background: #ffffff;
}

/* Batch Table */
.batch-table {
    width: 100%;
    min-width: 1080px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
    text-align: left;
}

#batchConvertTable {
    min-width: 950px;
}

.batch-table th {
    background: #f8fafc;
    padding: 11px 12px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap !important;
}

.batch-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
    line-height: 1.45;
}

.batch-table tr:hover td {
    background: #f8fafc;
}

/* Sticky Columns for STT and MST/Phone - Không bao giờ bị khuất hay đè vạch kẻ dọc */
.batch-table th.col-sticky-stt,
.batch-table td.col-sticky-stt {
    position: sticky;
    left: 0;
    z-index: 4;
    background: #ffffff;
    width: 52px;
    min-width: 52px;
    max-width: 52px;
    padding-left: 6px;
    padding-right: 6px;
    text-align: center;
    border-right: 1px solid #e2e8f0;
    box-sizing: border-box;
}

.batch-table th.col-sticky-stt {
    z-index: 10;
    background: #f8fafc;
}

.batch-table th.col-sticky-mst,
.batch-table td.col-sticky-mst {
    position: sticky;
    left: 52px;
    z-index: 4;
    background: #ffffff;
    width: 168px;
    min-width: 168px;
    max-width: 174px;
    padding-left: 12px !important;
    padding-right: 14px !important;
    white-space: nowrap;
    border-right: 1.5px solid #cbd5e1;
    box-shadow: 4px 0 8px -4px rgba(15, 23, 42, 0.08);
    box-sizing: border-box;
}

.batch-table th.col-sticky-mst {
    z-index: 10;
    background: #f8fafc;
    box-shadow: 4px 0 8px -4px rgba(15, 23, 42, 0.08);
}

.batch-table tr:hover td.col-sticky-stt,
.batch-table tr:hover td.col-sticky-mst {
    background: #f1f5f9;
}

.batch-status-found {
    color: var(--success-text);
    font-weight: 700;
}

.batch-status-missing {
    color: var(--text-light);
    font-style: italic;
}

/* Utilities */
.hidden {
    display: none !important;
}

.font-mono {
    font-family: var(--font-mono);
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.text-lg {
    font-size: 18px;
}

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

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 28px;
    }
    .search-form {
        flex-direction: column;
    }
    .submit-btn {
        width: 100%;
    }
    .info-grid {
        grid-template-columns: 1fr;
    }
    .col-span-2 {
        grid-column: span 1;
    }
    .result-header-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
}

/* Fallback Mechanism Styling */
.fallback-toggle-bar {
    margin: 14px 0 20px 0;
    display: flex;
    justify-content: center;
}

.toggle-container {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.toggle-container:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.toggle-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.toggle-label-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.provider-badge {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap !important;
    word-break: keep-all;
    line-height: 1.25;
}

.provider-tramasothue {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.provider-fallback {
    background: rgba(14, 165, 233, 0.12);
    color: #0284c7;
    border: 1px solid rgba(14, 165, 233, 0.3);
}

.provider-fallback-biz {
    background: rgba(99, 102, 241, 0.12);
    color: #4f46e5;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.stat-fallback {
    background: rgba(14, 165, 233, 0.1);
    color: #0284c7;
    border: 1px solid rgba(14, 165, 233, 0.25);
}

/* ==========================================================================
   Address Converter (Offline 100%) Styles
   ========================================================================== */
.new-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: var(--radius-full);
    margin-left: 6px;
    letter-spacing: 0.2px;
    white-space: nowrap !important;
}

.convert-card-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.submode-tab {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap !important;
}

.submode-tab:hover {
    color: var(--text-main);
    background: var(--bg-card-subtle);
}

.submode-tab.active {
    color: var(--primary);
    background: var(--primary-light);
    border-color: rgba(37, 99, 235, 0.2);
}

.convert-quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    border: 1px solid rgba(37, 99, 235, 0.25);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.convert-quick-btn:hover {
    background: var(--primary);
    color: #ffffff;
}

.address-merge-box {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.address-merge-box.unchanged {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.address-compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 16px 0;
}

@media (max-width: 768px) {
    .address-compare-grid {
        grid-template-columns: 1fr;
    }
}

.address-box-old {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius-md);
    padding: 16px;
}

.address-box-new {
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    border-radius: var(--radius-md);
    padding: 16px;
    position: relative;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08);
}

.address-box-new.unchanged-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    box-shadow: none;
}

.address-box-title {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.address-box-val {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.5;
}

.address-box-new .address-box-val {
    color: #065f46;
    font-weight: 700;
}

.legal-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-top: 14px;
}

.legal-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.legal-detail {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

.resolution-tag {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 12px;
}

.address-merge-box {
    margin-top: 10px;
    padding: 14px 16px;
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.08);
    animation: fadeIn 0.3s ease;
}

.address-merge-box.unchanged {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    box-shadow: none;
}

.convert-quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--primary);
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.convert-quick-btn:hover {
    background: var(--primary);
    color: #ffffff;
}

/* Batch Progress Bar */
.batch-progress-wrapper {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-top: 16px;
    text-align: left;
}

.progress-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.progress-text {
    color: var(--primary);
}

.progress-percent {
    color: var(--primary);
    font-family: var(--font-mono);
}

.progress-track {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #0284c7);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.progress-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

.progress-cancel-btn {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.2s;
}

.progress-cancel-btn:hover {
    background: #fee2e2;
}

/* Recent Companies Feature Styling */
.phone-pill {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: #ffffff !important;
    font-size: 10.5px !important;
    padding: 2px 7px !important;
    border-radius: var(--radius-full);
}

.recent-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

.recent-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.recent-icon-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: var(--radius-md);
    font-size: 18px;
}

.recent-heading {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
}

.recent-subheading {
    font-size: 12.5px;
    color: var(--text-muted);
}

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

.time-range-group {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 3px;
    gap: 4px;
}

.filter-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    padding-left: 8px;
}

.range-btn {
    border: none;
    background: transparent;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.range-btn:hover {
    color: var(--text-main);
}

.range-btn.active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 1px 4px rgba(37, 99, 235, 0.25);
}

.recent-search-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-refresh-data {
    background: #ffffff;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    font-weight: 600;
    gap: 6px;
    white-space: nowrap;
}

.btn-refresh-data:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #eff6ff;
}

.recent-source-tag {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-muted);
    background: #f8fafc;
    padding: 4px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
}

/* Phone Cell Styling */
.phone-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: #ecfdf5;
    border: 1px solid #86efac;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 12.5px;
    font-weight: 700;
    color: #047857;
    box-sizing: border-box;
}

.phone-number-link {
    color: #047857;
    text-decoration: none;
    letter-spacing: 0.2px;
}

.phone-number-link:hover {
    text-decoration: underline;
    color: #065f46;
}

.phone-copy-btn {
    background: none;
    border: none;
    color: #10b981;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}

.phone-copy-btn:hover {
    color: #047857;
}

/* Loading Box for Recent */
.recent-loading-box {
    text-align: center;
    padding: 48px 16px;
}

.spinner-large {
    width: 36px;
    height: 36px;
    border: 3.5px solid #e2e8f0;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 14px;
}

.loading-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
}

/* Pagination Bar */
.recent-pagination-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.page-btn {
    padding: 6px 16px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-btn:hover:not(:disabled) {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.page-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.page-indicator {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
}

.btn-quick-lookup {
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-quick-lookup:hover {
    background: var(--primary);
    color: #ffffff;
}

/* ==========================================================================
   Enterprise SaaS Pro UI Additions (Health Monitor, Unified Toolbar, Tools)
   ========================================================================== */
.health-status-wrapper {
    position: relative;
}

.health-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.health-pill:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.health-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.health-dot-ok {
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.health-dot-warn {
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.health-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 420px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 20px 38px -10px rgba(15, 23, 42, 0.16), 0 4px 12px -2px rgba(15, 23, 42, 0.06);
    padding: 14px 16px;
    z-index: 200;
    text-align: left;
}

.health-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.health-header-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.health-header-main {
    font-size: 13px;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 6px;
}

.health-header-sub {
    font-size: 11px;
    font-weight: 500;
    color: #64748b;
}

.health-refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.health-refresh-btn:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.health-dropdown-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.health-node-card {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.15s ease;
}

.health-node-card:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.health-node-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.health-node-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.health-node-label {
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
}

.health-host {
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 600;
    color: #2563eb;
}

.health-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.health-status-ok {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.health-status-warn {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}

.health-node-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.health-load-track {
    flex: 1;
    height: 6px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.health-load-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #10b981, #059669);
    transition: width 0.3s ease;
}

.health-load-text {
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.health-dropdown-footer {
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px dashed #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
}

/* Unified Search Control Toolbar */
.search-options-bar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 6px 16px;
    margin: 0 auto 14px;
    box-shadow: var(--shadow-sm);
}

.entity-type-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.option-group-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
}

.entity-pill {
    border: 1px solid transparent;
    background: var(--bg-card-subtle);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 11px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.15s ease;
}

.entity-pill:hover {
    color: var(--text-main);
}

.entity-pill.active {
    background: var(--primary-light);
    color: var(--primary);
    border-color: #bfdbfe;
}

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

.search-options-bar .toggle-container {
    padding: 2px 4px;
    border: none;
    box-shadow: none;
    background: transparent;
    gap: 6px;
}

.search-options-bar .toggle-container:hover {
    box-shadow: none;
}

.search-options-bar .toggle-label-text {
    font-size: 12.5px;
}

/* Batch Card Enhancements */
.batch-title-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.batch-hint {
    font-size: 11.5px;
    color: var(--text-muted);
}

.btn-tool-highlight {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #eff6ff;
    color: var(--primary);
    border-color: #bfdbfe;
    font-weight: 700;
}

.btn-tool-highlight:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.batch-footer-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.batch-safe-note {
    font-size: 11.5px;
    font-weight: 600;
    color: #059669;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.error-icon-svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--danger-bg);
    color: var(--danger-text);
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .mode-tabs {
        flex-wrap: wrap;
        border-radius: var(--radius-md);
        justify-content: center;
    }
    .search-options-bar {
        border-radius: var(--radius-md);
        padding: 10px 12px;
    }
    .options-divider {
        display: none;
    }
    .batch-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .batch-actions {
        flex-wrap: wrap;
    }
}

/* ==========================================================================
   Enterprise Database Explorer (46.349 DN) - Multi-Filter & Pro Pagination
   ========================================================================== */
#recentResultsSection .container {
    max-width: 1200px;
    width: 100%;
    padding: 0 20px;
}

.db-filter-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
    text-align: left;
}

@media (max-width: 1080px) {
    .db-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .db-filter-grid {
        grid-template-columns: 1fr;
    }
}

.db-filter-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.db-filter-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.db-select,
.db-date-input {
    width: 100%;
    height: 36px;
    padding: 0 10px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-main);
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    outline: none;
    transition: all 0.15s ease;
    cursor: pointer;
}

.db-select:hover,
.db-date-input:hover {
    border-color: #94a3b8;
    background: #ffffff;
}

.db-select:focus,
.db-date-input:focus {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.no-phone-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 9px;
    font-size: 11.5px;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius-sm);
}

.db-industry-sub {
    font-size: 11.5px;
    color: #0369a1;
    margin-top: 3px;
    line-height: 1.35;
    cursor: pointer;
}

.db-industry-sub:hover {
    text-decoration: underline;
}

.db-ind-tag {
    font-weight: 700;
    color: #475569;
}

.db-province-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 9px;
    font-size: 12px;
    font-weight: 600;
    color: #1e40af;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.db-province-pill:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.mst-inline-copy {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 2px 3px;
    margin-left: 3px;
    vertical-align: middle;
    border-radius: 3px;
    transition: all 0.15s;
}

.mst-inline-copy:hover {
    color: var(--primary);
    background: #eff6ff;
}

.db-pagination-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.db-pagination-top {
    margin-top: 0;
    margin-bottom: 10px;
    padding-top: 2px;
    padding-bottom: 10px;
    border-top: none;
    border-bottom: 1px solid var(--border-color);
}

.db-page-summary {
    font-size: 12.5px;
    color: var(--text-muted);
}

.db-page-summary strong {
    color: var(--text-main);
    font-weight: 700;
}

.db-page-controls {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.db-page-nav,
.db-page-num {
    min-width: 32px;
    height: 30px;
    padding: 0 9px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.db-page-nav:hover:not(:disabled),
.db-page-num:hover:not(:disabled):not(.active) {
    border-color: var(--primary);
    color: var(--primary);
    background: #eff6ff;
}

.db-page-num.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 1px 4px rgba(37, 99, 235, 0.25);
}

.db-page-nav:disabled,
.db-page-num:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.db-page-ellipsis {
    padding: 0 4px;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 12px;
}

.db-page-jump {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.db-jump-input {
    width: 64px;
    height: 30px;
    padding: 0 6px;
    font-size: 12.5px;
    font-weight: 700;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    outline: none;
}

.db-jump-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.db-jump-btn {
    height: 30px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    background: var(--primary);
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s;
}

.db-jump-btn:hover {
    background: #1d4ed8;
}

