/**
 * Gymnastics Plus - Core Design System
 * Modern, minimal design - black/white primary, gold accent (sparingly)
 *
 * FROZEN SHARED COMPONENT LIBRARY (Phase 0, 2026-06-07).
 * This file + assets/css/gp-base.css (design tokens) + css/gp-surface.css & js/gp-surface.js
 * (mobile cover/sheet) are the canonical .gp-btn / .gp-card / .gp-pill / surface library
 * for ALL lanes. RULE: CONSUME these classes — do NOT fork new component variants into
 * feature CSS. A change to the library is a COORDINATED MINI-SLICE (both UI lanes review it),
 * never part of a feature task. Legacy forks in feature CSS (gp-profile / gp-membership /
 * gp-homepage / gp-onboarding) are debt to consolidate incrementally, not new precedent.
 */

:root {
    /* Primary Colors */
    --gp-white: #ffffff;
    --gp-black: #000000;
    --gp-gray-50: #fafafa;
    --gp-gray-100: #f5f5f5;
    --gp-gray-200: #e5e5e5;
    --gp-gray-300: #d4d4d4;
    --gp-gray-400: #a3a3a3;
    --gp-gray-500: #737373;
    --gp-gray-600: #525252;
    --gp-gray-700: #404040;
    --gp-gray-800: #262626;
    --gp-gray-900: #171717;
    
    /* Accent - Use Sparingly */
    --gp-gold: #DFB859;
    --gp-gold-hover: #c9a64e;
    --gp-gold-light: rgba(223, 184, 89, 0.1);
    
    /* Semantic Colors */
    --gp-success: #22c55e;
    --gp-error: #ef4444;
    --gp-warning: #f59e0b;
    --gp-info: #3b82f6;
    
    /* Layout */
    --gp-sidebar-width: 260px;
    --gp-header-height: 64px;
    --gp-bottom-nav-height: 64px;
    --gp-content-max-width: 1200px;
    --gp-card-radius: 12px;
    /* DS-1 #4 completion: primary layer retokenized to Tier-2 --gp-color-shadow —
       byte-identical in light (rgba(0,0,0,0.08), same as before) and deepens under
       [data-theme="dark"] (rgba(0,0,0,0.4)) instead of staying frozen. The 0.06 soft
       accent layer has no Tier-2 equivalent at that weight and is cosmetic-only
       (not a white/light leak), so it stays a fixed value — logged as Phase-4.9 debt
       alongside the other primitive-only button states in this file. */
    --gp-card-shadow: 0 1px 3px var(--gp-color-shadow), 0 1px 2px rgba(0,0,0,0.06);
    --gp-card-shadow-hover: 0 4px 6px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
    
    /* Typography */
    --gp-font-sans: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --gp-font-display: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Transitions — F1 (2026-07-25): the --gp-transition-fast/base/slow trio retired.
       Every consumer below now composes var(--gp-motion-duration-*) + var(--gp-motion-ease-*)
       from the site-wide motion vocabulary in gp-base.css (~line 319). Do not re-add a local
       transition token here — gp-base.css is the single source of truth for durations/easing. */
}

/* ========================================
   RESET & BASE
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

body.gp-app {
    margin: 0;
    padding: 0;
    font-family: var(--gp-font-sans);
    font-size: 15px;
    line-height: 1.5;
    color: var(--gp-color-text); /* DS-2 #10: was --gp-gray-900, exact byte match in light */
    background: var(--gp-color-bg); /* DS-2 #10: was --gp-gray-100, exact byte match in light */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   LAYOUT STRUCTURE
   ======================================== */
.gp-layout {
    display: flex;
    min-height: 100vh;
}

.gp-sidebar {
    width: var(--gp-sidebar-width);
    background: var(--gp-color-surface); /* DS-2 #11: was --gp-white, exact byte match in light */
    border-right: 1px solid var(--gp-color-border); /* DS-2 #11: was --gp-gray-200, exact byte match in light */
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: transform var(--gp-motion-duration-base) var(--gp-motion-ease-out); /* F1: 200ms->300ms — mobile drawer slide, "screen enter" bucket, not the sheet-spring curve (this is a side drawer, not a bottom sheet) */
}

