/* Bizzby Founder Portal Styles */

:root {
  --cream: #FDF8F3;
  --cream-deep: #F5EDE4;
  --warm-white: #FEFCFA;
  --primary: #D4654A;
  --primary-hover: #C05539;
  --primary-light: #F2DDD6;
  --primary-glow: rgba(212, 101, 74, 0.12);
  --navy: #2C2438;
  --navy-soft: #4A3F56;
  --sage: #7B9E87;
  --sage-light: #E8F0EB;
  --gold: #C4973B;
  --gold-light: #F5EDD8;
  --gray-warm: #8E8490;
  --gray-light: #E8E2E0;
  --border: #E8E2E0;
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  --success: #7B9E87;
  --error: #D4654A;
}

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

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--navy);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  color: var(--navy);
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin-bottom: 0.875rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Navigation */
.nav {
  background: var(--warm-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav-logo img {
  height: 32px;
  width: auto;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  flex: 1;
  margin-left: 3rem;
}

.nav-menu a {
  color: var(--navy-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.938rem;
  transition: color 0.2s;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-user span {
  font-size: 0.875rem;
  color: var(--navy-soft);
  font-weight: 500;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.938rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:disabled {
  background: var(--gray-light);
  color: var(--gray-warm);
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--cream-deep);
  color: var(--navy);
}

.btn-secondary:hover {
  background: var(--gray-light);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--navy);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-block {
  width: 100%;
}

.btn-text {
  background: none;
  border: none;
  color: var(--gray-warm);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0.5rem;
}

.btn-text:hover {
  color: var(--primary);
}

/* Cards */
.card {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.card h2 {
  margin-top: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.status-card {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.status-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.status-card h3 {
  font-size: 1.125rem;
  margin: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.813rem;
  font-weight: 600;
}

.status-badge.active {
  background: var(--sage-light);
  color: var(--sage);
}

.status-badge.inactive {
  background: var(--gray-light);
  color: var(--gray-warm);
}

.status-badge svg {
  width: 12px;
  height: 12px;
}

.status-card-content {
  color: var(--navy-soft);
  font-size: 0.938rem;
}

.status-card a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.status-card a:hover {
  text-decoration: underline;
}

/* Quick Actions */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--warm-white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
}

.action-btn:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.action-btn svg {
  width: 24px;
  height: 24px;
  color: var(--primary);
}

/* Login Page */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--cream) 0%, var(--cream-deep) 100%);
}

.login-container {
  width: 100%;
  max-width: 440px;
  padding: 2rem;
}

.login-card {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3rem 2.5rem;
  text-align: center;
}

.login-logo {
  margin-bottom: 2rem;
}

.login-logo img {
  height: 48px;
  width: auto;
}

.login-card h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.login-subtitle {
  color: var(--navy-soft);
  margin-bottom: 2rem;
  font-size: 0.938rem;
}

.login-form {
  text-align: left;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--navy);
}

.form-group input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
}

.success-message,
.error-message {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  text-align: center;
}

.success-message {
  background: var(--sage-light);
  color: var(--sage);
}

.success-message svg {
  color: var(--sage);
  margin-bottom: 1rem;
}

.success-message h3 {
  color: var(--sage);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.success-message p {
  margin-bottom: 0.5rem;
  font-size: 0.938rem;
}

.error-message {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 500;
}

.text-muted {
  color: var(--gray-warm) !important;
  font-size: 0.875rem !important;
}

.login-footer {
  margin-top: 2rem;
  text-align: center;
  color: var(--navy-soft);
  font-size: 0.875rem;
}

.login-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

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

/* Table */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--warm-white);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: var(--cream-deep);
}

th {
  text-align: left;
  padding: 1rem 1.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--navy-soft);
  border-bottom: 1px solid var(--border);
}

td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.938rem;
}

tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--cream);
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border);
}

.tab {
  padding: 0.75rem 1.5rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.938rem;
  color: var(--navy-soft);
  cursor: pointer;
  transition: all 0.2s;
}

.tab:hover {
  color: var(--primary);
}

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Filters */
.filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.filter-group label {
  font-size: 0.813rem;
  font-weight: 600;
  color: var(--navy-soft);
}

.filter-group input,
.filter-group select {
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.875rem;
}

/* Plan Card */
.plan-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white;
  border: none;
  padding: 2.5rem;
  margin-bottom: 2rem;
}

.plan-card h2,
.plan-card h3 {
  color: white;
}

.plan-card .plan-price {
  font-size: 3rem;
  font-family: var(--font-display);
  margin: 1rem 0;
}

.plan-card .plan-features {
  list-style: none;
  margin: 1.5rem 0;
}

