/* Mula Software Admin Dashboard - Matched to Mula Brand & Website Style */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  color-scheme: dark;
  --background: #0e0e11;
  --surface: #100e0e;
  --surface-alt: #17171b;
  --surface-card: #17171b;
  --surface-sidebar: #0e0e11;
  --line: #34343b;
  --line-hover: #34343b;
  --line-focus: #686a73;
  --muted: #aaa0a1;
  --dim: #a19697;
  --red: #9a9ca5;
  --red-hover: #ececf0;
  --red-dark: #686a73;
  --accent: #9a9ca5;
  --accent-soft: #ececf0;
  --pill-bg: #25252b;
  --pill-border: #686a73;
  --glow-red: 0 5px 26px rgba(219, 33, 36, 0.28);
  --glow-card: 0 16px 48px rgba(39, 13, 15, 0.4);
  --text-main: #fcf8f8;
  --text-muted: #aaa0a1;
  --text-dim: #73696b;
  --font-sans: 'Geist', 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

.is-hidden {
  display: none !important;
}

body.quantix-body {
  background-color: var(--background);
  background-image: 
    radial-gradient(ellipse 55% 45% at 50% 0%, #34343b 0%, #17171b 45%, #0e0e11 80%),
    radial-gradient(40rem 40rem at 100% 100%, rgba(245, 72, 80, 0.05), transparent 60%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Ambient canvas / background */
.ambient-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* Dashboard Layout Grid */
.quantix-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* Sidebar */
.quantix-sidebar {
  width: 255px;
  background: rgba(12, 9, 9, 0.94);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  transition: width 0.22s ease;
}

.quantix-sidebar.collapsed {
  width: 78px;
}

.sidebar-header {
  padding: 20px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #25252b;
  border: 1px solid #686a73;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(245, 72, 80, 0.25);
}

.brand-icon img {
  border-radius: 6px;
  object-fit: contain;
}

.brand-title {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  white-space: nowrap;
}

.brand-name {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 2px;
}

.brand-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--accent);
  box-shadow: 0 0 8px #9a9ca5;
  animation: cursor-blink 1s infinite;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.brand-tag {
  font-size: 0.65rem;
  color: #ececf0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.sidebar-nav {
  padding: 16px 10px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nav-group-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #ececf0;
  padding: 4px 12px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 10px;
  color: #c7b7b9;
  font-size: 0.85rem;
  font-weight: 550;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.16s ease;
}

.nav-link:hover {
  background: #25252b;
  color: #fff;
}

.nav-link.active {
  background: #25252b;
  border-color: #686a73;
  color: #fff5f5;
  box-shadow: 0 2px 14px rgba(245, 72, 80, 0.12);
}

.nav-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #25252b;
  border: 1px solid #34343b;
  display: grid;
  place-items: center;
  color: #ececf0;
  flex-shrink: 0;
  transition: all 0.16s ease;
}

.nav-link.active .nav-icon {
  background: var(--red);
  border-color: var(--red);
  color: #17171b;
}

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #25252b;
  border: 1px solid #686a73;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--accent);
  box-shadow: 0 0 10px rgba(245, 72, 80, 0.25);
  flex-shrink: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  white-space: nowrap;
}

.user-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
}

.user-role {
  font-size: 0.65rem;
  color: #ececf0;
}

/* Main Area */
.quantix-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Topbar */
.quantix-topbar {
  min-height: 62px;
  background: rgba(12, 9, 9, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 5;
}

.breadcrumb-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #17171b;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-icon:hover {
  background: #25252b;
  border-color: var(--line-hover);
  color: #fff;
}

.breadcrumb-path {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 500;
}

.breadcrumb-seg {
  color: var(--dim);
}

.breadcrumb-active {
  color: #fff;
  font-weight: 600;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  color: #ececf0;
  font-size: 0.74rem;
  font-weight: 600;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 11px #9a9ca5;
}

/* Content wrapper */
.quantix-content {
  padding: 28px;
  flex: 1;
}

/* View Header */
.view-header {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.view-title {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.view-title-tag {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 6px;
  background: #25252b;
  border: 1px solid #686a73;
  color: var(--accent-soft);
  font-weight: 600;
}

.view-desc {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 4px;
}

/* Quantix Cards */
.card-q {
  background: rgba(18, 14, 15, 0.88);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  transition: border-color 0.18s ease;
}

.card-q:hover {
  border-color: var(--line-hover);
}

/* Stat Grid (6 cards) */
.stats-grid-6 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card-q {
  background: rgba(18, 14, 15, 0.88);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.18s ease;
}

.stat-card-q:hover {
  border-color: #34343b;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 72, 80, 0.12);
}

.stat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #25252b;
  border: 1px solid #34343b;
  display: grid;
  place-items: center;
  color: var(--accent);
}

.stat-label {
  font-size: 0.73rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dim);
}

.stat-num {
  font-size: 1.85rem;
  font-weight: 750;
  letter-spacing: -0.04em;
  color: #fff;
  font-family: var(--font-sans);
}

