@charset "UTF-8";
:root {
  --font-sans: "Inter", "SF Pro Text", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --accent: #10b981;
  --accent-hover: #0ea371;
  --accent-soft: rgba(16,185,129,.12);
  --bg: #fafbfc;
  --surface: #ffffff;
  --surface-2: #f4f6f8;
  --border: #e6e8ec;
  --border-strong: #d7dbe2;
  --text: #0f1116;
  --text-muted:#6b7280;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --shadow-xs: 0 1px 0 rgba(15,17,22,.04);
  --shadow-sm: 0 1px 2px rgba(15,17,22,.06), 0 1px 1px rgba(15,17,22,.04);
  --shadow-md: 0 4px 12px rgba(15,17,22,.08);
  --sidebar-bg: #0f1116;
  --sidebar-fg: #cbd3df;
  --sidebar-fg-muted: #8791a1;
  --sidebar-active-bg: rgba(16,185,129,.14);
  --sidebar-active-fg: #eafff5;
}

:root[data-bs-theme=dark] {
  --bg: #0b0d10;
  --surface: #12151a;
  --surface-2: #171b21;
  --border: #232830;
  --border-strong: #2c333c;
  --text: #e8ecf4;
  --text-muted:#98a1b0;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 6px 18px rgba(0,0,0,.5);
}

:root {
  --bs-primary: var(--accent);
  --bs-primary-rgb: 16,185,129;
  --bs-body-font-family: var(--font-sans);
  --bs-body-color: var(--text);
  --bs-body-bg: var(--bg);
  --bs-border-radius: var(--radius);
  --bs-border-radius-sm: var(--radius-sm);
  --bs-border-radius-lg: var(--radius-lg);
}

.btn-primary {
  --bs-btn-bg: var(--accent);
  --bs-btn-border-color: var(--accent);
  --bs-btn-hover-bg: var(--accent-hover);
  --bs-btn-hover-border-color: var(--accent-hover);
  --bs-btn-active-bg: var(--accent-hover);
  --bs-btn-active-border-color: var(--accent-hover);
}

html, body {
  height: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  font-size: 14.5px;
}

.admin-main {
  margin-left: 248px;
  min-height: 100vh;
  transition: margin-left 0.2s ease;
}

body.sidebar-collapsed .admin-main {
  margin-left: 64px;
}

.admin-content {
  padding: 20px 28px 48px;
  max-width: 1320px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin: 6px 0 18px;
}

.page-title {
  font-size: 22px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}

.page-subtitle {
  color: var(--text-muted);
  margin: 4px 0 0;
  font-size: 13.5px;
}

.page-actions {
  display: flex;
  gap: 8px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

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

.panel-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.005em;
}

.panel-link {
  color: var(--text-muted);
  font-size: 13px;
  text-decoration: none;
}

.panel-link:hover {
  color: var(--accent);
}

.muted {
  color: var(--text-muted);
}

.mono {
  font-family: var(--font-mono);
  font-size: 13px;
}

.admin-breadcrumbs ol {
  list-style: none;
  display: flex;
  gap: 6px;
  padding: 0;
  margin: 0 0 8px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.admin-breadcrumbs li:not(:first-child)::before {
  content: "/";
  margin-right: 6px;
  opacity: 0.5;
}

.admin-breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
}

