:root {
  --ink: #17212b;
  --muted: #657487;
  --line: #c8d7e3;
  --blue: #0e6f95;
  --blue-dark: #063b57;
  --paper: #f6f8fb;
  --white: #ffffff;
  --pending: #ffe88a;
  --done: #b8e3be;
  --danger: #c93232;
  --shadow: 0 16px 40px rgba(23, 33, 43, .09);
}

* {
  box-sizing: border-box;
}

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

a {
  color: inherit;
}

.site-header {
  background: var(--blue-dark);
  border-bottom: 4px solid #1695c9;
  color: #fff;
}

.topbar,
.tabs,
main {
  max-width: 1280px;
  margin: 0 auto;
}

.topbar {
  min-height: 76px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: 22px;
}

h2 {
  font-size: 18px;
}

.subtle,
.hint {
  color: var(--muted);
  font-size: 13px;
}

.site-header .subtle {
  color: #d7edf7;
}

.session,
.actions,
.filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.session strong {
  background: rgba(255, 255, 255, .14);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
}

.tabs {
  padding: 14px 20px 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tabs a {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  padding: 10px 14px;
  text-decoration: none;
  font-weight: 700;
}

main {
  padding: 20px;
}

.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-head {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.panel-body {
  padding: 18px;
}

.login-card {
  max-width: 420px;
  margin: 42px auto;
}

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

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}

.wide {
  grid-column: span 2;
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 11px;
  font: inherit;
  color: var(--ink);
  background: white;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

.button,
button {
  border: 0;
  border-radius: 6px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: var(--blue);
  color: white;
  min-height: 40px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button.secondary,
button.secondary {
  color: var(--blue);
  background: #dff1f8;
}

.button.danger,
button.danger {
  color: var(--danger);
  background: #f6dddd;
}

.alert {
  margin-bottom: 14px;
  border-radius: 6px;
  padding: 12px;
  font-weight: 700;
}

.alert.error {
  color: #842020;
  background: #fde3e3;
}

.alert.ok {
  color: #246034;
  background: #e8f6ed;
}

.table-wrap {
  width: 100%;
  overflow: auto;
}

table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  background: white;
  font-size: 13px;
}

th {
  color: white;
  background: var(--blue);
  text-align: left;
  padding: 8px;
  border-right: 1px solid rgba(255, 255, 255, .35);
  white-space: nowrap;
}

td {
  border: 1px solid #3aaee0;
  padding: 6px 8px;
  vertical-align: middle;
  background: #f8fdff;
}

tbody tr:nth-child(odd) td {
  background: #bfe9f8;
}

.center {
  text-align: center;
}

.status-pending,
.days-pending {
  background: var(--pending) !important;
  font-weight: 700;
}

.status-done,
.days-done {
  background: var(--done) !important;
  font-weight: 700;
}

.locked,
.empty {
  padding: 34px 18px;
  text-align: center;
  color: var(--muted);
}

.inline-form {
  display: grid;
  grid-template-columns: 150px 155px auto;
  gap: 8px;
  min-width: 430px;
}

@media (max-width: 820px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .wide,
  .full {
    grid-column: auto;
  }
}
