:root {
  --primary: #2C3E50;
  --secondary: #E74C3C;
  --bg: #F8F9FA;
  --surface: #FFFFFF;
  --text: #333333;
  --text-muted: #6C757D;
  --border: #DEE2E6;
  --sidebar-width: 260px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 14px; line-height: 1.6; color: var(--text); background: var(--bg); }
.admin-layout { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-width); background: var(--primary); color: #fff; position: fixed; height: 100vh; overflow-y: auto; z-index: 100; }
.sidebar-header { padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; gap: 10px; }
.sidebar-nav { padding: 10px 0; }
.sidebar-nav .nav-link { display: flex; align-items: center; gap: 10px; padding: 12px 20px; color: rgba(255,255,255,0.8); text-decoration: none; transition: background 0.2s; }
.sidebar-nav .nav-link:hover, .sidebar-nav .nav-link.active { background: rgba(255,255,255,0.1); color: #fff; }
.sidebar-nav hr { border: none; border-top: 1px solid rgba(255,255,255,0.1); margin: 8px 0; }
.main-content { margin-left: var(--sidebar-width); flex: 1; padding: 30px; min-height: 100vh; }
.content-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.content-header h1 { font-size: 24px; font-weight: 600; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stat-card { background: var(--surface); border-radius: 8px; padding: 20px; display: flex; align-items: center; gap: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.stat-icon { width: 48px; height: 48px; border-radius: 50%; background: var(--secondary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.stat-info h3 { font-size: 24px; font-weight: 700; margin: 0; }
.stat-info p { color: var(--text-muted); font-size: 13px; margin: 0; }
.section { background: var(--surface); border-radius: 8px; padding: 24px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.section h2 { font-size: 18px; margin-bottom: 16px; }
.quick-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.table-responsive { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px; text-align: left; border-bottom: 1px solid var(--border); }
.table th { font-weight: 600; color: var(--text-muted); font-size: 13px; text-transform: uppercase; }
.deployment-card { border: 1px solid var(--border); border-radius: 8px; padding: 16px; display: flex; justify-content: space-between; align-items: center; }
.deploy-info .badge { display: inline-block; padding: 4px 10px; border-radius: 4px; font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.badge.bg-success { background: var(--success); color: #fff; }
.badge.bg-secondary { background: var(--text-muted); color: #fff; }
.deploy-actions { display: flex; gap: 8px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.product-card { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; cursor: pointer; transition: box-shadow 0.2s; }
.product-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.product-card-img { width: 100%; height: 150px; object-fit: cover; }
.product-card-body { padding: 12px; }
.product-card-body h4 { font-size: 14px; margin: 0 0 4px; }
.product-card-body p { font-size: 16px; font-weight: 600; color: var(--secondary); margin: 0; }
.product-card-body small { color: var(--text-muted); }
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 2000; align-items: center; justify-content: center; }
.modal-overlay.show { display: flex; }
.modal { display: block; background: var(--surface); border-radius: 8px; width: 100%; max-width: 600px; max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-header h3 { font-size: 18px; margin: 0; }
.modal-body { padding: 20px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 20px; border-top: 1px solid var(--border); }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 500; margin-bottom: 4px; font-size: 14px; }
.form-control { width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: 4px; font-size: 14px; }
.form-control:focus { outline: none; border-color: var(--primary); }
textarea.form-control { resize: vertical; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 4px; font-size: 14px; font-weight: 500; cursor: pointer; border: none; text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: #1a252f; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { background: var(--bg); }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn-block { display: flex; width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.image-upload-area { border: 2px dashed var(--border); border-radius: 8px; padding: 40px; text-align: center; cursor: pointer; transition: border-color 0.2s; }
.image-upload-area:hover { border-color: var(--primary); }
.image-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 16px; }
.image-preview-item { position: relative; border-radius: 4px; overflow: hidden; aspect-ratio: 1; }
.image-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.remove-btn { position: absolute; top: 4px; right: 4px; background: rgba(220, 53, 69, 0.9); color: #fff; border: none; width: 24px; height: 24px; border-radius: 50%; cursor: pointer; font-size: 16px; line-height: 1; }
.step-indicator { display: flex; gap: 20px; margin-bottom: 20px; }
.step { padding: 8px 16px; border-radius: 20px; font-size: 13px; background: var(--bg); color: var(--text-muted); }
.step.active { background: var(--primary); color: #fff; }
.form-step { margin-bottom: 16px; }
.ai-toggle { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.ai-generated { background: #e8f5e9; border-left: 3px solid var(--success); padding: 12px; border-radius: 4px; margin-top: 10px; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.admin-login-overlay { display: flex; position: fixed; inset: 0; background: var(--bg); z-index: 9999; align-items: center; justify-content: center; }
.admin-login-box { background: var(--surface); padding: 2rem; border-radius: 8px; width: 100%; max-width: 360px; box-shadow: 0 2px 12px rgba(0,0,0,0.1); }
.toast-notification { position: fixed; top: 20px; right: 20px; padding: 12px 20px; border-radius: 4px; color: #fff; font-weight: 500; z-index: 9999; animation: slideIn 0.3s ease; }
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-info { background: var(--info); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.filters { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.filters .form-control { max-width: 250px; }
.text-center { text-align: center; }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.mb-5 { margin-bottom: 32px; }
.p-4 { padding: 24px; }
.d-none { display: none !important; }

/* Custom Confirm/Alert Dialog - replaces native browser dialogs */
.custom-dialog-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 10000; align-items: center; justify-content: center; }
.custom-dialog-overlay.show { display: flex; }
.custom-dialog { background: var(--surface); border-radius: 12px; width: 100%; max-width: 420px; box-shadow: 0 8px 32px rgba(0,0,0,0.25); animation: dialogIn 0.2s ease; overflow: hidden; }
@keyframes dialogIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.custom-dialog-header { padding: 20px 24px 0; }
.custom-dialog-header h4 { font-size: 18px; font-weight: 600; margin: 0; }
.custom-dialog-body { padding: 12px 24px 24px; color: var(--text); font-size: 15px; line-height: 1.5; }
.custom-dialog-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px; background: var(--bg); border-top: 1px solid var(--border); }
.custom-dialog-footer .btn { min-width: 80px; justify-content: center; }
.btn-danger { background: #dc3545; color: #fff; }
.btn-danger:hover { background: #c82333; }
