/* ==============================
   RESET & BASE STYLES
   ============================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--light-cream);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==============================
   COFFEE THEME COLOR PALETTE - LIGHT THEME
   ============================== */
:root {
  --primary-brown: #6F4E37;
  --dark-brown: #4B3D2A;
  --light-cream: #F9F5F0;
  --beige: #E8D8C9;
  --accent-brown: #967259;
  --text-dark: #38220F;
  --white: #FFFFFF;
  --off-white: #FFFBF5;
  --success: #7AA95C;
  --error: #C44536;
  --warning: #E6A037;
  --info: #4A6FA5;
  --shadow: rgba(111, 78, 55, 0.12);
  --border: #E0D1C1;
  --input-bg: #FFFFFF;
  --hover-brown: #5A3E2E;
  --radius: 12px;
  --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ==============================
   TYPOGRAPHY & UTILITIES
   ============================== */
h1, h2, h3, h4, h5, h6 {
  color: var(--primary-brown);
  font-weight: 600;
  line-height: 1.3;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

button, input, select, textarea {
  font-family: inherit;
}

.container-limit {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* ==============================
   ANIMATIONS
   ============================== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes textShine {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

@keyframes underlineExpand {
  from { width: 0; opacity: 0; }
  to { width: 80px; opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.9; }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-60px) scale(0.95) rotateX(-10deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0);
  }
}

@keyframes toastSlideIn {
  0% {
    opacity: 0;
    transform: translateX(120%);
  }
  70% {
    transform: translateX(-5%);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastSlideOut {
  0% {
    opacity: 1;
    transform: translateX(0);
  }
  100% {
    opacity: 0;
    transform: translateX(120%);
  }
}

@keyframes iconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes iconShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

@keyframes iconRotate {
  0% { transform: rotate(0); }
  25% { transform: rotate(10deg); }
  75% { transform: rotate(-10deg); }
  100% { transform: rotate(0); }
}

@keyframes toastProgress {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* ==============================
   USER HEADER STYLES
   ============================== */
.admin-header {
  background: var(--white);
  padding: 20px 30px;
  border-radius: 20px;
  box-shadow: 0 8px 20px var(--shadow);
  margin: 10px 20px 16px;
  position: sticky;
  top: 10px;
  z-index: 500;
  transition: var(--transition);
}

.admin-header.scrolled {
  box-shadow: 0 4px 12px rgba(111, 78, 55, 0.1);
  padding: 16px 30px;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
}

/* Hamburger Menu */
#sidebarToggle {
  background: transparent;
  border: none;
  color: var(--primary-brown);
  font-size: 1.8rem;
  cursor: pointer;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

#sidebarToggle::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-brown), var(--dark-brown));
  opacity: 0;
  transition: var(--transition);
  border-radius: 50%;
}

#sidebarToggle:hover::before {
  opacity: 0.1;
}

#sidebarToggle:hover {
  transform: scale(1.1) rotate(5deg);
}

/* Logo & Brand */
.logo-brand {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
  min-width: 0;
}

.cafe-logo {
  width: 60px;
  height: 60px;
  padding: 6px;
  background: #ffffff;
  border-radius: 50%;
  object-fit: contain;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  flex-shrink: 0;
}

.cafe-title {
  background: linear-gradient(135deg, var(--text-dark), var(--text-dark));
  color: var(--white);
  padding: 12px 30px;
  border-radius: 999px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(111, 78, 55, 0.25);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Auth Buttons */
.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
}

.auth-buttons {
  display: flex;
  gap: 15px;
}

.btn-sm {
  padding: 10px 20px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.btn-sm .btn-text {
  display: inline;
}

.signin-btn {
  background: linear-gradient(135deg, var(--text-dark), var(--text-dark));
  color: var(--white);
  border: none;
  box-shadow: 0 4px 12px rgba(111, 78, 55, 0.25);
  transition: var(--transition);
}

.signup-btn {
  background: linear-gradient(135deg, var(--text-dark), var(--text-dark));
  color: var(--white);
  border: none;
  box-shadow: 0 4px 12px rgba(111, 78, 55, 0.25);
  transition: var(--transition);
}

/* User Info */
.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-greeting {
  font-weight: 600;
  color: var(--primary-brown);
  font-size: 16px;
  white-space: nowrap;
}

/* ==============================
   MODALS WITH SCROLL
   ============================== */
.menu-modal,
.profile-modal {
  max-width: 320px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.menu-modal {
  padding: 25px;
}

.profile-modal {
  padding: 30px;
}

/* Modal Content with Scroll */
.modal-content {
  flex: 1;
  overflow-y: auto;
  padding-right: 10px;
  margin-right: -10px;
  scroll-behavior: smooth;
}

/* Custom Scrollbar for All Modals */
.modal-content::-webkit-scrollbar {
  width: 6px;
}

.modal-content::-webkit-scrollbar-track {
  background: var(--beige);
  border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: var(--accent-brown);
  border-radius: 10px;
  transition: var(--transition);
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: var(--primary-brown);
}

/* For Firefox */
.modal-content {
  scrollbar-width: thin;
  scrollbar-color: var(--accent-brown) var(--beige);
}

/* ==============================
   MENU MODAL STYLES
   ============================== */
.menu-modal .sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 10px;
}

.menu-modal .sidebar-menu li a {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 12px;
  color: var(--text-dark);
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.menu-modal .sidebar-menu li a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--primary-brown), var(--accent-brown));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.3s ease;
}

.menu-modal .sidebar-menu li a:hover::before {
  transform: scaleY(1);
}

.menu-modal .sidebar-menu li a:hover {
  background: linear-gradient(135deg, rgba(111, 78, 55, 0.05), rgba(219, 193, 172, 0.05));
  color: var(--primary-brown);
  padding-left: 24px;
  border: 2px solid var(--border);
  box-shadow: 0 4px 12px rgba(111, 78, 55, 0.1);
}

.menu-modal .sidebar-menu li a i {
  width: 24px;
  text-align: center;
  font-size: 18px;
  color: var(--accent-brown);
}

/* ==============================
   PROFILE MODAL STYLES
   ============================== */
.profile-details {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
  min-height: min-content;
}

.profile-avatar {
  font-size: 80px;
  color: var(--primary-brown);
  margin-bottom: 10px;
  flex-shrink: 0;
}

.profile-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--off-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(111, 78, 55, 0.1);
  min-width: 0;
}

