/* ADIBOT Admin Control Center — Premium Obsidian Glass Design System */
:root {
  --bg: #050811;
  --bg-elevated: #0b1020;
  --panel: rgba(15, 21, 38, 0.78);
  --panel-solid: #0f1526;
  --panel-hover: rgba(21, 30, 52, 0.88);
  --surface: rgba(8, 12, 24, 0.72);
  --line: rgba(148, 163, 184, 0.14);
  --line-strong: rgba(148, 163, 184, 0.24);
  --text: #eef2ff;
  --text-soft: #cbd5e1;
  --muted: #8b98b5;
  --accent: #38bdf8;
  --accent-indigo: #6366f1;
  --accent-violet: #a855f7;
  --good: #34d399;
  --warn: #fbbf24;
  --bad: #fb7185;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 14px 36px rgba(0, 0, 0, 0.42);
  --shadow-lg: 0 28px 70px rgba(0, 0, 0, 0.65);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.2s ease, transform 0.16s ease, filter 0.18s ease, opacity 0.18s ease;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(900px 520px at 12% -6%, rgba(56, 189, 248, 0.11), transparent 62%),
    radial-gradient(760px 520px at 92% 4%, rgba(99, 102, 241, 0.12), transparent 60%),
    radial-gradient(680px 460px at 60% 105%, rgba(168, 85, 247, 0.08), transparent 65%),
    var(--bg);
}

h1, h2, h3, .title, .kpi, .brand {
  font-family: 'Sora', 'Inter', ui-sans-serif, system-ui, sans-serif;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
::selection { background: rgba(56, 189, 248, 0.28); color: #fff; }

/* Custom Scrollbars (Firefox + Chromium/Safari) */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.32) rgba(8, 12, 24, 0.45);
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(8, 12, 24, 0.45); border-radius: 999px; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.38), rgba(99, 102, 241, 0.42));
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.72), rgba(129, 140, 248, 0.78));
  background-clip: padding-box;
}
::-webkit-scrollbar-corner { background: transparent; }

/* Custom Styled Checkboxes / Ticks */
input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  display: inline-grid;
  place-content: center;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px;
  margin: 0;
  border-radius: 6px;
  border: 1.5px solid rgba(148, 163, 184, 0.38);
  background: rgba(6, 10, 22, 0.9);
  cursor: pointer;
  vertical-align: middle;
  flex-shrink: 0;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.45);
}
input[type="checkbox"]:hover:not(:disabled) {
  border-color: rgba(56, 189, 248, 0.75);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.14);
}
input[type="checkbox"]:focus-visible {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.28);
}
input[type="checkbox"]:checked {
  border-color: rgba(125, 211, 252, 0.75);
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.35);
}
input[type="checkbox"]:checked::after {
  content: "";
  width: 10px;
  height: 10px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23ffffff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5l3.2 3.2L13 4.8'/%3E%3C/svg%3E");
}
input[type="checkbox"]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -40% 0; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bootPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(56, 189, 248, 0)); }
  50% { transform: scale(1.05); filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.45)); }
}

/* App Shell & Sidebar */
.shell {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.side {
  flex-shrink: 0 !important;
  width: 256px !important;
  min-width: 256px !important;
  max-width: 256px !important;
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  padding: 20px 14px 16px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(10, 15, 29, 0.94) 0%, rgba(7, 10, 20, 0.97) 100%);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}

.brand, .side-foot, .side > .btn { flex-shrink: 0; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 18px;
  margin-bottom: 10px;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: #f8fafc;
  border-bottom: 1px solid var(--line);
}

.brand-logo {
  height: 30px;
  width: auto;
  filter: drop-shadow(0 4px 12px rgba(56, 189, 248, 0.28));
}

.brand span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.28);
  color: #7dd3fc;
}

nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

nav button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  text-align: left;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
}

nav button::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #38bdf8, #818cf8);
  transform: scaleY(0);
  transition: transform 0.18s ease;
}

nav button:hover {
  background: rgba(148, 163, 184, 0.08);
  color: #f1f5f9;
}

