/* =========================================================
   Physics Toolsmith
   Laboratory Usage Dashboard
   ========================================================= */


/* ---------------------------------------------------------
   1. Layout & Core Container
   --------------------------------------------------------- */

.schedule-dashboard {
  max-width: 1350px !important;
  margin: 0 auto !important;
  padding: 50px 24px 80px !important;
}


/* ---------------------------------------------------------
   2. Dashboard Header
   --------------------------------------------------------- */

.dashboard-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 48px;
}

.dashboard-eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--bs-primary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.dashboard-header h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.dashboard-header p {
  max-width: 600px;
  margin: 10px 0 0;
  color: var(--bs-secondary-color);
  line-height: 1.6;
}


/* ---------------------------------------------------------
   3. Buttons
   --------------------------------------------------------- */

.btn-schedule,
.btn-load {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease,
    background-color 0.2s ease;
}

.btn-schedule {
  padding: 10px 16px;
  background: var(--bs-dark);
  color: #fff;
  white-space: nowrap;
}

.btn-schedule:hover {
  color: #fff;
  opacity: 0.85;
  transform: translateY(-1px);
}

.btn-load {
  height: 40px;
  padding: 0 17px;
  background: var(--bs-primary);
  color: #fff;
  cursor: pointer;
}

.btn-load:hover {
  color: #fff;
  opacity: 0.88;
  transform: translateY(-1px);
}


/* ---------------------------------------------------------
   4. Dashboard Sections
   --------------------------------------------------------- */

.dashboard-section {
  width: 100%;
}


/* ---------------------------------------------------------
   5. Usage Overview Section
   --------------------------------------------------------- */

.usage-section {
  padding: 40px;

  background: var(--bs-tertiary-bg);

  border: 1px solid var(--bs-border-color);
  border-radius: 28px;
}


/* ---------------------------------------------------------
   6. Section Heading
   --------------------------------------------------------- */

.section-heading {
  margin-bottom: 30px;
}

.section-eyebrow {
  display: inline-block;
  margin-bottom: 7px;

  color: var(--bs-primary);

  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0;

  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.section-heading p {
  max-width: 650px;
  margin: 7px 0 0;

  color: var(--bs-secondary-color);

  font-size: 0.95rem;
  line-height: 1.6;
}


/* ---------------------------------------------------------
   7. Date Filter
   --------------------------------------------------------- */

.dashboard-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 25px;

  padding: 18px 20px;
  margin-bottom: 24px;

  border: 1px solid var(--bs-border-color);
  border-radius: 14px;

  background: var(--bs-body-bg);

  box-shadow:
    0 2px 8px rgba(15, 23, 42, 0.03);
}


/* ---------------------------------------------------------
   8. Filter Title
   --------------------------------------------------------- */

.filter-title {
  display: flex;
  align-items: center;
  gap: 12px;

  min-width: 210px;

  white-space: nowrap;
}

.filter-icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 40px;
  height: 40px;
  flex: 0 0 40px;

  border-radius: 10px;

  background: var(--bs-tertiary-bg);

  color: var(--bs-primary);

  font-size: 1rem;
}

.filter-title > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.filter-title span {
  font-size: 0.9rem;
  font-weight: 600;
}

.filter-title small {
  color: var(--bs-secondary-color);
  font-size: 0.72rem;
}


/* ---------------------------------------------------------
   9. Filter Controls
   --------------------------------------------------------- */

.filter-controls {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 12px;
}

.date-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.date-field label {
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.65;
}

