/* Admin panel – extends main style */
:root {
    --admin-sidebar-w: 220px;
    --admin-header-h: 56px;
}
.admin-body { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: var(--admin-sidebar-w);
    background: #1e293b;
    color: #e2e8f0;
    flex-shrink: 0;
}
.admin-sidebar-inner { padding: 20px 0; }
.admin-sidebar a {
    display: block;
    padding: 10px 20px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9375rem;
    transition: background .15s, color .15s;
}
.admin-sidebar a:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-sidebar a.active { background: rgba(79, 70, 229, .4); color: #fff; }
.admin-sidebar .brand {
    padding: 16px 20px;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.1);
    margin-bottom: 8px;
}
.admin-sidebar-balance {
    padding: 12px 20px;
    margin-bottom: 8px;
    background: rgba(255,255,255,.06);
    border-radius: 8px;
    margin-left: 12px;
    margin-right: 12px;
}
.admin-sidebar-balance-label { display: block; font-size: 0.75rem; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.02em; }
.admin-sidebar-balance-value { display: block; font-size: 1.25rem; font-weight: 700; color: #c7d2fe; }
.admin-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.admin-header {
    height: var(--admin-header-h);
    background: #fff;
    border-bottom: 1px solid var(--color-border, #e2e8f0);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px;
}
.admin-content { padding: 24px; flex: 1; }
.admin-page-title { margin: 0 0 20px; font-size: 1.35rem; font-weight: 700; }
.admin-card { background: #fff; border: 1px solid var(--color-border, #e2e8f0); border-radius: 12px; padding: 24px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.admin-card-title { margin: 0 0 6px; font-size: 1.2rem; font-weight: 700; }
.admin-card-desc { color: #64748b; font-size: 0.9375rem; margin: 0 0 20px; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.admin-table th, .admin-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--color-border, #e2e8f0); }
.admin-table th { background: #f8fafc; font-weight: 600; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table .admin-th-actions { width: 1%; white-space: nowrap; }
.admin-user-email { font-weight: 500; }
.admin-user-name { font-size: 0.8125rem; }
.admin-amount { font-weight: 600; white-space: nowrap; }
.admin-ref { font-size: 0.8125rem; background: #f1f5f9; padding: 2px 6px; border-radius: 4px; }
.admin-badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 0.8125rem; font-weight: 500; }
.admin-badge-success { background: #dcfce7; color: #166534; }
.admin-badge-warning { background: #fef3c7; color: #b45309; }
.admin-actions-cell { vertical-align: middle; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.admin-form-inline { display: inline; }
.admin-form-inline button { margin: 0; }
.btn-outline-danger { background: transparent; border: 1px solid #dc2626; color: #dc2626; }
.btn-outline-danger:hover { background: #dc2626; color: #fff; }
.admin-alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; font-size: 0.9375rem; }
.admin-alert-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.admin-alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fca5a5; }
.form-control { width: 100%; max-width: 100%; padding: 10px 12px; border: 1px solid var(--color-border, #e2e8f0); border-radius: 8px; font-size: 1rem; }
.form-control:focus { outline: none; border-color: var(--color-primary, #4f46e5); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15); }
.admin-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.admin-modal[hidden] { display: none !important; }
.admin-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.admin-modal-dialog { position: relative; width: 100%; max-width: 420px; }
.admin-modal-content { background: #fff; border-radius: 12px; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1); }
.admin-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--color-border, #e2e8f0); }
.admin-modal-header h3 { margin: 0; font-size: 1.125rem; }
.admin-modal-close { background: none; border: none; font-size: 1.5rem; line-height: 1; color: #64748b; cursor: pointer; padding: 0 4px; }
.admin-modal-close:hover { color: #1e293b; }
.admin-modal-body { padding: 20px; }
.admin-modal-user-info { margin: 0 0 16px; font-size: 0.875rem; }
.admin-modal-footer { display: flex; gap: 12px; justify-content: flex-end; padding: 16px 20px; border-top: 1px solid var(--color-border, #e2e8f0); }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }
.admin-stat { background: #fff; border: 1px solid var(--color-border, #e2e8f0); border-radius: 12px; padding: 20px; }
.admin-stat-value { font-size: 1.75rem; font-weight: 700; color: var(--color-primary, #4f46e5); }
.admin-stat-label { font-size: 0.875rem; color: #64748b; margin-top: 4px; }
.admin-form .form-group { margin-bottom: 18px; }
.admin-form label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 0.875rem; }
.admin-form input[type="text"], .admin-form input[type="number"], .admin-form input[type="password"], .admin-form select { width: 100%; max-width: 400px; padding: 10px 12px; border: 1px solid var(--color-border, #e2e8f0); border-radius: 8px; }
.admin-form .help { font-size: 0.875rem; color: #64748b; margin-top: 4px; }
@media (max-width: 768px) {
    .admin-body { flex-direction: column; }
    .admin-sidebar { width: 100%; }
    .admin-sidebar-inner { display: flex; flex-wrap: wrap; gap: 4px; padding: 12px; }
    .admin-sidebar .brand { flex: 1 1 100%; margin-bottom: 8px; }
}
