:root {
  color-scheme: light dark;
  --bg: #f9fafb;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e5e7eb;
  --hover: #f3f4f6;
  --blue: #3b82f6;
  --indigo: #6366f1;
  --green: #22c55e;
  --amber: #f59e0b;
  --purple: #a855f7;
  --danger: #ef4444;
  --radius: 14px;
  --shadow: 0 12px 32px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(15, 23, 42, 0.08);
  --skeleton-base: rgba(15, 23, 42, 0.08);
  --skeleton-shine: rgba(255, 255, 255, 0.65);
  --touch-target: 48px;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  transition: background-color 0.2s ease, color 0.2s ease;
}

body.dark {
  --bg: #0b1220;
  --panel: #0f172a;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --border: #1f2937;
  --hover: #111827;
  --skeleton-base: rgba(148, 163, 184, 0.16);
  --skeleton-shine: rgba(255, 255, 255, 0.12);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

a {
  color: inherit;
}

button,
.btn,
.segmented .seg,
.user-menu-toggle,
input,
select,
textarea {
  min-height: var(--touch-target);
  touch-action: manipulation;
}

.skeleton {
  position: relative;
  overflow: hidden;
  display: inline-block;
  background: var(--skeleton-base);
  border-radius: 8px;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--skeleton-shine), transparent);
  transform: translateX(-100%);
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

.skeleton-text {
  display: block;
  height: 14px;
  margin: 6px 0;
  border-radius: 6px;
}

.skeleton-pill {
  display: inline-block;
  height: 20px;
  border-radius: 999px;
}

.skeleton-bar {
  height: 10px;
  width: 100%;
  margin-bottom: 8px;
  border-radius: 999px;
}

@keyframes skeleton-shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.modal-placeholder {
  display: contents;
}

button,
.btn,
.segmented .seg,
.user-menu-toggle {
  min-width: var(--touch-target);
}

.container {
  min-height: 100vh;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bg);
}

.pull-indicator {
  display: none;
}

@media (max-width: 680px) {
  .pull-indicator {
    position: sticky;
    top: -64px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 64px;
    color: var(--muted);
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
  }

  .pull-indicator::before {
    content: "\2193";
    font-size: 0.95rem;
    margin-right: 0.5rem;
  }

  .pull-indicator[data-state="pulling"],
  .pull-indicator[data-state="refreshing"] {
    opacity: 1;
    transform: translateY(0);
  }

  .pull-indicator[data-state="refreshing"]::before {
    content: "\27F3";
    animation: spin 1s linear infinite;
  }
}

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

.space {
  height: 16px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.page-header {
  padding: 22px 24px;
}

.header-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
}

.muted {
  color: var(--muted);
}

.header-subtitle {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.icon {
  width: 18px;
  height: 18px;
  display: inline-block;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--hover);
}

.user-name {
  font-weight: 600;
}

