/* Settings and admin */
/* Settings and admin */

.view-intro {
  margin: -8px 0 18px;
  color: var(--muted);
  line-height: 1.35;
}

.settings-grid,
.admin-grid {
  display: grid;
  gap: 12px;
  width: 100%;
}

.settings-panel,
.admin-card {
  padding: 16px;
  border: 1px solid #d7e6ef;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 26px rgba(14, 80, 120, 0.08);
}

.admin-grid > .admin-card {
  padding: 0;
  overflow: hidden;
}

.settings-panel {
  display: grid;
  gap: 12px;
}

.settings-card-head,
.admin-card-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.section-kicker {
  margin: 0 0 3px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.settings-card-head h2,
.settings-card-summary h2,
.admin-card-title h2,
.admin-card-summary h2 {
  margin: 0;
  color: #051f3e;
  font-size: 1rem;
  line-height: 1.15;
}

.profile-role {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.helper {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.38;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 34px;
  padding: 0;
}

.profile-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #10bad2, #0488a7);
  color: #fff;
  font-weight: 900;
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-card strong,
.profile-card span {
  display: block;
}

.profile-card strong {
  color: var(--text);
  font-size: 1.05rem;
}

.profile-card span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.profile-push {
  padding: 12px 0 0;
  border-top: 1px solid rgba(10, 157, 183, 0.12);
}

.profile-push-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  list-style: none;
}

.profile-push-summary::-webkit-details-marker {
  display: none;
}

.profile-push-summary .pill {
  margin-left: auto;
}

.profile-push-body {
  display: grid;
  gap: 10px;
  padding-top: 10px;
}

.setting-toggle {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid #d7e6ef;
  border-radius: 14px;
  background: #f7fbfd;
}

.setting-toggle input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.setting-toggle strong,
.setting-toggle small {
  display: block;
}

.setting-toggle strong {
  color: var(--text);
  font-size: 0.92rem;
}

.setting-toggle small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.wide {
  width: 100%;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e9f8fb;
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: 900;
  white-space: nowrap;
}

.pill.warning {
  background: #fff3dc;
  color: #9a5a00;
}

.feedback-panel {
  display: block;
  margin-top: 14px;
  padding: 0;
  overflow: hidden;
}

.feedback-panel-content {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
}

.settings-card-summary,
.admin-card-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  min-height: 68px;
  align-items: center;
  gap: 12px;
  padding: 14px;
  color: var(--accent-dark);
  list-style: none;
}

.settings-card-summary {
  grid-template-columns: minmax(0, 1fr) auto;
}

.admin-card-summary .pill {
  justify-self: end;
}

.settings-card-summary::-webkit-details-marker,
.admin-card-summary::-webkit-details-marker {
  display: none;
}

.settings-card-summary::after,
.admin-card-summary::after,
.profile-push-summary::after,
.category-admin-summary::after,
.diagnostic-summary::after {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.16s ease;
}

.admin-card-summary::after {
  grid-column: 3;
  justify-self: center;
}

.settings-card-summary::after {
  grid-column: 2;
  justify-self: center;
}

details[open] > .settings-card-summary::after,
details[open] > .admin-card-summary::after,
details[open] > .profile-push-summary::after,
details[open] > .category-admin-summary::after,
details[open] > .diagnostic-summary::after {
  transform: rotate(225deg);
}

.admin-grid {
  margin-top: 12px;
}

