:root {
    --bg-dark: #0d0e14;
    --bg-sidebar: #07080b;
    --bg-card: #151722;
    --primary-red: #ff0d2d;
    --text-white: #f5f5f7;
    --text-dim: #9aa0a6;
    --border: rgba(255, 255, 255, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body { background: var(--bg-dark); color: var(--text-white); }

/* Login */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card { background: var(--bg-card); border: 1px solid var(--border); padding: 3rem; border-radius: 12px; width: 100%; max-width: 420px; }
.login-title { font-size: 1.8rem; margin-bottom: 0.5rem; text-align: center; }
.login-subtitle { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 2rem; text-align: center; }
.accent-text { color: var(--primary-red); }

/* Layout */
.admin-layout { display: flex; min-height: 100vh; }
.sidebar { width: 260px; background: var(--bg-sidebar); border-right: 1px solid var(--border); padding: 2rem 1.5rem; }
.sidebar .brand { font-size: 1.5rem; font-weight: 700; margin-bottom: 2.5rem; }
.side-nav { display: flex; flex-direction: column; gap: 0.5rem; }
.side-nav a { display: flex; align-items: center; gap: 0.8rem; color: var(--text-dim); text-decoration: none; padding: 0.8rem 1rem; border-radius: 8px; font-size: 0.95rem; }
.side-nav a.active, .side-nav a:hover { background: rgba(255, 13, 45, 0.1); color: var(--primary-red); }
.side-nav a.logout { margin-top: 2rem; color: #ff5555; }

.admin-main { flex: 1; padding: 2.5rem 3rem; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2.5rem; }
.preview-link { color: var(--primary-red); text-decoration: none; display: flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; }

/* Metrics */
.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin-bottom: 2.5rem; }
.metric-card { background: var(--bg-card); border: 1px solid var(--border); padding: 1.8rem; border-radius: 12px; }
.metric-card h3 { font-size: 2.2rem; color: var(--text-white); margin-bottom: 0.3rem; }
.metric-card p { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 1rem; }
.metric-card a { color: var(--primary-red); text-decoration: none; font-size: 0.85rem; }

/* Forms & Tables */
.admin-card { background: var(--bg-card); border: 1px solid var(--border); padding: 2rem; border-radius: 12px; margin-bottom: 2rem; }
.admin-card h3 { margin-bottom: 1.5rem; font-size: 1.2rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.2rem; }
.form-group label { font-size: 0.85rem; color: var(--text-dim); }
.form-group input, .form-group textarea, .form-group select { background: #0b0c10; border: 1px solid var(--border); padding: 0.8rem 1rem; border-radius: 6px; color: #fff; font-size: 0.95rem; }
.admin-btn { background: var(--primary-red); color: #fff; border: none; padding: 0.85rem 1.8rem; border-radius: 6px; cursor: pointer; font-weight: 600; }

.admin-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.admin-table th, .admin-table td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.admin-table th { color: var(--text-dim); font-weight: 500; }
.action-btn { padding: 0.4rem 0.8rem; border-radius: 4px; text-decoration: none; font-size: 0.8rem; margin-right: 0.4rem; }
.action-btn.edit { background: #2a2e3f; color: #fff; }
.action-btn.del { background: rgba(255, 13, 45, 0.2); color: #ff4d64; }
.alert { padding: 0.8rem 1.2rem; border-radius: 6px; margin-bottom: 1.5rem; font-size: 0.9rem; }
.alert.success { background: rgba(20, 180, 80, 0.15); color: #4ade80; border: 1px solid #14b450; }
.alert.error { background: rgba(255, 13, 45, 0.15); color: #ff6b7d; border: 1px solid var(--primary-red); }