/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 14px; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1e293b;
    background-color: #f8fafc;
}

/* ── Layout ── */
.page { display: flex; min-height: 100vh; }
.sidebar {
    width: 250px;
    background: #0f172a;
    color: #e2e8f0;
    padding: 1rem;
    flex-shrink: 0;
}
.sidebar h3 { margin: 0 0 1.5rem; font-size: 1.1rem; color: #38bdf8; }
.sidebar a {
    display: block;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.25rem;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.15s;
}
.sidebar a:hover, .sidebar a.active { background: #1e293b; color: #f1f5f9; }

.main-content { flex: 1; padding: 2rem; overflow-x: auto; }

/* ── Table ── */
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
thead { background: #f1f5f9; }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid #e2e8f0; }
th { font-weight: 600; color: #475569; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }
tbody tr:hover { background: #f8fafc; }

/* ── Status Badges ── */
.badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.badge-active { background: #dcfce7; color: #166534; }
.badge-suspended { background: #fef3c7; color: #92400e; }
.badge-deleted { background: #fee2e2; color: #991b1b; }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.5rem 1rem; border: none; border-radius: 6px;
    font-size: 0.875rem; font-weight: 500; cursor: pointer;
    text-decoration: none; transition: background 0.15s, opacity 0.15s;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: #3b82f6; color: #fff; }
.btn-primary:hover:not(:disabled) { background: #2563eb; }
.btn-warning { background: #f59e0b; color: #fff; }
.btn-warning:hover:not(:disabled) { background: #d97706; }
.btn-success { background: #22c55e; color: #fff; }
.btn-success:hover:not(:disabled) { background: #16a34a; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover:not(:disabled) { background: #dc2626; }
.btn-secondary { background: #64748b; color: #fff; }
.btn-secondary:hover:not(:disabled) { background: #475569; }
.btn-sm { padding: 0.3rem 0.6rem; font-size: 0.8rem; }

/* ── Card ── */
.card { background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); padding: 1.5rem; margin-bottom: 1.5rem; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.card-header h2 { margin: 0; font-size: 1.2rem; }

/* ── Form ── */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.35rem; font-weight: 500; color: #334155; }
.form-group input {
    width: 100%; padding: 0.5rem 0.75rem;
    border: 1px solid #cbd5e1; border-radius: 6px;
    font-size: 0.9rem; transition: border-color 0.15s;
}
.form-group input:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }

/* ── Detail Grid ── */
.detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.detail-item label { display: block; font-size: 0.8rem; color: #64748b; margin-bottom: 0.2rem; }
.detail-item span { font-weight: 500; }

/* ── Alert ── */
.alert { padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 1rem; }
.alert-danger { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }

/* ── Section Title ── */
.section-title { font-size: 1rem; font-weight: 600; margin: 1.5rem 0 0.75rem; color: #334155; border-bottom: 1px solid #e2e8f0; padding-bottom: 0.4rem; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin: 1.5rem 0 0.75rem; }
.section-header .section-title { margin: 0; border-bottom: none; padding-bottom: 0; }

/* ── Action Bar ── */
.action-bar { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }

/* ── Modal ── */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center;
    z-index: 1000;
}
.modal-content {
    background: #fff; border-radius: 8px; padding: 1.5rem;
    max-width: 500px; width: 90%; max-height: 90vh; overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
.modal-content h4 { margin: 0 0 1rem; font-size: 1.1rem; color: #1e293b; }
.modal-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1rem; }
.form-control {
    width: 100%; padding: 0.5rem 0.75rem;
    border: 1px solid #cbd5e1; border-radius: 6px;
    font-size: 0.9rem; transition: border-color 0.15s;
}
.form-control:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.btn-xs { padding: 0.2rem 0.5rem; font-size: 0.75rem; }

