/* shared/css/common.css — Shared variables, skeleton animations, utilities */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* ── Color Palette ──────────────────────────── */
    --ma-primary: #4f46e5;
    --ma-primary-dark: #4338ca;
    --ma-primary-light: #818cf8;
    --ma-primary-rgb: 79, 70, 229;
    --ma-accent: #06b6d4;
    --ma-accent-rgb: 6, 182, 212;

    --ma-sidebar-bg: #0f172a;
    --ma-sidebar-text: #94a3b8;
    --ma-sidebar-active: #1e293b;

    --ma-success: #10b981;
    --ma-success-light: #d1fae5;
    --ma-warning: #f59e0b;
    --ma-warning-light: #fef3c7;
    --ma-danger: #ef4444;
    --ma-danger-light: #fee2e2;
    --ma-info: #06b6d4;
    --ma-info-light: #cffafe;

    --ma-body-bg: #f8fafc;
    --ma-heading-color: #0f172a;
    --ma-text-color: #334155;
    --ma-text-muted: #64748b;
    --ma-border-color: #e2e8f0;

    /* ── Typography ─────────────────────────────── */
    --ma-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* ── Radius ─────────────────────────────────── */
    --ma-radius-sm: 6px;
    --ma-radius: 10px;
    --ma-radius-lg: 14px;
    --ma-radius-xl: 18px;

    /* ── Shadows ────────────────────────────────── */
    --ma-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    --ma-card-hover-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --ma-shadow-lg: 0 20px 40px -12px rgba(0, 0, 0, 0.12);
    --ma-focus-ring: 0 0 0 3px rgba(var(--ma-primary-rgb), 0.25);

    /* ── Transition ─────────────────────────────── */
    --ma-transition: 0.2s ease;
    --ma-transition-slow: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Skeleton loading animation (shimmer) ─── */

@keyframes skeleton-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 37%, #e2e8f0 63%);
    background-size: 200% 100%;
    border-radius: var(--ma-radius-sm);
    animation: skeleton-shimmer 1.8s ease-in-out infinite;
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 37%, #e2e8f0 63%);
    background-size: 200% 100%;
    border-radius: var(--ma-radius-sm);
    animation: skeleton-shimmer 1.8s ease-in-out infinite;
}

.skeleton-text.w-75 { width: 75%; }
.skeleton-text.w-50 { width: 50%; }
.skeleton-text.w-25 { width: 25%; }

.skeleton-card {
    height: 120px;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 37%, #e2e8f0 63%);
    background-size: 200% 100%;
    border-radius: var(--ma-radius);
    animation: skeleton-shimmer 1.8s ease-in-out infinite;
}

/* ── Fade-in ────────────────────────────────── */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.35s ease forwards;
}

/* ── Status badges ──────────────────────────── */

.badge-active {
    background-color: var(--ma-success-light);
    color: #065f46;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.3em 0.75em;
    border-radius: 50px;
}

.badge-inactive {
    background-color: var(--surface-3, #f1f5f9);
    color: var(--muted, #64748b);
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.3em 0.75em;
    border-radius: 50px;
}