nav button.active {
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.15), rgba(99, 102, 241, 0.08));
  border-color: rgba(56, 189, 248, 0.22);
  color: #f8fafc;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

nav button.active::before { transform: scaleY(1); }

.side-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
  padding: 12px 10px 10px;
  margin-top: 8px;
  border-top: 1px solid var(--line);
}

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--good);
  animation: pulseDot 2.4s ease-in-out infinite;
}

#signout {
  margin-top: 4px;
  border-color: rgba(148, 163, 184, 0.16);
  color: #cbd5e1;
  font-weight: 600;
  font-size: 13px;
}
#signout:hover {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.35);
  color: #fda4af;
}

/* Main Content & Top Header */
.main {
  flex: 1 !important;
  min-width: 0 !important;
  padding: 24px 28px 64px;
  max-width: 1680px;
  margin: 0 auto;
  width: 100%;
}

.top {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  margin-bottom: 22px;
  border-radius: var(--radius-lg);
  background: rgba(12, 18, 34, 0.72);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.eyebrow {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 2px;
}

.title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #f8fafc;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.28);
  color: #6ee7b7;
}

.subnav-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 5px;
  margin: -10px 0 18px;
  border-radius: 12px;
  background: rgba(10, 15, 29, 0.72);
  border: 1px solid var(--line);
  width: fit-content;
  max-width: 100%;
}
.subnav-pill {
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
}
.subnav-pill:hover { color: #f1f5f9; background: rgba(148, 163, 184, 0.08); }
.subnav-pill.active {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.85), rgba(79, 70, 229, 0.85));
  border-color: rgba(125, 211, 252, 0.35);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}

.ops-top-btn {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.22), rgba(99, 102, 241, 0.24)) !important;
  border-color: rgba(56, 189, 248, 0.42) !important;
  color: #bae6fd !important;
  font-weight: 700 !important;
}
.ops-top-btn:hover {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.36), rgba(99, 102, 241, 0.38)) !important;
  border-color: #7dd3fc !important;
  color: #fff !important;
}

.nav-badge-slot { display: inline-flex; align-items: center; margin-left: 6px; }
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #e11d48, #f43f5e);
  box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.55);
  animation: badgePulse 2s ease-in-out infinite;
}
.nav-badge.warn {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.55);
  animation: badgePulseWarn 2s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(244, 63, 94, 0); }
}
@keyframes badgePulseWarn {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
}

#content { animation: fadeUp 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both; }

.muted { color: var(--muted); }
.small { font-size: 12px; }

/* Cards & KPI Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 4px;
}

.card {
  background: linear-gradient(165deg, rgba(16, 23, 42, 0.86), rgba(10, 14, 27, 0.9));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  margin-bottom: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.card:hover {
  border-color: rgba(148, 163, 184, 0.24);
}

.kpis .card {
  position: relative;
  min-height: 110px;
  overflow: hidden;
  background: linear-gradient(155deg, rgba(18, 26, 48, 0.9), rgba(10, 15, 29, 0.94));
}

.kpis .card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.45), rgba(129, 140, 248, 0.45), transparent);
  pointer-events: none;
}

.kpis .card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.34);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(56, 189, 248, 0.14);
}

.kpi {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, #f8fafc 30%, #93c5fd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.card.commercial {
  position: relative;
  border-color: rgba(99, 102, 241, 0.32);
  background: linear-gradient(155deg, rgba(20, 26, 52, 0.9), rgba(12, 14, 30, 0.94));
}

/* Status Badges */
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #cbd5e1;
  white-space: nowrap;
}

.status.good {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(52, 211, 153, 0.32);
  color: #6ee7b7;
}

.status.warn {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(251, 191, 36, 0.32);
  color: #fcd34d;
}

.status.bad {
  background: rgba(244, 63, 94, 0.14);
  border-color: rgba(251, 113, 133, 0.32);
  color: #fda4af;
}

/* Inputs, Toolbars & Buttons */
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 0 16px;
}