.profile-table tr {
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.profile-table tr:last-child {
  border-bottom: none;
}

.profile-table tr:hover {
  background: rgba(111, 78, 55, 0.03);
}

.profile-table td {
  padding: 16px 20px;
  font-size: 15px;
  line-height: 1.6;
}

.profile-table td:first-child {
  font-weight: 700;
  color: var(--primary-brown);
  width: 35%;
  border-right: 1px solid var(--border);
  background: rgba(111, 78, 55, 0.02);
}

.profile-table td:last-child {
  color: var(--text-dark);
  width: 65%;
  word-break: break-word;
}

/* ==============================
   MAIN CONTENT
   ============================== */
.main-content {
  flex: 1;
  background: var(--white);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 8px 20px var(--shadow);
  margin: 0 20px 40px;
  animation: fadeIn 0.8s ease-out;
}

/* ==============================
   HERO SECTION
   ============================== */
.hero {
  text-align: center;
  padding: 70px 20px;
  background: linear-gradient(135deg, var(--off-white), var(--beige));
  border-radius: 20px;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(to right, var(--primary-brown), var(--accent-brown), var(--success));
}

.hero h1 {
  font-size: 48px;
  margin-bottom: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-brown), var(--dark-brown));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: textShine 3s ease-in-out infinite alternate;
}

.hero p {
  font-size: 22px;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-dark);
  opacity: 0.9;
  line-height: 1.7;
}

.hero-images {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
  width: 100%;
}

.hero-images img {
  width: 100%;
  max-width: 350px;
  height: 250px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  animation: fadeInUp 0.8s ease-out;
  transition: var(--transition);
  display: block !important;
}

.hero-images img:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* ==============================
   MODERN FILTERS
   ============================== */
.search-container {
  margin-bottom: 25px;
}

.search-box {
  position: relative;
  background: var(--white);
  border-radius: 12px;
  padding: 8px 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  gap: 12px;
  border: 2px solid transparent;
  transition: var(--transition);
}

.search-box:focus-within {
  border-color: var(--accent-brown);
  box-shadow: 0 6px 16px rgba(150, 114, 89, 0.15);
}

.search-box i {
  color: var(--accent-brown);
  font-size: 18px;
  opacity: 0.8;
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  color: var(--text-dark);
  background: transparent;
  padding: 8px 0;
}

.search-box input::placeholder {
  color: rgba(56, 34, 15, 0.5);
}

.search-clear {
  background: none;
  border: none;
  color: var(--accent-brown);
  cursor: pointer;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  opacity: 0.7;
}

.search-clear:hover {
  background: rgba(150, 114, 89, 0.1);
  opacity: 1;
  transform: scale(1.1);
}

/* Categories Tabs */
.categories-tabs-container {
  position: relative;
  margin-bottom: 20px;
}

.categories-tabs-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.categories-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 5px;
  margin: 0 -5px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.categories-tabs::-webkit-scrollbar {
  display: none;
}

.category-tab {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 90px;
  position: relative;
  overflow: hidden;
}

.category-tab::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(to right, var(--primary-brown), var(--accent-brown));
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.category-tab:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(111, 78, 55, 0.1);
  border-color: var(--accent-brown);
}

.category-tab.active {
  background: linear-gradient(135deg, var(--primary-brown), var(--dark-brown));
  color: var(--white);
  border-color: var(--primary-brown);
  box-shadow: 0 8px 16px rgba(111, 78, 55, 0.2);
}

.category-tab.active::before {
  transform: translateY(0);
}

.category-tab.active .tab-icon {
  transform: scale(1.1);
  filter: brightness(1.2);
}

.tab-icon {
  font-size: 24px;
  transition: transform 0.3s ease;
}

.tab-text {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

/* Tab Scroll Buttons */
.tab-scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 50%;
  color: var(--accent-brown);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tab-scroll-btn.show {
  opacity: 1;
  pointer-events: auto;
}

.tab-scroll-left {
  left: -20px;
}

.tab-scroll-right {
  right: -20px;
}

.tab-scroll-btn:hover {
  background: var(--primary-brown);
  color: var(--white);
  border-color: var(--primary-brown);
  transform: translateY(-50%) scale(1.1);
}

/* Subcategories */
.subcategories-container {
  background: var(--off-white);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  border: 2px solid var(--border);
  animation: fadeIn 0.3s ease-out;
}

.subcategories-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.subcategories-header span {
  font-weight: 600;
  color: var(--primary-brown);
  font-size: 16px;
}

.clear-subcategory {
  background: none;
  border: none;
  color: var(--accent-brown);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  transition: var(--transition);
}

.clear-subcategory:hover {
  background: rgba(150, 114, 89, 0.1);
}

.subcategories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.subcategory-chip {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: 8px 16px;
  color: var(--text-dark);
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.subcategory-chip:hover {
  border-color: var(--accent-brown);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(150, 114, 89, 0.1);
}

.subcategory-chip.active {
  background: linear-gradient(135deg, var(--primary-brown), var(--dark-brown));
  color: var(--white);
  border-color: var(--primary-brown);
  box-shadow: 0 4px 8px rgba(111, 78, 55, 0.2);
}

/* ==============================
   PRODUCT GRID
   ============================== */
.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

/* ==============================
   PRODUCT CARD
   ============================== */
.product-card {
  background: var(--off-white);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  border: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  height: 100%;
  min-height: 400px;
  position: relative;
  overflow: hidden;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(to right, var(--primary-brown), var(--accent-brown));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.product-card:hover::before {
  transform: scaleX(1);
}

.product-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 16px;
  transition: var(--transition);
}

.product-card:hover img {
  transform: scale(1.05);
}

.product-card strong {
  font-size: 18px;
  color: var(--primary-brown);
  margin-bottom: 10px;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 50px;
}

.product-card p {
  font-size: 14px;
  color: var(--text-dark);
  flex: 1;
  margin-bottom: 16px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  opacity: 0.85;
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px var(--shadow);
  border-color: var(--accent-brown);
}

/* ==============================
   LOW STOCK BADGE
   ============================== */
.low-stock-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--beige);
  color: var(--dark-brown);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 20px;
  box-shadow: 0 4px 10px var(--shadow);
  z-index: 10;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 2px solid var(--primary-brown);
  font-family: inherit;
}

.low-stock-badge i {
  font-size: 14px;
  opacity: 0.9;
}

.product-card:hover .low-stock-badge {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px var(--shadow);
}

/* ==============================
   QUANTITY SELECTOR
   ============================== */
