/* ═══════════════════════════════════════════
   NetWeb CRM - Complete Stylesheet
   ═══════════════════════════════════════════ */

/* ── Reset & Variables ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0f1117;
  --bg-card: #1a1d27;
  --bg-card-hover: #222531;
  --bg-input: #141620;
  --accent: #6c5ce7;
  --accent-hover: #7d6ff0;
  --accent-dim: rgba(108, 92, 231, 0.15);
  --text: #e4e7ec;
  --text-dim: #8b8fa3;
  --text-muted: #5a5e70;
  --border: #2a2d3a;
  --border-light: #333648;
  --green: #00b894;
  --cyan: #00cec9;
  --orange: #fdcb6e;
  --red: #e17055;
  --sidebar-width: 260px;
  --sidebar-collapsed: 72px;
  --header-height: 64px;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --transition: 0.2s ease;
}

html { height: 100%; }
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100%;
  overflow: hidden;
}
a { color: var(--accent); text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

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

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: width var(--transition);
  flex-shrink: 0;
  z-index: 100;
  overflow: hidden;
}
.sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .user-info { display: none; }
.sidebar.collapsed .sidebar-header { justify-content: center; }
.sidebar.collapsed .sidebar-toggle { transform: rotate(180deg); }
.sidebar.collapsed .nav-item { justify-content: center; padding: 12px; }
.sidebar.collapsed .user-card { justify-content: center; }

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px;
  border-bottom: 1px solid var(--border);
  min-height: 65px;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}
.brand-text {
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}
.sidebar-toggle {
  background: none;
  border: none;
  color: var(--text-dim);
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  flex-shrink: 0;
}
.sidebar-toggle:hover { color: var(--text); background: var(--bg); }

.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.nav-item:hover { color: var(--text); background: var(--bg); }
.nav-item.active { color: var(--accent); background: var(--accent-dim); }
.nav-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}
.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-avatar {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}
.user-info { white-space: nowrap; }
.user-name { font-size: 13px; font-weight: 600; }
.user-role { font-size: 11px; color: var(--text-dim); }

/* ── Main Content ── */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  transition: var(--transition);
}

/* ── Header ── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: var(--header-height);
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  flex-shrink: 0;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.page-title {
  font-size: 20px;
  font-weight: 700;
}
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  padding: 4px;
}
.header-icon-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  position: relative;
}
.header-icon-btn:hover { color: var(--text); border-color: var(--border-light); }
.notif-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  background: var(--red);
  border-radius: 50%;
}
.header-avatar {
  width: 34px;
  height: 34px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--border-light); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-save.saved { background: var(--green); }

/* ── Page Body ── */
.page-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.card-title {
  font-size: 15px;
  font-weight: 600;
}

