/* Interactive landing-page admin demo console */
.demo-frame {
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 580px;
  max-height: 720px;
  position: relative;
}
.demo-sidebar {
  background: #0e0e0e;
  color: #f5f5f5;
  border-right: 1px solid rgba(255,255,255,0.08);
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow: hidden;
  position: relative;
}
.demo-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px;
  position: relative;
  z-index: 2;
}
.demo-brand img {
  width: 34px; height: 34px;
  object-fit: contain;
  background: #fff;
  border-radius: 50%;
  padding: 4px;
}
.demo-brand span {
  font-family: var(--font-brand);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: #fff;
}
.demo-nav-label {
  font-family: var(--font-brand);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  padding: 0 10px;
  margin-bottom: 4px;
}
.demo-side-nav { display: flex; flex-direction: column; gap: 3px; }
.demo-side-nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: none;
  background: transparent;
  border-radius: var(--radius-md);
  font-family: var(--font-brand);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.62);
  text-align: left;
  cursor: default;
  pointer-events: none;
}
.demo-side-nav button.active {
  background: #fff;
  color: #0a0a0a;
  filter: none;
  opacity: 1;
  position: relative;
  z-index: 2;
}
.demo-sidebar .demo-nav-label,
.demo-sidebar .demo-sidebar-foot,
.demo-side-nav button:not(.active) {
  filter: blur(2.5px);
  opacity: 0.72;
  user-select: none;
  pointer-events: none;
}
.demo-side-nav button svg { flex-shrink: 0; }
.demo-nav-count {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: #b91c1c;
  color: #fff;
  min-width: 18px;
  text-align: center;
}
.demo-side-nav button.active .demo-nav-count { background: #991b1b; }
.demo-nav-count[data-empty="1"] { display: none; }
.demo-sidebar-foot {
  margin-top: auto;
  padding: 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  display: flex;
  align-items: center;
  gap: 8px;
}
.demo-live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}
.demo-shell {
  display: flex;
  flex-direction: column;
  background: #fafafa;
  color: #18181b;
  min-width: 0;
  min-height: 0;
}
.demo-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px 12px;
  border-bottom: 1px solid #e4e4e7;
  background: #fff;
  flex-shrink: 0;
}
.demo-page-title {
  font-family: var(--font-brand);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: #18181b;
}
.demo-page-sub {
  font-size: 12.5px;
  color: #71717a;
  margin-top: 2px;
}
.demo-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.demo-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}
.demo-user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 5px;
  border-radius: var(--radius-full);
  border: 1px solid #e4e4e7;
  background: #fff;
  font-size: 12.5px;
  font-weight: 600;
  color: #52525b;
}
.demo-user-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #18181b;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}
.demo-mobile-nav { display: none !important; }
.demo-day-tab { cursor: default; pointer-events: none; }
.demo-toast { display: none !important; }
.demo-content {
  padding: 16px 20px 20px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.demo-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}