.quantity-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 10px;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 12px;
  margin: 16px 0;
  transition: var(--transition);
}

.quantity-selector:focus-within {
  border-color: var(--accent-brown);
  box-shadow: 0 0 0 3px rgba(150, 114, 89, 0.1);
}

.qty-btn {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary-brown), var(--dark-brown));
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 8px var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.qty-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.qty-btn:hover::before {
  transform: translateX(0);
}

.qty-btn:hover {
  background: linear-gradient(135deg, var(--hover-brown), var(--dark-brown));
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 16px rgba(111, 78, 55, 0.25);
}

.qty-btn:active {
  transform: translateY(0) scale(0.98);
}

.qty-display {
  font-size: 18px;
  font-weight: 700;
  min-width: 40px;
  text-align: center;
  color: var(--primary-brown);
  transition: var(--transition);
}

/* ==============================
   BUTTONS
   ============================== */
.btn {
  padding: 14px 24px;
  border-radius: 12px;
  border: none;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 6px 15px var(--shadow);
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.5px;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.btn:hover::before {
  transform: translateX(100%);
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary-brown), var(--dark-brown));
  color: var(--white);
}

.btn.secondary {
  background: var(--white);
  color: var(--primary-brown);
  border: 2px solid var(--border);
}

.btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(111, 78, 55, 0.2);
}

.btn:active {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(111, 78, 55, 0.15);
}

.btn i {
  font-size: 18px;
  transition: transform 0.3s ease;
}

.btn:hover i {
  transform: translateX(3px);
}

/* ==============================
   LOAD MORE & NO RESULTS
   ============================== */
.load-more-wrapper {
  text-align: center;
  margin: 50px 0;
  position: relative;
}

.load-more-wrapper::before,
.load-more-wrapper::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 30%;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
}

.load-more-wrapper::before {
  left: 0;
}

.load-more-wrapper::after {
  right: 0;
}

.no-products {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--text-dark);
  background: var(--off-white);
  border-radius: 16px;
  border: 2px dashed var(--border);
  animation: pulse 2s infinite;
}

.no-products i {
  font-size: 60px;
  color: var(--accent-brown);
  margin-bottom: 25px;
  animation: bounce 2s infinite;
}

.no-products h3 {
  font-size: 26px;
  margin-bottom: 15px;
  color: var(--primary-brown);
  font-weight: 700;
}

.no-products p {
  color: var(--text-dark);
  opacity: 0.8;
  max-width: 500px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.6;
}

/* ==============================
   MODALS
   ============================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(75, 61, 42, 0.85);
  backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  z-index: 10000;
  padding: 20px;
  animation: fadeIn 0.3s ease-out;
}

.modal-overlay[style*="flex"] {
  display: flex !important;
}

.modal-box {
  background: var(--off-white);
  padding: 35px;
  width: 100%;
  max-width: 420px;
  border-radius: 20px;
  box-shadow: 0 25px 50px rgba(111, 78, 55, 0.3);
  border: 2px solid var(--border);
  animation: modalSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.modal-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(to right, var(--primary-brown), var(--accent-brown), var(--success));
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
}

.modal-header h3 {
  font-size: 24px;
  color: var(--primary-brown);
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-brown), var(--accent-brown));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.modal-close {
  background: var(--white);
  border: 2px solid var(--border);
  color: var(--accent-brown);
  font-size: 24px;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  padding-bottom: 6px;
}

.modal-close::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-brown), var(--dark-brown));
  opacity: 0;
  transition: var(--transition);
  border-radius: 50%;
}

.modal-close:hover::before {
  opacity: 0.1;
}

.modal-close:hover {
  color: var(--primary-brown);
  transform: rotate(90deg) scale(1.1);
  border-color: var(--accent-brown);
  box-shadow: 0 4px 12px rgba(150, 114, 89, 0.2);
}

/* ==============================
   SIDEBAR MENU
   ============================== */
.sidebar-menu {
  list-style: none;
}

.sidebar-menu li {
  margin-bottom: 12px;
}

.sidebar-menu a {
  display: block;
  padding: 16px 22px;
  border-radius: 12px;
  color: var(--text-dark);
  font-weight: 600;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
}

.sidebar-menu a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--primary-brown), var(--accent-brown));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.3s ease;
}

.sidebar-menu a:hover::before {
  transform: scaleY(1);
}

.sidebar-menu a:hover {
  background: linear-gradient(135deg, rgba(111, 78, 55, 0.05), rgba(219, 193, 172, 0.05));
  color: var(--primary-brown);
  padding-left: 30px;
  border-color: var(--border);
  box-shadow: 0 4px 12px rgba(111, 78, 55, 0.1);
}

/* ==============================
   ORDERS ACCORDION
   ============================== */
.orders-accordion {
  width: 100%;
}

.order-item {
  background: var(--off-white);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  transition: var(--transition);
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: left;
  cursor: pointer;
}

.order-id {
  font-weight: 700;
  color: var(--primary-brown);
  font-size: 16px;
}

.order-customer {
  color: var(--text-dark);
  font-size: 14px;
  margin-top: 4px;
}

.order-total {
  font-weight: 700;
  color: var(--primary-brown);
  font-size: 18px;
}

.order-status {
  background: var(--success);
  color: var(--white);
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
}

.order-status.pending {
  background: var(--warning);
}

.order-status.cancelled {
  background: var(--error);
}

.order-details {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px solid var(--border);
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.order-details.active {
  display: grid;
}

.order-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.order-detail-label {
  font-weight: 600;
  color: var(--primary-brown);
  font-size: 14px;
}

.order-detail-value {
  color: var(--text-dark);
  font-size: 14px;
}

.order-products {
  grid-column: 1 / -1;
  margin-top: 16px;
}

.order-product-item {
  display: flex;
  align-items: left;
  gap: 12px;
  padding: 12px;
  background: var(--white);
  border-radius: 10px;
  margin-bottom: 10px;
}

.order-product-img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 8px;
}

.order-product-info {
  flex: 1;
}

.order-product-name {
  font-weight: 600;
  color: var(--primary-brown);
  font-size: 14px;
}

.order-product-quantity {
  color: var(--text-dark);
  font-size: 13px;
}

.order-product-price {
  font-weight: 700;
  color: var(--primary-brown);
  font-size: 14px;
}

/* ==============================
   TOAST NOTIFICATIONS - OPTIMIZED
   ============================== */