.gp-main {
    flex: 1;
    margin-left: var(--gp-sidebar-width);
    min-height: 100vh;
}

.gp-content {
    max-width: var(--gp-content-max-width);
    margin: 0 auto;
    padding: 32px 24px;
}

/* ========================================
   SIDEBAR NAVIGATION
   ======================================== */
.gp-sidebar-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--gp-color-border); /* DS-2 #11: was --gp-gray-200, exact byte match in light */
}

.gp-sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--gp-color-text); /* DS-2 #16: was --gp-gray-900, exact byte match in light */
}

.gp-sidebar-logo svg {
    width: 32px;
    height: 32px;
}

.gp-sidebar-logo span {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.gp-sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

/* Dark mode (UB, 2026-07-25 leak sweep): same scrollbar-track leak as the portal
   sidebars (css/gp-portal-sidebar.css .gp-portal-nav) — no scrollbar-color set,
   so the browser's default light track/thumb painted over the dark admin
   sidebar. Additive only; light is unaffected (same UA default either way). */
[data-theme="dark"] .gp-sidebar-nav {
    scrollbar-color: var(--gp-color-border-strong) transparent;
}
[data-theme="dark"] .gp-sidebar-nav::-webkit-scrollbar {
    width: 8px;
}
[data-theme="dark"] .gp-sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}
[data-theme="dark"] .gp-sidebar-nav::-webkit-scrollbar-thumb {
    background-color: var(--gp-color-border-strong);
    border-radius: 8px;
}

.gp-nav-section {
    margin-bottom: 24px;
}

.gp-nav-section:last-child {
    margin-bottom: 0;
}

.gp-nav-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gp-gray-500);
    padding: 0 12px;
    margin-bottom: 8px;
}

.gp-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--gp-gray-700); /* DS-2 #16 (flagged, not swapped): --gp-gray-700 has no exact Tier-2 match (nearest is --gp-color-text at gray-900, which would shift light mode) — left hardcoded per the byte-identical-light rule */
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--gp-motion-duration-fast) var(--gp-motion-ease-out); /* F1: 150ms->200ms — hover/focus small-state-change bucket, not instant (reserved for tap-scale press, F2) */
}

.gp-nav-item:hover {
    background: var(--gp-color-bg);
    color: var(--gp-color-text);
}

.gp-nav-item.active {
    background: var(--gp-gray-900);
    color: var(--gp-white);
}

.gp-nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    stroke-width: 1.75;
}

/* DS-2 #8 (flagged, not swapped): bg gray-200 / text gray-600 have no exact Tier-2 match (nearest
   bg candidate --gp-color-border reads odd as a fill; nearest text gray-600 has no Tier-2 at all).
   Forcing either onto the "nearest" semantic would shift light-mode pixels — left hardcoded per
   the byte-identical-light rule. See PR body for the recommended follow-up (a dedicated
   "chip fill" Tier-2 semantic, a UB-coordinated call since it also touches #9 below). */
.gp-nav-item .gp-nav-badge {
    margin-left: auto;
    background: var(--gp-gray-200);
    color: var(--gp-gray-600);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.gp-nav-item.active .gp-nav-badge {
    background: var(--gp-white);
    color: var(--gp-gray-900);
}

/* Sidebar Footer */
.gp-sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--gp-gray-200);
}

.gp-user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background var(--gp-motion-duration-fast) var(--gp-motion-ease-out); /* F1: 150ms->200ms — hover/focus bucket */
}

/* Context-scoped (owner rule, 2026-07-14): .gp-user-menu is a SHARED wrapper rendered on
   both light (admin sidebar) and dark (profile header) surfaces. The light-context hover
   below was on the bare class and painted a near-white box on the dark header — shared
   components stay context-neutral; surface styling binds to the surface. */
.gp-sidebar .gp-user-menu:hover {
    background: var(--gp-gray-100);
}

