:root {
  --qs-rail-bg: #0b1628;
  --qs-rail-hover: rgba(255, 255, 255, 0.07);
  --qs-rail-active: #1b365d;
  --qs-navy: #1b365d;
  --qs-teal: #009688;
  --qs-teal-bright: #2dd4bf;
  --qs-bg: #f1f5f9;
  --qs-surface: #ffffff;
  --qs-border: #dbe3ee;
  --qs-text: #0f172a;
  --qs-muted: #64748b;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.07);
  --shadow-md: 0 10px 26px rgba(15, 23, 42, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--qs-bg);
  color: var(--qs-text);
  min-height: 100vh;
}

button, select, input {
  font-family: inherit;
}

.suite-root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =========================================================
   LOGIN SCREEN
   ========================================================= */
.login-screen {
  flex: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
  background: radial-gradient(circle at top, #1e3a5f 0%, #0b1628 72%);
}

.login-card {
  width: 100%;
  max-width: 450px;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.42);
}

.login-header {
  background: linear-gradient(135deg, #0b1628 0%, #1b365d 100%);
  color: #ffffff;
  padding: 28px 26px 24px;
  text-align: center;
  border-bottom: 3px solid var(--qs-teal);
}

.login-logo-pill {
  display: inline-block;
  background: #ffffff;
  padding: 6px 14px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.login-logo-pill img {
  height: 30px;
  display: block;
}

.login-header h1 {
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 4px;
}

.login-header p {
  font-size: 13px;
  color: #cbd5e1;
}

.login-body {
  padding: 26px 28px;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 5px;
}

.field input, .field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
}

.field input:focus {
  outline: none;
  border-color: var(--qs-teal);
  box-shadow: 0 0 0 3px rgba(0, 150, 136, 0.14);
}

.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrap input {
  padding-right: 42px;
}

.password-toggle-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #64748b;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.password-toggle-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.btn-primary {
  background: var(--qs-navy);
  color: #ffffff;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary:hover {
  background: #254778;
}

.btn-outline {
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 7px 12px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.btn-outline:hover {
  background: #eff6ff;
  border-color: #60a5fa;
  color: #1d4ed8;
}

.dev-quick-list {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dev-persona-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 7px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  text-align: left;
  font-size: 12px;
}

.dev-persona-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}

/* =========================================================
   UX 3 — LEFT COMMAND RAIL SHELL
   ========================================================= */
.command-shell {
  display: flex;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

.command-rail {
  width: 256px;
  background: var(--qs-rail-bg);
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  padding: 14px 12px;
  flex-shrink: 0;
  transition: width 0.16s ease;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.command-rail.collapsed {
  width: 68px;
  padding: 14px 8px;
}

.rail-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  gap: 8px;
}

.rail-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  overflow: hidden;
}

.rail-logo-badge {
  background: #ffffff;
  border-radius: 6px;
  padding: 3px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rail-logo-badge img {
  height: 20px;
  display: block;
}

.rail-collapse-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
  border-radius: 6px;
  width: 26px;
  height: 26px;
  cursor: pointer;
  font-size: 12px;
  flex-shrink: 0;
}

.rail-collapse-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.rail-section {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  font-weight: 700;
  margin: 15px 8px 6px;
  white-space: nowrap;
  overflow: hidden;
}

.rail-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  margin-bottom: 3px;
  transition: background 0.12s;
}

.rail-item:hover {
  background: var(--qs-rail-hover);
  color: #ffffff;
}

.rail-item.active {
  background: var(--qs-rail-active);
  color: #ffffff;
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--qs-teal-bright);
}

.rail-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  white-space: nowrap;
}

