/* ========================================
   SAGAR BAGS - Admin Panel Styles
   ======================================== */

/* -------------------- CSS Variables -------------------- */
:root {
  /* Primary Colors - Dark Premium */
  --primary: #0d0d0d;
  --primary-light: #1a1a1a;
  --primary-dark: #000000;

  /* Secondary Colors - Luxury Gold */
  --secondary: #c9a227;
  --secondary-light: #e8c547;
  --secondary-dark: #a68b1f;

  /* Background Colors */
  --bg-dark: #0a0a0a;
  --bg-card: #141414;
  --bg-elevated: #1f1f1f;
  --bg-sidebar: #0f0f0f;

  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --text-muted: #666666;

  /* Borders */
  --border-subtle: #2a2a2a;
  --border-gold: rgba(201, 162, 39, 0.3);

  /* Semantic Colors */
  --success: #48bb78;
  --error: #f56565;
  --warning: #ed8936;
  --info: #4299e1;

  /* Gold Glow Effects */
  --glow-gold: 0 0 20px rgba(201, 162, 39, 0.3);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.6);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition: 200ms ease;
  --transition-slow: 300ms ease;

  /* Sidebar Width */
  --sidebar-width: 260px;
  --sidebar-collapsed: 70px;
}

/* -------------------- Reset -------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: var(--text-secondary);
  background-color: var(--bg-dark);
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* -------------------- Login Page -------------------- */
.admin-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  position: relative;
}

.login-container {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo {
  margin-bottom: 1rem;
  display: inline-block;
}

.login-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.login-subtitle {
  color: var(--secondary);
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.login-form {
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.input-wrapper {
  position: relative;
}

.input-wrapper input {
  width: 100%;
  padding: 0.875rem 3rem 0.875rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: all var(--transition);
}

.input-wrapper input:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.1);
}

.input-wrapper input.error {
  border-color: var(--error);
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

.input-wrapper input::placeholder {
  color: var(--text-muted);
}

.toggle-password {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  padding: 0.25rem;
  transition: color var(--transition);
}

.toggle-password:hover {
  color: var(--secondary);
}

.error-message {
  color: var(--error);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(-10px);
  transition: all var(--transition);
}

.error-message.show {
  opacity: 1;
  transform: translateY(0);
}

.btn-login {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
  color: var(--primary-dark);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all var(--transition);
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-gold);
}

.btn-login:active {
  transform: translateY(0);
}

.login-footer {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.login-footer p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.login-footer code {
  background: var(--bg-elevated);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  color: var(--secondary);
  font-family: 'SF Mono', Monaco, monospace;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: color var(--transition);
}

.back-link:hover {
  color: var(--secondary);
}

.login-bg-pattern {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(201, 162, 39, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(201, 162, 39, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

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

/* Sidebar */
.admin-sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform var(--transition-slow);
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

/* Back to Website Button */
.back-to-site-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.5rem 0.75rem;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  transition: all var(--transition);
  text-decoration: none;
}

.back-to-site-btn:hover {
  background-color: var(--secondary);
  color: var(--primary-dark);
  border-color: var(--secondary);
}

.back-to-site-btn svg {
  width: 16px;
  height: 16px;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-logo svg {
  flex-shrink: 0;
}

.sidebar-logo-text h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.sidebar-logo-text span {
  font-size: 0.75rem;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 1.5rem;
}

.nav-section-title {
  padding: 0.5rem 1.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: var(--text-secondary);
  transition: all var(--transition);
  position: relative;
  cursor: pointer;
}

.nav-item:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.nav-item.active {
  color: var(--secondary);
  background: rgba(201, 162, 39, 0.1);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--secondary);
}

.nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-item span {
  font-size: 0.9375rem;
  font-weight: 500;
}

.nav-badge {
  margin-left: auto;
  background: var(--error);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

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

.logout-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  border-radius: 8px;
  transition: all var(--transition);
}

.logout-btn:hover {
  background: rgba(245, 101, 101, 0.1);
  color: var(--error);
}

/* Main Content */
.admin-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top Header */
.admin-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

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

.mobile-menu-btn {
  display: none;
  padding: 0.5rem;
  color: var(--text-secondary);
  border-radius: 8px;
  transition: all var(--transition);
}

.mobile-menu-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.page-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

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

.header-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: all var(--transition);
}

.header-btn:hover {
  border-color: var(--secondary);
  color: var(--secondary);
}

/* Content Area */
.admin-content {
  flex: 1;
  padding: 1.5rem;
}

/* -------------------- Dashboard Stats -------------------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all var(--transition);
}

.stat-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-2px);
}

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(201, 162, 39, 0.1);
  color: var(--secondary);
}

.stat-change {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 20px;
}

.stat-change.positive {
  background: rgba(72, 187, 120, 0.1);
  color: var(--success);
}

.stat-change.negative {
  background: rgba(245, 101, 101, 0.1);
  color: var(--error);
}

.stat-value {
  font-family: 'Poppins', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

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

/* -------------------- Cards & Panels -------------------- */
.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.card-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
}

/* -------------------- Tables -------------------- */
.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 1rem 1.5rem;
  text-align: left;
}

.admin-table th {
  background: var(--bg-elevated);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-subtle);
}

