/* ============================================================================
   iEnTop-components.css
   ----------------------------------------------------------------------------
   Premium component layer. Loaded AFTER iEnTop.css. Consumes existing tokens
   (--color-*, --shadow-card, --radius, --transition) and adds:
   - Extended tokens (spacing, radius scale, font sizes, shadows)
   - Token aliases (--color-text, --color-surface, --color-primary) used by
     dashboard inline styles so they resolve correctly in every theme.
   - Base typography (h1-h6, p, code)
   - Tables, modals, KPI widgets, skeletons, form extras, button variants
   - Mini auxiliary components (dropdown, tooltip, tabs)
   - Utility classes (spacing, text, color, layout, decoration)
   - Accessibility (focus-visible, prefers-reduced-motion)
   ========================================================================== */

/* ------------------------------------------------------------------ */
/* 1. EXTENDED TOKENS + ALIASES                                       */
/* ------------------------------------------------------------------ */
:root {
  /* Spacing scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  /* Radius scale */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Font sizes */
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;

  /* Line heights */
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-loose: 1.75;

  /* Shadows (complement existing --shadow-card) */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.35);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.45);

  /* Aliases used by inline frame styles */
  --color-text: var(--color-text-primary);
  --color-surface: var(--color-bg-card);
  --color-primary: var(--color-accent);
}

/* ------------------------------------------------------------------ */
/* 2. TYPOGRAPHY BASE                                                 */
/* ------------------------------------------------------------------ */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-md) 0;
  color: var(--color-text-primary);
  font-weight: 600;
  line-height: var(--line-height-tight);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--font-size-3xl); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }
h5 { font-size: var(--font-size-base); text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-secondary); }
h6 { font-size: var(--font-size-sm); text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted); }

p {
  margin: 0 0 var(--space-md) 0;
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
}

small { font-size: var(--font-size-sm); color: var(--color-text-secondary); }
strong { font-weight: 600; color: var(--color-text-primary); }
em { font-style: italic; }

code, kbd, pre {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
}
code {
  background: var(--color-bg-input);
  color: var(--color-text-accent);
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-sm);
}
pre {
  background: var(--color-bg-input);
  color: var(--color-text-primary);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  overflow-x: auto;
  line-height: var(--line-height-normal);
}
pre code { background: transparent; padding: 0; color: inherit; }
kbd {
  background: var(--color-bg-input);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  border-bottom-width: 2px;
  border-radius: var(--radius-sm);
  padding: 0.05rem 0.4rem;
  font-size: 0.85em;
}
blockquote {
  margin: var(--space-md) 0;
  padding: var(--space-sm) var(--space-md);
  border-left: 3px solid var(--color-accent);
  color: var(--color-text-secondary);
  font-style: italic;
}

/* ------------------------------------------------------------------ */
/* 3. TABLES                                                          */
/* ------------------------------------------------------------------ */
.table-wrapper { width: 100%; overflow-x: auto; border-radius: var(--radius-md); }

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-bg-card);
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
}
.table thead th {
  background: var(--color-bg-secondary);
  color: var(--color-text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: var(--font-size-xs);
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}
.table tbody td {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: 0; }

.table-striped tbody tr:nth-child(odd) { background: rgba(255, 255, 255, 0.02); }
.table-hover tbody tr { transition: background var(--transition); }
.table-hover tbody tr:hover { background: var(--color-bg-hover); }

.table-sticky-head thead th { position: sticky; top: 0; z-index: 2; }

.table-compact thead th, .table-compact tbody td { padding: 0.35rem var(--space-sm); }

.table .num, .table .text-right { text-align: right; font-variant-numeric: tabular-nums; }
.table .text-center { text-align: center; }

/* ------------------------------------------------------------------ */
/* 4. KPI / DASHBOARD WIDGETS  (promoted from inline)                 */
/* ------------------------------------------------------------------ */
.kpi-huge {
  font-size: var(--font-size-4xl);
  font-weight: 800;
  letter-spacing: -1px;
  margin: 0.2rem 0 var(--space-md) 0;
  line-height: var(--line-height-tight);
  color: var(--color-text-primary);
}
.kpi-label {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text-muted);
  font-weight: 700;
}
.kpi-value {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-text-primary);
}
.kpi-trend-up { color: var(--color-success); font-size: var(--font-size-sm); font-weight: 600; }
.kpi-trend-down { color: var(--color-danger); font-size: var(--font-size-sm); font-weight: 600; }