.rail-icon {
  font-size: 16px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.rail-label-stack {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.rail-soon-sub {
  font-size: 10.5px;
  font-weight: 600;
  color: #fbbf24;
}

.soon-tile-badge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 99px;
  background: #fef3c7;
  color: #b45309;
}

.rail-role-tag {
  font-size: 10px;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}

.rail-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dev-switcher-box {
  background: rgba(99, 102, 241, 0.14);
  border: 1px solid rgba(129, 140, 248, 0.35);
  border-radius: 8px;
  padding: 8px;
  font-size: 11px;
}

.dev-switcher-box select {
  width: 100%;
  margin-top: 4px;
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid #334155;
  border-radius: 5px;
  padding: 4px 6px;
  font-size: 11.5px;
}

.rail-user-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--qs-teal);
  color: #ffffff;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rail-signout {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.rail-signout:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(248, 113, 113, 0.4);
}

/* =========================================================
   MAIN WORKSPACE AREA & KEEP-ALIVE MULTI-IFRAME STAGE
   ========================================================= */
.qs-rail-slot {
  display: flex;
  flex-shrink: 0;
  height: 100%;
}

.qs-mobile-top-slot,
.qs-mobile-bottom-slot {
  flex-shrink: 0;
}

.command-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  overflow-y: auto;
}

.command-main.qs-mode-iframe {
  position: relative;
  overflow: hidden;
}

.qs-page-slot {
  flex: 1;
  min-width: 0;
  width: 100%;
}

.qs-iframe-stage.qs-stage-active {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.mobile-shell .qs-iframe-stage.qs-stage-active {
  min-height: calc(100dvh - 110px);
}

.qs-iframe-stage.qs-stage-parked {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  visibility: hidden;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.live-app-frame {
  flex: 1;
  width: 100%;
  height: 100vh;
  border: none;
  display: block;
  background: #ffffff;
}

.qs-iframe-stage .live-app-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: none;
  background: #ffffff;
}

.qs-iframe-stage .live-app-frame.qs-frame-active {
  visibility: visible;
  pointer-events: auto;
  z-index: 2;
}

.qs-iframe-stage .live-app-frame.qs-frame-parked {
  visibility: hidden;
  pointer-events: none;
  z-index: 1;
}

.qs-ka-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(45, 212, 191, 0.55);
  flex-shrink: 0;
}

.qs-ka-dot.busy {
  width: 8px;
  height: 8px;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: qsBusyPulse 1.5s infinite;
}

.qs-ka-dot.rail-collapsed-ka {
  position: absolute;
  bottom: -2px;
  right: -3px;
  border: 1.5px solid var(--qs-rail-bg);
}

@keyframes qsBusyPulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.65); }
  70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.qs-rail-reload-ico {
  font-size: 12px;
  color: rgba(203, 213, 225, 0.65);
  padding: 1px 4px;
  border-radius: 4px;
  line-height: 1;
  transition: color 0.12s, background 0.12s;
}

