/* Translation Audit Dashboard - Clean Design */
:root {
    --bg-dark: #0a0e1a;
    --bg-card: #111827;
    --bg-card-hover: #1a2332;
    --border: #1e2d3d;
    --text: #e2e8f0;
    --text-dim: #64748b;
    --text-mid: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --red: #ef4444;
    --red-bg: rgba(239,68,68,0.1);
    --orange: #f97316;
    --orange-bg: rgba(249,115,22,0.1);
    --yellow: #eab308;
    --yellow-bg: rgba(234,179,8,0.1);
    --green: #22c55e;
    --green-bg: rgba(34,197,94,0.1);
    --blue: #3b82f6;
    --blue-bg: rgba(59,130,246,0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
}

/* NAV */
.nav {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    display: flex;
    align-items: center;
    height: 56px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-logo {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent);
    margin-right: 32px;
    letter-spacing: -0.3px;
}
.nav-links { display: flex; gap: 4px; }
.nav-links a {
    color: var(--text-mid);
    text-decoration: none;
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 6px;
    transition: all 0.15s;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-links a.active { color: var(--accent); background: var(--blue-bg); }
.nav-right { margin-left: auto; font-size: 12px; color: var(--text-dim); }

/* LAYOUT */
.container { max-width: 1400px; margin: 0 auto; padding: 28px 32px; }
.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: 22px; font-weight: 600; margin-bottom: 4px; }
.page-header p { font-size: 13px; color: var(--text-dim); }

/* STATS GRID */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px 20px;
    transition: border-color 0.15s;
}
.stat-card:hover { border-color: var(--accent); }
.stat-card .value { font-size: 30px; font-weight: 700; line-height: 1; }
.stat-card .value.red { color: var(--red); }
.stat-card .value.orange { color: var(--orange); }
.stat-card .value.yellow { color: var(--yellow); }
.stat-card .value.green { color: var(--green); }
.stat-card .value.blue { color: var(--accent); }
.stat-card .label { font-size: 12px; color: var(--text-dim); margin-top: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-card .sub { font-size: 11px; color: var(--text-dim); margin-top: 2px; }

/* TABS */
.tab-bar {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.tab-item {
    padding: 10px 18px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-mid);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}
.tab-item:hover { color: var(--text); }
.tab-item.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-badge {
    background: var(--border);
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}
.tab-item.active .tab-badge { background: var(--blue-bg); color: var(--accent); }

/* FILTERS */
.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    align-items: center;
}
.filters input, .filters select {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s;
}
.filters input:focus, .filters select:focus { border-color: var(--accent); }
.filters input { width: 280px; }
.filters .filter-count { font-size: 12px; color: var(--text-dim); margin-left: auto; }

/* TABLE */
.table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}
table { width: 100%; border-collapse: collapse; }
thead th {
    background: rgba(0,0,0,0.3);
    padding: 10px 14px;
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-dim);
    letter-spacing: 0.5px;
    font-weight: 600;
    position: sticky;
    top: 0;
}
tbody td {
    padding: 9px 14px;
    font-size: 13px;
    border-top: 1px solid rgba(255,255,255,0.03);
}
tbody tr { transition: background 0.1s; }
tbody tr:hover { background: var(--bg-card-hover); }
tbody tr.clickable { cursor: pointer; }
.domain-link { color: var(--accent); text-decoration: none; }
.domain-link:hover { text-decoration: underline; }

/* BADGES */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-orange { background: var(--orange-bg); color: var(--orange); }
.badge-yellow { background: var(--yellow-bg); color: var(--yellow); }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-blue { background: var(--blue-bg); color: var(--accent); }

/* PROGRESS BAR */
.progress-bar {
    width: 80px;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
}
.progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s;
}
.progress-fill.green { background: var(--green); }
.progress-fill.yellow { background: var(--yellow); }
.progress-fill.orange { background: var(--orange); }
.progress-fill.red { background: var(--red); }

/* CARDS */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
}
.card h3 { font-size: 15px; font-weight: 600; margin-bottom: 12px; }

/* COMPARE VIEW */
.compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}
.compare-col h4 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
.compare-item {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 4px;
    margin-bottom: 3px;
    word-break: break-word;
}
.compare-item.match { background: var(--green-bg); color: var(--green); }
.compare-item.wp-only { background: var(--orange-bg); color: var(--orange); }
.compare-item.json-only { background: var(--blue-bg); color: var(--accent); }
.compare-item.miss { background: var(--red-bg); color: var(--red); }

/* LOGIN */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
}
.login-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 40px;
    width: 380px;
}
.login-box h2 { text-align: center; margin-bottom: 24px; font-size: 20px; }
.login-box input {
    width: 100%;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 12px;
    outline: none;
}
.login-box input:focus { border-color: var(--accent); }
.login-box button {
    width: 100%;
    background: var(--accent);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
}
.login-box button:hover { background: var(--accent-hover); }
.login-box .error { color: var(--red); font-size: 13px; text-align: center; margin-bottom: 12px; }

/* LEGEND */
.legend {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 12px;
    color: var(--text-mid);
}
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    display: inline-block;
}

/* EMPTY STATE */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-dim);
}
.empty-state .icon { font-size: 32px; margin-bottom: 12px; }

/* PAGINATION */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
}
.pagination a, .pagination span {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-mid);
    text-decoration: none;
    border: 1px solid var(--border);
}
.pagination a:hover { background: var(--bg-card-hover); color: var(--text); }
.pagination .current { background: var(--accent); color: white; border-color: var(--accent); }

/* RESPONSIVE */
@media (max-width: 768px) {
    .container { padding: 16px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .compare-grid { grid-template-columns: 1fr; }
    .filters input { width: 100%; }
    .filters { flex-wrap: wrap; }
}
