/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1a1a2e;
    background: #f8f9fa;
    line-height: 1.6;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }
.text-center { text-align: center; }

/* Navbar */
.navbar {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 0;
}
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: #6366f1;
    text-decoration: none;
}
.navbar-menu { display: flex; align-items: center; gap: 1.25rem; }
.navbar-menu a { color: #4a5568; text-decoration: none; font-size: 0.95rem; }
.navbar-menu a:hover { color: #6366f1; }
.navbar-menu .btn-primary,
.navbar-menu .btn-primary:hover { color: #fff; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.15s;
}
.btn-primary { background: #6366f1; color: #fff; }
.btn-primary:hover { background: #4f46e5; }
.btn-outline { background: #fff; color: #4a5568; border: 1px solid #cbd5e0; }
.btn-outline:hover { border-color: #6366f1; color: #6366f1; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-link { background: none; border: none; color: #4a5568; cursor: pointer; font-size: 0.95rem; padding: 0; }
.btn-link:hover { color: #6366f1; }
.btn-sm { padding: 0.3rem 0.8rem; font-size: 0.82rem; }
.btn-lg { padding: 0.75rem 2rem; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

/* Hero */
.hero { text-align: center; padding: 4rem 1rem; }
.hero h1 { font-size: 2.5rem; font-weight: 800; color: #1a1a2e; margin-bottom: 1rem; }
.hero .lead { font-size: 1.2rem; color: #64748b; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Features */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin-top: 3rem; }
.feature { background: #fff; border-radius: 0.75rem; padding: 1.5rem; border: 1px solid #e2e8f0; }
.feature h3 { margin-bottom: 0.5rem; color: #1a1a2e; }
.feature p { color: #64748b; font-size: 0.9rem; }

/* Cards */
.card {
    background: #fff;
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    margin-bottom: 1rem;
}
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.card-header h3 { margin: 0; }
.danger-zone { border-color: #fca5a5; background: #fff5f5; }
.danger-zone h3 { color: #dc2626; }

/* Forms */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 500; color: #374151; margin-bottom: 0.4rem; }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.6rem 0.9rem;
    border: 1px solid #cbd5e0;
    border-radius: 0.4rem;
    font-size: 0.95rem;
    color: #1a1a2e;
    background: #fff;
    transition: border-color 0.15s;
}
.form-group input:focus,
.form-group select:focus { border-color: #6366f1; outline: none; box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.form-group small { color: #64748b; font-size: 0.8rem; display: block; margin-top: 0.25rem; }
.form-actions { display: flex; gap: 0.75rem; margin-top: 1.5rem; }
.form-advanced { margin-bottom: 1.25rem; }
.form-advanced summary { cursor: pointer; color: #6366f1; font-size: 0.875rem; margin-bottom: 0.75rem; }

/* Alerts */
.alert { padding: 0.75rem 1rem; border-radius: 0.4rem; margin-bottom: 1rem; font-size: 0.9rem; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }

/* Auth page */
.auth-page { background: #f1f5f9; }
.auth-card {
    max-width: 420px;
    margin: 3rem auto;
    background: #fff;
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.auth-card h1 { margin-bottom: 1.5rem; font-size: 1.5rem; }

/* Table */
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th { background: #f8f9fa; padding: 0.6rem 0.8rem; text-align: left; font-weight: 600; border-bottom: 2px solid #e2e8f0; }
.table td { padding: 0.6rem 0.8rem; border-bottom: 1px solid #e2e8f0; vertical-align: top; }
.table tr:last-child td { border-bottom: none; }
.spam-row { background: #fff5f5; }
.table .actions { white-space: nowrap; }

/* Badges */
.badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-secondary { background: #e2e8f0; color: #475569; }
.badge-danger { background: #fee2e2; color: #991b1b; }

/* Page header */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.page-header h1 { font-size: 1.75rem; }

/* Grid */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 768px) { .grid-2 { grid-template-columns: 1fr; } }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.stat-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 0.75rem; padding: 1.25rem; text-align: center; }
.stat-number { display: block; font-size: 2rem; font-weight: 700; color: #6366f1; }
.stat-label { color: #64748b; font-size: 0.875rem; }

/* Empty state */
.empty-state { text-align: center; padding: 3rem; color: #64748b; }
.empty-state p { margin-bottom: 1rem; }

/* Error page */
.error-page { padding: 4rem 1rem; }
.error-code { font-size: 6rem; font-weight: 900; color: #e2e8f0; margin-bottom: 0.5rem; }

/* Code */
pre { background: #1e1e2e; color: #cdd6f4; padding: 1rem; border-radius: 0.5rem; overflow-x: auto; margin: 0.75rem 0; }
code { background: #f1f5f9; padding: 0.2rem 0.4rem; border-radius: 0.25rem; font-size: 0.85em; }
pre code { background: none; padding: 0; }

/* Pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.5rem; }

/* Footer */
.footer { border-top: 1px solid #e2e8f0; padding: 1.5rem 0; margin-top: 3rem; text-align: center; color: #64748b; font-size: 0.875rem; }