.plan-card .plan-features li {
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.plan-card .plan-features svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Usage Meter */
.usage-meter {
  margin: 1.5rem 0;
}

.usage-bar {
  height: 12px;
  background: var(--cream-deep);
  border-radius: 999px;
  overflow: hidden;
  margin: 0.75rem 0;
}

.usage-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--sage) 0%, var(--primary) 100%);
  border-radius: 999px;
  transition: width 0.3s;
}

.usage-text {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--navy-soft);
}

/* ─── Hamburger Toggle ─── */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 110;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: all 0.25s;
}
.nav.open .nav-toggle span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ─── Responsive: Tablet ─── */
@media (max-width: 900px) {
  .nav-menu { gap: 1rem; margin-left: 1.5rem; }
  .nav-menu a { font-size: 0.85rem; }
  .billing-features-grid { grid-template-columns: 1fr; }
}

/* ─── Responsive: Mobile ─── */
@media (max-width: 768px) {
  /* Nav → hamburger */
  .nav-toggle { display: flex; }
  .nav-container {
    flex-wrap: wrap;
    gap: 0;
    padding: 0.75rem 1rem;
  }
  .nav-logo img { height: 26px; }
  .nav-container > .nav-logo { flex: 1; }

  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    margin-left: 0;
    padding: 0.5rem 0 0.75rem;
    border-top: 1px solid var(--border);
    margin-top: 0.75rem;
  }
  .nav.open .nav-menu { display: flex; }
  .nav-menu a {
    padding: 0.75rem 0.5rem;
    border-bottom: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
  }
  .nav-menu a:hover,
  .nav-menu a.active {
    background: var(--cream);
    border-bottom: none;
  }

  .nav-user {
    display: none;
    width: 100%;
    justify-content: space-between;
    padding: 0.5rem 0.5rem 0;
    border-top: 1px solid var(--border);
    margin-top: 0.25rem;
  }
  .nav.open .nav-user { display: flex; }

  /* Layout */
  .container { padding: 1rem 0.75rem; }
  .card { padding: 1.25rem; border-radius: 12px; }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.35rem; }
  h3 { font-size: 1.15rem; }

  /* Dashboard grids */
  .card-grid,
  .quick-actions {
    grid-template-columns: 1fr;
  }

  /* Status cards (dashboard) */
  .status-grid { grid-template-columns: 1fr 1fr !important; gap: 0.5rem !important; }

  /* Tables → cards on mobile */
  .table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table-container table { min-width: 480px; }

  /* Buttons */
  .btn { padding: 0.65rem 1.25rem; font-size: 0.875rem; }
  .btn-sm { padding: 0.35rem 0.75rem; font-size: 0.75rem; }

  /* Settings page */
  .settings-section-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .settings-grid { grid-template-columns: 1fr; gap: 0.75rem; }
  .settings-form-actions { flex-direction: column; }
  .settings-form-actions .btn { width: 100%; }
  .settings-service-row { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .settings-toggle-row { gap: 1rem; }

  /* Billing page */
  .billing-plan-header { flex-direction: column; }
  .billing-price-amount { font-size: 2rem; }
  .billing-features-grid { grid-template-columns: 1fr; }
  .billing-upgrade-banner { flex-direction: column; text-align: center; }
  .billing-payment-method { flex-direction: column; align-items: flex-start; }
  .billing-next-invoice { flex-direction: column; gap: 0.75rem; }
  .billing-next-invoice > div:last-child { text-align: left; }
  .billing-invoice-row { flex-direction: column; align-items: flex-start; gap: 0.35rem; }
  .billing-invoice-right { width: 100%; justify-content: flex-start; }

  /* Team page */
  .team-overview-header { flex-direction: column; align-items: flex-start; }
  .team-alex-header { flex-direction: column; text-align: center; align-items: center; }
  .team-alex-stats { grid-template-columns: repeat(2, 1fr); }
  .team-alex-actions { flex-direction: column; }
  .team-alex-actions .btn { width: 100%; text-align: center; }
  .team-alex-name { justify-content: center; }

  /* Communications page */
  .comm-stats { grid-template-columns: 1fr 1fr !important; }
  .comm-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; gap: 0; }
  .comm-tabs button { white-space: nowrap; font-size: 0.8rem; padding: 0.5rem 0.75rem; flex-shrink: 0; }
  .comm-filters { flex-direction: column; }

  /* Notifications page */
  .notif-card { flex-direction: column; }
  .notif-actions { flex-direction: column; width: 100%; }
  .notif-actions .btn { width: 100%; }

  /* Support FAB */
  #supportFab { width: 48px; height: 48px; bottom: 1rem; right: 1rem; }
  #supportFab svg { width: 20px; height: 20px; }
}

