:root {
  color-scheme: dark;
  --bg: #101116;
  --panel: #1a1c25;
  --line: #30323e;
  --text: #e6e7ed;
  --muted: #9699a8;
  --blue: #6485ec;
  --green: #7bd49c;
  --red: #f08087;
  --amber: #edc46d;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    14px/1.5 -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button {
  border: 1px solid var(--line);
  background: #272a36;
  border-radius: 7px;
  padding: 8px 13px;
  cursor: pointer;
}
button:hover {
  background: #323644;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.primary {
  background: var(--blue);
  border-color: var(--blue);
  font-weight: 600;
}
input,
select {
  width: 100%;
  background: #242632;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 11px;
  min-height: 36px;
}
input:focus,
select:focus,
button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.shell {
  max-width: 1100px;
  margin: 22px auto;
  padding: 0 18px 40px;
}
.brand h1 {
  margin: 0;
  font-size: 21px;
}
.brand h1 span {
  color: #7798f6;
}
.brand p {
  margin: 3px 0 16px;
  color: var(--muted);
}
.session,
.tabs,
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
}
.session {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  margin-bottom: 19px;
}
.session .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}
.session .user {
  color: #91a9ff;
  font-weight: 600;
  flex: 1;
}
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 19px;
}
.tab {
  border: 0;
  background: transparent;
  color: #b0b2bf;
  padding: 8px 17px;
}
.tab.active {
  background: var(--blue);
  color: white;
}
.content {
  display: grid;
  gap: 16px;
}
.card {
  padding: 19px 20px;
  margin-bottom: 16px;
}
.card h2 {
  font-size: 16px;
  margin: 0 0 15px;
}
.tag {
  font-size: 11px;
  padding: 3px 8px;
  background: var(--blue);
  border-radius: 99px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}
.field {
  display: grid;
  gap: 5px;
}
.field label {
  font-size: 12px;
  color: #b0b2bf;
}
.toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 190px auto;
  gap: 9px;
  margin-bottom: 12px;
}
.toolbar.events {
  grid-template-columns: minmax(170px, 1fr) 170px auto auto auto auto;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 660px;
  font-size: 13px;
}
th,
td {
  text-align: left;
  padding: 9px 11px;
  border-bottom: 1px solid #2b2d38;
  white-space: nowrap;
}
th {
  font-weight: 600;
  color: #b4b6c3;
  background: #20222c;
}
.empty {
  text-align: center !important;
  color: var(--muted);
  padding: 22px !important;
}
.status {
  font-size: 11px;
  border-radius: 99px;
  padding: 3px 8px;
  font-weight: 650;
}
.status.ACTIVE,
.status.DELIVERED {
  background: #20382c;
  color: var(--green);
}
.status.OFFLINE,
.status.PENDING {
  background: #382d23;
  color: var(--amber);
}
.status.INACTIVE,
.status.CANCELLED {
  background: #34343c;
  color: #b7b8c1;
}
.battery {
  color: var(--green);
}
.battery.low {
  color: var(--red);
}
.pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  margin-top: 12px;
}
.dose-row {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
  margin: 8px 0;
}
.dose-row input[type='text'] {
  width: 160px;
}
.tray-group {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #b4b6c3;
  font-size: 12px;
}
.tray {
  display: flex;
  align-items: center;
  gap: 4px;
}
.help {
  color: var(--muted);
  font-size: 12px;
  margin: 10px 0;
}
.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: min(420px, calc(100vw - 32px));
  background: #222631;
  border: 1px solid #454957;
  box-shadow: 0 10px 35px #0007;
  border-radius: 8px;
  padding: 12px 16px;
  z-index: 5;
}
.toast.success {
  border-color: #447756;
}
.toast.error {
  border-color: #86464b;
}
.hidden {
  display: none !important;
}
.signin {
  max-width: 440px;
  margin: 80px auto;
}
.signin .card {
  padding: 26px;
}
.signin .field {
  margin: 12px 0;
}
.signin .primary {
  width: 100%;
}
.schedule-load {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
}
.actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: #0009;
  display: grid;
  place-items: center;
  z-index: 4;
}
.modal {
  width: min(470px, calc(100% - 28px));
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
}
.detail-list {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 8px;
  color: var(--muted);
}
.detail-list b {
  color: var(--text);
  font-weight: 500;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}
@media (max-width: 760px) {
  .shell {
    margin: 15px auto;
    padding: 0 12px 30px;
  }
  .tabs {
    overflow: auto;
  }
  .tab {
    white-space: nowrap;
  }
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
  .form-grid button {
    grid-column: 1/-1;
  }
  .toolbar,
  .toolbar.events {
    grid-template-columns: 1fr 1fr;
  }
  .toolbar input:first-child {
    grid-column: 1/-1;
  }
  .card {
    padding: 16px;
  }
  .schedule-load {
    grid-template-columns: 1fr;
  }
}
