/* Inventory, item form, detail sheets and bottom navigation */
/* Inventory */

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #b9d5e6;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
}

.inventory-reset {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #b9d5e6;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--accent-dark);
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1;
}

.inventory-reset.hidden {
  display: none;
}

.inventory-sort-box {
  display: flex;
  height: 44px;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 0 12px;
  border: 1px solid #b9d5e6;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
}

.inventory-sort-box span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.inventory-sort-box select {
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 800;
}

.search-box img {
  width: 22px;
  height: 22px;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  font-size: 1rem;
}

.filter-row {
  display: flex;
  gap: 7px;
  width: 100%;
  max-width: 100%;
  margin: 8px 0 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.filter-row button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #cfe0ea;
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 800;
}

.filter-row button.active {
  border-color: transparent;
  background: linear-gradient(135deg, #0bb2ca, #087d9e);
  color: #fff;
}

.filter-row .location-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding-right: 7px;
  border-color: transparent;
  background: #e6f7fb;
  color: var(--accent-dark);
}

.location-filter-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.location-filter-remove {
  display: grid;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-dark);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  padding-bottom: 2px;
}

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

.item-list .freezer-item,
.summary-strip button,
.suggestion-button,
.location-overview {
  animation: soft-rise 0.28s ease-out both;
}

.item-list .freezer-item:nth-child(2),
.summary-strip button:nth-child(2) {
  animation-delay: 0.025s;
}

.item-list .freezer-item:nth-child(3),
.summary-strip button:nth-child(3) {
  animation-delay: 0.05s;
}

.item-list .freezer-item:nth-child(4),
.summary-strip button:nth-child(4) {
  animation-delay: 0.075s;
}

.item-list .freezer-item:nth-child(n+5) {
  animation-delay: 0.09s;
}

.inventory-list {
  margin-top: 10px;
}

.inventory-lazy-status {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
  text-align: center;
}

.inventory-load-more {
  width: 100%;
  min-height: 42px;
  margin-top: 10px;
  border: 1px solid rgba(10, 157, 183, 0.24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 860;
}

.inventory-lazy-sentinel {
  width: 100%;
  height: 1px;
}

.bulk-action-bar {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(10, 157, 183, 0.28);
  border-radius: 16px;
  background: rgba(230, 247, 251, 0.72);
}

.bulk-action-bar.hidden {
  display: none;
}

.bulk-action-bar strong {
  color: var(--accent-dark);
  font-size: 0.86rem;
}

.bulk-action-bar > div {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.compact-button {
  min-height: 38px;
  padding: 0 8px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 820;
}

.bulk-cancel {
  min-height: 32px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 820;
}

.filter-sheet-card {
  max-height: 62vh;
  max-height: 62dvh;
}

.bulk-move-card {
  max-height: 48vh;
  max-height: 48dvh;
}

.transfer-sheet-card {
  max-height: 62vh;
  max-height: 62dvh;
}

.filter-sheet-card .sheet-edit-button {
  color: var(--accent-dark);
  font-size: 1.4rem;
}

.filter-sheet-body {
  display: grid;
  gap: 12px;
}

.sort-direction-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sort-direction-row button,
.filter-sheet-options button {
  min-height: 38px;
  border: 1px solid #cfe0ea;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 800;
}

.sort-direction-row button.active,
.filter-sheet-options button.active {
  border-color: transparent;
  background: linear-gradient(135deg, #0bb2ca, #087d9e);
  color: #fff;
}

.filter-sheet-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.freezer-item {
  position: relative;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 92px;
  padding: 8px;
  border: 1px solid #d7e6ef;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 6px 18px rgba(14, 80, 120, 0.07);
  transition:
    background-color var(--motion-soft),
    border-color var(--motion-soft),
    box-shadow var(--motion-soft),
    transform var(--motion-soft);
}

.freezer-item.select-mode {
  grid-template-columns: 82px minmax(0, 1fr);
}

.freezer-item.selected {
  border-color: #0a9db7;
  background: rgba(230, 247, 251, 0.94);
  box-shadow: 0 8px 20px rgba(10, 157, 183, 0.16);
}

.item-select-indicator {
  position: absolute;
  left: 5px;
  bottom: 5px;
  z-index: 2;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  background: #0a9db7;
  color: #fff;
  box-shadow: 0 4px 12px rgba(3, 56, 87, 0.22);
  font-size: 0.72rem;
  font-weight: 900;
}

.compact-list .freezer-item {
  grid-template-columns: 104px minmax(0, 1fr);
}

.freezer-item.abgelaufen {
  border-color: #ffc5c5;
}

.freezer-item.bald-verbrauchen {
  border-color: #ffdca3;
}

.food-visual {
  position: relative;
  width: 100%;
}

.food-image {
  display: block;
  width: 100%;
  aspect-ratio: 1.24;
  border-radius: 12px;
  background: #eaf8fb;
  object-fit: cover;
}

.inventory-label-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  min-height: 20px;
  margin-top: 4px;
  color: var(--accent-dark);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.inventory-label-badge img {
  width: 13px;
  height: 13px;
  object-fit: contain;
}

.mealie-overlay {
  position: absolute;
  left: 6px;
  bottom: 6px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 3px 8px rgba(37, 67, 84, 0.18);
}

.mealie-overlay::before {
  content: "";
  position: absolute;
  inset: 4px;
  background: #f28c28;
  -webkit-mask: url("/static/visuals/icon_mealie.svg") center / contain no-repeat;
  mask: url("/static/visuals/icon_mealie.svg") center / contain no-repeat;
}

.item-main {
  min-width: 0;
}

.item-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 6px;
}

.item-title-row h3 {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.12;
}

.category-pill,
.flag-pill,
.shelf-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e8f8ee;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 900;
}

.food-visual:has(.inventory-label-badge) .mealie-overlay {
  bottom: 30px;
}

.flag-pill {
  background: #e9f8fb;
  color: var(--accent-dark);
}

.item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.shelf-pill {
  justify-self: end;
  font-size: 0.7rem;
  font-weight: 760;
  white-space: nowrap;
}

.sheet-edit-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  min-height: 34px;
  place-items: center;
  padding: 0;
  border: 1px solid #d7e6ef;
  border-radius: 11px;
  background: #fff;
  justify-self: end;
}