.rail-item.active:hover .qs-rail-reload-ico {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.page-wrap {
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 26px 26px 48px;
}

.page-wrap.admin-page-wrap {
  max-width: 100%;
  padding: 20px 24px 36px;
}

.hero-card {
  background: #ffffff;
  border: 1px solid var(--qs-border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}

.hero-card h2 {
  font-size: 20px;
  color: #0b1628;
  margin-bottom: 4px;
}

.hero-card p {
  font-size: 13.5px;
  color: var(--qs-muted);
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.suite-tile {
  background: #ffffff;
  border: 1px solid var(--qs-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform 0.14s, box-shadow 0.14s;
}

.suite-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.suite-tile-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.role-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 99px;
  background: #e2e8f0;
  color: #334155;
}

.role-badge.admin { background: #dbeafe; color: #1e40af; }
.role-badge.supervisor { background: #fef3c7; color: #92400e; }
.role-badge.member, .role-badge.standard { background: #ccfbf1; color: #115e59; }

.panel {
  background: #ffffff;
  border: 1px solid var(--qs-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 20px;
}

.panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--qs-border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.panel-header h3 {
  font-size: 16px;
  color: #0b1628;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--qs-border);
  font-size: 12px;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f6;
}

.access-matrix-scroll {
  overflow: auto;
  max-height: calc(100vh - 295px);
  position: relative;
}

.matrix-hscroll-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--qs-border);
}

.matrix-hscroll-track {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  height: 14px;
}

.matrix-hscroll-spacer {
  height: 1px;
}

.matrix-pan-btns {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.matrix-pan-btn {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.matrix-pan-btn:hover {
  background: #eff6ff;
  border-color: #60a5fa;
  color: #1d4ed8;
}

.access-matrix-table {
  border-collapse: separate;
  border-spacing: 0;
}

.access-matrix-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #f8fafc;
  white-space: nowrap;
  border-bottom: 1px solid var(--qs-border);
  box-shadow: 0 2px 6px -2px rgba(15, 23, 42, 0.12);
}

.access-matrix-table thead th.sticky-user-col {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 6;
  background: #f8fafc;
  min-width: 235px;
  border-right: 1px solid var(--qs-border);
  box-shadow: 4px 2px 8px -4px rgba(15, 23, 42, 0.16);
}

.access-matrix-table td.sticky-user-col {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #ffffff;
  min-width: 235px;
  border-right: 1px solid #e2e8f0;
  box-shadow: 4px 0 8px -4px rgba(15, 23, 42, 0.1);
}

.btn-reset-pw {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #1e293b;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.btn-reset-pw:hover {
  background: #eff6ff;
  border-color: #60a5fa;
  color: #1d4ed8;
}

.access-matrix-table tbody tr:hover td {
  background: #fbfdff;
}

.access-matrix-table tbody tr:hover td.sticky-user-col {
  background: #f8fafc;
}

.perm-select {
  width: 100%;
  min-width: 118px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  font-size: 12.5px;
  font-weight: 600;
}

.perm-select.val-none { background: #f8fafc; color: #94a3b8; }
.perm-select.val-member, .perm-select.val-standard { background: #f0fdfa; color: #0f766e; border-color: #99f6e4; }
.perm-select.val-supervisor { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.perm-select.val-admin { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }

.app-header-strip {
  padding: 15px 24px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric-card {
  background: #ffffff;
  border: 1px solid var(--qs-border);
  border-radius: 10px;
  padding: 14px 18px;
}

.metric-card .lbl { font-size: 12px; color: var(--qs-muted); font-weight: 600; }
.metric-card .val { font-size: 22px; font-weight: 700; color: #0b1628; margin-top: 4px; }

.btn-approve {
  background: #059669;
  color: #ffffff;
  border: none;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.btn-locked {
  background: #f1f5f9;
  color: #94a3b8;
  border: 1px solid #e2e8f0;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: not-allowed;
}

.toast-msg {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #0f172a;
  color: #ffffff;
  padding: 11px 16px;
  border-radius: 8px;
  font-size: 13px;
  border-left: 4px solid var(--qs-teal-bright);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.2s;
  pointer-events: none;
  z-index: 2000;
}

.toast-msg.show {
  opacity: 1;
  transform: translateY(0);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1500;
}

.modal-box {
  background: #ffffff;
  width: 100%;
  max-width: 470px;
  border-radius: 14px;
  padding: 24px;
  max-height: 90dvh;
  overflow-y: auto;
}

/* =========================================================
   MOBILE / ANDROID NATIVE SHELL (<= 860px or QuantumSuite APK)
   ========================================================= */
.mobile-shell {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  background: var(--qs-bg);
}

.mobile-topbar {
  height: 52px;
  background: var(--qs-rail-bg);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  border-bottom: 2px solid var(--qs-teal);
  flex-shrink: 0;
  z-index: 40;
}

.mobile-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  color: #f8fafc;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.mobile-icon-btn:active {
  background: rgba(255, 255, 255, 0.18);
}

.mobile-topbar-center {
  flex: 1;
  min-width: 0;
  padding: 0 10px;
  cursor: pointer;
}

.mobile-topbar-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mobile-topbar-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-top-role {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 99px;
  background: rgba(45, 212, 191, 0.22);
  color: #5eead4;
  flex-shrink: 0;
}

.mobile-topbar-sub {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-main {
  flex: 1;
  height: auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-shell .live-app-frame {
  width: 100%;
  height: 100%;
  min-height: calc(100dvh - 110px);
  flex: 1;
}

.mobile-shell .page-wrap {
  padding: 14px 14px 28px;
}

.mobile-shell .hero-card {
  padding: 16px;
  margin-bottom: 14px;
}

.mobile-shell .hero-card h2 {
  font-size: 17px;
}

.mobile-shell .tile-grid {
  grid-template-columns: 1fr;
  gap: 12px;
}

.mobile-shell .suite-tile {
  padding: 16px;
}

.mobile-shell .access-matrix-scroll {
  max-height: calc(100dvh - 220px);
}

@media (max-width: 860px) {
  .toast-msg {
    bottom: 72px;
    left: 14px;
    right: 14px;
  }
}

.mobile-bottom-bar {
  min-height: 58px;
  background: var(--qs-rail-bg);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
  z-index: 40;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.mobile-tab-btn {
  flex: 1 1 0%;
  min-width: 0;
  background: transparent;
  border: none;
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  position: relative;
  padding: 6px 2px;
}

.mobile-tab-btn .t-ico {
  font-size: 17px;
  line-height: 1.1;
}

.mobile-tab-btn .t-lbl {
  font-size: 10.5px;
  font-weight: 600;
}

.mobile-tab-btn.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.mobile-tab-btn.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 2.5px;
  border-radius: 0 0 4px 4px;
  background: var(--qs-teal-bright);
}

.mobile-tab-btn.dimmed {
  opacity: 0.42;
}

.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 22, 40, 0.62);
  z-index: 1600;
  display: flex;
}

.mobile-drawer {
  width: min(290px, 84vw);
  height: 100dvh;
  background: var(--qs-rail-bg);
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  padding: 14px 12px;
  box-shadow: 12px 0 34px rgba(0, 0, 0, 0.48);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.mobile-drawer-scroll {
  flex: 1;
  overflow-y: auto;
  padding-right: 2px;
}

.mobile-ota-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0, 150, 136, 0.18);
  border: 1px solid rgba(45, 212, 191, 0.4);
  color: #ccfbf1;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.mobile-ota-btn:active {
  background: rgba(0, 150, 136, 0.3);
}

.mobile-ota-ver {
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 99px;
  background: rgba(15, 23, 42, 0.55);
  color: #5eead4;
}

/* =========================================================
   SUPERVISOR PENDING APPROVAL BADGES & INBOX
   ========================================================= */
.qs-pending-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.45);
}

.t-ico-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.qs-pending-badge.tab-badge {
  position: absolute;
  top: -5px;
  right: -11px;
  min-width: 16px;
  height: 16px;
  font-size: 9.5px;
  padding: 0 4px;
  border: 1.5px solid var(--qs-rail-bg);
}

.qs-pending-badge.rail-collapsed-dot {
  position: absolute;
  top: -5px;
  right: -7px;
  min-width: 15px;
  height: 15px;
  font-size: 9px;
  padding: 0 3px;
}

.approval-inbox-card {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-left: 4px solid #d97706;
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.approval-inbox-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 10px;
}

.approval-inbox-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.approval-inbox-row {
  background: #ffffff;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.14s, box-shadow 0.14s;
}

.approval-inbox-row:hover {
  border-color: #f59e0b;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.12);
}

.approval-dismiss-btn {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.approval-dismiss-btn:hover {
  background: #fee2e2;
  border-color: #fecaca;
  color: #dc2626;
}

/* =========================================================
   ADMIN SUBTABS & PER-USER × PER-APP USAGE ANALYTICS
   ========================================================= */
.admin-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--qs-border);
  padding-bottom: 10px;
}

.admin-subtab-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 9px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s ease;
}

.admin-subtab-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.admin-subtab-btn.active {
  background: #0b1628;
  border-color: #0b1628;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(11, 22, 40, 0.16);
}

.admin-subtab-count {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
}

.admin-subtab-btn.active .admin-subtab-count {
  background: rgba(45, 212, 191, 0.22);
  color: #5eead4;
}

.usage-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.usage-period-group {
  display: inline-flex;
  background: #ffffff;
  border: 1px solid var(--qs-border);
  border-radius: 9px;
  padding: 3px;
  gap: 3px;
}

.usage-period-btn {
  border: none;
  background: transparent;
  color: #475569;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.12s;
}

.usage-period-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.usage-period-btn.active {
  background: var(--qs-teal);
  color: #ffffff;
}

.usage-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.usage-kpi-card {
  background: #ffffff;
  border: 1px solid var(--qs-border);
  border-radius: 11px;
  padding: 13px 15px;
  box-shadow: var(--shadow-sm);
}

.usage-kpi-card .lbl {
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.usage-kpi-card .val {
  font-size: 22px;
  font-weight: 800;
  color: #0b1628;
  margin-top: 4px;
}

.usage-kpi-card .sub {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 4px;
}

.usage-user-row {
  cursor: pointer;
}

.usage-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 4px 8px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
}

.usage-pill.usage-none {
  color: #cbd5e1;
}

.usage-pill.usage-zero {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #94a3b8;
}

.usage-cell-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  line-height: 1.2;
}

.usage-cell-box.usage-low {
  background: #f0fdfa;
  border-color: #99f6e4;
  color: #0f766e;
}

.usage-cell-box.usage-med {
  background: #ccfbf1;
  border-color: #5eead4;
  color: #115e59;
}

.usage-cell-box.usage-high {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
}

.usage-cell-main {
  font-size: 12px;
  font-weight: 800;
}

.usage-cell-sub {
  font-size: 10.5px;
  font-weight: 600;
  opacity: 0.85;
  margin-top: 2px;
  white-space: nowrap;
}

.usage-bottom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 18px;
}

.modal-box.modal-box-wide {
  max-width: 860px;
}

@media (max-width: 860px) {
  .usage-bottom-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   UNIFIED QUANTUM PRICE TOP-TAB BAR (JOB BID / SELL PRICING / CUSTOMER OFFER)
   ========================================================= */
.qs-pricing-subbar {
  min-height: 48px;
  width: 100%;
  background: #0f172a;
  border-bottom: 1px solid #1e293b;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  padding: 0 16px;
  gap: 14px;
  flex-shrink: 0;
  z-index: 5;
  user-select: none;
}

.qs-pricing-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 14px;
  border-right: 1px solid #1e293b;
  flex-shrink: 0;
}

.qs-pricing-brand-badge {
  width: 25px;
  height: 25px;
  border-radius: 6px;
  background: linear-gradient(135deg, #d97706, #0284c7);
  color: #ffffff;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.qs-pricing-brand-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #f8fafc;
  white-space: nowrap;
}

.qs-pricing-tabs-wrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.qs-pricing-tabs-wrap::-webkit-scrollbar {
  display: none;
}

.qs-pricing-seg {
  display: flex;
  align-items: flex-end;
  gap: 7px;
}

.qs-pricing-tab {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 39px;
  padding: 0 17px;
  border-radius: 9px 9px 0 0;
  border: 1px solid #475569;
  border-bottom: none;
  background: #1e293b;
  color: #f1f5f9;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
  white-space: nowrap;
}

.qs-pricing-tab:hover {
  background: #334155;
  border-color: #64748b;
  color: #ffffff;
}

.qs-pricing-tab.active {
  background: #ffffff;
  color: #0f172a;
  font-weight: 800;
  border-color: #1e293b;
  box-shadow: 0 -2px 8px rgba(15, 23, 42, 0.18);
}

.qs-pricing-tab.active-bid {
  border-top: 3px solid #d97706;
}

.qs-pricing-tab.active-price {
  border-top: 3px solid #0284c7;
}

.qs-pricing-tab.active-offer {
  border-top: 3px solid #059669;
}

.qs-pricing-tab.active-orders {
  border-top: 3px solid #059669;
}

.qs-pricing-tab.active-ship {
  border-top: 3px solid #4f46e5;
}

.qs-pricing-tab-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
  flex-shrink: 0;
}

.qs-pricing-tab-dot.bid-dot {
  background: #f59e0b;
}

.qs-pricing-tab-dot.price-dot {
  background: #38bdf8;
}

.qs-pricing-tab-dot.offer-dot {
  background: #10b981;
}

.qs-pricing-tab-dot.orders-dot {
  background: #10b981;
}

.qs-pricing-tab-dot.ship-dot {
  background: #818cf8;
}

.qs-pricing-subbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.qs-pricing-mode-desc {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
  white-space: nowrap;
}

.suite-mode-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.suite-mode-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.suite-mode-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.1);
}

.suite-mode-chip.mode-price {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #bae6fd;
}

.suite-mode-chip.mode-bid {
  background: #fef3c7;
  color: #b45309;
  border-color: #fde68a;
}

.suite-mode-chip.mode-offer {
  background: #d1fae5;
  color: #047857;
  border-color: #a7f3d0;
}

.suite-mode-chip.mode-ebay {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fecaca;
}

.suite-mode-chip.mode-facebook {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.suite-mode-chip.mode-orders {
  background: #d1fae5;
  color: #047857;
  border-color: #a7f3d0;
}

.suite-mode-chip.mode-ship {
  background: #e0e7ff;
  color: #3730a3;
  border-color: #c7d2fe;
}

/* =========================================================
   UNIFIED QUANTUM LIST TOP-TAB BAR (EBAY / FACEBOOK)
   ========================================================= */
.ql-suite-tabbar {
  height: 44px;
  width: 100%;
  background: #0f172a;
  border-bottom: 1px solid #1e293b;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  padding: 0 16px;
  gap: 18px;
  flex-shrink: 0;
  z-index: 5;
  user-select: none;
}

.ql-suite-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 12px;
  border-right: 1px solid #1e293b;
}

.ql-suite-brand-badge {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ql-suite-brand-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #f8fafc;
  white-space: nowrap;
}

.ql-suite-tabs {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.ql-suite-tab {
  appearance: none;
  border: 1px solid #475569;
  border-bottom: none;
  background: #1e293b;
  color: #f1f5f9;
  height: 36px;
  padding: 0 16px;
  border-radius: 8px 8px 0 0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.ql-suite-tab:hover {
  background: #334155;
  border-color: #64748b;
  color: #ffffff;
}

.ql-suite-tab.active {
  background: #ffffff;
  color: #0f172a;
  border-color: #1e293b;
  border-top: 3px solid #2563eb;
  font-weight: 800;
}

.ql-suite-tab-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
  flex-shrink: 0;
}

.ql-suite-tab-dot.ebay-dot {
  background: #e53238;
}

.ql-suite-tab-dot.fb-dot {
  background: #1877f2;
}

.ql-suite-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ql-suite-active-hint {
  font-size: 12px;
  color: #94a3b8;
  white-space: nowrap;
}

.ql-suite-role-pill {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}

.ql-suite-reload-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #334155;
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.ql-suite-reload-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

@media (max-width: 1120px) {
  .qs-pricing-mode-desc {
    display: none;
  }
}

@media (max-width: 860px) {
  .qs-pricing-brand,
  .qs-pricing-switch-hint,
  .qs-pricing-mode-desc,
  .ql-suite-brand,
  .ql-suite-active-hint,
  .ql-suite-role-pill {
    display: none;
  }
  .qs-pricing-subbar {
    padding: 0 8px;
    min-height: 42px;
    gap: 6px;
  }
  .qs-pricing-seg {
    gap: 4px;
  }
  .qs-pricing-tab {
    height: 35px;
    padding: 0 10px;
    font-size: 11.5px;
    gap: 5px;
  }
  .ql-suite-tabbar {
    padding: 0 10px;
    height: 40px;
    gap: 8px;
  }
  .ql-suite-tab {
    height: 33px;
    padding: 0 12px;
    font-size: 12px;
  }
}
