/* ─── SMSLah V2 — Design System & UI Tokens ──────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

:root {
  /* ─── Brand Colors ─────────────────────────── */
  --primary:        #7C3AED;   /* Vivid Purple */
  --primary-light:  #8B5CF6;   /* Soft Lavender */
  --primary-dark:   #6D28D9;   /* Deep Royal Purple */
  --accent:         #06B6D4;   /* Cyan Glow */
  --accent-light:   #22D3EE;   /* Bright Cyan */
  --secondary:      #EC4899;   /* Neon Pink */
  --success:        #10B981;   /* Emerald Green */
  --warning:        #F59E0B;   /* Amber / Gold */
  --danger:         #EF4444;   /* Rose Red */

  /* ─── Background & Surface Hierarchy ────────── */
  --bg-900:         #0A0A1A;   /* Root Canvas (Deep Midnight) */
  --bg-800:         #0F0F2A;   /* Sidebar & Navbar */
  --bg-700:         #13132E;   /* Input Field Background */
  --bg-600:         #1A1A3E;   /* Hover State Surfaces */
  --surface:        #16163A;   /* Primary Card / Table Surface */
  --surface-light:  #1C1C42;   /* Elevated Modals / Dropdowns */

  /* ─── Text Tokens ──────────────────────────── */
  --text-100:       #FFFFFF;   /* Primary Headings */
  --text-200:       #F0EEFF;   /* Standard Titles */
  --text-300:       #C4B5FD;   /* Sub-headings / Accents */
  --text-400:       #A78BFA;   /* Subtle Highlights */
  --text-muted:     #6B7280;   /* Captions & Timestamps */
  --text-body:      #D1D5DB;   /* Main Paragraph & Table Body */

  /* ─── Borders & Glow Effects ────────────────── */
  --border:         rgba(124, 58, 237, 0.20);
  --border-light:   rgba(255, 255, 255, 0.08);
  --glow-primary:   0 0 35px rgba(124, 58, 237, 0.35);
  --glow-accent:    0 0 25px rgba(6, 182, 212, 0.30);

  /* ─── Gradients ────────────────────────────── */
  --gradient-primary: linear-gradient(135deg, #7C3AED 0%, #4F46E5 50%, #0EA5E9 100%);
  --gradient-card:    linear-gradient(135deg, rgba(124,58,237,0.12) 0%, rgba(79,70,229,0.04) 100%);
  --gradient-text:    linear-gradient(135deg, #C4B5FD 0%, #818CF8 50%, #38BDF8 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-900);
  color: var(--text-body);
  line-height: 1.5;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text-100);
}

code, pre, .font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* ─── App Container & Layout ───────────────────────────── */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background-color: var(--bg-800);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width 0.3s ease;
}

.brand-logo {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-light);
}

.logo-badge {
  width: 38px;
  height: 38px;
  background: var(--gradient-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  color: #fff;
  box-shadow: var(--glow-primary);
}

.brand-title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-version {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(6, 182, 212, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 4px;
}

.nav-menu {
  list-style: none;
  padding: 16px 12px;
  flex: 1;
  overflow-y: auto;
}

.nav-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  padding: 12px 12px 6px;
  font-weight: 700;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin-bottom: 4px;
  border-radius: 8px;
  color: var(--text-body);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}

.nav-item:hover {
  background-color: var(--bg-600);
  color: var(--text-100);
}

.nav-item.active {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  color: var(--text-200);
  font-weight: 600;
}

.nav-item.active .nav-icon {
  color: var(--primary-light);
}

.nav-icon {
  font-size: 18px;
}

/* Main Content Area */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Topbar */
.topbar {
  height: 68px;
  background-color: var(--bg-800);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  flex-shrink: 0;
}

.search-box {
  display: flex;
  align-items: center;
  background-color: var(--bg-700);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 6px 16px;
  width: 320px;
}

.search-input {
  background: transparent;
  border: none;
  color: #fff;
  outline: none;
  font-size: 13px;
  width: 100%;
  margin-left: 8px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.wallet-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--gradient-card);
  border: 1px solid var(--border);
  padding: 7px 16px;
  border-radius: 24px;
  cursor: pointer;
}

.wallet-amount {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  color: #10B981;
  font-size: 14px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-dark);
  border: 2px solid var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}

/* Content Canvas */
.content-canvas {
  flex: 1;
  padding: 32px 28px;
  overflow-y: auto;
}

/* ─── Grid & Cards ────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.stat-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-100);
}

.stat-sub {
  font-size: 12px;
  margin-top: 6px;
  color: var(--success);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 24px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
}

/* ─── Form Controls & Buttons ─────────────────────────────── */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-200);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  background-color: var(--bg-700);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

textarea.form-control {
  min-height: 110px;
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: var(--glow-primary);
}

.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--bg-600);
  color: var(--text-200);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background-color: var(--bg-700);
}

/* ─── Live Phone Mockup (Brevo-Style) ─────────────────────── */
.phone-mockup-wrapper {
  background: #000;
  border: 4px solid #2D2D44;
  border-radius: 36px;
  padding: 14px;
  width: 300px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(124, 58, 237, 0.2);
  margin: 0 auto;
}

.phone-screen {
  background: #111122;
  border-radius: 26px;
  padding: 18px 14px;
  min-height: 400px;
  display: flex;
  flex-direction: column;
}

.phone-notch {
  width: 90px;
  height: 18px;
  background: #000;
  border-radius: 0 0 12px 12px;
  margin: -18px auto 14px;
}

.phone-header {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
  font-weight: 600;
}

.sms-bubble {
  background: var(--primary);
  color: #fff;
  border-radius: 16px 16px 4px 16px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.4;
  word-break: break-word;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
  margin-left: auto;
  max-width: 90%;
}

.segment-counter-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-700);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

/* ─── Data Tables ─────────────────────────────────────────── */
.table-responsive {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.data-table th {
  background-color: var(--bg-700);
  color: var(--text-300);
  padding: 12px 16px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-body);
}

.data-table tr:hover td {
  background-color: rgba(124, 58, 237, 0.04);
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-success { background: rgba(16, 185, 129, 0.15); color: #10B981; }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #F59E0B; }
.badge-danger  { background: rgba(239, 68, 68, 0.15);  color: #EF4444; }
.badge-info    { background: rgba(6, 182, 212, 0.15);  color: #06B6D4; }

/* ─── Slide-over Drawer (HubSpot-Style) ────────────────────── */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 26, 0.7);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: none;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 440px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.8);
  padding: 28px;
  z-index: 1001;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer.open {
  transform: translateX(0);
}

.drawer-backdrop.open {
  display: block;
}
