* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, sans-serif; background: #f5f7fb; color: #172033; }
a { color: inherit; text-decoration: none; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 16px 28px; background: #ffffff; border-bottom: 1px solid #e2e8f0; }
.brand a { font-weight: 700; font-size: 20px; }
nav a { margin-left: 16px; color: #334155; }
.container { max-width: 1120px; margin: 32px auto; padding: 0 16px; }
.hero { background: #ffffff; padding: 52px; border-radius: 18px; box-shadow: 0 10px 30px rgba(15, 23, 42, .08); text-align: center; }
.hero h1 { margin: 0 0 12px; font-size: 42px; }
.card { background: #ffffff; padding: 24px; border-radius: 16px; box-shadow: 0 10px 30px rgba(15, 23, 42, .06); margin-bottom: 20px; }
.auth-card { max-width: 480px; margin: 0 auto; }
.wide { max-width: 100%; }
label { display: block; margin-top: 14px; font-weight: 600; }
input { width: 100%; padding: 12px 14px; margin-top: 6px; border: 1px solid #cbd5e1; border-radius: 10px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.check input { width: auto; margin-top: 3px; }
.btn { display: inline-block; padding: 12px 18px; border: 0; border-radius: 10px; background: #1d4ed8; color: #ffffff; font-weight: 700; cursor: pointer; }
.btn.secondary { background: #0f172a; }
.btn.danger { background: #dc2626; }
.btn.full { width: 100%; margin-top: 18px; }
.actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.actions.stacked { align-items: stretch; justify-content: flex-start; flex-direction: column; }
.alert { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-success { background: #dcfce7; color: #166534; }
.muted { color: #64748b; }
.dev-otp { padding: 12px; background: #fff7ed; color: #9a3412; border-radius: 10px; margin-bottom: 16px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; background: #dcfce7; color: #166534; }
.data-list { padding-left: 20px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; border-bottom: 1px solid #e2e8f0; padding: 10px; vertical-align: top; }
.table th { background: #f8fafc; }
.table.two-col th { width: 260px; }
code { background: #f1f5f9; padding: 2px 6px; border-radius: 6px; }
.footer { text-align: center; color: #64748b; padding: 24px; }
@media (max-width: 640px) { .hero { padding: 28px; } .hero h1 { font-size: 32px; } .topbar { flex-direction: column; gap: 10px; } }

.inline-form { display: inline-block; margin: 0; }
.inline-form .btn { margin: 0; }

.mt-form { margin-top: 12px; }
.warning-card { border: 1px solid #fed7aa; background: #fffbeb; }
.backup-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-top: 12px; }
.backup-grid code { display: block; text-align: center; padding: 10px; background: #ffffff; border: 1px dashed #f59e0b; }
select, textarea { width: 100%; padding: 12px 14px; margin-top: 6px; border: 1px solid #cbd5e1; border-radius: 10px; font-family: inherit; }
textarea { resize: vertical; }
.profile-photo-box { display: flex; justify-content: center; margin: 16px 0 22px; }
.profile-photo { width: 132px; height: 132px; border-radius: 999px; object-fit: cover; border: 4px solid #e2e8f0; background: #f8fafc; }
.profile-photo.placeholder { display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 700; color: #1d4ed8; }

.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; align-items: end; margin: 16px 0 22px; }
.filter-grid.small-grid { grid-template-columns: minmax(160px, 260px) auto; }
.filter-actions { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.btn.small { padding: 7px 10px; border-radius: 8px; font-size: 12px; }
.pill.gray { background: #f1f5f9; color: #334155; }
.permission-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-bottom: 18px; }
.card-mini { border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px; background: #ffffff; margin: 0; }
.card-mini input { margin-top: 4px; }
small { color: #64748b; }

pre { background: #0f172a; color: #e2e8f0; padding: 16px; border-radius: 12px; overflow-x: auto; }
pre code { background: transparent; color: inherit; padding: 0; }


.captcha-box { margin-top: 14px; padding: 14px; border-radius: 12px; }
.stat-card strong { display: block; font-size: 36px; margin-top: 8px; }
.pill.low { background: #dcfce7; color: #166534; }
.pill.medium { background: #fef3c7; color: #92400e; }
.pill.high { background: #fee2e2; color: #991b1b; }