.admin-shelf-card {
  border-color: rgba(20, 146, 74, 0.2);
  background: linear-gradient(180deg, #fff 0%, #f3fbf6 100%);
}

.admin-maintenance-card {
  background: linear-gradient(180deg, #fff 0%, #eefbff 100%);
}

.admin-backup-card {
  padding: 0;
  background: linear-gradient(180deg, #fff 0%, #f7fbfd 100%);
  overflow: hidden;
}

.backup-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 28px);
  margin: 0 14px 14px;
  text-align: center;
  text-decoration: none;
}

.admin-trash-card {
  padding: 0;
  background: linear-gradient(180deg, #fff 0%, #fff7f5 100%);
  overflow: hidden;
}

.settings-grid + .admin-trash-card {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 0;
}

.admin-openings-card {
  padding: 0;
  background: linear-gradient(180deg, #fff 0%, #f4fbff 100%);
  overflow: hidden;
}

.admin-usage-card {
  padding: 0;
  background: linear-gradient(180deg, #fff 0%, #f5fbf8 100%);
  overflow: hidden;
}

.admin-history-card {
  padding: 0;
  background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
  overflow: hidden;
}

.admin-openings-card .pill,
.admin-usage-card .pill,
.admin-item-images-card .pill {
  gap: 6px;
}

.admin-openings-card .pill img,
.admin-usage-card .pill img,
.admin-item-images-card .pill img {
  width: 15px;
  height: 15px;
  object-fit: contain;
}

.admin-card > .helper {
  padding: 0 14px 12px;
}

.settings-grid + .admin-trash-card > .helper {
  padding: 0 14px 12px;
}

.admin-card > .admin-form,
.admin-card > .admin-users,
.admin-card > .diagnostics {
  padding: 0 14px 14px;
}

.admin-card > .admin-form {
  margin-top: 0;
}

.admin-card > .category-admin-list,
.admin-card > .secondary.wide,
.admin-card > .message {
  margin-right: 14px;
  margin-left: 14px;
}

.admin-trash,
.admin-openings,
.admin-usage-stats,
.admin-change-history,
.admin-item-images {
  padding: 0 14px 14px;
}

.admin-item-images {
  display: grid;
  gap: 12px;
}

.item-images-section {
  display: grid;
  overflow: hidden;
  border: 1px solid #d7e6ef;
  border-top-color: #c8dce8;
  border-radius: 16px;
  background: #fff;
  box-shadow: inset 0 1px 0 #eef6f9;
}

.item-images-section summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  color: var(--accent-dark);
  list-style: none;
}

.item-images-section summary::-webkit-details-marker {
  display: none;
}

.item-images-section summary::after {
  content: "›";
  color: var(--muted);
  font-weight: 900;
  transform: rotate(90deg);
}

.item-images-section[open] summary::after {
  transform: rotate(-90deg);
}

.item-images-section h3 {
  margin: 0;
  font-size: 0.88rem;
}

.item-images-section summary small {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 850;
}

.item-images-section > .message {
  min-height: 0;
  margin: 0;
  padding: 9px 12px 11px;
  border-top: 1px solid rgba(10, 157, 183, 0.08);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.3;
}

.item-image-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 58px;
  align-items: center;
  padding: 8px 10px;
  border-top: 1px solid rgba(10, 157, 183, 0.08);
}

.item-image-row img,
.item-image-placeholder,
.item-image-preview-button {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: #eaf8fb;
  object-fit: cover;
}

.item-image-placeholder {
  display: block;
  position: relative;
  border: 1px dashed #b9dbe5;
}

.item-image-row.is-generating .item-image-placeholder::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 3px solid rgba(10, 157, 183, 0.22);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

.item-image-row.is-generating .item-image-preview-button::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 3px solid rgba(255, 255, 255, 0.65);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

.item-image-preview-button {
  display: block;
  position: relative;
  padding: 0;
  border: 0;
  overflow: hidden;
  box-shadow: none;
}

.item-image-preview-button img {
  display: block;
  width: 100%;
  height: 100%;
}

.item-image-edit-button {
  display: inline-flex;
  width: 38px;
  height: 38px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #d7e6ef;
  border-radius: 999px;
  background: #f7fbfd;
  box-shadow: 0 4px 10px rgba(37, 67, 84, 0.08);
}

.item-image-edit-button img {
  display: block;
  width: 19px;
  height: 19px;
  object-fit: contain;
}

.item-image-row span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.item-image-row strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 0.9rem;
}

.item-image-row small {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.25;
}

.item-image-row em {
  color: var(--green);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 900;
}

.item-image-large-preview {
  display: block;
  width: 100%;
  border-radius: 18px;
  background: #eaf8fb;
}

.item-image-regenerate-form {
  display: grid;
  gap: 12px;
}

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

.admin-form,
.issue-form,
.shelf-life-form {
  display: grid;
  gap: 12px;
  margin-top: 0;
}

.settings-panel .app-field,
.admin-card .app-field {
  margin-bottom: 0;
}

.category-admin-list {
  padding: 0;
  border: 1px solid #d7e6ef;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.admin-shelf-card .shelf-life-list {
  margin: 0 14px 14px;
  border: 1px solid #d7e6ef;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.admin-shelf-card .category-admin-list:first-of-type {
  margin-top: 0;
}

.category-admin-list + .category-admin-list {
  margin-top: 10px;
  margin-bottom: 12px;
}

.category-admin-summary {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  color: var(--accent-dark);
  list-style: none;
}

.category-admin-summary::-webkit-details-marker {
  display: none;
}

.category-admin-summary span {
  font-weight: 900;
}

.category-admin-summary small {
  color: var(--muted);
  font-size: 0.78rem;
}

.shelf-life-list {
  display: grid;
  border-top: 1px solid rgba(10, 157, 183, 0.1);
}

.shelf-life-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  min-height: 42px;
  align-items: center;
  padding: 0 12px;
  border: 0;
  border-top: 1px solid rgba(10, 157, 183, 0.08);
  background: transparent;
  color: var(--text);
  text-align: left;
}

