/* ==========================================================================
   Client Dashboard > Dashboard (#dashboard)
   Path: assets/public/css/client/dashboard.css
   Same look as dashboard-student.css, scoped under #nsrl-cd-home so it never
   clashes with the Reservation / Billing views on the same page.
   Markup: assets/public/js/ui/Client/dashboard-ui.js
   ========================================================================== */

#nsrl-cd-home {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px;
  box-sizing: border-box;
  color: #1e293b;
}
#nsrl-cd-home * { box-sizing: border-box; }

/* ---- Hero ---------------------------------------------------------------- */
#nsrl-cd-home .nsrl-student-header-centered {
  text-align: center;
  padding: 28px 16px;
  margin-bottom: 28px;
}
#nsrl-cd-home .nsrl-welcome-text {
  font-size: 2.25rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}
#nsrl-cd-home .nsrl-welcome-sub {
  color: #64748b;
  font-size: 1rem;
  margin: 0 0 20px;
}
#nsrl-cd-home button.nsrl-btn-create-action {
  display: inline-block;
  background-color: #64dde3;
  color: #053b3e;
  border: 1px solid #4ecfd5;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
  transition: background-color .2s ease, transform .2s ease;
}
#nsrl-cd-home button.nsrl-btn-create-action:hover { background-color: #4ecfd5; transform: translateY(-1px); }
#nsrl-cd-home button.nsrl-btn-create-action:focus-visible { outline: 2px solid #087f87; outline-offset: 2px; }

/* ---- Grid ---------------------------------------------------------------- */
#nsrl-cd-home .nsrl-dashboard-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 992px) {
  #nsrl-cd-home .nsrl-dashboard-grid { grid-template-columns: 1fr 1fr; align-items: start; }
}
#nsrl-cd-home .nsrl-right-column { display: flex; flex-direction: column; gap: 24px; min-width: 0; }

/* ---- Card ---------------------------------------------------------------- */
#nsrl-cd-home .nsrl-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
  min-width: 0;
}
#nsrl-cd-home .nsrl-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 12px;
  margin-bottom: 20px;
}
#nsrl-cd-home .nsrl-card-title { font-size: 1.25rem; font-weight: 700; color: #1e293b; margin: 0; }
#nsrl-cd-home .nsrl-card-sub { margin: 4px 0 0; }
#nsrl-cd-home .nsrl-card-sub.is-overdue { color: #b42318; font-weight: 600; }

#nsrl-cd-home .nsrl-card-header-link {
  background: none;
  border: none;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
#nsrl-cd-home .nsrl-card-header-link:hover { background-color: #f1f5f9; color: #1e293b; transform: translateX(2px); }
#nsrl-cd-home .nsrl-card-header-link:focus-visible { outline: 2px solid #087f87; outline-offset: 2px; }

/* ---- Announcements ------------------------------------------------------- */
#nsrl-cd-home .nsrl-announcement-list { display: flex; flex-direction: column; gap: 16px; }
#nsrl-cd-home .nsrl-announcement-item {
  border: 1px solid #f1f5f9;
  background-color: #f8fafc;
  border-radius: 8px;
  padding: 16px;
}
#nsrl-cd-home .nsrl-notice-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
#nsrl-cd-home .nsrl-notice-title {
  margin: 0;
  font-weight: 700;
  color: #1e293b;
  font-size: 0.95rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
#nsrl-cd-home .nsrl-notice-body {
  color: #475569;
  font-size: 0.875rem;
  margin: 0 0 10px;
  line-height: 1.5;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
#nsrl-cd-home .nsrl-notice-date { font-size: 0.75rem; color: #94a3b8; }

/* ---- Pills --------------------------------------------------------------- */
#nsrl-cd-home .type-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}
#nsrl-cd-home .type-pill.ACTIVE   { background-color: #dcfce7; color: #15803d; }
#nsrl-cd-home .type-pill.PENDING  { background-color: #fef9c3; color: #b45309; }
#nsrl-cd-home .type-pill.PROGRESS { background-color: #e0f2fe; color: #0369a1; }

/* ---- Billing donut ------------------------------------------------------- */
#nsrl-cd-home .nsrl-billing-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
#nsrl-cd-home .nsrl-donut-chart-wrapper { position: relative; width: 140px; height: 140px; flex-shrink: 0; }
#nsrl-cd-home .nsrl-donut-chart-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
#nsrl-cd-home .donut-bg { fill: none; stroke: #f1f5f9; stroke-width: 4; }
#nsrl-cd-home .donut-segment-blue   { fill: none; stroke: #2563eb; stroke-width: 4; }
#nsrl-cd-home .donut-segment-cyan   { fill: none; stroke: #64dde3; stroke-width: 4; }
#nsrl-cd-home .donut-segment-purple { fill: none; stroke: #a855f7; stroke-width: 4; }
#nsrl-cd-home .nsrl-donut-center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 104px;
}
#nsrl-cd-home .nsrl-donut-number {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
#nsrl-cd-home .nsrl-donut-number.is-long { font-size: 1rem; }
#nsrl-cd-home .nsrl-donut-caption { display: block; font-size: 0.65rem; font-weight: 700; color: #64748b; margin-top: 4px; }

