/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-darkest: #111111;
  --bg-dark: #1A1A2E;
  --bg-panel: #16213E;
  --bg-card: #1E2A4A;
  --bg-hover: #253358;
  --accent-blue: #4361EE;
  --accent-blue-light: #5A7BFF;
  --success: #06D6A0;
  --warning: #FFD166;
  --danger: #EF476F;
  --text-white: #F8F9FA;
  --text-muted: #9CA3AF;
  --text-dim: #6B7280;
  --border-color: #2A2A4A;
  --border-light: #3A3A5A;
  --sidebar-width: 220px;
  --detail-width: 380px;
  --topbar-height: 40px;
  --transition-fast: 0.2s ease;
  --transition-med: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-darkest);
  color: var(--text-white);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--border-light);
}

/* ============================================
   TOP DEMO BANNER
   ============================================ */
.demo-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-height);
  background: linear-gradient(135deg, #0D0D1A 0%, #1A1A2E 100%);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  z-index: 1000;
  padding: 0 16px;
}

.demo-banner__label {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.demo-banner__label .dot {
  width: 6px;
  height: 6px;
  background: var(--danger);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.demo-banner__cta {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-blue-light);
  text-decoration: none;
  padding: 4px 12px;
  border: 1px solid var(--accent-blue);
  border-radius: 4px;
  transition: all var(--transition-fast);
  letter-spacing: 0.3px;
}

.demo-banner__cta:hover {
  background: var(--accent-blue);
  color: #fff;
}

/* ============================================
   MAIN LAYOUT
   ============================================ */
.app-layout {
  display: flex;
  height: calc(100vh - var(--topbar-height));
  margin-top: var(--topbar-height);
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--bg-dark);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-med);
  z-index: 800;
}

.sidebar__brand {
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar__brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar__logo {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent-blue), #7B2FF7);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  flex-shrink: 0;
}

.sidebar__brand-text {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar__brand-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-blue-light);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 2px;
}

.sidebar__brand-badge svg {
  width: 10px;
  height: 10px;
}

/* SIDEBAR CLOSE BUTTON (mobile) */
.sidebar__close-btn {
  display: none;
  margin-left: auto;
  padding: 4px;
  border-radius: 6px;
  color: var(--text-muted);
  transition: var(--transition-fast);
  cursor: pointer;
  background: none;
  border: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sidebar__close-btn:hover {
  background: var(--bg-hover);
  color: var(--text-white);
}

/* NAV */
.sidebar__nav {
  flex: 1;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.sidebar__nav-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 12px 12px 6px;
}

.sidebar__nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  user-select: none;
}

.sidebar__nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-white);
}

.sidebar__nav-item.active {
  background: rgba(67, 97, 238, 0.15);
  color: var(--accent-blue-light);
}

.sidebar__nav-item.active .sidebar__nav-icon {
  color: var(--accent-blue-light);
}

.sidebar__nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text-dim);
  transition: color var(--transition-fast);
}

.sidebar__nav-item:hover .sidebar__nav-icon {
  color: var(--text-muted);
}

.sidebar__nav-count {
  margin-left: auto;
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  min-width: 22px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--text-muted);
}

.sidebar__nav-count.danger {
  background: var(--danger);
  color: #fff;
}

/* Sidebar footer */
.sidebar__footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
}

.sidebar__footer-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: color var(--transition-fast);
  cursor: pointer;
}

.sidebar__footer-link:hover {
  color: var(--text-muted);
}

.sidebar__footer-link svg {
  width: 16px;
  height: 16px;
}

/* ============================================
   MAIN PANEL (CENTER)
   ============================================ */
.main-panel {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-darkest);
  overflow: hidden;
}

/* HEADER */
.main-header {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-darkest);
}

.main-header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.main-header__title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.hamburger-btn {
  display: none;
  width: 36px;
  height: 36px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-white);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hamburger-btn svg {
  width: 20px;
  height: 20px;
}

.main-header__controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 500px;
}

.search-input {
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 12px 0 34px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-white);
  font-family: 'Manrope', sans-serif;
  font-size: 0.82rem;
  transition: border-color var(--transition-fast);
  position: relative;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-blue);
}

