/* DevPitra — shared components for booking, catalog, dashboards.
   Loaded alongside style.css; uses the same brand palette
   (gold #FDB813, maroon #6E1E1E, cream #FDF6E9). */

.dp-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 64px;
  box-sizing: border-box;
}

.dp-section-header {
  text-align: center;
  margin-bottom: 32px;
}
.dp-section-header h1 {
  color: #6E1E1E;
  margin: 0 0 8px;
  font-size: clamp(24px, 4vw, 34px);
}
.dp-section-header p {
  color: #555;
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ---- Filters / toolbar ---- */
.dp-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.dp-toolbar input, .dp-toolbar select {
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  min-width: 180px;
}

/* ---- Buttons ---- */
.dp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 20px;
  border-radius: 8px;
  border: none;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: opacity .15s, transform .1s;
  white-space: nowrap;
}
.dp-btn:active { transform: scale(0.98); }
.dp-btn:disabled { opacity: .55; cursor: not-allowed; }
.dp-btn-primary { background: #6E1E1E; color: #FDF6E9; }
.dp-btn-primary:hover { opacity: .9; }
.dp-btn-gold { background: #FDB813; color: #3a2400; }
.dp-btn-gold:hover { opacity: .9; }
.dp-btn-outline { background: transparent; color: #6E1E1E; border: 1.5px solid #6E1E1E; }
.dp-btn-outline:hover { background: #6E1E1E; color: #fff; }
.dp-btn-danger { background: #c0392b; color: #fff; }
.dp-btn-danger:hover { opacity: .9; }
.dp-btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 6px; }

/* ---- Cards grid ---- */
.dp-grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.dp-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #eee;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.dp-card-media {
  height: 160px;
  background: linear-gradient(135deg, #FDF6E9, #f3e3c3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  color: #6E1E1E;
  overflow: hidden;
}
.dp-card-media img { width: 100%; height: 100%; object-fit: cover; }
.dp-card-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.dp-card-title { font-size: 17px; font-weight: 800; color: #6E1E1E; margin: 0; }
.dp-card-sub { font-size: 13px; color: #888; margin: 0; }
.dp-card-desc { font-size: 13.5px; color: #555; line-height: 1.5; flex: 1; }
.dp-card-price { font-size: 18px; font-weight: 800; color: #6E1E1E; }
.dp-card-footer { padding: 14px 18px; border-top: 1px solid #f2f2f2; display: flex; gap: 8px; }
.dp-pill-row { display: flex; flex-wrap: wrap; gap: 6px; }
.dp-pill { background: #FDF6E9; color: #6E1E1E; border-radius: 999px; padding: 3px 10px; font-size: 11.5px; font-weight: 700; }

.dp-empty-state {
  text-align: center;
  padding: 48px 20px;
  color: #888;
  background: #fbfaf8;
  border-radius: 14px;
  border: 1px dashed #ddd;
}

/* ---- Badges (status) ---- */
.dp-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: capitalize;
}
.dp-badge-pending, .dp-badge-out_of_stock { background: #fff3cd; color: #8a6400; }
.dp-badge-approved, .dp-badge-confirmed, .dp-badge-active, .dp-badge-in_stock, .dp-badge-delivered, .dp-badge-completed { background: #d4edda; color: #1e7e34; }
.dp-badge-rejected, .dp-badge-cancelled, .dp-badge-suspended { background: #f8d7da; color: #a02734; }
.dp-badge-shipped, .dp-badge-customer { background: #d6e4ff; color: #22458a; }
.dp-badge-admin { background: #6E1E1E; color: #FDF6E9; }
.dp-badge-pandit { background: #FDB813; color: #3a2400; }

/* ---- Modal ---- */
.dp-modal-overlay {
  position: fixed; inset: 0; background: rgba(20,10,5,0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 1000;
}
.dp-modal-overlay[hidden] { display: none; }
.dp-modal {
  background: #fff; border-radius: 16px; max-width: 560px; width: 100%;
  max-height: 90vh; overflow-y: auto; padding: 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.dp-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.dp-modal-head h2 { margin: 0; color: #6E1E1E; font-size: 20px; }
.dp-modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: #888; line-height: 1; }
.dp-form-field { margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.dp-form-field label { font-size: 13px; font-weight: 700; color: #444; }
.dp-form-field input, .dp-form-field select, .dp-form-field textarea {
  padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; font-family: inherit;
}
.dp-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dp-form-more-langs { margin-bottom: 14px; border: 1px solid #eee; border-radius: 8px; padding: 4px 12px; }
.dp-form-more-langs summary { padding: 8px 0; font-size: 13px; font-weight: 700; color: #6E1E1E; cursor: pointer; }
.dp-form-more-langs[open] summary { margin-bottom: 4px; }
.dp-form-more-langs .dp-form-field:last-child { margin-bottom: 12px; }
.dp-form-msg { font-size: 13.5px; margin-top: 10px; }
.dp-form-msg.is-error { color: #c0392b; }
.dp-form-msg.is-success { color: #1e7e34; }

/* ---- Cart ---- */
.dp-cart-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 900;
  background: #6E1E1E; color: #FDF6E9; border-radius: 999px;
  padding: 14px 22px; box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  display: flex; align-items: center; gap: 8px; font-weight: 800; border: none; cursor: pointer;
}
.dp-cart-fab .dp-cart-count { background: #FDB813; color: #3a2400; border-radius: 999px; padding: 2px 8px; font-size: 12px; }
.dp-cart-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.dp-cart-item-name { font-weight: 700; font-size: 14px; color: #333; }
.dp-qty-control { display: flex; align-items: center; gap: 8px; }
.dp-qty-control button { width: 26px; height: 26px; border-radius: 6px; border: 1px solid #ddd; background: #fff; cursor: pointer; }
.dp-cart-total-row { display: flex; justify-content: space-between; font-weight: 800; color: #6E1E1E; padding-top: 12px; border-top: 2px solid #f0f0f0; margin-top: 8px; }

/* ---- Dashboard layout ---- */
.dp-dash {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0;
  min-height: 70vh;
}
.dp-dash-sidebar {
  background: #fbfaf8;
  border-right: 1px solid #eee;
  padding: 24px 16px;
}
.dp-dash-sidebar .dp-user-chip { padding: 10px 12px; background: #fff; border-radius: 10px; margin-bottom: 18px; border: 1px solid #eee; }
.dp-dash-sidebar .dp-user-chip strong { display: block; color: #6E1E1E; font-size: 14px; }
.dp-dash-sidebar .dp-user-chip span { font-size: 12px; color: #888; }
.dp-dash-nav { display: flex; flex-direction: column; gap: 4px; }
.dp-dash-nav button, .dp-dash-nav a {
  display: flex; align-items: center; gap: 10px; text-align: left; width: 100%;
  padding: 11px 14px; border-radius: 8px; border: none; background: transparent;
  font-size: 14px; font-weight: 700; color: #555; cursor: pointer; text-decoration: none;
}
.dp-dash-nav button.active, .dp-dash-nav a.active { background: #6E1E1E; color: #FDF6E9; }
.dp-dash-nav button:hover:not(.active), .dp-dash-nav a:hover:not(.active) { background: #f0e6d3; }
.dp-dash-content { padding: 28px 32px; overflow-x: auto; }
.dp-dash-panel[hidden] { display: none; }
.dp-dash-panel-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.dp-dash-panel-head h2 { margin: 0; color: #6E1E1E; }

.dp-stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 16px; margin-bottom: 28px; }
.dp-stat-card { background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 18px; box-shadow: 0 2px 10px rgba(0,0,0,0.04); }
.dp-stat-card .num { font-size: 28px; font-weight: 800; color: #6E1E1E; }
.dp-stat-card .label { font-size: 12.5px; color: #888; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }

/* ---- Tables ---- */
.dp-table-wrap { overflow-x: auto; border: 1px solid #eee; border-radius: 12px; }
.dp-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
.dp-table th, .dp-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #f2f2f2; white-space: nowrap; }
.dp-table th { background: #fbfaf8; color: #6E1E1E; font-weight: 800; position: sticky; top: 0; }
.dp-table td.wrap { white-space: normal; max-width: 260px; }
.dp-table tbody tr:hover { background: #fdfaf5; }
.dp-table select.dp-status-select { padding: 5px 8px; border-radius: 6px; border: 1px solid #ddd; font-size: 12.5px; }

.dp-doc-links a { color: #6E1E1E; font-weight: 700; font-size: 12.5px; margin-right: 8px; }

/* ---- Login gate ---- */
.dp-gate { text-align: center; padding: 80px 20px; }

@media (max-width: 900px) {
  .dp-dash { grid-template-columns: 1fr; }
  .dp-dash-sidebar { border-right: none; border-bottom: 1px solid #eee; }
  .dp-dash-nav { flex-direction: row; overflow-x: auto; }
  .dp-dash-nav button, .dp-dash-nav a { white-space: nowrap; }
  .dp-dash-content { padding: 20px; }
  .dp-form-row { grid-template-columns: 1fr; }
}