.shelf-life-row:first-child {
  border-top: 0;
}

.shelf-life-row span {
  overflow-wrap: anywhere;
  font-size: 0.88rem;
  font-weight: 820;
}

.shelf-life-row strong {
  color: var(--accent-dark);
  font-size: 0.8rem;
}

.shelf-life-row img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.shelf-add-button {
  justify-self: end;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.shelf-add-button img {
  width: 19px;
  height: 19px;
  object-fit: contain;
}

.category-admin-list .shelf-life-form {
  padding: 12px;
  border-top: 1px solid rgba(10, 157, 183, 0.1);
}

.admin-push-status {
  display: grid;
  gap: 4px;
  margin: 2px 0 0;
  padding: 12px;
  border: 1px solid #d7e6ef;
  border-radius: 16px;
  background: #f7fbfd;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.admin-push-status strong {
  color: var(--accent-dark);
  font-size: 0.94rem;
}

.admin-push-status.success {
  border-color: rgba(20, 146, 74, 0.26);
  background: #f0fbf4;
}

.admin-push-status.warning {
  border-color: rgba(245, 155, 0, 0.34);
  background: #fff9ec;
}

.admin-push-status.warning strong {
  color: #ad6f00;
}

.compact-button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.8rem;
}

.diagnostics {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.diagnostic-group {
  padding: 0;
  border: 1px solid #d7e6ef;
  border-radius: 16px;
  background: #f7fbfd;
  overflow: hidden;
}

.diagnostic-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px 18px;
  min-height: 46px;
  align-items: center;
  column-gap: 12px;
  padding: 0 12px;
  color: var(--accent-dark);
  list-style: none;
}

.diagnostic-summary .diagnostic-state {
  grid-column: 2;
  justify-self: center;
}

.diagnostic-summary::after {
  grid-column: 3;
  justify-self: center;
}

.diagnostic-summary::-webkit-details-marker {
  display: none;
}

.diagnostic-state {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(20, 146, 74, 0.12);
}

.diagnostic-state.warn {
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(245, 155, 0, 0.14);
}

.diagnostic-group-body {
  padding: 0 12px 10px;
  border-top: 1px solid rgba(10, 157, 183, 0.1);
}

.diagnostic-row {
  display: grid;
  grid-template-columns: minmax(74px, 0.6fr) minmax(0, 1.4fr);
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid rgba(10, 157, 183, 0.08);
  color: var(--muted);
  font-size: 0.84rem;
}

.diagnostic-row:first-child {
  border-top: 0;
}

.diagnostic-row strong {
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: break-word;
  text-align: right;
}

.diagnostic-row strong.ok {
  color: var(--accent-dark);
}

.diagnostic-row strong.warn {
  color: #ad6f00;
}

.status-grid {
  margin: 2px 0 0;
}

.version-card {
  display: grid;
  margin: 0 14px;
}

.version-card div {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid #cde9d8;
  border-radius: 16px;
  background: #f3fbf6;
}

.version-card.warn div {
  border-color: #f3cf72;
  background: #fff9e8;
}

.version-card dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.version-card dd {
  margin: 0;
  color: var(--accent-dark);
  font-weight: 900;
  text-align: right;
}

.version-card.warn dd {
  color: #ad6f00;
}

.admin-maintenance-card .actions {
  display: block;
  margin: 12px 14px;
}

.admin-maintenance-card .update-status {
  margin-right: 14px;
  margin-left: 14px;
}

