/* DESIGN TOKENS & RESET */
:root {
  --navy: #0f172a;
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --teal-light: #ccfbf1;
  --slate: #f8fafc;
  --slate-m: #f1f5f9;
  --border: #e2e8f0;
  --text: #334155;
  --text-m: #64748b;
  --white: #ffffff;
  --red: #ef4444;
  --amber: #f59e0b;
  --green: #10b981;
  --purple: #7c3aed;
}

body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background-color: var(--slate);
  color: var(--navy);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  width: 100%;
}

.hidden { display: none !important; }

/* UTILITY ELEMENTS */
.badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  display: inline-block;
}
.badge-teal { background: var(--teal-light); color: var(--teal-dark); }
.badge-purple { background: #ede9fe; color: var(--purple); }
.badge-amber { background: #fef3c7; color: #92400e; }
.badge-red { background: var(--red); color: var(--white); }
.badge-slate { background: var(--slate-m); color: var(--text); }

.btn {
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  text-align: center;
}
.btn-teal { background: var(--teal); color: var(--white); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-slate { background: var(--slate-m); color: var(--text); }
.btn-outline { background: transparent; color: var(--teal); border: 1.5px solid var(--teal); }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* LAYOUT STRUCTURAL COMPONENTS */
.app-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: relative;
}
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.brand-logo {
  width: 36px;
  height: 36px;
  background: var(--teal);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-logo span { color: var(--white); font-weight: 800; font-size: 18px; }
.brand-title { color: var(--white); font-weight: 700; font-size: 16px; line-height: 1; }
.brand-subtitle { color: var(--teal); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; margin-top: 2px; }

.desktop-nav { display: flex; align-items: center; gap: 6px; }
.nav-link {
  background: transparent;
  color: #94a3b8;
  border: none;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
}
.nav-link.active, .nav-link:hover { background: var(--teal); color: var(--white); }

.mobile-actions-wrapper { display: none; align-items: center; gap: 14px; }
.icon-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  color: var(--white);
  border-radius: 6px;
}
.icon-btn:hover { background: rgba(255,255,255,0.08); }

.mobile-menu-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 22px;
  height: 16px;
  padding: 0;
}
.mobile-menu-btn span { width: 100%; height: 2px; background: var(--white); border-radius: 2px; }

.mobile-dropdown-cabinet {
  position: absolute;
  top: 64px; left: 0; right: 0;
  background: var(--navy);
  border-top: 1px solid #1e293b;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mobile-nav-link {
  background: rgba(255,255,255,0.05);
  color: var(--white);
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  text-align: left;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* CARDS & CONTAINERS */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  background: var(--white);
  color: var(--navy);
  box-sizing: border-box;
}
.form-label { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px; display: block; }

/* HERO CONTAINER BLOCK */
.hero-section {
  background: linear-gradient(135deg, var(--navy) 0%, #1e3a5f 100%);
  padding: clamp(2.5rem, 6vw, 5rem) 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-bg-radial {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 50%, rgba(13,148,136,0.15) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(13,148,136,0.10) 0%, transparent 40%);
}
.hero-content { position: relative; max-width: 850px; margin: 0 auto; }
.hero-main-title { font-weight: 800; color: var(--white); line-height: 1.2; margin-bottom: 16px; letter-spacing: -0.02em; font-size: 3rem; }
.hero-description { color: #94a3b8; margin: 0 auto 32px auto; line-height: 1.6; max-width: 700px; font-size: 1.05rem; }
.search-wrapper-panel { display: flex; gap: 10px; max-width: 580px; margin: 0 auto; background: rgba(255,255,255,0.08); padding: 8px; border-radius: 12px; flex-wrap: wrap; }
.hero-stats-panel { display: flex; gap: 32px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.stat-node { text-align: center; min-width: 100px; }
.stat-node-num { color: var(--teal); font-weight: 800; font-size: 22px; }

/* STANDARD CONTENT SECTIONS */
.section-wrapper { max-width: 1200px; margin: 0 auto; padding: 3rem 1.5rem; }
.section-header { text-align: center; margin-bottom: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.grid-5 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }

/* ROW LAYOUT VIEWPORTS */
.split-view-layout { display: flex; gap: 24px; align-items: start; flex-wrap: wrap; }
.sidebar-filter-column { flex: 1 1 260px; position: sticky; top: 88px; }
.main-listing-column { flex: 3 1 600px; display: flex; flex-direction: column; gap: 16px; }

.listing-row-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}
.listing-row-card:hover { border-color: var(--teal); box-shadow: 0 4px 12px rgba(13,148,136,0.05); }
.card-data-block { flex: 1; }
.metrics-mini-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-top: 12px; }
.mini-metric-node { background: var(--slate-m); padding: 8px 12px; border-radius: 8px; }
.card-action-block { display: flex; flex-direction: column; gap: 8px; min-width: 160px; }

/* MODALS LAYOUTS SYSTEM OVERLAYS */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal-card {
  background: var(--white);
  border-radius: 16px;
  width: 100%;
  max-width: 900px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}
.auth-modal-card {
  max-width: 440px !important;
  border: 1px solid var(--border);
}
.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h2 { font-size: 18px; font-weight: 700; margin: 0; color: var(--navy); }
.close-modal-btn { background: transparent; border: none; font-size: 16px; color: var(--text-m); cursor: pointer; padding: 4px; }
.close-modal-btn:hover { color: var(--red); }
.modal-body { flex: 1; overflow-y: auto; padding: 1.5rem; }

/* DATA MATRIX TABLES */
.table-responsive-wrapper { overflow-x: auto; width: 100%; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
.data-table th { background: var(--navy); color: var(--white); padding: 12px 16px; font-weight: 600; }
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text); }
.block-matrix td { border: 1px solid var(--border); }

/* COMPARISON SYSTEM BOTTOM CONTAINER */
.comparison-dock {
  position: fixed;
  bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--navy);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  padding: 12px 24px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 24px;
  z-index: 90;
  border: 1.5px solid var(--teal);
  width: max-content;
  max-width: 90vw;
}
.dock-text { color: var(--white); font-weight: 600; font-size: 13.5px; }

