/* Chinar Medicos shared presentation tokens and component foundations. */
:root {
  --cm-font-sans: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --cm-ink: #f7f3e8;
  --cm-ink-muted: #b9b2a4;
  --cm-canvas: #0e0f10;
  --cm-surface: #181a1c;
  --cm-surface-raised: #212326;
  --cm-brand: #d6b35c;
  --cm-brand-strong: #ebd78e;
  --cm-border: rgba(214, 179, 92, .22);
  --cm-info: #60a5fa;
  --cm-success: #4ade80;
  --cm-warning: #fbbf24;
  --cm-danger: #fb7185;
  --cm-radius-sm: 8px;
  --cm-radius-md: 12px;
  --cm-radius-lg: 18px;
  --cm-shadow-sm: 0 4px 14px rgba(0, 0, 0, .2);
  --cm-shadow-md: 0 14px 34px rgba(0, 0, 0, .32);
  --cm-space-1: .25rem;
  --cm-space-2: .5rem;
  --cm-space-3: .75rem;
  --cm-space-4: 1rem;
  --cm-space-5: 1.5rem;
  --cm-space-6: 2rem;
  --cm-container: 1440px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--cm-font-sans); line-height: 1.55; text-rendering: optimizeLegibility; }
img, svg, video, canvas { max-width: 100%; }
button, input, select, textarea { font: inherit; }
button, [type="button"], [type="submit"], [role="button"], a { -webkit-tap-highlight-color: transparent; }

.skip-link {
  position: fixed; top: var(--cm-space-3); left: var(--cm-space-3); z-index: 100000;
  padding: .7rem 1rem; color: #0b0b0b !important; background: var(--cm-brand-strong);
  border-radius: var(--cm-radius-sm); font-weight: 800; transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--cm-brand-strong) !important;
  outline-offset: 3px !important;
  box-shadow: none;
}
:where(input, select, textarea, button):disabled,
:where(input, select, textarea, button)[aria-disabled="true"] { cursor: not-allowed; opacity: .55; }

.admin-ui, .student-ui, .frontend-modern { font-family: var(--cm-font-sans); }
.admin-ui .layout-px-spacing, .student-ui .layout-px-spacing { width: 100%; max-width: var(--cm-container); margin-inline: auto; }

.admin-ui :where(.form-control, .custom-select, .select2-selection),
.student-ui :where(.form-control, .custom-select, .select2-selection) {
  min-height: 44px; border-radius: var(--cm-radius-md); border: 1px solid var(--cm-border);
}
.admin-ui textarea.form-control, .student-ui textarea.form-control { min-height: 112px; resize: vertical; }
.admin-ui :where(.btn, button), .student-ui :where(.btn, button), .frontend-modern .uk-button {
  min-height: 44px; border-radius: var(--cm-radius-md); font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--cm-space-2);
}
.admin-ui :where(.btn-sm, .btn-group-sm > .btn), .student-ui :where(.btn-sm, .btn-group-sm > .btn) { min-height: 36px; }

.admin-ui :where(.widget, .card, .statbox), .student-ui :where(.widget, .card, .statbox) {
  border-radius: var(--cm-radius-lg); overflow-wrap: anywhere;
}
.admin-ui .table-responsive, .student-ui .table-responsive {
  width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; -webkit-overflow-scrolling: touch;
}
.admin-ui table, .student-ui table { width: 100%; }
.admin-ui :where(.badge, .label), .student-ui :where(.badge, .label) { line-height: 1.25; font-weight: 700; }
.admin-ui :where(.alert, .invalid-feedback), .student-ui :where(.alert, .invalid-feedback) { border-radius: var(--cm-radius-md); }

.cm-sr-only {
  position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important;
  margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important; border: 0 !important;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (max-width: 767.98px) {
  .admin-ui .layout-px-spacing, .student-ui .layout-px-spacing { padding-inline: 12px !important; }
  .admin-ui .row, .student-ui .row { margin-inline: -6px; }
  .admin-ui [class*="col-"], .student-ui [class*="col-"] { padding-inline: 6px; }
  .admin-ui :where(.btn, button), .student-ui :where(.btn, button), .frontend-modern .uk-button { min-height: 46px; }
  .admin-ui .dropdown-menu, .student-ui .dropdown-menu { max-width: calc(100vw - 24px); }
}
