/* ==========================================================
   EDU SKILLS - Design Tokens & Core Components (Serenity Adapted)
   Extracted from edu-skills-platform-main Design System
========================================================== */

:root {
    /* Primary Colors - Global Modern Educational Palette */
    --color-primary: #4F46E5;
    --color-primary-light: #6366F1;
    --color-primary-lighter: #818CF8;
    --color-primary-dark: #4338CA;
    --color-primary-darker: #3730A3;

    /* Secondary Colors (Learning Growth & Success) */
    --color-secondary: #10B981;
    --color-secondary-light: #34D399;
    --color-secondary-lighter: #A7F3D0;
    --color-secondary-dark: #059669;
    --color-secondary-darker: #047857;

    /* Accent Colors (Awards, Badges & Points) */
    --color-accent: #F59E0B;
    --color-accent-light: #FBBF24;
    --color-accent-lighter: #FDE68A;
    --color-accent-dark: #D97706;
    --color-accent-darker: #B45309;

    /* Semantic Colors */
    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-danger: #EF4444;
    --color-danger-light: #F87171;
    --color-info: #0EA5E9;

    /* Background Colors (Eye-friendly Clean Slate Canvas) */
    --color-bg-primary: #F8FAFC;
    --color-bg-secondary: #F1F5F9;
    --color-bg-tertiary: #E2E8F0;
    --color-bg-card: #FFFFFF;
    --color-bg: #FFFFFF;

    /* Text Colors */
    --color-text-primary: #0F172A;
    --color-text-secondary: #475569;
    --color-text-tertiary: #64748B;
    --color-text-muted: #94A3B8;
    --color-text-inverse: #FFFFFF;

    /* Border Colors */
    --color-border: #E2E8F0;
    --color-border-light: #F1F5F9;
    --color-border-focus: #6366F1;

    /* Gradient Colors - Modern SaaS EdTech */
    --gradient-primary: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
    --gradient-secondary: linear-gradient(135deg, #10B981 0%, #059669 100%);
    --gradient-accent: linear-gradient(135deg, #F59E0B 0%, #EA580C 100%);
    --gradient-danger: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    --gradient-hero: linear-gradient(135deg, #EEF2FF 0%, #F0FDF4 50%, #FEF3C7 100%);
    --gradient-card: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);

    /* Typography Scale */
    --font-family-en: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-family-ar: 'Cairo', 'Tajawal', 'Segoe UI', Tahoma, sans-serif;

    --font-size-xs: 0.75rem;    /* 12px */
    --font-size-sm: 0.875rem;   /* 14px */
    --font-size-base: 1rem;     /* 16px */
    --font-size-lg: 1.125rem;  /* 18px */
    --font-size-xl: 1.25rem;   /* 20px */
    --font-size-2xl: 1.5rem;   /* 24px */
    --font-size-3xl: 1.875rem; /* 30px */
    --font-size-4xl: 2.25rem;  /* 36px */
    --font-size-5xl: 3rem;     /* 48px */
    --font-size-6xl: 3.75rem;  /* 60px */

    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;

    --line-height-tight: 1.2;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;

    /* Spacing System (8px base) */
    --space-0: 0;
    --space-1: 0.25rem;  /* 4px */
    --space-2: 0.5rem;   /* 8px */
    --space-3: 0.75rem;  /* 12px */
    --space-4: 1rem;     /* 16px */
    --space-5: 1.25rem;  /* 20px */
    --space-6: 1.5rem;   /* 24px */
    --space-8: 2rem;     /* 32px */
    --space-10: 2.5rem;  /* 40px */
    --space-12: 3rem;    /* 48px */
    --space-16: 4rem;    /* 64px */
    --space-20: 5rem;    /* 80px */
    --space-24: 6rem;    /* 96px */

    /* Border Radius */
    --radius-sm: 0.25rem;   /* 4px */
    --radius-md: 0.5rem;    /* 8px */
    --radius-lg: 0.75rem;   /* 12px */
    --radius-xl: 1rem;      /* 16px */
    --radius-2xl: 1.5rem;   /* 24px */
    --radius-3xl: 2rem;     /* 32px */
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.3);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-card-hover: 0 8px 30px rgba(0, 0, 0, 0.12);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
    --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Z-Index Scale */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;

    /* Admin Sidebar Layout Tokens */
    --admin-sidebar-width: 260px;
    --admin-sidebar-collapsed-width: 72px;
    --admin-sidebar-bg: #0F172A;
    --admin-sidebar-bg-soft: #1E1B4B;
    --admin-sidebar-border: rgba(255, 255, 255, 0.08);
    --admin-sidebar-text: #CBD5E1;
    --admin-sidebar-muted: #94A3B8;
    --admin-topbar-height: 68px;
    --admin-content-max: 1600px;
}

/* ==========================================================
   BUTTON COMPONENTS (EDU SKILLS Core)
========================================================== */
.btn,
.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: var(--font-weight-semibold);
    line-height: 1.25;
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn::before,
.admin-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    pointer-events: none;
}

.btn:active::before,
.admin-btn:active::before {
    width: 320px;
    height: 320px;
}

.btn-primary,
.admin-btn-primary {
    background: var(--gradient-primary) !important;
    color: var(--color-text-inverse) !important;
    box-shadow: var(--shadow-md), 0 4px 14px rgba(79, 70, 229, 0.3) !important;
    border: none !important;
}

