@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

:root {
  /* Clean Instam Light Aesthetic (Matching media_1792443444160.png) */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #fbfcfe;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  
  --primary: #8b5cf6;
  --primary-hover: #7c3aed;
  --primary-light: #faf5ff;
  --primary-soft: rgba(139, 92, 246, 0.12);
  --primary-glow: rgba(139, 92, 246, 0.3);
  
  --accent-pink: #ec4899;
  --accent-pink-soft: rgba(236, 72, 153, 0.1);
  --accent-green: #10b981;
  --accent-green-soft: rgba(16, 185, 129, 0.1);
  --accent-blue: #0ea5e9;
  --accent-blue-soft: rgba(14, 165, 233, 0.1);
  --accent-orange: #f59e0b;
  --accent-orange-soft: rgba(245, 158, 11, 0.1);
  --accent-purple: #9333ea;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  
  --sidebar-width: 270px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 35px -10px rgba(0, 0, 0, 0.08);
}

html {
  font-size: 14.5px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  letter-spacing: -0.015em;
}

body {
  background-color: var(--bg-page);
  background-image: 
    radial-gradient(circle at 10% 12%, rgba(139, 92, 246, 0.04) 0%, transparent 45%),
    radial-gradient(circle at 90% 18%, rgba(236, 72, 153, 0.03) 0%, transparent 45%),
    radial-gradient(circle at 50% 85%, rgba(6, 182, 212, 0.03) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  direction: rtl;
  display: flex;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-page);
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Layout */
.app-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
  position: relative;
}

/* Sidebar (Clean Instam White Style) */
.sidebar {
  width: var(--sidebar-width);
  background: #ffffff;
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.02);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 24px 8px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 20px;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #9333ea, #7c3aed, #ec4899);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.35);
}

.brand-logo-img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.25);
  border: 1px solid rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
  transition: var(--transition);
}

.brand-logo-img:hover {
  transform: scale(1.05) rotate(-2deg);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4);
}

.brand-text h2 {
  font-size: 19px;
  font-weight: 900;
  color: #7c3aed;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.brand-text span {
  font-size: 11px;
  color: var(--text-muted);
}

/* ==================== DAIRINO BRAND TYPOGRAPHY ==================== */
.brand-dairino {
  display: inline-flex;
  align-items: baseline;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: 0.5px;
  direction: ltr;
  vertical-align: baseline;
  line-height: 1;
}