.gp-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gp-color-border); /* neutral fill at the gray-200 weight — the only Tier-2 there (surface-2 = gray-50 would shift light mode) */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gp-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gp-user-avatar svg {
    width: 20px;
    height: 20px;
    color: var(--gp-gray-500);
}

.gp-user-info {
    flex: 1;
    min-width: 0;
}

.gp-user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gp-color-text); /* DS-2 #16: was --gp-gray-900, exact byte match in light */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gp-user-role {
    font-size: 12px;
    color: var(--gp-gray-500);
}

/* ========================================
   MOBILE BOTTOM NAVIGATION
   ======================================== */
/* DS-2 #12 (flagged, not touched): this light --gp-white/--gp-gray-200 variant duplicates
   .gp-bottom-nav / .gp-mobile-header class names that ALSO render (dark-glass, real shipped
   look) via css/gp-mobile-core.css, loaded separately by inc/gp-mobile-nav-loader.php on the
   same markup (inc/gp-mobile-nav-system.php). Per Thread C's own caution, retokenizing this
   variant without first confirming neither file's cascade order/consumer set changes is a
   consumer-conflict risk — left as consolidation debt for a dedicated pass, not this slice. */
.gp-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--gp-bottom-nav-height);
    background: var(--gp-white);
    border-top: 1px solid var(--gp-gray-200);
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
}

.gp-bottom-nav-inner {
    display: flex;
    height: 100%;
}

.gp-bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--gp-gray-500);
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
    transition: color var(--gp-motion-duration-fast) var(--gp-motion-ease-out); /* F1: 150ms->200ms — "tab crossfade" is the named use case for this duration tier */
}

.gp-bottom-nav-item svg {
    width: 24px;
    height: 24px;
    stroke-width: 1.75;
}

.gp-bottom-nav-item.active {
    color: var(--gp-gray-900);
}

/* Mobile Header */
.gp-mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--gp-header-height);
    background: var(--gp-white);
    border-bottom: 1px solid var(--gp-gray-200);
    z-index: 99;
    padding: 0 16px;
    align-items: center;
    justify-content: space-between;
}

.gp-mobile-logo {
    font-size: 18px;
    font-weight: 700;
    color: var(--gp-color-text); /* DS-2 #16: was --gp-gray-900, exact byte match in light */
    text-decoration: none;
}

.gp-mobile-menu-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gp-gray-700);
}

.gp-mobile-menu-btn svg {
    width: 24px;
    height: 24px;
}

/* ========================================
   CARDS
   ======================================== */
/* WS-2.5 Phase 3b — canonical card: tokenized to Tier-2 (byte-identical in light,
   dark-capable) with BEM `__` element selectors PLUS legacy hyphen aliases. */
.gp-card {
    background: var(--gp-card-bg);
    border-radius: var(--gp-card-radius);
    box-shadow: var(--gp-card-shadow);
}

.gp-card__header,
.gp-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gp-color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.gp-card__title,
.gp-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gp-color-text);
    margin: 0;
}

.gp-card__body,
.gp-card-body {
    padding: 24px;
}

.gp-card__footer,
.gp-card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gp-color-border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

/* ========================================
   PAGE HEADER
   ======================================== */
.gp-page-header {
    margin-bottom: 32px;
}

.gp-page-title { /* heading ramp: h1 */
    font-size: var(--gp-h1-size);
    line-height: var(--gp-h1-line);
    font-weight: var(--gp-h1-weight);
    letter-spacing: var(--gp-h1-tracking);
    color: var(--gp-color-text); /* DS-2 #16: was --gp-gray-900, exact byte match in light */
    margin: 0 0 8px 0;
}

.gp-page-subtitle {
    font-size: 15px;
    color: var(--gp-gray-500);
    margin: 0;
}

.gp-page-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

/* ========================================
   BUTTONS
   ======================================== */
.gp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--gp-motion-duration-fast) var(--gp-motion-ease-out); /* F1: 150ms->200ms — deliberately fast, not instant, for this hover/color/border "all" transition; instant (100ms) is reserved for a true tap-scale press state, which F2 adds separately as a transform, not this rule */
    text-decoration: none;
    border: none;
    white-space: nowrap;
}

