:root {
  /* Colors */
  --primary: #2563eb;
  --primaryHover: #1d4ed8;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --textLight: #64748b;
  --border: #d1d5db;     /* Darkened from #e2e8f0 */
  --borderDark: #94a3b8; /* Darkened from #cbd5e1 */
  --soft: #f1f5f9;
  --blue: #3b82f6;
  --blueDark: #1d4ed8;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  
  /* Radii */
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.container {
  width: min(1600px, calc(100% - 64px)); /* Expanded from 1340px to 1600px */
  margin: 0 auto;
}

.main { padding: 64px 0; } /* Increased from 40px */

/* Global Header (Premium Midnight) */
.topbar {
  background: rgba(15, 23, 42, 0.98); 
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 80px; 
  display: flex;
  align-items: center;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
  padding: 10px 0;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 20px;
}

.brand-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.brand-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  transition: transform 0.2s;
  flex: 0 0 auto;
}
.brand-center:hover { transform: scale(1.02); }

.brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.3));
}

.brand-name {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -1.2px;
  background: #fff;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}

.brand-highlight {
  color: #38bdf8 !important;
  -webkit-text-fill-color: #38bdf8 !important;
}

.nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

@media (max-width: 1350px) {
  .partnerWrap { display: none; }
  .brand-left, .nav { gap: 16px; }
}

@media (max-width: 900px) {
  .brand-name { display: none; } /* Show only logo on small screens */
  .hello-pill { display: none; }
}

.nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 24px;
}