/* CRM ADVISORY SUBELEMENTS */
.agent-lead-row-item:hover { background: var(--slate); }
.agent-lead-row-item.active { background: var(--teal-light) !important; border-left: 4px solid var(--teal); }

/* SYSTEM RESPONSIVE MEDIA BREAKPOINTS */
@media (max-width: 992px) {
  .hero-main-title { font-size: 2.35rem; }
}
@media (max-width: 768px) {
  .desktop-nav { display: none; }
  .mobile-actions-wrapper { display: flex; }
  .listing-row-card { flex-direction: column; align-items: stretch; gap: 16px; }
  .card-action-block { flex-direction: row; flex-wrap: wrap; }
  .card-action-block .btn { flex: 1 1 120px; }
  .comparison-dock { flex-direction: column; border-radius: 16px; gap: 10px; text-align: center; bottom: 12px; }
}

/* APP STANDARD FOOTER STRUCTURE */
.app-footer { background: var(--navy); color: #94a3b8; padding: 4rem 1.5rem 2rem 1.5rem; margin-top: auto; border-top: 4px solid var(--teal); }
.footer-container { max-width: 1200px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 40px; margin-bottom: 3rem; }
.footer-brand-section { grid-span: 2; max-width: 220px; }
.footer-brand-title { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--white); font-weight: 700; }
.footer-logo { width: 30px; height: 30px; border-radius: 6px; }
.footer-logo span { font-size: 15px; }
.footer-desc { font-size: 13px; line-height: 1.7; margin: 0; }
.footer-heading { color: var(--white); font-weight: 600; font-size: 13px; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1px; }
.f-link { font-size: 13px; margin-bottom: 8px; cursor: pointer; color: #94a3b8; }
.f-link:hover { color: var(--teal); }
.footer-bottom { border-top: 1px solid #1e293b; padding-top: 1.25rem; display: flex; justify-content: space-between; align-items: center; font-size: 12px; flex-wrap: wrap; gap: 10px; }
.text-teal { color: var(--teal); }