/* ==========================================================================
   base.css — variabel, reset, tipografi, utilitas dasar
   DIKLAT CITO — Sistem Informasi Pelatihan (PT CITO Putra Utama)
   ========================================================================== */

:root {
  color-scheme: light;

  /* --- Warna primer (hijau CITO #00af91) --- */
  --c-primary: #00af91;
  --c-primary-600: #009880;
  --c-primary-700: #00806b;
  --c-primary-soft: #e0f7f2;

  /* --- Aksen teal (kesehatan) --- */
  --c-teal: #0f9d76;
  --c-teal-soft: #e4f6f0;

  /* --- Warna status --- */
  --c-success: #14804a;
  --c-success-soft: #e6f6ed;
  --c-warning: #a16a00;
  --c-warning-soft: #fdf3e2;
  --c-danger: #c0392b;
  --c-danger-soft: #fdeceb;
  --c-info: #00917a;
  --c-info-soft: #e0f7f2;
  --c-neutral: #5b6b83;
  --c-neutral-soft: #eef2f7;

  /* --- Netral --- */
  --c-bg: #f4f6fb;
  --c-surface: #ffffff;
  --c-surface-2: #f8fafc;
  --c-border: #e2e8f0;
  --c-border-strong: #cbd5e1;
  --c-text: #16233a;
  --c-text-muted: #64748b;
  --c-text-invert: #f8fafc;

  /* --- Sidebar (hijau CITO #00af91) --- */
  --c-sidebar: #00af91;
  --c-sidebar-2: #008c78;
  --c-sidebar-text: #eafff9;
  --c-sidebar-text-strong: #ffffff;
  --c-sidebar-hover: rgba(255, 255, 255, 0.18);
  --c-sidebar-active: rgba(0, 0, 0, 0.22);

  /* --- Tipografi --- */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-base: 0.9375rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 1.875rem;

  /* --- Ruang & bentuk --- */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(15, 39, 68, 0.06), 0 1px 3px rgba(15, 39, 68, 0.08);
  --shadow: 0 4px 14px rgba(15, 39, 68, 0.08);
  --shadow-lg: 0 18px 40px rgba(15, 39, 68, 0.18);

  /* --- Layout & lapisan --- */
  --sidebar-w: 264px;
  --header-h: 64px;
  --content-max: 1180px;
  --z-header: 20;
  --z-sidebar: 30;
  --z-overlay: 60;
  --z-modal: 70;
  --z-toast: 90;
}

/* --------------------------------------------------------------------------
   Reset ringan
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.55;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure {
  margin: 0;
}

h1 {
  font-size: var(--fs-2xl);
  line-height: 1.25;
}

h2 {
  font-size: var(--fs-xl);
  line-height: 1.3;
}

h3 {
  font-size: var(--fs-lg);
  line-height: 1.35;
}

ul,
ol {
  list-style: none;
  padding: 0;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--c-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid rgba(0, 175, 145, 0.35);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Utilitas
   -------------------------------------------------------------------------- */
.muted {
  color: var(--c-text-muted);
}

.small {
  font-size: var(--fs-sm);
}

.text-right {
  text-align: right;
}

.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;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

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

.wrap {
  flex-wrap: wrap;
}

.grow {
  flex: 1 1 auto;
  min-width: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
