/* Global City Dammam - Access ID System - v5 visual design
   Brand: Global City logo colors - blue primary + multicolor dot accents */
:root {
  --blue: #2e67b1;
  --blue-dark: #235089;
  --ink: #1c2430;
  --muted: #6b7280;
  --bg: #f5f7fb;
  --card: #ffffff;
  --line: #e6eaf1;
  --red: #e23a3a; --orange: #f58220; --pink: #e0398e;
  --purple: #8e44ad; --green: #3da749; --sky: #3aa0db;
  --brandbar: linear-gradient(90deg, var(--red), var(--orange), var(--pink),
                              var(--purple), var(--blue), var(--green));
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 4px 16px rgba(16,24,40,.06);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", -apple-system, Arial, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 15px; }

/* ---------- header ---------- */
.topbar { background: #fff; display: flex; align-items: center; gap: 20px;
  justify-content: space-between; padding: 10px 26px; flex-wrap: wrap;
  border-bottom: 4px solid transparent;
  border-image: var(--brandbar) 1; box-shadow: 0 1px 3px rgba(16,24,40,.06); }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700;
  font-size: 16px; color: var(--ink); }
.brand img.logoimg { height: 38px; width: auto; }
.brand .tag { font-weight: 500; color: var(--muted); font-size: 12.5px;
  border-left: 1px solid var(--line); padding-left: 12px;
  text-transform: uppercase; letter-spacing: .08em; }
