/* Biz Sanchal Growth CRM & Outreach OS - Brand Theme C Styles */
:root {
  --bs-navy: #0B1B33;
  --bs-blue: #1854A9;
  --bs-blue-light: #EBF2FA;
  --bs-teal: #19B5A5;
  --bs-teal-light: #E6F8F6;
  --bs-amber: #F5A524;
  --bs-amber-light: #FEF6E9;
  --bs-slate: #5B6B80;
  --bs-slate-light: #F1F4F9;
  --bs-border: #E2E8F0;
  --bs-bg: #F8FAFC;
  --bs-card: #FFFFFF;
  --bs-text: #0F172A;
  --bs-text-muted: #64748B;
  --bs-green: #10B981;
  --bs-green-light: #ECFDF5;
  --bs-red: #EF4444;
  --bs-red-light: #FEF2F2;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background-color: var(--bs-bg);
  color: var(--bs-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.app-header {
  background: var(--bs-navy);
  color: #fff;
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--bs-blue);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo {
  height: 34px;
  width: auto;
  filter: brightness(0) invert(1);
}

.brand-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-tag {
  background: rgba(25, 181, 165, 0.2);
  color: #2DD4BF;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(45, 212, 191, 0.4);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-tab {
  background: transparent;
  color: #94A3B8;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.nav-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-tab.active {
  color: #fff;
  background: var(--bs-blue);
}

.nav-counter {
  background: var(--bs-amber);
  color: var(--bs-navy);
  font-size: 11px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.header-status {
  display: flex;
  align-items: center;
  gap: 12px;
}

.inbox-pill {
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bs-green);
  box-shadow: 0 0 8px var(--bs-green);
}

/* Metrics Strip */
.metrics-strip {
  background: #fff;
  border-bottom: 1px solid var(--bs-border);
  padding: 16px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.metric-card {
  background: var(--bs-bg);
  border: 1px solid var(--bs-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--bs-blue);
}

.metric-card.teal::before { background: var(--bs-teal); }
.metric-card.amber::before { background: var(--bs-amber); }
.metric-card.green::before { background: var(--bs-green); }

.metric-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--bs-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--bs-navy);
  margin-top: 4px;
}

.metric-sub {
  font-size: 11px;
  color: var(--bs-text-muted);
  margin-top: 2px;
}

/* Control Bar */
.control-bar {
  padding: 16px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bs-bg);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.filter-chip {
  background: #fff;
  border: 1px solid var(--bs-border);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--bs-slate);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-chip:hover {
  border-color: var(--bs-blue);
  color: var(--bs-blue);
}

.filter-chip.active {
  background: var(--bs-blue);
  color: #fff;
  border-color: var(--bs-blue);
}

.search-box {
  position: relative;
  min-width: 280px;
}

.search-input {
  width: 100%;
  padding: 8px 14px 8px 36px;
  font-family: inherit;
  font-size: 13px;
  border: 1px solid var(--bs-border);
  border-radius: var(--radius-md);
  background: #fff;
  outline: none;
}

.search-input:focus {
  border-color: var(--bs-blue);
  box-shadow: 0 0 0 3px rgba(24, 84, 169, 0.12);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--bs-text-muted);
  font-size: 14px;
}

/* Views Container */
.view-container {
  padding: 0 24px 32px;
  flex: 1;
}

/* Kanban Board */
.kanban-board {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 20px;
  min-height: 600px;
}

.kanban-col {
  flex: 0 0 300px;
  background: var(--bs-slate-light);
  border: 1px solid var(--bs-border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 240px);
}

.col-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--bs-border);
  background: #fff;
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

.col-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--bs-navy);
  display: flex;
  align-items: center;
  gap: 8px;
}

