/* ABXN AI - Ultra-Premium Theme, Brand Colors & Typography */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&family=Outfit:wght@500;600;700;800;900&display=swap');

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  
  /* ABXN Brand Palette: Royal Blue, Gold Yellow & Deep Navy */
  --abxn-blue: #2563eb;
  --abxn-blue-hover: #1d4ed8;
  --abxn-blue-light: #eff6ff;
  --abxn-blue-border: #bfdbfe;
  
  --abxn-yellow: #f59e0b;
  --abxn-yellow-hover: #d97706;
  --abxn-yellow-light: #fffbeb;
  --abxn-yellow-border: #fde68a;
  
  --abxn-dark: #0f172a;
  --abxn-dark-hover: #1e293b;

  --bg-app: #f8fafc;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 36px rgba(15, 23, 42, 0.12);
}

* { 
  box-sizing: border-box; 
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: #f8fafc;
  color: var(--text-dark);
  min-height: 100vh;
  margin: 0;
  line-height: 1.55;
  font-size: 14.5px;
}

h1, h2, h3, h4, h5, h6, .display-1, .display-2, .display-3, .display-4, .display-5, .display-6, .fw-extrabold {
  font-family: var(--font-heading);
  letter-spacing: -0.03em;
  line-height: 1.25;
}

/* Brand Color Utility Classes */
.bg-abxn-blue { background-color: var(--abxn-blue) !important; }
.text-abxn-blue { color: var(--abxn-blue) !important; }
.btn-abxn-blue {
  background-color: var(--abxn-blue);
  color: #ffffff;
  font-weight: 700;
  border: none;
  transition: all 0.2s ease;
}
.btn-abxn-blue:hover {
  background-color: var(--abxn-blue-hover);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

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

/* ============ APP LAYOUT ============ */
.app-wrapper {
  display: flex;
  min-height: calc(100vh - 68px);
  overflow-x: hidden;
}

/* ============ TOP BAR ============ */
.top-bar {
  height: 68px;
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

/* ============ LEFT SIDEBAR ============ */
.sidebar {
  width: 240px;
  background-color: #ffffff;
  border-right: 1px solid #e2e8f0;
  position: fixed;
  top: 68px;
  bottom: 40px;
  left: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  z-index: 1025;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.sidebar-item {
  margin: 4px 12px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: 12px;
  color: #475569;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.sidebar-link:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

.sidebar-link.active {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #1e40af;
  font-weight: 700;
  border-left: 4px solid var(--abxn-blue);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

.sidebar-link.active i {
  color: var(--abxn-blue);
}

/* Main Content Area */
.main-content {
  margin-left: 240px;
  padding: 28px 32px;
  flex-grow: 1;
  background-color: #f8fafc;
  min-height: calc(100vh - 108px);
}

/* Sidebar Mobile Overlay Backdrop */
.sidebar-backdrop {
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1020;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}
.sidebar-backdrop.show {
  opacity: 1;
  visibility: visible;
}

/* ============ PREMUM CARDS & HOVER EFFECTS ============ */
.hover-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.hover-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08) !important;
}

/* ============ RESPONSIVE MOBILE STYLES (< 992px & < 768px) ============ */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: 0 0 28px rgba(0, 0, 0, 0.2);
    top: 68px;
    bottom: 0;
    height: calc(100vh - 68px);
  }
  .sidebar.show {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0 !important;
    padding: 20px 14px !important;
  }
  .top-bar {
    padding: 0 16px;
  }
}

@media (max-width: 767.98px) {
  /* Prevent any horizontal overflow on entire page */
  html, body {
    overflow-x: hidden !important;
  }
  .top-bar-center {
    display: none !important;
  }
  .top-bar {
    height: 58px;
    padding: 0 12px;
  }
  .main-content {
    padding: 12px 8px !important;
    overflow-x: hidden !important;
  }
  .container, .container-fluid {
    padding-left: 10px !important;
    padding-right: 10px !important;
    overflow-x: hidden !important;
  }
  /* Studio banner heading - prevent cut-off */
  .studio-banner-title {
    font-size: 1.25rem !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal !important;
  }
  .avatar-card-item {
    flex: 0 0 195px !important;
    width: 195px !important;
  }
  .btn-mobile-full {
    width: 100% !important;
    justify-content: center !important;
  }
  /* Phone preview on mobile - contained and centered */
  .studio-phone-preview {
    max-width: 220px !important;
    height: 380px !important;
    min-height: 340px !important;
    max-height: 400px !important;
    margin: 0 auto !important;
  }
  /* Footer mobile - stack vertically */
  .bottom-footer {
    position: static !important;
    height: auto !important;
    min-height: 40px;
    padding: 8px 10px !important;
    flex-direction: column !important;
    gap: 4px !important;
    font-size: 10px !important;
  }
  .bottom-footer .d-flex {
    justify-content: center !important;
    text-align: center;
    flex-wrap: wrap;
    gap: 6px !important;
  }
  /* Generate button - ensure text doesn't cut */
  .studio-generate-btn {
    font-size: 0.95rem !important;
    padding: 12px 16px !important;
    white-space: nowrap !important;
  }
  /* Face cards container overflow hidden */
  .face-cards-scroll {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  /* Form inputs slightly smaller */
  .form-control {
    font-size: 0.9rem !important;
  }
}

/* Small phones (< 400px) */
@media (max-width: 399.98px) {
  .studio-banner-title {
    font-size: 1.1rem !important;
  }
  .studio-phone-preview {
    max-width: 180px !important;
    height: 320px !important;
    min-height: 280px !important;
  }
  .studio-generate-btn {
    font-size: 0.85rem !important;
  }
}

