:root {
    --bg: #0f172a;
    --panel: #111827;
    --muted: #94a3b8;
    --text: #e2e8f0;
    --border: #1f2937;
    --accent: #38bdf8;
    --accent-strong: #0ea5e9;
    --success: #34d399;
    --error: #f87171;
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
    --radius: 14px;
    --font: "Space Grotesk", "Inter", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

.hidden { display: none !important; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    background: radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.08), transparent 30%),
    radial-gradient(circle at 80% 10%, rgba(52, 211, 153, 0.08), transparent 32%),
    var(--bg);
    color: var(--text);
}

.page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 20px 48px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.page-header h1 {
    margin: 6px 0 4px;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.eyebrow {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 12px;
    color: var(--muted);
}

.subtitle {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.auth-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 40% 30%, rgba(56, 189, 248, 0.15), transparent 30%),
    radial-gradient(circle at 70% 70%, rgba(239, 68, 68, 0.12), transparent 32%),
    rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 20;
    padding: 20px;
}

.auth-card {
    background: #0b1222;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    max-width: 360px;
    width: min(90vw, 360px);
    box-shadow: var(--shadow);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.auth-form label {
    font-size: 13px;
    color: var(--muted);
}

.auth-form input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
}

.auth-form input:focus {
    outline: 2px solid rgba(56, 189, 248, 0.5);
    border-color: transparent;
}

.actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 600;
    color: var(--text);
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.btn.primary {
    background: linear-gradient(120deg, var(--accent-strong), var(--accent));
    box-shadow: 0 10px 24px rgba(56, 189, 248, 0.35);
}

.btn.danger {
    background: linear-gradient(120deg, #f97316, #ef4444);
    box-shadow: 0 10px 24px rgba(239, 68, 68, 0.35);
}

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

.btn.full-width {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.btn:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(56, 189, 248, 0.25);
}

.panel {
    background: linear-gradient(145deg, rgba(17, 24, 39, 0.9), rgba(17, 24, 39, 0.82));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
}

.status-bar {
    min-height: 24px;
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 12px;
}

.status-bar.status-success { color: var(--success); }
.status-bar.status-error { color: var(--error); }
.status-bar.status-info { color: var(--accent); }
.status-bar.status-warn { color: #fbbf24; }

.table-wrapper {
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

th, td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    font-size: 14px;
}

th {
    background: rgba(255, 255, 255, 0.02);
    color: #cbd5e1;
    position: sticky;
    top: 0;
    z-index: 1;
}

tr:hover td {
    background: rgba(56, 189, 248, 0.05);
}

.select-col {
    width: 50px;
    text-align: center;
}

.tag {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.12);
    color: var(--text);
    font-weight: 600;
}

.preview-btn {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--accent);
    background: rgba(56, 189, 248, 0.15);
    color: var(--text);
    cursor: pointer;
}

.preview-btn:hover {
    background: rgba(56, 189, 248, 0.25);
}

.muted {
    color: var(--muted);
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.overlay.hidden { display: none; }

.overlay-content {
    position: relative;
    background: #0b1222;
    border-radius: var(--radius);
    padding: 14px;
    max-width: 90vw;
    max-height: 90vh;
    box-shadow: var(--shadow);
}

.overlay-content img {
    max-width: 80vw;
    max-height: 80vh;
    border-radius: 10px;
    display: block;
}

.close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    font-size: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    z-index: 30;
    padding: 16px;
}

.modal-card {
    background: #0f172a;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    max-width: 360px;
    width: min(90vw, 360px);
    box-shadow: var(--shadow);
}

.modal-title {
    margin: 0 0 8px;
    color: #f87171;
}

.modal-body {
    margin: 0 0 16px;
    color: var(--text);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
