/* 11XL News - Admin panel shared styles (Super Admin + Tenant Admin) */
:root {
  --sb-w: 250px;
  --sb-bg: #111827;
  --sb-text: #cbd5e1;
  --sb-active: #2563eb;
  --brand: #2563eb;
}
* { box-sizing: border-box; }
body.admin { background: #f3f4f6; font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif; font-size: 14px; }
.sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: var(--sb-w); background: var(--sb-bg); color: var(--sb-text); overflow-y: auto; z-index: 1040; transition: transform .25s; }
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 18px 20px; color: #fff; font-weight: 700; font-size: 17px; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar .brand i { color: #60a5fa; font-size: 22px; }
.sidebar .nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #64748b; padding: 16px 20px 6px; }
.sidebar a.nav-link { color: var(--sb-text); padding: 9px 20px; display: flex; align-items: center; gap: 10px; border-left: 3px solid transparent; font-size: 14px; }
.sidebar a.nav-link i { width: 18px; text-align: center; font-size: 16px; }
.sidebar a.nav-link:hover { background: rgba(255,255,255,.05); color: #fff; }
.sidebar a.nav-link.active { background: rgba(37,99,235,.18); color: #fff; border-left-color: var(--sb-active); }
.main { margin-left: var(--sb-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { background: #fff; border-bottom: 1px solid #e5e7eb; padding: 10px 20px; display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 1020; }
.topbar .btn-toggle { display: none; }
.content { padding: 20px; flex: 1; }
.card { border: 0; box-shadow: 0 1px 3px rgba(0,0,0,.06); border-radius: 10px; }
.card-header { background: #fff; border-bottom: 1px solid #eef0f3; font-weight: 600; border-radius: 10px 10px 0 0 !important; }
.stat { display: flex; align-items: center; gap: 14px; padding: 18px; }
.stat .ic { width: 50px; height: 50px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; color: #fff; flex-shrink: 0; }
.stat h3 { margin: 0; font-size: 24px; font-weight: 700; }
.stat small { color: #6b7280; }
.table > :not(caption) > * > * { padding: .6rem .75rem; vertical-align: middle; }
.table thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; background: #f9fafb; }
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: #e5e7eb; }
.form-label { font-weight: 500; font-size: 13px; }
.req::after { content: " *"; color: #dc2626; }
.page-title { font-size: 20px; font-weight: 700; margin: 0; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.feature-grid label { display: flex; gap: 10px; padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 8px; cursor: pointer; background: #fff; }
.feature-grid label:has(input:checked) { border-color: var(--brand); background: #eff6ff; }
.perm-group { border: 1px solid #e5e7eb; border-radius: 8px; padding: 12px; background: #fff; }
.perm-group h6 { font-size: 12px; text-transform: uppercase; color: #6b7280; letter-spacing: .05em; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #0f172a, #1e3a8a); padding: 20px; }
.login-card { width: 100%; max-width: 460px; background: #fff; border-radius: 16px; padding: 32px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.login-card .logo { font-size: 40px; color: var(--brand); }
.tox-tinymce { border-radius: 8px !important; }
.img-thumb { width: 64px; height: 44px; object-fit: cover; border-radius: 6px; background: #e5e7eb; }
.badge-soft { background: #eef2ff; color: #3730a3; }
.limit-bar { height: 6px; background: #e5e7eb; border-radius: 3px; overflow: hidden; }
.limit-bar span { display: block; height: 100%; background: var(--brand); }
.copy-box { background: #0f172a; color: #e2e8f0; border-radius: 8px; padding: 12px; font-family: Consolas, monospace; font-size: 12px; white-space: pre-wrap; word-break: break-all; position: relative; }
.copy-box .copy { position: absolute; right: 8px; top: 8px; }
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1035; }
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  body.sb-open .sidebar { transform: none; }
  body.sb-open .sidebar-backdrop { display: block; }
  .main { margin-left: 0; }
  .topbar .btn-toggle { display: inline-flex; }
  .content { padding: 14px; }
  .stat h3 { font-size: 20px; }
}
@media (max-width: 575.98px) {
  .table-responsive { font-size: 13px; }
  .page-title { font-size: 17px; }
}
/* ID Card */
.idcard { width: 340px; height: 214px; border-radius: 14px; overflow: hidden; position: relative; color: #fff; font-family: "Segoe UI", "Noto Sans Devanagari", sans-serif; box-shadow: 0 8px 24px rgba(0,0,0,.2); background: #fff; }
.idcard .head { background: var(--card-color, #c8102e); padding: 8px 12px; display: flex; align-items: center; gap: 8px; height: 56px; }
.idcard .head img { height: 38px; width: 38px; object-fit: contain; background: #fff; border-radius: 6px; padding: 2px; }
.idcard .head .t { font-weight: 800; font-size: 15px; line-height: 1.1; }
.idcard .head .s { font-size: 10px; opacity: .9; }
.idcard .body { display: flex; gap: 10px; padding: 10px 12px; color: #111; }
.idcard .photo { width: 78px; height: 96px; object-fit: cover; border: 2px solid var(--card-color, #c8102e); border-radius: 6px; background: #eee; }
.idcard .info { font-size: 11px; line-height: 1.45; flex: 1; }
.idcard .info b { font-size: 14px; display: block; color: var(--card-color, #c8102e); }
.idcard .press { position: absolute; right: 12px; top: 64px; background: #111; color: #fff; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 4px; letter-spacing: .1em; }
.idcard .foot { position: absolute; bottom: 0; left: 0; right: 0; background: #f1f5f9; color: #333; font-size: 9px; padding: 4px 12px; display: flex; justify-content: space-between; }
.idcard.back .body { flex-direction: column; font-size: 10px; color: #222; padding: 10px 12px 28px; }
.idcard .qr { position: absolute; right: 12px; bottom: 30px; width: 70px; height: 70px; background: #fff; }
@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .main { margin: 0; }
  .content { padding: 0; }
  body.admin { background: #fff; }
}