.search-input::placeholder {
  color: var(--text-dim);
}

.search-wrapper {
  position: relative;
  flex: 1;
  min-width: 0;
}

.search-wrapper svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--text-dim);
  pointer-events: none;
}

.filter-select {
  height: 34px;
  padding: 0 30px 0 10px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-muted);
  font-family: 'Manrope', sans-serif;
  font-size: 0.78rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239CA3AF' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  white-space: nowrap;
}

.filter-select:focus {
  outline: none;
  border-color: var(--accent-blue);
}

/* STATS BAR */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
}

.stat-card {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color var(--transition-fast);
}

.stat-card:hover {
  border-color: var(--border-light);
}

.stat-card__value {
  font-family: 'Space Mono', monospace;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-white);
  line-height: 1;
}

.stat-card__label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-card__change {
  font-family: 'Space Mono', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 2px;
}

.stat-card__change.positive {
  color: var(--success);
}

.stat-card__change.negative {
  color: var(--danger);
}

/* INQUIRY LIST */
.inquiry-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.inquiry-card {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.inquiry-card:hover {
  border-color: var(--border-light);
  background: var(--bg-panel);
}

.inquiry-card.selected {
  border-color: var(--accent-blue);
  background: rgba(67, 97, 238, 0.08);
  box-shadow: 0 0 0 1px rgba(67, 97, 238, 0.3);
}

.inquiry-card__top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.new {
  background: var(--success);
  box-shadow: 0 0 6px rgba(6, 214, 160, 0.5);
}

.status-dot.in-progress {
  background: var(--accent-blue);
  box-shadow: 0 0 6px rgba(67, 97, 238, 0.5);
}

.status-dot.done {
  background: var(--text-dim);
}

.inquiry-card__name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-white);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.channel-badge.website {
  background: rgba(67, 97, 238, 0.15);
  color: var(--accent-blue-light);
}

.channel-badge.email {
  background: rgba(255, 209, 102, 0.15);
  color: var(--warning);
}

.channel-badge.online {
  background: rgba(123, 47, 247, 0.15);
  color: #B07BFF;
}

.inquiry-card__time {
  font-family: 'Space Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-dim);
  white-space: nowrap;
  flex-shrink: 0;
}

.inquiry-card__preview {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}

.inquiry-card__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.inquiry-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--bg-card);
  color: var(--text-muted);
  white-space: nowrap;
}

.tag.urgent {
  background: rgba(239, 71, 111, 0.15);
  color: var(--danger);
}

.inquiry-card__actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.btn-sm {
  font-family: 'Manrope', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-sm.primary {
  background: var(--accent-blue);
  color: #fff;
}

.btn-sm.primary:hover {
  background: var(--accent-blue-light);
}

.btn-sm.ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.btn-sm.ghost:hover {
  border-color: var(--text-muted);
  color: var(--text-white);
}

/* ============================================
   DETAIL PANEL (RIGHT)
   ============================================ */
.detail-panel {
  width: var(--detail-width);
  min-width: var(--detail-width);
  background: var(--bg-dark);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform var(--transition-med), opacity var(--transition-med);
}

.detail-panel.empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-panel__empty {
  text-align: center;
  color: var(--text-dim);
  padding: 32px;
}

.detail-panel__empty svg {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  opacity: 0.3;
}

.detail-panel__empty p {
  font-size: 0.85rem;
}

/* Detail Header */
.detail-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-color);
}

.detail-header__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.detail-header__name {
  font-size: 1.05rem;
  font-weight: 800;
}

