/* صفحة الدخول والدعوة وتعيين كلمة المرور، وقائمة الحساب، ولوحة المدير — تعتمد على متغيرات style.css */

/* ---------- الدخول والدعوة ---------- */
.auth-wrap { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px 16px; }
.auth-card { width: min(380px, 100%); background: #fff; border: 1px solid #d5dbe1; border-radius: 24px; box-shadow: 0 12px 40px rgba(12, 52, 66, .10); padding: 30px 26px 26px; text-align: center; }
.auth-logo { display: block; margin: 0 auto; }
.auth-card h1 { font-size: 20px; margin: 10px 0 4px; line-height: 1.4; }
.auth-card .sub { color: var(--muted); font-size: 13.5px; margin: 0 0 18px; }
.auth-card .field { text-align: start; }
.auth-card .btn.primary { width: 100%; padding: 10px; font-size: 15px; }
.auth-err { color: var(--bad); font-size: 13px; margin: 8px 0 0; min-height: 1.3em; }
.auth-meta { color: var(--muted); font-size: 12.5px; margin: 12px 0 0; }
.auth-meta button { border: 0; background: none; color: var(--pri); cursor: pointer; padding: 0; font: inherit; }
.auth-meta button:disabled { color: var(--muted); cursor: default; }
.auth-foot { color: var(--muted); font-size: 12px; margin: 0; text-align: center; }
.invite-chip { display: inline-block; background: var(--pri-soft); color: var(--pri); font-size: 12px; font-weight: 600; padding: 2px 12px; border-radius: 99px; margin-top: 10px; }
.auth-card input[readonly] { background: var(--soft); color: var(--muted); }
.auth-card .field-hint { color: var(--muted); font-size: 12px; margin: 4px 0 0; }

/* حقل كلمة المرور: الحقل من اليسار لليمين، فزر الإظهار على يمينه */
.pw { position: relative; }
.pw input { padding-right: 62px; }
.pw-toggle { position: absolute; top: 50%; right: 5px; transform: translateY(-50%); border: 0; background: none; color: var(--pri); font: inherit; font-size: 12.5px; cursor: pointer; padding: 4px 7px; border-radius: 6px; }
.pw-toggle:hover { background: var(--soft); }

/* ---------- قائمة الحساب في الشريط العلوي ---------- */
.top-end { display: flex; align-items: center; gap: 10px; }
.userbox { position: relative; }
.ub-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid #c3e0e8; background: var(--pri-soft); color: var(--pri); font-weight: 700; font-size: 15px; cursor: pointer; }
.ub-btn:hover { border-color: var(--pri); }
.ub-menu { position: absolute; top: calc(100% + 6px); inset-inline-end: 0; z-index: 40; min-width: 230px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .12); padding: 6px; }
.ub-who { display: flex; flex-direction: column; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.ub-who span { color: var(--muted); font-size: 12.5px; }
.ub-item { display: block; width: 100%; text-align: start; padding: 7px 10px; border-radius: 8px; border: 0; background: none; cursor: pointer; color: var(--ink); text-decoration: none; font-size: 14px; }
.ub-item:hover { background: var(--soft); }
.ub-item.danger { color: var(--bad); }

/* ---------- لوحة المدير ---------- */
.admin-badge { background: #16212b; color: #fff; font-size: 11.5px; font-weight: 500; padding: 1px 10px; border-radius: 99px; }
.admin-head { text-align: center; margin: 8px 0 20px; }
.admin-head h1 { font-size: 22px; margin: 0 0 4px; }
.admin-head p { margin: 0; color: var(--muted); }
.admin-stats { grid-template-columns: repeat(4, 1fr); }
.invite-panel { margin-bottom: 20px; }
.invite-row { display: flex; gap: 8px; flex-wrap: wrap; }
.invite-row input { flex: 1 1 240px; width: auto; }
.invite-row select { width: auto; }
.link-box { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.link-box input { flex: 1 1 260px; width: auto; font-size: 12.5px; color: var(--pri); }
.link-note { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }
table.users tbody tr { cursor: default; }
table.users td { vertical-align: middle; }
.u-name b { display: block; font-weight: 600; }
.u-name span { color: var(--muted); font-size: 12.5px; }
.u-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.chip.dark { background: #16212b; color: #fff; }
.chip.muted { background: #eef1f4; color: var(--muted); }
table.users tr.suspended td { background: #fff7f6; }
table.users tr.pending td { background: #fffaf0; }

@media (max-width: 600px) {
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .top-end { gap: 6px; }
}
