:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #eef2ff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --primary:#2B3F34;
  --accent: #f97316;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, rgba(15, 118, 110, 0.12), transparent 30%),
    radial-gradient(circle at bottom right, rgba(249, 115, 22, 0.12), transparent 24%),
    var(--bg);
  color: var(--text);
}

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

.hidden {
  display: none !important;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  padding: 24px;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 36px;
  box-shadow: var(--shadow);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}

.auth-brand h1 {
  margin: 0;
  font-size: 1.9rem;
}

.auth-brand p {
  margin: 6px 0 0;
  color: var(--muted);
}

.auth-form {
  display: grid;
  gap: 18px;
}

.auth-form label {
  display: grid;
  gap: 8px;
  font-weight: 600;
  color: var(--text);
}

.auth-form input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  font-size: 1rem;
}

.secondary-button {
  border: 1px solid rgba(15, 118, 110, 0.18);
  background: white;
  color: var(--primary);
  padding: 12px 20px;
  border-radius: 18px;
  cursor: pointer;
}

.alert {
  margin: 0;
  color: #b91c1c;
  font-size: 0.95rem;
}

.dashboard-header {
  align-items: flex-start;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-tag {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--surface-alt);
  color: var(--text);
  font-size: 0.95rem;
}

.sidebar {
  background: linear-gradient(180deg, #2B3F34, #2B3F34);
  color: white;
  border-radius: 28px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: calc(100vh - 48px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
}

.brand-mark {
  width: 50px;
  height: 50px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  font-size: 1.45rem;
  font-weight: 700;
}

.brand h1 {
  margin: 0;
  font-size: 1.55rem;
}

.brand p {
  margin: 4px 0 0;
  color: #d1fae5;
}

.nav-links {
  display: grid;
  gap: 10px;
}

.nav-links a {
  display: block;
  padding: 14px 18px;
  border-radius: 16px;
  color: #d1fae5;
  font-weight: 500;
  transition: background 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.sidebar-cta {
  margin-top: 32px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  padding: 20px;
}

.sidebar-cta p {
  margin: 0 0 16px;
  color: #d1fae5;
  line-height: 1.6;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 16px;
  background: #ffffff;
  color: #0f766e;
  border-radius: 14px;
  font-weight: 700;
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.page-header h2 {
  margin: 0;
  font-size: clamp(2rem, 2.5vw, 2.6rem);
}

.primary-button {
  border: none;
  background: var(--accent);
  color: white;
  padding: 14px 22px;
  border-radius: 16px;
  font-weight: 700;
  cursor: pointer;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.card-highlight {
  background: linear-gradient(135deg, #0f766e, #10b981);
  color: white;
}

.card p {
  margin: 0 0 10px;
  color: var(--muted);
}

.card h3 {
  margin: 0;
  font-size: 1.85rem;
}

.card span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
}

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

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.panel-large {
  min-height: 360px;
}

.panel-small {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.panel-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.panel-header h3 {
  margin: 0;
  font-size: 1.15rem;
}

.panel-header span,
.panel-header a {
  color: var(--muted);
  font-size: 0.95rem;
}

.product-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.product-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--surface-alt);
  color: var(--text);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: #f8fafc;
}

th,
td {
  text-align: left;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

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

@media (max-width: 1180px) {
  .dashboard-shell {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .sidebar {
    min-height: auto;
    padding: 22px;
  }

  .dashboard-shell {
    padding: 16px;
  }

  .page-header,
  .panel-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }


}



/* =========================
   ADD PRODUCT FORM
========================= */

#add-product {
  margin-top: 30px;
}

#add-product form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #1f2937;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px;
  border: 1px solid #dcdcdc;
  border-radius: 12px;
  font-size: 15px;
  outline: none;
  transition: all 0.3s ease;
  background: #fff;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: #938958;
  box-shadow: 0 0 0 3px rgba(147, 137, 88, 0.15);
}

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

.form-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

#images {
  padding: 12px;
  background: #f8f6ef;
  border: 2px dashed #938958;
  cursor: pointer;
}

.primary-button {
  background: #938958;
  color: #fff;
  border: none;
  padding: 14px 22px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: 0.3s;
}

.primary-button:hover {
  background: #7d7449;
}

/* =========================
   PRODUCT TABLE
========================= */

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

table th {
  background: #f8f6ef;
  color: #938958;
  font-weight: 700;
  padding: 14px;
  text-align: left;
}

table td {
  padding: 14px;
  border-bottom: 1px solid #eee;
}

table tr:hover {
  background: #fafafa;
}

.delete-btn {
  background: #dc2626;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.delete-btn:hover {
  background: #b91c1c;
  transform: scale(1.05);
}

.delete-btn:active {
  transform: scale(0.95);
}

.product-thumb {
  width: 55px;
  height: 55px;
  object-fit: cover;
  border-radius: 10px;
}

/* =========================
   ORDER STATUS
========================= */

.status-pending {
  color: #f59e0b;
  font-weight: 600;
}

.status-shipped {
  color: #3b82f6;
  font-weight: 600;
}

.status-delivered {
  color: #10b981;
  font-weight: 600;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 992px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .panel {
    padding: 20px;
  }

  table {
    min-width: 700px;
  }

  .primary-button {
    width: 100%;
  }
}
