/* ============================================================
   ResqBag — Dashboard CSS
   ============================================================ */

/* ══ DASHBOARD LAYOUT ════════════════════════════════════ */
.dashboard-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - var(--nav-h));
}
.dashboard-sidebar {
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
}
.dash-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}
.dash-rest-name {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.1rem;
}
.dash-rest-email { color: var(--text-muted); font-size: 0.78rem; margin-bottom: 1.5rem; }
.dash-nav { display: flex; flex-direction: column; gap: 0.2rem; flex: 1; }
.dash-nav-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.65rem 0.85rem; border-radius: var(--radius-sm);
  font-size: 0.9rem; color: var(--text-muted); font-weight: 500;
  transition: all var(--transition);
}
.dash-nav-item:hover { background: var(--surface-2); color: var(--text); }
.dash-nav-item.active { background: rgba(46,204,113,0.12); color: var(--primary); font-weight: 600; }
.dash-signout-btn {
  margin-top: auto; padding: 0.6rem; border-radius: var(--radius-sm);
  font-size: 0.85rem; color: var(--error); text-align: left;
  transition: background var(--transition);
}
.dash-signout-btn:hover { background: rgba(231,76,60,0.08); }

.dashboard-main { padding: 2rem; overflow-y: auto; }
.dash-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem;
}
.dash-title { font-size: 1.6rem; font-weight: 800; margin: 0; }
.dash-date { font-size: 0.85rem; color: var(--text-muted); }
.dash-section-title { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }

/* Stats */
.dash-stats-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; margin-bottom: 2rem; }
.dash-stat-card {
  display: flex; align-items: center; gap: 1rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.1rem 1.25rem;
}
.dash-stat-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0;
}
.dash-stat-val { font-size: 1.4rem; font-weight: 800; font-family: 'Outfit',sans-serif; line-height: 1.1; }
.dash-stat-label { font-size: 0.78rem; color: var(--text-muted); }

/* Quick actions */
.dash-quick-actions { margin-bottom: 2rem; }
.dash-actions-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.dash-action-card {
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  padding: 1.25rem 1.5rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); cursor: pointer; transition: all var(--transition);
  min-width: 120px; text-align: center;
}
.dash-action-card:hover { border-color: var(--primary); background: rgba(46,204,113,0.06); transform: translateY(-2px); }
.dash-action-icon { font-size: 1.6rem; }
.dash-action-label { font-size: 0.82rem; font-weight: 500; color: var(--text-muted); }

/* Orders table */
.dash-recent { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.dash-orders-table { display: flex; flex-direction: column; }
.dash-table-header {
  display: grid; grid-template-columns: 1fr 1fr 0.7fr 0.7fr 0.8fr;
  gap: 1rem; padding: 0.5rem 0; margin-bottom: 0.5rem;
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-faint);
  border-bottom: 1px solid var(--border);
}
.dash-table-row {
  display: grid; grid-template-columns: 1fr 1fr 0.7fr 0.7fr 0.8fr;
  gap: 1rem; padding: 0.75rem 0; font-size: 0.88rem;
  border-bottom: 1px solid var(--border); align-items: center;
}
.dash-table-row:last-child { border-bottom: none; }

/* Listings */
.dash-listings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 1.25rem; }
.dash-listing-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
  transition: border-color var(--transition);
}
.dash-listing-card:hover { border-color: var(--border-strong); }
.dash-listing-card--inactive { opacity: 0.55; }
.dash-listing-card__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.dash-listing-card__name { font-weight: 700; font-size: 1rem; }
.dash-listing-toggle {
  padding: 0.25rem 0.7rem; border-radius: var(--radius-full);
  font-size: 0.72rem; font-weight: 700; border: 1px solid var(--border);
  color: var(--text-muted); transition: all var(--transition);
}
.dash-listing-toggle.active { background: rgba(46,204,113,0.15); color: var(--primary); border-color: rgba(46,204,113,0.3); }
.dash-listing-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.75rem 0; font-size: 0.8rem; color: var(--text-muted); }
.dash-listing-actions { display: flex; gap: 0.5rem; }

/* Orders list for dashboard */
.dash-orders-list { display: flex; flex-direction: column; gap: 1rem; }
.dash-order-card {
  display: grid; grid-template-columns: 1.2fr 1fr 1fr;
  gap: 1rem; align-items: start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
}
.dash-order-card__id { font-family: monospace; font-size: 0.85rem; font-weight: 600; color: var(--primary); margin-bottom: 0.2rem; }
.dash-order-card__customer { font-weight: 600; margin-bottom: 0.15rem; }
.dash-order-card__total { font-size: 1.3rem; font-weight: 800; font-family: 'Outfit',sans-serif; color: var(--primary); }
.dash-order-card__pickup { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.dash-order-card__right { text-align: right; }

/* Dashboard modal */
.dash-modal {
  background: var(--bg-2); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); padding: 1.75rem;
  width: 100%; max-width: 500px; max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.dash-modal__header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.5rem;
}
.dash-modal__header h3 { font-size: 1.2rem; }
.dash-modal__header button { color: var(--text-muted); font-size: 1.2rem; }

@media (max-width: 900px) {
  .dashboard-layout { grid-template-columns: 1fr; }
  .dashboard-sidebar {
    position: static; height: auto;
    flex-direction: row; flex-wrap: wrap; gap: 0.5rem;
    align-items: center;
  }
  .dash-nav { flex-direction: row; flex-wrap: wrap; }
  .dash-signout-btn { margin-top: 0; }
  .dash-stats-row { grid-template-columns: repeat(2,1fr); }
  .dash-table-header, .dash-table-row { grid-template-columns: 1fr 1fr 0.8fr; }
  .dash-table-header span:nth-child(4), .dash-table-header span:nth-child(5),
  .dash-table-row span:nth-child(4), .dash-table-row span:nth-child(5) { display: none; }
  .dash-order-card { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
  .dash-stats-row { grid-template-columns: 1fr 1fr; }
}