/* ═══════════════════════════════
   DASHBOARD
   ═══════════════════════════════ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--transition);
}
.stat-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.stat-label {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stat-icon { color: var(--accent); opacity: 0.6; }
.stat-value { font-size: 28px; font-weight: 700; margin-bottom: 6px; }
.stat-change { font-size: 12px; }
.stat-change.positive { color: var(--green); }
.stat-change.negative { color: var(--red); }

.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}
.dashboard-col { display: flex; flex-direction: column; gap: 24px; }

/* Revenue Chart */
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 200px;
  padding-top: 20px;
}
.chart-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}
.chart-bar-wrapper {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.chart-bar {
  width: 70%;
  max-width: 48px;
  background: var(--border-light);
  border-radius: 4px 4px 0 0;
  transition: height 0.5s ease;
}
.chart-bar.accent { background: var(--accent); }
.chart-label {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 8px;
}

/* Schedule */
.schedule-item {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.schedule-item:last-child { border-bottom: none; }
.schedule-time {
  font-size: 12px;
  color: var(--text-dim);
  min-width: 72px;
  padding-top: 2px;
}
.schedule-title { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.schedule-type {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}
.type-meeting { background: rgba(108, 92, 231, 0.15); color: var(--accent); }
.type-call { background: rgba(0, 184, 148, 0.15); color: var(--green); }
.type-task { background: rgba(225, 112, 85, 0.15); color: var(--red); }

/* Deal rows */
.deal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.deal-row:last-child { border-bottom: none; }
.deal-title { font-size: 14px; font-weight: 500; }
.deal-company { font-size: 12px; color: var(--text-dim); }
.deal-value { font-size: 14px; font-weight: 600; text-align: right; }
.deal-stage {
  font-size: 11px;
  color: var(--text-dim);
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 10px;
}

/* Contact rows */
.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.contact-row:last-child { border-bottom: none; }
.contact-avatar {
  width: 38px;
  height: 38px;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}
.contact-avatar.small { width: 32px; height: 32px; font-size: 11px; }
.contact-info { flex: 1; min-width: 0; }
.contact-name { font-size: 14px; font-weight: 500; }
.contact-company { font-size: 12px; color: var(--text-dim); }

/* ── Status Badges ── */
.status-badge {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.status-customer { background: rgba(0, 184, 148, 0.15); color: var(--green); }
.status-prospect { background: rgba(0, 206, 201, 0.15); color: var(--cyan); }
.status-lead { background: rgba(253, 203, 110, 0.15); color: var(--orange); }
.status-churned { background: rgba(225, 112, 85, 0.15); color: var(--red); }

/* ═══════════════════════════════
   CONTACTS PAGE
   ═══════════════════════════════ */

.contacts-layout {
  display: flex;
  gap: 0;
  height: 100%;
}
.contacts-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.contacts-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.search-input-wrap {
  position: relative;
  flex: 1;
  max-width: 320px;
}
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  display: flex;
}
.search-input {
  width: 100%;
  padding: 8px 12px 8px 38px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: var(--transition);
}
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text-muted); }

.filter-group {
  display: flex;
  gap: 4px;
}
.filter-btn {
  padding: 6px 14px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 500;
  transition: var(--transition);
}
.filter-btn:hover { border-color: var(--border-light); color: var(--text); }
.filter-btn.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }

