/* ==================== DESIGN SYSTEM & TOKENS ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Premium Light Slate Palette */
  --bg: #f8fafc;
  --bg2: #ffffff;
  --bg3: #f1f5f9;
  --bge: #ffffff;
  --bd: #e2e8f0;
  --bd2: #cbd5e1;
  
  /* Text colors */
  --tx: #0f172a;
  --tx2: #475569;
  --tx3: #94a3b8;
  
  /* Brand colors with smooth tailwind-like accents */
  --ac: #2563eb;
  --acg: #eff6ff;
  --ach: #1d4ed8;
  
  --gr: #10b981;
  --grg: #ecfdf5;
  
  --rd: #ef4444;
  --rdg: #fef2f2;
  
  --or: #f59e0b;
  --org: #fffbeb;
  
  --pu: #8b5cf6;
  --pug: #f5f3ff;
  
  --sb: 240px;
  --tb: 60px;
  
  /* Modern shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.04), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--tx);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

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

.loader {
  position: fixed;
  inset: 0;
  background: rgba(248, 250, 252, 0.8);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.loader.on {
  display: flex;
}
.loader-ring {
  width: 32px;
  height: 32px;
  border: 3px solid var(--bd);
  border-top-color: var(--ac);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
.spn {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .5s linear infinite;
  vertical-align: middle;
  margin-left: 6px;
}

.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  z-index: 10000;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.error { background: var(--rd); color: #fff; }
.toast.success { background: var(--gr); color: #fff; }
.toast.info { background: var(--ac); color: #fff; }
.toast.warn { background: var(--or); color: #fff; }

/* ==================== AUTH & LANDING ==================== */
#auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.05) 0%, rgba(139, 92, 246, 0.04) 90%), var(--bg);
}
.auth-wrap {
  width: 100%;
  max-width: 400px;
  padding: 20px;
}
.auth-logo-row {
  text-align: center;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.auth-logo-ico {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--ac), var(--pu));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  overflow: hidden;
}
.auth-logo-txt {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--tx), var(--ac));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.auth-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 16px;
  padding: 36px 30px;
  box-shadow: var(--shadow-premium);
}
.auth-heading {
  font-size: 18px;
  font-weight: 800;
  color: var(--tx);
  margin-bottom: 4px;
}
.auth-sub {
  font-size: 12px;
  color: var(--tx3);
  margin-bottom: 24px;
}

/* Input Fields styling */
.ig {
  margin-bottom: 16px;
}
.ig label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--tx2);
  margin-bottom: 6px;
}
.ig input, .ig select, .ig textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--bd2);
  border-radius: 8px;
  font-size: 13px;
  color: var(--tx);
  background: #fff;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: all 0.2s ease;
}
.ig input:focus, .ig select:focus, .ig textarea:focus {
  border-color: var(--ac);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.ig input::placeholder, .ig textarea::placeholder {
  color: var(--tx3);
}
.ig select option {
  background: #fff;
}
.ig textarea {
  resize: vertical;
  min-height: 80px;
}
.ig.req label::after {
  content: ' *';
  color: var(--rd);
}
.g2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.g3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
.btn-login {
  width: 100%;
  padding: 11px;
  background: linear-gradient(135deg, var(--ac), #1d4ed8);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
  transition: all 0.2s ease;
}
.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.25);
  background: linear-gradient(135deg, var(--ach), #172554);
}
.auth-demo {
  font-size: 11px;
  color: var(--tx3);
  text-align: center;
  margin-top: 20px;
  padding: 12px;
  background: var(--bg3);
  border-radius: 8px;
  border: 1px solid var(--bd);
}
.auth-demo code {
  font-family: monospace;
  color: var(--ac);
  font-weight: 600;
}

/* ==================== CORE APP LAYOUT ==================== */
#app-page {
  display: none;
  height: 100vh;
  overflow: hidden;
}
#app-page.on {
  display: flex;
  flex-direction: column;
}
.topbar {
  height: var(--tb);
  background: #ffffff;
  border-bottom: 1px solid var(--bd);
  display: flex;
  align-items: center;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  z-index: 10;
}
.tb-brand {
  width: var(--sb);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 10px;
  flex-shrink: 0;
  border-right: 1px solid var(--bd);
  height: 100%;
}
.tb-logo {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--ac), var(--pu));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.15);
  overflow: hidden;
}
.tb-bname {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--tx);
}
.tb-mid {
  flex: 1;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.bc-sep {
  color: var(--tx3);
  font-size: 12px;
  font-weight: 500;
}
.bc-page {
  font-size: 13px;
  font-weight: 700;
  color: var(--tx);
}
.tb-right {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 20px;
}
.tb-sep {
  width: 1px;
  height: 20px;
  background: var(--bd);
}
.tb-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.tb-user:hover {
  background: var(--bg3);
}
.tb-av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ac);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.tb-uname {
  font-size: 12px;
  font-weight: 700;
  color: var(--tx);
}
.rb {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
  background: var(--acg);
  color: var(--ac);
  text-transform: uppercase;
}
.rb.admin {
  background: var(--pug);
  color: var(--pu);
}

