/* SHOXA Admin Dashboard Styles */
:root {
  --primary: #C67C43;
  --primary-light: #E5A067;
  --primary-dark: #A05A2C;
  --background: #FDF6E3;
  --surface: #FFFFFF;
  --text: #333333;
  --text-light: #666666;
  --text-muted: #999999;
  --border: #E5E5E5;
  --success: #4CAF50;
  --error: #F44336;
  --warning: #FF9800;
  --sidebar-width: 260px;
  --header-height: 60px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.5;
}

/* Utilities */
.hidden {
  display: none !important;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-ghost {
  background: transparent;
  color: var(--text-light);
}

.btn-ghost:hover {
  background: rgba(0, 0, 0, 0.05);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--text-light);
}

.btn-icon:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

/* Auth Pages */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, #FDF6E3 0%, #F5D6BA 50%, #E8C4A0 100%);
  position: relative;
  overflow: hidden;
}

.auth-container::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 80%;
  height: 150%;
  background: radial-gradient(circle, rgba(198, 124, 67, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.auth-container::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -20%;
  width: 60%;
  height: 100%;
  background: radial-gradient(circle, rgba(198, 124, 67, 0.1) 0%, transparent 60%);
  pointer-events: none;
}

.auth-page {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
}

.auth-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 48px 40px;
  box-shadow:
    0 25px 50px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.auth-logo {
  text-align: center;
  margin-bottom: 40px;
}

.logo-icon {
  width: 100px;
  height: 100px;
  display: block;
  margin: 0 auto 20px auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(198, 124, 67, 0.25));
  animation: float 3s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-8px);
  }
}

.auth-logo h1 {
  font-size: 32px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.auth-logo p {
  color: var(--text-muted);
  font-size: 15px;
  margin-top: 6px;
  font-weight: 500;
}

.auth-form .form-group {
  margin-bottom: 20px;
}

.auth-form .form-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.auth-form .form-group input,
.auth-form .form-group select {
  padding: 16px 18px;
  border: 2px solid transparent;
  background: rgba(253, 246, 227, 0.6);
  border-radius: 14px;
  font-size: 15px;
  transition: all 0.3s ease;
}

.auth-form .form-group input:focus,
.auth-form .form-group select:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 4px rgba(198, 124, 67, 0.15);
}

.auth-form .form-group input::placeholder {
  color: #B8A89C;
}

.auth-form .btn-primary {
  padding: 16px 24px;
  font-size: 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  box-shadow: 0 8px 20px rgba(198, 124, 67, 0.35);
  margin-top: 8px;
  transition: all 0.3s ease;
}

.auth-form .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(198, 124, 67, 0.45);
}

.auth-switch {
  text-align: center;
  margin-top: 28px;
  font-size: 14px;
  color: var(--text-light);
}

.auth-switch a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
  transition: all 0.2s;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* Dashboard Layout */
.dashboard-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform 0.3s;
}

.sidebar-header {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.sidebar-header .logo-icon {
  width: 40px;
  height: 40px;
  margin: 0;
}

.sidebar-header .logo-text {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
}

.sidebar-nav {
  flex: 1;
  padding: 16px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
  margin-bottom: 4px;
}

.nav-item i {
  font-size: 20px;
}

.nav-item:hover {
  background: rgba(198, 124, 67, 0.1);
  color: var(--primary);
}

.nav-item.active {
  background: var(--primary);
  color: white;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

/* Mobile Header */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  z-index: 50;
}

.menu-toggle {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
}

.mobile-header .logo-text {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 32px;
  min-height: 100vh;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 28px;
  font-weight: 700;
}

.greeting {
  color: var(--text-muted);
  font-size: 14px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.stat-value {
  display: block;
  font-size: 28px;
  font-weight: 700;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

/* Cards */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.settings-grid .full-width {
  grid-column: 1 / -1;
}

/* Quick Actions */
.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Image Upload */
.image-upload-group {
  display: flex;
  gap: 16px;
}

.image-upload {
  width: 120px;
  height: 120px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.image-upload.banner {
  flex: 1;
  height: 120px;
}

.upload-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
}

.upload-placeholder i {
  font-size: 28px;
}

.upload-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

/* Map */
.map-container {
  height: 300px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-top: 12px;
}

/* Hours Grid */
.hours-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hour-row {
  display: grid;
  grid-template-columns: 100px 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.hour-row .day {
  font-weight: 500;
  font-size: 14px;
}

.hour-row span:not(.day) {
  text-align: center;
  color: var(--text-muted);
}

.hour-row input {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
}

/* Products Grid */
.products-toolbar {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.search-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.product-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.product-card .product-info {
  padding: 16px;
}

.product-card .product-name {
  font-weight: 600;
  margin-bottom: 8px;
}

.product-card .product-price {
  color: var(--primary);
  font-weight: 700;
}

.product-card .product-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* Posts Grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.post-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.post-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.post-card .post-content {
  padding: 16px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
}

.empty-state p {
  margin-bottom: 16px;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}

.modal-content {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 18px;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  z-index: 2000;
  animation: slideUp 0.3s;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* Loading */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive */
@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-header {
    display: flex;
  }

  .main-content {
    margin-left: 0;
    padding: 12px;
    padding-top: calc(var(--header-height) + 12px);
  }

  /* Compact stats row for mobile */
  .stats-grid {
    display: flex;
    justify-content: center;
    overflow-x: auto;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 4px;
  }

  .stat-card {
    flex: 0 0 auto;
    min-width: 80px;
    padding: 12px 14px;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
  }

  .stat-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .stat-icon i {
    font-size: 16px;
  }

  .stat-value {
    font-size: 20px;
  }

  .stat-label {
    font-size: 11px;
  }

  .dashboard-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .image-upload-group {
    flex-direction: column;
  }

  .image-upload,
  .image-upload.banner {
    width: 100%;
  }

  .page-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .page-header h1 {
    font-size: 20px;
  }

  .greeting {
    display: none;
  }

  .products-toolbar {
    flex-direction: column;
  }

  .card {
    padding: 16px;
  }

  .card h3 {
    font-size: 15px;
    margin-bottom: 12px;
  }
}

@media (max-width: 480px) {
  .stat-card {
    min-width: 70px;
    padding: 10px 12px;
  }

  .stat-value {
    font-size: 18px;
  }

  .stat-label {
    font-size: 10px;
  }

  .auth-card {
    padding: 24px;
  }
}