/* D and rino: Official, corporate, trustworthy color and normal/regular weight */
.brand-dairino .brand-base {
  font-weight: 500;
  color: var(--text-main, #1e293b);
  transition: color 0.2s ease;
}

/* AI: Extra bold, vibrant neon purple with energetic glow */
.brand-dairino .brand-ai {
  font-weight: 900;
  color: #a855f7;
  background: linear-gradient(135deg, #9333ea 0%, #a855f7 40%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 12px rgba(168, 85, 247, 0.4);
  letter-spacing: 1px;
  margin: 0 1px;
  display: inline-block;
  transform: translateY(-0.5px);
}

/* Contrast adjustment for dark contexts */
[data-theme="dark"] .brand-dairino .brand-base,
.sidebar-plan-card .brand-dairino .brand-base,
.brand-dairino.on-dark .brand-base {
  color: #f8fafc;
}

[data-theme="dark"] .brand-dairino .brand-ai,
.brand-dairino.on-dark .brand-ai {
  background: linear-gradient(135deg, #c084fc 0%, #e879f9 50%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 16px rgba(192, 132, 252, 0.6);
}

.brand-slogan {
  font-size: 11.5px;
  color: var(--text-muted, #64748b);
  font-weight: 500;
  display: block;
  margin-top: 2px;
}

.nav-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  padding: 12px 14px 6px 14px;
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: #475569;
  text-decoration: none;
  font-weight: 600;
  font-size: 13.5px;
  transition: var(--transition);
}

.nav-item:hover {
  color: #7c3aed;
  background: #f8fafc;
  transform: translateX(-2px);
}

.nav-item.active {
  color: #7c3aed;
  background: #faf5ff;
  border: 1px solid rgba(139, 92, 246, 0.25);
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.08);
  font-weight: 800;
}

/* Nav Item Icon Circle (Matching Instam) */
.nav-icon-circle {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  transition: var(--transition);
}

.nav-icon-circle.purple { background: #faf5ff; color: #9333ea; }
.nav-icon-circle.cyan { background: #ecfeff; color: #06b6d4; }
.nav-icon-circle.pink { background: #fdf2f8; color: #ec4899; }
.nav-icon-circle.green { background: #f0fdf4; color: #10b981; }
.nav-icon-circle.orange { background: #fff7ed; color: #f97316; }
.nav-icon-circle.blue { background: #eff6ff; color: #3b82f6; }
.nav-icon-circle.yellow { background: #fefce8; color: #eab308; }
.nav-icon-circle.gold { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }

.nav-item:hover .nav-icon-circle {
  transform: scale(1.08);
}

/* Standardized Nav Badges */
.nav-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 8px;
  margin-right: auto;
  line-height: 1.4;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: var(--transition);
}
.nav-badge.purple { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.nav-badge.pink { background: rgba(236, 72, 153, 0.12); color: #ec4899; }
.nav-badge.red { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.nav-badge.green { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.nav-badge.amber { background: rgba(245, 158, 11, 0.12); color: #d97706; }
.nav-badge.blue { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }

[data-theme="dark"] .nav-badge.purple { background: rgba(139, 92, 246, 0.25); color: #c084fc; }
[data-theme="dark"] .nav-badge.pink { background: rgba(236, 72, 153, 0.25); color: #f472b6; }
[data-theme="dark"] .nav-badge.red { background: rgba(239, 68, 68, 0.25); color: #f87171; }
[data-theme="dark"] .nav-badge.green { background: rgba(16, 185, 129, 0.25); color: #34d399; }
[data-theme="dark"] .nav-badge.amber { background: rgba(245, 158, 11, 0.25); color: #fbbf24; }
[data-theme="dark"] .nav-badge.blue { background: rgba(59, 130, 246, 0.25); color: #60a5fa; }

/* Sidebar Active Plan Card (Matching Instam) */
.sidebar-plan-card {
  margin-top: auto;
  padding: 18px;
  background: linear-gradient(135deg, #1e1b4b 0%, #31104b 100%);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: var(--radius-md);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(49, 16, 75, 0.25);
}

.sidebar-plan-card .plan-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #f472b6;
  display: flex;
  align-items: center;
}

.sidebar-plan-card .plan-days {
  font-size: 12px;
  color: #cbd5e1;
}

.sidebar-plan-card .plan-days b {
  color: #34d399;
}

.sidebar-plan-card .plan-btn {
  background: #ffffff;
  color: #6b21a8;
  border: none;
  border-radius: 20px;
  padding: 9px 14px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sidebar-plan-card .plan-btn:hover {
  transform: translateY(-1px);
  background: #f8fafc;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Main Content Area */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: 100vh;
}

/* Header Top bar (Clean Instam Style) */
.top-bar {
  padding: 16px 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mobile-toggle-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 18px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.mobile-toggle-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.user-header-chip {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar-wrap {
  position: relative;
  cursor: pointer;
}

.user-avatar-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #8b5cf6;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
}

.user-online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-green);
  border: 2px solid #ffffff;
}

.user-details strong {
  display: block;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-main);
}

.user-details span {
  font-size: 11px;
  color: var(--text-muted);
}

.content-container {
  padding: 28px 36px 60px 36px;
  flex: 1;
}

/* Instam Clean Cards */
.instam-card, .clean-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.04);
  margin-bottom: 24px;
  transition: var(--transition);
}
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  transition: var(--transition);
}

.instam-card:hover, .clean-card:hover {
  border-color: rgba(139, 92, 246, 0.3);
}

.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.card-header-flex h3 {
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
}

/* Status Pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
}

.status-pill.active {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.pill-active {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #7c3aed 0%, #9333ea 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #6d28d9 0%, #7e22ce 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.5);
  color: #ffffff;
}

.btn-pink {
  background: linear-gradient(135deg, #ec4899, #f43f5e);
  color: #fff;
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.35);
}

.btn-pink:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(236, 72, 153, 0.5);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: #dc2626;
  color: #fff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 11.5px;
  border-radius: var(--radius-sm);
}

/* Tables */
.instam-table {
  width: 100%;
  border-collapse: collapse;
}

.instam-table th {
  padding: 12px 16px;
  text-align: right;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.03);
}

.instam-table td {
  padding: 14px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
}

.instam-table tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.show {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Modals - Clean Pure White by Default (Light Theme) */
.modal-content {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15) !important;
  color: #0f172a !important;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #f1f5f9 !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff !important;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a !important;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 24px;
  color: #64748b;
  cursor: pointer;
  transition: var(--transition);
}
.modal-close:hover {
  color: #ef4444;
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #ffffff !important;
  color: #0f172a !important;
}

.modal-body label,
.modal-body strong {
  color: #0f172a !important;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #f1f5f9 !important;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #f8fafc !important;
}

/* Forms */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
}

.form-control {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  color: #ffffff;
  font-size: 13.5px;
  outline: none;
  transition: var(--transition);
  width: 100%;
}

.form-control:focus {
  border-color: #8b5cf6;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
}

/* Toasts */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.success { border-right: 4px solid var(--accent-green); }
.toast.error { border-right: 4px solid #ef4444; }

/* Header Tutorial Badge */
.header-tutorial-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(124, 58, 237, 0.15));
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #38bdf8;
  padding: 6px 14px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  margin-left: 12px;
  transition: var(--transition);
  box-shadow: 0 2px 10px rgba(6, 182, 212, 0.15);
}

.header-tutorial-badge:hover {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.25), rgba(124, 58, 237, 0.25));
  border-color: #38bdf8;
  transform: translateY(-1px);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

@media (max-width: 640px) {
  .header-tutorial-badge span {
    display: none;
  }
  .header-tutorial-badge {
    padding: 7px 10px;
    margin-left: 8px;
  }
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(13, 19, 33, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding: 8px 12px;
  z-index: 900;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 10.5px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 8px;
  transition: var(--transition);
}

.mobile-nav-item i {
  font-size: 18px;
}

.mobile-nav-item.active {
  color: #a855f7;
}

.mobile-nav-fab {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.5);
  margin-top: -24px;
  transition: var(--transition);
}

.mobile-nav-fab:hover {
  transform: scale(1.05);
}

.sidebar-close-btn {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  margin-right: auto;
  transition: var(--transition);
}

.sidebar-close-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 999;
}

/* ==================== RESPONSIVE RULES FOR MOBILE & TABLETS ==================== */
@media (max-width: 860px) {
  html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
  }

  .app-container {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    min-height: 100vh;
  }

  .main-wrapper {
    max-height: none;
    overflow-y: visible;
    overflow-x: hidden;
    width: 100%;
    min-width: 0;
  }

  .sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 290px;
    max-width: 85vw;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.7);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.active {
    display: block;
  }

  .mobile-toggle-btn {
    display: flex;
    width: 42px;
    height: 42px;
    font-size: 20px;
  }

  .mobile-bottom-nav {
    display: flex;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 8px));
  }

  .top-bar {
    padding: 12px 14px;
  }

  .content-container {
    padding: 16px 12px calc(85px + env(safe-area-inset-bottom, 12px)) 12px;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
  }

  .user-details {
    display: none;
  }

  .instam-card, .clean-card {
    padding: 16px 14px;
    border-radius: 16px;
    margin-bottom: 16px;
  }

  .card-header-flex {
    flex-wrap: wrap;
    gap: 10px;
  }

  /* Prevent iOS Safari auto-zoom on input focus */
  input, select, textarea, .form-control {
    font-size: 16px !important;
  }

  /* Native Mobile Bottom Sheet Modals */
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal-content {
    max-height: 85vh;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-radius: 20px 20px 0 0;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 12px));
  }

  /* Touch-friendly Button sizing */
  .btn {
    padding: 10px 16px;
  }

  .sidebar-close-btn {
    display: flex;
  }

  .posts-main-layout {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  .posts-filter-wrap {
    max-width: 100%;
    width: 100%;
  }

  .inbox-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
  }
}

/* Extra Smartphone Media Query (<= 520px) */
@media (max-width: 520px) {
  .top-bar {
    padding: 10px 12px;
  }
  .page-title h1 {
    font-size: 15px !important;
  }
  .content-container {
    padding: 12px 10px calc(80px + env(safe-area-inset-bottom, 10px)) 10px;
  }
  .instam-card, .clean-card {
    padding: 14px 12px;
    border-radius: 14px;
  }
  .btn {
    padding: 9px 14px;
    font-size: 12.5px;
  }
  .posts-filter-wrap {
    flex-direction: column;
  }
  .posts-filter-select {
    width: 100% !important;
  }
  .inbox-stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .inbox-tab-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 6px;
  }
  .inbox-tab-nav::-webkit-scrollbar {
    display: none;
  }
  .inbox-tab-btn {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 11.5px;
    padding: 8px 12px;
  }
}

/* Posts & Feeds Layout */
.posts-main-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
}

.posts-filter-wrap {
  display: flex;
  gap: 10px;
  flex: 1;
  max-width: 440px;
}

/* Inbox Stats Grid */
.inbox-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 26px;
  align-items: stretch;
}

/* Touch Scrollable Table Container */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 12px;
}