#toastContainer {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  pointer-events: none;
}

.toast {
  background: linear-gradient(135deg, #ffffff, #fefcf9);
  color: var(--text-dark);
  padding: 16px 18px;
  border-radius: 14px;
  box-shadow: 
    0 10px 25px rgba(111, 78, 55, 0.15),
    0 2px 5px rgba(111, 78, 55, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  opacity: 0;
  transform: translateX(120%);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(111, 78, 55, 0.15);
  border-left: 4px solid var(--success);
  min-width: 300px;
  backdrop-filter: blur(10px);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.toast::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(111, 78, 55, 0.1), transparent);
}

.toast.show {
  animation: toastSlideIn 0.5s forwards;
}

.toast.hiding {
  animation: toastSlideOut 0.4s forwards;
}

/* Toast Variants */
.toast.success {
  border-left-color: var(--success);
  background: linear-gradient(135deg, #ffffff, #f8fff5);
}

.toast.error {
  border-left-color: var(--error);
  background: linear-gradient(135deg, #ffffff, #fff5f5);
}

.toast.warning {
  border-left-color: var(--warning);
  background: linear-gradient(135deg, #ffffff, #fffbf0);
}

.toast.info {
  border-left-color: var(--info);
  background: linear-gradient(135deg, #ffffff, #f5f9ff);
}

/* Toast Header */
.toast-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.toast-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.toast.success .toast-icon {
  background: var(--success);
  color: white;
  animation: iconPulse 2s infinite;
}

.toast.error .toast-icon {
  background: var(--error);
  color: white;
  animation: iconShake 0.8s ease;
}

.toast.warning .toast-icon {
  background: var(--warning);
  color: white;
  animation: iconRotate 3s infinite;
}

.toast.info .toast-icon {
  background: var(--info);
  color: white;
  animation: iconFloat 2s infinite;
}

.toast-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--primary-brown);
  line-height: 1.3;
  letter-spacing: -0.2px;
}

/* Toast Content */
.toast-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.toast-message {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-dark);
  opacity: 0.9;
  word-break: break-word;
  overflow-wrap: break-word;
  margin: 0;
}

/* Toast Actions */
.toast-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.toast-action-btn {
  background: linear-gradient(135deg, var(--primary-brown), var(--dark-brown));
  color: var(--white);
  padding: 8px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(111, 78, 55, 0.2);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  letter-spacing: 0.3px;
}

.toast-action-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
  transform: translateX(-100%);
  transition: transform 0.4s ease;
}

.toast-action-btn:hover::before {
  transform: translateX(100%);
}

.toast-action-btn:hover {
  background: linear-gradient(135deg, var(--accent-brown), var(--primary-brown));
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(111, 78, 55, 0.3);
}

.toast-action-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(111, 78, 55, 0.2);
}

.toast-action-btn i {
  font-size: 12px;
  transition: transform 0.3s ease;
}

.toast-action-btn:hover i {
  transform: translateX(2px);
}

/* Toast Close Button */
.toast-close {
  background: rgba(111, 78, 55, 0.08);
  border: 1px solid rgba(111, 78, 55, 0.1);
  color: var(--accent-brown);
  font-size: 18px;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  padding: 0;
  margin-left: auto;
  flex-shrink: 0;
}

.toast-close:hover {
  background: rgba(111, 78, 55, 0.12);
  color: var(--primary-brown);
  transform: rotate(90deg) scale(1.1);
  border-color: rgba(111, 78, 55, 0.15);
}

/* Progress Bar */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: rgba(111, 78, 55, 0.05);
  overflow: hidden;
  border-radius: 0 0 14px 14px;
}

.toast-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--primary-brown), var(--accent-brown));
  transform: translateX(-100%);
  animation: toastProgress 5s linear forwards;
  border-radius: 0 0 14px 14px;
}

/* SIMPLE TOAST STYLE - FIXED FOR MOBILE */
.toast.simple-toast {
  padding: 14px 16px;
  min-width: 280px;
  animation: toastSlideIn 0.5s forwards;
  background: linear-gradient(135deg, #ffffff, #fefcf9);
}

.toast.simple-toast .toast-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  flex-direction: row;
}

.toast.simple-toast .toast-message {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-dark);
  opacity: 0.95;
  flex: 1;
  min-width: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 500;
}

.toast.simple-toast .toast-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 0;
  flex-shrink: 0;
}

.toast.simple-toast .toast-action-btn {
  background: linear-gradient(135deg, var(--primary-brown), var(--dark-brown));
  color: var(--white);
  padding: 6px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 12px;
  box-shadow: 0 2px 8px rgba(111, 78, 55, 0.15);
  min-height: 32px;
}

.toast.simple-toast .toast-action-btn:hover {
  background: linear-gradient(135deg, var(--accent-brown), var(--primary-brown));
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(111, 78, 55, 0.25);
}

/* ==============================
   FOOTER
   ============================== */
.site-footer {
  background: linear-gradient(135deg, var(--dark-brown), var(--primary-brown));
  color: var(--white);
  padding: 70px 20px 50px;
  margin-top: auto;
  border-top: 6px solid var(--accent-brown);
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none" opacity="0.05"><path d="M0,0 L100,0 L100,100 Z" fill="white"/></svg>');
  background-size: cover;
  pointer-events: none;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 50px;
  text-align: left;
  position: relative;
  z-index: 1;
}

.footer-col h3 {
  font-size: 22px;
  color: var(--light-cream);
  margin-bottom: 25px;
  font-weight: 700;
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}

.footer-col h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(to right, var(--accent-brown), var(--beige));
  border-radius: 2px;
}

.footer-col p,
.footer-col ul li a {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.8;
  transition: var(--transition);
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 14px;
  position: relative;
  padding-left: 0;
  transition: padding-left 0.3s ease;
}

.footer-col ul li::before {
  content: '☕';
  position: absolute;
  left: 0;
  opacity: 0;
  transition: var(--transition);
}

.footer-col ul li:hover {
  padding-left: 25px;
}

.footer-col ul li:hover::before {
  opacity: 1;
  left: 0;
}

.footer-col ul li a:hover {
  color: var(--light-cream);
  padding-left: 0;
}

/* ==============================
   SOCIAL LINKS
   ============================== */
.social-links {
  display: flex;
  gap: 18px;
  margin-top: 15px;
}

.social-links a {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--off-white);
  font-size: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
}

.social-links a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--accent-brown), var(--beige));
  opacity: 0;
  transition: var(--transition);
  border-radius: 50%;
}