.nav-user {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.hello-pill {
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.navbtn {
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 13px;
  transition: all 0.2s;
  background: #fff;
  color: #0f172a;
  border: none;
  white-space: nowrap;
}

.navbtn:hover { background: #f1f5f9; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(255,255,255,0.15); }

.navbtn.ghost { 
  background: rgba(255,255,255,0.05); 
  color: #fff; 
  border: 1.5px solid rgba(255,255,255,0.2); 
  box-shadow: none;
}
.navbtn.ghost:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

/* ✅ Dropdown Menu (Premium) */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  background: #ffffff;
  min-width: 220px;
  border-radius: 14px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1100;
}

/* Arrow indicator */
.dropdown-menu::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 24px;
  width: 12px;
  height: 12px;
  background: #fff;
  transform: rotate(45deg);
  border-left: 1px solid rgba(0,0,0,0.05);
  border-top: 1px solid rgba(0,0,0,0.05);
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #1e293b;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  border-radius: 10px;
  transition: all 0.2s;
}

.dropdown-item:hover {
  background: #f1f5f9;
  color: var(--primary);
  padding-left: 20px;
}

.dropdown-item svg {
  width: 18px;
  height: 18px;
  opacity: 0.7;
}

.dropdown-item.logout {
  color: #ef4444;
  margin-top: 6px;
  border-top: 1px solid #f1f5f9;
  border-radius: 0 0 10px 10px;
}
.dropdown-item.logout:hover {
  background: #fef2f2;
}

/* ✅ Welcome full screen (no box, no white space) */
.welcome-screen{
  width: 100%;
  min-height: calc(100vh - 56px);
  display:flex;
  align-items:center;
  justify-content:center;
  background: radial-gradient(circle at top, #67a9f2, #67a9f2 60%, #8bbdf5 100%);
  border-radius: 0;
  box-shadow: none;
  padding: 0 18px;

  /* ✅ needed for top-right corner absolute block */
  position: relative;
}

.welcome-center{ text-align:center; color: #fff; }

/* ✅ bigger */
.welcome-to{
  font-size: 34px;
  font-weight: 800;
  margin-bottom: 18px;
}

/* OLD (still safe if not used) */
.welcome-brandline{
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 14px;
}
.welcome-logo{
  width: 60px;
  height: 60px;
  object-fit: contain;
  background:#fff;
  border-radius: 10px;
  padding: 8px;
}
.welcome-name{
  font-size: 56px;
  font-weight: 800;
  letter-spacing: .3px;
}

/* ✅ bigger links area */
.welcome-actions{
  margin-top: 28px;
  display:flex;
  gap: 22px;
  justify-content:center;
  flex-wrap: wrap;
}
.welcome-link{
  color: #fff;
  text-decoration:none;
  border-bottom: 2px solid rgba(255,255,255,.65);
  padding: 10px 8px;
  font-weight: 800;
  font-size: 18px;
}
.welcome-link.primary{ border-bottom-color: #fff; }

/* =========================
   OffMarketDeals.live welcome additions (BIGGER)
   ========================= */

/* Top-right corner block */
.welcome-corner{
  position: absolute;
  top: 18px;
  right: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
  z-index: 5;
}

/* Round/pill badge (logo + company name) */
.corner-badge{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,.22);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: var(--shadow);
}

.corner-logo{
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  padding: 6px;
}

.corner-name{
  font-weight: 800;
  font-size: 20px;
  color: #fff;
  white-space: nowrap;
}

/* Details (bigger) */
.corner-details{
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255,255,255,.95);
  text-align: right;
}
.corner-details a{
  color: rgba(255,255,255,.95);
  text-decoration: none;
}
.corner-details a:hover{
  text-decoration: underline;
}

/* Center OffMarketDeals.live logo (bigger) */
.welcome-mid-logo{
  width: 340px;       
  height: 340px;
  max-width: 90vw;
  max-height: 60vh;
  margin: 14px auto 18px;
  display: block;
  object-fit: contain;
}

welcome-center{
  text-align: center;
  color: #fff;

  /* ✅ move everything up */
  transform: translateY(-40px);
}

/* Taglines (bigger) */
.welcome-tagline{
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  text-align: center;
  margin-top: 10px;
}
.welcome-subtagline{
  font-size: 18px;
  font-weight: 600;
  color: rgba(255,255,255,.95);
  text-align: center;
  margin-top: 6px;
}

/* Cards + Forms */
.card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  overflow: visible;
}
.card-title{ margin: 0 0 14px; }

.form{ overflow: visible; }
.form .field{ margin-bottom: 12px; overflow: visible; position: relative; }

.field label{
  display:block;
  font-weight:700;
  margin-bottom: 6px;
}
.field input, .field select, .field textarea{
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: #fff;
}

.grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}
.field.full{ grid-column: 1 / -1; }

