/* Glossary Kitchen & Living - Luxury Enterprise Design System */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --primary: #0F172A;
  --secondary: #1E293B;
  --accent: #C8A96A;
  --accent-hover: #b89756;
  --accent-light: rgba(200, 169, 106, 0.12);
  --bg-main: #F8FAFC;
  --card-bg: #FFFFFF;
  --text-main: #0F172A;
  --text-muted: #64748B;
  --border-color: #E2E8F0;
  --success: #22C55E;
  --danger: #EF4444;
  --warning: #F59E0B;
  --sidebar-width: 270px;
  --header-height: 72px;
  --glass-bg: rgba(15, 23, 42, 0.85);
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 20px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 16px 36px rgba(15, 23, 42, 0.1);
  --shadow-gold: 0 10px 25px rgba(200, 169, 106, 0.25);
  --transition-fast: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .brand-font {
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.02em;
}

/* Glassmorphism Classes */
.glass-panel {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: var(--shadow-md);
  border-radius: 16px;
}

.glass-dark {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(200, 169, 106, 0.2);
  color: #FFFFFF;
}

/* Wrapper & Layout */
#app-wrapper {
  display: flex;
  width: 100vw;
  min-height: 100vh;
}

/* Sidebar styling */
#sidebar {
  width: var(--sidebar-width);
  background: var(--primary);
  color: #FFFFFF;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  transition: var(--transition-fast);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

#sidebar.collapsed {
  margin-left: calc(-1 * var(--sidebar-width));
}

.sidebar-header {
  height: var(--header-height);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #FFFFFF;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent) 0%, #E5C378 100%);
  color: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
  box-shadow: var(--shadow-gold);
}

.brand-title {
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.1;
  color: #FFFFFF;
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.sidebar-body {
  flex: 1;
  padding: 1.25rem 1rem;
  overflow-y: auto;
}

.nav-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #64748B;
  font-weight: 700;
  margin: 1.25rem 0 0.5rem 0.75rem;
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0.75rem 1rem;
  color: #94A3B8;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  border-radius: 12px;
  transition: var(--transition-fast);
  margin-bottom: 4px;
}

.sidebar-link i {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
  transition: var(--transition-fast);
}

.sidebar-link:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-link.active {
  color: #FFFFFF;
  background: linear-gradient(90deg, rgba(200, 169, 106, 0.25) 0%, rgba(200, 169, 106, 0.05) 100%);
  border-left: 3px solid var(--accent);
  font-weight: 600;
}

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

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.6);
}

/* Main Content Area */
#main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: var(--transition-fast);
}

#main-content.expanded {
  margin-left: 0;
}

/* Header Topbar */
.top-header {
  height: var(--header-height);
  background: #FFFFFF;
  border-bottom: 1px solid var(--border-color);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: var(--shadow-sm);
}

.toggle-sidebar-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-main);
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.toggle-sidebar-btn:hover {
  background: var(--bg-main);
}

.header-search {
  max-width: 380px;
  width: 100%;
  position: relative;
}

.header-search input {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  font-size: 0.88rem;
  width: 100%;
  transition: var(--transition-fast);
}

.header-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200, 169, 106, 0.2);
  background: #FFFFFF;
}

.header-search i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-profile-menu {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
  padding: 4px 8px;
  border-radius: 30px;
  transition: var(--transition-fast);
}

.user-profile-menu:hover {
  background: var(--bg-main);
}

.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
}

/* Page Banner & Content Container */
.page-container {
  padding: 2rem;
  flex: 1;
}

.page-header-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #FFFFFF;
  padding: 2.25rem;
  border-radius: 20px;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.page-header-banner::after {
  content: '';
  position: absolute;
  right: -50px;
  bottom: -50px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(200, 169, 106, 0.25) 0%, rgba(200, 169, 106, 0) 70%);
  border-radius: 50%;
}

.banner-accent-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--accent-light);
  border: 1px solid rgba(200, 169, 106, 0.4);
  color: var(--accent);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

/* Luxury Cards & Stat Badges */
.stat-card {
  background: #FFFFFF;
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
  height: 100%;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(200, 169, 106, 0.4);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.stat-icon.gold {
  background: var(--accent-light);
  color: var(--accent);
}

.stat-icon.primary {
  background: rgba(15, 23, 42, 0.08);
  color: var(--primary);
}

.stat-icon.success {
  background: rgba(34, 197, 94, 0.12);
  color: var(--success);
}

.stat-icon.danger {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
  color: var(--primary);
  font-family: 'Outfit', sans-serif;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 500;
}

/* Commercial Product Cards */
.product-card {
  background: #FFFFFF;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.product-thumb-container {
  position: relative;
  width: 100%;
  padding-top: 75%; /* 4:3 Ratio */
  overflow: hidden;
  background: #F1F5F9;
}

.product-thumb-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-thumb-container img {
  transform: scale(1.08);
}

.product-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}

