/* ============================================================
   Mini-Jobs CRM — Main CSS
   Modern SaaS UI, clean, responsive, sidebar layout
   ============================================================ */

/* ─── Variables ─────────────────────────────────────────────────────────────── */
:root {
  --primary:      #4F46E5;
  --primary-dark: #3730A3;
  --primary-light:#EEF2FF;
  --secondary:    #0EA5E9;
  --success:      #10B981;
  --warning:      #F59E0B;
  --danger:       #EF4444;
  --info:         #6366F1;
  --dark:         #1E293B;
  --gray-900:     #0F172A;
  --gray-800:     #1E293B;
  --gray-700:     #334155;
  --gray-600:     #475569;
  --gray-500:     #64748B;
  --gray-400:     #94A3B8;
  --gray-300:     #CBD5E1;
  --gray-200:     #E2E8F0;
  --gray-100:     #F1F5F9;
  --gray-50:      #F8FAFC;
  --white:        #FFFFFF;
  --sidebar-w:    260px;
  --topbar-h:     60px;
  --radius:       10px;
  --radius-sm:    6px;
  --radius-lg:    16px;
  --shadow:       0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:    0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg:    0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
  --transition:   all .2s ease;
}

/* ─── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; padding: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px; line-height: 1.6;
  color: var(--gray-800);
  background: var(--gray-50);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1,h2,h3,h4,h5,h6 { margin: 0 0 .5rem; font-weight: 600; line-height: 1.3; }
p { margin: 0 0 1rem; }
ul, ol { padding-left: 1.5rem; }

/* ─── Layout ─────────────────────────────────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ─── Sidebar ────────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--gray-900);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  transition: transform .3s ease;
  overflow-y: auto;
}
.sidebar-brand {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; gap: .75rem;
}
.sidebar-brand .brand-icon {
  width: 36px; height: 36px;
  background: var(--primary);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.sidebar-brand .brand-name {
  color: var(--white);
  font-size: 15px; font-weight: 700;
  line-height: 1.2;
}
.sidebar-brand .brand-sub {
  color: var(--gray-400);
  font-size: 11px;
}
.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
}
.sidebar-section {
  padding: .25rem 1rem .1rem;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--gray-500);
  margin-top: .5rem;
}
.sidebar-nav a {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem 1.25rem;
  color: var(--gray-400);
  font-size: 13.5px; font-weight: 500;
  border-radius: 0;
  transition: var(--transition);
  margin: 1px .5rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.sidebar-nav a:hover {
  background: rgba(255,255,255,.07);
  color: var(--white);
}
.sidebar-nav a.active {
  background: var(--primary);
  color: var(--white);
}
.sidebar-nav a .nav-icon {
  font-size: 16px;
  width: 20px; text-align: center;
  flex-shrink: 0;
}
.sidebar-nav a .nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: var(--white);
  font-size: 10px; font-weight: 700;
  padding: 1px 6px;
  border-radius: 20px;
}
.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-user {
  display: flex; align-items: center; gap: .75rem;
}
.sidebar-user .user-avatar {
  width: 32px; height: 32px;
  background: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-size: 13px; font-weight: 700;
}
.sidebar-user .user-info { flex: 1; overflow: hidden; }
.sidebar-user .user-name {
  color: var(--white); font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user .user-role {
  color: var(--gray-400); font-size: 11px;
}
.sidebar-user .user-logout {
  color: var(--gray-500); font-size: 16px;
}
.sidebar-user .user-logout:hover { color: var(--danger); }

/* ─── Main content ───────────────────────────────────────────────────────────── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ─── Topbar ─────────────────────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
  position: sticky; top: 0; z-index: 50;
}
.topbar-toggle {
  display: none;
  background: none; border: none;
  font-size: 20px; cursor: pointer;
  color: var(--gray-700);
  padding: .25rem;
}
.topbar-title { font-size: 16px; font-weight: 700; color: var(--gray-900); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: .75rem; }

/* ─── Page content ───────────────────────────────────────────────────────────── */
.page-content {
  flex: 1;
  padding: 1.5rem;
}
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem;
}
.page-header h1 { font-size: 22px; color: var(--gray-900); margin: 0; }
.page-header p  { color: var(--gray-500); font-size: 13px; margin: .25rem 0 0; }

