/* ============================================
   JCI Companion - Design System Tokens
   Shared across all pages for consistency
   ============================================ */

:root {
    /* ── Colors ── */
    --color-bg:          #f1f5f9;
    --color-surface:     #ffffff;
    --color-text:        #0f172a;
    --color-text-secondary: #475569;
    --color-text-muted:  #94a3b8;
    --color-border:      #e2e8f0;
    --color-border-light:#f1f5f9;

    /* Primary - unified blue (matches login/header) */
    --color-primary:     #2563eb;
    --color-primary-hover:#1d4ed8;
    --color-primary-light:#eff6ff;

    /* Semantic */
    --color-danger:      #dc2626;
    --color-danger-hover:#b91c1c;
    --color-success:     #16a34a;
    --color-success-hover:#15803d;

    /* Header */
    --color-header-from: #0f172a;
    --color-header-to:   #1e3a5f;

    /* ── Typography ── */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', 'Cascadia Code', 'Fira Code', Consolas, monospace;

    /* ── Spacing ── */
    --header-h:    60px;
    --footer-h:    64px;

    /* ── Radius ── */
    --radius-sm:   8px;
    --radius-md:   12px;
    --radius-lg:   16px;
    --radius-xl:   20px;
    --radius-full: 9999px;

    /* ── Shadows ── */
    --shadow-card:     0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-elevated: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-heavy:    0 12px 40px rgba(0,0,0,0.12);

    /* ── Transitions ── */
    --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration:    0.2s;
}

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

/* ── Tactile Press Feedback (global) ── */
button:active,
.card:active,
a.card:active {
    transform: scale(0.97);
}

/* ── Skeleton Loader ── */
@keyframes shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

.skeleton {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 800px 100%;
    animation: shimmer 1.8s ease-in-out infinite;
    border-radius: var(--radius-md);
}

/* ── Entrance Animation ── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeUp 0.35s var(--ease-out) both;
}

/* ── Stagger children (apply to parent) ── */
.stagger-in > * {
    opacity: 0;
    animation: fadeUp 0.35s var(--ease-out) both;
}
.stagger-in > *:nth-child(1)  { animation-delay: 0.03s; }
.stagger-in > *:nth-child(2)  { animation-delay: 0.06s; }
.stagger-in > *:nth-child(3)  { animation-delay: 0.09s; }
.stagger-in > *:nth-child(4)  { animation-delay: 0.12s; }
.stagger-in > *:nth-child(5)  { animation-delay: 0.15s; }
.stagger-in > *:nth-child(6)  { animation-delay: 0.18s; }
.stagger-in > *:nth-child(7)  { animation-delay: 0.21s; }
.stagger-in > *:nth-child(8)  { animation-delay: 0.24s; }
.stagger-in > *:nth-child(9)  { animation-delay: 0.27s; }
.stagger-in > *:nth-child(10) { animation-delay: 0.30s; }
.stagger-in > *:nth-child(11) { animation-delay: 0.33s; }
.stagger-in > *:nth-child(12) { animation-delay: 0.36s; }

/* ── Unified List Styles ── */
.jci-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.jci-list li {
    padding: 12px;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: box-shadow var(--duration) ease, transform var(--duration) ease;
    border: 1px solid var(--color-border-light);
}

.jci-list li:active {
    transform: scale(0.98);
}

.jci-list li:last-child {
    margin-bottom: 0;
}

/* ── Unified Button ── */
.jci-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--duration) ease, transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.jci-btn:active {
    transform: scale(0.97);
}

.jci-btn-primary {
    background: var(--color-primary);
    color: #fff;
}
.jci-btn-primary:hover {
    background: var(--color-primary-hover);
}

.jci-btn-danger {
    background: var(--color-danger);
    color: #fff;
}
.jci-btn-danger:hover {
    background: var(--color-danger-hover);
}

.jci-btn-success {
    background: var(--color-success);
    color: #fff;
}
.jci-btn-success:hover {
    background: var(--color-success-hover);
}