.admin-breadcrumbs a:hover {
  color: var(--accent);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.stat-icon {
  font-size: 20px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.stat-label {
  color: var(--text-muted);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-value {
  font-size: 26px;
  font-weight: 600;
  margin-top: 4px;
  letter-spacing: -0.02em;
}

.stat-delta {
  font-size: 12.5px;
  margin-top: 4px;
}

.stat-delta.up {
  color: var(--accent);
}

.stat-delta.down {
  color: #ef4444;
}

.sparkline {
  position: absolute;
  right: 14px;
  bottom: 12px;
  width: 96px;
  height: 28px;
  color: var(--accent);
  opacity: 0.8;
}

.detail-list {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px 18px;
  padding: 14px 16px;
  margin: 0;
  font-size: 13.5px;
}

.detail-list dt {
  color: var(--text-muted);
  font-weight: 500;
}

.detail-list dd {
  margin: 0;
}

.timeline {
  list-style: none;
  padding: 12px 16px;
  margin: 0;
}

.timeline li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}

.timeline li:last-child {
  border-bottom: 0;
}

.list-rows {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list-rows li {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  gap: 4px 12px;
}

.list-rows li:last-child {
  border-bottom: 0;
}

.list-primary {
  font-weight: 500;
  font-size: 13.5px;
}

.list-secondary {
  color: var(--text-muted);
  font-size: 12.5px;
  grid-column: 1;
}

.list-meta {
  grid-row: 1/span 2;
}

.media-placeholder {
  display: grid;
  place-items: center;
  height: 180px;
  color: var(--text-muted);
  background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 10px, var(--surface) 10px, var(--surface) 20px);
}

.media-placeholder i {
  font-size: 28px;
}

.media-placeholder span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
}

.avatar-stack {
  display: flex;
  padding: 14px 16px;
}

.avatar-stack .avatar {
  margin-left: -8px;
  border: 2px solid var(--surface);
}

.avatar-stack .avatar:first-child {
  margin-left: 0;
}

.empty-state {
  display: grid;
  place-items: center;
  padding: 56px 24px;
  text-align: center;
  color: var(--text-muted);
}

.empty-state h3 {
  color: var(--text);
  font-size: 16px;
  margin: 10px 0 4px;
}

.empty-state .empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-size: 22px;
  color: var(--text-muted);
}

.error-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  background: var(--bg);
}

.error-code {
  font-size: 96px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.04em;
  line-height: 1;
}

.settings-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
}

.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 80px;
  align-self: start;
}

.settings-nav a {
  color: var(--text-muted);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 13.5px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.settings-nav a.active, .settings-nav a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.auth-body {
  background: var(--bg);
}

.auth-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

.auth-card {
  padding: 56px;
  max-width: 460px;
  margin: auto;
  width: 100%;
}

.auth-card h1 {
  font-size: 26px;
  margin: 24px 0 4px;
  letter-spacing: -0.01em;
}

.auth-card .auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.auth-card .auth-brand .brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: white;
}

.auth-form label {
  display: block;
  margin: 14px 0 6px;
  font-size: 13px;
  font-weight: 500;
}

.auth-form .btn {
  display: block;
  width: 100%;
  margin-top: 20px;
}

.auth-form .check {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 400;
  color: var(--text-muted);
}

.auth-divider {
  text-align: center;
  color: var(--text-muted);
  margin: 18px 0;
  position: relative;
}

.auth-divider::before, .auth-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border);
}

.auth-divider::before {
  left: 0;
}

.auth-divider::after {
  right: 0;
}

.auth-divider span {
  background: var(--bg);
  padding: 0 10px;
  font-size: 12px;
  position: relative;
}

.auth-foot {
  text-align: center;
  font-size: 12px;
  margin-top: 16px;
}

.auth-aside {
  background: var(--surface-2);
  display: grid;
  place-items: center;
  padding: 56px;
  background-image: radial-gradient(circle at 30% 30%, rgba(16, 185, 129, 0.14), transparent 60%);
}

.auth-aside blockquote {
  font-size: 22px;
  line-height: 1.35;
  max-width: 460px;
  letter-spacing: -0.01em;
}

.auth-aside cite {
  display: block;
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 13px;
  font-style: normal;
}

@media (max-width: 900px) {
  .admin-main {
    margin-left: 0;
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .auth-shell {
    grid-template-columns: 1fr;
  }
  .auth-aside {
    display: none;
  }
}
.admin-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 248px;
  height: 100vh;
  background: var(--sidebar-bg);
  color: var(--sidebar-fg);
  display: flex;
  flex-direction: column;
  z-index: 40;
  transition: width 0.2s ease;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}

body.sidebar-collapsed .admin-sidebar {
  width: 64px;
}

body.sidebar-collapsed .admin-sidebar .brand-name,
body.sidebar-collapsed .admin-sidebar .nav-section,
body.sidebar-collapsed .admin-sidebar .nav-link span,
body.sidebar-collapsed .admin-sidebar .nav-count,
body.sidebar-collapsed .admin-sidebar .user-meta,
body.sidebar-collapsed .user-chip button {
  display: none;
}

body.sidebar-collapsed .sidebar-brand {
  justify-content: center;
  padding: 16px 0;
}

body.sidebar-collapsed .user-chip {
  justify-content: center;
}

body.sidebar-collapsed .sidebar-collapse i {
  transform: rotate(180deg);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  position: relative;
}

