
:root {
  --red: #a51d26;
  --dark-red: #80171e;
  --background: #f4f5f7;
  --border: #e1e4e8;
  --text: #242936;
  --muted: #687080;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: var(--background);
  color: var(--text);
}

h1 {
  font-size: 26px;
  margin: 0 0 22px;
}

h2 {
  font-size: 19px;
  margin-top: 0;
}

p {
  line-height: 1.5;
}

small {
  color: var(--muted);
}

button,
input {
  font: inherit;
}

button {
  border: none;
  border-radius: 7px;
  background: var(--red);
  color: white;
  padding: 11px 17px;
  cursor: pointer;
}

button:hover {
  background: var(--dark-red);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  margin-bottom: 18px;
}

label {
  display: block;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 7px;
}

.brand {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: 2px;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: white;
  padding: 35px;
  border-radius: 14px;
  box-shadow: 0 8px 35px #0000000c;
}

.login-card .brand {
  color: var(--red);
  margin-bottom: 24px;
}

.login-card button {
  width: 100%;
}

.login-card small {
  display: block;
  text-align: center;
  margin-top: 28px;
}

header {
  background: var(--red);
  color: white;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-info {
  text-align: right;
}

.user-info small {
  display: block;
  color: #ffffffcc;
  margin-top: 4px;
}

.workspace {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  min-height: calc(100vh - 75px);
}

nav {
  background: white;
  border-right: 1px solid var(--border);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-button {
  color: var(--text);
  background: transparent;
  text-align: left;
}

.nav-button:hover,
.nav-button.active {
  background: #f7e8e9;
  color: var(--red);
}

.logout {
  margin-top: auto;
}

main {
  padding: 28px;
  min-width: 0;
}

.card,
.summary-card {
  background: white;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 11px;
  margin-bottom: 20px;
}

.summary-card {
  max-width: 250px;
}

.summary-card strong {
  display: block;
  font-size: 38px;
  margin-top: 10px;
}

.employee-row {
  border-bottom: 1px solid var(--border);
  padding: 15px 0;
}

.employee-row:last-child {
  border-bottom: none;
}

.performance {
  background: white;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 15px 20px;
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  font-size: 13px;
}

.performance p {
  margin: 0;
  color: #21764b;
  font-weight: bold;
  font-variant-numeric: tabular-nums;
}

.week-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 20px;
  text-align: center;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.toolbar button {
  background: #edf0f3;
  color: var(--text);
}

.table-container {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 850px;
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 12px 8px;
  text-align: center;
  font-size: 13px;
}

th {
  background: #f4f5f7;
}

td:first-child,
th:first-child {
  text-align: left;
  min-width: 150px;
}

.shift-cell {
  background: #e5f2e9;
  color: #25663f;
  border-radius: 6px;
  display: block;
  padding: 10px 5px;
  width: 100%;
  white-space: nowrap;
}

button.shift-cell:hover {
  background: #cce6d4;
}

.shift-cell.empty {
  background: #f2f3f5;
  color: var(--muted);
}

#scheduleHint {
  font-size: 13px;
  color: var(--muted);
}

#loginMessage,
#portalMessage,
#shiftMessage {
  color: var(--red);
  font-size: 14px;
}

dialog {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 25px;
  width: min(420px, 90vw);
}

dialog::backdrop {
  background: #00000055;
}

.dialog-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#cancelShift {
  background: #edf0f3;
  color: var(--text);
}

@media (max-width: 700px) {

  header {
    padding: 15px;
  }

  .workspace {
    display: block;
  }

  nav {
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .logout {
    margin-top: 0;
    margin-left: auto;
  }

  main {
    padding: 15px;
  }

  .card {
    padding: 15px;
  }

  .performance {
    gap: 8px 15px;
  }

}