/* Mobile Header */
.mob-hdr {
  display: none;
  background: #ffffff;
  border-bottom: 1px solid var(--bd);
  padding: 0 16px;
  height: 52px;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  z-index: 10;
}
.mob-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mob-logo {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--ac), var(--pu));
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.mob-av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ac);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  overflow: hidden;
}

/* Side navigation panel */
.app-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}
.sidebar {
  width: var(--sb);
  background: #ffffff;
  border-right: 1px solid var(--bd);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  flex-shrink: 0;
  box-shadow: 1px 0 3px rgba(0, 0, 0, 0.01);
}
.snav {
  flex: 1;
  padding: 12px 8px;
}
.nsec {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--tx3);
  padding: 18px 16px 8px;
}
.ni {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  color: var(--tx2);
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  margin-bottom: 2px;
  transition: all 0.2s ease;
}
.ni:hover {
  background: var(--bg3);
  color: var(--tx);
}
.ni.on {
  background: var(--acg);
  color: var(--ac);
  font-weight: 700;
}
.ni-ico {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ni-lbl {
  flex: 1;
}
.ni-bdg {
  font-size: 10px;
  background: var(--ac);
  color: #fff;
  border-radius: 20px;
  padding: 2px 8px;
  font-weight: 700;
}
.ni-bdg.warn {
  background: var(--or);
}
.sfoot {
  border-top: 1px solid var(--bd);
  padding: 12px 8px;
}
.sfi {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  color: var(--tx2);
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s ease;
}
.sfi:hover {
  background: var(--bg3);
  color: var(--tx);
}

.content {
  flex: 1;
  overflow-y: auto;
  background: var(--bg);
}
.ci {
  padding: 24px 32px;
}
.sec {
  display: none;
}
.sec.on {
  display: block;
}
.ph {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.pt {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--tx);
}
.ps {
  font-size: 12px;
  color: var(--tx2);
  margin-top: 4px;
}
.pa {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* ==================== BUTTONS & INTERACTIVE ELEMENTS ==================== */
.btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
}
.btn:active {
  transform: scale(0.98);
}
.btn-primary {
  background: var(--ac);
  color: #fff;
}
.btn-primary:hover {
  background: var(--ach);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}
.btn-secondary {
  background: #ffffff;
  border-color: var(--bd2);
  color: var(--tx2);
}
.btn-secondary:hover {
  background: var(--bg3);
  border-color: #94a3b8;
  color: var(--tx);
}
.btn-danger {
  background: var(--rd);
  color: #fff;
}
.btn-danger:hover {
  background: #dc2626;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}
.btn-success {
  background: var(--gr);
  color: #fff;
}
.btn-success:hover {
  background: #059669;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}
.btn-warning {
  background: var(--or);
  color: #fff;
}
.btn-warning:hover {
  background: #d97706;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}
.btn-sm {
  padding: 6px 12px;
  font-size: 11px;
  border-radius: 6px;
}
.btn-xs {
  padding: 4px 8px;
  font-size: 10px;
  border-radius: 4px;
}

/* ==================== PANELS, CARDS & STATS ==================== */
.panel {
  background: #ffffff;
  border: 1px solid var(--bd);
  border-radius: 12px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.panel-hdr {
  padding: 16px 20px;
  border-bottom: 1px solid var(--bd);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #fff;
}
.panel-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--tx);
  letter-spacing: -0.2px;
}
.panel-body {
  padding: 20px;
}
.card {
  background: #ffffff;
  border: 1px solid var(--bd);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.card-title {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--tx);
}

/* Stats grid & cards */
.sg {
  display: grid;
  gap: 16px;
  margin-bottom: 20px;
}
.sg-5 {
  grid-template-columns: repeat(5, 1fr);
}
.sc {
  background: #ffffff;
  border: 1px solid var(--bd);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}
.sc::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: transparent;
  transition: background-color 0.2s ease;
}
.sc:hover {
  transform: translateY(-2px);
  border-color: var(--bd2);
  box-shadow: var(--shadow-md);
}
.sc:hover::before {
  background: var(--ac);
}
.sc-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.sc:nth-child(1) .sc-ico { background: var(--acg); color: var(--ac); }
.sc:nth-child(2) .sc-ico { background: var(--pug); color: var(--pu); }
.sc:nth-child(3) .sc-ico { background: var(--grg); color: var(--gr); }
.sc:nth-child(4) .sc-ico { background: var(--org); color: var(--or); }
.sc:nth-child(5) .sc-ico { background: #e0f2fe; color: #0284c7; }
.sc-val {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  color: var(--tx);
}
.sc-lbl {
  font-size: 11px;
  color: var(--tx2);
  margin-top: 6px;
  font-weight: 600;
}

/* Premium Badge styling */
.sbdg {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
  white-space: nowrap;
  display: inline-block;
}
.s-new-leads { background: #fef3c7; color: #d97706; }
.s-on-engagement { background: var(--pug); color: var(--pu); }
.s-proposal { background: var(--acg); color: var(--ac); }
.s-deal { background: var(--grg); color: var(--gr); }
.s-drop { background: var(--rdg); color: var(--rd); }
.s-pending { background: #f1f5f9; color: #475569; border: 1px dashed #cbd5e1; }
.s-default { background: #f1f5f9; color: #475569; }

.prog-bg {
  height: 8px;
  background: #f1f5f9;
  border-radius: 20px;
  overflow: hidden;
  margin-top: 6px;
}
.prog-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ac), #3b82f6);
  border-radius: 20px;
}

/* ==================== DATA TABLES & TABS ==================== */
.tbl-wrap {
  overflow-x: auto;
  border: 1px solid var(--bd);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.tbl-full {
  overflow-x: auto;
  border: 1px solid var(--bd);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  max-height: calc(100vh - 320px);
}
.dtb {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}
.dtb th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--tx2);
  background: #f8fafc;
  border-bottom: 1px solid var(--bd);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
}
.dtb td {
  padding: 11px 16px;
  font-size: 12px;
  border-bottom: 1px solid var(--bd);
  color: var(--tx2);
  vertical-align: middle;
}
.dtb tr:last-child td {
  border-bottom: none;
}
.dtb tr {
  transition: background-color 0.15s ease;
}
.dtb tr:hover td {
  background: #f8fafc;
}
.dtb tr.sel-row td {
  background: var(--acg);
}
.dtb th:first-child, .dtb td:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #ffffff;
}
.dtb th:first-child {
  z-index: 4;
  background: #f8fafc;
}
.dtb tr:hover td:first-child {
  background: #f8fafc;
}

/* Tab-bar controls */
.tab-bar {
  display: flex;
  gap: 4px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--bd);
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
}
.tab-bar::-webkit-scrollbar {
  display: none; /* Safari and Chrome */
}
.tab-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  color: var(--tx2);
  background: transparent;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s ease;
}
.tab-btn:hover {
  background: var(--bg3);
  color: var(--tx);
}
.tab-btn.on {
  background: var(--ac);
  color: #fff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.15);
}