.gp-btn svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

/* WS-2.5 Phase 3a — canonical buttons: tokenized to Tier-2 semantics (byte-identical
   in light; dark-capable for free) with BEM `--` selectors PLUS legacy hyphen aliases,
   so both naming systems resolve to one definition. A few subtle states still reference
   Tier-1 primitives where no Tier-2 token exists yet (gray-700 text, gray-400 border,
   gray-800 primary-hover) — logged as Phase-4.9 dark-completion gaps. */
.gp-btn--primary,
.gp-btn-primary {
    background: var(--gp-color-primary);
    color: var(--gp-color-on-primary);
}

.gp-btn--primary:hover,
.gp-btn-primary:hover {
    background: var(--gp-gray-800); /* primitive: no Tier-2 primary-hover token yet (Phase 4.9) */
    color: var(--gp-color-on-primary);
}

.gp-btn--secondary,
.gp-btn-secondary {
    background: var(--gp-color-surface);
    color: var(--gp-gray-700); /* primitive: no Tier-2 token at gray-700 (Phase 4.9) */
    border: 1px solid var(--gp-color-border-strong);
}

.gp-btn--secondary:hover,
.gp-btn-secondary:hover {
    background: var(--gp-color-surface-2);
    border-color: var(--gp-gray-400); /* primitive: no Tier-2 token at gray-400 (Phase 4.9) */
}

/* Dark mode (UB, 2026-07-25 leak sweep): --gp-gray-700 is a fixed Tier-1 primitive
   (same dark-gray value in every theme, by design), so on the dark Graphite surface this button
   rendered dark-gray text on a dark panel — e.g. Settings' "Turn on notifications"
   (gp-push-optin-btn) and the profile "Edit Profile" button, both plain
   .gp-btn.gp-btn-secondary. Only the rest-state ink is patched (the flagged
   defect); the Phase-4.9 hover border above stays a known gap, not touched here.
   Light is untouched (this selector doesn't exist outside [data-theme="dark"]). */
[data-theme="dark"] .gp-btn--secondary,
[data-theme="dark"] .gp-btn-secondary {
    color: var(--gp-color-text);
}

.gp-btn--ghost,
.gp-btn-ghost {
    background: transparent;
    color: var(--gp-gray-700); /* primitive (Phase 4.9) */
}

.gp-btn--ghost:hover,
.gp-btn-ghost:hover {
    background: var(--gp-color-bg);
}

/* Dark mode (UB, 2026-07-25 Podium wave 4): same fix as .gp-btn--secondary above —
   --gp-gray-700 is a fixed Tier-1 primitive, so every ghost button (Sign Out,
   Clear, Find Gymnasts, Scout Directory, View Recruiting Board, Import/Export,
   etc. — both the <a class="gp-btn-ghost"> and <button class="gp-btn-ghost">
   variants, since this selector has no tag qualifier) rendered near-invisible
   dark-gray text on the dark Graphite surface (~1.7-1.9:1). Repoint the
   rest-state ink onto --gp-color-text, matching the secondary-button
   treatment. Coordinated minimal change to this frozen file — orchestrator
   sign-off, this rule only (see PR). Light is untouched (this selector
   doesn't exist outside [data-theme="dark"]). */
[data-theme="dark"] .gp-btn--ghost,
[data-theme="dark"] .gp-btn-ghost {
    color: var(--gp-color-text);
}

/* Gold accent button - use sparingly */
.gp-btn--accent,
.gp-btn-accent {
    background: var(--gp-color-accent);
    color: var(--gp-color-on-accent);
}

.gp-btn--accent:hover,
.gp-btn-accent:hover {
    background: var(--gp-color-accent-hover);
}

/* Key CTA = gold (semantic intent; same value as --accent, distinct role) */
.gp-btn--cta {
    background: var(--gp-cta);
    color: var(--gp-cta-on);
}

.gp-btn--cta:hover {
    background: var(--gp-color-accent-hover);
}

