:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172b3a;
  background: #f3f6f8;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 32px 20px;
  display: grid;
  place-items: center;
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 40px;
  border: 1px solid #e0e7ec;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 40px rgb(23 43 58 / 6%);
}

.login-header {
  margin-bottom: 32px;
  text-align: center;
}

h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -1px;
}

.login-header p {
  margin: 10px 0 0;
  color: #627282;
  font-size: 15px;
  line-height: 1.5;
}

.form-field {
  margin-bottom: 20px;
}

label,
.duration-fields legend {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
}

input,
select,
textarea,
button,
.button-link {
  width: 100%;
  min-height: 48px;
  border-radius: 8px;
  font: inherit;
}

input,
select,
textarea {
  padding: 11px 13px;
  border: 1px solid #bcc9d3;
  color: #172b3a;
  background: #fff;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #176b63;
  outline: 3px solid rgb(23 107 99 / 18%);
  outline-offset: 1px;
}

button,
.button-link {
  margin-top: 4px;
  padding: 12px 16px;
  border: 1px solid transparent;
  color: #fff;
  background: #176b63;
  font-weight: 600;
  cursor: pointer;
}

button:hover,
.button-link:hover {
  background: #10564f;
}

button:focus-visible,
.button-link:focus-visible {
  outline: 3px solid #176b63;
  outline-offset: 3px;
}

.notice {
  margin: 0 0 24px;
  padding: 12px;
  border: 1px solid #cbdde7;
  border-radius: 8px;
  color: #304e62;
  background: #f0f6fa;
  font-size: 14px;
  line-height: 1.5;
}

.notice-error {
  border-color: #efc7c7;
  color: #942f2f;
  background: #fff3f3;
}

.notice-success {
  border-color: #b9d8cb;
  color: #176047;
  background: #eff9f3;
}

.activity-card,
.user-form-card {
  max-width: 660px;
}

.duration-fields {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

h2 {
  margin: 16px 0 0;
  font-size: 21px;
  font-weight: 600;
}

textarea {
  display: block;
  min-height: 140px;
  resize: vertical;
  line-height: 1.5;
}

.form-grid,
.form-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
}

.button-link {
  display: grid;
  place-items: center;
  text-align: center;
  text-decoration: none;
}

.button-secondary {
  border-color: #bcc9d3;
  color: #304e62;
  background: #fff;
}

.button-secondary:hover {
  background: #f3f6f8;
}

.dashboard-actions {
  display: grid;
  gap: 12px;
}

.field-hint {
  color: #627282;
  font-size: 12px;
  font-weight: 400;
}

.field-error {
  margin: 8px 0 0;
  color: #942f2f;
  font-size: 14px;
}

[aria-invalid="true"] {
  border-color: #b84444;
}

.activities-card,
.users-card {
  max-width: 1080px;
  min-width: 0;
}

.list-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 24px;
}

.list-actions .button-link {
  width: auto;
  margin-top: 0;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid #e0e7ec;
  border-radius: 10px;
}

.table-scroll:focus-visible {
  outline: 3px solid #176b63;
  outline-offset: 3px;
}

.activities-table,
.users-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 14px;
  line-height: 1.5;
}

.activities-table th,
.activities-table td,
.users-table th,
.users-table td {
  padding: 16px 12px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.activities-table th,
.users-table th {
  font-weight: 600;
}

.activities-table thead,
.users-table thead {
  color: #304e62;
  background: #f3f6f8;
}

.activities-table tbody tr,
.users-table tbody tr {
  border-top: 1px solid #e0e7ec;
}

.activities-table tbody tr:hover,
.users-table tbody tr:hover {
  background: #f8fafb;
}

.activities-table .date-column {
  width: 120px;
}

.activities-table .title-column {
  width: 30%;
}

.activities-table .status-column {
  width: 150px;
}

.activities-table .duration-column {
  width: 120px;
}

.activity-date {
  white-space: nowrap;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.status-badge::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-completed {
  border-color: #b9d8cb;
  color: #176047;
  background: #eff9f3;
}

.status-in-progress {
  border-color: #bdd6ec;
  color: #245d89;
  background: #eff6fc;
}

.status-pending {
  border-color: #ead6aa;
  color: #805a16;
  background: #fff8e8;
}

.status-inactive {
  border-color: #ccd5dd;
  color: #536472;
  background: #f0f3f5;
}

.users-table {
  min-width: 760px;
}

.users-table .user-role-column,
.users-table .user-status-column {
  width: 120px;
}

.users-table .user-action-column {
  width: 150px;
}

.table-action {
  min-height: 38px;
  margin: 0;
  padding: 8px 10px;
  font-size: 14px;
}

.password-reset-action {
  margin-top: 8px;
}

.password-logout {
  margin-top: 16px;
}

.admin-activities-card {
  max-width: 1280px;
}

.admin-activities-table {
  min-width: 1120px;
}

.admin-activities-table .employee-column {
  width: 160px;
}

.admin-activities-table .title-column {
  width: 22%;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 20px;
}

.filter-submit {
  width: auto;
  margin-top: 0;
}

.activity-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 24px;
}

.activity-summary > div {
  padding: 18px 20px;
  border: 1px solid #e0e7ec;
  border-radius: 10px;
  background: #f8fafb;
}

.activity-summary dt {
  color: #627282;
  font-size: 14px;
  line-height: 1.5;
}

.activity-summary dd {
  margin: 8px 0 0;
  font-size: 24px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.report-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.report-heading h2 {
  margin: 0;
}

.report-heading .button-link {
  width: auto;
  margin: 0;
}

.report-section {
  margin-top: 32px;
}

.report-section > h2 {
  margin: 0 0 16px;
}

.report-summary-table {
  min-width: 480px;
}

.activity-management-table {
  min-width: 1080px;
}

.admin-activities-table.activity-management-table {
  min-width: 1280px;
}

.activity-action-column {
  width: 180px;
}

.activity-row-actions {
  display: flex;
  gap: 8px;
}

.activity-row-actions .button-link {
  width: auto;
}

.button-danger {
  color: #fff;
  background: #942f2f;
}

.button-danger:hover {
  background: #792626;
}

.button-danger-outline {
  border-color: #efc7c7;
  color: #942f2f;
  background: #fff;
}

.button-danger-outline:hover {
  background: #fff3f3;
}

.delete-summary {
  margin: 0 0 24px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.delete-summary dt {
  color: #627282;
  font-size: 14px;
}

.delete-summary dd {
  margin: 4px 0 16px;
  font-weight: 600;
}

.empty-state {
  margin: 0;
  padding: 36px 20px;
  border: 1px dashed #bcc9d3;
  border-radius: 10px;
  color: #627282;
  text-align: center;
  line-height: 1.5;
}

@media (max-width: 800px) {
  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 32px 24px;
  }

  .form-grid,
  .filter-grid,
  .activity-summary {
    grid-template-columns: 1fr;
  }

  .list-actions .button-link,
  .filter-submit {
    width: 100%;
  }
}