/* Inbox Toolbar & Badges */
.inbox-toolbar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.inbox-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.inbox-filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.inbox-pill-btn {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.inbox-pill-btn:hover {
  border-color: #8b5cf6;
  color: #7c3aed;
  background: #f5f3ff;
}
.inbox-pill-btn.active {
  background: #7c3aed;
  color: #ffffff;
  border-color: #7c3aed;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.25);
}
.inbox-kw-chip {
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.inbox-kw-chip:hover, .inbox-kw-chip.active {
  background: #7c3aed;
  color: #ffffff;
  border-color: #7c3aed;
}
.lead-phone-badge {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
  padding: 3px 8px;
  border-radius: 6px;
  font-family: monospace;
  font-size: 12px;
  font-weight: 800;
  direction: ltr;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.single-word-badge {
  background: #f3e8ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Universal Form Control Styling (Ensures typed text is always dark slate and visible!) */
.form-control,
input.form-control,
input[type="text"],
input[type="search"],
input[type="url"],
input[type="email"],
input[type="password"],
select.form-control,
textarea.form-control {
  background-color: #ffffff !important;
  color: #0f172a !important; /* Crisp dark slate on white - fully visible */
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 9px !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
  font-family: 'Vazirmatn', sans-serif !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
  outline: none !important;
}
.form-control::placeholder,
input::placeholder,
textarea::placeholder {
  color: #94a3b8 !important;
  opacity: 1 !important;
}
.form-control:focus,
input[type="text"]:focus,
input[type="search"]:focus,
textarea.form-control:focus,
select.form-control:focus {
  border-color: #7c3aed !important;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.16) !important;
  background-color: #ffffff !important;
  color: #0f172a !important;
}

/* Anti-Spam Timer & Cooldown Styles */
.antispam-timer-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 10px 14px;
  margin: 10px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.antispam-timer-countdown {
  font-family: monospace;
  font-size: 16px;
  font-weight: 800;
  color: #b45309;
  background: #fef3c7;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #fcd34d;
}
.antispam-progress-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 6px;
}
.antispam-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #10b981);
  transition: width 0.3s ease;
}

/* Stat Box Components */
.instam-stat-box {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: var(--transition);
}

.instam-stat-box:hover {
  transform: translateY(-2px);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.stat-box-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-val-label span {
  font-size: 12px;
  color: var(--text-dim);
  display: block;
  margin-bottom: 4px;
}

.stat-val-label strong {
  font-size: 20px;
  font-weight: 900;
  color: #fff;
}

.stat-icon-square {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.stat-icon-square.green {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.stat-icon-square.purple {
  background: rgba(139, 92, 246, 0.15);
  color: #c084fc;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.stat-icon-square.pink {
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.3);
}

.stat-icon-square.cyan {
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.3);
}

.stat-box-footer {
  font-size: 11.5px;
  color: var(--text-muted);
}


/* ==========================================================================
   INSTAM DASHBOARD SPECIFIC STYLES (Light Clean SaaS Theme)
   ========================================================================== */
.dash-instam-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

/* Row 1: Welcome Hero Banner */
.instam-welcome-banner {
  background: linear-gradient(90deg, #8b5cf6 0%, #7c3aed 50%, #6d28d9 100%);
  border-radius: 20px;
  padding: 24px 32px;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 10px 25px -5px rgba(124, 58, 237, 0.4);
  position: relative;
  overflow: hidden;
  flex-wrap: wrap;
  gap: 16px;
}
.instam-welcome-banner::after {
  content: '';
  position: absolute;
  top: -60px;
  left: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  pointer-events: none;
}
.welcome-text-wrap h2 {
  font-size: 21px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}
.welcome-text-wrap p {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}
.welcome-action-btn {
  background: #ffffff;
  color: #6d28d9;
  padding: 10px 22px;
  border-radius: 30px;
  font-weight: 800;
  font-size: 13.5px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  transition: var(--transition);
}
.welcome-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  background: #fdfdfd;
  color: #5b21b6;
}

/* Row 2: Voice Assistant Banner */
.instam-voice-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 18px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  flex-wrap: wrap;
  gap: 16px;
}
.voice-right-info {
  display: flex;
  align-items: center;
  gap: 16px;
}
.voice-mic-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ec4899 0%, #a855f7 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.35);
  flex-shrink: 0;
}
.voice-titles h3 {
  font-size: 15.5px;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 4px;
}
.voice-titles p {
  font-size: 12.5px;
  color: #64748b;
  font-weight: 500;
}
.voice-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.btn-voice-primary {
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  color: #fff;
  border: none;
  border-radius: 25px;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.25);
  transition: var(--transition);
}
.btn-voice-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(236, 72, 153, 0.4);
}
.btn-voice-outline {
  background: #ffffff;
  color: #475569;
  border: 1px solid #e2e8f0;
  border-radius: 25px;
  padding: 8px 18px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}