/* ─── Cards ──────────────────────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
}
.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; justify-content: space-between;
  gap: .5rem;
}
.card-title { font-size: 15px; font-weight: 700; margin: 0; color: var(--gray-900); }
.card-body  { padding: 1.25rem; }
.card-footer {
  padding: .75rem 1.25rem;
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
  border-radius: 0 0 var(--radius) var(--radius);
}

/* ─── Stats / Metric cards ───────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  padding: 1rem 1.25rem;
  display: flex; flex-direction: column; gap: .25rem;
  transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-icon { font-size: 22px; }
.stat-value { font-size: 26px; font-weight: 800; color: var(--gray-900); line-height: 1; }
.stat-label { font-size: 12px; color: var(--gray-500); font-weight: 500; }
.stat-card.primary   { border-top: 3px solid var(--primary); }
.stat-card.success   { border-top: 3px solid var(--success); }
.stat-card.warning   { border-top: 3px solid var(--warning); }
.stat-card.danger    { border-top: 3px solid var(--danger); }
.stat-card.info      { border-top: 3px solid var(--info); }
.stat-card.secondary { border-top: 3px solid var(--secondary); }

/* ─── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .4rem;
  padding: .5rem 1rem;
  font-size: 13.5px; font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary   { background: var(--primary); color: var(--white); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: var(--white); }
.btn-secondary { background: var(--white); color: var(--gray-700); border-color: var(--gray-300); }
.btn-secondary:hover { background: var(--gray-50); color: var(--gray-900); }
.btn-success   { background: var(--success); color: var(--white); border-color: var(--success); }
.btn-success:hover { background: #059669; color: var(--white); }
.btn-danger    { background: var(--danger); color: var(--white); border-color: var(--danger); }
.btn-danger:hover { background: #DC2626; color: var(--white); }
.btn-warning   { background: var(--warning); color: var(--white); border-color: var(--warning); }
.btn-info      { background: var(--info); color: var(--white); border-color: var(--info); }
.btn-sm  { padding: .3rem .7rem; font-size: 12px; }
.btn-lg  { padding: .7rem 1.5rem; font-size: 15px; }
.btn-icon { padding: .4rem .5rem; }
.btn-whatsapp { background: #25D366; color: var(--white); border-color: #25D366; }
.btn-whatsapp:hover { background: #1DA851; color: var(--white); }
.btn-email { background: #0EA5E9; color: var(--white); border-color: #0EA5E9; }
.btn-email:hover { background: #0284C7; color: var(--white); }
.btn-block { width: 100%; }

/* ─── Forms ──────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-label {
  display: block;
  font-size: 13px; font-weight: 600;
  color: var(--gray-700);
  margin-bottom: .35rem;
}
.form-control, .form-select {
  display: block; width: 100%;
  padding: .5rem .75rem;
  font-size: 13.5px; line-height: 1.5;
  color: var(--gray-800);
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
  appearance: none;
}
.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}
.form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23475569' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right .6rem center;
  background-size: 14px;
  padding-right: 2rem;
}
textarea.form-control { resize: vertical; min-height: 80px; }
.form-text { font-size: 12px; color: var(--gray-500); margin-top: .3rem; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}
.invalid-feedback { color: var(--danger); font-size: 12px; margin-top: .25rem; }
.is-invalid { border-color: var(--danger) !important; }

/* ─── Tables ─────────────────────────────────────────────────────────────────── */
.table-responsive { overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.table th {
  padding: .6rem .9rem;
  text-align: left;
  font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--gray-500);
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}
.table td {
  padding: .7rem .9rem;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
  color: var(--gray-700);
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--gray-50); }
.table-striped tr:nth-child(even) td { background: var(--gray-50); }

