/*
 * Admin Mobile - Figma Design Implementation
 * Based on mobile admin designs from Figma
 */

/* Mobile Breakpoints */
@media (max-width: 768px) {
  
  /* Hide Desktop Sidebar */
  .left-side-menu {
    transform: translateX(-100%) !important;
    transition: transform 0.3s ease !important;
  }
  
  .left-side-menu.mobile-menu-open {
    transform: translateX(0) !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    background: #FFFFFF !important;
  }
  
  /* Mobile Header */
  .mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #FFFFFF;
    border-bottom: 1px solid #F1F1F1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 1000;
  }
  
  .mobile-menu-button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
  }
  
  .mobile-logo {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .mobile-logo-icon {
    width: 32px;
    height: 32px;
    background: #802FFF;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
  }
  
  .mobile-logo-text {
    font-size: 18px;
    font-weight: 700;
    color: #000;
  }
  
  /* Mobile Menu Overlay */
  .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #FFFFFF;
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .mobile-menu-overlay.active {
    transform: translateX(0);
  }
  
  .mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #F1F1F1;
  }
  
  .mobile-menu-close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #A9A9A9;
    font-size: 24px;
  }
  
  /* Mobile User Profile */
  .mobile-user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 20px;
  }
  
  .mobile-user-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #F8F6FF;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }
  
  .mobile-user-info h3 {
    font-size: 20px;
    font-weight: 700;
    color: #000;
    margin: 0 0 4px 0;
  }
  
  .mobile-user-info p {
    font-size: 14px;
    color: #5C595F;
    margin: 0;
  }
  
  /* Mobile Navigation */
  .mobile-nav {
    padding: 0 20px;
  }
  
  .mobile-nav-item {
    border-bottom: 1px solid #F8F9FA;
  }
  
  .mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    color: #000;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
  }
  
  .mobile-nav-icon {
    width: 24px;
    height: 24px;
    color: #5C595F;
  }
  
  .mobile-nav-arrow {
    width: 24px;
    height: 24px;
    color: #A9A9A9;
    transition: transform 0.2s ease;
  }
  
  .mobile-nav-item.expanded .mobile-nav-arrow {
    transform: rotate(90deg);
  }
  
  /* Mobile Submenu */
  .mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #F8F9FA;
    margin: 0 -20px;
  }
  
  .mobile-submenu.expanded {
    max-height: 500px;
  }
  
  .mobile-submenu-item {
    padding: 16px 40px;
    border-bottom: 1px solid #F1F1F1;
  }
  
  .mobile-submenu-item:last-child {
    border-bottom: none;
  }
  
  .mobile-submenu-link {
    color: #5C595F;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
  }
  
  .mobile-submenu-link:hover,
  .mobile-submenu-link.active {
    color: #802FFF;
  }
  
  /* Content Area Mobile */
  .content-page {
    margin-left: 0 !important;
    padding-top: 60px !important;
  }
  
  /* Dashboard Mobile */
  .dashboard-container {
    padding: 16px;
    margin-right: 0 !important;
  }
  
  .dashboard-greeting {
    font-size: 24px !important;
  }
  
  .dashboard-subtitle {
    font-size: 20px !important;
  }
  
  .order-status-row {
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }
  
  .order-stat-card {
    justify-content: space-between;
    width: 100%;
  }
  
  /* Stats Grid Mobile */
  .stats-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  
  .stat-card {
    height: auto !important;
    padding: 20px !important;
  }
  
  .chart-container {
    height: 250px !important;
  }
  
  /* Content Grid Mobile */
  .content-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  
  .content-card {
    height: auto !important;
    max-height: 400px;
    padding: 20px !important;
  }
  
  .inquiry-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  
  .inquiry-card {
    height: auto !important;
    padding: 20px !important;
  }
  
  /* Live Schedule Mobile */
  .live-schedule-sidebar {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    padding: 20px 16px !important;
    margin-top: 24px;
  }
  
  .live-schedule-item {
    padding: 12px 16px !important;
    gap: 16px !important;
  }
  
  .live-schedule-icon {
    width: 40px !important;
    height: 40px !important;
  }
  
  /* Tables Mobile */
  .stats-table {
    font-size: 12px !important;
  }
  
  .stats-table th,
  .stats-table td {
    padding: 8px 4px !important;
  }
  
  /* Touch Optimization */
  .side-nav-link,
  .mobile-nav-link,
  .mobile-submenu-link,
  .mobile-menu-button,
  .mobile-menu-close {
    min-height: 44px !important;
    min-width: 44px !important;
  }
}

/* Extra Small Devices */
@media (max-width: 480px) {
  .dashboard-container {
    padding: 12px;
  }
  
  .dashboard-greeting {
    font-size: 20px !important;
  }
  
  .dashboard-subtitle {
    font-size: 18px !important;
  }
  
  .order-status-row {
    padding: 12px;
  }
  
  .stat-card,
  .content-card,
  .inquiry-card {
    padding: 16px !important;
  }
  
  .chart-container {
    height: 200px !important;
  }
}

/* Mobile Menu JavaScript Support Classes */
.mobile-menu-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-menu-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* Hide desktop elements on mobile */
@media (max-width: 768px) {
  .sidebar-toggle {
    display: none !important;
  }
  
  .navbar-custom {
    display: none !important;
  }
}

/* Show mobile elements only on mobile */
@media (min-width: 769px) {
  .mobile-header,
  .mobile-menu-overlay,
  .mobile-menu-backdrop {
    display: none !important;
  }
}