.detail-header__status {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-header__status.new {
  background: rgba(6, 214, 160, 0.15);
  color: var(--success);
}

.detail-header__status.in-progress {
  background: rgba(67, 97, 238, 0.15);
  color: var(--accent-blue-light);
}

.detail-header__status.done {
  background: rgba(107, 114, 128, 0.2);
  color: var(--text-dim);
}

.detail-close-btn {
  display: none;
  width: 30px;
  height: 30px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.detail-close-btn svg {
  width: 16px;
  height: 16px;
}

/* Contact Info */
.detail-contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.detail-contact__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.detail-contact__item svg {
  width: 14px;
  height: 14px;
  color: var(--text-dim);
  flex-shrink: 0;
}

.detail-contact__item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Timeline */
.detail-timeline {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.detail-timeline__title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.timeline-item {
  display: flex;
  gap: 12px;
  padding-bottom: 18px;
  position: relative;
}

.timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 24px;
  bottom: 0;
  width: 1px;
  background: var(--border-color);
}

.timeline-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
}

.timeline-dot svg {
  width: 11px;
  height: 11px;
  color: var(--text-muted);
}

.timeline-dot.blue {
  border-color: var(--accent-blue);
}

.timeline-dot.blue svg {
  color: var(--accent-blue-light);
}

.timeline-dot.green {
  border-color: var(--success);
}

.timeline-dot.green svg {
  color: var(--success);
}

.timeline-content {
  flex: 1;
  min-width: 0;
}

.timeline-content__title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-white);
  margin-bottom: 2px;
}

.timeline-content__desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.timeline-content__time {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 4px;
}

/* Quick Reply Templates */
.detail-quick {
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
}

.detail-quick__title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.quick-templates {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.quick-template-btn {
  font-family: 'Manrope', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.quick-template-btn:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue-light);
  background: rgba(67, 97, 238, 0.08);
}

/* Reply Area */
.detail-reply {
  padding: 14px 20px 18px;
  border-top: 1px solid var(--border-color);
}

.detail-reply__textarea {
  width: 100%;
  height: 120px;
  padding: 10px 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-white);
  font-family: 'Manrope', sans-serif;
  font-size: 0.82rem;
  resize: vertical;
  transition: border-color var(--transition-fast);
  line-height: 1.5;
}

.detail-reply__textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
}

.detail-reply__textarea::placeholder {
  color: var(--text-dim);
}

.detail-reply__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.btn-send {
  font-family: 'Manrope', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 20px;
  background: var(--accent-blue);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-send:hover {
  background: var(--accent-blue-light);
  transform: translateY(-1px);
}

.btn-send svg {
  width: 14px;
  height: 14px;
}

/* ============================================
   BOTTOM CTA
   ============================================ */
.bottom-cta {
  background: linear-gradient(135deg, #0D0D1A 0%, var(--bg-dark) 100%);
  border-top: 1px solid var(--border-color);
  padding: 40px 24px;
  text-align: center;
}

.bottom-cta__title {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-white);
}

.bottom-cta__sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.bottom-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--accent-blue);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  border: none;
  cursor: pointer;
}

.bottom-cta__btn:hover {
  background: var(--accent-blue-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(67, 97, 238, 0.3);
}

.bottom-cta__btn svg {
  width: 16px;
  height: 16px;
}

/* ============================================
   MOBILE OVERLAY
   ============================================ */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 790;
}

.sidebar-overlay.active {
  display: block;
}

.detail-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 890;
}

.detail-overlay.active {
  display: block;
}

/* ============================================
   COUNT-UP ANIMATION
   ============================================ */
.count-up {
  display: inline-block;
}

/* Hidden inquiries during filter */
.inquiry-card.hidden {
  display: none;
}

/* No results message */
.no-results {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-dim);
  font-size: 0.88rem;
  display: none;
}

.no-results.visible {
  display: block;
}

/* ============================================
   LIGHT THEME
   ============================================ */
[data-theme="light"] {
  --bg-darkest: #F5F5F0;
  --bg-dark: #FFFFFF;
  --bg-panel: #F0F2F5;
  --bg-card: #E8ECF0;
  --bg-hover: #DDE1E6;
  --accent-blue: #3B55D9;
  --accent-blue-light: #4361EE;
  --success: #059669;
  --warning: #D97706;
  --danger: #DC2626;
  --text-white: #111827;
  --text-muted: #4B5563;
  --text-dim: #6B7280;
  --border-color: #D1D5DB;
  --border-light: #E5E7EB;
}

