:root {
  --bg: #0c1426; --card: #14203a; --card-2: #1c2c4d;
  --text: #eaf0fb; --muted: #93a3c2;
  --primary: #3274B9; --primary-2: #285e98; --navy: #343C5B; --accent: #80A8D2;
  --green: #16a34a; --amber: #b8860b; --red: #dc2626; --border: #28385c;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; }
a { color: inherit; }
h1, h2, h3 { font-family: 'Poppins', sans-serif; }

.topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 24px; background: #11203c; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { display: inline-flex; width: 30px; height: 30px; border-radius: 8px; background: var(--primary); color: #fff; align-items: center; justify-content: center; font-family: 'Poppins', sans-serif; font-weight: 700; }
.brand-name { font-family: 'Poppins', sans-serif; font-size: 18px; color: #fff; }
.topbar nav a { margin-left: 18px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; }
.topbar nav a:hover { color: var(--accent); }

.container { max-width: 1000px; margin: 0 auto; padding: 26px 20px 60px; }
.footer { text-align: center; color: var(--muted); font-size: 13px; padding: 30px; }

h1 { font-size: 28px; margin: 0 0 6px; }
h2 { font-size: 20px; }
.muted { color: var(--muted); }

.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.flash.error { background: #3a1620; color: #ffb4c0; border: 1px solid #5e2030; }
.flash.success { background: #14301f; color: #9be8b8; border: 1px solid #1f5236; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 22px 0; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px; }
.stat .label { color: var(--muted); font-size: 13px; }
.stat .value { font-size: 30px; font-weight: 700; font-family: 'Poppins', sans-serif; margin-top: 4px; }
.stat.available .value { color: #5ee0a0; }
.stat.out .value { color: var(--accent); }
.stat.repair .value { color: #f0c060; }

.panel { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 22px; margin-top: 22px; }
.row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

label { display: block; font-size: 14px; margin: 14px 0 6px; color: var(--muted); }
input, select, textarea { width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--border); background: var(--card-2); color: var(--text); font-size: 15px; }
textarea { min-height: 80px; resize: vertical; }

.btn { display: inline-block; background: var(--primary); color: #fff; border: none; padding: 12px 20px; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; text-align: center; }
.btn:hover { background: var(--primary-2); }
.btn.secondary { background: var(--card-2); border: 1px solid var(--border); }
.btn.green { background: var(--green); }
.btn.amber { background: var(--amber); }
.btn.danger { background: var(--red); }
.btn.sm { padding: 7px 12px; font-size: 13px; }

table { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; }

.tag { padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.tag.available { background: #14301f; color: #9be8b8; }
.tag.out { background: #16244a; color: var(--accent); }
.tag.repair { background: #332a12; color: #f0d18a; }
.tag.lost { background: #3a1620; color: #ffb4c0; }
.tag.overdue { background: #3a1620; color: #ffb4c0; }

.qr-box { text-align: center; }
.qr-box img { width: 180px; height: 180px; background: #fff; border-radius: 12px; padding: 8px; }

.login-wrap { max-width: 360px; margin: 60px auto; }

/* ---- ADESIS BADGES ---- */
.tag { display:inline-block; padding:2px 9px; border-radius:999px; font-size:12px; font-weight:600; }
.tag.granted, .tag.ok { background:#14301f; color:#9be8b8; border:1px solid #1f5236; }
.tag.denied { background:#3a1620; color:#ffb4c0; border:1px solid #5e2030; }
.tag.zone { background:var(--card-2); color:var(--accent); border:1px solid var(--border); margin:2px; }

.gate-result { border-radius:16px; padding:28px 20px; text-align:center; margin:16px 0; transition:all .15s; }
.gate-result.idle { background:var(--card); border:1px dashed var(--border); color:var(--muted); }
.gate-result.granted { background:#0f3d23; border:2px solid #1f8a4d; }
.gate-result.denied { background:#3d1320; border:2px solid #c0334d; }
.gate-result .verdict { font-family:'Poppins',sans-serif; font-size:40px; font-weight:700; letter-spacing:1px; }
.gate-result.granted .verdict { color:#54e08e; }
.gate-result.denied .verdict { color:#ff6b85; }
.gate-result .who { font-size:22px; font-weight:700; margin-top:6px; }
.gate-result .meta { color:var(--muted); margin-top:4px; }

.badge-card { max-width:360px; margin:24px auto; background:#fff; color:#1f2430; border-radius:16px; overflow:hidden; box-shadow:0 8px 30px rgba(0,0,0,.4); }
.badge-card .head { background:var(--navy); color:#fff; padding:16px 20px; }
.badge-card .body { padding:22px; text-align:center; }
.badge-card .qr { width:240px; height:240px; }
.badge-card .name { font-size:22px; font-weight:700; margin:12px 0 2px; }
.badge-card .cat { display:inline-block; padding:4px 14px; border-radius:999px; background:#e6f1fb; color:#185fa5; font-weight:700; font-size:14px; }
