/* ===== Shared Utility Styles — Surca Menu ===== */

/* ===== Page Transition ===== */
body {
  opacity: 0;
  transition: opacity 0.4s ease;
}
body.loaded {
  opacity: 1;
}

/* ===== Dark Mode Toggle Button ===== */
.dark-mode-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #6B7280;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1.1rem;
  position: relative;
}
.dark-mode-toggle:hover {
  background: rgba(0,0,0,0.06);
  color: #1F2937;
}
.dark-mode-toggle .icon-sun { display: none; }
.dark-mode-toggle .icon-moon { display: inline; }

/* ===== Dark Mode Theme ===== */
[data-theme="dark"] .dark-mode-toggle {
  color: #D1D5DB;
}
[data-theme="dark"] .dark-mode-toggle:hover {
  background: rgba(255,255,255,0.1);
  color: #F9FAFB;
}
[data-theme="dark"] .dark-mode-toggle .icon-sun { display: inline; }
[data-theme="dark"] .dark-mode-toggle .icon-moon { display: none; }

/* ===== Dark Mode — Dashboard ===== */
[data-theme="dark"] body,
body[data-theme="dark"] {
  background-color: #111827;
  color: #E5E7EB;
}

[data-theme="dark"] .sidebar {
  background: #0F172A;
  border-right: 1px solid rgba(255,255,255,0.06);
}

[data-theme="dark"] .sidebar-header {
  border-bottom-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] .sidebar-footer {
  border-top-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] .topbar,
