:root {
  --primary-color: #e63923;
  --secondary-color: #6cc24a;
  --text-color: #333333;
  --light-bg: #f8f9fa;
  --border-color: #dee2e6;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--light-bg);
  color: var(--text-color);
}

/* Header */
.navbar {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.avatar-circle {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
}

/* Sidebar */
.offcanvas {
  width: 280px !important;
}

.nav-link {
  padding: 12px 20px;
  color: var(--text-color);
  transition: all 0.3s;
  border-left: 3px solid transparent;
}

.nav-link:hover {
  background-color: rgba(230, 57, 35, 0.05);
  color: var(--primary-color);
}

.nav-link.active {
  background-color: rgba(230, 57, 35, 0.1);
  color: var(--primary-color);
  border-left-color: var(--primary-color);
  font-weight: 600;
}

/* Main Content */
.main-content {
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Cards */
.stat-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

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

.stat-card .value {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

.stat-card .label {
  font-size: 14px;
  color: #6c757d;
}

/* Buttons */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: #d32f1a;
  border-color: #d32f1a;
}

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

.btn-success:hover {
  background-color: #5ba83d;
  border-color: #5ba83d;
}

/* Badges */
.badge {
  padding: 6px 12px;
  font-weight: 500;
  border-radius: 20px;
}

.badge-placed {
  background-color: #ffc107;
  color: #000;
}
.badge-accepted {
  background-color: #17a2b8;
  color: #fff;
}
.badge-preparing {
  background-color: #fd7e14;
  color: #fff;
}
.badge-ready {
  background-color: var(--secondary-color);
  color: #fff;
}
.badge-on_the_way {
  background-color: #6f42c1;
  color: #fff;
}
.badge-delivered {
  background-color: #28a745;
  color: #fff;
}
.badge-cancelled {
  background-color: #dc3545;
  color: #fff;
}

/* Order Cards */
.order-card {
  background: white;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: all 0.3s;
}

.order-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.order-card .order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.order-card .order-id {
  font-weight: 700;
  font-size: 16px;
}

.order-card .order-time {
  font-size: 13px;
  color: #6c757d;
}

/* Product Cards */
.product-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: all 0.3s;
}

.product-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

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

.product-card .product-body {
  padding: 12px;
}

.product-card .product-name {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
}

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

/* Forms */
.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(230, 57, 35, 0.25);
}

/* Store Status Toggle */
.store-status-toggle {
  background: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.form-switch .form-check-input:checked {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
}

/* Responsive */
@media (max-width: 768px) {
  .main-content {
    padding: 12px;
  }

  .stat-card {
    margin-bottom: 12px;
  }
}

/* Loading Spinner */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
  border-width: 0.15em;
}

/* Image Upload Preview */
.image-preview {
  width: 100%;
  max-width: 300px;
  height: 200px;
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: 10px;
}

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

/* CSV Upload Area */
.csv-upload-area {
  border: 3px dashed var(--border-color);
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  background-color: #f8f9fa;
  transition: all 0.3s;
}

.csv-upload-area:hover {
  border-color: var(--primary-color);
  background-color: rgba(230, 57, 35, 0.05);
}

.csv-upload-area.dragover {
  border-color: var(--secondary-color);
  background-color: rgba(108, 194, 74, 0.1);
}

/* Vendor Chat */
.vendor-chat-card {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
  display: flex;
  flex-direction: column;
  min-height: 70vh;
}

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

.vendor-chat-body {
  flex: 1;
  padding: 1.25rem;
  background: #f5f7fb;
  overflow-y: auto;
}

.vendor-chat-message {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.85rem;
}

.vendor-chat-message.outgoing {
  align-items: flex-end;
}

.vendor-chat-message.incoming {
  align-items: flex-start;
}

.vendor-chat-bubble {
  padding: 0.65rem 0.9rem;
  border-radius: 14px;
  max-width: 75%;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.08);
  white-space: pre-wrap;
}

.vendor-chat-message.outgoing .vendor-chat-bubble {
  background: var(--primary-color);
  color: #ffffff;
}

.vendor-chat-sender {
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  opacity: 0.8;
}

.vendor-chat-meta {
  font-size: 0.72rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

.vendor-chat-input {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-color);
  background: #ffffff;
}

.vendor-chat-empty {
  text-align: center;
  color: #9ca3af;
  padding: 3rem 1rem;
}
@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(108,194,74,.7); }
  70% { box-shadow: 0 0 10px 10px rgba(108,194,74,0); }
  100% { box-shadow: 0 0 0 0 rgba(108,194,74,0); }
}
.table-success {
  animation: pulseGlow 1s ease;
}