.stat-trend {
  font-size: 0.72rem;
  color: #4ade80;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Split Row */
.grid-2col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

@media (max-width: 1024px) {
  .grid-2col {
    grid-template-columns: 1fr;
  }
}

/* Bar Chart Mock */
.chart-container {
  height: 200px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding-top: 24px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.chart-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
  justify-content: flex-end;
}

.chart-bar-fill {
  width: 100%;
  max-width: 24px;
  background: linear-gradient(180deg, #9a9ca5 0%, #686a73 100%);
  border-radius: 6px 6px 2px 2px;
  box-shadow: 0 0 12px rgba(245, 72, 80, 0.35);
  transition: height 0.4s ease;
}

.chart-label {
  font-size: 0.68rem;
  color: var(--dim);
  font-family: var(--font-mono);
}

/* Forms & Inputs */
.form-group-q {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.label-q {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #c7b7b9;
}

.input-q {
  width: 100%;
  background: #17171b;
  border: 1px solid #34343b;
  color: #fcf8f8;
  border-radius: 11px;
  padding: 11px 16px;
  font-size: 0.88rem;
  font-family: inherit;
  transition: all 0.18s ease;
}

.input-q:focus {
  outline: none;
  border-color: var(--red);
  background: #17171b;
  box-shadow: 0 0 0 3px rgba(245, 72, 80, 0.22);
}

.input-q::placeholder {
  color: #716567;
}

/* Buttons */
.btn-q-primary {
  background: var(--red);
  color: #0e0e11;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 11px 20px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 5px 26px rgba(219, 33, 36, 0.3);
  transition: all 0.16s ease;
}

.btn-q-primary:hover {
  background: var(--red-hover);
  transform: translateY(-1px);
  box-shadow: 0 7px 30px rgba(219, 33, 36, 0.45);
}

.btn-q-ghost {
  background: #17171b;
  border: 1px solid #34343b;
  color: #fcf8f8;
  border-radius: 11px;
  padding: 9px 16px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all 0.16s ease;
}

.btn-q-ghost:hover {
  border-color: #9a9ca5;
  background: #25252b;
  color: #fff;
}

.btn-q-danger {
  background: #25252b;
  border: 1px solid #686a73;
  color: #ececf0;
  border-radius: 9px;
  padding: 7px 13px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.16s ease;
}

.btn-q-danger:hover {
  background: #34343b;
  border-color: var(--red);
  color: #fff;
}

/* Plan Selectors */
.plan-grid-q {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.plan-card {
  background: #17171b;
  border: 1px solid #34343b;
  border-radius: 13px;
  padding: 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.plan-card:hover {
  border-color: #34343b;
  background: #17171b;
}

.plan-card.active {
  border-color: var(--red);
  background: #25252b;
  box-shadow: 0 0 24px rgba(245, 72, 80, 0.25);
}

.plan-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}

.plan-price {
  font-size: 0.74rem;
  color: #c7b7b9;
}

.plan-badge {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 6px;
  background: #25252b;
  border: 1px solid #686a73;
  color: var(--accent-soft);
  align-self: center;
  margin-top: 4px;
}

/* Key Generator Box */
.key-preview-box {
  background: #17171b;
  border: 1px dashed #686a73;
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  margin-top: 14px;
  margin-bottom: 20px;
}

.mono-key {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  padding: 6px 14px;
  background: #25252b;
  border-radius: 8px;
  border: 1px solid #34343b;
  display: inline-block;
  user-select: all;
  box-shadow: 0 0 16px rgba(245, 72, 80, 0.15);
}

/* Tables */
.table-wrap-q {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #17171b;
}

.table-q {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  text-align: left;
}

.table-q th {
  padding: 13px 16px;
  background: #17171b;
  color: var(--dim);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}

.table-q td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: #fcf8f8;
  vertical-align: middle;
}

.table-q tr:last-child td {
  border-bottom: none;
}

.table-q tr:hover td {
  background: rgba(43, 21, 24, 0.4);
}

/* Filter Chips */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 6px 13px;
  border-radius: 9px;
  background: #17171b;
  border: 1px solid #34343b;
  color: #c7b7b9;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.filter-chip:hover {
  background: #25252b;
  border-color: #34343b;
  color: #fff;
}

.filter-chip.active {
  background: #25252b;
  border-color: #686a73;
  color: #ececf0;
  box-shadow: 0 0 14px rgba(245, 72, 80, 0.2);
}

/* Badges */
.badge-q {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.status-active {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.status-expired {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #9a9ca5;
}

.status-banned {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #9a9ca5;
}

/* Lock Screen */
.lock-wrapper {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  z-index: 10;
  background: radial-gradient(ellipse 60% 50% at 50% 30%, #25252b 0%, #17171b 50%, #0e0e11 90%);
}

.lock-box {
  width: 100%;
  max-width: 440px;
  background: #17171b;
  border: 1px solid #34343b;
  border-radius: 20px;
  padding: 44px 34px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.8), 0 0 50px rgba(245, 72, 80, 0.15);
  text-align: center;
  position: relative;
}

.auth-logo {
  border-radius: 12px;
  margin-bottom: 18px;
  box-shadow: 0 0 30px rgba(245, 72, 80, 0.35);
  border: 1px solid #34343b;
  object-fit: contain;
}

.auth-eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #ececf0;
  font-weight: 600;
  margin-bottom: 8px;
}

.auth-title {
  font-size: 1.7rem;
  font-weight: 750;
  color: #fcf8f8;
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}

.red-dot {
  color: var(--red);
}

.auth-desc {
  font-size: 0.86rem;
  color: #c7b7b9;
  line-height: 1.5;
  margin-bottom: 26px;
}

/* Toast */
.admin-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #25252b;
  border: 1px solid #686a73;
  border-radius: 12px;
  padding: 12px 20px;
  color: #fcf8f8;
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.8), 0 0 24px rgba(245, 72, 80, 0.25);
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-toast.visible {
  transform: translateY(0);
  opacity: 1;
}

/* Chat & Changelogs */
.chat-bubble {
  padding: 12px 16px;
  border-radius: 12px;
  max-width: 80%;
  font-size: 0.85rem;
  line-height: 1.45;
}

.chat-bubble.own {
  background: #25252b;
  border: 1px solid #686a73;
  color: #fff;
  align-self: flex-end;
}

.chat-bubble.other {
  background: #17171b;
  border: 1px solid var(--line);
  color: #eee;
  align-self: flex-start;
}