.sheet-icon-actions {
  display: flex;
  gap: 8px;
  justify-self: end;
}

.sheet-edit-button img {
  width: 19px;
  height: 19px;
  object-fit: contain;
}

.shelf-pill.good {
  background: #e8f8ee;
  color: var(--green);
}

.shelf-pill.soon {
  background: #fff1d7;
  color: #b77a00;
}

.shelf-pill.urgent {
  background: #ffe4e4;
  color: var(--red);
}

.item-detail-row {
  margin-top: 4px;
}

.item-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  color: #38566c;
  font-size: 0.76rem;
}

.item-facts span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.item-facts img {
  width: 15px;
  height: 15px;
  object-fit: contain;
}

.expiry-line {
  justify-self: end;
  font-size: 0.73rem;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.expiry-line.good {
  color: var(--green);
}

.expiry-line.soon {
  color: #b77a00;
}

.expiry-line.urgent {
  color: var(--red);
}

.item-location-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}

.item-location {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: #38566c;
  font-size: 0.76rem;
}

.item-location img {
  width: 15px;
  height: 15px;
  object-fit: contain;
}

.empty {
  margin: 0;
  padding: 20px;
  border: 1px dashed #cfe0ea;
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
}

/* Item form */

.add-card,
.settings-card {
  padding: 18px;
  border: 1px solid #d7e6ef;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.add-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(3, 56, 87, 0.08);
}

.app-field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  color: var(--text);
  font-weight: 680;
}

.add-card .app-field {
  min-width: 0;
  margin-bottom: 0;
  font-size: 0.86rem;
}

.app-field input,
.app-field select,
.app-field textarea,
.input-with-icon {
  width: 100%;
  min-height: 54px;
  border: 1px solid #b9d5e6;
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  font-size: 16px;
}

.add-card .app-field input,
.add-card .app-field select,
.add-card .app-field textarea,
.add-card .input-with-icon {
  min-width: 0;
  min-height: 46px;
  border-radius: 13px;
  font-weight: 520;
}