/* ─── Responsive: Small phones ─── */
@media (max-width: 400px) {
  .container { padding: 0.75rem 0.5rem; }
  .card { padding: 1rem; }
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.2rem; }
  .billing-price-amount { font-size: 1.75rem; }
  .team-alex-stats { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .team-stat { padding: 0.5rem; }
  .team-stat-value { font-size: 1.25rem; }
  .status-grid { grid-template-columns: 1fr !important; }
}

/* Loading State */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--gray-warm);
}

.loading::after {
  content: '';
  width: 32px;
  height: 32px;
  border: 3px solid var(--gray-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Notification Badge (nav) */
.notif-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--primary);
  color: white;
  font-size: 0.688rem;
  font-weight: 700;
  margin-left: 6px;
  vertical-align: middle;
  line-height: 1;
}

/* Dashboard notification banners */
.notif-banner-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.notif-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  background: var(--warm-white);
  border: 1px solid var(--border);
  transition: transform 0.15s, box-shadow 0.15s;
}

.notif-banner:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.notif-urgent {
  border-left: 4px solid var(--primary);
  background: linear-gradient(90deg, rgba(212, 101, 74, 0.04) 0%, var(--warm-white) 30%);
}

.notif-moderate {
  border-left: 4px solid var(--gold);
  background: linear-gradient(90deg, rgba(196, 151, 59, 0.04) 0%, var(--warm-white) 30%);
}

.notif-gentle {
  border-left: 4px solid var(--sage);
  background: linear-gradient(90deg, rgba(123, 158, 135, 0.04) 0%, var(--warm-white) 30%);
}

.notif-banner-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.notif-banner-content {
  flex: 1;
  min-width: 0;
}

.notif-banner-title {
  font-weight: 700;
  font-size: 0.938rem;
  color: var(--navy);
  margin-bottom: 2px;
}

.notif-banner-msg {
  font-size: 0.813rem;
  color: var(--navy-soft);
  line-height: 1.4;
}

.notif-banner-action {
  flex-shrink: 0;
}

.notif-see-all {
  text-align: center;
  display: block;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  padding: 0.5rem;
}

.notif-see-all:hover {
  text-decoration: underline;
}

/* Notifications page cards */
.notif-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  background: var(--cream);
  border: 1px solid var(--border);
}

.notif-card-urgent {
  background: rgba(212, 101, 74, 0.04);
  border-color: rgba(212, 101, 74, 0.15);
}

.notif-card-moderate {
  background: rgba(196, 151, 59, 0.04);
  border-color: rgba(196, 151, 59, 0.15);
}

.notif-card-gentle {
  background: rgba(123, 158, 135, 0.04);
  border-color: rgba(123, 158, 135, 0.15);
}

.notif-card-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.notif-card-body {
  flex: 1;
  min-width: 0;
}

.notif-card-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: 4px;
}

.notif-card-msg {
  font-size: 0.875rem;
  color: var(--navy-soft);
  line-height: 1.5;
}

.notif-card-action {
  flex-shrink: 0;
  text-decoration: none;
  font-size: 0.813rem;
  padding: 0.625rem 1.25rem;
}

@media (max-width: 768px) {
  .notif-banner,
  .notif-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .notif-banner-action,
  .notif-card-action {
    width: 100%;
    text-align: center;
  }
}

/* Communications Stats Cards */
.comms-stat-card {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.comms-stat-icon {
  font-size: 1.5rem;
}

.comms-stat-number {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--navy);
  line-height: 1;
}

.comms-stat-label {
  font-size: 0.813rem;
  color: var(--navy-soft);
  font-weight: 500;
}

/* Communications Timeline */
.comms-timeline {
  display: flex;
  flex-direction: column;
}

.comms-date-header {
  font-weight: 700;
  font-size: 0.813rem;
  color: var(--navy-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 0 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

.comms-date-header:not(:first-child) {
  margin-top: 1rem;
}

.comms-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}

.comms-item:hover {
  background: var(--cream);
}

.comms-item + .comms-item {
  border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.comms-item-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream-deep);
  border-radius: 50%;
}

.comms-item-body {
  flex: 1;
  min-width: 0;
}

.comms-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.comms-item-subject {
  font-weight: 600;
  font-size: 0.938rem;
  color: var(--navy);
}

.comms-item-time {
  font-size: 0.75rem;
  color: var(--gray-warm);
  white-space: nowrap;
  flex-shrink: 0;
}