.admin-table td {
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.admin-table tbody tr {
  transition: background var(--transition);
}

.admin-table tbody tr:hover {
  background: var(--bg-elevated);
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.table-image {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg-elevated);
}

.table-actions {
  display: flex;
  gap: 0.5rem;
}

.action-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--text-muted);
  transition: all var(--transition);
}

.action-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.action-btn.edit:hover {
  color: var(--info);
  background: rgba(66, 153, 225, 0.1);
}

.action-btn.delete:hover {
  color: var(--error);
  background: rgba(245, 101, 101, 0.1);
}

/* -------------------- Forms -------------------- */
.admin-form {
  max-width: 800px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

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

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.form-group label .required {
  color: var(--error);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.9375rem;
  transition: all var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-help,
.form-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Color Selector */
.color-selector {
  margin-top: 0.5rem;
}

.color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1.25rem;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e5e5e5;
}

.color-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem;
  background: #f8f8f8;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--transition);
  min-width: 75px;
}

.color-option:hover {
  border-color: #999;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  background: #fff;
}

.color-option.selected,
.color-option:has(input:checked) {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.25);
  background: #fffdf5;
}

.color-option input[type="checkbox"] {
  display: none;
}

.color-swatch {
  display: block;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 3px solid rgba(0,0,0,0.08);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.08), 0 3px 8px rgba(0,0,0,0.12);
  position: relative;
}

.color-option:has(input:checked) .color-swatch::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 20px;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Light colors (white, yellow, beige) need dark checkmark */
.color-option:has(input[value="white"]:checked) .color-swatch::after,
.color-option:has(input[value="yellow"]:checked) .color-swatch::after,
.color-option:has(input[value="beige"]:checked) .color-swatch::after {
  color: #333;
  text-shadow: none;
}

.color-name {
  font-size: 0.75rem;
  color: #444;
  text-align: center;
  font-weight: 500;
}

/* Custom Color Input */
.custom-color-section {
  margin-top: 1.25rem;
  padding: 1.25rem;
  background: var(--bg-elevated);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
}

.custom-color-section > label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  font-size: 0.875rem;
}

.custom-color-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.custom-color-inputs {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex: 1;
  min-width: 300px;
  flex-wrap: wrap;
}

.custom-color-inputs input[type="color"] {
  width: 50px;
  height: 44px;
  border: 2px solid var(--border-subtle);
  border-radius: 8px;
  cursor: pointer;
  background: var(--bg-elevated);
  padding: 2px;
  flex-shrink: 0;
}

.custom-color-inputs input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.custom-color-inputs input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 4px;
}

.custom-color-inputs input[type="text"] {
  flex: 1;
  min-width: 100px;
}

.hex-input-group {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
}

.hex-input-group span {
  color: var(--secondary);
  font-weight: 600;
  font-size: 1rem;
}

.hex-input-group input {
  width: 80px !important;
  flex: none !important;
  font-family: 'SF Mono', Monaco, monospace;
  padding: 0.25rem 0.5rem !important;
  background: transparent !important;
  border: none !important;
  color: var(--text-primary);
  font-size: 0.9rem;
  text-transform: uppercase;
}

.hex-input-group input:focus {
  outline: none;
  box-shadow: none !important;
}

.hex-input-group input::placeholder {
  color: var(--text-muted);
  text-transform: uppercase;
}

.custom-color-row .btn {
  height: 44px;
  white-space: nowrap;
}

.added-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.added-color-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  font-size: 0.8125rem;
  color: var(--text-primary);
}

.added-color-tag .color-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.added-color-tag .remove-color {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  font-size: 1.25rem;
  line-height: 1;
  margin-left: 0.25rem;
}

.added-color-tag .remove-color:hover {
  color: var(--error);
}

/* Image Upload */
.image-upload-area {
  border: 2px dashed var(--border-subtle);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}

.image-upload-area:hover {
  border-color: var(--secondary);
  background: rgba(201, 162, 39, 0.05);
}

.image-upload-area.dragover {
  border-color: var(--secondary);
  background: rgba(201, 162, 39, 0.1);
}

.upload-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  color: var(--text-muted);
}

.upload-text {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.upload-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.image-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-elevated);
}

.image-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  background: var(--error);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--transition);
}

.image-preview-item:hover .image-preview-remove {
  opacity: 1;
}

/* Category Image Upload */
.category-image-upload {
  border: 2px dashed var(--border-subtle);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  min-height: 160px;
  max-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(30, 30, 35, 0.5) 0%, rgba(40, 40, 48, 0.3) 100%);
}

.category-image-upload:hover {
  border-color: var(--secondary);
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.08) 0%, rgba(201, 162, 39, 0.03) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.category-image-upload.dragover {
  border-color: var(--secondary);
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.15) 0%, rgba(201, 162, 39, 0.05) 100%);
  transform: scale(1.02);
}