[data-theme="light"] .demo-banner {
  background: linear-gradient(135deg, #E8ECF0 0%, #FFFFFF 100%);
}

[data-theme="light"] .sidebar__logo {
  box-shadow: 0 2px 8px rgba(67, 97, 238, 0.2);
}

[data-theme="light"] .stat-card__change.positive {
  color: #059669;
}

[data-theme="light"] .stat-card__change.negative {
  color: #DC2626;
}

[data-theme="light"] .status-dot.new {
  background: #059669;
  box-shadow: 0 0 6px rgba(5, 150, 105, 0.4);
}

[data-theme="light"] .status-dot.in-progress {
  background: #3B55D9;
  box-shadow: 0 0 6px rgba(59, 85, 217, 0.4);
}

[data-theme="light"] .channel-badge.website {
  background: rgba(59, 85, 217, 0.1);
  color: #3B55D9;
}

[data-theme="light"] .channel-badge.email {
  background: rgba(217, 119, 6, 0.1);
  color: #B45309;
}

[data-theme="light"] .channel-badge.online {
  background: rgba(124, 58, 237, 0.1);
  color: #7C3AED;
}

[data-theme="light"] .inquiry-card.selected {
  background: rgba(59, 85, 217, 0.06);
  box-shadow: 0 0 0 1px rgba(59, 85, 217, 0.25);
}

[data-theme="light"] .tag.urgent {
  background: rgba(220, 38, 38, 0.08);
  color: #DC2626;
}

[data-theme="light"] .detail-header__status.new {
  background: rgba(5, 150, 105, 0.1);
  color: #059669;
}

[data-theme="light"] .detail-header__status.in-progress {
  background: rgba(59, 85, 217, 0.1);
  color: #3B55D9;
}

[data-theme="light"] .bottom-cta {
  background: linear-gradient(135deg, #E8ECF0 0%, #FFFFFF 100%);
}

[data-theme="light"] .filter-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%234B5563' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: #C4C9CF;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: #9CA3AF;
}

/* Theme Toggle */
.theme-toggle {
  width: 34px;
  height: 34px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue-light);
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
}

.theme-toggle .icon-light,
[data-theme="light"] .theme-toggle .icon-dark {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-light {
  display: block;
}

/* ============================================
   STATISTICS PANEL
   ============================================ */
.stats-view {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.stats-view.active {
  display: block;
}

.stats-view__section {
  margin-bottom: 28px;
}

.stats-view__section-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-dim);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stats-view__section-title svg {
  width: 16px;
  height: 16px;
}

/* Bar chart */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 160px;
  padding: 0 4px;
}

.bar-chart__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
  justify-content: flex-end;
}

.bar-chart__bar {
  width: 100%;
  border-radius: 4px 4px 0 0;
  background: var(--accent-blue);
  transition: height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 4px;
  position: relative;
}

.bar-chart__bar:hover {
  background: var(--accent-blue-light);
}

.bar-chart__bar-value {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-white);
  white-space: nowrap;
}

.bar-chart__label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

/* Donut chart */
.donut-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  align-items: center;
}

.donut-chart {
  width: 140px;
  height: 140px;
  position: relative;
}

.donut-chart svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.donut-chart circle {
  fill: none;
  stroke-width: 20;
  transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.donut-center__value {
  font-family: 'Space Mono', monospace;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-white);
}

.donut-center__label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.donut-legend__item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.donut-legend__dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.donut-legend__count {
  margin-left: auto;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  color: var(--text-white);
}

