/* =========================================================================
   Shared base for the refreshed UI (loaded on every page by layouts/main.php)
   Brand fonts, color tokens, buttons and the one-time entrance animation.
   ========================================================================= */

@font-face { font-family: "Conti Stag"; font-weight: 400; font-display: swap; src: url(fonts/ContiStagg/ContinentalStagSans-Light.otf); }
@font-face { font-family: "Conti Stag"; font-weight: 400; font-display: swap; src: url(fonts/ContiStagg/ContinentalStagSans-Book.otf); }
@font-face { font-family: "Conti Stag"; font-weight: 500; font-display: swap; src: url(fonts/ContiStagg/ContinentalStagSans-Medium.otf); }

:root {
    --dr-bg: #f6f5f2;
    --dr-surface: #ffffff;
    --dr-surface-2: #fafaf8;
    --dr-ink: #16161a;
    --dr-ink-2: #3d3f45;          /* 10.5:1 on white */
    --dr-muted: #62646b;          /* 5.9:1 on white, 5.4:1 on the page background (WCAG AA) */
    --dr-line: #ebeae6;
    --dr-track: #efeee9;
    --dr-accent: #ffa500;          /* Continental orange: backgrounds with dark text */
    --dr-accent-mark: #e88a00;     /* deeper orange for data marks on white */
    --dr-accent-soft: #fff4e0;
    --dr-good: #23854f;
    --dr-good-soft: #e7f4ec;
    --dr-warn: #9a6400;
    --dr-warn-soft: #fff4e0;
    --dr-danger: #c4332b;
    --dr-radius: 16px;
    --dr-radius-sm: 10px;
    --dr-shadow: 0 1px 2px rgba(22, 22, 26, .04), 0 10px 30px -14px rgba(22, 22, 26, .14);
    --dr-shadow-hover: 0 1px 2px rgba(22, 22, 26, .05), 0 18px 40px -16px rgba(22, 22, 26, .22);
    --dr-ease: cubic-bezier(0.23, 1, 0.32, 1);
    --dr-font: "Conti Stag", "Continental", "Open Sans", sans-serif;
}
body.dash-refresh {
    color: var(--dr-ink-2);
    font-family: var(--dr-font);
    -webkit-font-smoothing: antialiased;
}

/* ---------- Entrance (once per page load) ---------- */
/* Final state is the default (works without JS); .dr-js hides things until .dr-ready plays them in */
.dr-js:not(.dr-ready) .dr-reveal { opacity: 0; transform: translateY(10px); }
.dr-ready .dr-reveal {
    opacity: 1; transform: none;
    transition: opacity 500ms var(--dr-ease), transform 600ms var(--dr-ease);
    transition-delay: calc(var(--dr-i, 0) * 60ms);
}

/* ---------- Buttons ---------- */
.dr-btn {
    display: inline-flex; align-items: center; gap: 8px;
    height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
    font-family: var(--dr-font); font-size: 14px; font-weight: 500; line-height: 1;
    text-decoration: none !important; cursor: pointer; user-select: none;
    transition: transform 160ms var(--dr-ease), background-color 200ms ease, box-shadow 200ms ease, border-color 200ms ease, color 200ms ease;
}
.dr-btn:active { transform: scale(.97); }
.dr-btn:focus-visible { outline: 2px solid var(--dr-ink); outline-offset: 2px; }
.dr-btn--primary { background: var(--dr-accent); color: var(--dr-ink) !important; box-shadow: 0 6px 16px -8px rgba(232, 138, 0, .8); }
.dr-btn--ghost { background: var(--dr-surface); color: var(--dr-ink) !important; border-color: var(--dr-line); }
@media (hover: hover) and (pointer: fine) {
    .dr-btn--primary:hover { background: #ffb22e; box-shadow: 0 10px 22px -10px rgba(232, 138, 0, .9); }
    .dr-btn--ghost:hover { border-color: #d9d7d0; background: var(--dr-surface-2); }
}

@media (prefers-reduced-motion: reduce) {
    .dr-js:not(.dr-ready) .dr-reveal { transform: none; }
    .dr-ready .dr-reveal { transition: opacity 200ms ease; transition-delay: 0ms; }
    .dr-btn { transition: opacity 200ms ease, background-color 200ms ease !important; }
    .dr-btn:active { transform: none; }
}
