/* Normalizer Admin UI Styles */

:root {
    --bg: #0f1117;
    --surface: #1a1d27;
    --border: #2a2d3a;
    --text: #e1e4eb;
    --text-muted: #6b7280;
    --primary: #6366f1;
    --primary-hover: #818cf8;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --radius: 8px;
    --font: 'Inter', -apple-system, sans-serif;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.nav-brand {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text);
    text-decoration: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 1.5rem;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

/* Data tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.data-table th,
.data-table td {
    padding: 0.65rem 0.9rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.data-table th {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.data-table tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

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

/* Badges */
.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.badge-error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
}

.badge-primary {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
}

.badge-default {
    background: rgba(107, 114, 128, 0.15);
    color: var(--text-muted);
}

/* Buttons */
.btn {
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn:hover {
    background: var(--border);
}

.btn-sm {
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    border-color: var(--text-muted);
}

/* Form controls */
.match-select,
.match-input {
    width: 100%;
    background: #0d1117;
    color: #c9d1d9;
    border: 1px solid #30363d;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.match-input::placeholder {
    color: #484f58;
}

.match-input:focus {
    border-color: #58a6ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.2);
}

.filter-input {
    padding: 0.4rem 0.7rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.85rem;
    width: 250px;
}

.table-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.table-controls label {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Status bar */
.status-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem 1.5rem;
    background: var(--surface);
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    text-align: center;
    z-index: 100;
}

.status-success {
    border-top-color: var(--success);
}

.status-error {
    border-top-color: var(--error);
}

/* Match section */
.match-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

/* Action buttons in match rows */
.action-btns {
    white-space: nowrap;
    width: 70px;
}

.btn-icon {
    background: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 2px 6px;
    transition: all 0.15s;
    margin-right: 2px;
}

.btn-icon:hover {
    background: var(--border);
    color: var(--text);
}

.btn-create:hover {
    border-color: var(--success);
    color: var(--success);
}

.btn-skip:hover {
    border-color: var(--warning);
    color: var(--warning);
}

/* Skipped match state */
.row-skipped {
    opacity: 0.55;
}

.match-input-skipped {
    color: var(--text-muted) !important;
    font-style: italic;
    border-color: rgba(245, 158, 11, 0.3) !important;
}

.badge-skipped {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

/* Utilities */
.text-muted {
    color: var(--text-muted);
}

.text-center {
    text-align: center;
}

/* Core dataset detail */
.core-meta {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.meta-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.35rem 0;
}

.meta-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    min-width: 100px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.entity-data {
    font-size: 0.75rem;
    word-break: break-all;
    color: var(--text-muted);
    max-width: 600px;
    display: inline-block;
}

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

a:hover {
    color: var(--primary-hover);
}

select {
    cursor: pointer;
}

/* Source link bar */
.source-link-bar {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: -.5rem 0 1.5rem;
    font-size: .9rem;
}

.source-label {
    color: var(--text-muted);
    font-weight: 500;
}

.source-url-input {
    flex: 1;
    max-width: 400px;
    padding: .3rem .5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-size: .85rem;
}

.btn-sm {
    padding: .25rem .75rem;
    font-size: .8rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-sm:hover {
    background: var(--primary-hover);
}

.badge-llm {
    background: #065f46;
    color: #6ee7b7;
}