/* ─── Badges ─────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: .2rem .6rem;
  font-size: 11.5px; font-weight: 600;
  border-radius: 20px;
  white-space: nowrap;
}
.badge-gray    { background: var(--gray-100); color: var(--gray-600); }
.badge-blue    { background: #DBEAFE; color: #1D4ED8; }
.badge-cyan    { background: #CFFAFE; color: #0E7490; }
.badge-purple  { background: #EDE9FE; color: #6D28D9; }
.badge-orange  { background: #FEF3C7; color: #B45309; }
.badge-yellow  { background: #FEF9C3; color: #854D0E; }
.badge-green   { background: #DCFCE7; color: #166534; }
.badge-teal    { background: #CCFBF1; color: #0F766E; }
.badge-red     { background: #FEE2E2; color: #DC2626; }
.badge-dark    { background: var(--gray-700); color: var(--white); }
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-trial   { background: #FEF3C7; color: #92400E; }
.badge-active  { background: #DCFCE7; color: #166534; }
.badge-expired { background: #FEE2E2; color: #991B1B; }

/* ─── Alerts ─────────────────────────────────────────────────────────────────── */
.alert {
  padding: .85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 1rem;
  display: flex; align-items: flex-start; gap: .6rem;
}
.alert-success { background: #DCFCE7; color: #166534; border: 1px solid #BBF7D0; }
.alert-error   { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }
.alert-warning { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }
.alert-info    { background: #DBEAFE; color: #1E40AF; border: 1px solid #BFDBFE; }

/* ─── Modals ─────────────────────────────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 200;
  align-items: center; justify-content: center;
  padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn .2s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(.95) translateY(-10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title  { font-size: 16px; font-weight: 700; }
.modal-close  { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--gray-400); padding: 0; }
.modal-close:hover { color: var(--gray-700); }
.modal-body   { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--gray-100); display: flex; gap: .75rem; justify-content: flex-end; }
.modal-lg { max-width: 800px; }
.modal-xl { max-width: 1100px; }

/* ─── Trial banner ───────────────────────────────────────────────────────────── */
.trial-banner {
  background: linear-gradient(90deg, #F59E0B, #EF4444);
  color: var(--white);
  text-align: center;
  padding: .5rem 1rem;
  font-size: 13px; font-weight: 600;
}
.trial-banner a { color: var(--white); text-decoration: underline; }

/* ─── Timeline ───────────────────────────────────────────────────────────────── */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before {
  content: '';
  position: absolute; left: 18px; top: 0; bottom: 0;
  width: 2px; background: var(--gray-200);
}
.timeline-item {
  display: flex; gap: 1rem;
  padding-bottom: 1.25rem;
  position: relative;
}
.timeline-icon {
  width: 36px; height: 36px;
  background: var(--white);
  border: 2px solid var(--gray-300);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  z-index: 1;
}
.timeline-icon.success { border-color: var(--success); background: #DCFCE7; }
.timeline-icon.primary { border-color: var(--primary); background: var(--primary-light); }
.timeline-icon.warning { border-color: var(--warning); background: #FEF3C7; }
.timeline-icon.info    { border-color: var(--secondary); background: #E0F2FE; }
.timeline-content { flex: 1; padding-top: .35rem; }
.timeline-date  { font-size: 11px; color: var(--gray-400); font-weight: 600; }
.timeline-text  { font-size: 13.5px; color: var(--gray-700); margin: .2rem 0 0; }

/* ─── Followup cards ─────────────────────────────────────────────────────────── */
.followup-card {
  padding: .85rem 1rem;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--gray-300);
  background: var(--white);
  margin-bottom: .75rem;
  display: flex; align-items: center; gap: 1rem;
}
.followup-card.today   { border-left-color: var(--danger); background: #FFF5F5; }
.followup-card.overdue { border-left-color: var(--warning); background: #FFFBEB; }
.followup-card.upcoming{ border-left-color: var(--primary); }

/* ─── Search & filters ───────────────────────────────────────────────────────── */
.filters-bar {
  display: flex; align-items: center; gap: .75rem;
  flex-wrap: wrap;
  padding: .75rem 1rem;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  margin-bottom: 1rem;
}
.search-input {
  flex: 1; min-width: 200px;
  padding: .45rem .75rem .45rem 2rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  background: var(--gray-50) url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2394A3B8'%3e%3cpath fill-rule='evenodd' d='M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z' clip-rule='evenodd'/%3e%3c/svg%3e") no-repeat .55rem center / 16px;
}
.search-input:focus { outline: none; border-color: var(--primary); background-color: var(--white); }
.filter-select {
  padding: .45rem .7rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--gray-700);
  background: var(--white);
  cursor: pointer;
}
.filter-select:focus { outline: none; border-color: var(--primary); }

/* ─── Empty state ────────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 3rem 1rem;
  color: var(--gray-500);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: .75rem; }
.empty-state h3 { color: var(--gray-600); }
.empty-state p  { font-size: 13.5px; max-width: 380px; margin: 0 auto .75rem; }

/* ─── Message preview ────────────────────────────────────────────────────────── */
.message-preview {
  background: #DCF8C6;
  border-radius: 12px 12px 2px 12px;
  padding: .85rem 1rem;
  font-size: 13.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  max-width: 520px;
  color: #1a1a1a;
  box-shadow: 0 1px 2px rgba(0,0,0,.1);
}
.message-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1rem;
}

/* ─── Progress bar ───────────────────────────────────────────────────────────── */
.progress { background: var(--gray-200); border-radius: 20px; height: 6px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 20px; background: var(--primary); transition: width .4s ease; }
.progress-bar.success { background: var(--success); }
.progress-bar.warning { background: var(--warning); }
.progress-bar.danger  { background: var(--danger); }

/* ─── Tabs ───────────────────────────────────────────────────────────────────── */
.tabs { display: flex; border-bottom: 2px solid var(--gray-200); gap: .25rem; margin-bottom: 1.25rem; }
.tab-link {
  padding: .6rem 1rem;
  font-size: 13.5px; font-weight: 600;
  color: var(--gray-500);
  cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: var(--transition);
  text-decoration: none;
}
.tab-link:hover { color: var(--gray-900); text-decoration: none; }
.tab-link.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ─── Dropdown ───────────────────────────────────────────────────────────────── */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 4px);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 160px;
  z-index: 100;
  overflow: hidden;
}
.dropdown-menu.open { display: block; }
.dropdown-menu a, .dropdown-menu button {
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem 1rem;
  font-size: 13px; color: var(--gray-700);
  width: 100%; text-align: left;
  background: none; border: none; cursor: pointer;
  text-decoration: none; transition: var(--transition);
}
.dropdown-menu a:hover, .dropdown-menu button:hover {
  background: var(--gray-50); color: var(--gray-900);
}
.dropdown-divider { height: 1px; background: var(--gray-100); margin: .25rem 0; }

/* ─── Loading spinner ────────────────────────────────────────────────────────── */
.spinner {
  display: inline-block; width: 20px; height: 20px;
  border: 2px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Utility classes ────────────────────────────────────────────────────────── */
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: .25rem; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: .75rem; }
.gap-4 { gap: 1rem; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--gray-400); }
.text-small  { font-size: 12px; }
.text-bold   { font-weight: 700; }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-primary { color: var(--primary); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: .25rem; }
.mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: .75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: .75rem; }
.mt-4 { margin-top: 1rem; }
.p-0 { padding: 0; }
.w-100 { width: 100%; }
.truncate { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hidden { display: none !important; }

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
  .topbar-toggle { display: flex; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .page-content { padding: 1rem; }
  .table th:nth-child(n+4),
  .table td:nth-child(n+4) { display: none; }
  .modal { margin: .5rem; }
  .btn-lg { font-size: 14px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ─── Auth pages ─────────────────────────────────────────────────────────────── */
.auth-layout {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--gray-900) 0%, var(--primary-dark) 100%);
  padding: 1rem;
}
.auth-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 420px;
  overflow: hidden;
}
.auth-header {
  background: var(--primary);
  color: var(--white);
  padding: 1.75rem 2rem;
  text-align: center;
}
.auth-header h1 { font-size: 22px; margin-bottom: .25rem; color: var(--white); }
.auth-header p  { font-size: 13px; opacity: .85; margin: 0; }
.auth-body { padding: 2rem; }
.auth-footer { padding: 1rem 2rem; border-top: 1px solid var(--gray-100); text-align: center; font-size: 13px; }

/* ─── Landing page ───────────────────────────────────────────────────────────── */
.landing-hero {
  background: linear-gradient(135deg, var(--gray-900), var(--primary-dark));
  color: var(--white);
  padding: 5rem 1.5rem;
  text-align: center;
}
.landing-hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 1rem; }
.landing-hero p  { font-size: 1.15rem; opacity: .85; max-width: 600px; margin: 0 auto 2rem; }
.landing-features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  max-width: 900px; margin: 0 auto;
}
.feature-item {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: left;
}
.feature-item strong { display: block; margin-bottom: .25rem; }
.feature-item span   { font-size: 12.5px; opacity: .75; }