.fbar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.fi {
  padding: 8px 12px;
  border: 1px solid var(--bd2);
  border-radius: 8px;
  background: #fff;
  color: var(--tx);
  font-size: 12px;
  outline: none;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s ease;
}
.fi:focus {
  border-color: var(--ac);
}
.fi::placeholder {
  color: var(--tx3);
}

.bulk-bar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--acg);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 8px;
  margin-bottom: 16px;
}
.bulk-bar.on {
  display: flex;
}

/* ==================== FORM WIZARDS & FILE UPLOADS ==================== */
.upload-zone {
  border: 2px dashed var(--bd2);
  border-radius: 12px;
  padding: 48px;
  text-align: center;
  cursor: pointer;
  position: relative;
  background: #ffffff;
  transition: all 0.2s ease;
}
.upload-zone:hover, .upload-zone.over {
  border-color: var(--ac);
  background: var(--acg);
}
.upload-zone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.wizard-steps {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.wstep {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.wstep-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  border: 2px solid var(--bd2);
  background: #ffffff;
  color: var(--tx3);
  transition: all 0.25s ease;
}
.wstep.done .wstep-dot {
  background: var(--gr);
  border-color: var(--gr);
  color: #fff;
}
.wstep.active .wstep-dot {
  background: var(--ac);
  border-color: var(--ac);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}
.wstep-lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--tx3);
  margin-left: 8px;
  white-space: nowrap;
}
.wstep.active .wstep-lbl, .wstep.done .wstep-lbl {
  color: var(--tx);
}
.wstep-line {
  width: 32px;
  height: 2px;
  background: var(--bd);
  margin: 0 8px;
  flex-shrink: 0;
}
.wform {
  display: none;
}
.wform.on {
  display: block;
}
.sec-hdr {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--tx3);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--bd);
}
.wiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--bd);
}

