:root {
  --s4l-primary: #0b6b6a;
}

/* ================================
   VENDOR LAYOUT
================================ */

.vendor-layout {
  display: flex;
  min-height: 100vh;
  background: #f5f6f8;
}

/* ================================
   SIDEBAR
================================ */

.vendor-sidebar {
  width: 220px;
  background: #1f6f6a;
  color: white;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
}

.vendor-sidebar-logo {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 25px;
  opacity: 0.85;
}

.vendor-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vendor-nav a {
  color: white;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
  transition: background 0.2s;
}

.vendor-nav a:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ================================
   MAIN CONTENT
================================ */

.vendor-main {
  flex: 1;
  padding: 40px;
}

/* ================================
   PAGE CONTAINER
================================ */

.vendor-container {
  max-width: 1000px;
}

.vendor-title {
  margin-bottom: 25px;
  font-size: 26px;
}

.vendor-back-link {
  display: inline-block;
  margin-bottom: 15px;
  text-decoration: none;
  color: #444;
  font-size: 14px;
}

.vendor-back-link:hover {
  text-decoration: underline;
}

/* ================================
   DASHBOARD CARDS
================================ */

.vendor-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 35px;
}

.stat-card {
  background: white;
  border-radius: 8px;
  padding: 25px;
  border: 1px solid #e4e4e4;
  text-align: center;
}

.stat-card h3 {
  font-size: 28px;
  margin-bottom: 6px;
}

/* ================================
   GRID CARDS
================================ */

.vendor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.vendor-card {
  background: white;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #e4e4e4;
  text-decoration: none;
  color: #333;
}

.vendor-card:hover {
  border-color: #ccc;
}

/* ===============================
   Vendor Dashboard
================================ */
h2 {
  color: var(--s4l-primary);
}
.vendor-container {
  max-width: 1100px;
  margin: 80px auto;
  padding: 20px;
}

.vendor-title {
  color: var(--s4l-primary);
  text-align: center;
  font-size: 2rem;
  margin-bottom: 50px;
}

/* Grid */

.vendor-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

/* Cards */

.vendor-card {
  display: block;
  background: #ffffff;

  padding: 30px;

  border-radius: 12px;
  border: 1px solid #e6e6e6;

  text-decoration: none;
  color: #222;

  transition: all 0.25s ease;
}

/* Card hover */

.vendor-card:hover {
  transform: translateY(-5px);
  border-color: #0b6b6a;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
}

/* Title */

.vendor-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--s4l-primary);
}

/* Description */

.vendor-card p {
  color: #555;
  font-size: 0.95rem;
}

/* ======================
Vendor Stats
====================== */

.vendor-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-bottom: 50px;
}

.stat-card {
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

.stat-card h3 {
  font-size: 2rem;
  color: var(--s4l-primary);
  margin-bottom: 8px;
}

.stat-card p {
  color: #666;
  font-size: 0.9rem;
}

/* Mobile layout */
@media (max-width: 480px) {
  .vendor-stats {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: auto;
  }
}

/* ===============================
Vendor Recent Orders
=============================== */

.vendor-orders-preview {
  margin-bottom: 50px;
}

.vendor-orders-preview h2 {
  margin-bottom: 20px;
  font-size: 1.4rem;
}

.orders-list {
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  padding: 20px;
}

.order-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.order-row:last-child {
  border-bottom: none;
}

.order-id {
  font-weight: 600;
}

.order-price {
  color: var(--s4l-primary);
  font-weight: 600;
}

.orders-loading {
  color: #777;
}

/* Responsive */

@media (max-width: 480px) {
  .vendor-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================
Vendor Products
============================ */

.vendor-products-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 30px;
}

.btn-add-product,
.btn-add-product-header {
  display: inline-block;
  background: #f28c28;
  color: white;
  padding: 10px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
}

.btn-add-product:hover,
.btn-add-product-header:hover {
  background: #e17b17;
}

/* product grid */

.vendor-products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}

/* product card */

.vendor-product-card {
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  padding: 16px;
  background: #fff;
}

.vendor-product-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
}

.vendor-product-card h3 {
  font-size: 0.95rem;
  margin-bottom: 5px;
  color: var(--s4l-primary);
}

.vendor-product-card .price {
  color: var(--s4l-primary);
  font-weight: 600;
  margin-bottom: 10px;
}

.vendor-product-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.vendor-product-actions a,
.vendor-product-actions button {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  border: none;
}

.btn-edit {
  background: var(--s4l-primary);
  color: white;
}

.btn-edit:hover {
  background: #256e65;
}

.btn-delete {
  background: #d9534f;
  color: white;
}

.btn-delete:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Vendor Form */

.vendor-form {
  max-width: 600px;
  margin: auto;
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  border: 1px solid #e6e6e6;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
}