/* ─── Overlay for sidebar on mobile ─────────────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 99;
}
.sidebar-overlay.open { display: block; }

/* ─── Import/Export ──────────────────────────────────────────────────────────── */
.upload-area {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--gray-50);
}
.upload-area:hover, .upload-area.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
}
.upload-area input[type=file] { display: none; }
.upload-icon { font-size: 40px; margin-bottom: .75rem; }

/* ─── Campaign status ────────────────────────────────────────────────────────── */
.campaign-steps {
  display: flex; gap: 0;
  counter-reset: step;
  margin-bottom: 2rem;
  overflow-x: auto;
}
.campaign-step {
  flex: 1; min-width: 120px;
  padding: .75rem .5rem;
  text-align: center;
  background: var(--gray-100);
  border-right: 1px solid var(--gray-200);
  font-size: 12px; font-weight: 600;
  color: var(--gray-500);
  position: relative;
}
.campaign-step:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.campaign-step:last-child  { border-radius: 0 var(--radius) var(--radius) 0; border-right: none; }
.campaign-step.active { background: var(--primary); color: var(--white); }
.campaign-step.done   { background: var(--success); color: var(--white); }
.campaign-step .step-num {
  display: block;
  font-size: 18px; font-weight: 800;
  margin-bottom: .1rem;
}

/* ─── Scrollbar ──────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }
