:root {
  color-scheme: light;
  font-family: "Roboto", "Helvetica", "Arial", sans-serif;
  background-color: #f5f5f5;
  color: #1f2937;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.app {
  max-width: 1700px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.app__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.app__header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.employee-name {
  font-weight: 600;
  color: #1f2937;
}

h1,
h2,
h3 {
  margin: 0 0 8px;
}

.muted {
  color: #5b6373;
  margin: 0;
}

.card {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(18, 22, 33, 0.08);
}

.hidden {
  display: none;
}

.status {
  min-height: 28px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #eef2ff;
  color: #1f2a5a;
  font-size: 14px;
}

.status:empty {
  display: none;
  padding: 0;
  min-height: 0;
}

.status.error {
  background: #ffeef0;
  color: #7a1b22;
}

.status.success {
  background: #e9f7ef;
  color: #17663c;
}

.btn {
  background: #1976d2;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 600;
}

.btn--secondary {
  background: #dc004e;
}

.btn--ghost {
  background: transparent;
  color: #1976d2;
  border: 1px solid #dcdcdc;
}

.btn--danger {
  background: #d32f2f;
  color: #fff;
}

.btn--small {
  padding: 6px 10px;
  font-size: 12px;
}

.auth-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.divider {
  height: 1px;
  background: #e0e0e0;
  margin: 16px 0;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.form-row input {
  flex: 1;
  min-width: 180px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #dcdcdc;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: #3b4252;
}

.grid input,
.grid select {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #dcdcdc;
}

.grid input:focus,
.grid select:focus,
.form-row input:focus {
  outline: none;
  border-color: #1976d2;
  box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.15);
}

.input-error {
  border-color: #d32f2f !important;
  box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.15) !important;
}

.grid-span {
  grid-column: 1 / -1;
}

.inline {
  flex-direction: row !important;
  align-items: center;
  gap: 10px !important;
}

.profile {
  display: flex;
  gap: 24px;
}

.profile__label {
  font-size: 12px;
  color: #6b7280;
}

.profile__value {
  font-weight: 600;
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.list-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

#toggleFiltersBtn {
  display: none;
}

.edit-banner {
  display: none;
}

.table {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.table__head,
.table__row {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 140px 120px 150px 1.6fr 120px 150px 150px 120px;
  gap: 12px;
  align-items: center;
}

.table__head {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  background: #fafafa;
  border-bottom: 1px solid #eee;
  padding: 8px 12px;
  border-radius: 8px;
}

.table__row {
  background: #ffffff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 14px;
}

.table__row span,
.table__head span {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.modal__content {
  position: relative;
  width: min(720px, 100%);
  max-height: 90vh;
  overflow: auto;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.filters-panel {
  display: grid;
}

.filters label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #3b4252;
}

.filters input,
.filters select {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #d0d5dd;
}

.filters__actions {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

@media (max-width: 900px) {
  .app {
    padding: 14px;
  }

  .app__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .app__header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .list-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .list-actions {
    width: 100%;
    flex-direction: column;
  }

  .list-actions .btn,
  .filters__actions .btn {
    width: 100%;
  }

  #toggleFiltersBtn {
    display: inline-flex;
  }

  .filters-panel {
    display: none;
  }

  .filters-panel.is-open {
    display: grid;
  }

  .table__head,
  .table__row {
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(18px, auto);
  }

  .table__head {
    display: none;
  }

  .table__row {
    gap: 8px;
  }

  .table__row span {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
  }

  .table__row span::before {
    content: attr(data-label);
    font-weight: 600;
    color: #6b7280;
    min-width: 140px;
  }

  .filters__actions {
    align-items: center;
  }
}