.css-bar-container {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
  overflow: hidden;
  display: flex;
  margin-top: var(--space-sm);
  margin-bottom: var(--space-sm);
}
.css-bar-fill-success { height: 100%; background: linear-gradient(90deg, #10b981, #34d399); }
.css-bar-fill-warning { height: 100%; background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.css-bar-fill-danger  { height: 100%; background: linear-gradient(90deg, #ef4444, #f87171); }
.css-bar-fill-primary { height: 100%; background: linear-gradient(90deg, #3b82f6, #60a5fa); }

.card-premium {
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}
.card-premium:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.bg-icon {
  position: absolute;
  right: -20px;
  top: -20px;
  width: 120px;
  height: 120px;
  opacity: 0.03;
  pointer-events: none;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-lg);
}

/* Document badges (used in Home + facturacion frames) */
.doc-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-size: var(--font-size-xs);
}
.doc-badge-pre { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.doc-badge-alb { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.doc-badge-fac { background: rgba(16, 185, 129, 0.15); color: #34d399; }

/* ------------------------------------------------------------------ */
/* 5. SKELETON LOADERS                                                */
/* ------------------------------------------------------------------ */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton-text,
.skeleton-line,
.skeleton-box,
.skeleton-circle {
  display: inline-block;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.05) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  color: transparent !important;
  border-radius: var(--radius-sm);
}
.skeleton-line { display: block; height: 0.9em; margin: 0.4em 0; width: 100%; }
.skeleton-box { display: block; width: 100%; height: 100%; min-height: 80px; border-radius: var(--radius-md); }
.skeleton-circle { border-radius: var(--radius-full); width: 40px; height: 40px; }

/* ------------------------------------------------------------------ */
/* 6. MODALS / DIALOGS                                                */
/* ------------------------------------------------------------------ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--space-md);
  animation: fadeIn 0.15s ease;
}
.modal-backdrop[hidden] { display: none; }

.modal {
  background: var(--color-bg-card);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-sm { max-width: 360px; }
.modal-md { max-width: 540px; }
.modal-lg { max-width: 800px; }
.modal-xl { max-width: 1100px; }

.modal-header {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}
.modal-header h3 { margin: 0; }

.modal-body {
  padding: var(--space-lg);
  overflow-y: auto;
  flex: 1 1 auto;
}
.modal-footer {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
}
.modal-close {
  background: transparent;
  border: 0;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: var(--space-xs);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.modal-close:hover { color: var(--color-text-primary); background: var(--color-bg-hover); }

/* ------------------------------------------------------------------ */
/* 7. FORMS — extras                                                  */
/* ------------------------------------------------------------------ */
.form-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xs);
}
.form-label.required::after {
  content: " *";
  color: var(--color-danger);
}
.form-help {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}
.form-error {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--color-danger);
  margin-top: var(--space-xs);
}
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
}

textarea {
  width: 100%;
  background: var(--color-bg-input);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  font-family: inherit;
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  resize: vertical;
  min-height: 80px;
  transition: var(--transition);
}
textarea:focus {
  outline: none;
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 3px var(--color-accent-subtle);
}

.is-invalid,
.is-invalid:focus {
  border-color: var(--color-danger) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}
.is-valid,
.is-valid:focus {
  border-color: var(--color-success) !important;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15) !important;
}

/* Custom checkbox + radio */
.form-check,
.form-radio {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  user-select: none;
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
}
.form-check input[type="checkbox"],
.form-radio input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--color-bg-input);
  border: 1px solid var(--color-border);
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  flex-shrink: 0;
}
.form-check input[type="checkbox"] { border-radius: var(--radius-sm); }
.form-radio input[type="radio"] { border-radius: var(--radius-full); }
.form-check input[type="checkbox"]:checked,
.form-radio input[type="radio"]:checked {
  background: var(--color-accent);
  border-color: var(--color-accent);
}
.form-check input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.form-radio input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: #fff;
  border-radius: var(--radius-full);
}

/* ------------------------------------------------------------------ */
/* 8. BUTTON VARIANTS                                                 */
/* ------------------------------------------------------------------ */
.btn-sm {
  font-size: var(--font-size-xs);
  padding: 0.35rem 0.7rem;
  min-height: 28px;
}
.btn-lg {
  font-size: var(--font-size-base);
  padding: 0.7rem 1.4rem;
  min-height: 44px;
}
.btn-block { display: flex; width: 100%; justify-content: center; }

.btn-outline {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
}
.btn-outline:hover {
  background: var(--color-bg-hover);
  border-color: var(--color-border-focus);
}

.btn-ghost {
  background: transparent;
  border: 1px solid transparent;
  color: var(--color-text-secondary);
}
.btn-ghost:hover {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
}

/* ------------------------------------------------------------------ */
/* 9. AUX COMPONENTS — dropdown / tooltip / tabs                      */
/* ------------------------------------------------------------------ */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 180px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--space-xs) 0;
  z-index: 100;
  display: none;
}
.dropdown.is-open > .dropdown-menu,
.dropdown:focus-within > .dropdown-menu { display: block; }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: transparent;
  border: 0;
  width: 100%;
  text-align: left;
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: var(--transition);
}
.dropdown-item:hover { background: var(--color-bg-hover); }
.dropdown-item.is-danger { color: var(--color-danger); }
.dropdown-divider {
  height: 1px;
  margin: var(--space-xs) 0;
  background: var(--color-border);
}

[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-bg-secondary);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 200;
  box-shadow: var(--shadow-md);
}
[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after { opacity: 1; }

.tabs { display: flex; flex-direction: column; }
.tab-list {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--color-border);
  overflow-x: auto;
}
.tab-button {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: var(--space-sm) var(--space-md);
  color: var(--color-text-secondary);
  cursor: pointer;
  font-size: var(--font-size-sm);
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
}
.tab-button:hover { color: var(--color-text-primary); }
.tab-button.is-active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}
.tab-panel { padding: var(--space-md) 0; }
.tab-panel:not(.is-active) { display: none; }