.sidebar-brand .brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent);
  color: #02150d;
  display: grid;
  place-items: center;
  font-size: 16px;
  flex-shrink: 0;
}

.brand-title {
  font-weight: 600;
  color: #fff;
  font-size: 14px;
  display: block;
}

.brand-sub {
  font-size: 11px;
  color: var(--sidebar-fg-muted);
}

.sidebar-collapse {
  position: absolute;
  top: 22px;
  right: -13px;
  z-index: 41;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.15s ease, transform 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.sidebar-collapse i {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.admin-sidebar:hover .sidebar-collapse,
.sidebar-collapse:focus-visible {
  opacity: 1;
  transform: scale(1);
}

.sidebar-collapse:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px;
}

.nav-section {
  text-transform: uppercase;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--sidebar-fg-muted);
  padding: 14px 10px 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  color: var(--sidebar-fg);
  border-radius: 8px;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
}

.nav-link i {
  width: 16px;
  font-size: 15px;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.nav-link.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-fg);
}

.nav-count {
  margin-left: auto;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--sidebar-fg-muted);
  padding: 1px 8px;
  border-radius: 99px;
  font-family: var(--font-mono);
}

.nav-link.active .nav-count {
  background: rgba(16, 185, 129, 0.25);
  color: #eafff5;
}

.sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 12px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-chip .avatar {
  width: 32px;
  height: 32px;
}

.user-name {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
}

.user-role {
  font-size: 11px;
  color: var(--sidebar-fg-muted);
}

.user-chip button {
  margin-left: auto;
  color: var(--sidebar-fg-muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: color 0.15s ease, background 0.15s ease;
}

.user-chip button:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #065f46);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.avatar.sm {
  width: 26px;
  height: 26px;
  font-size: 10.5px;
}

.avatar.lg {
  width: 56px;
  height: 56px;
  font-size: 16px;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}

.topbar-search {
  flex: 1;
  max-width: 520px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 10px;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
}

.topbar-input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  min-width: 0;
  cursor: pointer;
}

.topbar-input::placeholder {
  color: var(--text-muted);
}

.topbar-search kbd {
  margin-left: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
}

.btn-icon:hover {
  background: var(--surface-2);
  color: var(--text);
}

.btn-icon.danger:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

.badge-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.theme-dark {
  display: none;
}

[data-bs-theme=dark] .theme-dark {
  display: inline-block;
}

[data-bs-theme=dark] .theme-light {
  display: none;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}

.vr {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 6px;
}

.impersonation-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  background: #fefce8;
  border-bottom: 1px solid #fde68a;
  color: #92400e;
  font-size: 13.5px;
  font-weight: 500;
}
.impersonation-banner i {
  color: #d97706;
}
.impersonation-banner form {
  margin: 0;
}
.impersonation-banner .btn {
  padding: 2px 12px;
  font-size: 12.5px;
  line-height: 1.6;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 14px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.toolbar-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.toolbar-search input {
  border: 0;
  background: transparent;
  width: 100%;
  padding: 6px 0;
  outline: none;
  color: var(--text);
  font-size: 13px;
}

.toolbar-filters {
  display: flex;
  gap: 6px;
}

.toolbar-filters select {
  min-width: 150px;
}

.toolbar-meta {
  color: var(--text-muted);
  font-size: 12px;
  font-family: var(--font-mono);
  padding-right: 8px;
}

.bulk-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 10px;
  background: var(--accent-soft);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius);
  font-size: 13px;
}

.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
}

.admin-table thead th {
  background: var(--surface-2);
  text-align: left;
  font-weight: 500;
  color: var(--text-muted);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
}

.admin-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

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

.admin-table tbody tr:hover {
  background: var(--surface-2);
}

.admin-table.compact tbody td {
  padding: 8px 14px;
}

.admin-table .col-check {
  width: 36px;
  padding-left: 14px;
  padding-right: 0;
}

.admin-table .col-actions {
  width: 80px;
  text-align: right;
}

.col-actions {
  width: 1%;
  white-space: nowrap;
  text-align: right;
  vertical-align: middle;
}

.admin-table thead th a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.admin-table thead th a.asc::after {
  content: "↑";
  font-size: 10px;
}

.admin-table thead th a.desc::after {
  content: "↓";
  font-size: 10px;
}

.cell-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cell-primary {
  display: block;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}