.user-role {
  font-size: 0.75rem;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.stats-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stat h4 {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 12px;
}

.stat .big {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  color: #fff;
}

.stat-icon svg {
  width: 22px;
  height: 22px;
}

.stat-icon.blue {
  background: linear-gradient(135deg, var(--blue), #60a5fa);
}

.stat-icon.indigo {
  background: linear-gradient(135deg, var(--indigo), #818cf8);
}

.stat-icon.amber {
  background: linear-gradient(135deg, var(--amber), #fbbf24);
}

.stat-icon.green {
  background: linear-gradient(135deg, var(--green), #34d399);
}

.toolbar-card {
  padding: 18px 20px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.search {
  position: relative;
  flex: 1 1 260px;
}

.search .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  opacity: 0.6;
}

.search input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search input:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.25);
  border-color: var(--blue);
}

.segmented {
  display: inline-flex;
  gap: 8px;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(148, 163, 184, 0.14);
}

.segmented .seg {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}

.segmented .seg.active {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 6px 14px rgba(59, 130, 246, 0.2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  padding: 0.75rem 1.15rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn:hover:not([disabled]) {
  background: var(--hover);
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.3);
  outline-offset: 2px;
}

.btn.primary {
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.25);
}

.btn.primary:hover:not([disabled]) {
  filter: brightness(0.95);
}

.btn.ghost {
  background: transparent;
}

.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.table-card {
  padding: 20px 24px;
}

.table-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 12px;
}

.table-wrapper {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 820px;
}

thead th {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

tbody td {
  padding: 18px 14px;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}

tbody tr.unit-row {
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

tbody tr.unit-row:hover {
  background: var(--hover);
  transform: translateY(-1px);
}

tbody tr.unit-row.skeleton {
  cursor: default;
  pointer-events: none;
  background: transparent;
  transform: none;
}

tbody tr.unit-row.skeleton:hover {
  background: transparent;
  transform: none;
}

tbody tr.unit-row.skeleton .skeleton {
  width: 100%;
}

tbody tr.unit-row:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}

.workflow-skeleton .tabs button {
  cursor: default;
}

.workflow-skeleton .tabs button .skeleton {
  display: inline-block;
}

.workflow-skeleton .stage-skeleton {
  display: grid;
  gap: 16px;
  padding: 24px;
  min-height: 220px;
}

.workflow-skeleton .stage-skeleton .skeleton-bar {
  width: 100%;
  height: 160px;
}

.workflow-skeleton [data-workflow-module-retry] {
  margin-top: 16px;
}

.unit-meta {
  display: grid;
  gap: 0.25rem;
}

.task-meta {
  display: grid;
  gap: 0.15rem;
}

.progress {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.3);
  overflow: hidden;
  margin-bottom: 6px;
}

.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), #60a5fa);
  transition: width 0.2s ease;
}

.progress.complete > span {
  background: linear-gradient(90deg, var(--green), #34d399);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.badge.scheduled {
  background: rgba(148, 163, 184, 0.16);
  color: #475569;
  border-color: rgba(148, 163, 184, 0.35);
}

.badge.in-progress {
  background: rgba(59, 130, 246, 0.14);
  color: #1d4ed8;
  border-color: rgba(59, 130, 246, 0.35);
}

.badge.ready {
  background: rgba(34, 197, 94, 0.16);
  color: #15803d;
  border-color: rgba(34, 197, 94, 0.35);
}

.badge.closed {
  background: rgba(99, 102, 241, 0.16);
  color: #4338ca;
  border-color: rgba(99, 102, 241, 0.35);
}

.empty-state {
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px dashed var(--border);
  text-align: center;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.1);
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 30;
}

.overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 50;
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(640px, calc(100% - 32px));
  max-height: calc(100% - 80px);
  background: var(--panel);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transform: translate(-50%, -50%) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
  z-index: 60;
}

.modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  margin: 0;
  font-size: 1.3rem;
}

.modal-form {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.modal-body {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: grid;
  gap: 1.5rem;
  min-height: 0;
}

.modal-fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.5rem;
  min-height: 0;
}

.modal-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: rgba(148, 163, 184, 0.06);
}

@media (max-width: 680px) {
  .modal {
    width: 100vw;
    max-height: 92vh;
    border-radius: 24px 24px 0 0;
    top: auto;
    bottom: 0;
    transform: translate(-50%, 8%);
  }

  .modal.open {
    transform: translate(-50%, 0);
  }

  .modal-body {
    padding: 20px;
  }

  .modal-footer {
    padding: 16px 20px;
  }
}

.alert {
  border-radius: 12px;
  padding: 0.85rem 1rem;
  border: 1px solid transparent;
  font-size: 0.95rem;
}

.alert.danger {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: var(--danger);
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(460px, 100%);
  background: var(--panel);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  z-index: 40;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.drawer-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex: 1;
}

.drawer-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(148, 163, 184, 0.08);
}

.drawer-meta div {
  display: grid;
  gap: 0.2rem;
  font-size: 0.9rem;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: grid;
  gap: 1.25rem;
}

.tabs {
  display: inline-flex;
  gap: 8px;
}