.app-field select {
  height: 54px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #38566c 50%),
    linear-gradient(135deg, #38566c 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 24px,
    calc(100% - 12px) 24px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.add-card .app-field select {
  height: 46px;
  background-position:
    calc(100% - 17px) 20px,
    calc(100% - 11px) 20px;
}

.app-field input,
.app-field select,
.app-field textarea {
  padding: 12px 14px;
}

.add-card .app-field input,
.add-card .app-field select,
.add-card .app-field textarea {
  padding: 9px 12px;
}

.input-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  gap: 8px;
  align-items: center;
}

.barcode-button {
  display: grid;
  width: 46px;
  min-height: 46px;
  place-items: center;
  border: 1px solid #0a9db7;
  border-radius: 13px;
  background: #e9f8fb;
  color: var(--accent-dark);
}

.qr-field-button img {
  width: 23px;
  height: 23px;
  object-fit: contain;
}

.recipe-link-panel {
  display: grid;
  gap: 8px;
}

.recipe-link-panel .secondary {
  min-height: 44px;
  border-radius: 14px;
  font-size: 0.86rem;
}

.selected-recipe {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #b9d5e6;
  border-radius: 14px;
  background: #e9f8fb;
}

.selected-recipe strong,
.selected-recipe small {
  display: block;
}

.selected-recipe strong {
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.15;
}

.selected-recipe small {
  color: #5c7587;
  font-size: 0.72rem;
}

.selected-recipe button {
  width: 34px;
  height: 34px;
  min-height: 34px;
  border: 0;
  border-radius: 11px;
  background: #fff;
  color: var(--accent-dark);
  font-size: 1.1rem;
}

.mealie-results {
  display: grid;
  gap: 7px;
}

.mealie-results button {
  display: grid;
  gap: 2px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #dceaf2;
  border-radius: 13px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.mealie-results span {
  font-size: 0.86rem;
  font-weight: 720;
}

.mealie-results small {
  color: #5c7587;
  font-size: 0.72rem;
}

.mealie-error {
  color: #8a4c00;
}

.app-field select {
  padding-right: 34px;
}

.app-field textarea {
  resize: vertical;
}

.two-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.add-card .two-columns {
  gap: 10px;
}

.date-columns {
  max-width: 100%;
}

.date-columns input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.add-card input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
  min-width: 0;
  padding-left: 8px;
  padding-right: 6px;
  font-size: 0.86rem;
  line-height: 1.1;
}

.add-card input[type="date"]::-webkit-date-and-time-value {
  width: 100%;
  min-width: 0;
  margin: 0;
  text-align: left;
}

.add-card input[type="date"]::-webkit-calendar-picker-indicator {
  width: 18px;
  margin: 0;
  padding: 0;
}

.reminder-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.reminder-section {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
}

.reminder-section h2 {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.2;
}

.reminder-section .inventory-list,
.reminder-section .shopping-list {
  margin-top: 0;
}

.shopping-list {
  display: grid;
  gap: 10px;
}

.shopping-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto auto;
  gap: 9px;
  align-items: center;
  min-height: 66px;
  padding: 9px;
  border: 1px solid #dceaf2;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(22, 111, 122, 0.08);
}

.shopping-visual {
  position: relative;
  display: block;
  width: 48px;
  height: 48px;
}

.shopping-visual > img {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  object-fit: cover;
  background: #e9f8fb;
}

.shopping-visual.is-low::after {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: conic-gradient(var(--accent-dark) 0 25%, #dceaf2 0 100%);
  box-shadow: 0 3px 8px rgba(22, 111, 122, 0.22);
  content: "";
}

.shopping-item strong,
.shopping-item small {
  display: block;
  min-width: 0;
}

.shopping-item strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.93rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shopping-item small {
  margin-top: 3px;
  color: #5c7587;
  font-size: 0.76rem;
  line-height: 1.2;
}

.shopping-add-button,
.shopping-remove-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border: 1px solid #dceaf2;
  border-radius: 12px;
  background: #f7fbfd;
}

.shopping-remove-button {
  border-color: #f1c5c2;
  background: #fff7f6;
}

.shopping-add-button img,
.shopping-remove-button img {
  width: 17px;
  height: 17px;
  object-fit: contain;
}

.flag-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.add-toggle {
  min-height: 48px;
  margin: 0;
  padding: 8px 10px;
  border-radius: 14px;
  background: #f7fbfd;
}

.flag-toggle {
  min-height: 44px;
}

.flag-toggle strong {
  font-size: 0.78rem;
  line-height: 1.15;
}

.add-toggle strong {
  font-size: 0.88rem;
  font-weight: 720;
}

.add-toggle small {
  font-size: 0.74rem;
  font-weight: 500;
}

.form-message:empty {
  display: none;
}

.primary-action,
.logout-button,
.danger-action,
.settings-card button {
  min-height: 56px;
  padding: 0 18px;
  border: 0;
  border-radius: 17px;
  background: linear-gradient(135deg, #075d73, #004960);
  color: #fff;
  font-weight: 900;
}

.primary-action {
  width: 100%;
  font-size: 1.1rem;
}

.add-card .primary-action {
  min-height: 50px;
  border-radius: 15px;
  font-size: 1rem;
  font-weight: 760;
}

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

.form-actions .secondary {
  width: 100%;
  min-height: 48px;
  border-radius: 15px;
}

.form-actions:has(.secondary:not(.hidden)) {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr);
}

.secondary {
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid #0a9db7;
  border-radius: 16px;
  background: #fff;
  color: var(--accent);
  font-weight: 900;
}

