/* PNB-!Q Quantum Sci-Fi Theme — PHP Edition */
:root {
  --q-cyan: #22d3ee; --q-blue: #3b82f6; --q-purple: #a855f7;
  --q-pink: #ec4899; --q-green: #34d399; --q-amber: #fbbf24; --q-red: #f87171;
  --bg: #0a0a18; --card: rgba(20,12,40,0.65); --border: rgba(120,80,220,0.25);
  --fg: #f0f0ff; --muted: rgba(240,240,255,0.55);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg); color: var(--fg);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  min-height: 100vh; -webkit-font-smoothing: antialiased;
}
body {
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(80,50,180,0.30), transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 10%, rgba(40,90,200,0.25), transparent 60%),
    radial-gradient(ellipse 90% 70% at 50% 100%, rgba(150,60,200,0.22), transparent 60%);
  background-attachment: fixed;
}
.quantum-grid { position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image: linear-gradient(to right, rgba(80,120,220,0.07) 1px, transparent 1px), linear-gradient(to bottom, rgba(80,120,220,0.07) 1px, transparent 1px);
  background-size: 48px 48px; }
.orb { position: fixed; border-radius: 50%; filter: blur(60px); pointer-events: none; z-index: -1; opacity: 0.4; animation: floatOrb 14s ease-in-out infinite; }
.orb-1 { width: 280px; height: 280px; background: var(--q-cyan); top: 5%; left: 5%; }
.orb-2 { width: 360px; height: 360px; background: var(--q-purple); top: 50%; right: 5%; animation-delay: 3s; }
.orb-3 { width: 220px; height: 220px; background: var(--q-blue); bottom: 5%; left: 30%; animation-delay: 6s; }
@keyframes floatOrb { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(40px,-30px) scale(1.1); } 66% { transform: translate(-30px,25px) scale(0.95); } }

.container { max-width: 1500px; margin: 0 auto; padding: 20px; }