.contacts-table-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 0 28px;
}
.contacts-table {
  width: 100%;
  border-collapse: collapse;
}
.contacts-table th {
  text-align: left;
  padding: 14px 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 2;
}
.contacts-table td {
  padding: 14px 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.contact-table-row { cursor: pointer; transition: var(--transition); }
.contact-table-row:hover { background: var(--bg-card-hover); }
.td-flex {
  display: flex;
  align-items: center;
  gap: 10px;
}
.td-name { font-weight: 500; }
.td-email { font-size: 12px; color: var(--text-dim); }
.empty-state {
  text-align: center;
  color: var(--text-dim);
  padding: 40px 0;
}

/* Contact Detail Panel */
.contact-detail {
  width: 0;
  overflow: hidden;
  border-left: 1px solid var(--border);
  background: var(--bg-card);
  transition: width 0.3s ease;
  flex-shrink: 0;
}
.contact-detail.open { width: 380px; overflow-y: auto; }

.detail-header {
  padding: 24px 20px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.detail-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}
.detail-close:hover { color: var(--text); }
.detail-avatar {
  width: 64px;
  height: 64px;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  margin: 0 auto 12px;
}
.detail-name { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.detail-role { font-size: 13px; color: var(--text-dim); margin-bottom: 10px; }

.detail-section {
  padding: 20px;
  border-bottom: 1px solid var(--border);
}
.detail-section h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.detail-field {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 13px;
}
.field-label { color: var(--text-dim); }
.field-value { font-weight: 500; }
.detail-notes { font-size: 13px; color: var(--text-dim); line-height: 1.6; }
.detail-actions {
  padding: 20px;
  display: flex;
  gap: 10px;
}

/* ═══════════════════════════════
   PIPELINE PAGE
   ═══════════════════════════════ */

.pipeline-board {
  display: flex;
  gap: 12px;
  height: 100%;
  overflow-x: auto;
  padding-bottom: 16px;
}
.pipeline-column {
  min-width: 260px;
  max-width: 280px;
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  max-height: 100%;
}
.column-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.column-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.column-name { font-size: 13px; font-weight: 600; }
.column-count {
  background: var(--bg);
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 10px;
  color: var(--text-dim);
}
.column-value { font-size: 12px; color: var(--text-dim); }

.column-cards {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 60px;
}
.column-cards.drag-over {
  background: var(--accent-dim);
  border-radius: 0 0 var(--radius) var(--radius);
}

.deal-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  cursor: grab;
  transition: var(--transition);
}
.deal-card:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow); }
.deal-card.dragging { opacity: 0.5; }
.deal-card-title { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.deal-card-company { font-size: 12px; color: var(--text-dim); margin-bottom: 10px; }
.deal-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.deal-card-value { font-size: 14px; font-weight: 700; }
.deal-card-prob { font-size: 12px; font-weight: 600; }
.deal-card-contact { font-size: 11px; color: var(--text-dim); }
.deal-card-days { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ═══════════════════════════════
   CONVERSATIONS PAGE
   ═══════════════════════════════ */

.conversations-layout {
  display: flex;
  height: 100%;
  overflow: hidden;
}
.conv-sidebar {
  width: 360px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  background: var(--bg-card);
}
.conv-filters {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 6px;
}
.channel-btn {
  padding: 5px 12px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 500;
  transition: var(--transition);
}
.channel-btn:hover { border-color: var(--border-light); color: var(--text); }
.channel-btn.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }

.conv-list {
  flex: 1;
  overflow-y: auto;
}
.conv-item {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}
.conv-item:hover { background: var(--bg-card-hover); }
.conv-item.active { background: var(--accent-dim); border-left: 3px solid var(--accent); }
.conv-item.unread .conv-name { font-weight: 700; }
.conv-item.unread .conv-subject { color: var(--text); }
.conv-avatar {
  width: 40px;
  height: 40px;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}
.conv-content { flex: 1; min-width: 0; }
.conv-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}
.conv-name { font-size: 13px; font-weight: 500; }
.conv-time { font-size: 11px; color: var(--text-muted); }
.conv-subject {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 2px;
  font-weight: 500;
}
.conv-preview {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.conv-channel {
  display: flex;
  align-items: flex-start;
  padding-top: 2px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.empty-conv {
  text-align: center;
  color: var(--text-dim);
  padding: 40px 16px;
}

/* Chat Panel */
.chat-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.chat-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}
.chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-header-name { font-size: 15px; font-weight: 600; }
.chat-header-channel {
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.chat-message {
  display: flex;
  gap: 10px;
  max-width: 70%;
}
.chat-message.sent {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.msg-avatar {
  width: 32px;
  height: 32px;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}
.msg-bubble {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
}
.chat-message.sent .msg-bubble {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.msg-text { font-size: 13px; line-height: 1.5; }
.msg-time { font-size: 11px; color: var(--text-muted); margin-top: 6px; }
.chat-message.sent .msg-time { color: rgba(255, 255, 255, 0.6); }

.chat-input {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  gap: 10px;
}
.chat-input textarea {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  resize: none;
  outline: none;
  min-height: 42px;
  max-height: 120px;
}
.chat-input textarea:focus { border-color: var(--accent); }
.chat-input textarea::placeholder { color: var(--text-muted); }
.chat-input .btn { align-self: flex-end; }

/* ═══════════════════════════════
   CALENDAR PAGE
   ═══════════════════════════════ */

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.calendar-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}
.calendar-nav .btn { padding: 6px 10px; }
.week-label {
  font-size: 16px;
  font-weight: 600;
  min-width: 200px;
  text-align: center;
}

.calendar-grid {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.cal-header-row {
  display: grid;
  grid-template-columns: 72px repeat(5, 1fr);
  border-bottom: 1px solid var(--border);
}
.cal-time-gutter {
  background: var(--bg-card);
}
.cal-day-header {
  padding: 14px 12px;
  text-align: center;
  border-left: 1px solid var(--border);
}
.cal-day-header.today { background: var(--accent-dim); }
.cal-day-name {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.cal-day-num { font-size: 20px; font-weight: 700; }
.cal-day-num.today { color: var(--accent); }

.cal-body { max-height: calc(100vh - 280px); overflow-y: auto; }
.cal-row {
  display: grid;
  grid-template-columns: 72px repeat(5, 1fr);
  min-height: 60px;
}
.cal-time-label {
  padding: 8px 10px 0;
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
  border-right: 1px solid var(--border);
}
.cal-cell {
  border-left: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  min-height: 60px;
}
.cal-event {
  position: absolute;
  left: 3px;
  right: 3px;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  overflow: hidden;
  z-index: 1;
  cursor: pointer;
}
.cal-event-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ═══════════════════════════════
   SETTINGS PAGE
   ═══════════════════════════════ */

.settings-layout {
  display: flex;
  gap: 0;
  height: 100%;
}
.settings-tabs {
  width: 220px;
  border-right: 1px solid var(--border);
  padding: 16px 8px;
  flex-shrink: 0;
  background: var(--bg-card);
}
.settings-tab {
  display: block;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  text-align: left;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 2px;
}
.settings-tab:hover { color: var(--text); background: var(--bg); }
.settings-tab.active { color: var(--accent); background: var(--accent-dim); }

.settings-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
}
.settings-panel { display: none; }
.settings-panel.active { display: block; }
.settings-panel h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}
.settings-panel .section-desc {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 20px;
}
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  max-width: 480px;
  padding: 9px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: var(--transition);
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus { border-color: var(--accent); }
.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-muted); }
.form-select { appearance: auto; }
.form-textarea { resize: vertical; min-height: 80px; }
.form-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 480px;
}