.topbar nav { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.topbar nav a { color: #33455c; text-decoration: none; font-size: 14px;
  padding: 8px 14px; border-radius: 10px; font-weight: 600;
  background: linear-gradient(180deg, #ffffff, #edf1f7);
  border: 1px solid #d5dde8;
  box-shadow: 0 2px 0 #c9d3e0, 0 3px 6px rgba(16,24,40,.07);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.topbar nav a:hover { transform: translateY(-2px); color: var(--blue-dark);
  background: linear-gradient(180deg, #ffffff, #e2ecfa);
  box-shadow: 0 4px 0 #c9d3e0, 0 8px 16px rgba(46,103,177,.22); }
.topbar nav a:active { transform: translateY(1px);
  box-shadow: 0 1px 0 #c9d3e0, 0 2px 4px rgba(16,24,40,.1); }
.topbar .who { color: var(--muted); font-size: 13px; padding: 0 8px; }
.topbar .logout { color: #b3261e; border-color: #f0cfcf;
  background: linear-gradient(180deg, #ffffff, #fbeeee);
  box-shadow: 0 2px 0 #e4c4c4, 0 3px 6px rgba(16,24,40,.07); }
.topbar .logout:hover { color: #8f1d16; background: linear-gradient(180deg, #ffffff, #f8e3e3);
  box-shadow: 0 4px 0 #e4c4c4, 0 8px 16px rgba(226,58,58,.2); }

main { max-width: 1180px; margin: 26px auto; padding: 0 18px; }

/* ---------- flash ---------- */
.flash { padding: 11px 16px; border-radius: 10px; margin-bottom: 16px;
  font-size: 14px; box-shadow: var(--shadow); }
.flash.ok { background: #e8f7ee; color: #14532d; border: 1px solid #b7e4c7; }
.flash.error { background: #fdeaea; color: #7f1d1d; border: 1px solid #f5b5b5; }

/* ---------- stat cards ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px; margin-bottom: 20px; }
.stat { background: var(--card); border-radius: 14px; padding: 14px 18px;
  box-shadow: var(--shadow); border-top: 3px solid var(--blue); }
.stat .num { font-size: 26px; font-weight: 700; line-height: 1.1; }
.stat .lbl { color: var(--muted); font-size: 13px; margin-top: 2px; }
.stat.total { border-top-color: var(--purple); }
.stat.office-staff { border-top-color: var(--green); }
.stat.pavilion { border-top-color: var(--blue); }
.stat.exhibitor { border-top-color: var(--orange); }

/* ---------- toolbar ---------- */
.toolbar { display: flex; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.search { display: flex; gap: 8px; flex-wrap: wrap; }
.search input { width: 240px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

input, select { padding: 9px 12px; border: 1px solid #cdd6e1; border-radius: 9px;
  font-size: 14px; background: #fff; color: var(--ink); }
input:focus, select:focus { outline: 2px solid #bcd3ef; border-color: var(--blue); }
label { display: block; margin-bottom: 13px; font-size: 13.5px; font-weight: 600;
  color: #33404f; }
label input, label select { display: block; width: 100%; margin-top: 5px; font-weight: 400; }

.btn { display: inline-block; padding: 9px 15px; border-radius: 9px;
  border: 1px solid #cdd6e1; background: #fff; color: var(--ink); font-size: 14px;
  cursor: pointer; text-decoration: none; font-weight: 500; }
.btn:hover { background: #f0f4fa; border-color: #b7c4d4; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-dark); }
.btn.danger { color: #b91c1c; border-color: #f1c1c1; }
.btn.danger:hover { background: #fdecec; }
.btn.small { padding: 5px 11px; font-size: 13px; }
.btn.wide { width: 100%; }

/* ---------- table ---------- */
table.people { width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--card); border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow); }
table.people th { background: #f2f5fa; text-align: left; padding: 11px 14px;
  font-size: 12.5px; color: #55637a; text-transform: uppercase;
  letter-spacing: .05em; border-bottom: 1px solid var(--line); }
table.people td { padding: 10px 14px; border-bottom: 1px solid #f0f3f8;
  font-size: 14px; vertical-align: middle; }
table.people tr:last-child td { border-bottom: none; }
table.people tbody tr:hover td, table.people tr:hover td { background: #f8fafd; }
.thumb { width: 44px; height: 52px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--line); }
.nophoto { color: #9ca3af; }
.mono { font-family: Consolas, "Cascadia Mono", monospace; font-size: 13px; }
.muted { color: var(--muted); font-weight: 400; }
.center { text-align: center; }
.rowactions { white-space: nowrap; }
.small-note { font-size: 12px; }

.badge { padding: 4px 11px; border-radius: 20px; font-size: 12px;
  font-weight: 600; color: #fff; white-space: nowrap; }
.badge.exhibitor { background: var(--orange); }
.badge.pavilion { background: var(--blue); }
.badge.office-staff { background: var(--green); }

/* ---------- status ---------- */
.statusform select { padding: 5px 8px; font-size: 13px; border-radius: 14px;
  font-weight: 600; border: 1px solid transparent; }
.statusbadge { padding: 4px 11px; border-radius: 14px; font-size: 12px; font-weight: 600; }
.status-active { background: #e3f6ea; color: #14532d; }
.status-canceled { background: #e8eaee; color: #374151; }
.status-terminated { background: #ffedd5; color: #9a3412; }
.status-banned { background: #fde3e3; color: #991b1b; }
tr.inactive td { opacity: .55; }

/* ---------- quota ---------- */
.quotabar { width: 150px; height: 8px; background: #e8ecf2; border-radius: 6px; margin-top: 5px; }
.quotafill { height: 8px; border-radius: 6px; background: var(--green); max-width: 100%; }
.quotafill.full { background: var(--red); }
.quota-full { color: var(--red); font-weight: 700; }

/* ---------- boxes / forms ---------- */
.inlineform { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.form-box { background: var(--card); border-radius: 16px; padding: 30px;
  box-shadow: var(--shadow); max-width: 580px; margin: 0 auto; }
.form-box.narrow { max-width: 400px; }
.form-box.wide-box { max-width: 960px; }
h1 { font-size: 21px; margin: 0 0 14px; }
h2 { font-size: 16px; margin: 24px 0 10px; }

/* ---------- login ---------- */
body.loginpage { display: flex; min-height: 100vh; background: var(--bg); }
body.loginpage main { display: flex; max-width: none; width: 100%; margin: 0; padding: 0; }
.login-split { display: flex; width: 100%; min-height: 100vh; }
.login-visual { flex: 1.2; background:
  linear-gradient(140deg, rgba(20,35,60,.82), rgba(46,103,177,.62)),
  url('gate.jpg') center/cover no-repeat,
  linear-gradient(140deg, #16283f, #2e67b1);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 48px; color: #fff; }
.login-visual h2 { font-size: 30px; margin: 0 0 8px; line-height: 1.2; }
.login-visual p { margin: 0; opacity: .85; font-size: 15px; }
.login-visual .dots { display: flex; gap: 7px; margin-bottom: 18px; }
.login-visual .dots span { width: 11px; height: 11px; border-radius: 50%; display: block; }
.login-panel { width: 420px; background: #fff; display: flex; flex-direction: column;
  justify-content: center; padding: 48px 44px; box-shadow: -6px 0 24px rgba(16,24,40,.08); }
.login-panel img.logoimg { height: 56px; width: auto; align-self: flex-start;
  margin-bottom: 10px; }
.login-panel h1 { margin: 0 0 2px; font-size: 22px; }
.login-panel .sub { color: var(--muted); margin: 0 0 26px; font-size: 14px; }
@media (max-width: 820px) {
  .login-visual { display: none; }
  .login-panel { width: 100%; }
}

/* v6: requests + issued */
.navcount { background: var(--red); color: #fff; border-radius: 10px; padding: 1px 7px;
  font-size: 11.5px; font-weight: 700; margin-left: 3px; }
.issuedtag { background: #e3f6ea; color: #14532d; border: 1px solid #b7e4c7;
  border-radius: 14px; padding: 4px 10px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.issuedtag:disabled { cursor: default; }

.badge.fb-exhibitor { background: var(--pink); }
.stat.fb-exhibitor { border-top-color: var(--pink); }

/* ---------- responsive: tablet & mobile ---------- */
@media (max-width: 1024px) {
  main { margin: 18px auto; padding: 0 12px; }
  table.people { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table.people td, table.people th { white-space: nowrap; }
}
@media (max-width: 700px) {
  .topbar { padding: 8px 12px; gap: 10px; }
  .brand img.logoimg { height: 30px; }
  .brand .tag { display: none; }
  .topbar nav { gap: 5px; }
  .topbar nav a { padding: 7px 10px; font-size: 13px; }
  .topbar .who { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat { padding: 11px 14px; }
  .stat .num { font-size: 21px; }
  .toolbar, .search, .actions { width: 100%; }
  .search input { width: 100%; flex: 1 1 100%; }
  .search select { flex: 1 1 45%; }
  .search .btn { flex: 1 1 100%; }
  .actions .btn { flex: 1 1 100%; text-align: center; }
  .actions form { flex: 1 1 100%; }
  .actions form .btn { width: 100%; }
  .form-box { padding: 18px; border-radius: 12px; }
  .inlineform label { min-width: 100% !important; flex: 1 1 100%; }
  .inlineform input[type=file] { width: 100%; }
  .login-panel { padding: 32px 22px; }
  h1 { font-size: 19px; }
}
