/* src/client/styles.css */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

:root {
  --accent-color: #0348c6;
  font-family: -apple-system, BlinkMacSystemFont, segoe ui, Helvetica, Arial, sans-serif, apple color emoji, segoe ui emoji;
  line-height: 1.5;
}

select, input[type="text"], input[type="number"], input[type="password"], input[type="email"], input[type="url"], input[type="date"], textarea {
  color: inherit;
  text-align: left;
  display: block;
  font-family: inherit;
  font-size: inherit;
  background-color: #fafafb;
  border: 1px solid #ccc;
  width: 100%;
  padding: .75rem;
}

:is(select, input[type="text"], input[type="number"], input[type="password"], input[type="email"], input[type="url"], input[type="date"], textarea):focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px hsl(from var(--accent-color) h s l / .2);
  background-color: #fff;
}

input[type="checkbox"] {
  appearance: none;
  display: inline-block;
  vertical-align: middle;
  border: 1px solid #ccc;
  width: 1.25rem;
  height: 1.25rem;
  margin: .25rem;
}

input[type="checkbox"]:checked {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

input[type="checkbox"]:focus {
  box-shadow: 0 0 0 3px hsl(from var(--accent-color) h s l / .2);
}

label:has( > input[type="checkbox"]) {
  display: flex;
  align-items:  start;
  font-weight: normal;
}

.table {
  overflow-x: auto;
  border: 1px solid #ededed;
  border-bottom: 0;
  max-width: 100%;
  margin-bottom: 2rem;
}

table {
  border-spacing: 0;
  width: 100%;
}

table th {
  text-align: left;
  background-color: #fafafb;
  font-weight: 500;
}

table th, table td {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  border-bottom: 1px solid #ededed;
  padding: .75rem;
}

a {
  text-decoration: none;
  color: var(--accent-color);
}

.modal {
  position: fixed;
  z-index: 1000;
  background: #0000000d;
  inset: 0;
}

.dialog {
  background: #fff;
  border-radius: 1rem;
  max-width: 700px;
  margin: 5rem auto;
  padding: 2rem;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem;
}

.btn {
  display: inline-flex;
  text-decoration: none;
  font-family: inherit;
  font-size: inherit;
  background: var(--accent-color);
  color: #fff;
  cursor: pointer;
  border: 0;
  padding: .75rem;
}

.btn:hover {
  background: hsl(from var(--accent-color) h s calc(l - 5));
}

.header {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  margin: 0 0 1rem;
}

.header h1 {
  margin: 0;
}

.header h2 {
  margin: 0;
}

.header h3 {
  margin: 0;
}

.header h4 {
  margin: 0;
}

.nav {
  display: flex;
  background-color: #fafafb;
  justify-content: center;
  margin-bottom: 2rem;
}

.nav a {
  display: block;
  padding: 1rem;
  font-weight: 500;
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  margin-bottom: .5rem;
  font-weight: 500;
}

.fieldset-horizontal {
  border: 1px solid #e9e9ea;
  padding: 1rem;
}

.fieldset-horizontal .field {
  display: flex;
}

.fieldset-horizontal .field:last-child {
  margin-bottom: 0;
}

.fieldset-horizontal .field label {
  flex: 0 0 30%;
  padding-top: .75rem;
}