.cell-primary:hover {
  color: var(--accent);
}

.cell-secondary {
  font-size: 11.5px;
  color: var(--text-muted);
}

.thumb {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  color: var(--text-muted);
}

.row-actions {
  display: inline-flex;
  gap: 2px;
}

.inline-select {
  border: 1px solid transparent;
  padding: 4px 6px;
  background: transparent;
  color: inherit;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

.inline-select:hover, .inline-select:focus {
  background: var(--surface-2);
  border-color: var(--border-strong);
  outline: none;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
}

.badge-active, .badge-paid, .badge-published, .badge-delivered {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.badge-invited, .badge-pending, .badge-draft {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}

.badge-suspended, .badge-cancelled, .badge-archived, .badge-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.badge-shipped, .badge-warning {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.badge-refunded {
  background: rgba(100, 116, 139, 0.18);
  color: #475569;
}

[data-bs-theme=dark] .badge {
  filter: brightness(1.6);
}

.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 12.5px;
}

.form-grid {
  padding: 16px;
  display: grid;
  gap: 14px;
}

.form-grid .form-row {
  display: block;
}

.form-grid label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--text);
}

.form-grid .form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-grid .form-control, .form-grid .form-select {
  border-radius: var(--radius-sm);
  border-color: var(--border-strong);
  font-size: 13.5px;
}

.form-grid .form-control:focus, .form-grid .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.modal-shell {
  position: fixed;
  inset: 0;
  background: rgba(15, 17, 22, 0.45);
  display: grid;
  place-items: center;
  z-index: 60;
  animation: fadein 0.15s ease;
}

.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: min(560px, 100vw - 32px);
  max-height: calc(100vh - 60px);
  overflow: auto;
  box-shadow: var(--shadow-md);
  animation: pop 0.18s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.modal-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.modal-card header h2 {
  font-size: 15px;
  margin: 0;
  font-weight: 600;
}

@keyframes fadein {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes pop {
  from {
    transform: scale(0.96);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.cmdk-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 17, 22, 0.55);
  display: grid;
  place-items: start center;
  padding-top: 14vh;
  animation: fadein 0.15s ease;
}

.cmdk {
  width: min(640px, 100vw - 24px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.cmdk-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.cmdk-input input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 15px;
}

.cmdk-input kbd {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.cmdk-list {
  max-height: 360px;
  overflow-y: auto;
  padding: 6px;
}

.cmdk-group-title {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 10px 4px;
}

.cmdk-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 13.5px;
}

.cmdk-item:hover, .cmdk-item:focus {
  background: var(--surface-2);
  outline: none;
}

.cmdk-footer {
  display: flex;
  gap: 14px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
}

.cmdk-footer kbd {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0 5px;
  border-radius: 4px;
  font-size: 11px;
  margin-right: 4px;
}

.flash-toast {
  position: fixed;
  right: 20px;
  top: 20px;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  font-size: 13.5px;
  animation: flash-slidein 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.flash-toast.leaving {
  opacity: 0;
  transform: translateY(-8px);
  transition: 0.2s;
}

.flash-toast i {
  font-size: 16px;
}

.flash-notice i {
  color: var(--accent);
}

.flash-alert i {
  color: #ef4444;
}

.flash-close {
  margin-left: auto;
  background: none;
  border: none;
  padding: 0 0 0 6px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.flash-close:hover {
  color: var(--text);
}

.admin-body .flash-toast {
  top: 68px;
}

@keyframes flash-slidein {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
body.density-compact .admin-table tbody td {
  padding: 6px 12px;
}

body.density-compact .stat-card {
  padding: 10px 12px;
}

body.density-compact .panel-header {
  padding: 10px 14px;
}

@keyframes quest-row-new {
  0% {
    background-color: rgba(25, 135, 84, 0.35);
    transform: translateY(-6px);
  }
  100% {
    background-color: transparent;
    transform: translateY(0);
  }
}
.quest-row-new > td {
  animation: quest-row-new 1.6s ease-out;
}

@keyframes quest-badge-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.6);
  }
  35% {
    transform: scale(1.35);
    box-shadow: 0 0 0 6px rgba(25, 135, 84, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(25, 135, 84, 0);
  }
}
.quest-badge-pulse {
  animation: quest-badge-pulse 0.9s ease-out;
}

.qr-svg svg {
  width: 100%;
  height: auto;
  display: block;
}