/* Toggle */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  max-width: 480px;
}
.toggle-label { font-size: 14px; font-weight: 500; }
.toggle-desc { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--border-light);
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
}
.toggle-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: var(--transition);
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* Team Members */
.team-member {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.team-member-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.team-member-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.team-role {
  font-size: 12px;
  color: var(--text-dim);
  background: var(--bg);
  padding: 3px 10px;
  border-radius: 10px;
}

/* Settings sections divider */
.settings-divider {
  height: 1px;
  background: var(--border);
  margin: 28px 0;
  max-width: 480px;
}

/* Billing plan cards */
.plan-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 720px;
}
.plan-card {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: var(--transition);
}
.plan-card.current { border-color: var(--accent); }
.plan-card-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.plan-card-price { font-size: 28px; font-weight: 700; margin-bottom: 4px; }
.plan-card-price span { font-size: 13px; color: var(--text-dim); font-weight: 400; }
.plan-card-desc { font-size: 12px; color: var(--text-dim); margin-bottom: 16px; }
.plan-card .btn { width: 100%; justify-content: center; }

/* ═══════════════════════════════
   RESPONSIVE
   ═══════════════════════════════ */

@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 992px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    transform: translateX(-100%);
    z-index: 200;
    width: var(--sidebar-width);
    box-shadow: var(--shadow);
  }
  .sidebar.mobile-open { transform: translateX(0); }
  .mobile-menu-btn { display: flex; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-detail.open { width: 300px; }
  .conv-sidebar { width: 280px; }
  .settings-tabs { width: 180px; }
  .plan-cards { grid-template-columns: 1fr; max-width: 320px; }
}
@media (max-width: 640px) {
  .page-header { padding: 0 16px; }
  .page-body { padding: 16px; }
  .contacts-toolbar { padding: 12px 16px; }
  .contacts-table-wrap { padding: 0 16px; }
  .contact-detail.open { width: 100%; position: absolute; right: 0; top: 0; bottom: 0; z-index: 50; }
  .conv-sidebar { width: 100%; }
  .chat-panel { display: none; }
  .settings-layout { flex-direction: column; }
  .settings-tabs {
    width: 100%;
    flex-direction: row;
    display: flex;
    overflow-x: auto;
    padding: 8px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .settings-tab { white-space: nowrap; }
  .form-row { grid-template-columns: 1fr; }
}

/* ── Utility Classes ── */
.pipeline-body { overflow-x: auto; overflow-y: hidden; }
.team-invite-wrap { margin-bottom: 20px; }
.subsection-title { font-size: 15px; font-weight: 600; margin-bottom: 16px; }
.chat-placeholder-avatar { opacity: 0.3; }
.chat-placeholder-text { color: var(--text-dim); }

/* ═══════════════════════════════
   TAB BAR (Reusable)
   ═══════════════════════════════ */

.tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  background: var(--bg-card);
}
.tab-btn {
  padding: 12px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ═══════════════════════════════
   SUMMARY CARDS (Reusable row)
   ═══════════════════════════════ */

.summary-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.summary-card .card-label {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.summary-card .card-value {
  font-size: 28px;
  font-weight: 700;
}
.summary-card .card-value.green { color: var(--green); }
.summary-card .card-value.orange { color: var(--orange); }
.summary-card .card-value.red { color: var(--red); }

/* ═══════════════════════════════
   DATA TABLE (Reusable)
   ═══════════════════════════════ */

.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  text-align: left;
  padding: 14px 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}
.data-table td {
  padding: 14px 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.data-table tbody tr { transition: var(--transition); }
.data-table tbody tr:hover { background: var(--bg-card-hover); }

/* Additional status badges */
.status-paid { background: rgba(0, 184, 148, 0.15); color: var(--green); }
.status-pending { background: rgba(253, 203, 110, 0.15); color: var(--orange); }
.status-overdue { background: rgba(225, 112, 85, 0.15); color: var(--red); }
.status-active { background: rgba(0, 184, 148, 0.15); color: var(--green); }
.status-inactive { background: rgba(139, 143, 163, 0.15); color: var(--text-dim); }
.status-draft { background: rgba(139, 143, 163, 0.15); color: var(--text-dim); }
.status-completed { background: rgba(108, 92, 231, 0.15); color: var(--accent); }
.status-sent { background: rgba(0, 206, 201, 0.15); color: var(--cyan); }
.status-viewed { background: rgba(253, 203, 110, 0.15); color: var(--orange); }
.status-signed { background: rgba(0, 184, 148, 0.15); color: var(--green); }
.status-published { background: rgba(0, 184, 148, 0.15); color: var(--green); }

/* ═══════════════════════════════
   PAYMENTS PAGE
   ═══════════════════════════════ */

.payments-body { padding: 24px 28px; overflow-y: auto; flex: 1; }

/* ═══════════════════════════════
   MARKETING PAGE
   ═══════════════════════════════ */

.marketing-body { padding: 24px 28px; overflow-y: auto; flex: 1; }

/* ═══════════════════════════════
   AUTOMATION PAGE - Workflow Cards
   ═══════════════════════════════ */

.automation-body { padding: 24px 28px; overflow-y: auto; flex: 1; }

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.workflow-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--transition);
}
.workflow-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.workflow-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}
.workflow-card-title { font-size: 15px; font-weight: 600; }
.workflow-card-trigger { font-size: 12px; color: var(--text-dim); margin-bottom: 14px; line-height: 1.5; }
.workflow-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
}
.workflow-card-stats {
  display: flex;
  gap: 16px;
}
.workflow-stat span { font-weight: 600; color: var(--text); }