/* KPI cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.kpi-card {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  transition: border-color var(--transition-fast);
}

.kpi-card:hover {
  border-color: var(--border-light);
}

.kpi-card__icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.kpi-card__icon svg {
  width: 16px;
  height: 16px;
}

.kpi-card__icon.blue {
  background: rgba(67, 97, 238, 0.15);
  color: var(--accent-blue-light);
}

.kpi-card__icon.green {
  background: rgba(6, 214, 160, 0.15);
  color: var(--success);
}

.kpi-card__icon.yellow {
  background: rgba(255, 209, 102, 0.15);
  color: var(--warning);
}

.kpi-card__icon.red {
  background: rgba(239, 71, 111, 0.15);
  color: var(--danger);
}

.kpi-card__value {
  font-family: 'Space Mono', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 4px;
}

.kpi-card__label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.kpi-card__trend {
  font-family: 'Space Mono', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 6px;
}

.kpi-card__trend.positive {
  color: var(--success);
}

.kpi-card__trend.negative {
  color: var(--danger);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .detail-panel {
    position: fixed;
    top: var(--topbar-height);
    right: 0;
    bottom: 0;
    z-index: 900;
    transform: translateX(100%);
    box-shadow: -10px 0 40px rgba(0,0,0,0.4);
  }

  .detail-panel.mobile-open {
    transform: translateX(0);
  }

  .detail-close-btn {
    display: flex;
  }
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    bottom: 0;
    transform: translateX(-100%);
    box-shadow: 10px 0 40px rgba(0,0,0,0.4);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .hamburger-btn {
    display: flex;
  }

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 10px 14px;
  }

  .main-header {
    padding: 12px 14px 10px;
  }

  .main-header__controls {
    max-width: 100%;
  }

  .inquiry-list {
    padding: 8px;
  }

  .inquiry-card__actions {
    display: none;
  }

  .detail-panel {
    width: 100%;
    min-width: 100%;
  }

  .sidebar__close-btn {
    display: flex;
  }

  .demo-banner__label span:not(.dot) {
    font-size: 0.65rem;
    letter-spacing: 1px;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .demo-banner__cta {
    font-size: 0.75rem;
    padding: 4px 10px;
  }
}

@media (max-width: 480px) {
  .stats-bar {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 8px 10px;
  }

  .stat-card {
    padding: 10px;
  }

  .stat-card__value {
    font-size: 1.1rem;
  }

  .main-header__top {
    flex-wrap: wrap;
  }

  .filter-select {
    flex: 1;
    min-width: 0;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .donut-grid {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .bar-chart {
    height: 120px;
    gap: 4px;
  }
}

/* ============================================
   LANGUAGE SWITCHER
   ============================================ */
.lang-switcher{position:relative;flex-shrink:0}
.lang-trigger{display:flex;align-items:center;gap:5px;padding:6px 10px;border-radius:6px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.1);font-size:13px;font-weight:600;cursor:pointer;transition:all .2s;color:rgba(255,255,255,.7)}
.lang-trigger:hover{border-color:rgba(255,255,255,.2);color:#fff}
.lang-chevron{width:10px;height:10px;transition:transform .2s}
.lang-dropdown{position:absolute;top:calc(100% + 6px);right:0;background:#1E1E2E;border:1px solid rgba(255,255,255,.1);border-radius:8px;box-shadow:0 8px 24px rgba(0,0,0,.4);min-width:150px;z-index:200;opacity:0;visibility:hidden;transform:translateY(-4px);transition:all .2s}
.lang-dropdown.show{opacity:1;visibility:visible;transform:translateY(0)}
.lang-option{display:block;width:100%;padding:8px 14px;text-align:left;font-size:13px;font-weight:500;color:rgba(255,255,255,.5);background:none;border:none;cursor:pointer;transition:all .15s}
.lang-option:first-child{border-radius:7px 7px 0 0}
.lang-option:last-child{border-radius:0 0 7px 7px}
.lang-option:hover{background:rgba(255,255,255,.06);color:#fff}
.lang-option.active{color:#fff;font-weight:700;background:rgba(255,255,255,.08)}
[data-theme="light"] .lang-trigger{background:rgba(0,0,0,.04);border-color:rgba(0,0,0,.12);color:rgba(0,0,0,.6)}
[data-theme="light"] .lang-trigger:hover{border-color:rgba(0,0,0,.2);color:#111}
[data-theme="light"] .lang-dropdown{background:#fff;border-color:rgba(0,0,0,.1);box-shadow:0 8px 24px rgba(0,0,0,.12)}
[data-theme="light"] .lang-option{color:rgba(0,0,0,.45)}
[data-theme="light"] .lang-option:hover{background:rgba(0,0,0,.04);color:#111}
[data-theme="light"] .lang-option.active{color:#111;background:rgba(0,0,0,.06)}