.col-count {
  font-size: 11px;
  font-weight: 700;
  background: var(--bs-slate-light);
  color: var(--bs-slate);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.col-cards {
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.lead-card {
  background: #fff;
  border: 1px solid var(--bs-border);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.lead-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #CBD5E1;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.card-company {
  font-size: 14px;
  font-weight: 700;
  color: var(--bs-navy);
  line-height: 1.3;
}

.card-founder {
  font-size: 12px;
  color: var(--bs-text-muted);
  margin-top: 2px;
}

.v-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.v-tour { background: #E0F2FE; color: #0369A1; }
.v-d2c { background: #FEF3C7; color: #B45309; }
.v-startup { background: #F3E8FF; color: #7E22CE; }
.v-nontech { background: #ECFDF5; color: #047857; }
.v-event { background: #FCE7F3; color: #BE185D; }

.card-niche {
  font-size: 12px;
  color: var(--bs-slate);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-bottleneck {
  font-size: 11px;
  background: var(--bs-bg);
  border-left: 3px solid var(--bs-amber);
  padding: 6px 8px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: #475569;
  margin-bottom: 12px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--bs-border);
  padding-top: 10px;
  gap: 6px;
}

.btn-action {
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-wa {
  background: #25D366;
  color: #fff;
}
.btn-wa:hover { background: #20BA5A; }

.btn-email {
  background: var(--bs-blue-light);
  color: var(--bs-blue);
}
.btn-email:hover { background: #DBEAFE; }

.btn-next {
  background: var(--bs-bg);
  color: var(--bs-slate);
  border: 1px solid var(--bs-border);
}
.btn-next:hover {
  background: #E2E8F0;
  color: var(--bs-navy);
}

/* Table View */
.table-card {
  background: #fff;
  border: 1px solid var(--bs-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

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

.crm-table th {
  background: var(--bs-slate-light);
  color: var(--bs-slate);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--bs-border);
}

.crm-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--bs-border);
  vertical-align: middle;
}

.crm-table tr:hover td {
  background: var(--bs-bg);
}

/* Master Inbox View */
.inbox-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 900px;
  margin: 0 auto;
}

.reply-card {
  background: #fff;
  border: 1px solid var(--bs-border);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 16px;
  transition: all 0.15s ease;
}

.reply-card.interested {
  border-left: 4px solid var(--bs-green);
}

.reply-card.question {
  border-left: 4px solid var(--bs-amber);
}

.reply-card.pass {
  border-left: 4px solid var(--bs-red);
}

.reply-icon {
  font-size: 24px;
}

.reply-content {
  flex: 1;
}

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

.reply-sender {
  font-size: 14px;
  font-weight: 700;
  color: var(--bs-navy);
}

.reply-meta {
  font-size: 12px;
  color: var(--bs-text-muted);
}

.reply-subject {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.reply-snippet {
  font-size: 13px;
  color: var(--bs-slate);
  background: var(--bs-bg);
  padding: 10px;
  border-radius: var(--radius-sm);
  line-height: 1.4;
}

/* 10 Mailboxes Grid */
.inboxes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.inbox-card {
  background: #fff;
  border: 1px solid var(--bs-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.inbox-email {
  font-size: 14px;
  font-weight: 700;
  color: var(--bs-navy);
}

.inbox-progress-bar {
  height: 8px;
  background: var(--bs-slate-light);
  border-radius: 4px;
  overflow: hidden;
  margin: 10px 0;
}

.inbox-progress-fill {
  height: 100%;
  background: var(--bs-blue);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Drawer / Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 27, 51, 0.6);
  backdrop-filter: blur(2px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal-card {
  background: #fff;
  border-radius: var(--radius-lg);
  max-width: 650px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--bs-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--bs-navy);
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--bs-text-muted);
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--bs-text-muted);
  margin-bottom: 4px;
  display: block;
}

.pitch-box {
  background: var(--bs-bg);
  border: 1px solid var(--bs-border);
  border-radius: var(--radius-md);
  padding: 14px;
  font-size: 13px;
  line-height: 1.5;
  color: #334155;
  white-space: pre-wrap;
}

.btn-primary {
  background: var(--bs-blue);
  color: #fff;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.btn-primary:hover {
  background: #124085;
}