/* Details Section inside details modal */
.dsec {
  margin-bottom: 20px;
}
.dsec-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--tx3);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--bd);
}
.dgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ditem {
  background: var(--bg3);
  border: 1px solid var(--bd);
  border-radius: 8px;
  padding: 12px 14px;
}
.dlbl {
  font-size: 10px;
  color: var(--tx3);
  margin-bottom: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.dval {
  font-size: 13px;
  font-weight: 700;
  color: var(--tx);
  word-break: break-word;
}

/* ==================== KANBAN BOARD / PIPELINE VIEW ==================== */
.pipeline-board {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
  align-items: flex-start;
}
.pipe-col {
  min-width: 260px;
  max-width: 260px;
  background: #ffffff;
  border: 1px solid var(--bd);
  border-radius: 12px;
  padding: 16px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.pipe-col.drag-over {
  background: var(--acg);
  border-color: var(--ac);
  box-shadow: var(--shadow-md);
}
.pipe-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--bd);
}
.pipe-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
}
.pipe-name {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--tx);
  letter-spacing: 0.2px;
}
.pipe-cnt {
  font-size: 11px;
  background: var(--bg3);
  border: 1px solid var(--bd);
  border-radius: 20px;
  padding: 2px 8px;
  color: var(--tx2);
  font-weight: 700;
}
.pipe-total {
  font-size: 10px;
  color: var(--tx3);
  margin-bottom: 12px;
  font-weight: 600;
}
.pcard {
  background: var(--bg3);
  border: 1px solid var(--bd);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.pcard:hover {
  border-color: var(--ac);
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.pcard.dragging {
  opacity: 0.4;
  border: 1px dashed var(--ac);
}
.pcard-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--tx);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pcard-sub {
  font-size: 11px;
  color: var(--tx2);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pcard-foot {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--tx3);
  font-weight: 600;
}

.sheet-card {
  background: #ffffff;
  border: 1px solid var(--bd);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}

.mcat-item {
  padding: 10px 16px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--tx2);
  border-radius: 8px;
  margin-bottom: 2px;
  transition: all 0.2s ease;
}
.mcat-item:hover {
  background: var(--bg3);
  color: var(--tx);
}
.mcat-item.on {
  background: var(--acg);
  color: var(--ac);
}

.empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--tx3);
  font-size: 13px;
  font-weight: 500;
}

/* ==================== OVERLAYS & MODALS ==================== */
.ovl {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.ovl.on {
  display: flex;
}
.modal {
  background: #ffffff;
  border: 1px solid var(--bd);
  border-radius: 16px;
  padding: 30px;
  width: 95%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-premium);
}
.modal-lg { max-width: 720px; }
.modal-xl { max-width: 980px; }
.mtl {
  font-size: 18px;
  font-weight: 800;
  color: var(--tx);
  letter-spacing: -0.4px;
  margin-bottom: 4px;
}
.mts {
  font-size: 12px;
  color: var(--tx3);
  margin-bottom: 20px;
}
.mft {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--bd);
}

