:root {
    --bg-dark: #0f172a;
    --sidebar-bg: #1e293b;
    --card-bg: rgba(30, 41, 59, 0.7);
    --accent: #38bdf8;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
}

.progress-box {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.progress-bar-bg {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
}

.progress-stats {
    display: flex;
    gap: 2rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.stat-success b {
    color: #4ade80;
}

.stat-error b {
    color: #f87171;
}

.import-log {
    max-height: 150px;
    overflow-y: auto;
    background: #000;
    padding: 1rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.8rem;
}

.log-entry {
    margin-bottom: 0.25rem;
}

.log-entry.success {
    color: #4ade80;
}

.log-entry.error {
    color: #f87171;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.logo h2 {
    color: var(--accent);
    margin-bottom: 2rem;
    font-weight: 600;
}

nav ul {
    list-style: none;
}

nav li {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

nav li:hover,
nav li.active {
    background-color: rgba(56, 189, 248, 0.15);
    color: var(--accent);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

header {
    padding: 1rem 2rem;
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.auth-config {
    display: flex;
    gap: 1rem;
    align-items: center;
}

input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    color: white;
    outline: none;
    font-size: 0.9rem;
}

input:focus {
    border-color: var(--accent);
}

.btn-primary {
    background-color: var(--accent);
    color: var(--bg-dark);
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: opacity 0.3s;
}

.btn-primary:hover {
    opacity: 0.9;
}

#content-area {
    padding: 2rem;
    flex: 1;
    overflow-x: auto;
}

/* Glass Cards */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.hidden {
    display: none;
}

.modal {
    background: var(--sidebar-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 600px;
    max-width: 90%;
}

.modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
}

.modal-body {
    padding: 1.5rem;
}

.close-modal {
    cursor: pointer;
    font-size: 1.5rem;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    table-layout: auto;
}

.table th,
.table td {
    padding: 1.25rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.table td {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* Form Styles */
.select-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    color: white;
    outline: none;
    cursor: pointer;
}

.select-input option {
    background: var(--sidebar-bg);
    color: white;
}

.btn-text {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.85rem;
}

.mapping-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.mapping-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.match-check {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-text:hover {
    opacity: 0.8;
}

/* Searchable Select Component */
.searchable-select {
    position: relative;
    width: 100%;
    min-width: 250px;
}

.search-input {
    width: 100%;
    cursor: pointer;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--sidebar-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-top: 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.dropdown-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: rgba(56, 189, 248, 0.15);
    color: var(--accent);
}

.dropdown-item.selected {
    background: rgba(56, 189, 248, 0.25);
    color: var(--accent);
}

.dropdown-item .field-key {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.mapping-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}