.vendor-title {
  color: var(--s4l-primary);
}

.vendor-product-card h3 {
  color: var(--s4l-primary);
}

.form-group label {
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--s4l-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

.btn-save-product {
  margin-top: 10px;
  color: var(--s4l-primary);
  color: #fff;
  border: none;
  padding: 12px 18px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.btn-save-product:hover {
  color: var(--s4l-primary);
}

/*vendor orders*/
.order-row {
  display: flex;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #e6e6e6;
  background: #fff;
  border-radius: 8px;
  margin-bottom: 8px;
}

.order-id {
  font-weight: 600;
}

.order-status {
  color: #777;
}

.order-price {
  color: #0b6b6a;
  font-weight: 600;
}

/* ===============================
   VENDOR ORDERS LIST
================================ */

.vendor-orders-list {
  max-width: 820px;
  margin: 30px auto;
  background: white;
  border-radius: 10px;
  border: 1px solid #e5e5e5;
  overflow: hidden;
}

.order-row {
  display: grid;
  grid-template-columns: 180px 160px 1fr 120px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid #e6e6e6;
}

.order-row:last-child {
  border-bottom: none;
}

/* Order ID link */

.order-id,
.order-id:visited {
  color: #6a2fd2;
  text-decoration: none;
}

.order-id:hover {
  color: #5121b5;
}

/* status */

.order-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 13px;
  background: #f5e6c9;
  color: #b67600;
  font-weight: 500;
}

/* actions */

.order-actions {
  text-align: center;
}

/* price */

.order-price {
  text-align: right;
  font-weight: 600;
  color: #0f766e;
}

/* ===============================
   VENDOR ORDER DETAILS PAGE
================================ */

.vendor-container {
  max-width: 900px;
  margin: 40px auto;
  padding: 20px;
  font-family: Arial, sans-serif;
}

.vendor-back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: #555;
  text-decoration: none;
  font-size: 14px;
}

.vendor-back-link:hover {
  text-decoration: underline;
}

.vendor-title {
  margin-bottom: 25px;
  font-size: 26px;
}

/* ===============================
   ORDER CARD
================================ */

.order-details-card {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.order-details-card h2 {
  margin-bottom: 10px;
}

/* ===============================
   STATUS
================================ */

.order-status {
  display: inline-block;
  margin: 12px 0 18px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  background: #fff4db;
  color: #b36b00;
}

/* ===============================
   ACTION BUTTONS
================================ */

.order-actions {
  margin-bottom: 25px;
}

.order-actions button {
  background: #2f6df6;
  border: none;
  padding: 7px 14px;
  border-radius: 6px;
  color: white;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.order-actions button:hover {
  background: #1e4fd0;
}

.btn-ship {
  background: #2563eb;
  color: white;
}

.btn-ship:hover {
  background: #1d4ed8;
}

.btn-deliver {
  background: #16a34a;
  color: white;
}

.btn-deliver:hover {
  background: #15803d;
}

/* ===============================
   ORDER ITEMS
================================ */

.order-items {
  border-top: 1px solid #eee;
  margin-top: 20px;
}

.order-item {
  display: grid;
  grid-template-columns: 60px 1fr 100px;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.order-item:last-child {
  border-bottom: none;
}

.order-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #eee;
}

.order-item div {
  font-size: 14px;
}

.order-item div div:first-child {
  font-weight: 600;
  margin-bottom: 4px;
}

.order-price {
  font-weight: 600;
  color: #0b7d6e;
  text-align: right;
}

/* ===============================
   TOTAL
================================ */

.order-total {
  text-align: right;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 2px solid #eee;
  font-size: 18px;
  font-weight: 600;
  text-align: right;
}

/* pop up messagee*/

.toast {
  position: fixed;
  top: 110px;
  left: 50%;
  transform: translateX(50%);
  background: #1b7f79;
  color: white;
  padding: 12px 18px;
  border-radius: 6px;
  font-size: 14px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  background: #c0392b;
}

/* Confirmation message*/

.confirm-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.confirm-box {
  background: white;
  padding: 25px 30px;
  border-radius: 8px;
  width: 320px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.confirm-actions {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 15px;
}

.btn-danger {
  background: #c0392b;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 5px;
  cursor: pointer;
}

.btn-cancel {
  background: #ddd;
  border: none;
  padding: 8px 14px;
  border-radius: 5px;
  cursor: pointer;
}

/* BACK LINK*/
.vendor-back-link {
  display: inline-block;
  margin-bottom: 25px;
  font-size: 14px;
  text-decoration: none;
  color: var(--s4l-primary);
  background: #f5f7f7;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 500;
}

.vendor-back-link:hover {
  background: #e9eeee;
}