.tabs button {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  background: var(--panel);
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.tabs button.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.drawer-section {
  display: grid;
  gap: 1rem;
}

.task-summary {
  display: grid;
  gap: 0.75rem;
}

.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.task-list {
  display: grid;
  gap: 0.75rem;
}

.task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.05);
}

.task-check {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.task-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border-radius: 6px;
}

.task-title {
  font-weight: 600;
}

.task-form {
  display: grid;
  gap: 1rem;
}

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

.input {
  display: grid;
  gap: 0.35rem;
}

.input label {
  font-weight: 600;
  font-size: 0.9rem;
}

.password-field {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field input {
  flex: 1;
  padding-right: 3.25rem;
}

.password-toggle {
  position: absolute;
  right: 8px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  border-radius: 10px;
}

.password-toggle:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.3);
  outline-offset: 2px;
}

.password-toggle[aria-pressed="true"] {
  color: var(--blue);
}

.input input,
.input select,
.input textarea,
.inspection-item textarea {
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 0.8rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  background: var(--panel);
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input input:not([type="radio"]):not([type="checkbox"]):focus-visible,
.input select:focus-visible,
.input textarea:focus-visible,
.inspection-item textarea:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.3);
  border-color: var(--blue);
}

.radio-row {
  display: flex;
  gap: 1rem;
}

.radio-row label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  cursor: pointer;
}

.radio-row input[type="radio"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--panel);
  display: grid;
  place-items: center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.radio-row input[type="radio"]::after {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.15s ease;
  background: var(--blue);
}

.radio-row input[type="radio"]:checked {
  border-color: var(--blue);
}

.radio-row input[type="radio"]:checked::after {
  transform: scale(1);
}

.radio-row input[type="radio"]:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.3);
  outline-offset: 2px;
  border-color: var(--blue);
}

.input textarea {
  min-height: 120px;
  resize: vertical;
}

.input.has-error label {
  color: var(--danger);
}

.input.has-error input,
.input.has-error select,
.input.has-error textarea {
  border-color: var(--danger);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.12);
}

.input-error {
  margin: 0;
  font-size: 0.85rem;
  color: var(--danger);
}

.inspection-card {
  display: grid;
  gap: 1rem;
}

.inspection-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  display: grid;
  gap: 0.75rem;
  background: rgba(148, 163, 184, 0.04);
}

.stage-item-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.stage-item-progress {
  font-weight: 600;
  color: var(--muted);
}

.stage-item-buttons {
  display: inline-flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.stage-single-item {
  display: grid;
  gap: 1rem;
}

.inspection-item header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.inspection-item .guidance {
  margin-top: 0.35rem;
  font-size: 0.9rem;
}

.inspection-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.media-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.5rem;
}

.media-thumb {
  width: 100%;
  padding-top: 70%;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  position: relative;
  cursor: pointer;
}

.media-thumb button {
  position: absolute;
  bottom: 8px;
  right: 8px;
  border: none;
  background: rgba(15, 23, 42, 0.75);
  color: #fff;
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
}

.drop-zone {
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  padding: 1rem;
  display: grid;
  place-items: center;
  text-align: center;
  background: rgba(148, 163, 184, 0.08);
  cursor: pointer;
}

.drop-zone.dragover {
  border-color: var(--blue);
  background: rgba(59, 130, 246, 0.12);
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 2rem;
}

.lightbox img {
  max-width: min(90vw, 960px);
  max-height: 90vh;
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
}

/* ==================== Progressive Image Loading (LQIP) ==================== */

/* Image elements with LQIP */
img.img-lqip,
img.img-loading {
  transition: filter 0.3s ease-out, opacity 0.3s ease-out;
}

img.img-lqip {
  filter: blur(20px);
  transform: scale(1.05); /* Slight scale to hide blur edges */
}

img.img-loading {
  opacity: 0.6;
  background: var(--bg-secondary);
}

img.img-loaded {
  filter: blur(0);
  opacity: 1;
  transform: scale(1);
}

img.img-error {
  opacity: 0.4;
  filter: grayscale(1);
}

/* Background images with LQIP */
.bg-lqip,
.bg-loading {
  position: relative;
  transition: filter 0.3s ease-out;
}

