/* ============================================================
   Gyanam Portal — Global Design System v2.0
   Premium Light Theme | Sora Font | Elegant Design Tokens
   ============================================================ */

/* Fonts: load via <link> (includes/head_fonts.php) — never @import (blocks render) */

/* ---------- CSS Reset ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    color: var(--text-primary);
    background: var(--bg-body);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ---------- Design Tokens ---------- */
:root {
    /* Primary — Royal Blue */
    --primary-50: #eff3ff;
    --primary-100: #dbe5fe;
    --primary-200: #bfcefe;
    --primary-300: #93aafd;
    --primary-400: #6080fa;
    --primary-500: #4361ee;
    --primary-600: #2b44e3;
    --primary-700: #2335d0;
    --primary-800: #222da9;
    --primary-900: #212b85;

    /* Accent — Warm Coral */
    --accent-400: #f97066;
    --accent-500: #f04438;
    --accent-600: #d92d20;

    /* Teal */
    --teal-400: #36d7b7;
    --teal-500: #17b897;
    --teal-600: #0d9e80;

    /* Status colors */
    --success-100: #d1fadf;
    --success-500: #12b76a;
    --success-600: #039855;
    --warning-100: #fef0c7;
    --warning-500: #f79009;
    --warning-600: #dc6803;
    --danger-100: #fee4e2;
    --danger-500: #f04438;
    --danger-600: #d92d20;
    --info-100: #d1e9ff;
    --info-500: #2e90fa;
    --info-600: #1570ef;

    /* Neutrals */
    --gray-50: #f9fafb;
    --gray-100: #f2f4f7;
    --gray-200: #e4e7ec;
    --gray-300: #d0d5dd;
    --gray-400: #98a2b3;
    --gray-500: #667085;
    --gray-600: #475467;
    --gray-700: #344054;
    --gray-800: #1d2939;
    --gray-900: #101828;

    /* Semantic */
    --bg-body: #f5f7fa;
    --bg-surface: #ffffff;
    --bg-sidebar: #ffffff;
    --text-primary: #101828;
    --text-secondary: #344054;
    --text-muted: #667085;
    --border-color: #e8ecf4;

    /* Shadows — subtle and layered */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.06), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.12);
    --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.12);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 6px 16px rgba(0, 0, 0, 0.04);

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

    /* Transitions */
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --transition-fast: 0.15s var(--ease-smooth);
    --transition-normal: 0.25s var(--ease-smooth);
    --transition-slow: 0.35s var(--ease-smooth);
    --transition-spring: 0.4s var(--ease-spring);
}

/* ---------- Typography ---------- */
h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.25;
}

h3 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h4 {
    font-size: 1.05rem;
    font-weight: 600;
}

p {
    color: var(--text-secondary);
    line-height: 1.7;
}

a {
    color: var(--primary-600);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-700);
}

/* ---------- Utility Classes ---------- */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-sm {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

.fw-500 {
    font-weight: 500;
}

.fw-600 {
    font-weight: 600;
}

.fw-700 {
    font-weight: 700;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* ---------- Selection ---------- */
::selection {
    background: var(--primary-200);
    color: var(--primary-900);
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-15px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

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

    100% {
        background-position: 200% 0;
    }
}

/* ---------- Pagination bar (shared) ---------- */
.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding: .9rem 1.1rem;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    box-sizing: border-box;
}
.pager-info {
    font-size: .8rem;
    color: #6b7280;
    font-weight: 600;
    line-height: 1.4;
}
.pager-info strong { color: #1f2937; font-weight: 800; }
.pager-controls {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
    margin-left: auto;
}
.pager .pager-btn,
a.pager-btn,
span.pager-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 .75rem;
    border-radius: 9px;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    color: #374151 !important;
    font-size: .78rem;
    font-weight: 700;
    text-decoration: none !important;
    font-family: inherit;
    line-height: 1;
    box-sizing: border-box;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s, box-shadow .15s;
}
a.pager-btn:hover {
    border-color: #a5b4fc !important;
    background: #eef2ff !important;
    color: #3730a3 !important;
}
.pager .pager-btn.active,
span.pager-btn.active {
    background: linear-gradient(135deg, #4361ee, #3730a3) !important;
    border-color: #3730a3 !important;
    color: #fff !important;
    box-shadow: 0 3px 10px rgba(67, 97, 238, .25);
    cursor: default;
}
.pager .pager-btn.disabled,
span.pager-btn.disabled {
    opacity: .42;
    cursor: not-allowed;
    pointer-events: none;
    background: #f8fafc !important;
    color: #9ca3af !important;
    border-color: #e5e7eb !important;
}
.pager-ellipsis {
    color: #9ca3af;
    font-weight: 700;
    padding: 0 .15rem;
    user-select: none;
}
@media (max-width: 640px) {
    .pager { justify-content: center; }
    .pager-info { width: 100%; text-align: center; }
    .pager-controls { margin-left: 0; justify-content: center; }
}