.myreeflog {
  --mrl-border: #d7dee8;
  --mrl-muted: #64748b;
  --mrl-text: #0f172a;
  --mrl-bg: #f8fafc;
  --mrl-accent: #00baff;
  --mrl-danger: #c81e1e;
  color: var(--mrl-text);
}

.myreeflog-app {
  display: grid;
  gap: 18px;
}

.myreeflog-app-tabs {
  align-items: flex-end;
  border-bottom: 1px solid var(--mrl-border);
  display: flex;
  gap: 26px;
  overflow-x: auto;
}

.myreeflog-app-tabs a {
  border-bottom: 4px solid transparent;
  color: var(--mrl-text);
  font-weight: 400;
  padding: 0 0 10px;
  text-decoration: none;
  white-space: nowrap;
}

.myreeflog-app-tabs a.is-active {
  border-bottom-color: var(--mrl-accent);
  color: var(--mrl-text);
  font-weight: 800;
}

.myreeflog-quick-log-button {
  align-self: center;
  margin-left: auto;
  margin-bottom: 8px;
  white-space: nowrap;
}

.myreeflog-quick-log-dialog {
  max-width: 720px;
}

.myreeflog-quick-log-form {
  gap: 14px;
}

.myreeflog-quick-log-form .myreeflog-value-row {
  grid-template-columns: minmax(160px, 1fr) minmax(100px, .7fr) auto auto;
}

.myreeflog-app-view > .myreeflog {
  margin: 0;
}

.myreeflog-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin: 0 0 16px;
  width: 100%;
}

.myreeflog-aquarium-select {
  align-items: end;
  display: flex;
  gap: 12px;
  margin: 0;
  min-width: 260px;
}

.myreeflog-aquarium-select strong {
  padding: 9px 0;
  white-space: nowrap;
}

.myreeflog-range {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  margin: 0;
}

.myreeflog-dashboard-header {
  justify-content: flex-end;
}

.myreeflog-dashboard-header-title {
  flex: 1 1 auto;
}

.myreeflog-range label {
  display: grid;
  gap: 5px;
  font-weight: 600;
}

.myreeflog-range-status {
  color: var(--mrl-muted);
  font-size: 13px;
  padding: 9px 0;
}

.myreeflog-dashboard-stack {
  display: grid;
  gap: 28px;
}

.myreeflog-dashboard-aquarium {
  border-bottom: 1px solid var(--mrl-border);
  padding-bottom: 22px;
}

.myreeflog-dashboard-aquarium:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.myreeflog-heading-link {
  color: inherit;
  text-decoration: none;
}

.myreeflog-heading-link:hover {
  color: var(--mrl-accent);
}

.myreeflog-heading-link:focus-visible {
  outline: 2px solid var(--mrl-accent);
  outline-offset: 3px;
}

.myreeflog-admin-viewing {
  align-items: center;
  background: #0f172a;
  border-radius: 8px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
}

.myreeflog-admin-viewing a {
  color: #fff;
  font-weight: 700;
}

.myreeflog-form {
  border: 1px solid var(--mrl-border);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  margin: 0 0 20px;
  padding: 16px;
}

.myreeflog-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

.myreeflog-aquarium-core-row {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1.6fr) minmax(150px, .7fr) minmax(150px, .7fr);
}

.myreeflog-fieldset {
  border: 1px solid var(--mrl-border);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 12px;
}

.myreeflog-fieldset legend {
  color: var(--mrl-text);
  font-weight: 700;
}

.myreeflog-section-label {
  color: var(--mrl-text);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: -4px;
}
  padding: 0 6px;
}

.myreeflog-inline-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.myreeflog-ajax-status {
  color: var(--mrl-muted);
  font-size: 13px;
}

.myreeflog-ajax-status.is-success {
  color: #15803d;
}

.myreeflog-ajax-status.is-error {
  color: #b91c1c;
}

.myreeflog-help-text {
  color: var(--mrl-muted);
  font-size: 13px;
  margin: 0;
}