.input, select, select.input, textarea.input {
  background: rgba(6, 10, 22, 0.88);
  border: 1px solid var(--line-strong);
  color: #f8fafc;
  border-radius: 10px;
  padding: 10px 13px;
  min-width: 240px;
  font-size: 13.5px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}

/* Custom Styled Dropdown Selectors */
select, select.input {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 38px !important;
  cursor: pointer;
  background-color: rgba(8, 13, 28, 0.92);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%237dd3fc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
}
select:hover:not(:disabled), select.input:hover:not(:disabled) {
  border-color: rgba(56, 189, 248, 0.55);
  background-color: rgba(12, 19, 38, 0.96);
}
select option, select.input option {
  background: #0b1120;
  color: #f1f5f9;
  padding: 8px 12px;
}

.input::placeholder, textarea.input::placeholder { color: #64748b; }

.input:focus, select:focus, select.input:focus, textarea.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18), inset 0 1px 2px rgba(0, 0, 0, 0.35);
}

.input.full {
  width: 100%;
  min-width: 0;
  margin: 8px 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line-strong);
  background: rgba(30, 41, 59, 0.78);
  color: #e2e8f0;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.btn.small {
  padding: 6px 11px;
  font-size: 12px;
  border-radius: 8px;
}

.btn:hover:not(:disabled) {
  background: rgba(44, 58, 84, 0.92);
  border-color: rgba(148, 163, 184, 0.38);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
  filter: brightness(0.96);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn.primary {
  background: linear-gradient(135deg, #0284c7, #4f46e5);
  border-color: rgba(125, 211, 252, 0.35);
  color: #fff;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  border-color: rgba(125, 211, 252, 0.55);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.btn.danger {
  background: rgba(190, 18, 60, 0.22);
  border-color: rgba(244, 63, 94, 0.42);
  color: #fda4af;
}

.btn.danger:hover:not(:disabled) {
  background: rgba(225, 29, 72, 0.34);
  border-color: rgba(251, 113, 133, 0.65);
  color: #fff;
}

.btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: #cbd5e1;
}

.btn.ghost:hover:not(:disabled) {
  background: rgba(148, 163, 184, 0.1);
  color: #fff;
}

.btn.full { width: 100%; }

/* Tables */
.table-wrap {
  overflow-x: auto !important;
  max-width: 100% !important;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(7, 11, 22, 0.65);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.table-wrap th,
.table-wrap td {
  text-align: left;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.09);
  font-size: 13px;
  vertical-align: middle;
}

.table-wrap th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #8b98b5;
  background: rgba(12, 18, 34, 0.95);
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid var(--line);
}

.table-wrap tbody tr:last-child td { border-bottom: 0; }

.table-wrap tbody tr:hover td {
  background: rgba(56, 189, 248, 0.055);
}