.social-links a:hover::before {
  opacity: 0.2;
}

.social-links a:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  transform: translateY(-5px) scale(1.1);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* ==============================
   FOOTER BOTTOM
   ============================== */
.footer-bottom {
  margin-top: 60px;
  padding-top: 25px;
  border-top: 1px solid rgba(219, 193, 172, 0.3);
  text-align: left;
  font-size: 15px;
  color: var(--beige);
  position: relative;
  z-index: 1;
}

.footer-bottom a {
  color: var(--light-cream);
  text-decoration: underline;
  transition: var(--transition);
  font-weight: 600;
}

.footer-bottom a:hover {
  color: var(--white);
  text-decoration: none;
}

/* ==============================
   RESPONSIVE STYLES
   ============================== */

/* Large Desktop (min-width: 1400px) */
@media (min-width: 1400px) {
  .admin-header {
    width: calc(100% - 30px);
    margin-left: auto;
    margin-right: auto;
  }
  
  #toastContainer {
    top: 25px;
    right: 25px;
    max-width: 420px;
  }
  
  .toast {
    min-width: 320px;
    padding: 18px 20px;
    border-radius: 16px;
  }
  
  .toast.simple-toast {
    min-width: 300px;
    padding: 16px 18px;
  }
  
  .toast-title {
    font-size: 16px;
  }
  
  .toast-message {
    font-size: 15px;
  }
}

/* Tablet Devices (max-width: 1024px) */
@media (max-width: 1024px) {
  .admin-header {
    padding: 18px 24px;
    margin: 10px 16px 12px;
  }

  .cafe-title {
    font-size: 22px;
    padding: 10px 24px;
  }

  .cafe-logo {
    width: 55px;
    height: 55px;
  }

  #sidebarToggle {
    width: 44px;
    height: 44px;
    font-size: 1.6rem;
  }

  .user-greeting {
    font-size: 15px;
  }

  .btn-sm {
    padding: 9px 18px;
    font-size: 13px;
  }
  
  .menu-modal {
    max-width: 300px;
    padding: 20px;
  }
  
  .profile-modal {
    max-width: 340px;
    padding: 25px;
  }

  .main-content {
    padding: 24px;
    margin: 0 16px 32px;
  }

  .hero {
    padding: 50px 16px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero p {
    font-size: 20px;
    max-width: 90%;
  }

  .hero-images img {
    max-width: 300px;
    height: 220px;
  }

  .dashboard-cards {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
  }

  .product-card {
    min-height: 380px;
  }

  .footer-grid {
    gap: 40px;
  }

  .modal-box {
    max-width: 380px;
    padding: 30px;
  }
  
  /* Toast Updates */
  #toastContainer {
    top: 16px;
    right: 16px;
    max-width: 360px;
    gap: 10px;
  }
  
  .toast {
    min-width: 280px;
    padding: 15px 17px;
    border-radius: 13px;
    border-left-width: 3px;
  }
  
  .toast.simple-toast {
    min-width: 260px;
    padding: 14px 16px;
  }
  
  .toast-title {
    font-size: 14.5px;
  }
  
  .toast-message {
    font-size: 13.5px;
    line-height: 1.4;
  }
  
  .toast.simple-toast .toast-message {
    font-size: 13px;
  }
  
  .toast-action-btn {
    padding: 7px 16px;
    font-size: 12.5px;
  }
  
  .toast.simple-toast .toast-action-btn {
    padding: 5px 14px;
    font-size: 11.5px;
  }
}

/* Medium Tablets (max-width: 900px) */
@media (max-width: 900px) {
  .header-content {
    gap: 15px;
  }
  
  .cafe-title {
    font-size: 20px;
    padding: 10px 20px;
  }
  
  .cafe-logo {
    width: 50px;
    height: 50px;
  }
  
  .btn-sm {
    padding: 8px 16px;
    font-size: 13px;
  }
  
  .menu-modal {
    max-width: 280px;
  }
  
  .profile-modal {
    max-width: 320px;
  }

  .hero-images img {
    max-width: 280px;
    height: 200px;
  }
  
  /* Show only 2 images on medium tablets */
  .hero-images img:nth-child(3) {
    display: none !important;
  }
  
  .hero-images img:nth-child(1),
  .hero-images img:nth-child(2) {
    display: block !important;
  }
  
  #toastContainer {
    top: 14px;
    right: 14px;
    max-width: 340px;
  }
  
  .toast {
    min-width: 260px;
    padding: 14px 16px;
  }
  
  .toast.simple-toast {
    min-width: 240px;
    padding: 13px 15px;
  }
  
  .toast-icon {
    width: 18px;
    height: 18px;
    font-size: 11px;
  }
  
  .toast-title {
    font-size: 14px;
  }
  
  .toast-message {
    font-size: 13px;
    line-height: 1.4;
  }
  
  .toast.simple-toast .toast-message {
    font-size: 12.5px;
  }
  
  .toast.simple-toast .toast-action-btn {
    padding: 4px 12px;
    font-size: 11px;
  }
}