.category-image-upload .upload-placeholder {
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.category-image-upload .upload-placeholder .upload-icon-wrapper {
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary) 0%, rgba(201, 162, 39, 0.7) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  box-shadow: 0 4px 15px rgba(201, 162, 39, 0.3);
}

.category-image-upload .upload-placeholder .upload-icon-wrapper svg {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px;
  max-width: 24px;
  color: var(--bg-primary);
  stroke: var(--bg-primary);
}

.category-image-upload .upload-placeholder p {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.category-image-upload .upload-placeholder p strong {
  color: var(--secondary);
}

.category-image-upload .upload-placeholder span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.category-image-preview {
  position: relative;
  width: 100%;
  max-width: 200px;
}

.category-image-preview img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.category-image-preview .remove-image-btn {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border: 3px solid var(--bg-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.4);
}

.category-image-preview .remove-image-btn:hover {
  background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
  transform: scale(1.15);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.5);
}

.category-image-preview .image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  border-radius: 0 0 12px 12px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.category-image-preview:hover .image-overlay {
  opacity: 1;
}

.category-image-preview .image-overlay span {
  color: white;
  font-size: 0.8125rem;
  font-weight: 500;
}

/* -------------------- Buttons -------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all var(--transition);
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
  color: var(--primary-dark);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-gold);
}

.btn-secondary {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

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

.btn-danger {
  background: rgba(245, 101, 101, 0.1);
  color: var(--error);
}

.btn-danger:hover {
  background: var(--error);
  color: white;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* -------------------- Badges -------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 20px;
}

.badge-gold {
  background: rgba(201, 162, 39, 0.1);
  color: var(--secondary);
}

.badge-success {
  background: rgba(72, 187, 120, 0.1);
  color: var(--success);
}

.badge-warning {
  background: rgba(237, 137, 54, 0.1);
  color: var(--warning);
}

.badge-error {
  background: rgba(245, 101, 101, 0.1);
  color: var(--error);
}

.badge-info {
  background: rgba(66, 153, 225, 0.1);
  color: var(--info);
}

/* -------------------- Search & Filters -------------------- */
.search-filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.9375rem;
}

.search-box input:focus {
  outline: none;
  border-color: var(--secondary);
}

.search-box svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
}

.filter-select {
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}

.filter-select:focus {
  outline: none;
  border-color: var(--secondary);
}

/* -------------------- Modal -------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow: hidden;
  transform: translateY(20px) scale(0.95);
  transition: all var(--transition);
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

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

.modal-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--text-muted);
  transition: all var(--transition);
}

.modal-close:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  max-height: calc(90vh - 140px);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
}

/* -------------------- Empty State -------------------- */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-state svg {
  width: 80px;
  height: 80px;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.empty-state h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* -------------------- Inquiry Cards -------------------- */
.inquiry-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: all var(--transition);
}

.inquiry-card:hover {
  border-color: var(--border-gold);
}

.inquiry-card.unread {
  border-left: 3px solid var(--secondary);
}

.inquiry-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.inquiry-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.inquiry-date {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.inquiry-customer {
  margin-bottom: 0.75rem;
}

.inquiry-customer h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.inquiry-customer p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.inquiry-products {
  background: var(--bg-elevated);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.inquiry-products h5 {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.inquiry-products ul {
  list-style: disc;
  padding-left: 1.25rem;
}

.inquiry-products li {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.inquiry-message {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-style: italic;
}

.inquiry-deadline {
  background: rgba(201, 162, 39, 0.1);
  border: 1px solid rgba(201, 162, 39, 0.3);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.inquiry-deadline h5 {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.inquiry-deadline p {
  margin: 0;
  font-weight: 600;
}

.inquiry-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* -------------------- Toast Notifications -------------------- */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1100;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin-top: 0.75rem;
  box-shadow: var(--shadow-lg);
  transform: translateX(120%);
  transition: transform var(--transition-slow);
}

.toast.show {
  transform: translateX(0);
}

.toast-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--error); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.info .toast-icon { color: var(--info); }

.toast-message {
  font-size: 0.9375rem;
  color: var(--text-primary);
}

/* -------------------- Sections -------------------- */
.admin-section {
  display: none;
}

.admin-section.active {
  display: block;
}

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

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

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

  .admin-main {
    margin-left: 0;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    z-index: 90;
    transition: all var(--transition);
  }

  .sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
  }

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

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .admin-header {
    padding: 1rem;
  }

  .admin-content {
    padding: 1rem;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .search-filters {
    flex-direction: column;
  }

  .search-box {
    width: 100%;
  }

  .admin-table {
    display: block;
    overflow-x: auto;
  }

  .inquiry-actions {
    flex-direction: column;
  }

  .inquiry-actions .btn {
    width: 100%;
  }

  .modal {
    margin: 1rem;
    max-height: calc(100vh - 2rem);
  }

  .toast-container {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }

  .toast {
    transform: translateY(120%);
  }

  .toast.show {
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 1.5rem;
  }

  .login-title {
    font-size: 1.5rem;
  }

  .page-title {
    font-size: 1rem;
  }

  .header-btn span {
    display: none;
  }
}
