html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

html {
  min-height: 100%;
  position: relative;
}

body {
  background: #f6f7f9;
  color: #20242c;
  margin-bottom: 72px;
}

.navbar {
  background: #ffffff;
}

.account-menu-button,
.admin-menu-button {
  color: #20242c;
  text-decoration: none;
}

.account-menu-button:hover,
.admin-menu-button:hover {
  color: #174f8f;
}

.container {
  max-width: 1180px;
}

.btn-primary {
  background: #2454a6;
  border-color: #2454a6;
}

.btn-primary:hover {
  background: #1d4385;
  border-color: #1d4385;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: #6f9ee8;
  box-shadow: 0 0 0 0.2rem rgba(36, 84, 166, 0.18);
}

.page-header {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin: 2rem 0 1.25rem;
}

.page-header h1,
.result-panel h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 750;
  letter-spacing: 0;
  margin: 0;
}

.eyebrow {
  color: #536170;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08rem;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
}

.form-panel,
.result-panel,
.comments {
  background: #ffffff;
  border: 1px solid #dfe4eb;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(34, 46, 62, 0.06);
  padding: 1.5rem;
}

.form-panel.narrow {
  max-width: 720px;
}

.actions {
  border-top: 1px solid #e8ecf1;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
}

.filter-bar {
  align-items: stretch;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(260px, 1fr) 170px 180px 160px auto;
  margin-bottom: 1rem;
}

.table-responsive {
  background: #ffffff;
  border: 1px solid #dfe4eb;
  border-radius: 8px;
  overflow: hidden;
}

.table {
  margin-bottom: 0;
}

.table thead th {
  background: #eef2f7;
  color: #384454;
  font-size: 0.78rem;
  letter-spacing: 0.04rem;
  text-transform: uppercase;
}

.status-badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.45rem 0.65rem;
  white-space: nowrap;
}

.status-open {
  background: #e6f1ff;
  color: #174f8f;
}

.status-inprogress {
  background: #fff1d6;
  color: #815400;
}

.status-paused {
  background: #eee9ff;
  color: #513e9c;
}

.status-closed {
  background: #e4f5ea;
  color: #1c6336;
}

.details-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) 380px;
}

.case-meta {
  display: grid;
  gap: 0.6rem 1rem;
  grid-template-columns: 120px minmax(0, 1fr);
  margin-bottom: 1.5rem;
}

.case-meta dt {
  color: #536170;
  font-weight: 700;
}

.case-meta dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.case-description,
.comment p {
  white-space: pre-wrap;
}

.comments {
  margin-top: 1rem;
}

.comments h2,
.form-panel h2 {
  font-size: 1.2rem;
  font-weight: 750;
  margin-bottom: 1rem;
}

.comment {
  border-top: 1px solid #e8ecf1;
  padding: 1rem 0;
}

.comment:first-of-type {
  border-top: 0;
}

.comment-header {
  color: #536170;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.empty-state {
  background: #ffffff;
  border: 1px dashed #b8c1ce;
  border-radius: 8px;
  color: #536170;
  margin-top: 1rem;
  padding: 1rem;
}

.work-calendar {
  background: #ffffff;
  border: 1px solid #dfe4eb;
  border-radius: 8px;
  overflow: hidden;
}

.work-calendar-weekdays,
.work-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.work-calendar-weekdays > div {
  background: #eef2f7;
  color: #384454;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04rem;
  padding: 0.75rem;
  text-transform: uppercase;
}

.work-day {
  border-right: 1px solid #e8ecf1;
  border-top: 1px solid #e8ecf1;
  min-height: 150px;
  padding: 0.65rem;
}

.work-day:nth-child(7n) {
  border-right: 0;
}

.work-day.muted {
  background: #f8fafc;
  color: #8792a0;
}

.work-day.non-working {
  background: #f5f6f8;
  color: #6c7683;
}

.work-day-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.non-working-label {
  color: #6c7683;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.work-report-pill {
  border-radius: 6px;
  color: #20242c;
  display: flex;
  font-size: 0.82rem;
  justify-content: space-between;
  margin-bottom: 0.35rem;
  padding: 0.45rem 0.5rem;
  text-decoration: none;
}

.work-report-pill:hover {
  color: #20242c;
  filter: brightness(0.98);
}

.work-report-pill.type-normalworkingday {
  background: #e4f5ea;
}

.work-report-pill.type-vacation {
  background: #e6f1ff;
}

.work-report-pill.type-sickleave {
  background: #fff1d6;
}

.work-report-pill.type-overtime {
  background: #eee9ff;
}

.quick-work-form {
  margin-top: 0.25rem;
}

.quick-work-form .btn {
  padding-left: 0;
  padding-right: 0;
}

.report-summary {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.report-summary > div {
  background: #ffffff;
  border: 1px solid #dfe4eb;
  border-radius: 8px;
  padding: 1rem;
}

.report-summary span {
  color: #536170;
  display: block;
  font-size: 0.82rem;
  margin-bottom: 0.35rem;
}

.report-summary strong {
  font-size: 1.35rem;
}

@media (max-width: 900px) {
  .filter-bar,
  .details-grid {
    grid-template-columns: 1fr;
  }

  .work-calendar-weekdays {
    display: none;
  }

  .work-calendar-grid {
    grid-template-columns: 1fr;
  }

  .report-summary {
    grid-template-columns: 1fr;
  }

  .page-header {
    display: block;
  }

  .page-header .btn {
    margin-top: 1rem;
  }
}