/* Status toggle (compact) */
.status-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.status-toggle input { opacity: 0; width: 0; height: 0; }
.status-toggle .toggle-track {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--border-light);
  border-radius: 11px;
  cursor: pointer;
  transition: var(--transition);
}
.status-toggle .toggle-track::before {
  content: "";
  position: absolute;
  width: 16px; height: 16px;
  left: 3px; bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: var(--transition);
}
.status-toggle input:checked + .toggle-track { background: var(--green); }
.status-toggle input:checked + .toggle-track::before { transform: translateX(18px); }

/* ═══════════════════════════════
   SITES PAGE - Funnel/Site Cards
   ═══════════════════════════════ */

.sites-body { padding: 24px 28px; overflow-y: auto; flex: 1; }

.site-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.site-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}
.site-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.site-card-thumb {
  height: 140px;
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.site-card-body { padding: 16px; }
.site-card-title { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.site-card-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.site-card-stats span { font-weight: 600; color: var(--text); }
.site-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ═══════════════════════════════
   REPUTATION PAGE - Reviews
   ═══════════════════════════════ */

.reputation-body { padding: 24px 28px; overflow-y: auto; flex: 1; }

.review-list { display: flex; flex-direction: column; gap: 12px; }
.review-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--transition);
}
.review-item:hover { border-color: var(--border-light); }
.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.review-author {
  display: flex;
  align-items: center;
  gap: 10px;
}
.review-platform {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 10px;
  font-weight: 600;
}
.platform-google { background: rgba(66, 133, 244, 0.15); color: #4285f4; }
.platform-facebook { background: rgba(24, 119, 242, 0.15); color: #1877f2; }
.review-stars { color: #fdcb6e; font-size: 16px; letter-spacing: 1px; margin-bottom: 8px; }
.review-text { font-size: 13px; color: var(--text-dim); line-height: 1.6; margin-bottom: 8px; }
.review-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

/* Star rating display */
.star-rating { color: #fdcb6e; font-size: 24px; letter-spacing: 2px; }

/* ═══════════════════════════════
   REPORTING PAGE
   ═══════════════════════════════ */

.reporting-body { padding: 24px 28px; overflow-y: auto; flex: 1; }

.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.chart-placeholder {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
}
.chart-placeholder-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
}
.chart-placeholder-area {
  flex: 1;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* ═══════════════════════════════
   DOCUMENTS PAGE
   ═══════════════════════════════ */

.documents-body { padding: 24px 28px; overflow-y: auto; flex: 1; }

/* ═══════════════════════════════
   COURSES PAGE - Course Cards
   ═══════════════════════════════ */

.courses-body { padding: 24px 28px; overflow-y: auto; flex: 1; }

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.course-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}
.course-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.course-card-thumb {
  height: 140px;
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.course-card-body { padding: 16px; }
.course-card-title { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.course-card-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.course-card-stats span { font-weight: 600; color: var(--text); }
.course-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-right: 10px;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* ═══════════════════════════════
   SOCIAL PLANNER PAGE
   ═══════════════════════════════ */

.social-body { padding: 24px 28px; overflow-y: auto; flex: 1; }

.social-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
}
.social-day {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 200px;
  display: flex;
  flex-direction: column;
}
.social-day-header {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}
.social-day-header span {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 500;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.social-day-body {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.social-post {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 11px;
  cursor: pointer;
  transition: var(--transition);
}
.social-post:hover { background: var(--bg-card-hover); }
.social-post-platform {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.platform-fb { background: #1877f2; }
.platform-ig { background: #e1306c; }
.platform-li { background: #0a66c2; }
.platform-tk { background: #010101; }
.social-post-time { color: var(--text-muted); white-space: nowrap; font-size: 10px; }
.social-post-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

/* Action link button */
.action-link {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.action-link:hover { background: var(--accent-dim); }

/* ═══════════════════════════════
   RESPONSIVE ADDITIONS
   ═══════════════════════════════ */

@media (max-width: 1200px) {
  .summary-cards { grid-template-columns: repeat(2, 1fr); }
  .charts-row { grid-template-columns: 1fr; }
  .social-calendar { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 992px) {
  .workflow-grid { grid-template-columns: 1fr; }
  .site-grid { grid-template-columns: 1fr; }
  .course-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .summary-cards { grid-template-columns: 1fr; }
  .tab-bar { padding: 0 16px; overflow-x: auto; }
  .social-calendar { grid-template-columns: repeat(2, 1fr); }
  .payments-body, .marketing-body, .automation-body, .sites-body,
  .reputation-body, .reporting-body, .documents-body, .courses-body,
  .social-body { padding: 16px; }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ═══════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════ */

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg);
  overflow: auto;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 80px rgba(108, 92, 231, 0.06);
  position: relative;
}

.login-gradient-line {
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--cyan), var(--accent));
  background-size: 200% 100%;
}

.login-header {
  padding: 40px 36px 0;
  text-align: center;
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}

.login-brand-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.login-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.login-subtitle {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.login-form {
  padding: 28px 36px 0;
}

.login-field {
  margin-bottom: 20px;
}

.login-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.login-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.login-input::placeholder {
  color: var(--text-muted);
}

.login-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}

.login-btn {
  width: 100%;
  padding: 13px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  margin-top: 4px;
}

.login-btn:hover {
  background: var(--accent-hover);
}

.login-btn:active {
  transform: scale(0.98);
}

.login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.login-error {
  color: var(--red);
  font-size: 13px;
  min-height: 20px;
  text-align: center;
  margin-bottom: 4px;
}

.login-tabs {
  display: flex;
  padding: 0 36px;
  gap: 0;
  border-bottom: 1px solid var(--border-glass, rgba(255,255,255,0.08));
}

.login-tab {
  flex: 1;
  padding: 14px 0;
  background: none;
  border: none;
  color: var(--text-dim, #8b8fa3);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  font-family: inherit;
}

.login-tab:hover {
  color: var(--text, #e4e7ec);
}

.login-tab.active {
  color: var(--accent, #6c5ce7);
  border-bottom-color: var(--accent, #6c5ce7);
}

.login-form-hidden {
  display: none;
}

.login-forgot {
  text-align: center;
  margin-top: 12px;
  font-size: 13px;
}

.login-forgot a {
  color: var(--accent, #6c5ce7);
  text-decoration: none;
  font-weight: 500;
}

.login-forgot a:hover {
  text-decoration: underline;
}

.login-footer {
  padding: 24px 36px 32px;
  text-align: center;
}

.login-terms {
  font-size: 11px;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════
   UPGRADE MODAL
   ═══════════════════════════════════════════ */

.upgrade-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.upgrade-modal {
  width: 100%;
  max-width: 720px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  position: relative;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
  max-height: 90vh;
  overflow-y: auto;
}

.upgrade-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color var(--transition);
}

.upgrade-close:hover {
  color: var(--text);
}

.upgrade-heading {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
  text-align: center;
}

.upgrade-subheading {
  font-size: 14px;
  color: var(--text-dim);
  text-align: center;
  margin-bottom: 32px;
}

.upgrade-plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.upgrade-plan {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: border-color var(--transition);
}

.upgrade-plan.featured {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(108, 92, 231, 0.15);
  position: relative;
}

.upgrade-plan-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.upgrade-plan-price {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}

.upgrade-plan-period {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-dim);
}

.upgrade-plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  width: 100%;
}

.upgrade-plan-features li {
  font-size: 13px;
  color: var(--text-dim);
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.upgrade-plan-features li:last-child {
  border-bottom: none;
}

.upgrade-cta {
  display: inline-block;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
  margin-top: auto;
}

.upgrade-cta:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  color: var(--text);
}

.upgrade-cta.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.upgrade-cta.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

@media (max-width: 700px) {
  .upgrade-plans {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin: 0 auto;
  }
  .upgrade-modal {
    padding: 24px 20px;
  }
}

@media (max-width: 480px) {
  .login-card {
    border: none;
    border-radius: 0;
  }
  .login-header {
    padding: 32px 24px 0;
  }
  .login-form {
    padding: 24px 24px 0;
  }
  .login-footer {
    padding: 20px 24px 28px;
  }
}