.comms-item-summary {
  font-size: 0.875rem;
  color: var(--navy-soft);
  margin-top: 2px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.comms-item-meta {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.comms-type-badge {
  font-size: 0.688rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.comms-type-email { background: #E8F4FD; color: #1E6FA0; }
.comms-type-call { background: #FEF3E2; color: #B47A1A; }
.comms-type-message { background: #E8F0EB; color: #4A7B5A; }
.comms-type-action { background: #F2DDD6; color: #C05539; }
.comms-type-task { background: #E8F0EB; color: #4A7B5A; }
.comms-type-website { background: #E8E8FD; color: #5B52A0; }
.comms-type-seo { background: #F5EDD8; color: #8B6F2E; }
.comms-type-social { background: #FDE8F0; color: #A04070; }

.comms-direction {
  font-size: 0.75rem;
  color: var(--gray-warm);
}

.comms-status {
  font-size: 0.688rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}

.comms-status-unread {
  background: var(--primary-light);
  color: var(--primary);
}

.comms-status-pending {
  background: var(--gold-light);
  color: var(--gold);
}

.comms-from {
  font-size: 0.75rem;
  color: var(--gray-warm);
}

/* Expandable detail */
.comms-item-detail {
  margin-top: 0.75rem;
  padding: 1rem;
  background: var(--cream);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.comms-item-body-text {
  font-size: 0.875rem;
  color: var(--navy-soft);
  line-height: 1.6;
  white-space: pre-wrap;
}

/* Empty state */
.comms-empty {
  text-align: center;
  padding: 3rem 2rem;
}

.comms-empty-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.comms-empty h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.comms-empty p {
  color: var(--navy-soft);
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto 2rem;
  line-height: 1.5;
}

.comms-empty-examples {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  max-width: 600px;
  margin: 0 auto;
}

.comms-empty-example {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--cream);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--navy-soft);
  font-weight: 500;
}

.comms-empty-example span {
  font-size: 1.25rem;
}

@media (max-width: 768px) {
  .comms-item-header {
    flex-direction: column;
    gap: 0.25rem;
  }
  .comms-stat-card {
    padding: 1rem;
  }
  .comms-empty-examples {
    grid-template-columns: 1fr;
  }
}

/* Floating support button */
#supportFab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(212, 101, 74, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 1000;
  text-decoration: none;
}
#supportFab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(212, 101, 74, 0.45);
}
#supportFab svg {
  stroke: white;
}

/* ─── Settings Page ─── */
.settings-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}
.settings-section-header h2 { margin-bottom: 0; }

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 2rem;
}
@media (max-width: 600px) {
  .settings-grid { grid-template-columns: 1fr; }
}

.settings-field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-warm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.settings-field p {
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
  color: var(--navy);
  word-break: break-word;
}
.settings-field a {
  color: var(--primary);
  text-decoration: none;
}
.settings-field a:hover { text-decoration: underline; }

.settings-edit .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.settings-edit label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy-soft);
}
.settings-edit input,
.settings-edit select {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font-body);
  background: var(--warm-white);
  transition: border-color 0.2s;
}
.settings-edit input:focus,
.settings-edit select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-hint {
  font-size: 0.75rem;
  color: var(--gray-warm);
}

.settings-form-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
}

/* Services list */
.settings-services-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.settings-service-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1rem;
  background: var(--cream);
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.settings-service-row:hover { background: var(--cream-deep); }
.settings-service-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.settings-service-icon { font-size: 1.25rem; }
.settings-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  white-space: nowrap;
}
.settings-badge.connected {
  background: var(--sage-light);
  color: var(--sage);
}
.settings-badge.not-connected {
  background: var(--cream-deep);
  color: var(--gray-warm);
}

/* Color swatches */
.settings-color-swatch {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Toggle switches */
.settings-toggle-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.settings-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}
.settings-toggle-row:last-child { border-bottom: none; }

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  cursor: pointer;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--gray-light);
  border-radius: 26px;
  transition: 0.25s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.25s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--sage);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
}

/* Danger outline button */
.btn-danger-outline {
  color: var(--error) !important;
  border-color: var(--error) !important;
}
.btn-danger-outline:hover {
  background: var(--error) !important;
  color: white !important;
}

/* Toast */
.settings-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--navy);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 10000;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}
.settings-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.settings-toast.error {
  background: var(--error);
}

/* ─── Billing Page ─── */
.billing-plan-card { overflow: hidden; }
.billing-plan-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.billing-plan-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--gray-warm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.billing-plan-price { margin-top: 0.25rem; }
.billing-price-amount {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}
.billing-price-interval {
  font-size: 1rem;
  color: var(--gray-warm);
  font-weight: 400;
}

