:root {
  --wtc-orange: #E4580A;
  --wtc-orange-dark: #C43E06;
  --wtc-dark: #1A1A1A;
  --wtc-text: #1A1A1A;
  --wtc-text-muted: #757575;
  --wtc-border: #E0E0E0;
  --wtc-surface: #FAFAFA;
  --wtc-bg: #F5F5F5;
}

body {
  background-color: #F5F5F5;
  color: var(--wtc-text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Navbar ───────────────────────────────────────── */
.navbar {
  background: #fff !important;
  border-bottom: 1px solid var(--wtc-border);
  padding: 0.5rem 1.5rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--wtc-text) !important;
  text-decoration: none;
}

.logo-wrapper {
  background: var(--wtc-dark);
  border-radius: 6px;
  padding: 4px 10px;
  display: flex;
  align-items: center;
}

.logo-wrapper img { height: 26px; }

.brand-label {
  color: var(--wtc-text-muted);
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.nav-link {
  color: var(--wtc-text-muted) !important;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem !important;
  border-radius: 6px;
  transition: color .15s, background .15s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--wtc-orange) !important;
  background: #fff5f0;
}

.nav-link i { margin-right: 4px; }

/* ── Cards ───────────────────────────────────────── */
.card {
  border: 1px solid var(--wtc-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.card-header {
  background: #fff;
  border-bottom: 1px solid var(--wtc-border);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--wtc-text);
}

/* ── Stat cards ──────────────────────────────────── */
.stat-card {
  border-radius: 10px;
  border: 1px solid var(--wtc-border);
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  padding: 1.25rem 1.5rem;
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--wtc-text);
  line-height: 1;
}

.stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--wtc-text-muted);
  margin-top: 4px;
}

.stat-card .stat-icon {
  font-size: 1.5rem;
  color: var(--wtc-orange);
}

/* ── Buttons ─────────────────────────────────────── */
.btn-primary {
  background-color: var(--wtc-orange);
  border-color: var(--wtc-orange);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--wtc-orange-dark);
  border-color: var(--wtc-orange-dark);
  color: #fff;
}

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

.btn-outline-primary:hover {
  background-color: var(--wtc-orange);
  border-color: var(--wtc-orange);
  color: #fff;
}

/* ── Badges / Status ─────────────────────────────── */
.badge-active   { background: #d4edda; color: #155724; }
.badge-inactive { background: #f8d7da; color: #721c24; }
.badge-prospect { background: #fff3cd; color: #856404; }

.badge-sent      { background: #e2e3e5; color: #383d41; }
.badge-delivered { background: #cce5ff; color: #004085; }
.badge-read      { background: #d4edda; color: #155724; }
.badge-failed    { background: #f8d7da; color: #721c24; }

/* ── Table ───────────────────────────────────────── */
.table {
  font-size: 0.875rem;
}

.table th {
  font-weight: 600;
  color: var(--wtc-text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--wtc-border);
}

.table td { vertical-align: middle; }

/* ── Sidebar ─────────────────────────────────────── */
.sidebar {
  width: 220px;
  min-height: 100vh;
  background: #fff;
  border-right: 1px solid var(--wtc-border);
  padding: 1.5rem 0.75rem;
  flex-shrink: 0;
}

.sidebar .nav-link {
  border-radius: 8px;
  margin-bottom: 2px;
}

/* ── Layout ──────────────────────────────────────── */
.main-wrapper {
  display: flex;
  min-height: calc(100vh - 56px);
}

.main-content {
  flex: 1;
  padding: 2rem;
  overflow-x: auto;
}

/* ── Login page ──────────────────────────────────── */
.login-card {
  max-width: 400px;
  width: 100%;
}

/* ── Chat ────────────────────────────────────────── */
.chat-bubble {
  max-width: 75%;
  border-radius: 12px;
  padding: 0.6rem 0.9rem;
  font-size: 0.875rem;
  line-height: 1.4;
}

.chat-bubble.outgoing {
  background: var(--wtc-orange);
  color: #fff;
  margin-left: auto;
  border-bottom-right-radius: 2px;
}

.chat-bubble.incoming {
  background: #fff;
  border: 1px solid var(--wtc-border);
  border-bottom-left-radius: 2px;
}

.chat-meta {
  font-size: 0.7rem;
  color: var(--wtc-text-muted);
  margin-top: 2px;
}

.chat-window {
  height: 420px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 1rem;
  background: var(--wtc-bg);
  border-radius: 8px;
}

/* ── Form controls ───────────────────────────────── */
.form-control:focus,
.form-select:focus {
  border-color: var(--wtc-orange);
  box-shadow: 0 0 0 .2rem rgba(228,88,10,.15);
}

/* ── Misc ────────────────────────────────────────── */
a { color: var(--wtc-orange); }
a:hover { color: var(--wtc-orange-dark); }

.text-muted { color: var(--wtc-text-muted) !important; }