/* ------------------------------------------------------------------ */
/* 10. UTILITY CLASSES                                                */
/* ------------------------------------------------------------------ */
/* Spacing — margin */
.m-0 { margin: 0; } .m-1 { margin: var(--space-xs); } .m-2 { margin: var(--space-sm); }
.m-3 { margin: var(--space-md); } .m-4 { margin: var(--space-lg); } .m-5 { margin: var(--space-xl); } .m-6 { margin: var(--space-2xl); }

.mt-0 { margin-top: 0; } .mt-1 { margin-top: var(--space-xs); } .mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); } .mt-4 { margin-top: var(--space-lg); } .mt-5 { margin-top: var(--space-xl); } .mt-6 { margin-top: var(--space-2xl); }

.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: var(--space-xs); } .mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); } .mb-4 { margin-bottom: var(--space-lg); } .mb-5 { margin-bottom: var(--space-xl); } .mb-6 { margin-bottom: var(--space-2xl); }

.ml-0 { margin-left: 0; } .ml-1 { margin-left: var(--space-xs); } .ml-2 { margin-left: var(--space-sm); }
.ml-3 { margin-left: var(--space-md); } .ml-4 { margin-left: var(--space-lg); } .ml-5 { margin-left: var(--space-xl); }

.mr-0 { margin-right: 0; } .mr-1 { margin-right: var(--space-xs); } .mr-2 { margin-right: var(--space-sm); }
.mr-3 { margin-right: var(--space-md); } .mr-4 { margin-right: var(--space-lg); } .mr-5 { margin-right: var(--space-xl); }

.mx-auto { margin-left: auto; margin-right: auto; }
.my-0 { margin-top: 0; margin-bottom: 0; }
.my-2 { margin-top: var(--space-sm); margin-bottom: var(--space-sm); }
.my-3 { margin-top: var(--space-md); margin-bottom: var(--space-md); }
.my-4 { margin-top: var(--space-lg); margin-bottom: var(--space-lg); }

/* Spacing — padding */
.p-0 { padding: 0; } .p-1 { padding: var(--space-xs); } .p-2 { padding: var(--space-sm); }
.p-3 { padding: var(--space-md); } .p-4 { padding: var(--space-lg); } .p-5 { padding: var(--space-xl); } .p-6 { padding: var(--space-2xl); }

.px-2 { padding-left: var(--space-sm); padding-right: var(--space-sm); }
.px-3 { padding-left: var(--space-md); padding-right: var(--space-md); }
.px-4 { padding-left: var(--space-lg); padding-right: var(--space-lg); }
.py-2 { padding-top: var(--space-sm); padding-bottom: var(--space-sm); }
.py-3 { padding-top: var(--space-md); padding-bottom: var(--space-md); }
.py-4 { padding-top: var(--space-lg); padding-bottom: var(--space-lg); }

/* Text */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }
.text-3xl { font-size: var(--font-size-3xl); }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.text-uppercase { text-transform: uppercase; letter-spacing: 0.05em; }
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-wrap { white-space: normal; }
.text-nowrap { white-space: nowrap; }

/* Color */
.text-muted { color: var(--color-text-muted); }
.text-secondary { color: var(--color-text-secondary); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-danger { color: var(--color-danger); }
.text-primary { color: var(--color-accent); }
.text-accent { color: var(--color-text-accent); }

/* Layout */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.items-stretch { align-items: stretch; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.justify-around { justify-content: space-around; }
.gap-1 { gap: var(--space-xs); }
.gap-2 { gap: var(--space-sm); }
.gap-3 { gap: var(--space-md); }
.gap-4 { gap: var(--space-lg); }
.gap-5 { gap: var(--space-xl); }
.gap-6 { gap: var(--space-2xl); }
.w-full { width: 100%; }
.h-full { height: 100%; }
.w-auto { width: auto; }
.min-h-0 { min-height: 0; }

/* Visibility */
.hidden { display: none !important; }
.invisible { visibility: hidden; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Decoration */
.rounded-none { border-radius: 0; }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }
.shadow-none { box-shadow: none; }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.opacity-0 { opacity: 0; }
.opacity-25 { opacity: 0.25; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }
.border { border: 1px solid var(--color-border); }
.border-t { border-top: 1px solid var(--color-border); }
.border-b { border-bottom: 1px solid var(--color-border); }
.border-l { border-left: 1px solid var(--color-border); }
.border-r { border-right: 1px solid var(--color-border); }

/* ------------------------------------------------------------------ */
/* 11. ACCESSIBILITY                                                  */
/* ------------------------------------------------------------------ */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
button:focus-visible,
.btn:focus-visible,
.dropdown-item:focus-visible,
.tab-button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  /* Existing :focus styles already provide border + box-shadow */
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .skeleton-text,
  .skeleton-line,
  .skeleton-box,
  .skeleton-circle { animation: none; background: rgba(255, 255, 255, 0.08); }
}