.btn-voice-outline:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #cbd5e1;
}
.btn-voice-video {
  background: #ffffff;
  color: #7c3aed;
  border: 1px solid #e9d5ff;
  border-radius: 25px;
  padding: 8px 18px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  transition: var(--transition);
}
.btn-voice-video:hover {
  background: #faf5ff;
  border-color: #c084fc;
}
.video-badge-dot {
  position: absolute;
  top: 5px;
  right: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ec4899;
  box-shadow: 0 0 6px rgba(236, 72, 153, 0.6);
}

/* ==================== SAAS EXECUTIVE DASHBOARD SYSTEM ==================== */
.saas-dashboard-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.saas-welcome-hero {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.saas-welcome-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6, #ec4899);
}

.saas-welcome-left h2 {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.saas-welcome-left p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.saas-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-saas-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-saas-action.primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.btn-saas-action.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.btn-saas-action.secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.btn-saas-action.secondary:hover {
  background: var(--border-light);
  border-color: #cbd5e1;
  transform: translateY(-2px);
}

.btn-saas-action.voice {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.3);
}

.btn-saas-action.voice:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.45);
}

/* 4 KPI Cards Grid */
.saas-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 1024px) {
  .saas-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .saas-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.saas-kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}

.saas-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.saas-kpi-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.saas-kpi-label {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.saas-kpi-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.saas-kpi-sub {
  font-size: 11.5px;
  color: var(--text-dim);
  font-weight: 500;
}

.saas-kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.saas-kpi-icon.purple { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.saas-kpi-icon.blue { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.saas-kpi-icon.rose { background: rgba(244, 63, 94, 0.12); color: #f43f5e; }
.saas-kpi-icon.emerald { background: rgba(16, 185, 129, 0.12); color: #10b981; }

/* 2-Column Dashboard Main Section */
.saas-main-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1024px) {
  .saas-main-layout {
    grid-template-columns: 1fr;
  }
}

/* Row 3: 3 Status Cards (Legacy support) */
.instam-status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 900px) {
  .instam-status-grid {
    grid-template-columns: 1fr;
  }
}
.status-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  transition: var(--transition);
  min-height: 140px;
}
.status-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  border-color: #cbd5e1;
}
.status-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
}
.status-icon-circle {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
}
.status-icon-circle.cyan { background: #ecfeff; color: #06b6d4; }
.status-icon-circle.green { background: #f0fdf4; color: #10b981; }
.status-icon-circle.blue { background: #eff6ff; color: #3b82f6; }

.status-header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.status-card-title {
  font-size: 12.5px;
  color: #64748b;
  font-weight: 600;
}
.status-val-highlight {
  font-size: 17px;
  font-weight: 800;
}
.status-val-highlight.green { color: #10b981; }
.status-val-highlight.dark { color: #0f172a; }

.status-badge.connected {
  background: #ecfdf5;
  color: #059669;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-block;
  width: fit-content;
  margin-top: 2px;
}
.telegram-handle {
  font-size: 15px;
  font-weight: 700;
  color: #334155;
  font-family: monospace;
  letter-spacing: 0.5px;
}
.instam-progress-track {
  background: #f1f5f9;
  height: 6px;
  border-radius: 6px;
  overflow: hidden;
  width: 100%;
}
.instam-progress-bar.green { background: #10b981; height: 100%; border-radius: 6px; }
.instam-progress-bar.blue { background: #3b82f6; height: 100%; border-radius: 6px; }

.status-card-bottom {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.status-card-bottom.split {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.status-sub-hint {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
}
.btn-status-pill {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}
.btn-status-pill:hover {
  background: #f8fafc;
  color: #0f172a;
}
.btn-status-pill.success { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.btn-status-pill.success:hover { background: #dcfce7; }
.btn-status-pill.info { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.btn-status-pill.info:hover { background: #dbeafe; }

/* Row 4: 2 Bottom Cards */
.instam-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 18px;
}
@media (max-width: 992px) {
  .instam-bottom-grid {
    grid-template-columns: 1fr;
  }
}
.instam-card-panel {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 22px 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}
.panel-header {
  margin-bottom: 18px;
}
.panel-header.split {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.panel-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
}
.panel-subtitle {
  font-size: 12.5px;
  color: #64748b;
  font-weight: 500;
}
.panel-link {
  color: #7c3aed;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
}
.panel-link:hover {
  color: #6d28d9;
  text-decoration: underline;
}

.metrics-boxes-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 580px) {
  .metrics-boxes-row {
    grid-template-columns: 1fr;
  }
}
.metric-box {
  border-radius: 16px;
  padding: 18px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: var(--transition);
}
.metric-box.purple { background: #faf5ff; border: 1px solid #f3e8ff; }
.metric-box.purple .metric-lbl { color: #9333ea; font-size: 13.5px; font-weight: 700; }
.metric-box.purple .metric-num { color: #581c87; font-size: 32px; font-weight: 900; }

.metric-box.blue { background: #eff6ff; border: 1px solid #dbeafe; }
.metric-box.blue .metric-lbl { color: #2563eb; font-size: 13.5px; font-weight: 700; }
.metric-box.blue .metric-num { color: #1e3a8a; font-size: 32px; font-weight: 900; }

.metric-box.pink { background: #fdf2f8; border: 1px solid #fce7f3; }
.metric-box.pink .metric-lbl { color: #db2777; font-size: 13.5px; font-weight: 700; }
.metric-box.pink .metric-num { color: #831843; font-size: 32px; font-weight: 900; }

/* Connected Account Pill */
.connected-account-pill {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
}
.connected-account-pill:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}
.acc-right-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.acc-avatar-wrapper {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  flex-shrink: 0;
}
.acc-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}
.acc-avatar-wrapper:hover .acc-avatar-img {
  transform: scale(1.08);
}
.acc-avatar-edit-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  opacity: 0;
  transition: var(--transition);
}
.acc-avatar-wrapper:hover .acc-avatar-edit-overlay {
  opacity: 1;
}
.acc-text-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.acc-name {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
}
.acc-id {
  font-size: 11px;
  color: #64748b;
  font-family: monospace;
}
.acc-username {
  font-size: 11.5px;
  color: #7c3aed;
  font-weight: 700;
}
.acc-status-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.acc-pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.25);
  display: inline-block;
  animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.1); }
  100% { box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.4); }
}
.btn-change-avatar-chip {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}
.btn-change-avatar-chip:hover {
  color: #7c3aed;
  border-color: #c084fc;
  background: #faf5ff;
}

/* Instam Light Table */
.instam-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.instam-table th {
  padding: 12px 16px;
  font-size: 12.5px;
  font-weight: 700;
  color: #64748b;
  text-align: right;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.instam-table td {
  padding: 14px 16px;
  font-size: 13px;
  color: #1e293b;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.instam-table tr:last-child td {
  border-bottom: none;
}
.instam-table tr:hover td {
  background: #fbfcfe;
}
.event-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
}
.event-badge.comment { background: #fdf2f8; color: #db2777; }
.event-badge.dm { background: #eff6ff; color: #2563eb; }

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 700;
}
.status-pill.success { background: #ecfdf5; color: #059669; }
.status-pill.fail { background: #fef2f2; color: #dc2626; }

/* Empty state */
.empty-state-box {
  padding: 36px 20px;
  text-align: center;
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.empty-icon-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

/* Avatar Change Modal Styles */
.avatar-preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.avatar-choice-card {
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: #ffffff;
}
.avatar-choice-card:hover {
  border-color: #c084fc;
  background: #faf5ff;
}
.avatar-choice-card.selected {
  border-color: #7c3aed;
  background: #faf5ff;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15);
}
.avatar-choice-img {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  object-fit: cover;
  margin: 0 auto 8px auto;
  display: block;
}
.avatar-choice-title {
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
}

/* ==========================================================================
   DROPDOWN & SELECT HIGH-CONTRAST FIX (No White-on-White text!)
   ========================================================================== */
select, .form-control select, select.form-control {
  background-color: #0f172a !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  cursor: pointer !important;
}

select option, .form-control option, option {
  background-color: #0f172a !important;
  color: #ffffff !important;
  padding: 12px 16px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

select option:hover, select option:focus, select option:checked {
  background-color: #7c3aed !important;
  color: #ffffff !important;
}

/* Accordions & Details Contrast */
details, .faq-item {
  background-color: #1e293b !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}
details summary, .faq-question {
  background-color: #0f172a !important;
  color: #ffffff !important;
}
.faq-answer, details[open] > *:not(summary) {
  background-color: #1e293b !important;
  color: #f1f5f9 !important;
}

/* ==========================================================================
   TOOLBARS FOR EMOJIS & DYNAMIC VARIABLES
   ========================================================================== */
.field-toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 8px;
}

.variable-pills-row, .emoji-pills-row, .emoji-bar-compact {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.toolbar-label, .emoji-bar-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
}

.btn-var-pill {
  background: #f5f3ff !important;
  border: 1px solid #ddd6fe !important;
  color: #7c3aed !important;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  user-select: none;
}
.btn-var-pill:hover {
  background: #ede9fe !important;
  color: #6d28d9 !important;
  border-color: #c4b5fd !important;
  transform: translateY(-1px);
}

.emoji-scroll-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.btn-emoji, .btn-emoji-sm {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px;
  padding: 4px 7px;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1.1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-emoji:hover, .btn-emoji-sm:hover {
  background: #f1f5f9 !important;
  transform: scale(1.25);
  border-color: #cbd5e1 !important;
}

/* Variable Guide Banner */
.variable-guide-banner {
  background: #f5f3ff !important;
  border: 1px solid #ddd6fe !important;
  border-radius: 12px;
  padding: 12px 16px;
  margin-top: 8px;
  font-size: 12px;
  color: #334155 !important;
}
.guide-header {
  font-weight: 800;
  font-size: 13px;
  color: #6d28d9 !important;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.guide-desc {
  color: #94a3b8;
  margin-bottom: 8px;
  font-size: 12px;
}
.guide-tags-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 8px;
}
.guide-tag-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
}
.guide-tag-item code {
  background: #0f172a;
  color: #f472b6;
  padding: 2px 7px;
  border-radius: 6px;
  font-family: monospace;
  direction: ltr;
  font-weight: 700;
  border: 1px solid rgba(244, 114, 182, 0.25);
}
.guide-example-box {
  background: rgba(15, 23, 42, 0.7);
  border-radius: 8px;
  padding: 8px 12px;
  border: 1px dashed rgba(139, 92, 246, 0.35);
  color: #cbd5e1;
  font-size: 11.5px;
  line-height: 1.6;
}

/* ==========================================================================
   AI ENHANCE & MEDIA ATTACHMENT STYLES
   ========================================================================== */
.btn-ai-enhance {
  background: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
  transition: var(--transition);
}
.btn-ai-enhance:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.45);
}

.media-tabs-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.media-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.media-tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.media-tab-btn.active {
  background: #7c3aed;
  color: #ffffff;
  border-color: #a855f7;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.35);
}

.media-dropzone {
  background: rgba(15, 23, 42, 0.6);
  border: 2px dashed rgba(139, 92, 246, 0.35);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.media-dropzone:hover, .media-dropzone.dragover {
  border-color: #a855f7;
  background: rgba(124, 58, 237, 0.12);
}

.voice-recorder-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 10px;
}

.voice-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-danger {
  background: #ef4444;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}
.btn-danger.pulse {
  animation: pulseRed 1.5s infinite;
}
@keyframes pulseRed {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.voice-timer {
  font-family: monospace;
  font-size: 15px;
  font-weight: 800;
  color: #f43f5e;
  direction: ltr;
}

/* ==================== THEME TOGGLE & DARK MODE (Audio 2) ==================== */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  margin-left: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.theme-toggle-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}
.theme-toggle-btn i {
  font-size: 14px;
  color: #f59e0b;
}

/* Dark Theme Overrides (Audio 2: Default is White/Light) */
[data-theme="dark"] {
  --bg-page: #0b0f19;
  --bg-card: #131b2e;
  --bg-card-hover: #1e293b;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.04);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] body {
  background-color: #0b0f19;
  background-image: 
    radial-gradient(circle at 10% 12%, rgba(139, 92, 246, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 90% 18%, rgba(236, 72, 153, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 50% 85%, rgba(6, 182, 212, 0.06) 0%, transparent 50%);
  color: #f8fafc;
}

[data-theme="dark"] .sidebar {
  background: #0f172a !important;
  border-left: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .brand {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .top-bar {
  background: rgba(15, 23, 42, 0.9) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .page-title h1 {
  color: #ffffff !important;
}

[data-theme="dark"] .user-header-chip {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .user-details strong {
  color: #ffffff !important;
}

[data-theme="dark"] .instam-card {
  background: #131b2e !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .form-control {
  background-color: #0f172a !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

[data-theme="dark"] .modal-content {
  background: #0f172a !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8) !important;
}

[data-theme="dark"] .modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: #0f172a !important;
}

[data-theme="dark"] .modal-header h3 {
  color: #ffffff !important;
}

[data-theme="dark"] .modal-body {
  background: #0f172a !important;
  color: #f8fafc !important;
}

[data-theme="dark"] .modal-body label,
[data-theme="dark"] .modal-body strong {
  color: #f8fafc !important;
}

[data-theme="dark"] .modal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(255, 255, 255, 0.03) !important;
}

[data-theme="dark"] .field-toolbar {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .toolbar-label,
[data-theme="dark"] .emoji-bar-title {
  color: #94a3b8 !important;
}

[data-theme="dark"] .btn-var-pill {
  background: rgba(139, 92, 246, 0.18) !important;
  border: 1px solid rgba(139, 92, 246, 0.4) !important;
  color: #c084fc !important;
}

[data-theme="dark"] .btn-emoji,
[data-theme="dark"] .btn-emoji-sm {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

[data-theme="dark"] .variable-guide-banner {
  background: rgba(139, 92, 246, 0.08) !important;
  border: 1px solid rgba(139, 92, 246, 0.28) !important;
  color: #e2e8f0 !important;
}

[data-theme="dark"] .theme-toggle-btn i {
  color: #38bdf8;
}

/* ==================== WHITE CAMPAIGN BOX (Audio 2) ==================== */
.white-campaign-box {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 18px !important;
  padding: 24px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07) !important;
  margin-top: 28px !important;
  transition: all 0.3s ease;
}

.white-campaign-box h3,
.white-campaign-box h4,
.white-campaign-box label,
.white-campaign-box strong {
  color: #0f172a !important;
}

.white-campaign-box .form-control {
  background: #f8fafc !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
}

.white-campaign-box .form-control:focus {
  background: #ffffff !important;
  border-color: #8b5cf6 !important;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15) !important;
}

.white-campaign-box select option {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

.selected-reel-banner {
  background: linear-gradient(135deg, #faf5ff, #fdf2f8);
  border: 1px solid #e9d5ff;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

/* AI 5-Variations Pill Button */
.btn-ai-enhance-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);
  color: #ffffff !important;
  border: none;
  border-radius: 8px;
  padding: 7px 15px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.25);
}

.btn-ai-enhance-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(219, 39, 119, 0.35);
  filter: brightness(1.08);
}

.btn-ai-enhance-pill:active {
  transform: translateY(0);
}

/* Posts Pagination Styles */
.pagination-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination-btn {
  background: var(--bg-card-sub, #f8fafc);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pagination-btn:hover:not(:disabled) {
  border-color: #8b5cf6;
  color: #8b5cf6;
  background: rgba(139, 92, 246, 0.08);
}

.pagination-btn-active {
  background: linear-gradient(135deg, #8b5cf6, #ec4899) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.35);
}

/* ==================== 3-COLUMN x 2-ROW GRID & COMPACT CARDS (Audio Requirements) ==================== */
.campaigns-grid-3x2 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
}
@media (max-width: 1100px) {
  .campaigns-grid-3x2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .campaigns-grid-3x2 {
    grid-template-columns: 1fr;
  }
}

.campaign-card-rich {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 16px 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  font-size: 12px;
  min-height: 460px; /* Rectangular shape as requested */
}
.campaign-card-rich:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

/* Header: 100x100px Cover Thumbnail + Title & Status Badges */
.camp-card-head-100 {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.camp-card-cover-100 {
  width: 100px;
  height: 100px;
  min-width: 100px;
  min-height: 100px;
  max-width: 100px;
  max-height: 100px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  position: relative;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.camp-card-cover-100:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.22);
  border-color: #8b5cf6;
}
.camp-card-cover-100 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.camp-card-cover-100 .cover-edit-hint {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(2px);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.camp-card-cover-100:hover .cover-edit-hint {
  opacity: 1;
}
.camp-card-cover-100 .cover-badge {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.75);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  backdrop-filter: blur(2px);
}

.camp-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
}
.camp-cover-placeholder.story {
  background: linear-gradient(135deg, #fce7f3, #fbcfe8);
  color: #be185d;
}
.camp-cover-placeholder.dm {
  background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
  color: #7e22ce;
}
.camp-cover-placeholder.all {
  background: linear-gradient(135deg, #e0f2fe, #bae6fd);
  color: #0369a1;
}

.camp-head-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.camp-head-title-link {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  line-height: 1.4;
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s ease;
}
.camp-head-title-link:hover {
  color: #7c3aed;
}

.camp-head-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  width: fit-content;
}
.camp-head-type-badge.story {
  background: #fce7f3;
  color: #be185d;
  border: 1px solid #fbcfe8;
}
.camp-head-type-badge.dm {
  background: #f3e8ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}
.camp-head-type-badge.comment {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.camp-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.camp-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
}
.camp-pill.active {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.camp-pill.inactive {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

.camp-actions-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}
.camp-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
}
.camp-chip.chip-comment {
  background: #f0f9ff;
  color: #0284c7;
  border: 1px solid #bae6fd;
}
.camp-chip.chip-dm {
  background: #faf5ff;
  color: #9333ea;
  border: 1px solid #f3e8ff;
}
.camp-chip.chip-voice {
  background: #ecfeff;
  color: #0891b2;
  border: 1px solid #a5f3fc;
}
.camp-chip.chip-image {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.camp-copy-badge {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #b45309;
  border-radius: 6px;
  padding: 3px 6px;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}

/* Inner Scrollable Body (Rectangular card, content scrollable without breaking height) */
.camp-scroll-body {
  flex: 1;
  max-height: 220px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-left: 4px;
  margin: 6px 0 10px 0;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f8fafc;
}
.camp-scroll-body::-webkit-scrollbar {
  width: 5px;
}
.camp-scroll-body::-webkit-scrollbar-track {
  background: #f8fafc;
  border-radius: 4px;
}
.camp-scroll-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.camp-scroll-body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Compact preview text boxes */
.camp-compact-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 11px;
  line-height: 1.45;
  margin-bottom: 6px;
  word-break: break-word;
}
.camp-compact-box.dm-box {
  background: #faf5ff;
  border: 1px dashed #e9d5ff;
  color: #4c1d95;
}
.camp-compact-box.reply-box {
  background: #f0f9ff;
  border: 1px dashed #bae6fd;
  color: #0369a1;
}
.camp-compact-box strong {
  display: block;
  font-size: 10px;
  margin-bottom: 3px;
}

/* Edit & Action buttons in card footer */
.camp-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  margin-top: 6px;
  gap: 8px;
}
.camp-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-edit-camp {
  background: #f5f3ff;
  color: #7c3aed;
  border: 1px solid #ddd6fe;
  padding: 4px 10px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}
.btn-edit-camp:hover {
  background: #7c3aed;
  color: #ffffff;
  border-color: #7c3aed;
}


