/**
 * SamoChat – SP Design System (Plain CSS)
 * Indigo brand, dark sidebar, gradient cards, modern animations
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ═══ RESET & BASE ═══════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --brand-50:  #EEF2FF;
  --brand-100: #E0E7FF;
  --brand-200: #C7D2FE;
  --brand-300: #A5B4FC;
  --brand-400: #818CF8;
  --brand-500: #6366F1;
  --brand-600: #4F46E5;
  --brand-700: #4338CA;
  --brand-800: #3730A3;
  --brand-900: #312E81;

  --sidebar-bg: #0F172A;
  --sidebar-hover: #1E293B;
  --sidebar-active: #334155;
  --sidebar-text: #94A3B8;
  --sidebar-text-active: #F8FAFC;

  --surface-0: #FFFFFF;
  --surface-50: #F8FAFC;
  --surface-100: #F1F5F9;
  --surface-200: #E2E8F0;
  --surface-300: #CBD5E1;

  --slate-400: #94A3B8;
  --slate-500: #64748B;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1E293B;
  --slate-900: #0F172A;

  --shadow-card: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-card-hover: 0 4px 16px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-glow: 0 0 20px rgba(99,102,241,0.15);
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--slate-800);
  background: var(--surface-50);
  min-height: 100vh;
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.4); border-radius: 100px; }
::-webkit-scrollbar-thumb:hover { background: rgba(148,163,184,0.6); }
* { scrollbar-width: thin; scrollbar-color: rgba(148,163,184,0.4) transparent; }
::selection { background: rgba(199,210,254,0.5); color: var(--brand-900); }

/* ═══ ANIMATIONS ═════════════════════════════ */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes scale-in {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

.animate-fade-in { animation: fade-in 0.4s ease-out both; }
.animate-slide-up { animation: slide-up 0.5s ease-out both; }
.animate-scale-in { animation: scale-in 0.3s ease-out both; }

.stagger > * { animation: fade-in 0.4s ease-out both; }
.stagger > *:nth-child(1) { animation-delay: 0ms; }
.stagger > *:nth-child(2) { animation-delay: 60ms; }
.stagger > *:nth-child(3) { animation-delay: 120ms; }
.stagger > *:nth-child(4) { animation-delay: 180ms; }
.stagger > *:nth-child(5) { animation-delay: 240ms; }
.stagger > *:nth-child(6) { animation-delay: 300ms; }
.stagger > *:nth-child(7) { animation-delay: 360ms; }
.stagger > *:nth-child(8) { animation-delay: 420ms; }

/* ═══ INPUTS ═════════════════════════════════ */
.sp-input {
  width: 100%;
  background: white;
  border: 1px solid var(--surface-200);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--slate-800);
  outline: none;
  transition: all 0.2s;
  font-family: inherit;
}
.sp-input::placeholder { color: var(--slate-400); }
.sp-input:hover { border-color: var(--surface-300); }
.sp-input:focus {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 4px var(--brand-50), var(--shadow-glow);
}

.sp-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--slate-600);
  margin-bottom: 6px;
}

textarea.sp-input {
  resize: none;
  font-family: inherit;
}

/* ═══ BUTTONS ════════════════════════════════ */
.sp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease-out;
  border: none;
  font-family: inherit;
  text-decoration: none;
}
.sp-btn:active { transform: scale(0.97); }
.sp-btn:disabled { opacity: 0.5; pointer-events: none; }

.sp-btn-primary {
  background: var(--brand-500);
  color: white;
  box-shadow: 0 1px 2px rgba(99,102,241,0.3), 0 0 0 1px rgba(99,102,241,0.1);
}
.sp-btn-primary:hover {
  background: var(--brand-600);
  box-shadow: 0 4px 12px rgba(99,102,241,0.3), 0 0 0 1px rgba(99,102,241,0.2);
  transform: translateY(-1px);
}