.date-field input {
  min-width: 160px;
  height: 40px;

  padding: 8px 10px;

  border: 1px solid var(--bs-border-color);
  border-radius: 8px;

  background: var(--bs-body-bg);
  color: var(--bs-body-color);

  font-size: 0.88rem;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.date-field input:focus {
  outline: none;

  border-color: var(--bs-primary);

  box-shadow:
    0 0 0 3px
    rgba(var(--bs-primary-rgb), 0.1);
}

.date-separator {
  display: flex;
  align-items: center;

  height: 40px;

  padding-bottom: 1px;

  opacity: 0.45;
}


/* ---------------------------------------------------------
   10. Summary Cards
   --------------------------------------------------------- */

.summary-grid {
  display: grid;

  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap: 18px;

  margin-bottom: 24px;
}

.summary-card {
  display: flex;
  align-items: center;

  gap: 15px;

  min-height: 115px;

  padding: 20px;

  border: 1px solid var(--bs-border-color);
  border-radius: 14px;

  background: var(--bs-body-bg);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.summary-card:hover {
  transform: translateY(-1px);

  box-shadow:
    0 5px 15px
    rgba(15, 23, 42, 0.05);
}

.summary-icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 46px;
  height: 46px;
  flex: 0 0 46px;

  border-radius: 12px;

  background: var(--bs-tertiary-bg);

  color: var(--bs-primary);

  font-size: 1.2rem;
}

.summary-content {
  min-width: 0;
}

.summary-label {
  display: block;

  margin-bottom: 5px;

  font-size: 0.75rem;
  font-weight: 600;

  letter-spacing: 0.05em;
  text-transform: uppercase;

  opacity: 0.6;
}

.summary-value {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.summary-card strong {
  display: inline-block;

  max-width: 100%;

  font-size: 1.45rem;
  font-weight: 700;

  line-height: 1.1;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-card small {
  font-size: 0.78rem;
  opacity: 0.55;
  white-space: nowrap;
}


/* ---------------------------------------------------------
   11. Dashboard Cards
   --------------------------------------------------------- */

.dashboard-card {
  padding: 24px;

  border: 1px solid var(--bs-border-color);
  border-radius: 16px;

  background: var(--bs-body-bg);

  box-shadow:
    0 2px 8px
    rgba(15, 23, 42, 0.02);
}

.room-card {
  margin-bottom: 24px;
}


/* ---------------------------------------------------------
   12. Card Header
   --------------------------------------------------------- */

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  margin-bottom: 20px;
}

.card-eyebrow {
  display: block;

  margin-bottom: 7px;

  font-size: 0.72rem;
  font-weight: 700;

  letter-spacing: 0.16em;
  text-transform: uppercase;

  opacity: 0.55;
}

.card-header h2 {
  margin: 0;

  font-size: 1.2rem;
  font-weight: 700;
}

.card-header p {
  margin: 5px 0 0;

  font-size: 0.85rem;

  color: var(--bs-secondary-color);
}


/* ---------------------------------------------------------
   13. Charts
   --------------------------------------------------------- */

.chart-grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 24px;

  margin-bottom: 0;
}

.chart-large {
  position: relative;

  width: 100%;
  height: 400px;
}

.chart-medium {
  position: relative;

  width: 100%;
  height: 330px;
}


/* ---------------------------------------------------------
   14. Usage Trend Section
   --------------------------------------------------------- */

.trend-section {
  margin-top: 80px;

  padding-top: 52px;

  border-top: 1px solid var(--bs-border-color);
}

.trend-section .section-heading {
  margin-bottom: 28px;
}

.trend-card {
  margin-bottom: 0;
}

.trend-chart {
  height: 380px;
}


/* ---------------------------------------------------------
   15. Line Chart Wrapper
   --------------------------------------------------------- */

.line-chart-wrapper {
  position: relative;

  width: 100%;
  height: 100%;
}

.line-chart-wrapper canvas {
  width: 100% !important;
  height: 100% !important;
}


/* ---------------------------------------------------------
   16. Dark Theme
   --------------------------------------------------------- */

[data-bs-theme="dark"] .usage-section {
  background: var(--bs-dark-bg-subtle);
}

[data-bs-theme="dark"] .dashboard-filter,
[data-bs-theme="dark"] .summary-card,
[data-bs-theme="dark"] .dashboard-card {
  background: var(--bs-body-bg);
}

[data-bs-theme="dark"] .btn-schedule {
  background: var(--bs-light);
  color: var(--bs-dark);
}

[data-bs-theme="dark"] .btn-schedule:hover {
  color: var(--bs-dark);
}

[data-bs-theme="dark"] .filter-icon,
[data-bs-theme="dark"] .summary-icon {
  background: var(--bs-tertiary-bg);
}


/* ---------------------------------------------------------
   17. Responsive — Tablet
   --------------------------------------------------------- */

@media (max-width: 1100px) {

  .summary-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .dashboard-filter {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-controls {
    justify-content: flex-start;
  }

}


/* ---------------------------------------------------------
   18. Responsive — Medium
   --------------------------------------------------------- */

@media (max-width: 900px) {

  .usage-section {
    padding: 30px;
  }

  .chart-grid {
    grid-template-columns: 1fr;
  }

}


/* ---------------------------------------------------------
   19. Responsive — Mobile
   --------------------------------------------------------- */

@media (max-width: 768px) {

  .schedule-dashboard {
    padding:
      35px 16px 60px !important;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;

    gap: 20px;

    margin-bottom: 35px;
  }

  .dashboard-header h1 {
    font-size: 2rem;
  }

  .usage-section {
    padding: 22px;

    border-radius: 20px;
  }

  .section-heading {
    margin-bottom: 22px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .filter-controls {
    flex-direction: column;
    align-items: stretch;

    width: 100%;
  }

  .date-field {
    width: 100%;
  }

  .date-field input,
  .btn-load {
    width: 100%;
  }

  .date-separator {
    display: none;
  }

  .chart-large {
    height: 330px;
  }

  .chart-medium {
    height: 300px;
  }

  .trend-section {
    margin-top: 55px;
    padding-top: 40px;
  }

  .trend-chart {
    height: 340px;
  }

}


/* ---------------------------------------------------------
   20. Responsive — Small Mobile
   --------------------------------------------------------- */

@media (max-width: 480px) {

  .schedule-dashboard {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .usage-section {
    padding: 16px;

    border-radius: 17px;
  }

  .dashboard-card {
    padding: 18px;
  }

  .summary-card {
    min-height: 100px;
    padding: 16px;
  }

  .summary-icon {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .summary-card strong {
    font-size: 1.3rem;
  }

  .chart-large {
    height: 280px;
  }

  .chart-medium {
    height: 260px;
  }

  .trend-chart {
    height: 300px;
  }

}