.badge-luxury {
  padding: 4px 10px;
  border-radius: 30px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-gold {
  background: var(--accent);
  color: #FFFFFF;
}

.badge-dark {
  background: var(--primary);
  color: #FFFFFF;
}

.btn-favorite-heart {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94A3B8;
  cursor: pointer;
  transition: var(--transition-fast);
  z-index: 2;
}

.btn-favorite-heart.active, .btn-favorite-heart:hover {
  color: var(--danger);
  background: #FFFFFF;
  transform: scale(1.1);
}

.product-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-brand-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.product-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.product-meta-specs {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.product-price-row {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px dashed var(--border-color);
}

.price-main {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  font-family: 'Outfit', sans-serif;
}

.price-old {
  font-size: 0.88rem;
  text-decoration: line-through;
  color: var(--text-muted);
  margin-left: 6px;
}

.btn-accent {
  background: var(--accent);
  color: #FFFFFF;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  padding: 0.5rem 1.25rem;
  transition: var(--transition-fast);
}

.btn-accent:hover {
  background: var(--accent-hover);
  color: #FFFFFF;
  box-shadow: var(--shadow-gold);
}

.btn-dark-primary {
  background: var(--primary);
  color: #FFFFFF;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  padding: 0.5rem 1.25rem;
  transition: var(--transition-fast);
}

.btn-dark-primary:hover {
  background: var(--secondary);
  color: #FFFFFF;
}

/* Client Presentation Mode Layout */
#presentation-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #090D16;
  color: #FFFFFF;
  z-index: 9999;
  display: flex;
  flex-direction: column;
}

.presentation-toolbar {
  height: 70px;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(16px);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(200, 169, 106, 0.2);
}

.presentation-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
}

.presentation-card {
  display: flex;
  max-width: 1200px;
  width: 100%;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(200, 169, 106, 0.3);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
}

.presentation-img-wrap {
  flex: 1.2;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 70vh;
}

.presentation-img-wrap img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.presentation-info-wrap {
  flex: 1;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Form Styles */
.form-control, .form-select {
  border-radius: 12px;
  border: 1px solid var(--border-color);
  padding: 0.65rem 1rem;
  font-size: 0.92rem;
}

.form-control:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200, 169, 106, 0.2);
}

.form-label {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--primary);
}

/* Print Sheet Formatting */
@media print {
  #sidebar, .top-header, .btn, .no-print {
    display: none !important;
  }

  #main-content {
    margin-left: 0 !important;
  }

  body {
    background: #FFFFFF !important;
    color: #000000 !important;
  }

  .print-page {
    padding: 20px;
  }
}

/* Mobile Sidebar Backdrop Overlay */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1035;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* Comprehensive Mobile & Responsive Media Queries */
@media (max-width: 991.98px) {
  #sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    z-index: 1045;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 0 !important;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  }

  #sidebar.mobile-open,
  #sidebar.show {
    transform: translateX(0) !important;
  }

  #sidebar.collapsed {
    transform: translateX(-100%) !important;
  }

  #main-content,
  #main-content.expanded {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .top-header {
    padding: 0 1rem;
  }

  .page-container {
    padding: 1.25rem 0.85rem;
  }

  .page-header-banner {
    padding: 1.5rem 1.15rem;
    border-radius: 16px;
  }

  .page-header-banner h1 {
    font-size: 1.55rem;
  }

  .stat-card {
    padding: 1.25rem;
    border-radius: 16px;
  }
}

@media (max-width: 767.98px) {
  .page-container {
    padding: 1rem 0.75rem;
  }

  /* Prevent automatic zooming on iOS Safari inputs */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  select,
  textarea {
    font-size: 16px !important;
  }

  .btn {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* DataTables Mobile Layout Adjustments */
  .dataTables_wrapper .d-flex {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem;
  }

  .dataTables_filter,
  .dataTables_length {
    text-align: center !important;
  }

  .dataTables_filter input {
    width: 100% !important;
    margin-left: 0 !important;
  }

  .dataTables_paginate {
    display: flex;
    justify-content: center;
    margin-top: 0.75rem;
    flex-wrap: wrap;
  }

  .table-responsive {
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
  }

  /* Client Presentation Overlay Mobile Fixes */
  .presentation-card {
    flex-direction: column;
    max-height: 90vh;
    overflow-y: auto;
  }

  .presentation-img-wrap {
    max-height: 35vh;
  }

  .presentation-info-wrap {
    padding: 1.5rem;
  }
}

@media (max-width: 575.98px) {
  .page-header-banner {
    padding: 1.15rem 0.9rem;
  }

  .page-header-banner h1 {
    font-size: 1.35rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-value {
    font-size: 1.6rem;
  }

  .product-card-body {
    padding: 0.85rem;
  }

  .product-title {
    font-size: 0.92rem;
    line-height: 1.25;
  }

  .price-main {
    font-size: 1.05rem;
  }

  .btn-favorite-heart {
    width: 32px;
    height: 32px;
    font-size: 0.82rem;
    top: 8px;
    right: 8px;
  }

  .product-badges {
    top: 8px;
    left: 8px;
  }

  .badge-luxury {
    font-size: 0.65rem;
    padding: 3px 8px;
  }

  .user-avatar {
    width: 36px;
    height: 36px;
  }
}

