.card {
  min-width: 0;
  padding: var(--spacing-6);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.card--interactive {
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.card--interactive:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-2);
  padding: 10px 16px;
  color: var(--text-2);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease,
    box-shadow 160ms ease, transform 160ms ease;
}

.btn:hover {
  color: var(--primary-dark);
  background: var(--bg-soft);
  border-color: var(--primary-light);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
  cursor: not-allowed;
}

.btn--primary {
  color: var(--white);
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: 0 5px 12px rgba(13, 148, 136, 0.18);
}

.btn--primary:hover {
  color: var(--white);
  background: #115e59;
  border-color: #115e59;
}

.btn--danger {
  color: var(--white);
  background: #b91c1c;
  border-color: #b91c1c;
}

.btn--danger:hover {
  color: var(--white);
  background: #991b1b;
  border-color: #991b1b;
}

.btn--ghost {
  color: var(--primary-dark);
  background: transparent;
  border-color: transparent;
}

.btn--sm {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 0.875rem;
}

.btn--block {
  width: 100%;
}

.page-header {
  display: flex;
  min-width: 0;
  min-height: 76px;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--spacing-5);
  margin-bottom: var(--spacing-5);
}

.page-header__copy {
  min-width: 0;
}

.page-header__title {
  font-size: clamp(1.75rem, 2.5vw, 2.25rem);
  font-weight: 750;
  line-height: 1.15;
}

.page-header__description {
  max-width: 72ch;
  margin-top: 7px;
  color: var(--text-3);
  font-size: 0.97rem;
}

.page-header__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--spacing-2);
}

.stat-card {
  display: grid;
  min-width: 0;
  gap: var(--spacing-2);
  padding: var(--spacing-5);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.stat-card__label {
  color: var(--text-3);
  font-size: 0.8125rem;
  font-weight: 600;
}

.stat-card__value {
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2vw, 2rem);
  font-weight: 750;
  line-height: 1;
}

.stat-card__meta {
  color: var(--text-3);
  font-size: 0.8125rem;
}

.form-group {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.form-group > label,
.form-label {
  color: var(--text-2);
  font-size: 0.875rem;
  font-weight: 700;
}

.form-control {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 12px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid #d1d5db;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  line-height: 1.4;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

textarea.form-control {
  min-height: 112px;
  resize: vertical;
}

.form-control::placeholder {
  color: var(--text-3);
}

.form-control:hover {
  border-color: var(--text-muted);
}

.form-control:focus {
  border-color: var(--primary);
}

.form-hint,
.form-error {
  font-size: 0.8125rem;
}

.form-hint {
  color: var(--text-3);
}

.form-error {
  color: #b91c1c;
}

.data-toolbar {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-3);
  padding: var(--spacing-4);
  background: var(--bg);
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.data-toolbar__group {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-2);
}

.data-table-region {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--text-2);
  background: var(--bg);
  font-size: 0.875rem;
}

.data-table th,
.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  color: var(--text-3);
  background: var(--bg-soft);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.data-table tbody tr:hover {
  background: var(--bg-soft);
}

.data-list {
  display: grid;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.data-list > li {
  min-width: 0;
  padding: var(--spacing-4);
  border-bottom: 1px solid var(--border);
}

.data-list > li:last-child {
  border-bottom: 0;
}

.status-chip {
  display: inline-flex;
  width: fit-content;
  min-height: 26px;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  color: var(--text-2);
  background: var(--light);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

.status-chip--success {
  color: #047857;
  background: #ecfdf5;
}

.status-chip--warning {
  color: #92400e;
  background: #fffbeb;
}

.status-chip--danger {
  color: #b91c1c;
  background: #fef2f2;
}

.status-chip--info {
  color: var(--primary-dark);
  background: #f0fdfa;
}

.state-panel {
  padding: var(--spacing-5);
  color: var(--text-2);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.state-panel--success {
  color: #065f46;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.state-panel--warning {
  color: #78350f;
  background: #fffbeb;
  border-color: #fde68a;
}

.state-panel--danger {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
}

.empty-state {
  display: grid;
  min-height: 220px;
  place-items: center;
  align-content: center;
  gap: var(--spacing-3);
  padding: var(--spacing-10) var(--spacing-6);
  color: var(--text-3);
  text-align: center;
  background: var(--bg);
  border: 1px dashed #d1d5db;
  border-radius: var(--radius-md);
}

.empty-state__icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: var(--primary-dark);
  background: #f0fdfa;
  border-radius: 50%;
}

.empty-state__title {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
}

.empty-state__description {
  max-width: 52ch;
}

.pagination {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--spacing-2);
  padding: var(--spacing-4);
  color: var(--text-3);
  background: var(--bg);
}

.pagination__item {
  display: inline-flex;
  min-width: 40px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.pagination__item:hover,
.pagination__item[aria-current="page"] {
  color: var(--primary-dark);
  background: #f0fdfa;
  border-color: var(--primary);
}

.flash {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-3);
  padding: var(--spacing-3) var(--spacing-4);
  color: var(--text-2);
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.flash--success {
  border-left-color: var(--success);
}

.flash--warning {
  border-left-color: var(--warning);
}

.flash--danger {
  border-left-color: var(--danger);
}

.breadcrumbs {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-2);
  margin: 0 0 var(--spacing-4);
  padding: 0;
  color: var(--text-3);
  font-size: 0.875rem;
  list-style: none;
}

.breadcrumbs a {
  color: var(--text-2);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .page-header,
  .data-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .page-header__actions {
    justify-content: flex-start;
  }

  .data-table {
    min-width: 720px;
  }
}

@media (max-width: 480px) {
  .btn {
    min-width: 44px;
    min-height: 44px;
  }

  .card,
  .stat-card {
    padding: var(--spacing-4);
  }

  .page-header__actions,
  .page-header__actions .btn {
    width: 100%;
  }

  .pagination {
    justify-content: center;
  }

  .pagination__item {
    min-width: 44px;
    min-height: 44px;
  }
}