[data-theme="dark"] .top-bar {
  background: #1F2937;
  border-bottom-color: rgba(255,255,255,0.08);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

[data-theme="dark"] .search-input,
[data-theme="dark"] .top-bar .search-wrapper input {
  background: #374151;
  border-color: #4B5563;
  color: #E5E7EB;
}
[data-theme="dark"] .search-input:focus,
[data-theme="dark"] .top-bar .search-wrapper input:focus {
  border-color: #6366F1;
  background: #1F2937;
}
[data-theme="dark"] .search-input::placeholder,
[data-theme="dark"] .top-bar .search-wrapper input::placeholder {
  color: #9CA3AF;
}

[data-theme="dark"] .dashboard-content,
[data-theme="dark"] .settings-content {
  background: #111827;
}

[data-theme="dark"] .page-header h1,
[data-theme="dark"] .page-title h1 {
  color: #F9FAFB;
}
[data-theme="dark"] .page-header p,
[data-theme="dark"] .page-title p {
  color: #9CA3AF;
}

[data-theme="dark"] .stat-card,
[data-theme="dark"] .card,
[data-theme="dark"] .orders-card,
[data-theme="dark"] .popular-card {
  background: #1F2937;
  border-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] .stat-value,
[data-theme="dark"] .card-header h2 {
  color: #F9FAFB;
}

[data-theme="dark"] .stat-label {
  color: #9CA3AF;
}

[data-theme="dark"] .orders-table th {
  background: #111827;
  color: #9CA3AF;
  border-bottom-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] .orders-table td {
  color: #D1D5DB;
  border-bottom-color: rgba(255,255,255,0.04);
}

[data-theme="dark"] .orders-table tbody tr:hover {
  background: rgba(255,255,255,0.03);
}

[data-theme="dark"] .order-id,
[data-theme="dark"] .order-total {
  color: #F9FAFB;
}

[data-theme="dark"] .popular-item-info h4 {
  color: #E5E7EB;
}

[data-theme="dark"] .progress-bar {
  background: #374151;
}

[data-theme="dark"] .notification-dropdown,
[data-theme="dark"] .profile-dropdown {
  background: #1F2937;
  border-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] .dropdown-header {
  border-bottom-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] .dropdown-header h4 {
  color: #F9FAFB;
}

[data-theme="dark"] .notification-content p {
  color: #D1D5DB;
}

[data-theme="dark"] .dropdown-item {
  color: #D1D5DB;
}
[data-theme="dark"] .dropdown-item:hover {
  background: rgba(255,255,255,0.06);
  color: #F9FAFB;
}

[data-theme="dark"] .profile-name {
  color: #D1D5DB;
}

[data-theme="dark"] .notification-btn,
[data-theme="dark"] .hamburger {
  color: #D1D5DB;
}
[data-theme="dark"] .notification-btn:hover,
[data-theme="dark"] .hamburger:hover {
  background: rgba(255,255,255,0.08);
  color: #F9FAFB;
}

/* ===== Dark Mode — Menu Page ===== */
[data-theme="dark"] .main-content {
  background: #111827;
}

[data-theme="dark"] .stats-row .stat-card {
  background: #1F2937;
  border-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] .stats-row .stat-number {
  color: #F9FAFB;
}

[data-theme="dark"] .stats-row .stat-label {
  color: #9CA3AF;
}

[data-theme="dark"] .category-tabs .tab {
  background: #1F2937;
  color: #D1D5DB;
  border-color: rgba(255,255,255,0.08);
}
[data-theme="dark"] .category-tabs .tab:hover {
  background: #374151;
}
[data-theme="dark"] .category-tabs .tab.active {
  background: #FF6B35;
  color: #fff;
  border-color: #FF6B35;
}

[data-theme="dark"] .menu-card {
  background: #1F2937;
  border-color: rgba(255,255,255,0.06);
}
[data-theme="dark"] .menu-card .card-name {
  color: #F9FAFB;
}
[data-theme="dark"] .menu-card .card-desc {
  color: #9CA3AF;
}

[data-theme="dark"] .modal-overlay .modal {
  background: #1F2937;
  border-color: rgba(255,255,255,0.08);
}
[data-theme="dark"] .modal h2,
[data-theme="dark"] .modal label {
  color: #E5E7EB;
}
[data-theme="dark"] .modal input,
[data-theme="dark"] .modal select,
[data-theme="dark"] .modal textarea {
  background: #374151;
  border-color: #4B5563;
  color: #E5E7EB;
}

[data-theme="dark"] .toast {
  background: #1F2937;
  color: #E5E7EB;
  border-color: rgba(255,255,255,0.1);
}

[data-theme="dark"] .empty-state h3 {
  color: #E5E7EB;
}
[data-theme="dark"] .empty-state p {
  color: #9CA3AF;
}

/* ===== Dark Mode — Settings Page ===== */
[data-theme="dark"] .main-wrapper {
  background: #111827;
}

[data-theme="dark"] .settings-tabs .settings-tab {
  background: #1F2937;
  color: #D1D5DB;
  border-color: rgba(255,255,255,0.08);
}
[data-theme="dark"] .settings-tabs .settings-tab:hover {
  background: #374151;
}
[data-theme="dark"] .settings-tabs .settings-tab.active {
  background: #FF6B35;
  color: #fff;
  border-color: #FF6B35;
}

[data-theme="dark"] .tab-panel {
  background: #1F2937;
  border-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] .panel-header h2 {
  color: #F9FAFB;
}
[data-theme="dark"] .panel-header p {
  color: #9CA3AF;
}

[data-theme="dark"] .form-section label,
[data-theme="dark"] .section-title {
  color: #E5E7EB;
}

[data-theme="dark"] .form-section input,
[data-theme="dark"] .form-section select,
[data-theme="dark"] .form-section textarea {
  background: #374151;
  border-color: #4B5563;
  color: #E5E7EB;
}

[data-theme="dark"] .upload-box {
  background: #374151;
  border-color: #4B5563;
}

[data-theme="dark"] .layout-card {
  background: #374151;
  border-color: #4B5563;
  color: #D1D5DB;
}

[data-theme="dark"] .live-preview {
  background: #0F172A;
}

[data-theme="dark"] .hours-list .day-row {
  border-color: rgba(255,255,255,0.06);
}
[data-theme="dark"] .hours-list .day-name {
  color: #E5E7EB;
}

/* ===== Dark Mode — Customer Menu ===== */
[data-theme="dark"] .hero {
  background: #0F172A;
}

[data-theme="dark"] .search-section {
  background: #111827;
}
[data-theme="dark"] .search-section .search-container {
  background: #1F2937;
  border-color: #374151;
}
[data-theme="dark"] .search-section .search-container input {
  color: #E5E7EB;
}

[data-theme="dark"] .category-nav {
  background: #111827;
  border-color: rgba(255,255,255,0.06);
}
[data-theme="dark"] .cat-tab {
  background: #1F2937;
  color: #D1D5DB;
  border-color: rgba(255,255,255,0.08);
}
[data-theme="dark"] .cat-tab:hover {
  background: #374151;
}
[data-theme="dark"] .cat-tab.active {
  background: #FF6B35;
  color: #fff;
  border-color: #FF6B35;
}

[data-theme="dark"] .menu-content {
  background: #111827;
}
[data-theme="dark"] .menu-header h2 {
  color: #F9FAFB;
}

[data-theme="dark"] .food-card {
  background: #1F2937;
  border-color: rgba(255,255,255,0.06);
}
[data-theme="dark"] .food-card .food-name {
  color: #F9FAFB;
}
[data-theme="dark"] .food-card .food-desc {
  color: #9CA3AF;
}

[data-theme="dark"] .qr-section {
  background: #0F172A;
}
[data-theme="dark"] .qr-section h2 {
  color: #F9FAFB;
}
[data-theme="dark"] .qr-section p {
  color: #9CA3AF;
}

[data-theme="dark"] .footer {
  background: #0F172A;
  border-top-color: rgba(255,255,255,0.06);
}
[data-theme="dark"] .footer-text {
  color: #9CA3AF;
}

/* ===== Dark Mode — Auth Page ===== */
[data-theme="dark"] .auth-container {
  background: #111827;
}
[data-theme="dark"] .auth-branding {
  background: linear-gradient(135deg, #1E1B4B 0%, #312E81 100%);
}
[data-theme="dark"] .auth-form-panel {
  background: #1F2937;
}
[data-theme="dark"] .form-card {
  background: #1F2937;
}
[data-theme="dark"] .form-header h2 {
  color: #F9FAFB;
}
[data-theme="dark"] .form-header p {
  color: #9CA3AF;
}
[data-theme="dark"] .input-group label {
  color: #D1D5DB;
}
[data-theme="dark"] .input-wrapper {
  background: #374151;
  border-color: #4B5563;
}
[data-theme="dark"] .input-wrapper input {
  color: #E5E7EB;
  background: transparent;
}
[data-theme="dark"] .form-switch {
  color: #9CA3AF;
}
[data-theme="dark"] .form-divider span {
  color: #6B7280;
  background: #1F2937;
}
[data-theme="dark"] .form-divider::before {
  background: #374151;
}
[data-theme="dark"] .btn-social {
  background: #374151;
  color: #D1D5DB;
  border-color: #4B5563;
}
[data-theme="dark"] .checkbox-label {
  color: #D1D5DB;
}

/* ===== Floating Dark Mode Toggle (for customer menu) ===== */
.dark-mode-fab {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1100;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: #374151;
  transition: all 0.3s ease;
}
.dark-mode-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}
[data-theme="dark"] .dark-mode-fab {
  background: rgba(31,41,55,0.9);
  color: #FBBF24;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.dark-mode-fab .icon-sun { display: none; }
.dark-mode-fab .icon-moon { display: inline; }
[data-theme="dark"] .dark-mode-fab .icon-sun { display: inline; }
[data-theme="dark"] .dark-mode-fab .icon-moon { display: none; }

/* ===== Global Toast ===== */
.global-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 14px 28px;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 10000;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.global-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.global-toast.success {
  background: #10B981;
  color: #fff;
}
.global-toast.error {
  background: #EF4444;
  color: #fff;
}
.global-toast.info {
  background: #3B82F6;
  color: #fff;
}

/* ===== Improved Button Hover Effects ===== */
.btn-add:hover,
.btn-save:hover,
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
.btn-add:active,
.btn-save:active,
.btn-primary:active {
  transform: translateY(0);
}

/* ===== Skeleton Loading ===== */
.skeleton {
  background: linear-gradient(90deg, #E5E7EB 25%, #F3F4F6 50%, #E5E7EB 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 8px;
}
[data-theme="dark"] .skeleton {
  background: linear-gradient(90deg, #374151 25%, #4B5563 50%, #374151 75%);
  background-size: 200% 100%;
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== Focus Visible ===== */
*:focus-visible {
  outline: 2px solid #6366F1;
  outline-offset: 2px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #6366F1;
  outline-offset: 2px;
}

/* ===== Active Nav Highlight ===== */
.sidebar-nav .nav-item.nav-active,
.sidebar-nav .sidebar-link.nav-active {
  background: #4F46E5;
  color: #fff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}