/* Small Tablets (max-width: 768px) */
@media (max-width: 768px) {
  .admin-header {
    padding: 16px 20px;
    margin: 8px 12px 10px;
  }

  .header-content {
    gap: 12px;
  }

  .logo-brand {
    gap: 12px;
  }

  .cafe-title {
    font-size: 18px;
    padding: 8px 16px;
  }

  .cafe-logo {
    width: 45px;
    height: 45px;
  }

  .btn-sm {
    padding: 8px 14px;
    font-size: 12px;
  }

  .signup-btn .btn-text {
    display: none;
  }
  
  .signup-btn {
    padding: 8px 12px;
  }
  
  .signin-btn {
    padding: 8px 14px;
  }

  .user-greeting {
    font-size: 14px;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #sidebarToggle {
    width: 42px;
    height: 42px;
    font-size: 1.5rem;
  }
  
  .menu-modal {
    max-width: 260px;
    max-height: 80vh;
    padding: 18px;
  }
  
  .profile-modal {
    max-width: 300px;
    max-height: 80vh;
    padding: 22px;
  }
  
  .profile-avatar {
    font-size: 60px;
  }
  
  .profile-table td {
    padding: 14px 16px;
    font-size: 14px;
  }
  
  .profile-table td:first-child {
    width: 40%;
  }
  
  .profile-table td:last-child {
    width: 60%;
  }

  .admin-header {
    flex-direction: column;
    gap: 16px;
    padding: 16px 20px;
    margin: 8px 12px 10px;
    text-align: center;
  }

  .left-side {
    width: 100%;
    justify-content: center;
  }

  .action-buttons {
    width: 100%;
    justify-content: center;
  }

  .main-content {
    padding: 20px;
    margin: 0 12px 24px;
    border-radius: 16px;
  }

  .hero {
    padding: 40px 16px;
    border-radius: 16px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero p {
    font-size: 18px;
  }

  .hero-images {
    gap: 20px;
  }

  /* Show only 2 images on tablets */
  .hero-images img {
    max-width: calc(50% - 10px);
    height: 200px;
  }
  
  .hero-images img:nth-child(3) {
    display: none !important;
  }
  
  .hero-images img:nth-child(1),
  .hero-images img:nth-child(2) {
    display: block !important;
  }

  .menu-filters {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .menu-filters select,
  .search-box input {
    padding: 14px 16px 14px 48px;
    font-size: 15px;
  }

  .menu-filters select {
    padding: 14px 40px 14px 16px;
    background-position: right 16px center;
  }

  .search-box::before {
    left: 16px;
  }

  .dashboard-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 24px;
  }

  .product-card {
    padding: 16px;
    min-height: 360px;
    border-radius: 14px;
  }

  .product-card img {
    height: 160px;
    margin-bottom: 12px;
  }

  .product-card strong {
    font-size: 16px;
    min-height: 45px;
  }

  .product-card p {
    font-size: 13px;
    margin-bottom: 12px;
  }

  .quantity-selector {
    padding: 8px;
    margin: 12px 0;
    gap: 12px;
  }

  .qty-btn {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }

  .qty-display {
    font-size: 16px;
    min-width: 35px;
  }

  .btn {
    padding: 12px 20px;
    font-size: 15px;
  }

  .low-stock-badge {
    font-size: 11px;
    padding: 5px 10px;
    top: 10px;
    right: 10px;
  }

  .low-stock-badge i {
    font-size: 12px;
  }

  .no-products {
    padding: 60px 16px;
  }

  .no-products i {
    font-size: 50px;
    margin-bottom: 20px;
  }

  .no-products h3 {
    font-size: 22px;
  }

  .no-products p {
    font-size: 16px;
  }

  .orders-accordion {
    padding: 0 10px;
  }
  
  .order-item {
    padding: 16px;
    margin-bottom: 12px;
  }
  
  .order-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
  
  .order-status {
    align-self: flex-start;
  }
  
  .order-details {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .modal-box {
    max-width: 340px;
    padding: 24px;
    margin: 0 16px;
  }

  .modal-header h3 {
    font-size: 22px;
  }

  .modal-close {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }

  .site-footer {
    padding: 50px 16px 40px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: left;
  }

  .footer-col h3 {
    font-size: 20px;
  }

  .footer-col h3::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-col ul li:hover {
    padding-left: 0;
  }

  .footer-col ul li::before {
    display: none;
  }

  .social-links {
    justify-content: center;
  }

  .social-links a {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }

  .footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
  }
  
  /* Toast Updates - FIXED FOR TABLET: Keep in single row */
  #toastContainer {
    top: 12px;
    right: 12px;
    left: 12px;
    max-width: none;
    width: auto;
    align-items: stretch;
  }
  
  .toast {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    padding: 13px 15px;
    margin: 0 auto;
  }
  
  .toast.simple-toast {
    min-width: 0;
    padding: 12px 14px;
  }
  
  .toast-header {
    gap: 8px;
    margin-bottom: 6px;
  }
  
  .toast-icon {
    width: 16px;
    height: 16px;
    font-size: 10px;
  }
  
  .toast-title {
    font-size: 13.5px;
  }
  
  .toast-message {
    font-size: 12.5px;
    line-height: 1.35;
  }
  
  /* FIX: Keep simple toast content in single row */
  .toast.simple-toast .toast-content {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }
  
  .toast.simple-toast .toast-message {
    font-size: 12px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
  }
  
  .toast-actions {
    margin-top: 10px;
    gap: 8px;
  }
  
  .toast-action-btn {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: 8px;
  }
  
  .toast.simple-toast .toast-actions {
    gap: 6px;
    margin-top: 0;
    flex-shrink: 0;
  }
  
  .toast.simple-toast .toast-action-btn {
    padding: 4px 12px;
    font-size: 10.5px;
    border-radius: 6px;
  }
  
  .toast-close {
    width: 24px;
    height: 24px;
    font-size: 16px;
  }
}

/* Mobile Devices (max-width: 600px) */
@media (max-width: 600px) {
  .hero-images {
    justify-content: center;
  }
  
  /* Show only 1 image on mobile */
  .hero-images img {
    max-width: 100%;
    height: 200px;
  }
  
  .hero-images img:nth-child(2),
  .hero-images img:nth-child(3) {
    display: none !important;
  }
  
  .hero-images img:nth-child(1) {
    display: block !important;
    max-width: 100%;
  }
}