#nsrl-cd-home .nsrl-billing-legend { display: flex; flex-direction: column; gap: 12px; flex: 1 1 200px; min-width: 0; }
#nsrl-cd-home .nsrl-legend-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 0.875rem; }
#nsrl-cd-home .legend-label { display: flex; align-items: center; gap: 8px; color: #475569; font-weight: 500; }
#nsrl-cd-home .legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
#nsrl-cd-home .legend-dot.dot-blue   { background-color: #2563eb; }
#nsrl-cd-home .legend-dot.dot-cyan   { background-color: #64dde3; }
#nsrl-cd-home .legend-dot.dot-purple { background-color: #a855f7; }
#nsrl-cd-home .legend-metrics { display: flex; align-items: center; gap: 16px; }
#nsrl-cd-home .legend-value { color: #475569; font-weight: 600; white-space: nowrap; }
#nsrl-cd-home .legend-percent { color: #1e293b; font-weight: 700; min-width: 36px; text-align: right; }

/* ---- Reservations -------------------------------------------------------- */
#nsrl-cd-home .nsrl-reservation-table-wrapper { width: 100%; overflow-x: auto; }
#nsrl-cd-home .nsrl-mini-table { width: 100%; border-collapse: collapse; }
#nsrl-cd-home .nsrl-mini-table th,
#nsrl-cd-home .nsrl-mini-table td {
  padding: 12px 8px;
  text-align: left;
  vertical-align: top;
  border: none;
  font-size: 0.875rem;
  background: transparent;
}
#nsrl-cd-home .nsrl-mini-table th { color: #64748b; font-weight: 600; }
#nsrl-cd-home .nsrl-mini-table td.nsrl-cd-home-when { white-space: nowrap; }
#nsrl-cd-home .nsrl-mini-table tbody tr + tr td { border-top: 1px solid #f1f5f9; }
#nsrl-cd-home .meta-sub { color: #64748b; font-size: 0.8rem; }

/* ---- Loading / empty / error -------------------------------------------- */
#nsrl-cd-home .nsrl-cd-home-state {
  width: 100%;
  margin: 0;
  padding: 16px 8px;
  text-align: center;
  font-size: 0.875rem;
  color: #64748b;
}
#nsrl-cd-home .nsrl-cd-home-state p { margin: 0 0 10px; }
#nsrl-cd-home .nsrl-cd-home-state.is-error { color: #b42318; }
#nsrl-cd-home .nsrl-cd-home-retry {
  padding: 8px 16px;
  font: inherit;
  font-weight: 600;
  color: #053b3e;
  background: #fff;
  border: 1px solid #4ecfd5;
  border-radius: 8px;
  cursor: pointer;
}
#nsrl-cd-home .nsrl-cd-home-retry:hover { background: #eefbfb; }

@media (max-width: 600px) {
  #nsrl-cd-home { padding: 16px 0; }
  #nsrl-cd-home .nsrl-student-header-centered { padding: 12px 0; margin-bottom: 20px; }
  #nsrl-cd-home .nsrl-welcome-text { font-size: 1.6rem; }
  #nsrl-cd-home .nsrl-card { padding: 18px; }
  #nsrl-cd-home .nsrl-billing-layout { justify-content: center; }

  /* Reservations: each row becomes a small block (lab + status on top, schedule below) */
  #nsrl-cd-home .nsrl-mini-table thead { display: none; }
  #nsrl-cd-home .nsrl-mini-table,
  #nsrl-cd-home .nsrl-mini-table tbody { display: block; }
  #nsrl-cd-home .nsrl-mini-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
    padding: 12px 0;
  }
  #nsrl-cd-home .nsrl-mini-table tbody tr + tr { border-top: 1px solid #f1f5f9; }
  #nsrl-cd-home .nsrl-mini-table tbody tr + tr td { border-top: 0; }
  #nsrl-cd-home .nsrl-mini-table td { display: block; padding: 0; }
  #nsrl-cd-home .nsrl-mini-table td:nth-child(1) { grid-column: 1; grid-row: 1; }
  #nsrl-cd-home .nsrl-mini-table td:nth-child(3) { grid-column: 2; grid-row: 1; text-align: right; }
  #nsrl-cd-home .nsrl-mini-table td.nsrl-cd-home-when { grid-column: 1 / -1; grid-row: 2; white-space: normal; }
}
