:root {
  /* Role State CFW Official Royal Cobalt & Obsidian Identity */
  --bg: #07090f;
  --bg-elev: #0b0f19;
  --bg-card: #101624;
  --bg-card-2: #161f33;
  --bg-input: #080c15;
  --border: rgba(148, 179, 255, 0.09);
  --border-strong: rgba(91, 140, 255, 0.24);
  --text: #f3f6fc;
  --muted: #8a99b8;
  --primary: #0139a2;
  --primary-hi: #2f6be0;
  --accent: #5b8cff;
  --accent-soft: rgba(47, 107, 224, 0.16);
  --green: #10b981;
  --green-soft: rgba(16, 185, 129, 0.14);
  --blue: #3b82f6;
  --blue-soft: rgba(59, 130, 246, 0.16);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.15);
  --red: #ef4444;
  --red-soft: rgba(239, 68, 68, 0.15);
  --purple: #8b5cf6;
  --purple-soft: rgba(139, 92, 246, 0.16);
  --radius: 16px;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.65);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(91, 140, 255, 0.22); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(91, 140, 255, 0.4); }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Cairo', 'Inter', system-ui, sans-serif;
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html[dir="ltr"] body { font-family: 'Inter', 'Cairo', system-ui, sans-serif; }
.hidden { display: none !important; }