/* Premium / checkout CTA = purple gradient (systematized from the membership fork) */
.gp-btn--premium {
    background: var(--gp-cta-premium);
    color: var(--gp-cta-premium-on);
}

.gp-btn--premium:hover {
    filter: brightness(1.08);
}

/* Destructive action */
.gp-btn--danger,
.gp-btn-danger {
    background: var(--gp-color-danger);
    color: var(--gp-color-text-inverse);
}

.gp-btn--danger:hover {
    filter: brightness(0.94);
}

.gp-btn--sm,
.gp-btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.gp-btn--lg,
.gp-btn-lg {
    padding: 14px 24px;
    font-size: 16px;
}

.gp-btn--icon,
.gp-btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 8px;
}

.gp-btn--icon.gp-btn--sm,
.gp-btn-icon.gp-btn-sm {
    width: 32px;
    height: 32px;
}

/* ========================================
   FORM ELEMENTS
   ======================================== */
.gp-form-group {
    margin-bottom: 20px;
}

.gp-form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--gp-gray-700);
    margin-bottom: 6px;
}

.gp-form-label .required {
    color: var(--gp-error);
}

.gp-form-input,
.gp-form-select,
.gp-form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gp-color-border-strong); /* DS-2 #13: was --gp-gray-300, exact byte match in light */
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    color: var(--gp-color-text); /* DS-2 #13: was --gp-gray-900, exact byte match in light */
    background: var(--gp-color-surface); /* DS-2 #13: was --gp-white, exact byte match in light */
    transition: border-color var(--gp-motion-duration-fast) var(--gp-motion-ease-out), box-shadow var(--gp-motion-duration-fast) var(--gp-motion-ease-out); /* F1: 150ms->200ms — hover/focus bucket, named use case is literally "hover/focus" */
}

.gp-form-input:focus,
.gp-form-select:focus,
.gp-form-textarea:focus {
    outline: none;
    border-color: var(--gp-color-primary); /* DS-2 #14: was --gp-gray-900, exact byte match in light; dark-capable (goes gold) */
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1); /* DS-2 #14: no exact Tier-2 match at this opacity (Tier-2 shadow = 0.08) — flagged, left as-is */
}

.gp-form-input::placeholder {
    color: var(--gp-gray-400);
}

.gp-form-textarea {
    min-height: 100px;
    resize: vertical;
}

.gp-form-hint {
    font-size: 13px;
    color: var(--gp-gray-500);
    margin-top: 6px;
}

.gp-form-error {
    font-size: 13px;
    color: var(--gp-error);
    margin-top: 6px;
}

/* ========================================
   GRID LAYOUTS
   ======================================== */
.gp-grid {
    display: grid;
    gap: 24px;
}

.gp-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.gp-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.gp-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.gp-grid-auto {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* ========================================
   EMPTY STATES
   ======================================== */
.gp-empty {
    text-align: center;
    padding: 60px 24px;
}

.gp-empty svg {
    width: 64px;
    height: 64px;
    color: var(--gp-gray-300);
    margin-bottom: 16px;
}

.gp-empty-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gp-color-text); /* DS-2 #16: was --gp-gray-900, exact byte match in light */
    margin: 0 0 8px 0;
}

.gp-empty-text {
    font-size: 15px;
    color: var(--gp-gray-500);
    margin: 0 0 24px 0;
}

/* ========================================
   BADGES
   ======================================== */
/* DS-2 #9 (flagged, not swapped): bg gray-100 DOES exact-match --gp-color-bg, but that token is
   gray-900 in dark — the same value body.gp-app's own page background now uses (DS-2 #10) — so a
   badge chip would render invisible against a full-bleed dark page. Text gray-700 has no Tier-2
   match either. Left hardcoded; see PR body for the recommended follow-up (paired with #8 above). */
.gp-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    background: var(--gp-gray-100);
    color: var(--gp-gray-700);
}