.myreeflog-device-map {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.myreeflog-debug-console {
  background: #0f172a;
  border-radius: 8px;
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
  max-height: 260px;
  overflow: auto;
  padding: 12px;
  white-space: pre-wrap;
}

.myreeflog-external-settings {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.myreeflog-compact-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.myreeflog-compact-form button {
  align-self: end;
}

.myreeflog-external-account-dialog-form {
  display: grid;
  gap: 14px;
}

.myreeflog-account-form-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.myreeflog-account-form-actions {
  align-items: end;
  display: flex;
  gap: 10px;
}

.myreeflog-account-form-actions button {
  min-height: 42px;
}

.myreeflog-account-form-actions .myreeflog-ajax-status {
  align-self: center;
  margin-left: auto;
}

.myreeflog-external-row {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0;
}

.myreeflog-external-row > .myreeflog-ajax-status {
  grid-column: 1 / -1;
  justify-self: end;
}

.myreeflog-external-account-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.myreeflog-external-account-actions > form {
  display: inline-flex;
  margin: 0;
}

.myreeflog-external-account-actions > .myreeflog-icon-button,
.myreeflog-external-account-actions > form > .myreeflog-icon-button,
.myreeflog-external-account-actions .myreeflog-inline-edit summary {
  height: 40px;
  min-height: 40px;
  min-width: 40px;
  width: 40px !important;
}

.myreeflog-external-account-actions .myreeflog-connection-indicator {
  flex: 0 0 auto;
}

.myreeflog-external-account-card {
  border: 1px solid var(--mrl-border);
  border-radius: 8px;
  margin: 10px 0;
  padding: 10px;
}

.myreeflog-external-row small,
.myreeflog-external-device-item small {
  color: var(--mrl-muted);
  display: block;
}

.myreeflog-inline-edit {
  position: relative;
}

.myreeflog-inline-edit summary {
  align-items: center;
  border: 1px solid var(--mrl-border);
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  list-style: none;
  width: 36px;
}

.myreeflog-inline-edit summary::-webkit-details-marker {
  display: none;
}

.myreeflog-inline-edit[open] form {
  background: #fff;
  border: 1px solid var(--mrl-border);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .16);
  margin-top: 8px;
  min-width: min(520px, 80vw);
  padding: 12px;
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 20;
}

.myreeflog-external-devices-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.myreeflog-external-device-item {
  background: #f8fafc;
  border: 1px solid var(--mrl-border);
  border-radius: 6px;
  display: grid;
  gap: 8px;
  padding: 8px 10px;
}

.myreeflog-external-device-unsupported {
  background: #f1f5f9;
  color: #64748b;
  opacity: .72;
}

.myreeflog-external-device-unsupported .myreeflog-device-status {
  opacity: .75;
}

.myreeflog-unused-devices {
  border: 1px solid var(--mrl-border);
  border-radius: 8px;
  margin-top: 8px;
  padding: 8px 10px;
}

.myreeflog-unused-devices summary {
  color: var(--mrl-muted);
  cursor: pointer;
  font-weight: 700;
}

.myreeflog-unused-devices[open] summary {
  margin-bottom: 8px;
}

.myreeflog-unused-devices-list {
  display: grid;
  gap: 8px;
}

.myreeflog-external-device-main {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.myreeflog-external-device-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.myreeflog-refresh-button,
.myreeflog-device-refresh-button,
button[data-myreeflog-test-external-account] {
  align-items: center;
  display: inline-flex;
  font-size: 0;
  height: 36px;
  justify-content: center;
  line-height: 1;
  min-height: 36px;
  min-width: 36px;
  padding: 6px !important;
  width: 36px;
}

.myreeflog-refresh-icon {
  background: currentColor;
  display: inline-block;
  flex: 0 0 18px;
  height: 18px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a9 9 0 1 1-2.64-6.36'/%3E%3Cpath d='M21 3v6h-6'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a9 9 0 1 1-2.64-6.36'/%3E%3Cpath d='M21 3v6h-6'/%3E%3C/svg%3E") center / contain no-repeat;
  width: 18px;
}

.myreeflog-refresh-button.is-loading .myreeflog-refresh-icon,
.myreeflog-device-refresh-button.is-loading .myreeflog-refresh-icon,
button[data-myreeflog-test-external-account].is-loading .myreeflog-refresh-icon {
  display: none;
}

.myreeflog-device-refresh-button.is-loading::before,
.myreeflog-secondary-button.is-loading::before {
  animation: myreeflog-spin .8s linear infinite;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  content: "";
  display: inline-block;
  height: 12px;
  margin-right: 6px;
  vertical-align: -2px;
  width: 12px;
}

.myreeflog-refresh-button.is-loading::before,
button[data-myreeflog-test-external-account].is-loading::before {
  margin-right: 0;
}

@keyframes myreeflog-spin {
  to {
    transform: rotate(360deg);
  }
}

.myreeflog-external-device-meta {
  color: var(--mrl-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 8px 14px;
}

.myreeflog-device-status {
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: var(--mrl-muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 5px 8px;
  white-space: nowrap;
}

.myreeflog-device-status::before {
  background: #94a3b8;
  border-radius: 999px;
  content: "";
  height: 8px;
  margin-right: 6px;
  width: 8px;
}

.myreeflog-device-status.is-online {
  border-color: #86efac;
  color: #15803d;
}

.myreeflog-device-status.is-online::before {
  background: #22c55e;
}

.myreeflog-device-status.is-offline {
  border-color: #fecaca;
  color: #b91c1c;
}

.myreeflog-device-status.is-offline::before {
  background: #ef4444;
}

.myreeflog-device-status.is-online_warning,
.myreeflog-device-status.is-firmware_update {
  border-color: #fde68a;
  color: #a16207;
}

.myreeflog-device-status.is-online_warning::before,
.myreeflog-device-status.is-firmware_update::before {
  background: #f59e0b;
}

.myreeflog-device-channels {
  border-top: 1px solid var(--mrl-border);
  display: grid;
  gap: 6px;
  padding-top: 8px;
}

.myreeflog-device-channel-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(150px, 1fr) minmax(420px, 2fr);
}

.myreeflog-device-channel-row select {
  min-width: 0;
}

.myreeflog-channel-map-form {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(140px, 1fr) minmax(190px, 1.2fr) auto;
}

.myreeflog-sensor-map-form {
  grid-template-columns: minmax(220px, 1.2fr) minmax(150px, .7fr) minmax(280px, 1fr) auto;
}

.myreeflog-device-channel-row:has(.myreeflog-sensor-map-form) {
  grid-template-columns: minmax(120px, .35fr) minmax(0, 2fr);
}

.myreeflog-device-channel-row:has(.myreeflog-aquawiz-sensor-map-form) {
  grid-template-columns: 210px minmax(0, 1fr);
}

.myreeflog-aquawiz-sensor-map-form {
  gap: 8px;
  grid-template-columns: minmax(220px, 1fr) minmax(130px, .55fr) minmax(230px, .95fr) minmax(280px, 1.2fr) 38px;
}

.myreeflog-aquawiz-control-toggle {
  align-items: center;
  display: flex;
  gap: 8px;
  line-height: 1.25;
  min-width: 0;
}

.myreeflog-aquawiz-control-toggle input[type="checkbox"] {
  appearance: auto;
  -webkit-appearance: checkbox;
  flex: 0 0 auto;
  height: 18px !important;
  margin: 0 !important;
  min-height: 18px !important;
  min-width: 18px !important;
  padding: 0 !important;
  position: static !important;
  width: 18px !important;
}

.myreeflog-aquawiz-control-toggle span {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.myreeflog-aquawiz-sensor-map-form .myreeflog-device-reading {
  justify-self: end;
  overflow: visible;
  text-align: right;
  text-overflow: clip;
  white-space: normal;
}

.myreeflog-aquawiz-sensor-map-form .myreeflog-icon-button {
  justify-self: end;
}

.myreeflog-fixed-parameter {
  color: var(--mrl-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.myreeflog-channel-dose-form {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(90px, 1fr) auto;
}

.myreeflog-channel-dose-form label {
  align-items: center;
  display: grid;
  gap: 4px;
  grid-template-columns: auto minmax(72px, 1fr);
  margin: 0;
}

.myreeflog-channel-dose-form input {
  min-width: 0;
}

.myreeflog-channel-dose-empty {
  color: var(--mrl-muted);
  font-size: 12px;
  justify-self: end;
}

.myreeflog-connection-indicator {
  align-items: center;
  color: var(--mrl-muted);
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
  justify-content: center;
}

.myreeflog-connection-indicator .myreeflog-check-icon {
  background: #cbd5e1;
  border-radius: 999px;
  display: inline-block;
  height: 18px;
  position: relative;
  width: 18px;
}

.myreeflog-connection-indicator.is-connected {
  color: #15803d;
}

.myreeflog-connection-indicator.is-connected .myreeflog-check-icon {
  background: #22c55e;
}

.myreeflog-dosing-settings-table input,
.myreeflog-dosing-settings-table select {
  min-width: 92px;
}

.myreeflog-dosing-settings-table {
  table-layout: fixed;
  width: 100%;
}

.myreeflog-dosing-settings-col-value {
  width: 52px;
}

.myreeflog-dosing-settings-col-product {
  width: 17%;
}

.myreeflog-dosing-settings-col-device {
  width: 15%;
}

.myreeflog-dosing-settings-col-current {
  width: 17%;
}

.myreeflog-dosing-settings-col-recommendation {
  width: 33%;
}

.myreeflog-dosing-settings-col-transfer {
  width: 180px;
}

.myreeflog-dosing-settings-table td {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.myreeflog-dosing-settings-table th {
  white-space: nowrap;
}

.myreeflog-dosing-settings-table th:first-child,
.myreeflog-dosing-settings-table td:first-child {
  padding-left: 4px;
  padding-right: 4px;
}

.myreeflog-dosing-settings-table th:nth-child(5),
.myreeflog-dosing-settings-table td:nth-child(5) {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.myreeflog-dosing-settings-table [data-myreeflog-dosing-recommendation] {
  max-width: 132px;
  width: 132px;
}

.myreeflog-dosing-settings-table [data-myreeflog-aquawiz-target] {
  max-width: 118px;
  width: 118px;
}

.myreeflog-dosing-current-text {
  line-height: 1.35;
}

.myreeflog-dosing-current-text strong {
  display: inline-block;
  font-size: 16px;
  margin-top: 2px;
}

.myreeflog-dosing-recommendation-text {
  display: block;
  line-height: 1.45;
  max-width: 100%;
}

.myreeflog-dosing-recommendation-text strong {
  display: inline;
  font-size: 16px;
  margin-right: 5px;
}

.myreeflog-dosing-recommendation-text small {
  color: var(--mrl-text);
  display: inline;
  font-size: 13px;
}

.myreeflog-dosing-settings-table .myreeflog-secondary-button {
  white-space: normal;
}

.myreeflog-dosing-row-status {
  color: var(--mrl-muted);
  display: block;
  font-size: 12px;
  margin-top: 6px;
  white-space: normal;
}

.myreeflog-dosing-current-value {
  color: var(--mrl-text);
  display: inline-block;
  font-weight: 700;
  min-width: 42px;
}

.myreeflog-channel-dose-id {
  color: var(--mrl-muted);
  font-size: 12px;
  white-space: nowrap;
}

.myreeflog-channel-map {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.myreeflog-channel-row {
  align-items: end;
  border: 1px solid var(--mrl-border);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 1.3fr) minmax(120px, .8fr) minmax(160px, 1fr) minmax(120px, .8fr) auto;
  padding: 10px;
}

.myreeflog-channel-row small {
  color: var(--mrl-muted);
  display: block;
}

.myreeflog input,
.myreeflog select,
.myreeflog textarea {
  border: 1px solid var(--mrl-border);
  border-radius: 6px;
  font: inherit;
  max-width: 100%;
  padding: 8px 10px;
}

@media (max-width: 780px) {
  .myreeflog-device-map {
    grid-template-columns: 1fr;
  }

  .myreeflog-compact-form,
  .myreeflog-account-form-row,
  .myreeflog-external-row,
  .myreeflog-channel-map-form,
  .myreeflog-channel-row {
    grid-template-columns: 1fr;
  }

  .myreeflog-device-channel-row:has(.myreeflog-aquawiz-sensor-map-form),
  .myreeflog-aquawiz-sensor-map-form {
    grid-template-columns: 1fr;
  }

  .myreeflog-aquawiz-sensor-map-form .myreeflog-device-reading,
  .myreeflog-aquawiz-sensor-map-form .myreeflog-icon-button {
    justify-self: start;
    text-align: left;
  }

  .myreeflog-account-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .myreeflog-account-form-actions .myreeflog-ajax-status {
    margin-left: 0;
  }
}

.myreeflog textarea {
  min-height: 90px;
}

.myreeflog button {
  background: var(--mrl-accent);
  border: 0;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 10px 14px;
  width: fit-content;
}

.myreeflog-danger-button {
  background: #b91c1c !important;
}

.myreeflog-cards {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(max(130px, calc((100% - 50px) / 6)), 1fr));
  margin: 0 0 20px;
}

.myreeflog-section-title {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin: 18px 0 10px;
}

.myreeflog-section-title h3 {
  margin: 0;
}

.myreeflog-settings-button {
  align-items: center;
  background: #e2e8f0 !important;
  color: #0f172a !important;
  display: inline-flex;
  font-size: 18px !important;
  height: 34px;
  justify-content: center;
  line-height: 1;
  padding: 0 !important;
  width: 34px !important;
}

.myreeflog-card {
  background: #fff;
  border: 1px solid var(--mrl-border);
  border-left: 5px solid #94a3b8;
  border-radius: 8px;
  display: grid;
  gap: 5px;
  grid-template-rows: auto auto auto 1fr auto;
  min-width: 0;
  padding: 10px 12px 12px;
}

.myreeflog-card-heading {
  align-items: start;
  display: flex;
  gap: 6px;
  justify-content: space-between;
  min-width: 0;
}

.myreeflog-panel-info-button {
  flex: 0 0 18px;
  font-size: 11px !important;
  height: 18px;
  line-height: 16px;
  min-height: 18px;
  min-width: 18px;
  width: 18px;
}

.myreeflog-card-link {
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

.myreeflog-card-link:hover {
  border-bottom-color: var(--mrl-accent);
  border-right-color: var(--mrl-accent);
  border-top-color: var(--mrl-accent);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.myreeflog-card-link:focus-visible {
  outline: 2px solid var(--mrl-accent);
  outline-offset: 3px;
}

.myreeflog-card-title-link {
  color: var(--mrl-muted);
  font-weight: 700;
  text-decoration: none;
}

.myreeflog-card-title-link:hover {
  color: var(--mrl-accent);
}

.myreeflog-card-title-link:focus-visible {
  outline: 2px solid var(--mrl-accent);
  outline-offset: 3px;
}

.myreeflog-card span,
.myreeflog-card small,
.myreeflog-card em {
  color: var(--mrl-muted);
}

.myreeflog-card span {
  font-size: 13px;
  line-height: 1.25;
}

.myreeflog-card strong {
  font-size: 26px;
  line-height: 1.1;
}

.myreeflog-card em {
  font-size: 12px;
  font-style: normal;
  line-height: 1.25;
}

.myreeflog-card small {
  font-size: 12px;
  line-height: 1.25;
}

.myreeflog-card-date {
  align-self: end;
  margin-top: auto;
}

.myreeflog-device-reading {
  color: var(--mrl-muted);
  font-size: 13px;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.myreeflog-sensor-map-form + .myreeflog-device-reading {
  display: none;
}

.myreeflog-card-stale {
  filter: grayscale(1);
  opacity: 0.52;
}

.myreeflog-card-external {
  background: #f8fcff;
}

.myreeflog-card-disabled,
.myreeflog-chart-placeholder {
  opacity: 0.62;
}

.myreeflog-card-disabled a,
.myreeflog-chart-placeholder a,
.myreeflog-setting-disabled a {
  color: #007cab;
  font-weight: 700;
}

.myreeflog-status-ok { border-left-color: #16a34a; }
.myreeflog-status-low,
.myreeflog-status-high { border-left-color: #f59e0b; }
.myreeflog-status-critical_low,
.myreeflog-status-critical_high { border-left-color: #dc2626; }

.myreeflog-chart-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(max(260px, calc((100% - 48px) / 4)), 1fr));
}

.myreeflog-chart-wide {
  grid-column: 1 / -1;
}

.myreeflog-chart-grid section {
  border: 1px solid var(--mrl-border);
  border-radius: 8px;
  cursor: grab;
  min-height: 280px;
  padding: 12px;
  position: relative;
}

.myreeflog-card[draggable="true"] {
  cursor: grab;
}

.myreeflog-chart-grid section:active,
.myreeflog-card[draggable="true"]:active {
  cursor: grabbing;
}

.myreeflog-chart-grid section[data-myreeflog-error="1"]::after {
  align-items: center;
  background: rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  bottom: 8px;
  color: #b91c1c;
  content: "Chartdaten konnten nicht geladen werden.";
  display: flex;
  font-weight: 700;
  justify-content: center;
  left: 8px;
  position: absolute;
  right: 8px;
  top: 42px;
}

.myreeflog-chart-grid section[data-myreeflog-empty="1"]::after {
  align-items: center;
  background: rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  bottom: 8px;
  color: var(--mrl-muted);
  content: "Keine Messwerte im gefilterten Zeitraum.";
  display: flex;
  font-weight: 700;
  justify-content: center;
  left: 8px;
  position: absolute;
  right: 8px;
  top: 42px;
}

.myreeflog-chart-grid section[data-myreeflog-empty="1"][data-myreeflog-chart-source="aquawiz"]::after {
  content: "Keine AquaWiz-Werte im gefilterten Zeitraum.";
}

.myreeflog-chart-grid section[data-myreeflog-empty="1"][data-myreeflog-chart-source="reeffactory"]::after {
  content: "Keine ReefFactory-Werte im gefilterten Zeitraum.";
}

.myreeflog-chart-grid h3 {
  font-size: 16px;
  margin: 0 0 10px;
}

.myreeflog-chart-current {
  color: var(--mrl-muted);
  font-size: 13px;
  font-weight: 700;
  margin-left: 6px;
  white-space: nowrap;
}

.myreeflog-chart-title {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.myreeflog-chart-actions {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

.myreeflog-info-wrap {
  display: inline-flex;
  position: relative;
}

.myreeflog-info-button {
  align-items: center;
  background: transparent !important;
  border: 1px solid var(--mrl-muted) !important;
  border-radius: 999px !important;
  color: var(--mrl-text) !important;
  display: inline-flex !important;
  font-size: 11px !important;
  height: 18px;
  justify-content: center;
  line-height: 1;
  padding: 0 !important;
  width: 18px !important;
}

.myreeflog-info-panel {
  background: #fff;
  border: 1px solid var(--mrl-border);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  color: var(--mrl-text);
  display: none;
  font-size: 13px;
  line-height: 1.4;
  padding: 10px 12px;
  position: absolute;
  right: 0;
  top: 32px;
  width: min(320px, 78vw);
  z-index: 20;
}

.myreeflog-info-wrap:hover .myreeflog-info-panel,
.myreeflog-info-wrap:focus-within .myreeflog-info-panel {
  display: block;
}

.myreeflog-chart-title form {
  margin: 0;
}

.myreeflog-dialog-heading {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin: 0 0 14px;
}

.myreeflog-dialog-heading h3 {
  margin: 0;
}

.myreeflog-chart-info-dialog {
  max-width: min(760px, 94vw);
  width: min(760px, 94vw);
}

.myreeflog-chart-info-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.myreeflog-chart-info-grid section {
  background: #f8fafc;
  border: 1px solid var(--mrl-border);
  border-radius: 8px;
  padding: 12px;
}

.myreeflog-chart-info-grid h4 {
  color: var(--mrl-muted);
  font-size: 13px;
  margin: 0 0 6px;
  text-transform: uppercase;
}

.myreeflog-chart-info-grid p {
  margin: 0;
}

.myreeflog-aquawiz-refresh {
  height: 30px;
  min-height: 30px;
  padding: 0 !important;
  width: 30px !important;
}

.myreeflog-dialog {
  border: 1px solid var(--mrl-border);
  border-radius: 8px;
  max-width: min(720px, 92vw);
  padding: 18px;
  width: 620px;
}

.myreeflog-dialog::backdrop {
  background: rgba(15, 23, 42, 0.35);
}

.myreeflog-aquarium-editor-dialog {
  max-height: 88vh;
  max-width: min(1180px, 94vw);
  overflow: auto;
  width: min(1180px, 94vw);
}

.myreeflog-add-aquarium-button {
  align-items: center;
  background: var(--mrl-accent);
  border-radius: 7px;
  color: #fff !important;
  display: inline-flex;
  font-weight: 800;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  text-decoration: none;
}

.myreeflog-add-aquarium-action {
  margin-top: 18px;
}

.myreeflog-add-aquarium-button span {
  font-size: 22px;
  line-height: 1;
}

.myreeflog-dialog h4 {
  margin: 16px 0 8px;
}

.myreeflog-settings-list {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 14px 0;
}

.myreeflog-settings-group-title {
  color: var(--mrl-text);
  font-size: 13px;
  font-weight: 700;
  grid-column: 1 / -1;
  margin: 10px 0 0;
}

.myreeflog-settings-list label {
  align-items: center;
  border: 1px solid var(--mrl-border);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  position: relative;
}

.myreeflog-settings-list .myreeflog-setting-source {
  color: var(--mrl-muted);
  display: block;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.25;
  margin-top: 2px;
}

.myreeflog-setting-disabled {
  opacity: 0.58;
}

.myreeflog-setting-disabled small {
  display: block;
  font-size: 12px;
  grid-column: 1 / -1;
  line-height: 1.3;
}

.myreeflog-sortable-list label {
  cursor: grab;
}

.myreeflog-sortable-list label:active {
  cursor: grabbing;
}

.myreeflog-sortable-list b {
  color: var(--mrl-muted);
  flex: 0 0 auto;
  height: 18px;
  position: relative;
  width: 12px;
}

.myreeflog-sortable-list b::before {
  content: "⋮⋮";
  font-size: 16px;
  left: 0;
  line-height: 1;
  position: absolute;
  top: 1px;
}

.myreeflog-dragging {
  opacity: 0.55;
}

.myreeflog-sortable-list b,
.myreeflog-sortable-list b::before {
  content: "" !important;
  display: none !important;
}

.myreeflog-settings-list input[type="checkbox"] {
  height: 1px !important;
  opacity: 0 !important;
  position: absolute !important;
  right: 14px;
  width: 1px !important;
}

.myreeflog-settings-list i {
  align-items: center;
  border: 1px solid #94a3b8;
  border-radius: 5px;
  display: inline-flex;
  flex: 0 0 22px;
  height: 22px;
  justify-content: center;
  width: 22px;
}

.myreeflog-settings-list input[type="checkbox"]:checked + i {
  background: var(--mrl-accent);
  border-color: var(--mrl-accent);
}

.myreeflog-settings-list input[type="checkbox"]:checked + i::after {
  color: #fff;
  content: "✓";
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.myreeflog-dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.myreeflog-dialog-actions button {
  min-width: 120px;
}

.myreeflog-icon-button {
  align-items: center;
  background: #e2e8f0 !important;
  border-radius: 4px !important;
  color: #0f172a !important;
  display: inline-flex;
  height: 28px;
  justify-content: center;
  padding: 0 !important;
  width: 28px !important;
  text-decoration: none;
}

.myreeflog-channel-map-form .myreeflog-icon-button.myreeflog-mapping-saved,
.myreeflog-channel-map-form .myreeflog-icon-button.myreeflog-mapping-saved:disabled {
  background: #16a34a !important;
  color: #fff !important;
  opacity: 1 !important;
}

.myreeflog-channel-map-form.is-saving .myreeflog-icon-button {
  opacity: .72;
}

.myreeflog-danger-button.myreeflog-icon-button {
  background: #b91c1c !important;
  color: #fff !important;
}

.myreeflog-x-icon {
  height: 14px;
  position: relative;
  width: 14px;
}

.myreeflog-x-icon::before,
.myreeflog-x-icon::after {
  background: currentColor;
  border-radius: 1px;
  content: "";
  height: 2px;
  left: 1px;
  position: absolute;
  top: 6px;
  width: 12px;
}

.myreeflog-x-icon::before {
  transform: rotate(45deg);
}

.myreeflog-x-icon::after {
  transform: rotate(-45deg);
}

.myreeflog-eye-icon {
  background: currentColor;
  display: inline-block;
  height: 18px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
  width: 18px;
}

.myreeflog-eye-icon::after {
  content: none;
}

.myreeflog-pencil-icon {
  background: currentColor;
  display: inline-block;
  height: 17px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21.17 6.83 17.17 2.83 3 17v4h4L21.17 6.83z'/%3E%3Cpath d='M15 5l4 4'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21.17 6.83 17.17 2.83 3 17v4h4L21.17 6.83z'/%3E%3Cpath d='M15 5l4 4'/%3E%3C/svg%3E") center / contain no-repeat;
  width: 17px;
}

.myreeflog-pencil-icon::before {
  content: none;
}

.myreeflog-pencil-icon::after {
  content: "";
  display: none;
}

.myreeflog-trash-icon {
  background: currentColor;
  display: inline-block;
  height: 17px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M8 6V4h8v2'/%3E%3Cpath d='M6 6l1 15h10l1-15'/%3E%3Cpath d='M10 11v6'/%3E%3Cpath d='M14 11v6'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M8 6V4h8v2'/%3E%3Cpath d='M6 6l1 15h10l1-15'/%3E%3Cpath d='M10 11v6'/%3E%3Cpath d='M14 11v6'/%3E%3C/svg%3E") center / contain no-repeat;
  width: 17px;
}

.myreeflog-check-button {
  align-items: center;
  border-radius: 4px !important;
  display: inline-flex !important;
  height: 34px;
  justify-content: center;
  padding: 0 !important;
  width: 34px !important;
}

.myreeflog-check-button-done,
.myreeflog-check-button-done:disabled {
  background: #16a34a !important;
  color: #fff !important;
  opacity: 1 !important;
}

.myreeflog-check-icon {
  border-bottom: 3px solid currentColor;
  border-right: 3px solid currentColor;
  height: 14px;
  transform: rotate(45deg) translate(-1px, -2px);
  width: 8px;
}

.myreeflog-detail-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.myreeflog-dosing {
  border: 1px solid var(--mrl-border);
  border-radius: 8px;
  margin: 18px 0;
  overflow-x: auto;
  padding: 12px;
}

.myreeflog-dosing h3 {
  margin-top: 0;
}

.myreeflog-dosing-block {
  margin-top: 14px;
}

.myreeflog-dosing-block h4 {
  font-size: 15px;
  margin: 0 0 8px;
}

.myreeflog-dosing-footer-link {
  margin: 14px 0 0;
  text-align: right;
}

.myreeflog-dosing-footer-link a {
  font-weight: 700;
}

.myreeflog-dosing table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}

.myreeflog-dosing-table-major {
  min-width: 1040px;
}

.myreeflog-dosing-table-single {
  min-width: 1060px;
}

.myreeflog-dosing-col-value {
  width: 58px;
}

.myreeflog-dosing-col-product {
  width: 250px;
}

.myreeflog-dosing-col-lift {
  width: 305px;
}

.myreeflog-dosing-col-daily {
  width: 145px;
}

.myreeflog-dosing-col-actions {
  width: 430px;
}

.myreeflog-dosing-table-single .myreeflog-dosing-col-product {
  width: 230px;
}

.myreeflog-dosing-table-single .myreeflog-dosing-col-lift {
  width: 360px;
}

.myreeflog-dosing-table-single .myreeflog-dosing-col-actions {
  width: 360px;
}

.myreeflog table {
  width: 100%;
}

.myreeflog-dosing th,
.myreeflog-dosing td {
  border-bottom: 1px solid var(--mrl-border);
  padding: 8px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.myreeflog-dosing th:nth-child(4),
.myreeflog-dosing td:nth-child(4) {
  text-align: left;
}

.myreeflog-dosing-action-heading {
  display: inline-block;
  width: 180px;
}

.myreeflog-dosing-action-heading:last-child {
  width: 205px;
}

.myreeflog-dosing td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.myreeflog-dosing-actions {
  align-items: center;
  display: block;
  justify-content: flex-start;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap;
}

.myreeflog-dose-control-row {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr);
  justify-content: start;
}

.myreeflog-dose-control-row-daily {
  grid-template-columns: 180px 180px 205px;
}

.myreeflog-dose-group {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: 88px 42px minmax(150px, 1fr) 34px;
  white-space: nowrap;
}

.myreeflog-dose-group-disabled {
  background: #f1f5f9;
  border-radius: 6px;
  color: #94a3b8;
  padding: 4px;
}

.myreeflog-dose-group-linked .myreeflog-check-button {
  background: var(--mrl-accent) !important;
  color: #fff !important;
}

.myreeflog-dose-group-manual .myreeflog-check-button {
  background: rgba(0, 186, 255, 0.5) !important;
  color: #fff !important;
}

.myreeflog-dose-group .myreeflog-check-button-done,
.myreeflog-dose-group .myreeflog-check-button-done:disabled {
  background: #16a34a !important;
  color: #fff !important;
  opacity: 1 !important;
}

.myreeflog-dose-group-empty .myreeflog-check-button,
.myreeflog-dose-group-empty input {
  background: #e5e7eb !important;
  color: #94a3b8 !important;
}

.myreeflog-dose-label,
.myreeflog-dose-unit {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.myreeflog-dose-mode-label {
  color: var(--mrl-muted);
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
}

.myreeflog-dosing-actions input {
  max-width: 88px;
  width: 88px;
}

.myreeflog-dosing-actions select {
  min-width: 0;
  width: 100%;
}

.myreeflog-daily-dose-setting {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: 88px 42px 34px;
  white-space: nowrap;
}

.myreeflog-daily-dose-current {
  color: var(--mrl-text);
  font-weight: 700;
}

.myreeflog-daily-dose-current-wrap {
  align-items: center;
  display: flex;
  min-height: 34px;
}

.myreeflog-dosing-cluster-row td {
  background: #f8fafc;
  color: var(--mrl-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.myreeflog-secondary-button {
  background: #e2e8f0 !important;
  color: var(--mrl-text) !important;
}

.myreeflog-inline-icon-button {
  align-items: center;
  display: inline-flex !important;
  font-size: 14px !important;
  gap: 8px;
  height: auto !important;
  min-height: 38px;
  min-width: 0 !important;
  padding: 8px 12px !important;
  white-space: nowrap;
  width: auto !important;
}

.myreeflog-inline-icon-button .myreeflog-pencil-icon,
.myreeflog-inline-icon-button .myreeflog-refresh-icon {
  flex: 0 0 auto;
}

.myreeflog-secondary-button.is-success {
  background: #16a34a !important;
  color: #fff !important;
}

.myreeflog-form-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.myreeflog-terms-gate,
.myreeflog-terms-settings {
  border: 1px solid var(--mrl-border);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 16px;
}

.myreeflog-terms-gate h2,
.myreeflog-terms-settings h3 {
  margin: 0;
}

.myreeflog-terms-form {
  border: 0;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.myreeflog-terms-checkbox {
  align-items: center;
  display: flex !important;
  flex-direction: row !important;
  gap: 10px;
  justify-content: flex-start;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: none;
}

.myreeflog-terms-checkbox input {
  appearance: auto;
  -webkit-appearance: checkbox;
  flex: 0 0 auto;
  height: 18px !important;
  margin: 0 !important;
  min-height: 18px !important;
  min-width: 18px !important;
  padding: 0 !important;
  position: static !important;
  width: 18px !important;
}

.myreeflog-terms-checkbox span {
  display: inline;
  font-weight: 600;
  text-transform: none;
}

.myreeflog-link-button {
  background: transparent !important;
  color: var(--mrl-accent) !important;
  display: inline !important;
  font-weight: 700 !important;
  padding: 0 !important;
  text-decoration: underline;
  width: auto !important;
}

.myreeflog-terms-content {
  line-height: 1.55;
  max-height: min(65vh, 620px);
  overflow: auto;
}

.myreeflog-kh-target-mode {
  display: grid;
  gap: 10px;
}

.myreeflog-radio-row {
  align-items: center;
  display: flex !important;
  flex-direction: row !important;
  gap: 10px;
  line-height: 1.35;
}

.myreeflog-radio-row input[type="radio"] {
  appearance: auto;
  -webkit-appearance: radio;
  flex: 0 0 auto;
  height: 18px !important;
  margin: 0 !important;
  min-height: 18px !important;
  min-width: 18px !important;
  padding: 0 !important;
  position: static !important;
  width: 18px !important;
}

.myreeflog-radio-row.myreeflog-setting-disabled {
  opacity: .55;
}

.myreeflog-dosing-separator {
  color: var(--mrl-muted);
  font-weight: 700;
  padding: 0 3px;
}

.myreeflog-current-photo {
  margin: 0 0 18px;
}

.myreeflog-current-photo img {
  border-radius: 8px;
  display: block;
  max-height: 360px;
  object-fit: cover;
  width: 100%;
}

.myreeflog-current-photo figcaption,
.myreeflog-help {
  color: var(--mrl-muted);
  font-size: 13px;
}

.myreeflog-photo-gallery {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  margin: 10px 0;
}

.myreeflog-photo-tile {
  aspect-ratio: 1;
  margin: 0;
  overflow: hidden;
  position: relative;
}

.myreeflog-photo-open {
  background: transparent !important;
  border: 0 !important;
  cursor: zoom-in;
  height: 100%;
  padding: 0 !important;
  width: 100% !important;
}

.myreeflog-photo-open img {
  border-radius: 8px;
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.myreeflog-photo-delete {
  align-items: center;
  background: #fff;
  border: 1px solid var(--mrl-border);
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  height: 34px;
  justify-content: center;
  position: absolute;
  right: 7px;
  top: 7px;
  width: 34px;
}

.myreeflog-photo-drop {
  align-items: center;
  border: 1px dashed var(--mrl-border);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 6px;
  justify-items: center;
  margin-top: 10px;
  padding: 18px;
  text-align: center;
  transition: border-color .15s ease, background .15s ease;
}

.myreeflog-photo-drop input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.myreeflog-photo-drop span {
  color: var(--mrl-muted);
  font-size: 13px;
}

.myreeflog-photo-drop.is-dragging {
  background: rgba(0, 186, 255, .08);
  border-color: var(--mrl-accent);
}

.myreeflog-photo-tile.is-marked-delete img {
  filter: grayscale(1);
  opacity: .35;
}

.myreeflog-photo-tile.is-marked-delete .myreeflog-photo-delete {
  background: var(--mrl-danger);
  border-color: var(--mrl-danger);
  color: #fff;
}

.myreeflog-photo-carousel {
  display: grid;
  gap: 12px;
  grid-auto-columns: 128px;
  grid-auto-flow: column;
  margin: 0 0 18px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}

.myreeflog-photo-carousel::-webkit-scrollbar {
  display: none;
}

.myreeflog-photo-carousel figure {
  margin: 0;
  scroll-snap-align: start;
}

.myreeflog-photo-carousel img {
  aspect-ratio: 1;
  border-radius: 8px;
  display: block;
  object-fit: cover;
  width: 100%;
}

.myreeflog-photo-carousel figcaption {
  color: var(--mrl-muted);
  font-size: 13px;
  margin-top: 5px;
}

.myreeflog-photo-lightbox {
  background: transparent;
  border: 0;
  max-width: min(94vw, 1100px);
  padding: 0;
}

.myreeflog-photo-lightbox::backdrop {
  background: rgba(15, 23, 42, .78);
}

.myreeflog-photo-lightbox img {
  border-radius: 8px;
  display: block;
  max-height: 88vh;
  max-width: 94vw;
  object-fit: contain;
}

.myreeflog-photo-lightbox-close {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
}

.myreeflog-chart-control {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}

.myreeflog-icp-recommendations {
  background: #f8fafc;
  border: 1px solid var(--mrl-border);
  border-radius: 8px;
  margin: 0 0 18px;
  padding: 12px;
}

.myreeflog-icp-recommendations h3 {
  margin-top: 0;
}

.myreeflog-icp-preview {
  max-height: min(86vh, 920px);
  max-width: min(1180px, 96vw);
  overflow: auto;
  width: min(1180px, 96vw);
}

.myreeflog-icp-preview-table {
  display: grid;
  gap: 8px;
  margin: 14px 0 18px;
  max-height: none;
  overflow: visible;
}

.myreeflog-icp-preview-table .myreeflog-list-header,
.myreeflog-icp-preview-table .myreeflog-list-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(120px, 1fr);
}

.myreeflog-icp-preview-mapping .myreeflog-list-header,
.myreeflog-icp-preview-mapping .myreeflog-list-row {
  align-items: center;
  grid-template-columns: 86px minmax(190px, 1.15fr) minmax(120px, .75fr) minmax(190px, 1fr);
}

.myreeflog-icp-preview-mapping code {
  white-space: normal;
  word-break: break-word;
}

.myreeflog-icp-preview .myreeflog-dialog-actions form {
  display: grid;
  gap: 10px;
  margin: 0;
}

.myreeflog-icp-preview .myreeflog-dialog-actions {
  display: grid;
  gap: 10px;
  justify-content: stretch;
}

.myreeflog-icp-preview .myreeflog-dialog-actions button {
  justify-self: end;
}

.myreeflog-pdf-drop {
  align-items: center;
  border: 1px dashed var(--mrl-border);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 18px;
  text-align: center;
  transition: border-color .15s ease, background .15s ease;
}

.myreeflog-pdf-drop input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.myreeflog-pdf-drop span {
  color: var(--mrl-muted);
  font-size: 13px;
}

.myreeflog-pdf-drop.is-dragging {
  background: rgba(0, 186, 255, .08);
  border-color: var(--mrl-accent);
}

.myreeflog-icp-preview-item {
  border-top: 1px solid var(--mrl-border);
  padding-top: 12px;
}

.myreeflog-icp-preview-meta {
  color: var(--mrl-text);
  font-weight: 700;
  margin: 4px 0 8px;
}

.myreeflog-icp-preview-meta + p {
  display: none;
}

.myreeflog-icp-preview-item:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.myreeflog-profile-presets {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.myreeflog-profile-card {
  border: 1px solid var(--mrl-border);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 5px;
  padding: 12px;
  position: relative;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.myreeflog-profile-card input {
  height: 1px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  width: 1px;
}

.myreeflog-profile-card:has(input:checked) {
  background: #f0fbff;
  border-color: var(--mrl-accent);
  box-shadow: inset 4px 0 0 var(--mrl-accent);
}

.myreeflog-profile-card span {
  color: var(--mrl-muted);
  font-size: 13px;
}

.myreeflog-profile-card em {
  font-style: normal;
  font-weight: 700;
}

.myreeflog-icp-debug {
  margin-top: 16px;
}

.myreeflog-icp-debug dl {
  display: grid;
  gap: 6px;
  margin: 0;
}

.myreeflog-icp-debug dl > div {
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
}

.myreeflog-icp-debug dt {
  color: var(--mrl-muted);
  font-weight: 700;
}

.myreeflog-icp-debug dd {
  margin: 0;
  min-width: 0;
}

.myreeflog-icp-debug code {
  white-space: pre-wrap;
  word-break: break-word;
}

.myreeflog-value-rows {
  display: grid;
  gap: 8px;
}

.myreeflog-value-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(180px, 1fr) minmax(120px, 160px) minmax(50px, auto) auto;
}

.myreeflog-value-unit {
  color: var(--mrl-muted);
  white-space: nowrap;
}

.myreeflog-chart-grid canvas {
  height: 230px !important;
}

.myreeflog-parameter-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.myreeflog-parameter-grid > div {
  border: 1px solid var(--mrl-border);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.myreeflog-collapsible {
  border: 1px solid var(--mrl-border);
  border-radius: 8px;
  padding: 10px;
}

.myreeflog-collapsible summary {
  cursor: pointer;
  font-weight: 700;
}

.myreeflog-collapsible[open] summary {
  margin-bottom: 12px;
}

.myreeflog-entry-details {
  margin: 0 0 20px;
}

.myreeflog-entry-details .myreeflog-form {
  border: 0;
  margin: 0;
  padding: 0;
}

.myreeflog-compact-details {
  padding: 8px 10px;
}

.myreeflog-compact-details summary {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.myreeflog-compact-details textarea {
  min-height: 54px;
}

.myreeflog-camera-icon,
.myreeflog-note-icon {
  background: currentColor;
  display: inline-block;
  height: 18px;
  width: 18px;
}

.myreeflog-camera-icon {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.5 4 16 7h3a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h3l1.5-3h5Z'/%3E%3Ccircle cx='12' cy='13' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.5 4 16 7h3a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h3l1.5-3h5Z'/%3E%3Ccircle cx='12' cy='13' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
}

.myreeflog-note-icon {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16v16H4z'/%3E%3Cpath d='M8 9h8'/%3E%3Cpath d='M8 13h8'/%3E%3Cpath d='M8 17h5'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16v16H4z'/%3E%3Cpath d='M8 9h8'/%3E%3Cpath d='M8 13h8'/%3E%3Cpath d='M8 17h5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.myreeflog-logbook-filter {
  align-items: end;
  justify-content: flex-start;
}

.myreeflog-logbook-filter label {
  display: grid;
  gap: 5px;
  font-weight: 600;
}

.myreeflog-logbook-filter label:first-child select {
  min-width: 220px;
}

.myreeflog-pagination {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 12px;
}

.myreeflog-parameter-toggle {
  align-items: center !important;
  display: flex !important;
  flex-direction: row !important;
  gap: 8px !important;
}

.myreeflog-parameter-toggle input[type="checkbox"] {
  flex: 0 0 auto;
  height: 18px;
  margin: 0 !important;
  padding: 0;
  width: 18px;
}

.myreeflog-list {
  display: grid;
  gap: 8px;
}

.myreeflog-measurement-list {
  overflow-x: auto;
}

.myreeflog-list > a,
.myreeflog-notice {
  background: var(--mrl-bg);
  border: 1px solid var(--mrl-border);
  border-radius: 8px;
  display: block;
  padding: 10px 12px;
  text-decoration: none;
}

.myreeflog-login {
  margin: 0 auto;
  max-width: 520px;
}

.myreeflog-login-form h2 {
  margin: 0;
}

.myreeflog-login-remember {
  align-items: center;
  display: flex !important;
  flex-direction: row;
  gap: 8px !important;
  justify-content: flex-start;
}

.myreeflog-login-remember input[type="checkbox"] {
  appearance: auto;
  -webkit-appearance: checkbox;
  flex: 0 0 auto;
  height: 18px !important;
  margin: 0 !important;
  min-height: 18px !important;
  min-width: 18px !important;
  padding: 0 !important;
  position: static !important;
  width: 18px !important;
}

.myreeflog-error {
  border-color: #fecaca;
  color: #991b1b;
}

.myreeflog-primary-link {
  align-items: center;
  background: var(--mrl-accent);
  border-radius: 6px;
  color: #fff;
  display: inline-flex;
  font-weight: 800;
  min-height: 40px;
  padding: 8px 12px;
  text-decoration: none;
}

.myreeflog-list-header,
.myreeflog-list-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 145px minmax(150px, 1fr) minmax(220px, 2fr) auto auto auto;
}

.myreeflog-measurement-list .myreeflog-list-header,
.myreeflog-measurement-list .myreeflog-list-row {
  align-items: center !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  min-width: 0;
}

.myreeflog-measurement-list .myreeflog-list-header > span:nth-child(1),
.myreeflog-measurement-list .myreeflog-measurement-created,
.myreeflog-measurement-list .myreeflog-list-header > span:nth-child(2),
.myreeflog-measurement-list .myreeflog-measurement-date {
  flex: 0 0 112px;
}

.myreeflog-measurement-list .myreeflog-list-header > span:nth-child(3),
.myreeflog-measurement-list .myreeflog-measurement-icp-id {
  flex: 0 0 110px;
}

.myreeflog-measurement-list .myreeflog-list-header > span:nth-child(4),
.myreeflog-measurement-list .myreeflog-measurement-title {
  flex: 0 0 170px;
}

.myreeflog-measurement-list .myreeflog-list-header > span:nth-child(5),
.myreeflog-measurement-list .myreeflog-measurement-values {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.myreeflog-measurement-list .myreeflog-list-header > span:nth-child(6),
.myreeflog-measurement-list .myreeflog-list-header > span:nth-child(7),
.myreeflog-measurement-list .myreeflog-action-link {
  flex: 0 0 auto;
}

.myreeflog-measurement-list .myreeflog-list-header > span:nth-child(8),
.myreeflog-measurement-list .myreeflog-list-row form {
  flex: 0 0 auto;
}

.myreeflog-list-header {
  color: var(--mrl-muted);
  font-size: 13px;
  font-weight: 700;
  padding: 0 12px;
}

.myreeflog-list-row {
  background: var(--mrl-bg);
  border: 1px solid var(--mrl-border);
  border-radius: 8px;
  padding: 10px 12px;
}

.myreeflog-list-row form {
  display: inline-flex !important;
  margin: 0 !important;
  width: auto !important;
}

.myreeflog-list-row button {
  display: inline-flex !important;
  padding: 8px 10px;
  width: auto !important;
}

.myreeflog-aquarium-row {
  align-items: center;
  background: var(--mrl-bg);
  border: 1px solid var(--mrl-border);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 10px 12px;
}

.myreeflog-aquarium-row a {
  text-decoration: none;
}

.myreeflog-aquarium-row form {
  margin: 0 !important;
}

.myreeflog-action-link {
  align-items: center;
  background: transparent !important;
  border: 1px solid var(--mrl-border);
  border-radius: 6px;
  color: var(--mrl-text);
  display: inline-flex !important;
  justify-content: center;
  line-height: 1.2;
  padding: 7px 10px !important;
  text-align: center;
  text-decoration: none;
  width: auto !important;
}

.myreeflog-action-link.myreeflog-icon-button {
  height: 34px;
  padding: 0 !important;
  width: 34px !important;
}

.myreeflog-measurement-detail {
  border: 1px solid var(--mrl-border);
  border-radius: 8px;
  margin: 0 0 18px;
  padding: 14px;
}

.myreeflog-measurement-values-details {
  margin: 14px 0;
}

.myreeflog-view-toggle {
  display: inline-flex;
  gap: 6px;
  margin: 10px 0 2px;
}

.myreeflog-view-toggle button {
  background: #e2e8f0 !important;
  color: var(--mrl-text) !important;
  min-height: 34px;
  padding: 7px 12px !important;
}

.myreeflog-view-toggle button.is-active {
  background: var(--mrl-accent) !important;
  color: #fff !important;
}

.myreeflog-values-list {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin: 12px 0;
}

.myreeflog-values-list div {
  background: var(--mrl-bg);
  border: 1px solid var(--mrl-border);
  border-left: 5px solid #94a3b8;
  border-radius: 8px;
  padding: 10px;
}

.myreeflog-values-list dt {
  color: var(--mrl-muted);
  font-size: 13px;
}

.myreeflog-values-list dd {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.myreeflog-values-list small {
  color: var(--mrl-muted);
  display: block;
  font-size: 12px;
  line-height: 1.25;
  margin-top: 5px;
}

.myreeflog-values-table {
  border-collapse: collapse;
  margin: 12px 0 0;
  width: 100%;
}

.myreeflog-values-table th,
.myreeflog-values-table td {
  border-bottom: 1px solid var(--mrl-border);
  padding: 9px 8px;
  text-align: left;
  vertical-align: top;
}

.myreeflog-values-table tr {
  border-left: 5px solid #94a3b8;
}

@media (max-width: 760px) {
  .myreeflog {
    font-size: 15px;
  }

  .myreeflog-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .myreeflog-aquarium-select,
  .myreeflog-range {
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-start;
  }

  .myreeflog-aquarium-select select,
  .myreeflog-range select,
  .myreeflog-range input,
  .myreeflog-form input,
  .myreeflog-form select,
  .myreeflog-form textarea {
    min-height: 44px;
    width: 100%;
  }

  .myreeflog-section-title {
    align-items: center;
    margin-top: 16px;
  }

  .myreeflog-settings-button,
  .myreeflog-icon-button,
  .myreeflog-action-link.myreeflog-icon-button,
  .myreeflog-check-button {
    height: 42px !important;
    width: 42px !important;
  }

  .myreeflog-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .myreeflog-card {
    gap: 4px;
    padding: 9px 10px 10px;
  }

  .myreeflog-card strong {
    font-size: 24px;
  }

  .myreeflog-card em {
    display: none;
  }

  .myreeflog-chart-grid {
    grid-template-columns: 1fr;
  }

  .myreeflog-chart-grid section {
    min-height: 260px;
  }

  .myreeflog-chart-info-grid {
    grid-template-columns: 1fr;
  }

  .myreeflog-value-row {
    grid-template-columns: 1fr;
  }

  .myreeflog-value-row button,
  .myreeflog-form button {
    justify-content: center;
    min-height: 44px;
    width: 100% !important;
  }

  .myreeflog-dialog {
    max-height: 86vh;
    overflow: auto;
    width: min(94vw, 620px);
  }

  .myreeflog-icp-preview {
    max-width: 94vw;
    width: 94vw;
  }

  .myreeflog-icp-preview-mapping .myreeflog-list-header {
    display: none;
  }

  .myreeflog-icp-preview-mapping .myreeflog-list-row {
    grid-template-columns: 1fr;
  }

  .myreeflog-icp-preview .myreeflog-dialog-actions button {
    justify-self: stretch;
  }

  .myreeflog-settings-list {
    grid-template-columns: 1fr;
  }

  .myreeflog-profile-presets {
    grid-template-columns: 1fr;
  }

  .myreeflog-aquarium-core-row {
    grid-template-columns: 1fr;
  }

  .myreeflog-photo-carousel {
    grid-auto-columns: 112px;
  }

  .myreeflog-list-header {
    display: none;
  }

  .myreeflog-list-row {
    grid-template-columns: 1fr;
  }

  .myreeflog-measurement-list .myreeflog-list-header {
    display: flex !important;
  }

  .myreeflog-measurement-list .myreeflog-list-row {
    min-width: 780px;
  }
}

@media (max-width: 420px) {
  .myreeflog-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .myreeflog {
    font-size: 16px;
  }

  .myreeflog-app {
    gap: 14px;
  }

  .myreeflog-app-tabs {
    align-items: stretch;
    gap: 14px;
    margin: 0 -12px;
    padding: 0 12px;
    scroll-snap-type: x proximity;
  }

  .myreeflog-app-tabs a {
    min-height: 44px;
    padding: 10px 0 8px;
    scroll-snap-align: start;
  }

  .myreeflog-quick-log-button {
    align-self: stretch;
    margin: 0 0 8px auto;
    min-height: 44px;
  }

  .myreeflog-toolbar,
  .myreeflog-range,
  .myreeflog-aquarium-select,
  .myreeflog-dashboard-header {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .myreeflog-toolbar label,
  .myreeflog-range label,
  .myreeflog-aquarium-select,
  .myreeflog-logbook-filter label {
    width: 100%;
  }

  .myreeflog-toolbar button,
  .myreeflog-toolbar .myreeflog-action-link,
  .myreeflog-range button,
  .myreeflog-inline-icon-button {
    justify-content: center;
    min-height: 44px;
    width: 100% !important;
  }

  .myreeflog-dashboard-aquarium {
    padding-bottom: 18px;
  }

  .myreeflog-dashboard-aquarium h2,
  .myreeflog-section-title h2 {
    font-size: 22px;
    line-height: 1.2;
  }

  .myreeflog-cards {
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .myreeflog-card {
    min-height: 120px;
    padding: 10px;
  }

  .myreeflog-card-heading {
    gap: 6px;
  }

  .myreeflog-card strong {
    font-size: 23px;
    line-height: 1.05;
    overflow-wrap: anywhere;
  }

  .myreeflog-card small,
  .myreeflog-card-date {
    margin-top: auto;
  }

  .myreeflog-chart-grid {
    gap: 12px;
    grid-template-columns: 1fr;
  }

  .myreeflog-chart-grid section {
    min-height: 230px;
    padding: 10px;
  }

  .myreeflog-chart-wide {
    grid-column: auto;
  }

  .myreeflog-chart-title {
    align-items: flex-start;
    gap: 6px;
  }

  .myreeflog-chart-title h3 {
    display: grid;
    gap: 3px;
  }

  .myreeflog-chart-current {
    margin-left: 0;
    white-space: normal;
  }

  .myreeflog-chart-grid canvas {
    max-height: 190px;
  }

  .myreeflog-current-photo img,
  .myreeflog-photo-carousel img {
    max-height: 220px;
  }

  .myreeflog-form {
    border-radius: 8px;
    padding: 12px;
  }

  .myreeflog-aquarium-core-row,
  .myreeflog-profile-presets,
  .myreeflog-parameter-grid,
  .myreeflog-settings-list,
  .myreeflog-chart-info-grid {
    grid-template-columns: 1fr !important;
  }

  .myreeflog-value-row,
  .myreeflog-quick-log-form .myreeflog-value-row {
    align-items: stretch;
    grid-template-columns: 1fr !important;
  }

  .myreeflog-value-row .myreeflog-value-unit {
    min-height: 0;
  }

  .myreeflog-dialog,
  .myreeflog-aquarium-editor-dialog,
  .myreeflog-chart-info-dialog {
    border-radius: 8px;
    box-sizing: border-box;
    max-height: 88vh;
    max-width: 94vw;
    overflow: auto;
    padding: 14px;
    width: 94vw;
  }

  .myreeflog-dialog-heading {
    align-items: flex-start;
  }

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

  .myreeflog-form-actions > * {
    justify-content: center;
    text-align: center;
    width: 100% !important;
  }

  .myreeflog-measurement-list,
  .myreeflog-dosing {
    overflow-x: visible;
  }

  .myreeflog-measurement-list .myreeflog-list-header,
  .myreeflog-list-header {
    display: none !important;
  }

  .myreeflog-list-row,
  .myreeflog-measurement-list .myreeflog-list-row {
    align-items: stretch !important;
    display: grid !important;
    flex-wrap: initial !important;
    gap: 8px !important;
    grid-template-columns: 1fr auto auto auto !important;
    min-width: 0 !important;
    padding: 12px;
  }

  .myreeflog-measurement-list .myreeflog-measurement-created,
  .myreeflog-measurement-list .myreeflog-measurement-date,
  .myreeflog-measurement-list .myreeflog-measurement-icp-id,
  .myreeflog-measurement-list .myreeflog-measurement-title,
  .myreeflog-measurement-list .myreeflog-measurement-values {
    flex: initial;
  }

  .myreeflog-measurement-created,
  .myreeflog-measurement-date,
  .myreeflog-measurement-icp-id,
  .myreeflog-measurement-title,
  .myreeflog-measurement-values {
    grid-column: 1 / -1;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
  }

  .myreeflog-measurement-created::before {
    content: "Erfasst: ";
    color: var(--mrl-muted);
    font-weight: 700;
  }

  .myreeflog-measurement-date::before {
    content: "Messdatum: ";
    color: var(--mrl-muted);
    font-weight: 700;
  }

  .myreeflog-measurement-icp-id::before {
    content: "ICP-ID: ";
    color: var(--mrl-muted);
    font-weight: 700;
  }

  .myreeflog-measurement-title {
    font-size: 17px;
  }

  .myreeflog-measurement-values {
    color: var(--mrl-muted);
    line-height: 1.35;
  }

  .myreeflog-measurement-list .myreeflog-action-link,
  .myreeflog-measurement-list .myreeflog-list-row form {
    grid-column: auto;
    justify-self: start;
  }

  .myreeflog-aquarium-row {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .myreeflog-aquarium-row a {
    font-size: 17px;
    font-weight: 700;
  }

  .myreeflog-aquarium-row form {
    align-self: flex-start;
  }

  .myreeflog-add-aquarium-action {
    margin-top: 16px;
  }

  .myreeflog-add-aquarium-button {
    justify-content: center;
    width: 100%;
  }

  .myreeflog-dosing table,
  .myreeflog-dosing thead,
  .myreeflog-dosing tbody,
  .myreeflog-dosing tr,
  .myreeflog-dosing th,
  .myreeflog-dosing td {
    display: block;
    width: 100%;
  }

  .myreeflog-dosing thead {
    display: none;
  }

  .myreeflog-dosing table,
  .myreeflog-dosing-table-major,
  .myreeflog-dosing-table-single {
    min-width: 0;
  }

  .myreeflog-dosing tr {
    border: 1px solid var(--mrl-border);
    border-radius: 8px;
    margin: 0 0 10px;
    padding: 10px;
  }

  .myreeflog-dosing td {
    border-bottom: 0;
    box-sizing: border-box;
    padding: 5px 0;
    white-space: normal;
  }

  .myreeflog-dose-control-row,
  .myreeflog-dose-control-row-daily,
  .myreeflog-dose-group,
  .myreeflog-daily-dose-setting {
    align-items: stretch;
    grid-template-columns: 1fr;
    white-space: normal;
  }

  .myreeflog-dosing-actions input,
  .myreeflog-dosing-actions select {
    max-width: none;
    width: 100%;
  }

  .myreeflog-dosing-footer-link {
    text-align: left;
  }

  .myreeflog-detail-actions,
  .myreeflog-dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .myreeflog-detail-actions > *,
  .myreeflog-dialog-actions > * {
    width: 100% !important;
  }

  .myreeflog-view-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .myreeflog-view-toggle button {
    justify-content: center;
    width: 100% !important;
  }

  .myreeflog-values-table,
  .myreeflog-values-table thead,
  .myreeflog-values-table tbody,
  .myreeflog-values-table tr,
  .myreeflog-values-table th,
  .myreeflog-values-table td {
    display: block;
  }

  .myreeflog-values-table thead {
    display: none;
  }

  .myreeflog-values-table tr {
    border: 1px solid var(--mrl-border);
    border-left-width: 5px;
    border-radius: 8px;
    margin-bottom: 8px;
    padding: 8px;
  }

  .myreeflog-values-table td {
    border-bottom: 0;
    padding: 4px 0;
  }

  .myreeflog-values-table td:nth-child(1)::before {
    content: "Wert: ";
    color: var(--mrl-muted);
    font-weight: 700;
  }

  .myreeflog-values-table td:nth-child(2)::before {
    content: "Messwert: ";
    color: var(--mrl-muted);
    font-weight: 700;
  }

  .myreeflog-values-table td:nth-child(3)::before {
    content: "Einordnung: ";
    color: var(--mrl-muted);
    font-weight: 700;
  }
}

@media (max-width: 380px) {
  .myreeflog-cards {
    grid-template-columns: 1fr;
  }

  .myreeflog-card {
    min-height: 104px;
  }
}

@media (max-width: 640px) {
  .myreeflog,
  .myreeflog *,
  .myreeflog-app,
  .myreeflog-app * {
    box-sizing: border-box;
  }

  .myreeflog,
  .myreeflog-app {
    width: 100%;
  }

  .myreeflog-app-tabs,
  .myreeflog-app-view {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: 8px;
    padding-right: 8px;
    width: 100vw;
  }

  .myreeflog-app-tabs {
    gap: 10px;
    overflow-x: auto;
  }

  .myreeflog-app-tabs a {
    font-size: 14px;
    min-height: 38px;
    padding: 8px 0 6px;
  }

  .myreeflog-app-view > .myreeflog,
  .myreeflog-app-view > .myreeflog-app {
    max-width: 100%;
  }

  .myreeflog-form,
  .myreeflog-dosing,
  .myreeflog-external-settings,
  .myreeflog-external-account-card,
  .myreeflog-external-device-item,
  .myreeflog-unused-devices,
  .myreeflog-aquarium-row,
  .myreeflog-list-row,
  .myreeflog-measurement-detail {
    max-width: 100%;
    min-width: 0;
  }

  .myreeflog-form,
  .myreeflog-dosing,
  .myreeflog-external-account-card,
  .myreeflog-external-device-item,
  .myreeflog-unused-devices,
  .myreeflog-measurement-detail {
    padding: 10px;
  }

  .myreeflog input,
  .myreeflog select,
  .myreeflog textarea {
    min-width: 0;
    width: 100%;
  }

  .myreeflog button,
  .myreeflog .button,
  .myreeflog-action-link {
    max-width: 100%;
  }

  .myreeflog-toolbar button,
  .myreeflog-toolbar .myreeflog-action-link,
  .myreeflog-range button,
  .myreeflog-inline-icon-button,
  .myreeflog-form button,
  .myreeflog-form-actions > *,
  .myreeflog-detail-actions > *,
  .myreeflog-dialog-actions > *,
  .myreeflog-account-form-actions button,
  .myreeflog-add-aquarium-button,
  .myreeflog-quick-log-button {
    min-height: 36px;
    padding: 7px 10px !important;
    width: auto !important;
  }

  .myreeflog-form-actions,
  .myreeflog-detail-actions,
  .myreeflog-dialog-actions,
  .myreeflog-account-form-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .myreeflog-toolbar,
  .myreeflog-range,
  .myreeflog-dashboard-header {
    gap: 8px;
  }

  .myreeflog-dashboard-header {
    justify-items: stretch;
  }

  .myreeflog-icon-button,
  .myreeflog-refresh-button,
  .myreeflog-device-refresh-button,
  .myreeflog-settings-button,
  .myreeflog-check-button,
  .myreeflog-external-account-actions > .myreeflog-icon-button,
  .myreeflog-external-account-actions > form > .myreeflog-icon-button,
  .myreeflog-external-account-actions .myreeflog-inline-edit summary,
  button[data-myreeflog-test-external-account] {
    flex: 0 0 34px;
    height: 34px !important;
    min-height: 34px !important;
    min-width: 34px !important;
    padding: 0 !important;
    width: 34px !important;
  }

  .myreeflog-dialog,
  .myreeflog-aquarium-editor-dialog,
  .myreeflog-chart-info-dialog {
    max-width: calc(100vw - 16px);
    padding: 12px;
    width: calc(100vw - 16px);
  }

  .myreeflog-inline-edit[open] form {
    left: 0;
    min-width: 0;
    right: auto;
    width: min(100%, calc(100vw - 32px));
  }

  .myreeflog-settings-list,
  .myreeflog-device-channel-row,
  .myreeflog-channel-map-form,
  .myreeflog-sensor-map-form,
  .myreeflog-aquawiz-sensor-map-form,
  .myreeflog-channel-dose-form,
  .myreeflog-external-row,
  .myreeflog-account-form-row,
  .myreeflog-compact-form,
  .myreeflog-device-map {
    grid-template-columns: 1fr !important;
    max-width: 100%;
    min-width: 0;
  }

  .myreeflog-device-channel-row {
    align-items: stretch;
    gap: 8px;
  }

  .myreeflog-channel-map-form,
  .myreeflog-sensor-map-form,
  .myreeflog-aquawiz-sensor-map-form {
    align-items: stretch;
  }

  .myreeflog-settings-list label {
    align-items: center;
    gap: 8px;
    grid-template-columns: 1fr auto !important;
    min-width: 0;
    padding: 8px;
  }

  .myreeflog-settings-list label > span,
  .myreeflog-settings-list label > small,
  .myreeflog-external-device-main,
  .myreeflog-external-device-meta,
  .myreeflog-device-reading,
  .myreeflog-fixed-parameter,
  .myreeflog-channel-dose-empty {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .myreeflog-external-device-main {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .myreeflog-external-device-actions,
  .myreeflog-external-account-actions {
    gap: 6px;
    justify-content: end;
  }

  .myreeflog-device-status {
    padding: 5px 7px;
  }

  .myreeflog-channel-dose-form label {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .myreeflog-channel-dose-id {
    white-space: normal;
  }

  .myreeflog-dosing-settings-table [data-myreeflog-dosing-recommendation],
  .myreeflog-dosing-settings-table [data-myreeflog-aquawiz-target] {
    max-width: 100%;
    width: 100%;
  }

  .myreeflog-view-toggle {
    max-width: 100%;
  }

  .myreeflog-view-toggle button {
    min-height: 36px;
    padding: 7px 10px !important;
  }
}