.bg-lqip::before {
  content: "";
  position: absolute;
  inset: 0;
  background: inherit;
  filter: blur(20px);
  transform: scale(1.1);
  z-index: -1;
}

.bg-loading {
  background-color: var(--bg-secondary);
}

.bg-loaded {
  filter: blur(0);
}

.bg-error {
  opacity: 0.4;
  filter: grayscale(1);
}

/* Loading spinner overlay for images */
.img-loading-container {
  position: relative;
}

.img-loading-container::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border: 2px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  opacity: 0;
  transition: opacity 0.2s;
}

.img-loading-container.loading::after {
  opacity: 1;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  img.img-lqip,
  img.img-loading,
  .bg-lqip,
  .bg-loading {
    transition: none;
  }

  img.img-lqip {
    filter: blur(10px); /* Less aggressive blur */
  }

  .img-loading-container::after {
    animation: none;
  }
}

.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: grid;
  gap: 0.75rem;
  z-index: 110;
}

.toast {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.toast.toast-update {
  align-items: stretch;
  max-width: min(420px, 90vw);
  padding: 1rem 1.25rem;
  flex-direction: column;
  gap: 1rem;
}

.toast-update .toast-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast-update .toast-title {
  font-weight: 700;
  font-size: 1rem;
}

.toast-update .toast-message {
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.95rem;
}

.toast-update .toast-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.toast-update .toast-actions .btn {
  flex: 1 1 auto;
  min-width: 120px;
}

@media (max-width: 640px) {
  .toast-update .toast-actions {
    flex-direction: column;
    width: 100%;
  }

  .toast-update .toast-actions .btn {
    width: 100%;
  }
}

.install-banner {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: min(420px, calc(100% - 32px));
  padding: 1.25rem 1.5rem;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid rgba(99, 102, 241, 0.15);
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 120;
  animation: install-banner-slide-up 0.35s ease-out;
}

.install-banner::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(135deg, var(--indigo), var(--blue));
  opacity: 0.85;
}

body.dark .install-banner {
  border-color: rgba(99, 102, 241, 0.45);
  background: rgba(15, 23, 42, 0.96);
}

body.dark .install-banner::before {
  opacity: 0.95;
}

.install-banner-content {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
}

.install-banner-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--indigo), var(--blue));
  color: #ffffff;
  font-size: 28px;
  box-shadow: 0 16px 32px rgba(59, 130, 246, 0.35);
}

body.dark .install-banner-icon {
  color: #f8fafc;
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.4);
}

