/* ═════════════════════════════════════════════
   VELORA CRM — Complete Stylesheet
   Matches the Velora website dark theme
   ═════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

.velora-crm-body {
  background: #040d1c;
  color: #d0dff5;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  margin: 0;
}

a { color: #3b9bff; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── LOGIN PAGE ─── */
.vcrm-login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; position: relative; overflow: hidden; }
.vcrm-login-wrap { width: 100%; max-width: 420px; position: relative; z-index: 2; text-align: center; }
.vcrm-login-accent { position: absolute; top: -50px; left: 0; right: 0; height: 4px; background: linear-gradient(90deg,#2d78f5 0%,#7c4fea 50%,#22d3ee 100%); }
.vcrm-login-glow { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 600px; height: 300px; background: radial-gradient(ellipse, rgba(45,120,255,0.18) 0%, transparent 70%); filter: blur(40px); z-index: -1; }
.vcrm-login-card { background: rgba(7,20,40,0.92); border: 1px solid rgba(59,155,255,0.18); border-radius: 18px; padding: 40px 36px; backdrop-filter: blur(14px); }
.vcrm-login-brand { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.vcrm-login-title { color: #fff; font-size: 24px; font-weight: 700; margin: 14px 0 6px; letter-spacing: -0.02em; }
.vcrm-login-sub { color: #6b82a0; font-size: 13px; margin-bottom: 26px; }
.vcrm-login-footer { margin-top: 22px; }
.vcrm-login-credit { color: #3d5572; font-size: 11px; margin-top: 22px; }

/* ─── BRAND ELEMENTS ─── */
.vcrm-logo {
  width: 34px; height: 34px;
  background: linear-gradient(135deg,#3b9bff,#8b5cf6);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 18px;
}
.vcrm-brand-name {
  color: #fff; font-weight: 700; font-size: 20px; letter-spacing: 0.05em;
}
.vcrm-brand-sub {
  color: #3b9bff; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; margin-top: 2px;
}
.vcrm-eyebrow {
  font-size: 11px; color: #3b9bff; letter-spacing: 0.14em; text-transform: uppercase; margin: 6px 0 0;
}

/* ─── FORMS ─── */
.vcrm-field { margin-bottom: 16px; text-align: left; }
.vcrm-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.vcrm-label {
  display: block; font-size: 11px; font-weight: 500; color: #8aaecc;
  letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 6px;
}
.vcrm-field-hint { font-size: 11px; color: #6b82a0; margin-top: 6px; }

.vcrm-input, .vcrm-select, .vcrm-textarea {
  width: 100%; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 8px;
  padding: 11px 14px; color: #e8f0fe;
  font-family: inherit; font-size: 14px; font-weight: 300;
  outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
}
.vcrm-input:focus, .vcrm-select:focus, .vcrm-textarea:focus {
  border-color: rgba(59,155,255,0.5);
  background: rgba(59,155,255,0.04);
  box-shadow: 0 0 0 3px rgba(59,155,255,0.08);
}
.vcrm-input::placeholder, .vcrm-textarea::placeholder { color: #374d6a; }

.vcrm-textarea { min-height: 70px; resize: vertical; line-height: 1.6; }
.vcrm-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b82a0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 32px; cursor: pointer;
}
.vcrm-select option { background: #071428; color: #e8f0fe; }

/* ─── BUTTONS ─── */
.vcrm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border: none; border-radius: 8px;
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: opacity .2s, transform .15s, border-color .2s, background .2s;
  text-decoration: none;
}
.vcrm-btn:hover { transform: translateY(-1px); text-decoration: none; }
.vcrm-btn-primary {
  background: linear-gradient(135deg,#2d78f5,#7c4fea); color: #fff;
  box-shadow: 0 4px 18px rgba(45,120,255,0.3);
}
.vcrm-btn-primary:hover { opacity: 0.92; box-shadow: 0 6px 24px rgba(45,120,255,0.4); }
.vcrm-btn-outline {
  background: transparent; color: #a0bedd;
  border: 1px solid rgba(255,255,255,0.12);
}
.vcrm-btn-outline:hover { border-color: rgba(255,255,255,0.25); color: #fff; }
.vcrm-btn-full { width: 100%; margin-bottom: 8px; }
.vcrm-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.vcrm-icon-btn {
  background: transparent; border: none; cursor: pointer;
  color: #6b82a0; padding: 6px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s;
}
.vcrm-icon-btn:hover { background: rgba(255,255,255,0.05); color: #fff; }
.vcrm-icon-btn-danger:hover { color: #f87171; background: rgba(248,113,113,0.08); }
.vcrm-icon-btn .ti { font-size: 16px; }

.vcrm-error-banner {
  padding: 12px 16px; background: rgba(248,113,113,0.1);
  border: 1px solid rgba(248,113,113,0.25); border-radius: 8px;
  color: #fca5a5; font-size: 13px; text-align: center;
  margin-top: 14px;
}
.vcrm-saved-indicator {
  margin-left: 12px; color: #4ade80; font-size: 13px; font-weight: 500;
}

/* ─── LAYOUT (SIDEBAR + MAIN) ─── */
.vcrm-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: 220px;
  background: #03091a;
  border-right: 1px solid rgba(255,255,255,0.05);
  display: flex; flex-direction: column;
  z-index: 50;
}
.vcrm-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 20px 18px; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.vcrm-nav { padding: 14px 0; flex: 1; }
.vcrm-nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px; color: #7090b8; font-size: 13px;
  text-decoration: none; transition: color .15s, background .15s;
}
.vcrm-nav-link:hover { color: #fff; background: rgba(255,255,255,0.02); text-decoration: none; }
.vcrm-nav-link.active {
  color: #fff; font-weight: 500;
  background: linear-gradient(90deg, rgba(59,155,255,0.12), transparent);
  border-left: 2px solid #3b9bff; padding-left: 18px;
}
.vcrm-nav-link .ti { font-size: 16px; }
.vcrm-nav-badge {
  margin-left: auto;
  background: rgba(59,155,255,0.2); color: #3b9bff;
  font-size: 10px; padding: 2px 7px; border-radius: 10px; font-weight: 500;
}
.vcrm-badge-red { background: rgba(248,113,113,0.2); color: #f87171; }

.vcrm-sidebar-footer { padding: 14px 20px; border-top: 1px solid rgba(255,255,255,0.05); }
.vcrm-user { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.vcrm-user-name { color: #fff; font-size: 12px; font-weight: 500; }
.vcrm-user-role { color: #6b82a0; font-size: 10px; }
.vcrm-logout {
  display: flex; align-items: center; gap: 6px;
  color: #6b82a0; font-size: 12px; text-decoration: none;
  padding: 6px 0;
}
.vcrm-logout:hover { color: #f87171; text-decoration: none; }
.vcrm-logout .ti { font-size: 14px; }

.vcrm-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg,#3b9bff,#8b5cf6);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 600; font-size: 12px; flex-shrink: 0;
}
.vcrm-avatar-lg {
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(135deg,#3b9bff,#8b5cf6);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 20px; flex-shrink: 0;
}

.vcrm-mobile-menu {
  display: none;
  position: fixed; top: 14px; left: 14px; z-index: 60;
  background: rgba(7,20,40,0.95); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; padding: 8px; color: #fff; cursor: pointer;
}
.vcrm-mobile-menu .ti { font-size: 20px; }

.vcrm-main { margin-left: 220px; padding: 28px 36px; min-height: 100vh; }

/* ─── PAGE HEADER ─── */
.vcrm-page-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 22px; gap: 14px; flex-wrap: wrap;
}
.vcrm-h1 {
  color: #fff; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin: 0;
}
.vcrm-h2 {
  color: #fff; font-size: 16px; font-weight: 600; margin: 0;
}
.vcrm-sub { color: #6b82a0; font-size: 13px; margin: 4px 0 0; }

/* ─── STATS GRID ─── */
.vcrm-stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-bottom: 22px;
}
.vcrm-stat-card {
  background: rgba(7,20,40,0.7);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 16px 18px; border-radius: 12px;
}
.vcrm-stat-card.vcrm-stat-red    { border-color: rgba(248,113,113,0.18); }
.vcrm-stat-card.vcrm-stat-blue   { border-color: rgba(59,155,255,0.18); }
.vcrm-stat-card.vcrm-stat-green  { border-color: rgba(74,222,128,0.18); }
.vcrm-stat-card.vcrm-stat-purple { border-color: rgba(167,139,250,0.18); }
.vcrm-stat-label {
  font-size: 11px; color: #6b82a0; letter-spacing: 0.08em;
  text-transform: uppercase; margin: 0 0 6px;
}
.vcrm-stat-card.vcrm-stat-red    .vcrm-stat-label { color: #f87171; }
.vcrm-stat-card.vcrm-stat-blue   .vcrm-stat-label { color: #3b9bff; }
.vcrm-stat-card.vcrm-stat-green  .vcrm-stat-label { color: #4ade80; }
.vcrm-stat-card.vcrm-stat-purple .vcrm-stat-label { color: #a78bfa; }
.vcrm-stat-value { font-size: 26px; color: #fff; font-weight: 700; margin: 0; }

/* ─── CARDS ─── */
.vcrm-card {
  background: rgba(7,20,40,0.7);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px; padding: 22px;
}
.vcrm-card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.vcrm-link { color: #3b9bff; font-size: 13px; }

/* ─── FILTER PILLS ─── */
.vcrm-filter-pills { display: flex; gap: 8px; }
.vcrm-filter-pill {
  padding: 6px 12px; background: transparent;
  color: #6b82a0; border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px; font-size: 11px; text-decoration: none;
  transition: all .15s;
}
.vcrm-filter-pill:hover { border-color: rgba(59,155,255,0.3); color: #a0bedd; text-decoration: none; }
.vcrm-filter-pill.active {
  background: rgba(59,155,255,0.15); color: #3b9bff;
  border-color: rgba(59,155,255,0.3);
}
.vcrm-search-input {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  color: #e8f0fe; font-size: 12px; padding: 7px 12px; border-radius: 6px;
  width: 180px; outline: none; font-family: inherit;
}
.vcrm-search-input:focus { border-color: rgba(59,155,255,0.4); }

/* ─── TABLES ─── */
.vcrm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.vcrm-table thead { background: rgba(255,255,255,0.02); }
.vcrm-table th {
  text-align: left; padding: 12px 16px; color: #6b82a0;
  font-weight: 500; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
}
.vcrm-table td {
  padding: 12px 16px; color: #a0bedd;
  border-top: 1px solid rgba(255,255,255,0.04);
}
.vcrm-table tbody tr:hover { background: rgba(59,155,255,0.04); }
.vcrm-table tbody tr:hover td { color: #fff; }
.vcrm-table strong { color: #fff; font-weight: 500; }
.vcrm-row-sub { font-size: 11px; color: #6b82a0; margin-top: 2px; }
.vcrm-muted { color: #6b82a0; }

/* ─── PILLS & BADGES ─── */
.vcrm-source-pill, .vcrm-status-pill {
  display: inline-block; padding: 3px 9px; border-radius: 10px;
  font-size: 10px; font-weight: 500; white-space: nowrap;
}
.vcrm-source-interest_list      { background: rgba(59,155,255,0.15);  color: #3b9bff; }
.vcrm-source-check_availability { background: rgba(167,139,250,0.15); color: #a78bfa; }
.vcrm-source-admin              { background: rgba(245,158,11,0.15);  color: #fbbf24; }
.vcrm-status-large { padding: 5px 12px; font-size: 11px; }

/* ─── EMPTY ─── */
.vcrm-empty {
  text-align: center; padding: 40px 20px; color: #6b82a0;
}
.vcrm-empty p { margin-top: 14px; font-size: 13px; }

/* ─── LEAD DETAIL ─── */
.vcrm-back-link {
  display: inline-block; color: #3b9bff; font-size: 12px;
  text-decoration: none; margin-bottom: 14px;
}
.vcrm-lead-grid {
  display: grid; grid-template-columns: 1fr 280px; gap: 18px;
}
.vcrm-lead-header-card { position: relative; padding-top: 26px; }
.vcrm-card-accent {
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg,#3b9bff,#8b5cf6);
  border-radius: 12px 12px 0 0;
}
.vcrm-lead-header {
  display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px;
}
.vcrm-detail-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.05);
}
.vcrm-detail-label {
  font-size: 10px; color: #6b82a0;
  letter-spacing: 0.08em; text-transform: uppercase;
  margin: 0 0 3px;
}
.vcrm-detail-value { color: #fff; font-size: 13px; margin: 0; }

/* ─── TIMELINE ─── */
.vcrm-timeline { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.05); }
.vcrm-timeline-item {
  display: flex; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.vcrm-timeline-item:last-child { border-bottom: none; }
.vcrm-timeline-icon {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.vcrm-timeline-icon .ti { font-size: 14px; }
.vcrm-timeline-content { flex: 1; }
.vcrm-timeline-text { color: #a0bedd; font-size: 13px; margin: 0; line-height: 1.5; }
.vcrm-timeline-text strong { color: #fff; font-weight: 500; }
.vcrm-timeline-meta { color: #6b82a0; font-size: 10px; margin: 3px 0 0; }

/* ─── LEAD SIDEBAR ─── */
.vcrm-lead-sidebar .vcrm-side-card { margin-bottom: 14px; padding: 16px; }
.vcrm-side-label {
  font-size: 10px; color: #6b82a0; letter-spacing: 0.08em;
  text-transform: uppercase; margin: 0 0 10px;
}
.vcrm-side-meta .vcrm-meta-row {
  font-size: 11px; color: #6b82a0; margin: 4px 0;
  word-break: break-all;
}
.vcrm-side-meta .vcrm-meta-row strong { color: #a0bedd; font-weight: 500; }

/* ─── MODAL ─── */
.vcrm-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 20px;
}
.vcrm-modal-card {
  background: #07172e; border: 1px solid rgba(59,155,255,0.2);
  border-radius: 16px; padding: 24px; width: 100%; max-width: 480px;
  position: relative;
}
.vcrm-modal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px;
}
.vcrm-modal-header h3 { color: #fff; font-size: 18px; font-weight: 600; margin: 0; }
.vcrm-modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 18px; padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* ─── REPORTS ─── */
.vcrm-report-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.vcrm-bar-row {
  display: grid; grid-template-columns: 140px 1fr 40px;
  align-items: center; gap: 12px; padding: 7px 0;
}
.vcrm-bar-label { color: #a0bedd; font-size: 12px; }
.vcrm-bar-track {
  background: rgba(255,255,255,0.05); height: 8px; border-radius: 4px; overflow: hidden;
}
.vcrm-bar-fill {
  height: 100%; background: linear-gradient(90deg,#3b9bff,#7c4fea);
  border-radius: 4px; transition: width .4s ease;
}
.vcrm-bar-count {
  color: #fff; font-size: 13px; font-weight: 600; text-align: right;
}

/* ─── CODE ─── */
.vcrm-code {
  background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px; padding: 14px; color: #a0bedd;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px; line-height: 1.6; overflow-x: auto;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .vcrm-sidebar { transform: translateX(-100%); transition: transform .25s; }
  .vcrm-sidebar.open { transform: translateX(0); }
  .vcrm-main { margin-left: 0; padding: 60px 18px 24px; }
  .vcrm-mobile-menu { display: flex; }
  .vcrm-lead-grid { grid-template-columns: 1fr; }
  .vcrm-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .vcrm-report-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .vcrm-field-row { grid-template-columns: 1fr; }
  .vcrm-stats-grid { grid-template-columns: 1fr; }
  .vcrm-table { font-size: 12px; }
  .vcrm-table th, .vcrm-table td { padding: 10px 12px; }
}

/* ── DELETE BUTTON ── */
.vcrm-btn-delete {
  background: transparent;
  border: 1px solid rgba(248,113,113,0.25);
  color: #f87171;
  margin-top: 4px;
}
.vcrm-btn-delete:hover {
  background: rgba(248,113,113,0.1);
  border-color: rgba(248,113,113,0.5);
  color: #fca5a5;
  transform: none;
}
