/* === Toast === */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 360px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  background: var(--ink-soft);
  border: 1px solid var(--ink-line);
  color: var(--pearl);
  font-size: 13px;
  z-index: 1000;
  box-shadow: var(--shadow-card);
  animation: toastIn 0.3s var(--ease-out);
}

.toast--success {
  background: rgba(111, 168, 144, 0.12);
  border-color: rgba(111, 168, 144, 0.4);
  color: var(--accent-green);
}

.toast--error {
  background: rgba(199, 123, 123, 0.12);
  border-color: rgba(199, 123, 123, 0.4);
  color: var(--accent-rose);
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* === Spinner === */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(212, 175, 55, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* === Button disabled === */
.btn[disabled],
.btn.is-loading {
  opacity: 0.55;
  pointer-events: none;
}

.btn.is-loading::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(10, 14, 26, 0.3);
  border-top-color: var(--ink-deep);
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: -2px;
  animation: spin 0.8s linear infinite;
}

/* === Loading screen overlay === */
.loading-screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--ink-deep);
  z-index: 999;
  gap: 16px;
}

.loading-screen__label {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--pearl-muted);
}

/* === Camera preview === */
.camera-preview {
  width: 100%;
  aspect-ratio: 1.4;
  background: linear-gradient(135deg, var(--ink-soft), var(--ink-medium));
  border-radius: var(--radius-md);
  border: 1px dashed var(--ink-line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.camera-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-preview__hint {
  font-size: 13px;
  color: var(--pearl-dim);
}

.camera-preview__sub {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pearl-muted);
}

.camera-preview input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* === Inline error / warning === */
.inline-warn {
  padding: 14px;
  background: rgba(217, 163, 94, 0.08);
  border: 1px solid rgba(217, 163, 94, 0.25);
  border-radius: var(--radius-md);
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--accent-amber);
  line-height: 1.5;
}

.inline-error {
  padding: 14px;
  background: rgba(199, 123, 123, 0.08);
  border: 1px solid rgba(199, 123, 123, 0.25);
  border-radius: var(--radius-md);
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--accent-rose);
  line-height: 1.5;
}

/* === Checklist item state changes (sidak detail) === */
.check-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--ink-medium);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  transition: all 0.2s var(--ease-out);
  cursor: pointer;
}

.check-item:active {
  transform: scale(0.985);
}

.check-item--ok {
  border-color: rgba(111, 168, 144, 0.3);
  background: rgba(111, 168, 144, 0.05);
}

.check-item--issue {
  border-color: rgba(199, 123, 123, 0.3);
  background: rgba(199, 123, 123, 0.05);
}

.check-box {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1.5px solid var(--ink-line);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: bold;
  transition: all 0.2s var(--ease-out);
}

.check-box--checked {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: var(--ink-deep);
}

.check-box--issue {
  background: var(--accent-rose);
  border-color: var(--accent-rose);
  color: var(--pearl);
}

.check-label {
  flex: 1;
  font-size: 13px;
  color: var(--pearl);
}

.check-status {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* === Item action button group === */
.item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.item-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--ink-line);
  background: var(--ink-soft);
  color: var(--pearl-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s var(--ease-out);
}

.item-action-btn:active {
  transform: scale(0.9);
}

.item-action-btn--ok-active {
  background: var(--accent-green);
  color: var(--ink-deep);
  border-color: var(--accent-green);
}

.item-action-btn--issue-active {
  background: var(--accent-rose);
  color: var(--pearl);
  border-color: var(--accent-rose);
}