.install-banner-copy {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.install-banner-kicker {
  text-transform: uppercase;
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.install-banner-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.install-banner-desc {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.install-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.install-banner-action {
  min-width: 150px;
}

.install-banner-dismiss {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: none;
  background: rgba(148, 163, 184, 0.16);
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.install-banner-dismiss:hover,
.install-banner-dismiss:focus-visible {
  background: rgba(99, 102, 241, 0.18);
  color: var(--indigo);
  transform: scale(1.05);
}

body.dark .install-banner-dismiss {
  background: rgba(148, 163, 184, 0.15);
  color: rgba(226, 232, 240, 0.85);
}

body.dark .install-banner-dismiss:hover,
body.dark .install-banner-dismiss:focus-visible {
  background: rgba(99, 102, 241, 0.35);
  color: #f8fafc;
}

@media (max-width: 640px) {
  .install-banner {
    right: 16px;
    left: 16px;
    width: auto;
    padding: 1rem 1.25rem 1.1rem;
  }

  .install-banner-content {
    grid-template-columns: 1fr;
    gap: 1rem;
    text-align: left;
  }

  .install-banner-actions {
    justify-content: flex-start;
  }

  .install-banner-action {
    width: 100%;
  }
}

@keyframes install-banner-slide-up {
  from {
    transform: translateY(12px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.toast.success {
  border-color: rgba(34, 197, 94, 0.4);
}

.toast.danger {
  border-color: rgba(239, 68, 68, 0.4);
}

.toast-dismiss {
  border: none;
  background: transparent;
  font-size: 1.1rem;
  cursor: pointer;
  color: inherit;
}

.login-card {
  max-width: 420px;
  margin: 6rem auto;
  padding: 2.5rem;
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
  display: grid;
  gap: 1.25rem;
}

.login-card h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
}

@media (max-width: 960px) {
  .container {
    padding: 18px;
  }

  table {
    min-width: 680px;
  }

  .drawer {
    width: 100%;
  }
}

@media (max-width: 680px) {
  .header-row {
    align-items: flex-start;
  }

  .header-actions {
    justify-content: flex-start;
  }

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

  .segmented {
    width: 100%;
    justify-content: space-between;
  }

  .segmented .seg {
    flex: 1;
    text-align: center;
  }
}

/* Task Builder responsive modal sizing and overflow control */
#task-builder-dialog.modal {
  width: min(1040px, 96vw);
  max-height: 92vh;
}

#task-builder-dialog .modal-body {
  overflow-y: auto;
}

/* Ensure the observations table area scrolls rather than overflowing the viewport */
#task-builder-dialog .table-wrapper {
  max-height: min(56vh, 640px) !important;
  overflow: auto !important;
}

/* Medium screens: maintain generous width but respect viewport */
@media (max-width: 960px) {
  #task-builder-dialog.modal {
    width: 96vw;
    max-height: 92vh;
  }
}

/* Small screens: full-viewport modal with tighter padding */
@media (max-width: 680px) {
  #task-builder-dialog.modal {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    top: 50%;
    left: 50%;
    border-radius: 0;
  }
  #task-builder-dialog .modal-body {
    padding: 16px;
  }
}

/* Workflow modal responsive sizing and overflow control */
#workflow-dialog.modal {
  width: min(1040px, 96vw);
  max-height: 92vh;
}

#workflow-dialog .modal-body {
  overflow-y: auto;
}

/* Tablet breakpoint: maintain generous width within viewport */
@media (max-width: 960px) {
  #workflow-dialog.modal {
    width: 96vw;
    max-height: 92vh;
  }
}

/* Small screens: full-viewport modal with tighter padding */
@media (max-width: 680px) {
  #workflow-dialog.modal {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    top: 50%;
    left: 50%;
    border-radius: 0;
  }
  #workflow-dialog .modal-body {
    padding: 16px;
  }
}

/* Task Details modal responsive sizing and overflow guardrails */
#task-details-dialog.modal {
  width: min(760px, 94vw);
  max-height: 90vh;
}

#task-details-dialog .modal-body {
  overflow-y: auto;
  min-height: 0;
}

@media (max-width: 768px) {
  #task-details-dialog.modal {
    width: 96vw;
    max-height: 92vh;
  }
}

@media (max-width: 640px) {
  #task-details-dialog.modal {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    top: 50%;
    left: 50%;
    border-radius: 0;
  }
  #task-details-dialog .modal-body {
    padding: 16px;
  }
}

/* Workflow stage layout (newtaskdashboard-inspired) */
/* Container and header */
.stage-panel {
  display: block;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.stage-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 12px;
}
.stage-panel-header h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}
.stage-panel-header p.muted {
  margin: 4px 0 0;
  font-size: 0.95rem;
}
.stage-panel-actions {
  display: inline-flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.stage-panel-content {
  display: grid;
  gap: 1rem;
}

/* Grids */
.stage-panel-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-bottom: 12px;
}
.stage-fail-list {
  display: grid;
  gap: 0.75rem;
}

/* Cards and badges */
.stage-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.stage-card h3 {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fail-card {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 10px;
  padding: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.fail-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.fail-card p {
  margin: 0 0 8px;
}
.fail-card:hover {
  border-color: var(--danger);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.08);
}

/* Badge variants */
.badge.danger {
  background: rgba(239, 68, 68, 0.14);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.35);
}
.count-badge {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: var(--danger);
}
.tab-badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--danger);
  color: #fff;
}

/* Suggestions (chips) */
.stage-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.chip:hover {
  background: var(--hover);
  border-color: var(--blue);
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.12);
}
.chip.suggestion small {
  color: var(--muted);
  font-size: 0.75rem;
}