.sp-btn-secondary {
  background: white;
  color: var(--slate-700);
  border: 1px solid var(--surface-200);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.sp-btn-secondary:hover {
  background: var(--surface-50);
  border-color: var(--surface-300);
  transform: translateY(-1px);
  box-shadow: var(--shadow-card);
}

.sp-btn-ghost {
  background: transparent;
  color: var(--slate-500);
  padding: 10px 16px;
}
.sp-btn-ghost:hover {
  background: var(--surface-100);
  color: var(--slate-700);
}

.sp-btn-danger {
  background: transparent;
  color: #DC2626;
}
.sp-btn-danger:hover { background: #FEF2F2; }

/* ═══ CARDS ══════════════════════════════════ */
.sp-card {
  background: white;
  border-radius: 16px;
  border: 1px solid rgba(226,232,240,0.8);
  box-shadow: var(--shadow-card);
}

.sp-card-interactive {
  background: white;
  border-radius: 16px;
  border: 1px solid rgba(226,232,240,0.8);
  box-shadow: var(--shadow-card);
  transition: all 0.3s ease-out;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.sp-card-interactive:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
  border-color: var(--surface-300);
}

/* ═══ BADGES ═════════════════════════════════ */
.sp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.badge-neu { background: #F0FDF4; color: #15803D; border: 1px solid #BBF7D0; }
.badge-in_bearbeitung { background: #FFFBEB; color: #B45309; border: 1px solid #FDE68A; }
.badge-angebot_gesendet { background: #EEF2FF; color: #4338CA; border: 1px solid #C7D2FE; }
.badge-erledigt { background: var(--surface-100); color: var(--slate-600); border: 1px solid var(--surface-200); }

.badge-bot-on { background: #F0FDF4; color: #16A34A; border: 1px solid #BBF7D0; }
.badge-bot-off { background: var(--surface-100); color: var(--slate-500); border: 1px solid var(--surface-200); }

/* ═══ LOGIN PAGE ═════════════════════════════ */
.login-page {
  min-height: 100vh;
  display: flex;
}

.login-left {
  display: none;
  width: 480px;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-700), var(--brand-900));
  position: relative;
  overflow: hidden;
}

.login-left-blur1 {
  position: absolute;
  top: 15%;
  left: -80px;
  width: 320px;
  height: 320px;
  background: rgba(129,140,248,0.2);
  border-radius: 50%;
  filter: blur(48px);
}

.login-left-blur2 {
  position: absolute;
  bottom: 20%;
  right: -80px;
  width: 384px;
  height: 384px;
  background: rgba(168,85,247,0.15);
  border-radius: 50%;
  filter: blur(48px);
}

.login-left-grid {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: linear-gradient(rgba(255,255,255,0.1) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 40px 40px;
}

.login-left-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 64px;
  height: 100%;
}

.login-logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.login-logo span {
  font-size: 24px;
  font-weight: 800;
  color: white;
}

.login-left h2 {
  font-size: 32px;
  font-weight: 700;
  color: white;
  line-height: 1.2;
  margin-bottom: 16px;
}

.login-left p {
  color: var(--brand-200);
  font-size: 16px;
  line-height: 1.6;
  max-width: 380px;
}

.login-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
}

.login-feature-tag {
  padding: 6px 12px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  color: rgba(255,255,255,0.8);
  font-size: 12px;
  font-weight: 500;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.1);
}

.login-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 32px;
  background: white;
}

.login-form {
  width: 100%;
  max-width: 400px;
}

.login-form h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--slate-900);
  letter-spacing: -0.025em;
}

.login-form .subtitle {
  color: var(--slate-400);
  margin-top: 4px;
  margin-bottom: 32px;
  font-size: 14px;
}

.login-form form { display: flex; flex-direction: column; gap: 20px; }

.login-form .sp-btn-primary {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  margin-top: 4px;
}

.login-error {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #FEF2F2;
  border: 1px solid #FEE2E2;
  color: #DC2626;
  padding: 16px;
  border-radius: 12px;
  font-size: 14px;
  animation: scale-in 0.3s ease-out both;
}

@media (min-width: 1024px) {
  .login-left { display: flex; }
}

/* ═══ APP LAYOUT ═════════════════════════════ */
.app-layout {
  display: flex;
  height: 100vh;
  background: var(--surface-50);
}

/* ═══ SIDEBAR ════════════════════════════════ */
.sidebar {
  width: 260px;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: relative;
  z-index: 20;
}

