.ap-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  padding: 24px;
}

.ap-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.ap-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
}

.ap-subtitle {
  margin: 4px 0 0;
  color: #6b7280;
  font-size: 0.875rem;
}

.ap-btn {
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.ap-btn-primary { background: #4f46e5; }
.ap-btn-primary:hover { background: #4338ca; }
.ap-btn-success { background: #16a34a; }
.ap-btn-success:hover { background: #15803d; }
.ap-btn-info { background: #2563eb; }
.ap-btn-info:hover { background: #1d4ed8; }

.ap-input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px 12px;
  color: #1f2937;
  background: #fff;
}

.ap-input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.ap-table-wrap {
  overflow-x: auto;
}

.ap-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.ap-thead {
  background: #f9fafb;
}

.ap-th {
  padding: 12px 16px;
  text-align: left;
}

.ap-th-bordered {
  border-bottom: 1px solid #e5e7eb;
}

.ap-cell {
  padding: 12px 16px;
}

.ap-nowrap {
  white-space: nowrap;
}

.ap-label {
  display: block;
  margin-bottom: 8px;
  color: #374151;
  font-size: 0.875rem;
  font-weight: 600;
}

.ap-flex-row {
  display: flex;
}

.ap-items-center {
  align-items: center;
}

.ap-justify-between {
  justify-content: space-between;
}

.ap-gap-2 {
  gap: 8px;
}

.ap-gap-3 {
  gap: 12px;
}

.ap-gap-4 {
  gap: 16px;
}

.ap-justify-end {
  justify-content: flex-end;
}

.ap-mb-4 {
  margin-bottom: 16px;
}

.ap-mb-6 {
  margin-bottom: 24px;
}

.ap-mt-4 {
  margin-top: 16px;
}

.ap-mt-6 {
  margin-top: 24px;
}

.ap-pt-4 {
  padding-top: 16px;
}

.ap-tab-row {
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 24px;
}

.ap-note-row {
  margin-bottom: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
  padding: 12px;
}

.ap-row-divider {
  border-bottom: 1px solid #f3f4f6;
}

.ap-row-divider:hover {
  background: #f9fafb;
}

.ap-text {
  color: #111827;
  font-size: 0.875rem;
}

.ap-text-muted {
  color: #4b5563;
  font-size: 0.875rem;
}

.ap-text-muted-strong {
  color: #4b5563;
  font-size: 0.875rem;
  font-weight: 500;
}

.ap-text-xs {
  font-size: 0.75rem;
}

.ap-text-subtle {
  color: #6b7280;
}

.ap-text-danger {
  color: #ef4444;
}

.ap-text-center {
  text-align: center;
}

.ap-mb-2 {
  margin-bottom: 8px;
}

.ap-mt-1 {
  margin-top: 4px;
}

.ap-mt-2 {
  margin-top: 8px;
}

.ap-heading-md {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
}

.ap-heading-lg {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: #1f2937;
}

.ap-section-title {
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
}

.ap-box {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
}

.ap-surface {
  background: #fff;
}

.ap-surface-gradient-main {
  background: linear-gradient(to right, #eef2ff, #f5f3ff);
}

.ap-cell-strong {
  color: #1f2937;
  font-weight: 500;
}

.ap-cell-muted {
  color: #4b5563;
  font-weight: 600;
}

.ap-cell-mono-xs {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
}

.ap-th-muted {
  color: #4b5563;
  font-weight: 600;
}

.ap-th-xs {
  font-size: 0.75rem;
  font-weight: 600;
}

.ap-label-strong {
  display: block;
  margin-bottom: 8px;
  color: #1f2937;
  font-size: 0.875rem;
  font-weight: 600;
}

.ap-label-xs {
  display: block;
  margin-bottom: 8px;
  color: #374151;
  font-size: 0.75rem;
  font-weight: 600;
}

.ap-fw-semibold {
  font-weight: 600;
}

.ap-chip {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  background: #fff;
}

.ap-chip-muted {
  background: #f3f4f6;
}

.ap-badge-muted {
  display: inline-block;
  padding: 2px 4px;
  border-radius: 4px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 0.75rem;
}

.ap-text-sm-strong {
  color: #374151;
  font-size: 0.875rem;
  font-weight: 600;
}

.ap-text-medium {
  color: #1f2937;
  font-weight: 500;
}

.ap-text-danger-strong {
  color: #b91c1c;
}

.ap-text-success-strong {
  color: #15803d;
}

.ap-link-indigo {
  color: #4f46e5;
  text-decoration: none;
}

.ap-link-indigo:hover {
  color: #3730a3;
}

.ap-link-danger {
  color: #dc2626;
  text-decoration: none;
}

.ap-link-danger:hover {
  color: #991b1b;
}

.ap-btn-tab {
  background: #fff;
  color: #4f46e5;
  border: 1px solid #d1d5db;
}

.ap-btn-tab:hover {
  background: #f3f4f6;
}

.ap-btn-ghost {
  background: #fff;
  color: #374151;
  border: 1px solid #d1d5db;
}

.ap-btn-ghost:hover {
  background: #f9fafb;
}

.ap-input-sm-fixed {
  width: 7rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 4px 8px;
}

.ap-input-lg {
  padding: 10px 16px;
}

.ap-input-disabled {
  background: #f3f4f6;
  color: #4b5563;
  cursor: not-allowed;
}

.ap-input-mono-xs {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
}

.ap-table-shell {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  font-size: 0.875rem;
}

.ap-border-b {
  border-bottom: 1px solid #e5e7eb;
}

.ap-section-sep {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e5e7eb;
}

.ap-hidden {
  display: none;
}

.ap-stack-6 > * + * {
  margin-top: 24px;
}

.ap-cursor-pointer {
  cursor: pointer;
}

.ap-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  accent-color: #4f46e5;
}

.ap-error-block {
  padding: 12px 16px;
  text-align: center;
  color: #dc2626;
}

.ap-text-hover-indigo {
  color: #1f2937;
  transition: color 0.2s ease;
}

.group:hover .ap-text-hover-indigo {
  color: #4f46e5;
}

.ap-tab-btn {
  padding: 12px 24px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  border-bottom: 2px solid transparent;
  background: transparent;
}

.ap-tab-btn:hover {
  color: #374151;
  border-bottom-color: #d1d5db;
}

.ap-tab-underline {
  padding: 12px 16px;
  font-weight: 600;
  color: #4b5563;
  border-bottom: 2px solid transparent;
}

.ap-tab-pill {
  padding: 8px 12px;
  border-radius: 8px;
  background: #f3f4f6;
  color: #374151;
}

.ap-text-xl {
  font-size: 1.25rem;
}

.ap-text-3xl {
  font-size: 1.875rem;
}

.ap-text-4xl {
  font-size: 2.25rem;
}

.ap-panel-body {
  padding: 24px;
}

.ap-panel-body > * + * {
  margin-top: 16px;
}

.ap-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  padding: 16px;
}

.ap-sticky-head {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  padding: 16px;
  color: #fff;
  background: linear-gradient(to right, #4f46e5, #9333ea);
}

.ap-progress-track {
  width: 100%;
  height: 8px;
  margin-top: 8px;
  border-radius: 999px;
  background: #e5e7eb;
}

.ap-stat-card {
  border-radius: 10px;
  padding: 16px;
}

.ap-stat-card-blue {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
}

.ap-stat-card-green {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
}

.ap-stat-card-orange {
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
}

.ap-stat-card-purple {
  background: linear-gradient(135deg, #faf5ff, #f3e8ff);
}

.ap-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
}

.ap-stat-blue { color: #2563eb; }
.ap-stat-green { color: #16a34a; }
.ap-stat-red { color: #dc2626; }
.ap-stat-orange { color: #ea580c; }
.ap-stat-purple { color: #9333ea; }
.ap-stat-yellow { color: #ca8a04; }

.ap-empty {
  padding: 16px;
  text-align: center;
  color: #6b7280;
}

.ap-error {
  padding: 16px;
  text-align: center;
  color: #dc2626;
}

.ap-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.ap-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.ap-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.ap-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.ap-grid-6 {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 1024px) {
  .ap-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ap-grid-5,
  .ap-grid-6 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .ap-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .ap-grid-2,
  .ap-grid-3,
  .ap-grid-4,
  .ap-grid-5,
  .ap-grid-6 {
    grid-template-columns: 1fr;
  }
}