/* Bottom sheets overlay */
.bso {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(3px);
  z-index: 1000;
  align-items: flex-end;
}
.bso.on {
  display: flex;
}
.bs {
  background: #ffffff;
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}
.bs-handle {
  width: 36px;
  height: 4px;
  background: var(--bd2);
  border-radius: 10px;
  margin: 12px auto 16px;
}
.bs-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--tx2);
  border-bottom: 1px solid var(--bd);
  transition: all 0.2s ease;
}
.bs-item:last-child {
  border-bottom: none;
}
.bs-item:hover {
  background: var(--bg3);
  color: var(--tx);
}

/* Bottom navigation on mobile screens */
.mob-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid var(--bd);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.03);
  z-index: 100;
}
.mob-nav-inner {
  display: flex;
  height: 58px;
}
.mn-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--tx3);
  font-family: 'Inter', sans-serif;
  transition: color 0.2s ease;
}
.mn-item.on {
  color: var(--ac);
}
.mn-ico {
  display: flex;
  align-items: center;
  justify-content: center;
}
.mn-lbl {
  font-size: 9px;
  font-weight: 700;
}

/* Searchable dropdown wrapper */
.sd-wrap {
  position: relative;
}
.sd-inp {
  width: 100%;
  padding: 10px 36px 10px 14px;
  border: 1px solid var(--bd2);
  border-radius: 8px;
  font-size: 13px;
  color: var(--tx);
  background: #fff;
  font-family: 'Inter', sans-serif;
  outline: none;
}
.sd-inp:focus {
  border-color: var(--ac);
}
.sd-inp::placeholder {
  color: var(--tx3);
}
.sd-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--tx3);
  font-size: 10px;
  pointer-events: none;
}
.sd-clear {
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--tx3);
  font-size: 11px;
  cursor: pointer;
  display: none;
  background: none;
  border: none;
}
.sd-wrap.has-val .sd-clear {
  display: block;
}
.sd-drop {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid var(--bd2);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  z-index: 600;
  max-height: 220px;
  overflow-y: auto;
  display: none;
}
.sd-drop.on {
  display: block;
}
.sd-item {
  padding: 10px 14px;
  font-size: 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--bd);
  transition: background-color 0.15s ease;
}
.sd-item:last-child {
  border-bottom: none;
}
.sd-item:hover, .sd-item.hi {
  background: var(--acg);
}
.sd-brand {
  font-weight: 700;
  color: var(--tx);
}
.sd-company {
  font-size: 10px;
  color: var(--tx3);
  margin-top: 3px;
}
.sd-empty {
  padding: 20px;
  text-align: center;
  font-size: 12px;
  color: var(--tx3);
}
.sd-add {
  padding: 10px 14px;
  font-size: 12px;
  color: var(--ac);
  font-weight: 700;
  cursor: pointer;
  border-top: 1px solid var(--bd);
  background: var(--acg);
}
.sd-add:hover {
  background: #dbeafe;
}

/* ==================== MEDIA QUERIES & RESPONSIVENESS ==================== */
@media (max-width: 1100px) {
  .sg-5 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --tb: 0px;
  }
  .topbar, .sidebar {
    display: none !important;
  }
  .mob-hdr {
    display: flex !important;
  }
  .mob-nav {
    display: block !important;
  }
  .content {
    padding-bottom: 74px;
  }
  .ci {
    padding: 16px 20px;
  }
  .sg-5 {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .ovl.on {
    align-items: flex-end;
  }
  .modal, .modal-lg, .modal-xl {
    border-radius: 16px 16px 0 0;
    width: 100%;
    max-width: 100%;
    max-height: 90vh;
    padding: 20px 16px;
  }
  .dgrid, .g2, .g3 {
    grid-template-columns: 1fr;
  }
  .wizard-steps::-webkit-scrollbar {
    display: none;
  }
  .wizard-steps {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
}

@media (max-width: 480px) {
  .wizard-steps {
    justify-content: center;
  }
  .wizard-steps .wstep-lbl {
    display: none;
  }
  .wizard-steps .wstep-line {
    width: 24px;
    margin: 0 8px;
  }
}

/* ==================== WEB RTC / VIDEO MEETING ROOMS ==================== */
#meeting-area {
  background: #0f172a;
  color: #fff;
  border-radius: 16px;
  padding: 24px;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 640px;
  box-shadow: var(--shadow-premium);
  margin-top: 12px;
}