.gp-badge-success {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.gp-badge-error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.gp-badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

/* ========================================
   LOADING STATES
   ======================================== */
.gp-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--gp-color-border); /* DS-2 #15: was --gp-gray-200, exact byte match in light */
    border-top-color: var(--gp-color-primary); /* DS-2 #15: was --gp-gray-900, exact byte match in light; dark-capable (goes gold) */
    border-radius: 50%;
    animation: gp-spin 0.6s linear infinite;
}

@keyframes gp-spin {
    to { transform: rotate(360deg); }
}

.gp-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
}

/* ========================================
   TOASTS
   ======================================== */
.gp-toast-container {
    position: fixed;
    bottom: calc(var(--gp-bottom-nav-height) + 16px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gp-toast {
    background: var(--gp-gray-900);
    color: var(--gp-white);
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: gp-toast-in 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gp-toast svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.gp-toast-success {
    background: var(--gp-success);
}

.gp-toast-error {
    background: var(--gp-error);
}

@keyframes gp-toast-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   LOGIN PROMPT
   ======================================== */
.gp-login-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 40px 24px;
}

.gp-login-prompt svg {
    width: 80px;
    height: 80px;
    color: var(--gp-gray-300);
    margin-bottom: 24px;
}

.gp-login-prompt h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--gp-color-text); /* DS-2 #16: was --gp-gray-900, exact byte match in light */
    margin: 0 0 12px 0;
}

.gp-login-prompt p {
    font-size: 16px;
    color: var(--gp-gray-500);
    margin: 0 0 32px 0;
    max-width: 400px;
}

/* ========================================
   ACCESS DENIED
   ======================================== */
.gp-access-denied {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 40px 24px;
}

.gp-access-denied svg {
    width: 80px;
    height: 80px;
    color: var(--gp-gray-300);
    margin-bottom: 24px;
}

.gp-access-denied h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--gp-color-text); /* DS-2 #16: was --gp-gray-900, exact byte match in light */
    margin: 0 0 12px 0;
}

.gp-access-denied p {
    font-size: 16px;
    color: var(--gp-gray-500);
    margin: 0 0 32px 0;
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */
@media (max-width: 768px) {
    .gp-sidebar {
        transform: translateX(-100%);
    }
    
    .gp-sidebar.open {
        transform: translateX(0);
    }
    
    .gp-main {
        margin-left: 0;
        padding-bottom: var(--gp-bottom-nav-height);
    }
    
    .gp-mobile-header {
        display: flex;
    }
    
    .gp-bottom-nav {
        display: block;
    }
    
    .gp-content {
        padding: calc(var(--gp-header-height) + 24px) 16px 24px;
    }
    
    .gp-page-title {
        font-size: 24px;
    }
    
    .gp-grid-2,
    .gp-grid-3,
    .gp-grid-4 {
        grid-template-columns: 1fr;
    }
    
    .gp-card__header,
    .gp-card-header,
    .gp-card__body,
    .gp-card-body,
    .gp-card__footer,
    .gp-card-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .gp-toast-container {
        left: 16px;
        right: 16px;
        transform: none;
    }
}

/* Sidebar overlay for mobile */
.gp-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.gp-sidebar-overlay.active {
    display: block;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.gp-text-center { text-align: center; }
.gp-text-right { text-align: right; }
.gp-text-muted { color: var(--gp-gray-500); }
.gp-text-sm { font-size: 13px; }
.gp-text-lg { font-size: 18px; }
.gp-font-bold { font-weight: 700; }
.gp-mt-0 { margin-top: 0; }
.gp-mb-0 { margin-bottom: 0; }
.gp-mb-4 { margin-bottom: 16px; }
.gp-mb-6 { margin-bottom: 24px; }
.gp-mb-8 { margin-bottom: 32px; }
.gp-flex { display: flex; }
.gp-flex-col { flex-direction: column; }
.gp-items-center { align-items: center; }
.gp-justify-between { justify-content: space-between; }
.gp-gap-2 { gap: 8px; }
.gp-gap-4 { gap: 16px; }
.gp-gap-6 { gap: 24px; }
.gp-hidden { display: none !important; }