.update-release-notes {
  display: grid;
  gap: 7px;
  box-sizing: border-box;
  max-width: calc(100% - 28px);
  margin: 10px 14px 0;
  padding: 11px 12px;
  border: 1px solid #f3cf72;
  border-radius: 12px;
  background: #fffaf0;
  color: #5f4c19;
  font-size: 0.82rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.update-release-notes strong {
  color: #8a5a00;
  font-size: 0.86rem;
}

.update-release-notes p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.update-release-notes a {
  color: #075d73;
  font-weight: 900;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.diagnostics-card > .compact-button {
  width: auto;
  min-height: 40px;
  margin: 0 14px 2px;
  justify-self: start;
}

.status-grid div,
.admin-user {
  background: #f7fbfd;
}

.trash-row {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(10, 157, 183, 0.12);
}

.trash-row:last-child {
  border-bottom: 0;
}

.trash-row span,
.trash-row strong,
.trash-row small {
  display: block;
  min-width: 0;
}

.trash-row strong {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trash-row small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trash-restore-button {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.trash-restore-button img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.openings-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 2px;
}

.openings-stats div {
  min-height: 58px;
  padding: 10px;
  border: 1px solid rgba(10, 157, 183, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
}

.openings-stats span,
.opening-row small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.openings-stats strong {
  display: block;
  margin-top: 4px;
  color: var(--accent-dark);
  font-size: 1.3rem;
  line-height: 1;
}

.openings-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  align-items: end;
  min-height: 86px;
  margin-top: 10px;
  padding: 10px 8px 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.openings-day {
  display: grid;
  justify-items: center;
  gap: 3px;
}

.openings-day span {
  width: 12px;
  height: 8px;
  align-self: end;
  border-radius: 999px;
  background: #0a9db7;
}

.openings-day span.level-1 {
  height: 14px;
}

.openings-day span.level-2 {
  height: 22px;
}

.openings-day span.level-3 {
  height: 30px;
}

.openings-day span.level-4 {
  height: 38px;
}

.openings-day span.level-5 {
  height: 44px;
}

.openings-day strong {
  color: var(--text);
  font-size: 0.76rem;
}

.openings-day small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.openings-list {
  margin-top: 8px;
}

.opening-row {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid rgba(10, 157, 183, 0.12);
}

.opening-row:last-child {
  border-bottom: 0;
}

.opening-row strong {
  color: var(--text);
}

.opening-row em {
  flex: 0 0 auto;
  min-width: 42px;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
  text-align: right;
}

.opening-row em.ok {
  color: var(--accent-dark);
}

.opening-row em.warn {
  color: #ad6f00;
}

.usage-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 2px;
}

.usage-stats div {
  min-height: 58px;
  padding: 10px;
  border: 1px solid rgba(20, 146, 74, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
}

.usage-stats span,
.usage-row small,
.usage-expiry-row small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.usage-stats strong {
  display: block;
  margin-top: 4px;
  color: var(--accent-dark);
  font-size: 1.25rem;
  line-height: 1;
}

.usage-section {
  margin-top: 12px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.usage-section h3 {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 0.86rem;
}

.usage-row,
.usage-expiry-row {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid rgba(10, 157, 183, 0.1);
}

.usage-row:first-of-type,
.usage-expiry-row:first-of-type {
  border-top: 0;
}

.usage-row span,
.usage-expiry-row span {
  min-width: 0;
}

.usage-row strong,
.usage-expiry-row strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.usage-row em {
  flex: 0 0 auto;
  height: 8px;
  border-radius: 999px;
  background: #14924a;
}

.usage-row em.level-1 {
  width: 20px;
}

.usage-row em.level-2 {
  width: 34px;
}

.usage-row em.level-3 {
  width: 48px;
}

.usage-row em.level-4 {
  width: 62px;
}

.usage-row em.level-5 {
  width: 76px;
}

.usage-expiry-row em {
  flex: 0 0 auto;
  color: #ad6f00;
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 900;
}

.usage-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
  align-items: end;
}

.usage-day {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.usage-day span {
  width: 10px;
  height: 8px;
  align-self: end;
  border-radius: 999px;
  background: #14924a;
}

.usage-day span.level-1 {
  height: 12px;
}

.usage-day span.level-2 {
  height: 18px;
}

.usage-day span.level-3 {
  height: 24px;
}

.usage-day span.level-4 {
  height: 30px;
}

.usage-day span.level-5 {
  height: 36px;
}

.usage-day small {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
}

.change-history-list {
  overflow: hidden;
  border: 1px solid #d7e6ef;
  border-radius: 16px;
  background: #fff;
}

.change-history-row {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1.4fr) minmax(92px, 0.7fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid #e2edf4;
  border-top: 0;
  border-right: 0;
  border-left: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  appearance: none;
  text-align: left;
}

.change-history-row:last-child {
  border-bottom: 0;
}

.change-history-row.is-clickable {
  cursor: pointer;
}

.change-history-row.is-clickable:active {
  background: #edf8fb;
}

.change-history-row span {
  min-width: 0;
}

.change-history-row strong,
.change-history-row small {
  display: block;
  overflow-wrap: anywhere;
}

.change-history-row strong {
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.2;
}

.change-history-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.25;
}

.status-grid dd.warn {
  color: #ad6f00;
}

.update-status {
  min-height: 20px;
  margin: 10px 0 0;
  color: #577083;
  font-size: 0.86rem;
  font-weight: 750;
}

.update-status.warn {
  color: #ad6f00;
}

.update-status.error {
  color: #b3261e;
}

.update-active-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.update-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 31, 62, 0.36);
  backdrop-filter: blur(8px);
}

.barcode-overlay {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: grid;
  place-items: end center;
  padding: calc(env(safe-area-inset-top) + 18px) 18px calc(env(safe-area-inset-bottom) + 18px);
  background: rgba(5, 31, 62, 0.48);
  backdrop-filter: blur(8px);
}

.barcode-card {
  width: min(100%, 390px);
  padding: 18px;
  border: 1px solid #cfe0ea;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 54px rgba(3, 56, 87, 0.24);
}

.barcode-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.barcode-card h2 {
  margin: 0;
  color: #051f3e;
  font-size: 1.28rem;
}

.icon-close {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #cfe0ea;
  border-radius: 50%;
  background: #fff;
  color: var(--text);
  font-size: 1.7rem;
  line-height: 1;
}

.barcode-camera {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  background: #061827;
}

.barcode-camera video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.barcode-frame {
  position: absolute;
  inset: 27% 10%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  box-shadow: 0 0 0 999px rgba(4, 17, 27, 0.22);
}

.barcode-message {
  min-height: 22px;
  margin: 12px 0;
}

.barcode-manual {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.barcode-manual input {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid #b9d5e6;
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  font-size: 16px;
}

.snackbar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(env(safe-area-inset-bottom) + 92px);
  z-index: 95;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  max-width: 390px;
  margin: 0 auto;
  padding: 12px 14px;
  border: 1px solid rgba(10, 157, 183, 0.42);
  border-radius: 18px;
  background: rgba(231, 249, 252, 0.58);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  box-shadow: 0 18px 42px rgba(3, 56, 87, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  color: #051f3e;
  font-weight: 850;
}

.snackbar-action {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #b9d5e6;
  border-radius: 12px;
  background: #e6f7fb;
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 900;
}

.snackbar-action.hidden {
  display: none;
}

.confirm-sheet-card {
  max-height: 48vh;
  max-height: 48dvh;
}

.snackbar-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #0a9db7;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 950;
}

.update-card {
  width: min(100%, 360px);
  padding: 22px;
  border: 1px solid #cfe0ea;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 54px rgba(3, 56, 87, 0.22);
  text-align: center;
}

.update-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  place-items: center;
  border-radius: 50%;
  background: #e9f8fb;
  color: var(--accent-dark);
  font-size: 1.6rem;
  font-weight: 900;
}

.update-card h2 {
  margin: 0 0 8px;
  color: #051f3e;
  font-size: 1.35rem;
}

.update-progress {
  height: 9px;
  margin: 16px 0 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #d7e6ef;
}

.update-progress span {
  display: block;
  width: 12%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, #14c5d8, #058aa7);
  transition: width 0.35s ease;
}

.update-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#update-close {
  margin-top: 18px;
}

.update-steps li {
  min-height: 34px;
  padding: 8px 6px;
  border-radius: 12px;
  background: #f7fbfd;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.update-steps li.active {
  background: #e9f8fb;
  color: var(--accent-dark);
}

.update-steps li.done {
  background: #f0fbf4;
  color: var(--green);
}

.logout-button {
  width: 100%;
  margin-top: 14px;
}