/* Pre-inspection item controls */
.stage-item-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.stage-item-progress {
  font-weight: 600;
  color: var(--muted);
}
.stage-item-buttons {
  display: inline-flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.stage-single-item {
  display: grid;
  gap: 1rem;
}

/* Task summary emphasis for workflow context */
.task-summary.workflow-accent {
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  color: #fff;
  border: none;
}
.task-summary.workflow-accent .summary-header .muted {
  color: rgba(255, 255, 255, 0.8);
}
.task-summary.workflow-accent .progress > span {
  background: #fff;
}

/* Responsiveness for workflow grids */
@media (max-width: 960px) {
  .stage-panel-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 680px) {
  .stage-card {
    padding: 14px;
  }
  .stage-panel {
    padding: 14px;
  }
}

/* Dark mode adjustments */
body.dark .fail-card {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
}
body.dark .chip:hover {
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.18);
}

/* Workflow modal accent without markup changes */
.modal.workflow .task-summary {
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  color: #fff;
  border: none;
}
.modal.workflow .task-summary .summary-header .muted {
  color: rgba(255, 255, 255, 0.8);
}
.modal.workflow .task-summary .progress > span {
  background: #fff;
}

/* Final review v2 */
.stage-final-review .final-review-banner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 24px;
  margin-bottom: 24px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.final-review-heading h2 {
  margin: 4px 0 8px;
}

.final-review-heading .status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--hover);
  color: var(--muted);
}

.final-review-heading .status.complete {
  color: var(--green);
}

.final-review-heading .status.pending {
  color: var(--danger);
}

.final-review-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.final-review-badge {
  min-width: 120px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--panel);
}

.final-review-badge.success {
  border-color: rgba(34, 197, 94, 0.4);
}

.final-review-badge.warning {
  border-color: rgba(245, 158, 11, 0.5);
}

.final-review-badge.danger {
  border-color: rgba(239, 68, 68, 0.55);
}

.final-review-badge .count {
  font-size: 1.5rem;
  font-weight: 600;
}

.final-review-badge .label {
  font-size: 0.85rem;
  color: var(--muted);
}