/* Signature Role State Topographic Ambient Background */
.bg-topo {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image:
    radial-gradient(circle at 20% 0%, rgba(1, 57, 162, 0.28), transparent 52%),
    radial-gradient(circle at 85% 95%, rgba(47, 107, 224, 0.16), transparent 48%),
    linear-gradient(rgba(91, 140, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 140, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 44px 44px, 44px 44px;
  pointer-events: none;
}
.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(95px);
  pointer-events: none;
  z-index: -2;
  opacity: 0.42;
}
.orb-1 { width: 520px; height: 520px; top: -180px; inset-inline-start: -120px; background: #0139a2; }
.orb-2 { width: 420px; height: 420px; bottom: -160px; inset-inline-end: -100px; background: #1d4ed8; }

.lang-float { position: fixed; top: 22px; inset-inline-end: 24px; z-index: 60; }
.btn-glass { background: rgba(16, 22, 36, 0.72) !important; backdrop-filter: blur(12px); }

/* ─── AUTH / SPLIT HERO LOGIN ───────────────────────────── */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
}

.loading-box { text-align: center; }
.loading-box h2 { margin-top: 16px; font-size: 22px; font-weight: 900; }
.loading-box p { color: var(--muted); font-size: 14px; margin-top: 4px; }

.brand-ring {
  width: 96px;
  height: 96px;
  margin: 0 auto;
  border-radius: 50%;
  padding: 5px;
  background: linear-gradient(135deg, #5b8cff, #0139a2, #001845);
  box-shadow: 0 0 42px rgba(47, 107, 224, 0.48), 0 14px 36px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-ring.xl { width: 126px; height: 126px; }
.brand-ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #070b14;
}

.login-shell {
  width: 100%;
  max-width: 1020px;
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  background: rgba(12, 17, 28, 0.86);
  border: 1px solid var(--border-strong);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow), 0 0 80px rgba(1, 57, 162, 0.2);
  backdrop-filter: blur(22px);
}

.login-hero {
  padding: 36px 34px;
  background:
    radial-gradient(circle at 50% 25%, rgba(47, 107, 224, 0.25), transparent 64%),
    linear-gradient(160deg, rgba(1, 57, 162, 0.24) 0%, rgba(10, 14, 24, 0.94) 70%);
  border-inline-end: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}
.hero-top-badges { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.discord-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(88, 101, 242, 0.16);
  border: 1px solid rgba(88, 101, 242, 0.35);
  color: #a5b4fc;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.16s;
}
.discord-pill:hover { background: #5865f2; color: #fff; }

.hero-brand-center { text-align: center; padding: 8px 0; }
.hero-title {
  margin-top: 20px;
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 1.15;
}
.hero-title span {
  background: linear-gradient(135deg, #7aa8ff, #2f6be0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-tagline { margin-top: 8px; color: var(--muted); font-size: 14px; max-width: 380px; margin-inline: auto; }

.hero-features { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.feat-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 700;
  color: #dbe6ff;
}
.feat-pill i { color: var(--accent); font-size: 14px; width: 18px; text-align: center; }

.login-panel {
  padding: 42px 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  background: rgba(11, 15, 25, 0.72);
}
.panel-logo-mini { display: flex; align-items: center; gap: 13px; }
.panel-logo-mini img { width: 52px; height: 52px; border-radius: 14px; border: 1px solid var(--border-strong); box-shadow: 0 6px 20px rgba(1, 57, 162, 0.35); }
.panel-logo-mini strong { display: block; font-size: 20px; font-weight: 800; line-height: 1.25; }
.panel-logo-mini span { font-size: 12.5px; color: var(--accent); font-weight: 700; }

.auth-desc { color: var(--muted); font-size: 14px; line-height: 1.8; }
.fivem-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 15px 22px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2f6be0, #0139a2);
  border: 1px solid rgba(141, 176, 255, 0.45);
  color: #fff;
  font-weight: 800;
  font-size: 15.5px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s, box-shadow 0.2s, filter 0.16s;
  box-shadow: 0 12px 30px rgba(1, 57, 162, 0.45);
}
.fivem-btn:hover { transform: translateY(-2px); filter: brightness(1.1); box-shadow: 0 16px 38px rgba(47, 107, 224, 0.58); }
.fivem-ico {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.login-sec-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(47, 107, 224, 0.08);
  border: 1px solid rgba(91, 140, 255, 0.2);
  font-size: 12.5px;
  color: #a9c4ff;
}
.auth-err { background: var(--red-soft); border: 1px solid rgba(239,68,68,0.4); color: #fca5a5; padding: 11px 14px; border-radius: 12px; font-size: 13px; }

/* Denied card */
.denied-card {
  width: 100%;
  max-width: 460px;
  background: rgba(13, 18, 30, 0.94);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 24px;
  padding: 38px 32px;
  text-align: center;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}
.denied-top { position: relative; width: 92px; height: 92px; margin: 0 auto 20px; }
.denied-srv-logo { width: 92px; height: 92px; border-radius: 50%; border: 2px solid var(--border-strong); }
.denied-icon-badge {
  position: absolute;
  bottom: -2px;
  inset-inline-end: -2px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #dc2626;
  border: 3px solid #0d121e;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
}
.denied-card h1 { font-size: 24px; font-weight: 800; margin-bottom: 10px; color: #fca5a5; }
.user-pill-box { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,0.035); border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; margin: 18px 0 22px; text-align: start; }
.user-pill-box img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border-strong); }
.user-pill-box .uname { font-weight: 800; font-size: 15px; }
.user-pill-box .uid { font-size: 12px; color: var(--muted); font-family: monospace; }

/* ─── APP SHELL (ROLE STATE ROYAL BLUE) ─────────────────── */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 268px;
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(11, 15, 25, 0.98) 0%, rgba(8, 11, 18, 0.99) 100%);
  border-inline-end: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.side-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.side-logo-img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid rgba(91, 140, 255, 0.55);
  box-shadow: 0 0 18px rgba(47, 107, 224, 0.35);
  flex-shrink: 0;
}
.side-brand h2 { font-size: 16px; font-weight: 900; line-height: 1.2; }
.side-brand span { font-size: 11px; color: var(--accent); font-weight: 700; }

.nav-sec { font-size: 11px; font-weight: 800; color: #546484; text-transform: uppercase; letter-spacing: 0.7px; padding: 12px 12px 6px; }
.nav-list { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 13px;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  width: 100%;
  text-align: start;
  transition: all 0.16s ease;
}
.nav-item i { width: 18px; text-align: center; font-size: 14.5px; }
.nav-item:hover { background: rgba(91, 140, 255, 0.06); color: var(--text); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(1, 57, 162, 0.42), rgba(47, 107, 224, 0.14));
  color: #dbe8ff;
  border-color: rgba(91, 140, 255, 0.42);
  box-shadow: 0 4px 16px rgba(1, 57, 162, 0.25);
}
.nav-item.active i { color: #7aa8ff; }
.nav-badge { margin-inline-start: auto; background: rgba(91,140,255,0.16); color: #bfdbfe; font-size: 11px; padding: 2px 8px; border-radius: 999px; font-weight: 800; }
.nav-badge.hot { background: var(--red-soft); color: #fca5a5; }
.side-footer { padding-top: 14px; border-top: 1px solid var(--border); margin-top: 12px; }
.side-discord {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px;
  border-radius: 11px;
  background: rgba(88, 101, 242, 0.12);
  border: 1px solid rgba(88, 101, 242, 0.25);
  color: #a5b4fc;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 700;
}
.side-discord:hover { background: #5865f2; color: #fff; }

.main-area { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  background: rgba(11, 15, 25, 0.84);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  padding: 12px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 30;
  flex-wrap: wrap;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
  background: var(--green-soft);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.status-pill.offline { background: var(--red-soft); color: #fca5a5; border-color: rgba(239, 68, 68, 0.3); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.admin-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 12px 4px 6px;
  background: rgba(91, 140, 255, 0.08);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
}
.admin-chip img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.role-tag { font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 999px; background: linear-gradient(135deg, #2f6be0, #0139a2); color: #fff; }
.content { padding: 24px 26px; max-width: 1520px; width: 100%; margin: 0 auto; }

/* Dashboard Hero Welcome Banner */
.dash-hero {
  background:
    radial-gradient(circle at 12% 50%, rgba(47, 107, 224, 0.28), transparent 55%),
    linear-gradient(135deg, rgba(1, 57, 162, 0.28), rgba(16, 22, 36, 0.94));
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 22px 26px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
}
.dash-hero-left { display: flex; align-items: center; gap: 18px; }
.dash-hero-logo {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  border: 2px solid rgba(141, 176, 255, 0.65);
  box-shadow: 0 0 26px rgba(47, 107, 224, 0.45);
  flex-shrink: 0;
}
.dash-hero h2 { font-size: 22px; font-weight: 900; line-height: 1.25; }
.dash-hero p { font-size: 13.5px; color: #a9c4ff; margin-top: 2px; }

/* ─── BUTTONS, INPUTS, CARDS ────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 11px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card-2);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn:hover { background: #1e2a45; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-primary { background: linear-gradient(135deg, #2f6be0, #0139a2); border-color: rgba(141,176,255,0.4); color: #fff; box-shadow: 0 6px 18px rgba(1,57,162,0.34); }
.btn-primary:hover { filter: brightness(1.12); }
.btn-blue { background: var(--blue-soft); border-color: rgba(59,130,246,0.38); color: #93c5fd; }
.btn-blue:hover { background: var(--blue); color: #fff; }
.btn-amber { background: var(--amber-soft); border-color: rgba(245,158,11,0.38); color: #fcd34d; }
.btn-amber:hover { background: var(--amber); color: #1c1917; }
.btn-danger { background: var(--red-soft); border-color: rgba(239,68,68,0.38); color: #fca5a5; }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-sm { padding: 6px 11px; font-size: 12px; border-radius: 9px; }

.input, .select {
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  padding: 10px 13px;
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 107, 224, 0.2); }
.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-group label { font-size: 12px; font-weight: 700; color: var(--muted); }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(195px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card {
  background: linear-gradient(180deg, rgba(20, 28, 46, 0.9), rgba(13, 18, 30, 0.96));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color 0.2s, transform 0.2s;
}
.stat-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.stat-ico { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 19px; flex-shrink: 0; }
.stat-ico.green { background: var(--green-soft); color: #34d399; }
.stat-ico.blue { background: var(--blue-soft); color: #7aa8ff; }
.stat-ico.amber { background: var(--amber-soft); color: #fbbf24; }
.stat-ico.red { background: var(--red-soft); color: #f87171; }
.stat-ico.purple { background: var(--purple-soft); color: #c084fc; }
.stat-val { font-size: 23px; font-weight: 900; line-height: 1.15; }
.stat-lbl { font-size: 12px; color: var(--muted); margin-top: 2px; }

.card {
  background: linear-gradient(180deg, rgba(17, 23, 38, 0.92), rgba(12, 16, 28, 0.96));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h3 { font-size: 15.5px; font-weight: 800; display: flex; align-items: center; gap: 9px; }
.card-head h3 i { color: var(--accent); }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.row-flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-flex > .input, .row-flex > .select { flex: 1; min-width: 140px; }

.table-wrap { overflow-x: auto; border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 12px 13px; border-bottom: 1px solid var(--border); text-align: start; white-space: nowrap; }
th { color: #93a7ce; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; background: rgba(47, 107, 224, 0.06); }
tbody tr { transition: background 0.14s; }
tbody tr:hover td { background: rgba(91, 140, 255, 0.05); }

.char-cell { display: flex; align-items: center; gap: 11px; }
.char-avatar {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(1, 57, 162, 0.45), rgba(47, 107, 224, 0.25));
  border: 1px solid rgba(91, 140, 255, 0.45);
  color: #bfdbfe;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.badge-green { background: var(--green-soft); color: #34d399; }
.badge-red { background: var(--red-soft); color: #fca5a5; }
.badge-amber { background: var(--amber-soft); color: #fcd34d; }
.badge-blue { background: var(--blue-soft); color: #93c5fd; }
.badge-purple { background: var(--purple-soft); color: #d8b4fe; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--muted); }

/* ─── MODAL & CHARACTER INSPECTOR ───────────────────────── */
.modal-backdrop { position: fixed; inset: 0; background: rgba(3, 5, 11, 0.8); backdrop-filter: blur(8px); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 18px; }
.modal { background: #0c111d; border: 1px solid var(--border-strong); border-radius: 22px; width: 100%; max-width: 1040px; max-height: 92vh; overflow-y: auto; padding: 24px; box-shadow: var(--shadow); animation: modalPop 0.18s ease; }
.modal.small { max-width: 460px; }
@keyframes modalPop { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }

.profile-banner {
  background: linear-gradient(135deg, rgba(1, 57, 162, 0.3), rgba(47, 107, 224, 0.1));
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.profile-left { display: flex; align-items: center; gap: 15px; }
.profile-avatar-lg {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: linear-gradient(135deg, #2f6be0, #0139a2);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(1, 57, 162, 0.45);
}

.sub-tabs { display: flex; gap: 6px; background: var(--bg-input); padding: 6px; border-radius: 14px; border: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.sub-tab { flex: 1; min-width: 115px; padding: 9px 14px; border-radius: 10px; border: none; background: transparent; color: var(--muted); font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; transition: all 0.15s; }
.sub-tab:hover { color: var(--text); background: rgba(91,140,255,0.06); }
.sub-tab.active { background: linear-gradient(135deg, rgba(1,57,162,0.5), rgba(47,107,224,0.22)); color: #dbe8ff; box-shadow: inset 0 0 0 1px rgba(91,140,255,0.45); }

.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; }
.inv-slot { background: linear-gradient(180deg, #131b2d, #0d1322); border: 1px solid var(--border); border-radius: 14px; padding: 12px 10px 10px; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; transition: border-color 0.15s, transform 0.15s; }
.inv-slot:hover { border-color: rgba(91,140,255,0.55); transform: translateY(-2px); }
.inv-slot-num { position: absolute; top: 7px; inset-inline-start: 8px; font-size: 10px; font-weight: 800; color: #64748b; font-family: monospace; }
.inv-qty { position: absolute; top: 7px; inset-inline-end: 8px; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: var(--blue-soft); color: #93c5fd; }
.inv-img-box { width: 64px; height: 64px; margin: 14px 0 8px; display: flex; align-items: center; justify-content: center; }
.inv-img-box img { max-width: 60px; max-height: 60px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,0.55)); }
.inv-label { font-size: 12.5px; font-weight: 700; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-code { font-size: 10.5px; color: var(--muted); font-family: monospace; margin-bottom: 8px; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.action-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 8px; margin-bottom: 16px; }
.chat-box { height: 420px; overflow-y: auto; background: var(--bg-input); border: 1px solid var(--border); border-radius: 14px; padding: 14px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { background: var(--bg-card); border: 1px solid var(--border); padding: 10px 14px; border-radius: 12px; }
.chat-msg .sender { font-weight: 800; color: #7aa8ff; font-size: 13px; }
.chat-msg .time { font-size: 11px; color: var(--muted); margin-inline-start: 8px; }
.chat-msg .body { margin-top: 4px; font-size: 13.5px; white-space: pre-wrap; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; max-height: 240px; overflow-y: auto; background: var(--bg-input); padding: 12px; border-radius: 12px; border: 1px solid var(--border); margin: 10px 0; }
.perm-item { display: flex; align-items: center; gap: 7px; font-size: 12.5px; cursor: pointer; }
.schedule-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.sched-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px; border-radius: 999px; background: var(--blue-soft); border: 1px solid rgba(59,130,246,0.38); color: #93c5fd; font-weight: 800; font-size: 13.5px; font-family: monospace; }
.sched-chip button { background: transparent; border: none; color: #fca5a5; cursor: pointer; font-size: 14px; }
.console-pre { background: #06090f; border: 1px solid var(--border); border-radius: 12px; padding: 14px; height: 320px; overflow: auto; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.55; color: #cbd5e1; direction: ltr; text-align: left; white-space: pre-wrap; word-break: break-word; }

.toast-wrap { position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 12px 18px; border-radius: 12px; font-size: 13.5px; font-weight: 700; color: #fff; box-shadow: var(--shadow); animation: fadeUp 0.2s ease; display: flex; align-items: center; gap: 9px; }
.toast.ok { background: linear-gradient(135deg, #2f6be0, #0139a2); border: 1px solid rgba(141,176,255,0.35); }
.toast.err { background: linear-gradient(135deg, #ef4444, #b91c1c); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.mobile-menu-btn { display: none; }
@media (max-width: 960px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-hero { border-inline-end: none; border-bottom: 1px solid var(--border); }
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 60; transform: translateX(-105%); transition: transform 0.2s; }
  html[dir="rtl"] .sidebar { transform: translateX(105%); }
  .sidebar.open { transform: translateX(0) !important; }
  .mobile-menu-btn { display: inline-flex; }
}