.sidebar-brand {
  height: 68px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  flex-shrink: 0;
}

.sidebar-logo {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-400), var(--brand-600));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
  flex-shrink: 0;
}

.sidebar-logo span {
  color: white;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.sidebar-brand-text {
  margin-left: 12px;
}

.sidebar-brand-text .name {
  font-size: 17px;
  font-weight: 700;
  color: white;
  letter-spacing: -0.025em;
}

.sidebar-brand-text .sub {
  display: block;
  font-size: 10px;
  color: var(--sidebar-text);
  margin-top: -2px;
  font-weight: 500;
}

.sidebar-divider {
  margin: 0 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--slate-700), transparent);
}

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

.sidebar-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--sidebar-text);
  text-decoration: none;
  transition: all 0.2s;
}

.sidebar-link:hover {
  background: rgba(255,255,255,0.06);
  color: var(--surface-200);
}

.sidebar-link.active {
  background: rgba(99,102,241,0.15);
  color: var(--brand-300);
}

.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--brand-400);
  border-radius: 0 4px 4px 0;
}

.sidebar-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.sidebar-user {
  border-top: 1px solid var(--slate-800);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.sidebar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-400), #A855F7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.1);
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.sidebar-logout {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: var(--sidebar-text);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.sidebar-logout:hover {
  background: rgba(255,255,255,0.08);
  color: #F87171;
}

.sidebar-logout svg { width: 16px; height: 16px; }

/* ═══ MAIN CONTENT ═══════════════════════════ */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
}

.main-inner {
  max-width: 1360px;
  margin: 0 auto;
}

/* ═══ HERO GREETING ══════════════════════════ */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-500), #A855F7);
  padding: 32px;
  margin-bottom: 32px;
  animation: fade-in 0.4s ease-out both;
}

.hero-blur1 {
  position: absolute;
  top: 0;
  right: 0;
  width: 256px;
  height: 256px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  transform: translate(25%, -50%);
}

.hero-blur2 {
  position: absolute;
  bottom: 0;
  left: 33%;
  width: 192px;
  height: 192px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  transform: translateY(50%);
}

.hero-content {
  position: relative;
  z-index: 10;
}

.hero-sub {
  color: var(--brand-200);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}

.hero h1 {
  font-size: 24px;
  font-weight: 700;
  color: white;
}

.hero p {
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  margin-top: 4px;
}

/* ═══ STAT CARDS ═════════════════════════════ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  padding: 20px;
}

.stat-card .stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  transition: transform 0.3s;
}

.sp-card-interactive:hover .stat-icon { transform: scale(1.1); }

.stat-icon svg { width: 20px; height: 20px; color: white; }

.stat-icon.blue { background: linear-gradient(135deg, #3B82F6, #2563EB); }
.stat-icon.amber { background: linear-gradient(135deg, #F59E0B, #EA580C); }
.stat-icon.rose { background: linear-gradient(135deg, #F43F5E, #EC4899); }
.stat-icon.emerald { background: linear-gradient(135deg, #10B981, #14B8A6); }

.stat-value {
  font-size: 30px;
  font-weight: 700;
  color: var(--slate-900);
  letter-spacing: -0.025em;
}

.stat-label {
  font-size: 12px;
  color: var(--slate-400);
  font-weight: 500;
  margin-top: 4px;
}

/* ═══ FILTERS ════════════════════════════════ */
.filters {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 16px;
  border: 1px solid var(--surface-200);
  background: white;
  border-radius: 100px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--slate-600);
  transition: all 0.2s;
  font-family: inherit;
}

.filter-btn:hover {
  border-color: var(--surface-300);
  background: var(--surface-50);
}

.filter-btn.active {
  background: var(--brand-500);
  color: white;
  border-color: var(--brand-500);
}

/* ═══ CONVERSATION LIST ══════════════════════ */
.conv-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.conv-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  text-decoration: none;
  color: inherit;
}

.conv-card-left { flex: 1; min-width: 0; }

.conv-phone {
  font-size: 15px;
  font-weight: 600;
  color: var(--slate-800);
}

.conv-preview {
  font-size: 13px;
  color: var(--slate-500);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 500px;
}