/* Header */
.brand-header { background: var(--card); backdrop-filter: blur(12px); border: 1px solid rgba(80,200,230,0.3); border-radius: 16px; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.brand-left { display: flex; align-items: center; gap: 14px; }
.pnb-logo-wrap { width: 60px; height: 60px; border-radius: 12px; overflow: hidden; background: white; padding: 4px; flex-shrink: 0; }
.pnb-logo { width: 100%; height: 100%; object-fit: contain; }
.pnb-logo-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg,#f5365e,#8b0a23); color: white; font-weight: 900; font-size: 16px; }
.brand-text { border-left: 1px solid rgba(255,255,255,0.15); padding-left: 14px; }
.brand-text h1 { font-size: 26px; font-weight: 700; color: white; }
.subtitle { font-size: 12px; color: rgba(150,220,240,0.7); font-family: monospace; margin-top: 2px; }
.accent-cyan { color: var(--q-cyan); }
.accent-pink { color: var(--q-pink); }
.accent-white { color: white; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.badge { padding: 5px 10px; border-radius: 999px; font-size: 11px; font-weight: 500; border: 1px solid; }
.badge-green { background: rgba(52,211,153,0.15); border-color: rgba(52,211,153,0.4); color: #6ee7b7; }
.badge-purple { background: rgba(168,85,247,0.15); border-color: rgba(168,85,247,0.4); color: #c4b5fd; }
.badge-cyan { background: rgba(34,211,238,0.15); border-color: rgba(34,211,238,0.4); color: #67e8f9; }
.badge-user { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1); color: white; display: flex; flex-direction: column; padding: 4px 10px; gap: 1px; }
.role-tag { font-size: 9px; color: rgba(34,211,238,0.7); }
.logout-btn { background: rgba(248,113,113,0.15); border: 1px solid rgba(248,113,113,0.3); color: #fca5a5; width: 24px; height: 24px; border-radius: 6px; cursor: pointer; text-decoration: none; display: flex; align-items: center; justify-content: center; font-size: 14px; margin-left: 4px; }
.logout-btn:hover { background: rgba(248,113,113,0.3); }

.banner { margin-top: 12px; padding: 8px 16px; border-radius: 8px; background: linear-gradient(to right, rgba(251,146,60,0.10), rgba(255,255,255,0.05), rgba(52,211,153,0.10)); border: 1px solid rgba(255,255,255,0.1); text-align: center; font-size: 12px; color: rgba(255,255,255,0.75); }
.banner .orange { color: #fdba74; }
.banner .green { color: #6ee7b7; }
.role-notice { margin-top: 12px; padding: 10px 16px; border-radius: 8px; background: rgba(34,211,238,0.10); border: 1px solid rgba(34,211,238,0.30); color: rgba(150,220,240,0.8); font-size: 12px; }

/* KPI */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-top: 16px; }
.kpi-card { background: var(--card); backdrop-filter: blur(12px); border: 1px solid; border-radius: 12px; padding: 14px; display: flex; justify-content: space-between; align-items: flex-start; }
.kpi-card.cyan { border-color: rgba(34,211,238,0.4); background: rgba(34,211,238,0.08); }
.kpi-card.red { border-color: rgba(248,113,113,0.4); background: rgba(248,113,113,0.08); }
.kpi-card.purple { border-color: rgba(168,85,247,0.4); background: rgba(168,85,247,0.08); }
.kpi-card.amber { border-color: rgba(251,191,36,0.4); background: rgba(251,191,36,0.08); }
.kpi-label { font-size: 10px; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 0.5px; }
.kpi-value { font-size: 28px; font-weight: 700; margin-top: 2px; }
.kpi-sub { font-size: 10px; color: rgba(255,255,255,0.5); margin-top: 2px; }
.kpi-icon { opacity: 0.8; font-size: 18px; }

/* Tabs */
.tab-list { display: flex; flex-wrap: wrap; gap: 6px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 6px; margin-top: 16px; }
.tab-btn { flex: 1; min-width: 80px; padding: 10px 6px; border-radius: 8px; border: none; cursor: pointer; background: transparent; color: rgba(255,255,255,0.6); display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 10px; font-weight: 500; font-family: inherit; transition: all 0.15s; }
.tab-btn:hover { color: rgba(255,255,255,0.9); }
.tab-icon { font-size: 18px; }
.tab-btn.active { background: rgba(34,211,238,0.2); color: #67e8f9; }
.tab-content { display: none; margin-top: 16px; }
.tab-content.active { display: block; }

/* Card */
.card { background: var(--card); backdrop-filter: blur(12px); border: 1px solid var(--border); border-radius: 14px; padding: 18px; margin-bottom: 16px; }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 600; margin: 0 0 12px; }
.tag { padding: 2px 8px; border-radius: 4px; font-size: 10px; background: rgba(34,211,238,0.15); color: var(--q-cyan); border: 1px solid rgba(34,211,238,0.3); font-family: monospace; }

/* Form */
label { display: block; font-size: 12px; color: rgba(255,255,255,0.7); margin-bottom: 6px; font-weight: 500; }
input[type="text"], input[type="number"], input[type="email"], input[type="password"], textarea, select {
  width: 100%; background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.15); color: white; padding: 10px 12px; border-radius: 8px; font-family: 'Menlo', monospace; font-size: 13px; outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--q-cyan); }
textarea { resize: vertical; font-family: inherit; }
select { font-family: inherit; cursor: pointer; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border-radius: 8px; border: none; cursor: pointer; font-size: 13px; font-weight: 600; color: white; font-family: inherit; }
.btn-primary { background: linear-gradient(to right, var(--q-cyan), var(--q-blue)); }
.btn-purple { background: linear-gradient(to right, var(--q-purple), var(--q-pink)); }
.btn-red { background: linear-gradient(to right, #ef4444, var(--q-purple)); }
.btn-green { background: linear-gradient(to right, var(--q-green), var(--q-cyan)); }
.btn-ghost { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.15); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 11px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 768px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* Pills */
.pill { display: inline-flex; padding: 3px 8px; border-radius: 4px; font-size: 10px; font-family: monospace; font-weight: 600; border: 1px solid; }
.pill.ok { background: rgba(52,211,153,0.15); border-color: rgba(52,211,153,0.4); color: #6ee7b7; }
.pill.warn { background: rgba(251,191,36,0.15); border-color: rgba(251,191,36,0.4); color: #fcd34d; }
.pill.bad { background: rgba(248,113,113,0.15); border-color: rgba(248,113,113,0.4); color: #fca5a5; }
.pill.info { background: rgba(34,211,238,0.15); border-color: rgba(34,211,238,0.4); color: #67e8f9; }
.pill.purple { background: rgba(168,85,247,0.15); border-color: rgba(168,85,247,0.4); color: #c4b5fd; }

/* Result items */
.result-list { max-height: 400px; overflow-y: auto; padding-right: 4px; }
.result-item { padding: 10px 12px; border-radius: 8px; border: 1px solid; margin-bottom: 6px; font-size: 12px; }
.result-item.critical { background: rgba(248,113,113,0.10); border-color: rgba(248,113,113,0.30); }
.result-item.warn { background: rgba(251,191,36,0.10); border-color: rgba(251,191,36,0.30); }
.result-item.info { background: rgba(34,211,238,0.10); border-color: rgba(34,211,238,0.30); }
.result-item.ok { background: rgba(52,211,153,0.10); border-color: rgba(52,211,153,0.30); }

/* Empty */
.empty { text-align: center; padding: 36px 20px; color: rgba(255,255,255,0.4); }
.empty .title { font-size: 14px; margin-bottom: 4px; }
.empty .sub { font-size: 12px; }

/* Note */
.note { padding: 12px 16px; border-radius: 10px; margin-top: 16px; background: rgba(251,191,36,0.05); border: 1px solid rgba(251,191,36,0.2); font-size: 12px; color: rgba(255,255,255,0.7); }
.note .head { font-weight: 600; color: var(--q-amber); margin-bottom: 4px; }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.6); font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; padding: 10px 12px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.1); }
.data-table td { padding: 10px 12px; font-size: 12px; border-bottom: 1px solid rgba(255,255,255,0.05); color: rgba(255,255,255,0.8); }
.data-table tr:hover td { background: rgba(255,255,255,0.03); }

/* Footer */
.site-footer { margin-top: 32px; padding: 14px 0; border-top: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.4); text-align: center; font-size: 10px; color: rgba(255,255,255,0.4); font-family: monospace; }
.site-footer div { margin: 2px 0; }
.site-footer .orange { color: #fdba74; }
.site-footer .green { color: #6ee7b7; }

/* ============ Login page ============ */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.login-bg { position: fixed; inset: 0; z-index: -1; }
.login-card { position: relative; width: 100%; max-width: 400px; background: var(--card); backdrop-filter: blur(12px); border: 1px solid rgba(80,200,230,0.3); border-radius: 16px; padding: 32px; box-shadow: 0 0 40px rgba(34,211,238,0.2); }
.login-logo { width: 80px; height: 80px; margin: 0 auto 16px; border-radius: 16px; overflow: hidden; background: white; padding: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.login-logo img { width: 100%; height: 100%; object-fit: contain; }
.login-logo-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg,#f5365e,#8b0a23); color: white; font-weight: 900; font-size: 20px; border-radius: 8px; }
.login-title { text-align: center; font-size: 32px; font-weight: 700; margin-bottom: 4px; }
.login-subtitle { text-align: center; font-size: 12px; color: rgba(150,220,240,0.7); font-family: monospace; margin-bottom: 12px; }
.login-badge { text-align: center; padding: 4px 12px; border-radius: 999px; background: rgba(52,211,153,0.15); border: 1px solid rgba(52,211,153,0.4); color: #6ee7b7; font-size: 10px; font-weight: 500; margin-bottom: 24px; }
.login-form { display: flex; flex-direction: column; gap: 12px; }
.input-wrap { position: relative; }
.input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 14px; opacity: 0.6; }
.input-wrap input { padding-left: 36px; }
.login-form button { padding: 12px; background: linear-gradient(to right, var(--q-cyan), var(--q-blue)); color: white; border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; margin-top: 8px; }
.login-form button:hover { opacity: 0.9; }
.login-error { padding: 10px; border-radius: 8px; background: rgba(248,113,113,0.15); border: 1px solid rgba(248,113,113,0.4); color: #fca5a5; font-size: 12px; margin-bottom: 16px; }
.demo-accounts { margin-top: 24px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.1); }
.demo-accounts p { text-align: center; font-size: 10px; color: rgba(255,255,255,0.5); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; font-family: monospace; }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.demo-grid button { padding: 8px; border-radius: 6px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.7); font-size: 10px; cursor: pointer; font-family: inherit; }
.demo-grid button:hover { background: rgba(34,211,238,0.15); border-color: rgba(34,211,238,0.3); color: #67e8f9; }
.demo-note { text-align: center; font-size: 9px; color: rgba(255,255,255,0.3); margin-top: 8px; font-family: monospace; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(10,10,24,0.5); }
::-webkit-scrollbar-thumb { background: linear-gradient(rgba(80,120,220,0.6), rgba(120,80,220,0.6)); border-radius: 4px; }
