/* ============================================================
   Cổng NPSC — giao diện (cùng bảng màu với 2 app: navy + cam EVN)
   ============================================================ */
:root {
  --navy: #062244;
  --navy-2: #0a3060;
  --orange: #e8820c;
  --orange-2: #d4700a;
  --bg: #f3f5f9;
  --line: #e3e8ef;
  --ink: #0f1d33;
  --muted: #64748b;
  --radius: 14px;
}

body.pt-body { background: var(--bg); color: var(--ink); font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }

/* ── Thanh trên ───────────────────────────── */
.pt-nav { background: linear-gradient(135deg, var(--navy), var(--navy-2)); border-bottom: 3px solid var(--orange); color: #fff; padding: 10px 0; position: sticky; top: 0; z-index: 1030; }
.pt-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.pt-brand img { width: 38px; height: 38px; border-radius: 9px; background: #fff; padding: 3px; }
.pt-brand span { display: flex; flex-direction: column; line-height: 1.15; }
.pt-brand b { font-size: 16px; letter-spacing: .3px; }
.pt-brand small { font-size: 11px; color: rgba(255,255,255,.65); }
.pt-links { gap: 4px; margin-left: 16px; }
.pt-links a { color: rgba(255,255,255,.78); text-decoration: none; padding: 7px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; }
.pt-links a:hover { color: #fff; background: rgba(255,255,255,.08); }
.pt-links a.on { color: #fff; background: rgba(232,130,12,.9); }
.pt-user { display: flex; align-items: center; gap: 10px; background: transparent; border: 0; color: #fff; padding: 4px 6px; border-radius: 10px; }
.pt-user:hover { background: rgba(255,255,255,.08); }
.pt-user b { display: block; font-size: 13px; font-weight: 600; }
.pt-user small { display: block; font-size: 11px; color: rgba(255,255,255,.6); }
.pt-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--orange); display: grid; place-items: center; font-weight: 700; }

/* ── Khối chung ───────────────────────────── */
.pt-h1 { font-size: 1.45rem; font-weight: 700; color: var(--navy); }
.pt-h2 { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 12px; }
.pt-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: 0 1px 2px rgba(15,29,51,.04); }
.pt-filter { padding: 14px 16px; }
.pt-btn { background: var(--orange); border: 0; color: #fff; font-weight: 600; border-radius: 9px; padding: 9px 16px; }
.pt-btn:hover, .pt-btn:focus { background: var(--orange-2); color: #fff; }
.pt-btn-outline { border: 1.5px solid var(--navy); color: var(--navy); font-weight: 600; border-radius: 9px; }
.pt-btn-outline:hover { background: var(--navy); color: #fff; }
.form-control:focus, .form-select:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(232,130,12,.18); }
.form-check-input:checked { background-color: var(--orange); border-color: var(--orange); }
.pt-foot { color: var(--muted); font-size: 12px; padding: 16px 12px 24px; }

/* ── Ô ứng dụng ───────────────────────────── */
.pt-app { --c: var(--orange); display: flex; flex-direction: column; gap: 6px; height: 100%; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: var(--radius); padding: 20px; color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s; }
a.pt-app:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15,29,51,.1); color: var(--ink); }
.pt-app-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, #fff); flex: none; }
.pt-app-icon.sm { width: 38px; height: 38px; font-size: 18px; border-radius: 10px; }
.pt-app-name { font-size: 1.1rem; font-weight: 700; margin-top: 6px; }
.pt-app-desc { color: var(--muted); font-size: .9rem; flex: 1; }
.pt-app-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.pt-role { background: color-mix(in srgb, var(--c) 14%, #fff); color: color-mix(in srgb, var(--c) 75%, #000); font-weight: 600; }
.pt-go { color: var(--c); font-weight: 600; font-size: .9rem; }
.pt-app-locked { opacity: .6; }
.pt-empty { text-align: center; background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); padding: 36px 16px; margin-bottom: 16px; }
.pt-empty i { font-size: 32px; color: var(--orange); }
.pt-empty h2 { font-size: 1.1rem; margin: 10px 0 4px; }
.pt-empty p { color: var(--muted); margin: 0; }

/* ── Bảng ─────────────────────────────────── */
.pt-table thead th { background: #f8fafc; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; font-weight: 600; border-bottom: 1px solid var(--line); white-space: nowrap; padding: 10px 14px; }
.pt-table td { padding: 10px 14px; border-color: var(--line); }
.pt-badge-super { background: var(--navy); }
.pt-badge-app { --c: #64748b; background: color-mix(in srgb, var(--c) 14%, #fff); color: color-mix(in srgb, var(--c) 75%, #000); font-weight: 600; margin: 1px 2px 1px 0; }

/* ── Form tài khoản ───────────────────────── */
.pt-roles { display: flex; flex-direction: column; gap: 10px; transition: opacity .2s; }
.pt-role-row { --c: var(--orange); display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 10px; padding: 12px; }
.pt-dim { opacity: .45; }
.pt-switches { display: flex; flex-direction: column; gap: 8px; }
.pt-dl dt { color: var(--muted); font-weight: 500; }
.pt-dl dd { margin-bottom: 8px; }
.pt-danger { border-color: #f3d4d4; }

@media (max-width: 575.98px) {
  .pt-role-row { flex-wrap: wrap; }
  .pt-role-row select { width: 100% !important; }
  .pt-card { padding: 16px; }
}

/* ── Trang đăng nhập ──────────────────────── */
body.pt-login { min-height: 100vh; display: grid; place-items: center; padding: 16px; font-family: "Segoe UI", system-ui, sans-serif;
  background: linear-gradient(135deg, rgba(6,34,68,.85), rgba(10,48,96,.72) 55%, rgba(232,130,12,.4)), url("/assets/img/background.png") center / cover fixed; }
.pt-login-card { width: 100%; max-width: 420px; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 16px 48px rgba(6,34,68,.5); border-top: 5px solid var(--orange); }
.pt-login-head { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; text-align: center; padding: 26px 24px 20px; border-bottom: 4px solid var(--orange); }
.pt-login-head img { width: 68px; border-radius: 12px; background: #fff; padding: 4px; margin-bottom: 10px; }
.pt-login-head h1 { font-size: 19px; font-weight: 700; color: var(--orange); margin: 4px 0; letter-spacing: .4px; }
.pt-login-head p { font-size: 13px; margin: 0; color: rgba(255,255,255,.8); }
.pt-login-body { padding: 28px 28px 22px; background: #fffaf3; }
.pt-login-body .form-label { font-weight: 600; color: var(--navy); font-size: 14px; }