.billing-status-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  text-transform: capitalize;
}
.billing-status-badge.active { background: var(--sage-light); color: var(--sage); }
.billing-status-badge.trial { background: var(--gold-light); color: var(--gold); }
.billing-status-badge.past-due { background: #fde8e8; color: #c53030; }
.billing-status-badge.canceled { background: var(--cream-deep); color: var(--gray-warm); }
.billing-status-badge.inactive { background: var(--cream-deep); color: var(--gray-warm); }

.billing-features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem 1.5rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 600px) {
  .billing-features-grid { grid-template-columns: 1fr; }
}
.billing-feature {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--navy);
}

.billing-upgrade-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--gold-light), var(--cream));
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.billing-plan-actions {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Payment method */
.billing-payment-method {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.billing-pm-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: var(--cream);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
}
.billing-pm-brand {
  font-size: 0.7rem;
  background: var(--navy);
  color: white;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* Next invoice */
.billing-next-invoice {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Usage meter */
.billing-usage-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--navy-soft);
  margin-bottom: 0.5rem;
}
.billing-usage-bar {
  height: 10px;
  background: var(--cream-deep);
  border-radius: 10px;
  overflow: hidden;
}
.billing-usage-fill {
  height: 100%;
  background: var(--sage);
  border-radius: 10px;
  transition: width 0.6s ease;
}
.billing-usage-fill.warning { background: var(--gold); }
.billing-usage-fill.critical { background: var(--error); }

/* Invoice list */
.billing-invoices-list {
  display: flex;
  flex-direction: column;
}
.billing-invoice-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}
.billing-invoice-row:last-child { border-bottom: none; }
.billing-invoice-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.billing-invoice-number {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--navy);
}
.billing-invoice-date {
  font-size: 0.8rem;
  color: var(--gray-warm);
}
.billing-invoice-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.billing-invoice-amount {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy);
}
.billing-invoice-dl {
  color: var(--gray-warm);
  transition: color 0.15s;
  display: flex;
}
.billing-invoice-dl:hover { color: var(--primary); }

.billing-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--gray-warm);
}
.billing-empty p {
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy-soft);
  margin: 0.75rem 0 0.25rem;
}

/* ─── Team Page ─── */
.team-overview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Alex featured card */
.team-alex-card {
  cursor: pointer;
  transition: box-shadow 0.2s;
  border: 2px solid var(--primary-light);
}
.team-alex-card:hover { box-shadow: 0 4px 20px var(--primary-glow); }
.team-alex-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.team-alex-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--cream));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
  border: 2px solid var(--primary);
}
.team-alex-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.team-role-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.team-role-badge.primary {
  background: var(--primary-light);
  color: var(--primary);
}

.team-alex-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 500px) {
  .team-alex-stats { grid-template-columns: repeat(2, 1fr); }
}
.team-stat {
  text-align: center;
  padding: 0.75rem;
  background: var(--cream);
  border-radius: var(--radius-sm);
}
.team-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
}
.team-stat-label {
  font-size: 0.7rem;
  color: var(--gray-warm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  margin-top: 0.15rem;
}

.team-alex-actions {
  display: flex;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

/* Agent grid */
.team-agents-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.team-agent-card {
  padding: 1rem 1.25rem;
  background: var(--cream);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.team-agent-card:hover {
  background: var(--cream-deep);
  border-color: var(--border);
}
.team-agent-card.completed {
  opacity: 0.9;
}
.team-agent-card.standby {
  opacity: 1;
}

.team-agent-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.team-agent-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--warm-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  border: 2px solid var(--border);
}
.team-agent-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy);
}
.team-agent-role {
  font-size: 0.8rem;
  color: var(--gray-warm);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.team-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.team-scale-badge {
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--gold-light);
  color: var(--gold);
  padding: 0.1rem 0.4rem;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-left: 0.25rem;
}

.team-agent-desc {
  font-size: 0.85rem;
  color: var(--gray-warm);
  margin: 0.6rem 0 0;
  line-height: 1.4;
}

.team-agent-completed {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.6rem;
}
.team-completed-item {
  font-size: 0.8rem;
  color: var(--navy-soft);
  background: var(--warm-white);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Detail panel (expandable) */
.team-detail-panel {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.team-detail-section {
  margin-bottom: 0.75rem;
}
.team-detail-section h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-warm);
  margin-bottom: 0.5rem;
}
.team-capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.team-cap-tag {
  font-size: 0.8rem;
  padding: 0.25rem 0.65rem;
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--navy-soft);
}
.team-task-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.team-task-list li {
  font-size: 0.85rem;
  color: var(--navy);
  padding: 0.25rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