.req{ color: #ef4444; }
.hint{
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.actions{
  display:flex;
  align-items:center;
  gap: 12px;
  margin-top: 10px;
}
.actions-down{ margin-top: 16px; }

.btn{
  display:inline-block;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid #0f172a;
  background: #0f172a;
  color: #fff;
  text-decoration:none;
  font-weight: 800;
}
.btn.ghost{
  background: transparent;
  color: #0f172a;
  border-color: var(--line);
}
.btn-wide{ width: 100%; text-align:center; }

.link{ color:#0f172a; font-weight: 700; text-decoration:none; }
.muted{ color: var(--muted); }

/* MULTISELECT */
.multiselect{ position: relative; }

.ms-btn{
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ✅ NO horizontal scroll inside dropdown, NO page width increase */
.ms-menu{
  position:absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 6px;
  max-height: 320px;
  overflow-y: auto;
  overflow-x: hidden;   /* ✅ no side scroll */
  display:none;
  z-index: 9999;
}
.ms-menu.open{ display:block; }
.multiselect:focus-within .ms-menu{ display:block; }

/* ✅ remove extra spaces between items */
.ms-item{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 4px 8px;  /* ✅ tight spacing */
  border-radius: 10px;
  cursor: pointer;
}
.ms-item:hover{ background: #f1f5f9; }

.ms-check{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.ms-dot{
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid #0f172a;
  display:inline-block;
  flex: 0 0 auto;
  position: relative;
}
.ms-check:checked + .ms-dot::after{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background:#0f172a;
  transform: translate(-50%, -50%);
}

/* ✅ allow long names to wrap (still no width increase) */
.ms-label{
  font-weight: 700;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Toast */
.toast-stack{
  position: fixed;
  right: 18px;
  top: 70px;
  display:flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999;
}
.toast{
  background:#fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 10px 12px;
  min-width: 280px;
}
.toast-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}
.toast-msg{ font-weight: 700; }
.toast-x{
  border:0;
  background: transparent;
  font-size: 18px;
  cursor:pointer;
}
.toast.hide{
  opacity: 0;
  transform: translateY(-6px);
  transition: .25s ease;
}

/* Reference Sync: Partner Logos & Modal UI */
.partnerWrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  line-height: 1.1;
  min-width: 100px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}
.partnerLogoLink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.partnerLogo {
  height: 32px;
  width: auto;
  object-fit: contain;
  margin-bottom: 2px;
}
.partnerTextLink {
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  opacity: 0.7;
  text-decoration: none;
  transition: opacity 0.2s;
}
.partnerTextLink:hover {
  opacity: 1;
  text-decoration: none;
}

.modalGrid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 35px;
}
.moreBlock {
  border: 2px solid var(--soft);
  border-radius: 18px;
  padding: 24px;
  background: #fff;
  margin-bottom: 25px;
}
.moreTitle {
  font-weight: 950;
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--text);
}
.notesBlock {
  border-top: 1.5px solid var(--soft);
  padding-top: 20px;
  margin-top: 15px;
}
.notesTitle {
  font-weight: 950;
  margin-bottom: 12px;
  color: var(--text);
}
.noteArea {
  width: 100%;
  min-height: 130px;
  border: 2px solid var(--soft);
  border-radius: 14px;
  padding: 15px;
  font-size: 14px;
  outline: none;
  background: #fafafa;
  color: var(--text);
}
.noteArea[disabled] {
  background: #f5f5f5;
  color: #666;
}

.btnBlue {
  padding: 12px 24px;
  border-radius: 999px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.2s;
}
.btnBlue:hover { transform: translateY(-1px); opacity: 0.9; }

.modalFoot {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 15px 28px;
  border-top: 1px solid var(--border);
  background: #fff;
}
.footBtn {
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
  border: 1.5px solid var(--borderDark);
  background: #fff;
  color: var(--text);
  transition: all 0.2s;
}
.footBtn.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Modal Grid Layouts */
.kv-grid, .kv-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
.kv {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: 12px;
  background: var(--soft);
  border: 1px solid var(--border);
}
.k {
  color: var(--textLight);
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.v {
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
}

@keyframes brand-shimmer {
  0% { background-position: 100% center; }
  100% { background-position: -100% center; }
}

/* --- SHARED AUTH LAYOUT (Login/Register Centering) --- */
.auth-wrapper {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: var(--bg);
}
.auth-container { width: 100%; }
.auth-card {
  background: #fff;
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.auth-header { text-align: center; margin-bottom: 32px; }
.auth-brand { 
  display: inline-flex; 
  align-items: center; 
  gap: 12px; 
  text-decoration: none; 
  margin-bottom: 24px; 
}
.auth-brand img { height: 32px; width: auto; background: #fff; border-radius: 8px; border: 1px solid var(--border); padding: 4px; }
.auth-brand span { font-size: 20px; font-weight: 800; color: var(--text); letter-spacing: -0.5px; }

.btn-auth {
  width: 100%;
  padding: 14px;
  background: var(--text);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
}
.btn-auth:hover { background: #000; transform: translateY(-1px); }

.auth-footer { text-align: center; margin-top: 32px; font-weight: 500; color: var(--textLight); font-size: 14px; }
.auth-footer a { color: var(--primary); text-decoration: none; font-weight: 700; }
.auth-footer a:hover { text-decoration: underline; }