.danger-action {
  background: linear-gradient(135deg, #ff756f, #ff3333);
}

.message {
  min-height: 1.3em;
  color: var(--muted);
}

.message.inline {
  margin: 0 0 10px;
  text-align: right;
}

/* Detail sheet */

.detail-sheet {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 20px 0 0;
  background: rgba(5, 31, 62, 0.22);
}

.sheet-card {
  position: relative;
  width: min(100%, 430px);
  max-height: 74vh;
  max-height: 74dvh;
  overflow-y: auto;
  padding: 12px 18px calc(env(safe-area-inset-bottom) + 18px);
  border: 1px solid #b9d5e6;
  border-radius: 26px 26px 0 0;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  box-shadow: 0 -14px 36px rgba(5, 31, 62, 0.18);
  transform: translateY(var(--sheet-drag-y, 0));
  transition: transform 0.18s ease;
  touch-action: pan-y;
}

.sheet-handle {
  width: 56px;
  height: 6px;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: #c5d8e5;
}

.sheet-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
}

.sheet-content {
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr);
  gap: 14px;
}

.sheet-media {
  display: grid;
  gap: 8px;
  align-self: start;
}

.sheet-image {
  width: 100%;
  border-radius: 18px;
  background: #eaf8fb;
}

.mealie-detail-pill,
.recipe-detail-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-sizing: border-box;
  width: 100%;
  height: 34px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #f3c491;
  border-radius: 999px;
  background: #fff7ec;
  color: #b65f00;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
}

.recipe-detail-pill {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  border-color: #bcdfe8;
  background: #f1fbfd;
  color: var(--accent);
  cursor: pointer;
}

.mealie-detail-pill span,
.recipe-detail-pill span {
  width: 17px;
  height: 17px;
}

.mealie-detail-pill span {
  background: #f28c28;
  -webkit-mask: url("/static/visuals/icon_mealie.svg") center / contain no-repeat;
  mask: url("/static/visuals/icon_mealie.svg") center / contain no-repeat;
}

.recipe-detail-pill span {
  background: url("/static/visuals/icon_rezept.png") center / contain no-repeat;
}

.sheet-title h2 {
  margin: 0 0 8px;
  padding-right: 4px;
  overflow-wrap: anywhere;
  line-height: 1.08;
}

.sheet-transfer-icon {
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  color: var(--accent-dark);
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
}

.sheet-facts {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.sheet-facts div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.sheet-facts dt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #38566c;
  font-size: 0.9rem;
  line-height: 1.2;
}

.sheet-facts img {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.sheet-facts dd {
  margin: 0;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.sheet-note {
  color: #38566c;
  line-height: 1.35;
}

.sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.sheet-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.sheet-actions img {
  width: 22px;
  height: 22px;
}

/* Bottom navigation */

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: min(100%, 430px);
  min-height: var(--bottom-nav-height);
  padding: 5px 8px calc(env(safe-area-inset-bottom) + 4px);
  transform: translateX(-50%);
  border-top: 1px solid #d7e6ef;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px);
}

@media (hover: none) and (pointer: coarse) {
  .bottom-nav {
    bottom: -20px;
  }
}

.bottom-nav button {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 50px;
  padding: 3px 2px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: #38566c;
  font-size: 0.62rem;
  line-height: 1.05;
}

.bottom-nav span {
  font-size: 1.45rem;
  line-height: 1;
}

.bottom-nav .nav-icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  margin-bottom: 0;
}

.bottom-nav .nav-icon img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.bottom-nav button.active {
  background: rgba(10, 157, 183, 0.1);
  color: var(--accent);
  transform: translateY(-2px);
}

.bottom-nav .add-tab span {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  margin: -34px auto -1px;
  border-radius: 50%;
  background: linear-gradient(135deg, #14c5d8, #058aa7);
  box-shadow: 0 10px 24px rgba(10, 157, 183, 0.35);
  color: #fff;
  font-size: 2.3rem;
  line-height: 58px;
  transition: box-shadow var(--motion-soft), transform var(--motion-soft);
}

details {
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

details:first-child {
  border-top: 0;
}

summary {
  cursor: pointer;
  font-weight: 900;
}

.check-field {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.rule-list,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.admin-maintenance-card .actions {
  display: block;
}

.rule-pill {
  min-height: 36px;
  border: 1px solid #cfe0ea;
  border-radius: 999px;
  background: #fff;
  color: var(--text);
}

.status-grid,
.diagnostic-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 14px 0;
}

.diagnostic-item,
.admin-user,
.admin-block {
  padding: 12px;
  border: 1px solid #d7e6ef;
  border-radius: 16px;
  background: #fff;
}

.diagnostic-item {
  display: grid;
  gap: 4px;
}

.diagnostic-item span,
dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.admin-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.admin-user span {
  display: grid;
}