.conv-seller {
  font-size: 12px;
  color: var(--indigo-400);
  margin-top: 4px;
}

.conv-card-right {
  text-align: right;
  flex-shrink: 0;
  margin-left: 16px;
}

.conv-time {
  font-size: 12px;
  color: var(--slate-400);
  font-family: 'Inter', monospace;
}

.conv-card-right .sp-badge { margin-top: 6px; }

/* ═══ CONVERSATION VIEW ══════════════════════ */
.conv-layout {
  display: flex;
  height: calc(100vh - 68px);
}

.conv-sidebar-panel {
  width: 320px;
  background: white;
  border-right: 1px solid var(--surface-200);
  padding: 24px;
  overflow-y: auto;
  flex-shrink: 0;
}

.conv-sidebar-panel h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 16px;
  letter-spacing: -0.025em;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--surface-100);
}

.info-label { color: var(--slate-400); font-weight: 500; }
.info-value { color: var(--slate-800); font-weight: 500; }

.conv-sidebar-panel select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--surface-200);
  border-radius: 12px;
  font-size: 13px;
  font-family: inherit;
  color: var(--slate-700);
  background: white;
  cursor: pointer;
  outline: none;
  transition: all 0.2s;
}

.conv-sidebar-panel select:focus {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 4px var(--brand-50);
}

.vehicle-info, .order-info { margin-top: 24px; }
.vehicle-info h4, .order-info h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-800);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.vehicle-image {
  margin-top: 8px;
  max-width: 100%;
  border-radius: 12px;
  cursor: pointer;
}

.msg-image {
  max-width: 240px;
  max-height: 300px;
  border-radius: 8px;
  margin-bottom: 4px;
  cursor: pointer;
}

/* ═══ LIGHTBOX ═══════════════════════════════ */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.85);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  animation: fade-in 0.2s ease-out;
}

.lightbox-open {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  object-fit: contain;
}

/* ═══ CHAT ═══════════════════════════════════ */
.conv-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.message {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
  animation: fade-in 0.3s ease-out both;
}

.msg-customer {
  background: white;
  align-self: flex-start;
  border: 1px solid var(--surface-200);
  border-bottom-left-radius: 4px;
}

.msg-bot {
  background: var(--brand-50);
  align-self: flex-end;
  border: 1px solid var(--brand-100);
  border-bottom-right-radius: 4px;
}

.msg-seller {
  background: #DBEAFE;
  align-self: flex-end;
  border: 1px solid #BFDBFE;
  border-bottom-right-radius: 4px;
}

.msg-sender {
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.msg-customer .msg-sender { color: var(--slate-400); }
.msg-bot .msg-sender { color: var(--brand-600); }
.msg-seller .msg-sender { color: #2563EB; }

.msg-time {
  font-size: 11px;
  color: var(--slate-400);
  margin-top: 4px;
  text-align: right;
}

/* ═══ REPLY BOX ══════════════════════════════ */
.reply-box {
  padding: 16px 24px;
  background: white;
  border-top: 1px solid var(--surface-200);
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.reply-box textarea {
  flex: 1;
}

.btn-send {
  padding: 10px 24px;
}

/* ═══ EMPTY & LOADING STATES ═════════════════ */
.sp-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 16px;
  color: var(--slate-400);
  font-size: 14px;
}

.loading {
  text-align: center;
  color: var(--slate-400);
  padding: 64px;
  font-size: 14px;
}

/* ═══ SECTION HEADERS ════════════════════════ */
.section-header {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--surface-100);
}

.section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--slate-800);
}

.section-count {
  font-size: 12px;
  color: var(--slate-400);
  margin-top: 2px;
}

/* ═══ PRICING PAGE ══════════════════════════ */
.pricing-page {
  background: white;
}

.pricing-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--surface-100);
}

.pricing-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pricing-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pricing-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-500), #A855F7);
  padding: 80px 32px;
  text-align: center;
}

.pricing-hero-blur1 {
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}

.pricing-hero-blur2 {
  position: absolute;
  bottom: -80px;
  left: 10%;
  width: 300px;
  height: 300px;
  background: rgba(168,85,247,0.15);
  border-radius: 50%;
  filter: blur(40px);
}