.meeting-grid-wrap {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 10px;
  max-height: 520px;
}

.video-container {
  position: relative;
  background: #1e293b;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #334155;
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
}

.video-container.active-speaker {
  border-color: var(--ac);
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.4);
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.video-avatar {
  position: absolute;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ac), var(--pu));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
  text-transform: uppercase;
}

.video-label {
  position: absolute;
  bottom: 14px;
  left: 14px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 28px);
  z-index: 10;
}

.video-label .mute-icon {
  color: var(--rd);
  display: flex;
  align-items: center;
}

.meeting-controls-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px 0 0;
  border-top: 1px solid #334155;
  flex-shrink: 0;
}

.ctrl-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #334155;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

.ctrl-btn:hover {
  background: #475569;
  transform: scale(1.08);
}

.ctrl-btn.off {
  background: var(--rd);
}

.ctrl-btn.off:hover {
  background: #dc2626;
}

.ctrl-btn.leave {
  background: var(--rd);
  border-radius: 24px;
  width: auto;
  padding: 0 20px;
  font-weight: 700;
  font-size: 12px;
  gap: 8px;
}

.ctrl-btn.leave:hover {
  background: #dc2626;
}

.ctrl-btn svg {
  width: 20px;
  height: 20px;
}

/* ==================== ADDITIONAL ALIGNMENT & SPACING ==================== */
.dash-panels-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.meeting-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.form-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.master-data-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  align-items: start;
}

.mcat-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) auto;
  gap: 10px;
  margin-bottom: 16px;
  align-items: end;
}

@media (max-width: 768px) {
  .dash-panels-grid,
  .master-data-grid {
    grid-template-columns: 1fr !important;
  }
  
  .meeting-list-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
  }

  .form-summary-grid {
    grid-template-columns: 1fr !important;
  }

  .mcat-form-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  
  .mcat-form-grid button,
  .mcat-form-grid div {
    width: 100% !important;
  }
  
  .mob-nav {
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  }
  
  #meeting-area {
    height: 500px !important;
    padding: 16px 12px !important;
  }
  
  .meeting-grid-wrap {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
    gap: 12px !important;
    padding: 6px !important;
  }
  
  .video-avatar {
    width: 52px !important;
    height: 52px !important;
    font-size: 20px !important;
  }
  
  .video-label {
    bottom: 8px !important;
    left: 8px !important;
    padding: 4px 8px !important;
    font-size: 10px !important;
  }

  .meeting-controls-bar {
    padding: 16px 0 0 !important;
    gap: 12px !important;
  }
  
  .ctrl-btn {
    width: 40px !important;
    height: 40px !important;
  }
  
  .ctrl-btn svg {
    width: 18px !important;
    height: 18px !important;
  }

  .ctrl-btn.leave {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    justify-content: center !important;
  }

  .ctrl-btn.leave .btn-text {
    display: none !important;
  }
  
  .mt-participants-grid {
    grid-template-columns: 1fr !important;
    max-height: 120px !important;
    padding: 8px !important;
    gap: 8px !important;
  }

  .modal {
    padding: 20px 16px !important;
  }
  
  .modal .mtl {
    font-size: 16px !important;
  }
  
  .modal .mts {
    font-size: 11px !important;
    margin-bottom: 14px !important;
  }
  
  .modal .ig {
    margin-bottom: 12px !important;
  }
  
  .modal .ig label {
    font-size: 11px !important;
    margin-bottom: 6px !important;
  }
  
  .modal input, .modal textarea, .modal select {
    padding: 10px 12px !important;
  }
  
  #mt-desc {
    height: 60px !important;
  }
  
  .participant-label {
    padding: 6px 10px !important;
    font-size: 11px !important;
  }

  .modal .mft {
    margin-top: 16px !important;
    padding-top: 12px !important;
    display: flex !important;
    gap: 10px !important;
  }
  
  .modal .mft button {
    flex: 1 !important;
    padding: 12px !important;
    font-size: 13px !important;
  }
}

.mt-participants-grid {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--bd2);
  border-radius: 8px;
  padding: 12px;
  background: var(--bg3);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.participant-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 500;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--bd);
  transition: all 0.2s ease;
}

.participant-label:hover {
  background: var(--acg);
  border-color: var(--ac);
}

.participant-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
}