/* Detail Grids & Key-Value Tiles */
.two {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 16px;
  min-width: 0 !important;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.kv {
  background: rgba(7, 11, 22, 0.72);
  border: 1px solid var(--line);
  padding: 12px 14px;
  border-radius: 12px;
}

.kv b {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  color: #8b98b5;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.kv span {
  overflow-wrap: anywhere;
  color: #f1f5f9;
  font-size: 13.5px;
}

.kv.price span {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, #38bdf8, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.kv.comp span { color: #6ee7b7; font-weight: 700; }
.kv.expiry-warn { border-color: rgba(251, 191, 36, 0.35); background: rgba(245, 158, 11, 0.08); }
.kv.expiry-warn span { color: #fcd34d; }
.kv.expiry-bad { border-color: rgba(251, 113, 133, 0.38); background: rgba(244, 63, 94, 0.1); }
.kv.expiry-bad span { color: #fda4af; }

/* Sections, Tabs, Links, Timeline, Pager */
.section-head, .hero {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.hero { align-items: flex-start; }
.hero h1 { margin: 4px 0; font-size: 24px; letter-spacing: -0.02em; }

.tabs {
  display: flex;
  gap: 4px;
  overflow: auto;
  border-bottom: 1px solid var(--line);
  margin: 0 0 16px;
}

.tab {
  border: 0;
  background: transparent;
  color: #8b98b5;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}

.tab:hover { color: #e2e8f0; }

.tab.active {
  color: #f8fafc;
  border-bottom-color: #38bdf8;
}

.link {
  border: 0;
  background: none;
  color: #7dd3fc;
  padding: 0;
  text-align: left;
  font-weight: 600;
}
.link:hover { color: #bae6fd; text-decoration: underline; }

.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions.large .btn { padding: 11px 16px; }

.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  color: var(--muted);
  font-size: 12.5px;
}

.notice {
  padding: 12px 14px;
  border: 1px solid rgba(251, 191, 36, 0.32);
  background: rgba(245, 158, 11, 0.1);
  color: #fde68a;
  border-radius: 12px;
  margin: 12px 0;
  font-size: 13px;
}

.timeline { display: flex; flex-direction: column; gap: 8px; }

.event {
  padding: 11px 14px;
  border-left: 3px solid #38bdf8;
  background: rgba(10, 15, 29, 0.78);
  border-radius: 0 10px 10px 0;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.event:hover { transform: translateX(3px); background: rgba(15, 23, 42, 0.9); }

.chat { max-height: 600px; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.bubble { padding: 10px 13px; background: rgba(15, 23, 42, 0.85); border: 1px solid var(--line); border-radius: 12px; }
.error { color: #fda4af; margin-top: 8px; font-size: 13px; }
.errorbox { border-color: rgba(244, 63, 94, 0.42); }
.empty { padding: 34px; text-align: center; color: var(--muted); font-size: 13.5px; }

.health-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 8px;
}
.health-row:last-child { border-bottom: 0; }
.health-row:hover { background: rgba(148, 163, 184, 0.05); }

/* Skeletons & Boot Loader */
.skeleton {
  background: linear-gradient(100deg, rgba(19, 26, 42, 0.9) 30%, rgba(30, 41, 68, 0.95) 50%, rgba(19, 26, 42, 0.9) 70%);
  background-size: 220% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
.skel-card { height: 104px; border-radius: var(--radius-lg); margin-bottom: 14px; }
.skel-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.skel-line { height: 14px; border-radius: 6px; margin: 10px 0; }

.boot {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  position: relative;
  z-index: 2;
}
.boot-logo { height: 56px; width: auto; animation: bootPulse 1.8s ease-in-out infinite; }
.boot-ring { width: 42px; height: 42px; border-radius: 50%; border: 3px solid rgba(56, 189, 248, 0.18); border-top-color: #38bdf8; border-right-color: #818cf8; animation: spin 0.9s linear infinite; }
.boot-text { color: var(--muted); font-size: 13px; letter-spacing: 0.03em; }

/* Support / Bug Inbox Chat */
.wa-chat-wrap { display: flex; flex-direction: column; gap: 10px; padding: 14px; background: #070d16; border-radius: 14px; border: 1px solid var(--line); max-height: 440px; overflow-y: auto; }
.wa-msg-row { display: flex; width: 100%; }
.wa-msg-row.admin { justify-content: flex-end; }
.wa-msg-row.player { justify-content: flex-start; }
.wa-msg-bubble { max-width: 78%; padding: 10px 13px; border-radius: 14px; font-size: 0.92rem; line-height: 1.45; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); }
.wa-msg-row.admin .wa-msg-bubble { background: linear-gradient(135deg, #0369a1, #3730a3); color: #f8fafc; border-top-right-radius: 4px; }
.wa-msg-row.player .wa-msg-bubble { background: #162033; border: 1px solid var(--line); color: #e2e8f0; border-top-left-radius: 4px; }
.wa-msg-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 0.76rem; }
.wa-mode-tag { background: rgba(255, 255, 255, 0.12); padding: 2px 7px; border-radius: 999px; font-size: 0.7rem; color: #e2e8f0; }
.wa-msg-time { text-align: right; font-size: 0.7rem; color: rgba(226, 232, 240, 0.65); margin-top: 4px; }

/* Mobile Menu & Responsive */
.mobile-menu { display: none; align-items: center; gap: 10px; }
.burger { display: inline-flex; flex-direction: column; gap: 4px; width: 18px; }
.burger span { height: 2px; background: #e8ecf7; border-radius: 2px; transition: transform 0.25s ease, opacity 0.2s ease; }
.mobile-menu.open .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.mobile-menu.open .burger span:nth-child(2) { opacity: 0; }
.mobile-menu.open .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav-backdrop { display: none; }

@media (max-width: 1100px) {
  .grid, .skel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  input, select, textarea { font-size: 16px !important; }
  .top { padding-top: calc(12px + env(safe-area-inset-top)); }
  .side { padding-top: calc(16px + env(safe-area-inset-top)); }
}

@media (max-width: 760px) {
  .shell { display: block; }
  .side {
    position: relative;
    z-index: 10000;
    overflow: visible !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 12px 14px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    backdrop-filter: none;
    background: rgba(10, 15, 29, 0.96);
  }
  .brand { padding: 0; margin: 0; border-bottom: 0; }
  .mobile-menu {
    display: inline-flex;
    background: rgba(30, 41, 59, 0.85);
    color: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    padding: 8px 13px;
    font-weight: 600;
    font-size: 13px;
  }
  nav {
    display: none;
    position: absolute;
    left: 12px;
    right: 12px;
    top: calc(100% + 8px);
    z-index: 10001;
    background: rgba(10, 15, 29, 0.98);
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    padding: 10px;
    flex-direction: column;
    gap: 4px;
    max-height: 72vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
  }
  nav.open { display: flex; }
  nav button { padding: 12px 14px; font-size: 14px; flex-shrink: 0; }
  .nav-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.65); z-index: 9998; animation: fadeIn 0.2s ease; }
  .side-foot, .side > .btn { display: none; }
  .main { padding: 14px 12px 72px; }
  .grid, .detail-grid, .detail { grid-template-columns: 1fr; }
  .input { min-width: 0; width: 100%; }
  .toolbar .input { flex: 1; }
  .top { align-items: flex-start; flex-direction: column; }
  .title { font-size: 20px; }
  .hero { display: block; }
  .hero .actions { margin-top: 14px; }
  .hero .actions .btn { flex: 1; }
  .table-wrap table { min-width: 680px; }
  .pager { gap: 10px; }
}

/* Modern Admin Login */
.login-modern { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; overflow: hidden; background: radial-gradient(circle at 18% 18%, rgba(56, 189, 248, 0.16), transparent 45%), radial-gradient(circle at 82% 80%, rgba(168, 85, 247, 0.16), transparent 45%), #050811; }
.login-orb { position: absolute; width: 380px; height: 380px; border-radius: 999px; filter: blur(90px); opacity: 0.32; pointer-events: none; }
.login-orb-1 { top: -100px; left: -90px; background: #38bdf8; }
.login-orb-2 { bottom: -120px; right: -90px; background: #6366f1; }
.login-glass { position: relative; z-index: 2; width: min(430px, 100%); padding: 32px 28px 24px !important; border-radius: 22px !important; background: linear-gradient(165deg, rgba(15, 23, 42, 0.92), rgba(8, 12, 24, 0.97)) !important; border: 1px solid rgba(148, 163, 184, 0.2) !important; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important; backdrop-filter: blur(22px); overflow: hidden; text-align: center; }
.login-accent-bar { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, #38bdf8, #6366f1, #a855f7); }
.login-brand-wrap { margin-bottom: 22px; }
.login-logo-ring { width: 76px; height: 76px; margin: 0 auto 14px; border-radius: 22px; display: flex; align-items: center; justify-content: center; background: linear-gradient(145deg, rgba(56, 189, 248, 0.16), rgba(99, 102, 241, 0.18)); border: 1px solid rgba(56, 189, 248, 0.28); box-shadow: 0 12px 32px rgba(56, 189, 248, 0.18); }
.login-logo-ring .login-logo { height: 48px; width: auto; margin: 0; filter: drop-shadow(0 4px 12px rgba(56, 189, 248, 0.35)); }
.login-kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.16em; color: #38bdf8; margin-bottom: 6px; }
.login-title { margin: 0 0 12px; font-family: 'Sora', 'Inter', sans-serif; font-size: 24px; font-weight: 700; color: #f8fafc; letter-spacing: -0.025em; }
.login-pill-row { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.login-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; color: #cbd5e1; background: rgba(30, 41, 59, 0.78); border: 1px solid rgba(148, 163, 184, 0.18); }
.login-dot { width: 7px; height: 7px; border-radius: 999px; background: #22c55e; box-shadow: 0 0 8px #22c55e; }
.login-form { text-align: left; display: flex; flex-direction: column; gap: 12px; }
.login-label { font-size: 12px; font-weight: 600; color: #94a3b8; letter-spacing: 0.02em; }
.login-input-wrap { position: relative; display: flex; align-items: center; }
.login-input { width: 100%; padding: 13px 44px 13px 14px !important; border-radius: 12px !important; background: rgba(2, 6, 23, 0.78) !important; border: 1px solid rgba(148, 163, 184, 0.22) !important; color: #f8fafc !important; font-size: 14px !important; }
.login-input:focus { outline: none; border-color: #38bdf8 !important; box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18) !important; }
.login-eye-btn { position: absolute; right: 10px; background: transparent; border: none; color: #94a3b8; cursor: pointer; font-size: 15px; padding: 4px 6px; border-radius: 6px; }
.login-eye-btn:hover { color: #f8fafc; background: rgba(148, 163, 184, 0.12); }
.login-submit { display: flex !important; align-items: center; justify-content: center; gap: 8px; padding: 13px 18px !important; border-radius: 12px !important; font-size: 14px !important; font-weight: 700 !important; background: linear-gradient(135deg, #0284c7, #4f46e5) !important; border: 1px solid rgba(125, 211, 252, 0.35) !important; color: #fff !important; box-shadow: 0 10px 26px rgba(37, 99, 235, 0.35); cursor: pointer; text-align: center !important; }
.login-submit:hover { filter: brightness(1.08); transform: translateY(-1px); }
.login-submit:disabled { opacity: 0.65; cursor: wait; transform: none; }
.login-error { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.38); color: #fca5a5; font-size: 12.5px; }
.login-foot { margin-top: 20px; padding-top: 14px; border-top: 1px solid rgba(148, 163, 184, 0.12); display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; font-size: 11px; color: #64748b; }

/* Ops Console Dock & Modal */
#adibot-ops-dock-btn { position: fixed; right: 20px; bottom: 20px; z-index: 9998; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; border: 1px solid rgba(56, 189, 248, 0.42); background: linear-gradient(135deg, rgba(12, 18, 34, 0.96), rgba(24, 34, 58, 0.96)); color: #e0f2fe; font-weight: 700; font-size: 12.5px; cursor: pointer; box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55), 0 0 24px rgba(56, 189, 248, 0.16); backdrop-filter: blur(14px); }
#adibot-ops-dock-btn:hover { transform: translateY(-2px); border-color: #7dd3fc; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.62), 0 0 28px rgba(56, 189, 248, 0.25); }
.ops-dock-dot { width: 8px; height: 8px; border-radius: 999px; background: #34d399; box-shadow: 0 0 8px #34d399; }
.ops-dock-kbd { font-size: 12px; opacity: 0.9; }
.ops-modal-backdrop { position: fixed; inset: 0; z-index: 9999; background: rgba(2, 6, 23, 0.82); backdrop-filter: blur(10px); display: none; align-items: center; justify-content: center; padding: 16px; }
.ops-modal-card { width: min(1040px, 96vw); max-height: 88vh; display: flex; flex-direction: column; background: linear-gradient(165deg, #0b1120, #060a14); color: #e2e8f0; border: 1px solid rgba(148, 163, 184, 0.2); border-radius: 20px; box-shadow: 0 32px 90px rgba(0, 0, 0, 0.78); overflow: hidden; font-family: 'Inter', system-ui, sans-serif; }
.ops-modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid rgba(148, 163, 184, 0.14); background: rgba(15, 23, 42, 0.75); flex-wrap: wrap; }
.ops-modal-title-group { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ops-modal-brand { display: flex; align-items: center; gap: 10px; }
.ops-modal-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(99, 102, 241, 0.25)); border: 1px solid rgba(56, 189, 248, 0.35); font-size: 16px; }
.ops-modal-title { font-family: 'Sora', 'Inter', sans-serif; font-size: 14px; font-weight: 700; color: #f8fafc; }
.ops-modal-sub { font-size: 11px; color: #64748b; }
.ops-tab-bar { display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: rgba(2, 6, 23, 0.72); border: 1px solid rgba(148, 163, 184, 0.12); }
.ops-tab { padding: 6px 12px; border-radius: 7px; border: none; background: transparent; color: #94a3b8; font-size: 12px; font-weight: 600; cursor: pointer; }
.ops-tab:hover { color: #f8fafc; }
.ops-tab.active { background: linear-gradient(135deg, #0284c7, #4f46e5); color: #fff; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35); }
.ops-modal-actions { display: flex; align-items: center; gap: 10px; }
.ops-role-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgba(30, 41, 59, 0.9); border: 1px solid rgba(56, 189, 248, 0.3); color: #7dd3fc; }
.ops-role-dot { width: 7px; height: 7px; border-radius: 999px; background: #34d399; }
.ops-close-btn { width: 30px; height: 30px; border-radius: 8px; border: 1px solid rgba(148, 163, 184, 0.22); background: rgba(15, 23, 42, 0.8); color: #94a3b8; cursor: pointer; font-size: 13px; }
.ops-close-btn:hover { color: #fff; border-color: #64748b; }
.ops-modal-body { padding: 18px; overflow: auto; flex: 1; }
.ops-session-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.ops-session-card { background: rgba(15, 23, 42, 0.65); border: 1px solid rgba(148, 163, 184, 0.16); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ops-session-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.ops-session-eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; color: #38bdf8; }
.ops-session-role { font-family: 'Sora', 'Inter', sans-serif; font-size: 20px; font-weight: 700; color: #f8fafc; margin-top: 2px; }
.ops-session-badge { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: rgba(34, 197, 94, 0.14); border: 1px solid rgba(34, 197, 94, 0.35); color: #4ade80; }
.ops-session-meta { display: grid; gap: 8px; font-size: 12.5px; background: rgba(2, 6, 23, 0.55); border: 1px solid rgba(148, 163, 184, 0.1); border-radius: 10px; padding: 10px 12px; }
.ops-session-meta > div { display: flex; justify-content: space-between; gap: 10px; }
.ops-session-meta span { color: #94a3b8; }
.ops-session-meta strong { color: #e2e8f0; text-align: right; }
.ops-session-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.ops-btn { padding: 8px 14px; border-radius: 9px; font-size: 12.5px; font-weight: 600; cursor: pointer; border: 1px solid transparent; }
.ops-btn.primary { background: linear-gradient(135deg, #0284c7, #4f46e5); color: #fff; }
.ops-btn.secondary { background: #1e293b; border-color: #334155; color: #e2e8f0; }
.ops-btn.danger { background: rgba(220, 38, 38, 0.16); border-color: rgba(239, 68, 68, 0.45); color: #fca5a5; }
.ops-input { width: 100%; box-sizing: border-box; padding: 9px 12px; border-radius: 9px; border: 1px solid #334155; background: #020617; color: #f8fafc; font-size: 13px; }
.ops-session-note { margin: 0; font-size: 12.5px; color: #94a3b8; line-height: 1.45; }
.ops-session-msg { font-size: 12px; min-height: 16px; }