/* Mobile Devices (max-width: 480px) */
@media (max-width: 480px) {
  .admin-header {
    padding: 14px 16px;
    margin: 6px 10px 8px;
    border-radius: 16px;
  }

  .cafe-logo {
    width: 50px;
    height: 50px;
  }

  #sidebarToggle {
    width: 44px;
    height: 44px;
    font-size: 1.6rem;
  }

  .cafe-title {
    font-size: 18px;
    padding: 8px 16px;
  }

  .main-content {
    padding: 16px;
    margin: 0 10px 20px;
    border-radius: 14px;
  }

  .hero {
    padding: 32px 12px;
    border-radius: 14px;
    margin-bottom: 30px;
  }

  .hero h1 {
    font-size: 32px;
    margin-bottom: 16px;
  }

  .hero p {
    font-size: 16px;
    margin-bottom: 30px;
    line-height: 1.6;
  }

  .hero-images img {
    height: 180px;
    border-radius: 16px;
    max-width: 100% !important;
  }

  .dashboard-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 20px;
  }

  .product-card {
    min-height: 320px;
    padding: 12px;
  }

  .product-card img {
    height: 120px;
    margin-bottom: 10px;
  }

  .product-card strong {
    font-size: 14px;
    min-height: 40px;
    margin-bottom: 8px;
  }

  .product-card p {
    font-size: 12px;
    margin-bottom: 10px;
    line-height: 1.5;
  }

  .product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--shadow);
  }

  .quantity-selector {
    padding: 6px;
    margin: 8px 0;
    gap: 8px;
    border-radius: 10px;
  }

  .qty-btn {
    width: 30px;
    height: 30px;
    font-size: 16px;
    border-radius: 8px;
  }

  .qty-display {
    font-size: 14px;
    min-width: 30px;
  }

  .btn {
    padding: 10px 14px;
    font-size: 13px;
    border-radius: 10px;
    gap: 6px;
  }

  .btn i {
    font-size: 14px;
  }

  .btn.primary,
  .btn.secondary {
    width: 100%;
    margin-top: 8px;
  }

  .low-stock-badge {
    font-size: 10px;
    padding: 4px 8px;
    top: 8px;
    right: 8px;
    gap: 4px;
  }

  .low-stock-badge i {
    font-size: 10px;
  }

  .load-more-wrapper {
    margin: 30px 0;
  }

  .load-more-wrapper::before,
  .load-more-wrapper::after {
    width: 20%;
  }

  .no-products {
    padding: 40px 12px;
    border-radius: 14px;
  }

  .no-products i {
    font-size: 40px;
    margin-bottom: 16px;
  }

  .no-products h3 {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .no-products p {
    font-size: 14px;
    max-width: 100%;
  }

  .orders-accordion {
    padding: 0;
  }
  
  .order-item {
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 12px;
  }
  
  .order-id {
    font-size: 14px;
  }
  
  .order-customer {
    font-size: 13px;
  }
  
  .order-total {
    font-size: 15px;
  }
  
  .order-status {
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 8px;
  }
  
  .order-details {
    padding: 12px 0 0 0;
  }
  
  .order-detail-item {
    font-size: 13px;
    padding: 6px 0;
  }
  
  .order-detail-label {
    min-width: 100px;
  }
  
  .order-products {
    margin-top: 10px;
  }
  
  .order-product-item {
    padding: 8px;
    margin-bottom: 8px;
  }
  
  .order-product-img {
    width: 40px;
    height: 40px;
  }
  
  .order-product-name {
    font-size: 13px;
  }
  
  .order-product-price {
    font-size: 13px;
  }

  .modal-box {
    max-width: 300px;
    padding: 20px;
    border-radius: 18px;
  }

  .modal-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
  }

  .modal-header h3 {
    font-size: 20px;
  }

  .sidebar-menu a {
    padding: 12px 16px;
    font-size: 14px;
  }

  .sidebar-menu a:hover {
    padding-left: 16px;
  }

  .site-footer {
    padding: 40px 12px 32px;
  }

  .footer-col h3 {
    font-size: 18px;
    margin-bottom: 20px;
  }

  .footer-col p,
  .footer-col ul li a {
    font-size: 14px;
  }

  .social-links {
    gap: 12px;
  }

  .social-links a {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .footer-bottom {
    font-size: 13px;
    margin-top: 30px;
    padding-top: 16px;
  }
  
  /* Toast Updates - FIXED: Single row for mobile */
  #toastContainer {
    top: 10px;
    right: 10px;
    left: 10px;
    gap: 8px;
  }
  
  .toast {
    padding: 12px 14px;
    border-radius: 12px;
    border-left-width: 3px;
    min-width: 0;
    max-width: 100%;
  }
  
  .toast.simple-toast {
    padding: 11px 13px;
  }
  
  /* FIX: Ensure single row layout for simple toast on mobile */
  .toast.simple-toast .toast-content {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }
  
  .toast.simple-toast .toast-message {
    font-size: 11.5px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
  }
  
  .toast.simple-toast .toast-actions {
    justify-content: flex-end;
    margin-top: 0;
    flex-shrink: 0;
  }
  
  .toast.simple-toast .toast-action-btn {
    padding: 3px 10px;
    font-size: 10px;
  }
}