.btn-primary:hover,
.admin-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 6px 20px rgba(79, 70, 229, 0.45) !important;
    color: var(--color-text-inverse) !important;
    filter: brightness(1.05);
}

.btn-secondary,
.admin-btn-secondary {
    background: var(--gradient-secondary) !important;
    color: var(--color-text-inverse) !important;
    box-shadow: var(--shadow-md), 0 4px 14px rgba(34, 197, 94, 0.3) !important;
    border: none !important;
}

.btn-secondary:hover,
.admin-btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 6px 20px rgba(34, 197, 94, 0.45) !important;
    color: var(--color-text-inverse) !important;
    filter: brightness(1.05);
}

.btn-accent,
.admin-btn-accent,
.btn-warning,
.admin-btn-warning {
    background: var(--gradient-accent) !important;
    color: var(--color-text-inverse) !important;
    box-shadow: var(--shadow-md), 0 4px 14px rgba(245, 158, 11, 0.3) !important;
    border: none !important;
}

.btn-accent:hover,
.admin-btn-accent:hover,
.btn-warning:hover,
.admin-btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 6px 20px rgba(245, 158, 11, 0.45) !important;
    color: var(--color-text-inverse) !important;
    filter: brightness(1.05);
}

.btn-success,
.admin-btn-success {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%) !important;
    color: var(--color-text-inverse) !important;
    box-shadow: var(--shadow-md), 0 4px 14px rgba(16, 185, 129, 0.3) !important;
    border: none !important;
}

.btn-success:hover,
.admin-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 6px 20px rgba(16, 185, 129, 0.45) !important;
    color: var(--color-text-inverse) !important;
    filter: brightness(1.05);
}

.btn-danger,
.admin-btn-danger {
    background: var(--gradient-danger) !important;
    color: var(--color-text-inverse) !important;
    box-shadow: var(--shadow-md), 0 4px 14px rgba(239, 68, 68, 0.3) !important;
    border: none !important;
}

.btn-danger:hover,
.admin-btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 6px 20px rgba(239, 68, 68, 0.45) !important;
    color: var(--color-text-inverse) !important;
    filter: brightness(1.05);
}

.btn-info,
.admin-btn-info {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%) !important;
    color: var(--color-text-inverse) !important;
    box-shadow: var(--shadow-md), 0 4px 14px rgba(59, 130, 246, 0.3) !important;
    border: none !important;
}

.btn-info:hover,
.admin-btn-info:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 6px 20px rgba(59, 130, 246, 0.45) !important;
    color: var(--color-text-inverse) !important;
    filter: brightness(1.05);
}

.btn-outline,
.admin-btn-outline {
    background: transparent !important;
    border: 2px solid var(--color-primary) !important;
    color: var(--color-primary) !important;
}

.btn-outline:hover,
.admin-btn-outline:hover {
    background: var(--color-primary) !important;
    color: var(--color-text-inverse) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}

.btn-ghost,
.admin-btn-ghost,
.btn-default {
    background: var(--color-bg-card) !important;
    color: var(--color-text-secondary) !important;
    border: 1px solid var(--color-border) !important;
    box-shadow: var(--shadow-sm);
}

.btn-ghost:hover,
.admin-btn-ghost:hover,
.btn-default:hover {
    background: var(--color-bg-secondary) !important;
    color: var(--color-primary) !important;
    border-color: var(--color-primary-lighter) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.12);
}

.btn-lg, .admin-btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--font-size-lg);
    border-radius: var(--radius-xl);
}

.btn-xl, .admin-btn-xl {
    padding: var(--space-5) var(--space-10);
    font-size: var(--font-size-xl);
    border-radius: var(--radius-2xl);
}

.btn-sm, .admin-btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--font-size-sm);
    border-radius: var(--radius-md);
}

.card {
    background: var(--color-bg-card);
    border-radius: var(--radius-2xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-card);
    transition: all var(--transition-base);
    border: 1px solid var(--color-border-light);
}

.card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

/* ==========================================================
   Compact Standard Checkboxes & Radio Buttons
   ========================================================== */
input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    min-height: 18px !important;
    max-height: 18px !important;
    flex: 0 0 18px !important;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
    cursor: pointer !important;
    border-radius: 4px !important;
    border: 1.5px solid #cbd5e1 !important;
    background-color: #ffffff !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 12px 12px !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    display: inline-block !important;
    vertical-align: middle !important;
    transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease !important;
}

input[type="checkbox"]:checked {
    background-color: var(--color-primary, #4F46E5) !important;
    border-color: var(--color-primary, #4F46E5) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e") !important;
}

input[type="checkbox"]:hover {
    border-color: var(--color-primary, #4F46E5) !important;
    transform: scale(1.12) !important;
}

input[type="radio"] {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    min-height: 18px !important;
    max-height: 18px !important;
    flex: 0 0 18px !important;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
    cursor: pointer !important;
    border-radius: 50% !important;
    border: 1.5px solid #cbd5e1 !important;
    background-color: #ffffff !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 8px 8px !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    display: inline-block !important;
    vertical-align: middle !important;
    transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease !important;
}

input[type="radio"]:checked {
    background-color: var(--color-primary, #4F46E5) !important;
    border-color: var(--color-primary, #4F46E5) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2.5' fill='%23fff'/%3e%3c/svg%3e") !important;
}

input[type="radio"]:hover {
    border-color: var(--color-primary, #4F46E5) !important;
    transform: scale(1.12) !important;
}

