/* Stitch AI High-Quality Professional Light Theme Design System */

:root {
  --sidebar-width: 240px;
  --bg-light: #f8fafc;
  --surface-white: #ffffff;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --card-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --accent-primary: #2563eb;
  --accent-secondary: #4f46e5;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-light) !important;
  color: var(--text-primary) !important;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* Hide top nav bar clutter on desktop */
@media (min-width: 768px) {
  #mobile-top-bar, #mobile-drawer, #mobile-bottom-nav {
    display: none !important;
  }

  #mystatus-nav, .nav-fixed-bottom, nav.fixed.bottom-0, nav[class*="fixed bottom-0"] { 
    display: none !important; 
  }

  #desktop-sidebar {
    display: flex !important;
    position: fixed;
    left: 0; top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    flex-direction: column;
    background: #ffffff !important;
    border-right: 1px solid var(--card-border) !important;
    color: var(--text-primary) !important;
    z-index: 1000;
    padding: 24px 16px;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(15, 23, 42, 0.04) !important;
  }

  body:not(.login-page) > main, 
  body:not(.login-page) > .main-content, 
  body:not(.login-page) > div.app-container {
    margin-left: var(--sidebar-width) !important;
    min-height: 100vh;
    padding: 32px 32px 64px 32px;
  }
}

/* Mobile View Layout (screens < 768px) */
@media (max-width: 767px) {
  #desktop-sidebar { 
    display: none !important; 
  }

  body:not(.login-page) {
    padding-top: 64px !important;
    padding-bottom: 72px !important;
  }

  body:not(.login-page) > main, 
  body:not(.login-page) > .main-content, 
  body:not(.login-page) > div.app-container {
    margin-left: 0 !important;
    padding: 16px 16px 80px 16px !important;
  }
}

/* Sidebar styling */
.sidebar-logo {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 28px;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  -webkit-background-clip: text;
  color: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 13px;
  color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
}

.sidebar-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  color: #475569 !important;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-nav-link:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  transform: translateX(3px);
}

.sidebar-nav-link.active {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25) !important;
}

.sidebar-nav-link .material-symbols-outlined {
  font-size: 20px;
}

.sidebar-user {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: white;
  border: 2px solid #e2e8f0;
}

.sidebar-user-details {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-user-name {
  font-weight: 700;
  font-size: 0.85rem;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.sidebar-user-code {
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 500;
}

/* Mobile Header & Bottom Navigation Bar Styling */
#mobile-top-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 60px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 999;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

#mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1001;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#mobile-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

#mobile-drawer {
  position: fixed;
  top: 0; bottom: 0; left: 0;
  width: 280px;
  background: #ffffff;
  z-index: 1002;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  box-shadow: 10px 0 25px rgba(15, 23, 42, 0.15);
  overflow-y: auto;
}

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

#mobile-bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 64px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 999;
  box-shadow: 0 -4px 15px rgba(15, 23, 42, 0.05);
}

.mobile-bottom-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #64748b;
  text-decoration: none;
  font-size: 10px;
  font-weight: 600;
  gap: 2px;
  flex: 1;
  height: 100%;
}

.mobile-bottom-item.active {
  color: #2563eb;
}

.mobile-bottom-item .material-symbols-outlined {
  font-size: 22px;
}

/* Modern Professional Light Card Styling */
.glass-card, .bg-surface-container-low {
  background: #ffffff !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: var(--card-shadow) !important;
  color: #0f172a !important;
}

/* Light form inputs */
input, select, textarea {
  background-color: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}
input:focus, select:focus, textarea:focus {
  border-color: #2563eb !important;
  background-color: #ffffff !important;
}