/* Small Mobile (max-width: 360px) */
@media (max-width: 360px) {
  .admin-header {
    padding: 12px 14px;
    margin: 4px 8px 6px;
  }

  .cafe-title {
    font-size: 16px;
    padding: 6px 14px;
  }

  .main-content {
    padding: 12px;
    margin: 0 8px 16px;
    border-radius: 12px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .hero p {
    font-size: 15px;
  }

  .hero-images img {
    height: 150px;
  }

  .menu-filters select,
  .search-box input {
    padding: 10px 12px 10px 40px;
    font-size: 14px;
    border-radius: 10px;
  }

  .menu-filters select {
    padding: 10px 32px 10px 12px;
  }

  .search-box::before {
    left: 12px;
    font-size: 16px;
  }

  .dashboard-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .product-card {
    min-height: 300px;
    padding: 10px;
  }

  .product-card img {
    height: 100px;
    margin-bottom: 8px;
  }

  .product-card strong {
    font-size: 13px;
    min-height: 35px;
  }

  .product-card p {
    font-size: 11px;
    margin-bottom: 8px;
  }

  .quantity-selector {
    padding: 5px;
    margin: 6px 0;
    gap: 6px;
  }

  .qty-btn {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  .qty-display {
    font-size: 13px;
    min-width: 25px;
  }

  .btn {
    padding: 8px 12px;
    font-size: 12px;
  }

  .order-item {
    padding: 10px;
  }
  
  .order-detail-label {
    min-width: 80px;
    font-size: 12px;
  }
  
  .order-detail-value {
    font-size: 12px;
  }

  .modal-box {
    max-width: 280px;
    padding: 16px;
    border-radius: 16px;
  }

  .site-footer {
    padding: 32px 10px 28px;
  }
  
  /* Toast Updates - FIXED: Single row for small mobile */
  #toastContainer {
    top: 8px;
    right: 8px;
    left: 8px;
    gap: 6px;
  }
  
  .toast {
    padding: 10px 12px;
    border-radius: 10px;
  }
  
  .toast.simple-toast {
    padding: 9px 11px;
  }
  
  /* FIX: Keep single row layout */
  .toast.simple-toast .toast-content {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }
  
  .toast.simple-toast .toast-message {
    font-size: 10.5px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
  }
  
  .toast.simple-toast .toast-action-btn {
    padding: 2px 8px;
    font-size: 9px;
  }
  
  .toast-progress {
    height: 2px;
  }
}

/* Extra Small Mobile (max-width: 320px) */
@media (max-width: 320px) {
  .cafe-title span {
    font-size: 14px;
  }
  
  .cafe-title {
    padding: 6px 10px;
  }
  
  .cafe-logo {
    width: 36px;
    height: 36px;
  }
  
  .btn-sm {
    padding: 6px 8px;
    min-width: auto;
  }
  
  .user-greeting {
    max-width: 60px;
    font-size: 11px;
  }
  
  .menu-modal {
    max-width: 200px;
    padding: 14px;
    max-height: 65vh;
  }
  
  .profile-modal {
    max-width: 240px;
    padding: 16px;
    max-height: 65vh;
  }
  
  .profile-avatar {
    font-size: 40px;
  }
  
  .profile-details {
    gap: 15px;
  }
  
  /* Hide cafe title on extra small screens */
  .cafe-title span {
    display: none;
  }
  
  .cafe-title {
    display: none;
  }
  
  .logo-brand {
    justify-content: flex-start;
  }
  
  .menu-modal {
    max-width: 180px;
    padding: 12px;
  }
  
  .profile-modal {
    max-width: 220px;
    padding: 14px;
  }
  
  /* Toast Updates */
  #toastContainer {
    top: 6px;
    right: 6px;
    left: 6px;
    gap: 5px;
  }
  
  .toast {
    padding: 7px 9px;
    border-radius: 6px;
  }
  
  .toast.simple-toast {
    padding: 6px 8px;
    border-radius: 5px;
  }
  
  .toast.simple-toast .toast-message {
    font-size: 9px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .toast.simple-toast .toast-actions {
    gap: 5px;
  }
  
  .toast.simple-toast .toast-action-btn {
    padding: 2px 6px;
    font-size: 7px;
    min-height: 20px;
  }
}

/* Landscape Mode Optimization */
@media (max-height: 600px) and (orientation: landscape) {
  .admin-header {
    padding: 12px 20px;
    margin: 5px 10px 8px;
  }

  .cafe-title {
    padding: 8px 16px;
    font-size: 16px;
  }

  .cafe-logo {
    width: 40px;
    height: 40px;
  }
  
  .menu-modal {
    max-height: 90vh;
  }
  
  .profile-modal {
    max-height: 90vh;
  }

  .hero {
    padding: 30px 16px;
  }

  .hero h1 {
    font-size: 28px;
    margin-bottom: 12px;
  }

  .hero p {
    font-size: 16px;
    margin-bottom: 24px;
  }

  .hero-images {
    display: flex !important;
  }
  
  .hero-images img {
    height: 120px;
    max-width: 200px;
  }
  
  /* Show only 1 image in landscape mode for small height */
  .hero-images img:nth-child(2),
  .hero-images img:nth-child(3) {
    display: none !important;
  }
  
  .hero-images img:nth-child(1) {
    display: block !important;
  }

  .dashboard-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .product-card {
    min-height: 280px;
  }

  .product-card img {
    height: 100px;
  }

  .product-card strong {
    min-height: 30px;
    font-size: 14px;
  }

  .product-card p {
    display: none;
  }

  .quantity-selector {
    padding: 4px;
    margin: 6px 0;
  }

  .modal-box {
    max-height: 90vh;
    overflow-y: auto;
  }
  
  /* Toast Updates */
  #toastContainer {
    top: 6px;
    right: 6px;
    max-width: 320px;
    max-height: 90vh;
    overflow-y: auto;
  }
  
  .toast {
    padding: 10px 12px;
    margin-bottom: 6px;
  }
  
  .toast.simple-toast .toast-message {
    white-space: nowrap;
  }
  
  .toast.simple-toast .toast-action-btn {
    padding: 3px 10px;
    font-size: 10px;
  }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .modal-content {
    scroll-behavior: auto;
  }
  
  .toast {
    transition: opacity 0.2s ease;
  }
  
  .toast.show {
    animation: none;
    opacity: 1;
    transform: translateX(0);
  }
  
  .toast.simple-toast.show {
    animation: none;
    opacity: 1;
    transform: translateX(0);
  }
  
  .toast.hiding {
    animation: none;
    opacity: 0;
  }
  
  .toast-action-btn:hover {
    transform: none;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .admin-header {
    background: var(--light-cream);
    color: var(--text-dark);
  }

  .cafe-title {
    background: linear-gradient(135deg, var(--text-dark), var(--text-dark));
    color: var(--white);
  }

  #sidebarToggle {
    color: var(--primary-brown);
  }

  .user-greeting {
    color: var(--primary-brown);
  }
  
  /* Modal Scrollbar Dark Mode */
  .modal-content::-webkit-scrollbar-track {
    background: var(--beige);
  }
  
  .modal-content::-webkit-scrollbar-thumb {
    background: var(--accent-brown);
  }
  
  .modal-content {
    scrollbar-color: var(--accent-brown) var(--beige);
  }
  
  /* Profile Table Dark Mode */
  .profile-table {
    background: var(--off-white);
  }
  
  .profile-table tr {
    border-bottom-color: var(--border);
  }
  
  .profile-table tr:hover {
    background: rgba(111, 78, 55, 0.03);
  }
  
  .profile-table td:first-child {
    border-right-color: var(--border);
    background: rgba(111, 78, 55, 0.02);
  }
  
  /* Toast Dark Mode */
  .toast {
    background: #ffffff;
    color: #333333;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
  }
  
  .toast.simple-toast {
    background: rgba(255, 255, 255, 0.95);
    color: #333333;
  }
  
  .toast.simple-toast .toast-message {
    color: #333333;
  }
  
  .toast.simple-toast.error {
    background: rgba(255, 245, 245, 0.95);
    color: #333333;
  }
  
  .toast.simple-toast.warning {
    background: rgba(255, 250, 240, 0.95);
    color: #333333;
  }
  
  .toast.simple-toast.info {
    background: rgba(240, 247, 255, 0.95);
    color: #333333;
  }
  
  .toast.simple-toast .toast-action-btn {
    background: linear-gradient(135deg, var(--primary-brown), var(--dark-brown));
    color: white;
  }
  
  .toast.simple-toast .toast-action-btn:hover {
    background: linear-gradient(135deg, var(--accent-brown), var(--primary-brown));
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .toast.simple-toast {
    border: 1px solid currentColor;
  }
  
  .toast.simple-toast.error {
    border-left-color: #d00;
  }
  
  .toast.simple-toast.warning {
    border-left-color: #f80;
  }
  
  .toast.simple-toast.info {
    border-left-color: #06c;
  }
}

/* Print Styles */
@media print {
  #toastContainer {
    display: none !important;
  }
}