.final-review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.final-review-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.final-review-sidebar {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.final-review-blockers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.final-review-blockers.empty .card {
  text-align: center;
}

.blocker-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.blocker-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.blocker-card header h3 {
  margin: 0;
  font-size: 1rem;
}

.blocker-card header .count {
  font-weight: 600;
}

.blocker-card.danger {
  border-color: rgba(239, 68, 68, 0.6);
}

.blocker-card.warning {
  border-color: rgba(245, 158, 11, 0.6);
}

.blocker-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.blocker-items li {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.blocker-items .item-meta {
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.final-review-context .context-section {
  padding: 18px;
}

.context-section dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 12px;
}

.context-section .definition dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.context-section .definition dd {
  margin: 0;
}

.context-notes {
  margin-top: 16px;
  padding: 12px;
  background: var(--hover);
  border-radius: var(--radius);
}

.context-overrides-wrap {
  margin-top: 16px;
}

.context-overrides {
  margin: 8px 0 0;
  padding-left: 18px;
}

.timeline-feed {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.timeline-entry {
  padding-left: 12px;
  border-left: 2px solid var(--border);
}

.timeline-entry .entry-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timeline-entry .entry-time,
.timeline-entry .entry-actor {
  font-size: 0.8rem;
  color: var(--muted);
}

.timeline-entry .entry-notes {
  margin: 8px 0 0;
}

.final-review-timeline-section {
  margin-top: 32px;
  padding: 20px 24px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.final-review-footer {
  position: sticky;
  bottom: 0;
  margin-top: 28px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.final-review-footer .footer-actions {
  display: flex;
  gap: 12px;
}

.final-review-footer .footer-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.final-review-footer .footer-helper {
  max-width: 520px;
}

.final-review-footer.finalized {
  justify-content: space-between;
  gap: 16px;
}

.final-review-footer.finalized .footer-status {
  margin-left: auto;
}

@media (max-width: 1024px) {
  .final-review-layout {
    grid-template-columns: 1fr;
  }

  .final-review-sidebar {
    position: static;
  }

  .final-review-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .final-review-footer .footer-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .final-review-footer.finalized {
    align-items: flex-start;
    gap: 12px;
  }

  .final-review-footer.finalized .footer-status {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }
}

/* User menu styles */
.user-menu-container { position: relative }
.user-menu { position: absolute; top: calc(100% + 8px); right: 0; min-width: 220px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 8px; z-index: 10 }
.user-menu.hidden { display: none }
.user-menu a { display: block; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--text) }
.user-menu a:hover, .user-menu a:focus-visible { background: var(--hover); outline: 3px solid rgba(59,130,246,0.25) }
.menu-divider { height: 1px; background: var(--border); margin: 6px 0 }
.user-menu-toggle { background: transparent; border: none; padding: 0 }

/* Settings Modal Tabs */
.settings-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.tab-button {
  background: none;
  border: none;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.tab-button:hover {
  color: var(--text);
}

.tab-button.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

/* Settings Form */
.settings-form {
  padding: 0 1.5rem 1.5rem;
}

.settings-form .form-group {
  margin-bottom: 1.5rem;
}

.settings-form label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.settings-form .checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: normal;
  cursor: pointer;
}

.settings-form .checkbox-label input[type="checkbox"] {
  width: 1.125rem;
  height: 1.125rem;
  cursor: pointer;
}

.settings-form .help-text {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.settings-form .form-control {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  font-size: 0.9375rem;
}

.settings-form .form-control.error {
  border-color: var(--red);
}

.settings-form .error-text {
  display: block;
  color: var(--red);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Tab Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ============================================
   Skeleton Component Styles
   ============================================ */

/* Unit Row Skeleton */
.skeleton-container {
  pointer-events: none;
  user-select: none;
}

.skeleton-unit-number {
  width: 80px;
  height: 20px;
}

.skeleton-badge {
  width: 60px;
  height: 24px;
  border-radius: 12px;
}

.skeleton-property {
  width: 140px;
  height: 14px;
}

.skeleton-dates {
  width: 180px;
  height: 12px;
}

.skeleton-button {
  width: 100px;
  height: 36px;
  border-radius: 8px;
}

.skeleton-button-small {
  width: 70px;
  height: 32px;
  border-radius: 6px;
}

/* Workflow Skeleton */
.workflow-skeleton {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.workflow-header-skeleton {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-title {
  width: 200px;
  height: 24px;
}

.skeleton-subtitle {
  width: 280px;
  height: 14px;
}

.workflow-tabs-skeleton {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.skeleton-tab {
  width: 90px;
  height: 32px;
  border-radius: 6px;
}

.workflow-content-skeleton {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.workflow-item-skeleton {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}

.skeleton-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
}

.workflow-item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skeleton-item-title {
  width: 160px;
  height: 16px;
}

.skeleton-item-meta {
  width: 100px;
  height: 12px;
}

.workflow-footer-skeleton {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Stat Card Skeleton */
.card.stat.skeleton-container {
  position: relative;
}

.card.stat.skeleton-container .stat-body {
  align-items: center;
  gap: 0.75rem;
}

.card.stat.skeleton-container .skeleton-stat-label {
  width: 100px;
  height: 12px;
}

.card.stat.skeleton-container .skeleton-stat-value {
  width: 60px;
  height: 28px;
}

.card.stat.skeleton-container .skeleton-stat-detail {
  width: 80px;
  height: 10px;
}

.card.stat.skeleton-container .skeleton-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

/* Responsive Skeleton Adjustments */
@media (max-width: 768px) {
  .workflow-skeleton {
    padding: 16px;
  }

  .skeleton-title {
    width: 150px;
  }

  .skeleton-subtitle {
    width: 200px;
  }

  .workflow-item-skeleton {
    padding: 12px;
  }
}

/* Skeleton Animation Variants */
@media (prefers-reduced-motion: reduce) {
  .skeleton::after {
    animation: none;
  }
}