.demo-stat-card {
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.demo-stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.demo-stat-label {
  font-size: 12px;
  font-weight: 600;
  color: #71717a;
}
.demo-stat-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.demo-stat-icon.b { background: #eff6ff; color: #2563eb; }
.demo-stat-icon.a { background: #fff7ed; color: #ea580c; }
.demo-stat-icon.g { background: #f0fdf4; color: #16a34a; }
.demo-stat-value {
  font-family: var(--font-brand);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: #18181b;
  line-height: 1.1;
}
.demo-stat-delta {
  font-size: 11.5px;
  color: #71717a;
  margin-top: 4px;
}
.demo-panel {
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.demo-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #e4e4e7;
  flex-wrap: wrap;
}
.demo-panel-title {
  font-family: var(--font-brand);
  font-size: 13.5px;
  font-weight: 700;
  color: #18181b;
}
.demo-day-tabs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.demo-day-tab {
  border: 1px solid transparent;
  background: transparent;
  border-radius: var(--radius-md);
  padding: 6px 10px;
  font-family: var(--font-brand);
  font-size: 12px;
  font-weight: 600;
  color: #71717a;
  cursor: pointer;
}
.demo-day-tab:hover { color: #18181b; background: #f4f4f5; }
.demo-day-tab.active {
  color: #18181b;
  background: #f4f4f5;
  border-color: #e4e4e7;
}
.demo-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: #f4f4f5;
  color: #52525b;
}
.demo-badge.amber { background: #fff7ed; color: #c2410c; }
.demo-badge.green { background: #f0fdf4; color: #15803d; }
.demo-bubble-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 10px;
  padding: 18px 14px 20px;
  align-items: start;
}
.demo-bubble-grid.is-focused .demo-bubble:not(.is-open) {
  display: none;
}
.demo-bubble {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: center;
}
.demo-bubble-trigger {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  width: 100%;
}
.demo-bubble-trigger:focus-visible {
  outline: 2px solid #18181b;
  outline-offset: 4px;
  border-radius: 12px;
}
.demo-bubble-orb {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(160deg, #2a2a2a 0%, #0f0f0f 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
}
.demo-bubble-trigger:hover .demo-bubble-orb {
  transform: translateY(-2px) scale(1.04);
}
.demo-bubble.is-open .demo-bubble-orb {
  transform: scale(1.12);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}
.demo-bubble-no {
  font-family: var(--font-brand);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.4px;
  line-height: 1;
}
.demo-bubble-label {
  font-size: 11px;
  font-weight: 600;
  color: #71717a;
}
.demo-bubble-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
  z-index: 2;
}
.demo-bubble-glow {
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 42px;
  height: 14px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(34, 197, 94, 0.85) 0%, rgba(34, 197, 94, 0.25) 45%, transparent 72%);
  filter: blur(1px);
  pointer-events: none;
  animation: demoGlowPulse 1.6s ease-in-out infinite;
}
.demo-bubble.is-on-call .demo-bubble-orb {
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.18),
    0 10px 18px -6px rgba(34, 197, 94, 0.55);
}
@keyframes demoGlowPulse {
  0%, 100% { opacity: 0.7; transform: translateX(-50%) scaleX(1); }
  50% { opacity: 1; transform: translateX(-50%) scaleX(1.12); }
}
.demo-bubble.is-open {
  grid-column: 1 / -1;
  align-items: stretch;
  gap: 12px;
}
.demo-bubble.is-open .demo-bubble-trigger {
  pointer-events: none;
  align-self: center;
  width: auto;
}
.demo-bubble.is-open .demo-bubble-label { display: none; }
.demo-bubble-detail {
  width: 100%;
  text-align: left;
  border: 1px solid #e4e4e7;
  border-radius: var(--radius-md);
  background: #fafafa;
  padding: 12px 14px 14px;
  animation: demoBubbleExpand 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes demoBubbleExpand {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.demo-bubble-detail-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e4e4e7;
}
.demo-bubble-back {
  appearance: none;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin-top: 1px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #a1a1aa;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.demo-bubble-back:hover {
  color: #52525b;
  background: #f4f4f5;
}
.demo-bubble-back:focus-visible {
  outline: 2px solid #18181b;
  outline-offset: 2px;
}
.demo-bubble-detail-meta { flex: 1; min-width: 0; }
.demo-bubble-detail-no {
  font-family: var(--font-brand);
  font-size: 15px;
  font-weight: 800;
  color: #18181b;
}
.demo-bubble-detail-ext {
  font-size: 12px;
  color: #71717a;
  margin-top: 2px;
}
.demo-bubble-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #16a34a;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  padding: 4px 9px;
  margin-left: auto;
}
.demo-bubble-live .pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
  animation: demoLivePulse 1.5s ease-out infinite;
}
@keyframes demoLivePulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.demo-bubble-section + .demo-bubble-section { margin-top: 12px; }
.demo-bubble-section-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #a1a1aa;
  margin-bottom: 6px;
}
.demo-bubble-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.demo-bubble-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  padding: 8px 10px;
}
.demo-bubble-row-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #27272a;
}
.demo-bubble-row-meta {
  font-size: 11px;
  color: #a1a1aa;
  margin-top: 2px;
}
.demo-bubble-status {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f4f4f5;
  color: #52525b;
}
.demo-bubble-status.is-prep {
  background: #eff6ff;
  color: #1d4ed8;
}
.demo-bubble-status.is-open {
  background: #fff7ed;
  color: #c2410c;
}
.demo-bubble-status.is-done {
  background: #f0fdf4;
  color: #15803d;
}
.demo-bubble-empty {
  font-size: 12px;
  color: #a1a1aa;
  padding: 4px 2px;
}
@media (max-width: 640px) {
  .demo-bubble-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 12px;
    padding: 16px 12px 18px;
  }
  .demo-bubble-orb {
    width: 58px;
    height: 58px;
  }
  .demo-bubble-no { font-size: 15px; }
}
.demo-table-wrap { overflow-x: auto; }
.demo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.demo-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #71717a;
  border-bottom: 1px solid #e4e4e7;
  background: #fafafa;
  white-space: nowrap;
}
.demo-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f4f4f5;
  color: #3f3f46;
  vertical-align: middle;
}
.demo-table tr:last-child td { border-bottom: none; }
.demo-select {
  font-family: var(--font-brand);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid #e4e4e7;
  background: #fff;
  color: #18181b;
  cursor: pointer;
  max-width: 140px;
}
.demo-select.status-pending,
.demo-select.status-open { border-color: #fdba74; background: #fff7ed; color: #c2410c; }
.demo-select.status-prep,
.demo-select.status-progress { border-color: #93c5fd; background: #eff6ff; color: #1d4ed8; }
.demo-select.status-done,
.demo-select.status-resolved { border-color: #86efac; background: #f0fdf4; color: #15803d; }
.demo-btn-sm {
  font-family: var(--font-brand);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #e4e4e7;
  background: #18181b;
  color: #fff;
  cursor: pointer;
}
.demo-btn-sm:hover { filter: brightness(1.1); }
.demo-btn-sm:disabled { opacity: 0.45; cursor: not-allowed; }
.demo-btn-ghost {
  background: #fff;
  color: #18181b;
}
.demo-answer-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  min-width: 220px;
}
.demo-answer-row textarea {
  flex: 1;
  min-height: 54px;
  resize: vertical;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  padding: 6px 8px;
  font-family: var(--font-body);
  font-size: 12px;
}
.demo-answered {
  font-size: 12px;
  color: #15803d;
  font-weight: 600;
}
.demo-empty {
  padding: 28px 16px;
  text-align: center;
  color: #a1a1aa;
  font-size: 13px;
}
.demo-toast {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 5;
  background: #18181b;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.2);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  max-width: min(280px, calc(100% - 32px));
}
.demo-toast.show {
  opacity: 1;
  transform: translateY(0);
}
.demo-kb-topic {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f4f4f5;
  color: #52525b;
  margin-bottom: 4px;
}
@media (max-width: 1024px) {
  .demo-frame { grid-template-columns: 1fr; max-height: none; }
  .demo-sidebar { display: none; }
}
