/* MLFRAMES Enterprise Master Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --ml-primary: #E85D04;
  --ml-primary-hover: #D05000;
  --ml-gold: #D4AF37;
  --ml-gold-hover: #C29F2B;
  --ml-dark: #0D0D0D;
  --ml-dark-card: #141414;
  --ml-admin-dark: #10141D;
  --ml-body-bg: #F8F9FA;
  --ml-card-bg: #FFFFFF;
  --ml-text-main: #1A1D20;
  --ml-text-muted: #6C757D;
  --ml-border-color: #E9ECEF;
  --ml-radius: 10px;
  --ml-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--ml-body-bg);
  color: var(--ml-text-main);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

/* =============================================
   Navigation — Active & Hover States
   ============================================= */
.nav-link {
  position: relative;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--ml-primary) !important;
}

/* Active nav link — gold color + underline indicator */
.nav-active {
  color: var(--ml-primary) !important;
  font-weight: 700 !important;
}

.nav-active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 12px;
  right: 12px;
  height: 2px;
  background-color: var(--ml-primary);
  border-radius: 2px;
}


::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #F1F1F1;
}
::-webkit-scrollbar-thumb {
  background: #CCC;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* Buttons */
.btn-ml-primary {
  background-color: var(--ml-primary);
  color: #FFFFFF;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  transition: all 0.2s ease;
}
.btn-ml-primary:hover {
  background-color: var(--ml-primary-hover);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(232, 93, 4, 0.25);
}

.btn-ml-gold {
  background-color: var(--ml-gold);
  color: #000000;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  transition: all 0.2s ease;
}
.btn-ml-gold:hover {
  background-color: var(--ml-gold-hover);
  color: #000000;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.btn-ml-dark {
  background-color: var(--ml-dark);
  color: #FFFFFF;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  transition: all 0.2s ease;
}
.btn-ml-dark:hover {
  background-color: #222222;
  color: #FFFFFF;
}

.btn-ml-outline {
  border: 1px solid var(--ml-border-color);
  background-color: transparent;
  color: var(--ml-text-main);
  font-weight: 600;
  border-radius: 8px;
  padding: 10px 20px;
}
.btn-ml-outline:hover {
  background-color: #F1F3F5;
  color: var(--ml-text-main);
}

/* =============================================
   Dashboard & Admin Sidebar — Responsive & Collapsible
   ============================================= */

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Base Sidebar */
.dashboard-sidebar,
.admin-sidebar {
  width: 270px;
  min-width: 270px;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.25s ease;
  z-index: 1050;
  position: relative;
}

.dashboard-sidebar {
  background-color: var(--ml-dark);
}

.admin-sidebar {
  background-color: var(--ml-admin-dark);
}

/* Nav links styling */
.dashboard-sidebar .nav-link,
.admin-sidebar .nav-link {
  color: #94A3B8;
  font-weight: 500;
  padding: 11px 16px;
  border-radius: 8px;
  margin: 2px 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.dashboard-sidebar .nav-link:hover,
.admin-sidebar .nav-link:hover {
  color: #FFFFFF !important;
  background-color: rgba(255, 255, 255, 0.08);
  transform: translateX(3px);
}

.dashboard-sidebar .nav-link.active {
  color: #FFFFFF !important;
  background-color: var(--ml-primary);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(232, 93, 4, 0.3);
}

.admin-sidebar .nav-link.active {
  color: #FFFFFF !important;
  background-color: #2563EB;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Desktop Collapsible Mode (>= 992px) */
@media (min-width: 992px) {
  .dashboard-sidebar,
  .admin-sidebar {
    position: sticky;
    top: 0;
    flex-shrink: 0;
  }

  .dashboard-sidebar.sidebar-collapsed,
  .admin-sidebar.sidebar-collapsed {
    width: 76px !important;
    min-width: 76px !important;
    max-width: 76px !important;
    padding: 16px 6px !important;
  }

  .dashboard-sidebar.sidebar-collapsed .sidebar-text,
  .dashboard-sidebar.sidebar-collapsed .sidebar-full-brand,
  .dashboard-sidebar.sidebar-collapsed .sidebar-profile-info,
  .dashboard-sidebar.sidebar-collapsed .sidebar-help-box,
  .admin-sidebar.sidebar-collapsed .sidebar-text,
  .admin-sidebar.sidebar-collapsed .sidebar-full-brand,
  .admin-sidebar.sidebar-collapsed .sidebar-profile-info,
  .admin-sidebar.sidebar-collapsed .sidebar-help-box {
    display: none !important;
  }

  .dashboard-sidebar.sidebar-collapsed .sidebar-collapsed-brand,
  .admin-sidebar.sidebar-collapsed .sidebar-collapsed-brand {
    display: block !important;
    text-align: center;
    margin: 0 auto;
    font-size: 1.35rem !important;
  }

  .dashboard-sidebar.sidebar-collapsed .nav-link,
  .admin-sidebar.sidebar-collapsed .nav-link {
    justify-content: center !important;
    padding: 12px 0 !important;
    margin: 4px 0 !important;
  }

  .dashboard-sidebar.sidebar-collapsed .nav-link i,
  .admin-sidebar.sidebar-collapsed .nav-link i {
    font-size: 1.25rem !important;
    margin: 0 !important;
  }

  .dashboard-sidebar.sidebar-collapsed .sidebar-user-card,
  .admin-sidebar.sidebar-collapsed .sidebar-user-card {
    justify-content: center !important;
    padding: 6px 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

.sidebar-collapsed-brand {
  display: none;
}

/* Mobile & Tablet Drawer Layout (< 992px) */
@media (max-width: 991.98px) {
  .dashboard-sidebar,
  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    transform: translateX(-100%);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
  }

  .dashboard-sidebar.sidebar-open,
  .admin-sidebar.sidebar-open {
    transform: translateX(0);
  }
}

/* =============================================
   Public Website Mobile Drawer (< 992px)
   ============================================= */

.public-mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.public-mobile-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.public-mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 320px;
  max-width: 86vw;
  height: 100vh;
  background-color: #FFFFFF;
  z-index: 1060;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.public-mobile-drawer.open {
  transform: translateX(0);
}


.public-mobile-drawer .nav-link {
  color: #1A1D20;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  border-bottom: 1px solid #F1F3F5;
}

.public-mobile-drawer .nav-link:hover {
  background-color: #FFF7ED;
  color: var(--ml-primary) !important;
  padding-left: 22px;
}

.public-mobile-drawer .nav-link.nav-active {
  background-color: #FFF7ED;
  color: var(--ml-primary) !important;
  font-weight: 700 !important;
  border-left: 4px solid var(--ml-primary);
}


/* Main Cards */
.ml-card {
  background-color: var(--ml-card-bg);
  border-radius: var(--ml-radius);
  border: 1px solid var(--ml-border-color);
  box-shadow: var(--ml-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ml-card-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

/* Auth 2-Column Split Layout */
.auth-split-container {
  min-height: 100vh;
  display: flex;
}
.auth-left-grid {
  width: 45%;
  background-color: var(--ml-dark);
  color: #FFFFFF;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.auth-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 20px 0;
}
.auth-photo-grid img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 10px;
}
.auth-right-card {
  width: 55%;
  background-color: #FFFFFF;
  padding: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Enterprise Motion & Glassmorphism Utilities */
@keyframes floatAnim {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0px); }
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(212, 175, 55, 0); }
  100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

.animate-float-1 {
  animation: floatAnim 4s ease-in-out infinite;
}

.animate-float-2 {
  animation: floatAnim 5s ease-in-out 1s infinite;
}

.pulse-gold {
  animation: pulseGlow 2s infinite;
}

.glass-card {
  background: rgba(13, 13, 13, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.glass-card-light {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.ml-hover-lift {
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.ml-hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12) !important;
}

.zoom-img-container {
  overflow: hidden;
  position: relative;
}

.zoom-img-container img {
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.zoom-img-container:hover img {
  transform: scale(1.07);
}

.badge-glow-gold {
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.45);
}

/* Status Badges */
.badge-status {
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.8rem;
}
.badge-new { background-color: #E0F2FE; color: #0369A1; }
.badge-agreed { background-color: #FEF3C7; color: #92400E; }
.badge-completed { background-color: #DCFCE7; color: #15803D; }
.badge-plan { background-color: #F1F5F9; color: #0F172A; border: 1px solid #CBD5E1; }

/* Metrics Box */
.metric-box {
  background: #FFFFFF;
  border: 1px solid var(--ml-border-color);
  border-radius: var(--ml-radius);
  padding: 20px;
  box-shadow: var(--ml-shadow);
}
.metric-val {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.2;
}
.metric-lbl {
  font-size: 0.85rem;
  color: var(--ml-text-muted);
  font-weight: 500;
}

/* Step Wizard Progress Header */
.step-wizard {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 30px;
}
.step-wizard::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #E2E8F0;
  z-index: 1;
}
.step-item {
  position: relative;
  z-index: 2;
  background: #FFFFFF;
  padding: 0 10px;
  text-align: center;
}
.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #E2E8F0;
  color: #64748B;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin: 0 auto 6px;
}
.step-item.active .step-circle {
  background-color: var(--ml-primary);
  color: #FFFFFF;
}
.step-item.completed .step-circle {
  background-color: #10B981;
  color: #FFFFFF;
}

/* 3-Pane Split Chat Layout */
.chat-split-layout {
  display: grid;
  grid-template-columns: 300px 1fr 280px;
  gap: 0;
  height: calc(100vh - 150px);
  min-height: 600px;
  background: #FFFFFF;
  border-radius: var(--ml-radius);
  border: 1px solid var(--ml-border-color);
  overflow: hidden;
}
.chat-left-pane {
  border-right: 1px solid var(--ml-border-color);
  background: #FAFAFA;
}
.chat-middle-pane {
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
}
.chat-right-pane {
  border-left: 1px solid var(--ml-border-color);
  background: #FAFAFA;
  padding: 20px;
  overflow-y: auto;
}

/* Responsive adjustments across mobile & tablet */
@media (max-width: 1199.98px) {
  .chat-split-layout {
    grid-template-columns: 260px 1fr;
  }
  .chat-right-pane {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .chat-split-layout {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 550px;
  }
  .chat-left-pane {
    max-height: 180px;
    overflow-y: auto;
    border-right: none;
    border-bottom: 1px solid var(--ml-border-color);
  }
  .chat-middle-pane {
    min-height: 400px;
  }

  /* Auth split container */
  .auth-split-container {
    flex-direction: column;
  }
  .auth-left-grid {
    width: 100% !important;
    padding: 30px 20px !important;
  }
  .auth-right-card {
    width: 100% !important;
    padding: 30px 20px !important;
  }

  /* Tables container */
  .table-responsive {
    border-radius: 8px;
    -webkit-overflow-scrolling: touch;
  }

  /* Reduce typography on small screens */
  h1, .display-4, .display-5 {
    font-size: 1.85rem !important;
  }
  h2 {
    font-size: 1.5rem !important;
  }
  h3 {
    font-size: 1.25rem !important;
  }
}

/* Inspection Drawer */
.drawer-panel {
  background: #FFFFFF;
  border-left: 1px solid var(--ml-border-color);
  padding: 24px;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.05);
}

/* Drag and Drop Uploader */
.dropzone-box {
  border: 2px dashed #CBD5E1;
  border-radius: 12px;
  padding: 35px;
  text-align: center;
  background: #F8FAFC;
  cursor: pointer;
  transition: all 0.2s ease;
}
.dropzone-box:hover {
  border-color: var(--ml-primary);
  background: #FFF7ED;
}

/* =============================================
   Global Bottom Spacing & Margins
   ============================================= */
main.overflow-y-auto,
.dashboard-content-area,
.page-bottom-spacer {
  padding-bottom: 6rem !important;
  margin-bottom: 3rem !important;
}

.public-page-wrapper {
  margin-bottom: 4rem;
}