.pricing-hero-grid {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: linear-gradient(rgba(255,255,255,0.1) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 48px 48px;
}

.pricing-hero-content {
  position: relative;
  z-index: 10;
  max-width: 700px;
  margin: 0 auto;
}

.pricing-hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.9);
  font-size: 13px;
  font-weight: 600;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.15);
  margin-bottom: 24px;
}

.pricing-hero h1 {
  font-size: 40px;
  font-weight: 800;
  color: white;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.pricing-hero p {
  font-size: 17px;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
  max-width: 560px;
  margin: 0 auto;
}

.pricing-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 32px;
}

.pricing-section-header {
  text-align: center;
  margin-bottom: 48px;
}

.pricing-section-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--slate-900);
  letter-spacing: -0.025em;
}

.pricing-section-header p {
  color: var(--slate-500);
  font-size: 15px;
  margin-top: 8px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.pricing-card {
  background: white;
  border-radius: 20px;
  border: 1px solid var(--surface-200);
  padding: 32px;
  position: relative;
  transition: all 0.3s;
}

.pricing-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
}

.pricing-card-popular {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 1px var(--brand-400), 0 8px 32px rgba(99,102,241,0.12);
}

.pricing-popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 16px;
  background: linear-gradient(135deg, var(--brand-500), #A855F7);
  color: white;
  font-size: 12px;
  font-weight: 700;
  border-radius: 100px;
  letter-spacing: 0.03em;
}

.pricing-card-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--slate-900);
}

.pricing-card-desc {
  font-size: 13px;
  color: var(--slate-500);
  margin-top: 4px;
  margin-bottom: 20px;
}

.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 24px;
}

.pricing-amount {
  font-size: 42px;
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -0.03em;
}

.pricing-period {
  font-size: 15px;
  color: var(--slate-400);
  font-weight: 500;
}

.pricing-card-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.pricing-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--slate-700);
}

.pricing-feature svg {
  flex-shrink: 0;
}

.pricing-feature-disabled {
  color: var(--slate-400);
}

.pricing-card-footer .sp-btn {
  font-size: 15px;
  padding: 12px;
}

.pricing-features-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px 80px;
}

.pricing-features-section h2 {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 40px;
  letter-spacing: -0.025em;
}

.pricing-features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.pricing-feature-card {
  background: var(--surface-50);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid var(--surface-100);
  transition: all 0.3s;
}

.pricing-feature-card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.pricing-feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.pricing-feature-icon svg { width: 22px; height: 22px; color: white; }
.pricing-feature-icon.blue { background: linear-gradient(135deg, #3B82F6, #2563EB); }
.pricing-feature-icon.emerald { background: linear-gradient(135deg, #10B981, #14B8A6); }
.pricing-feature-icon.amber { background: linear-gradient(135deg, #F59E0B, #EA580C); }
.pricing-feature-icon.rose { background: linear-gradient(135deg, #F43F5E, #EC4899); }

.pricing-feature-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--slate-800);
  margin-bottom: 6px;
}

.pricing-feature-card p {
  font-size: 13px;
  color: var(--slate-500);
  line-height: 1.5;
}

.pricing-footer {
  text-align: center;
  padding: 32px;
  border-top: 1px solid var(--surface-100);
  color: var(--slate-400);
  font-size: 13px;
}

/* ═══ RESPONSIVE ═════════════════════════════ */
@media (max-width: 768px) {
  .sidebar { display: none; }

  .main-content { padding: 16px; }

  .conv-layout { flex-direction: column; height: auto; }

  .conv-sidebar-panel {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--surface-200);
    max-height: 200px;
  }

  .conv-chat { height: calc(100vh - 260px); }

  .message { max-width: 85%; }

  .stat-grid { grid-template-columns: 1fr 1fr; }

  .hero { padding: 24px; }
  .hero h1 { font-size: 20px; }

  .pricing-hero { padding: 48px 20px; }
  .pricing-hero h1 { font-size: 26px; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .pricing-features-grid { grid-template-columns: 1fr 1fr; }
  .pricing-section { padding: 48px 20px; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .pricing-features-grid { grid-template-columns: 1fr; }
}
