/* ============================================================
   EDUCREST ERP
   GREATENANT SCHOOL CONNECT
   CORE DESIGN SYSTEM
   ------------------------------------------------------------
   Version: 1.0
   Design Language:
   Navy Blue + Royal Blue + White + Gold Yellow
   ============================================================ */


/* ============================================================
   01. DESIGN TOKENS
   ============================================================ */

:root {

    /* --------------------------------------------------------
       BRAND COLOURS
       -------------------------------------------------------- */

    --ec-navy-950: #03132f;
    --ec-navy-900: #061a3d;
    --ec-navy-850: #08224d;
    --ec-navy-800: #092b5c;
    --ec-navy-700: #0b3b78;
    --ec-navy-600: #0d4d96;

    --ec-blue-950: #06245a;
    --ec-blue-900: #073a82;
    --ec-blue-800: #0758b7;
    --ec-blue-700: #0875d1;
    --ec-blue-600: #168bea;
    --ec-blue-500: #299cf0;
    --ec-blue-400: #55b4f5;
    --ec-blue-300: #83cbfa;
    --ec-blue-200: #b8e0fc;
    --ec-blue-100: #e2f2ff;
    --ec-blue-50: #f1f8ff;

    /* --------------------------------------------------------
       GOLD / YELLOW
       -------------------------------------------------------- */

    --ec-yellow-900: #8a5700;
    --ec-yellow-800: #ad7000;
    --ec-yellow-700: #d38b00;
    --ec-yellow-600: #eba900;
    --ec-yellow-500: #ffc229;
    --ec-yellow-400: #ffcb3d;
    --ec-yellow-300: #ffd75f;
    --ec-yellow-200: #ffe58c;
    --ec-yellow-100: #fff2bf;
    --ec-yellow-50: #fffaf0;

    /* Main brand yellow */
    --ec-gold: #ffc52f;
    --ec-gold-dark: #e4a800;
    --ec-gold-light: #ffe28a;

    /* --------------------------------------------------------
       NEUTRALS
       -------------------------------------------------------- */

    --ec-white: #ffffff;

    --ec-gray-50: #f8fafc;
    --ec-gray-100: #f1f5f9;
    --ec-gray-150: #edf2f7;
    --ec-gray-200: #e2e8f0;
    --ec-gray-300: #cbd5e1;
    --ec-gray-400: #94a3b8;
    --ec-gray-500: #64748b;
    --ec-gray-600: #475569;
    --ec-gray-700: #334155;
    --ec-gray-800: #1e293b;
    --ec-gray-900: #0f172a;
    --ec-black: #020617;

    /* --------------------------------------------------------
       SEMANTIC COLOURS
       -------------------------------------------------------- */

    --ec-success-700: #087443;
    --ec-success-600: #0b9b5b;
    --ec-success-500: #12b76a;
    --ec-success-100: #dcfce7;
    --ec-success-50: #f0fdf4;

    --ec-warning-700: #a15c00;
    --ec-warning-600: #d97706;
    --ec-warning-500: #f59e0b;
    --ec-warning-100: #fef3c7;
    --ec-warning-50: #fffbeb;

    --ec-danger-700: #b42318;
    --ec-danger-600: #dc2626;
    --ec-danger-500: #ef4444;
    --ec-danger-100: #fee2e2;
    --ec-danger-50: #fef2f2;

    --ec-info-700: #075985;
    --ec-info-600: #0284c7;
    --ec-info-500: #0ea5e9;
    --ec-info-100: #e0f2fe;
    --ec-info-50: #f0f9ff;

    --ec-purple-600: #7c3aed;
    --ec-purple-500: #8b5cf6;
    --ec-purple-100: #ede9fe;

    --ec-pink-600: #db2777;
    --ec-pink-500: #ec4899;
    --ec-pink-100: #fce7f3;

    --ec-orange-600: #ea580c;
    --ec-orange-500: #f97316;
    --ec-orange-100: #ffedd5;

    /* --------------------------------------------------------
       BACKGROUNDS
       -------------------------------------------------------- */

    --ec-bg: #f4f8fc;
    --ec-bg-soft: #f8fbff;
    --ec-bg-blue: #edf6ff;
    --ec-bg-dark: var(--ec-navy-950);

    --ec-surface: #ffffff;
    --ec-surface-soft: #f8fafc;
    --ec-surface-blue: #f2f8ff;

    /* --------------------------------------------------------
       TEXT
       -------------------------------------------------------- */

    --ec-text: #10213d;
    --ec-text-dark: #071936;
    --ec-text-muted: #64748b;
    --ec-text-light: #94a3b8;
    --ec-text-white: #ffffff;

    /* --------------------------------------------------------
       BORDERS
       -------------------------------------------------------- */

    --ec-border: #dfe7f1;
    --ec-border-light: #e9eff6;
    --ec-border-dark: #c5d2e2;
    --ec-border-blue: #b8dafa;
    --ec-border-yellow: #f4ca55;

    /* --------------------------------------------------------
       TYPOGRAPHY
       -------------------------------------------------------- */

    --ec-font-sans:
        Inter,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    --ec-font-display:
        Inter,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    --ec-font-mono:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    --ec-font-size-xs: 0.70rem;
    --ec-font-size-sm: 0.8125rem;
    --ec-font-size-base: 0.9375rem;
    --ec-font-size-md: 1rem;
    --ec-font-size-lg: 1.125rem;
    --ec-font-size-xl: 1.25rem;
    --ec-font-size-2xl: 1.5rem;
    --ec-font-size-3xl: 1.875rem;
    --ec-font-size-4xl: 2.25rem;
    --ec-font-size-5xl: 3rem;

    --ec-line-tight: 1.15;
    --ec-line-normal: 1.5;
    --ec-line-relaxed: 1.7;

    /* --------------------------------------------------------
       FONT WEIGHTS
       -------------------------------------------------------- */

    --ec-weight-regular: 400;
    --ec-weight-medium: 500;
    --ec-weight-semibold: 600;
    --ec-weight-bold: 700;
    --ec-weight-extrabold: 800;

    /* --------------------------------------------------------
       SPACING
       -------------------------------------------------------- */

    --ec-space-1: 0.25rem;
    --ec-space-2: 0.5rem;
    --ec-space-3: 0.75rem;
    --ec-space-4: 1rem;
    --ec-space-5: 1.25rem;
    --ec-space-6: 1.5rem;
    --ec-space-7: 1.75rem;
    --ec-space-8: 2rem;
    --ec-space-10: 2.5rem;
    --ec-space-12: 3rem;
    --ec-space-14: 3.5rem;
    --ec-space-16: 4rem;
    --ec-space-20: 5rem;
    --ec-space-24: 6rem;

    /* --------------------------------------------------------
       RADIUS
       -------------------------------------------------------- */

    --ec-radius-xs: 4px;
    --ec-radius-sm: 7px;
    --ec-radius-md: 10px;
    --ec-radius-lg: 14px;
    --ec-radius-xl: 18px;
    --ec-radius-2xl: 24px;
    --ec-radius-3xl: 32px;
    --ec-radius-full: 9999px;

    /* --------------------------------------------------------
       SHADOWS
       -------------------------------------------------------- */

    --ec-shadow-xs:
        0 1px 2px rgba(7, 25, 54, 0.05);

    --ec-shadow-sm:
        0 2px 8px rgba(7, 25, 54, 0.07);

    --ec-shadow-md:
        0 6px 18px rgba(7, 25, 54, 0.09);

    --ec-shadow-lg:
        0 12px 30px rgba(7, 25, 54, 0.12);

    --ec-shadow-xl:
        0 20px 50px rgba(7, 25, 54, 0.16);

    --ec-shadow-blue:
        0 10px 30px rgba(8, 117, 209, 0.18);

    --ec-shadow-gold:
        0 10px 30px rgba(255, 197, 47, 0.25);

    /* --------------------------------------------------------
       TRANSITIONS
       -------------------------------------------------------- */

    --ec-transition-fast:
        140ms ease;

    --ec-transition:
        220ms ease;

    --ec-transition-slow:
        350ms ease;

    --ec-transition-spring:
        420ms cubic-bezier(.2, .8, .2, 1);

    /* --------------------------------------------------------
       Z-INDEX SYSTEM
       -------------------------------------------------------- */

    --ec-z-base: 1;
    --ec-z-dropdown: 1000;
    --ec-z-sticky: 1100;
    --ec-z-header: 1200;
    --ec-z-overlay: 2000;
    --ec-z-modal: 3000;
    --ec-z-toast: 4000;
    --ec-z-tooltip: 5000;

    /* --------------------------------------------------------
       LAYOUT
       -------------------------------------------------------- */

    --ec-container-xs: 540px;
    --ec-container-sm: 720px;
    --ec-container-md: 960px;
    --ec-container-lg: 1140px;
    --ec-container-xl: 1280px;
    --ec-container-2xl: 1440px;

    --ec-sidebar-width: 270px;
    --ec-sidebar-collapsed: 78px;
    --ec-topbar-height: 72px;

    /* --------------------------------------------------------
       GRADIENTS
       -------------------------------------------------------- */

    --ec-gradient-brand:
        linear-gradient(
            135deg,
            var(--ec-navy-950) 0%,
            var(--ec-blue-900) 55%,
            var(--ec-blue-700) 100%
        );

    --ec-gradient-blue:
        linear-gradient(
            135deg,
            var(--ec-blue-900),
            var(--ec-blue-600)
        );

    --ec-gradient-gold:
        linear-gradient(
            135deg,
            var(--ec-yellow-500),
            var(--ec-yellow-700)
        );

    --ec-gradient-hero:
        radial-gradient(
            circle at 80% 20%,
            rgba(41, 156, 240, 0.30),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #03132f 0%,
            #06245a 45%,
            #0758b7 100%
        );

    --ec-gradient-soft:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #f0f7ff 100%
        );
}


/* ============================================================
   02. RESET
   ============================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;

    background: var(--ec-bg);

    color: var(--ec-text);

    font-family: var(--ec-font-sans);
    font-size: var(--ec-font-size-base);
    font-weight: var(--ec-weight-regular);
    line-height: var(--ec-line-normal);

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    text-rendering: optimizeLegibility;
}

body.ec-dark {
    background: var(--ec-navy-950);
    color: var(--ec-white);
}

img,
picture,
svg,
video,
canvas {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

button,
input,
textarea,
select {
    margin: 0;
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
    cursor: not-allowed;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}

hr {
    margin: var(--ec-space-6) 0;
    border: 0;
    border-top: 1px solid var(--ec-border);
}


/* ============================================================
   03. SELECTION / SCROLLBAR
   ============================================================ */

::selection {
    background: var(--ec-blue-700);
    color: var(--ec-white);
}

::-moz-selection {
    background: var(--ec-blue-700);
    color: var(--ec-white);
}

::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

::-webkit-scrollbar-track {
    background: var(--ec-gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--ec-gray-300);
    border-radius: var(--ec-radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--ec-blue-600);
}


/* ============================================================
   04. TYPOGRAPHY
   ============================================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--ec-text-dark);
    font-family: var(--ec-font-display);
    font-weight: var(--ec-weight-bold);
    line-height: var(--ec-line-tight);
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2rem, 4vw, 3.4rem);
}

h2 {
    font-size: clamp(1.7rem, 3vw, 2.5rem);
}

h3 {
    font-size: clamp(1.35rem, 2vw, 1.8rem);
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.05rem;
}

h6 {
    font-size: 0.95rem;
}

p {
    margin-bottom: var(--ec-space-4);
}

small {
    font-size: var(--ec-font-size-sm);
}

strong,
b {
    font-weight: var(--ec-weight-bold);
}

.ec-text-primary {
    color: var(--ec-blue-700);
}

.ec-text-navy {
    color: var(--ec-navy-900);
}

.ec-text-gold {
    color: var(--ec-gold-dark);
}

.ec-text-muted {
    color: var(--ec-text-muted);
}

.ec-text-success {
    color: var(--ec-success-600);
}

.ec-text-warning {
    color: var(--ec-warning-600);
}

.ec-text-danger {
    color: var(--ec-danger-600);
}

.ec-text-white {
    color: var(--ec-white);
}


/* ============================================================
   05. GLOBAL LAYOUT
   ============================================================ */

.ec-container {
    width: min(
        calc(100% - 2rem),
        var(--ec-container-xl)
    );

    margin-inline: auto;
}

.ec-container-wide {
    width: min(
        calc(100% - 2rem),
        var(--ec-container-2xl)
    );

    margin-inline: auto;
}

.ec-container-narrow {
    width: min(
        calc(100% - 2rem),
        var(--ec-container-md)
    );

    margin-inline: auto;
}

.ec-section {
    padding: var(--ec-space-20) 0;
}

.ec-section-sm {
    padding: var(--ec-space-12) 0;
}

.ec-section-lg {
    padding: var(--ec-space-24) 0;
}


/* ============================================================
   06. FLEX UTILITIES
   ============================================================ */

.ec-flex {
    display: flex;
}

.ec-inline-flex {
    display: inline-flex;
}

.ec-flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ec-flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ec-flex-start {
    display: flex;
    align-items: flex-start;
}

.ec-flex-column {
    display: flex;
    flex-direction: column;
}

.ec-align-center {
    align-items: center;
}

.ec-align-start {
    align-items: flex-start;
}

.ec-align-end {
    align-items: flex-end;
}

.ec-justify-center {
    justify-content: center;
}

.ec-justify-between {
    justify-content: space-between;
}

.ec-justify-end {
    justify-content: flex-end;
}

.ec-wrap {
    flex-wrap: wrap;
}


/* ============================================================
   07. GRID
   ============================================================ */

.ec-grid {
    display: grid;
}

.ec-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ec-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ec-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ec-grid-auto {
    grid-template-columns:
        repeat(auto-fit, minmax(220px, 1fr));
}

.ec-gap-1 {
    gap: var(--ec-space-1);
}

.ec-gap-2 {
    gap: var(--ec-space-2);
}

.ec-gap-3 {
    gap: var(--ec-space-3);
}

.ec-gap-4 {
    gap: var(--ec-space-4);
}

.ec-gap-5 {
    gap: var(--ec-space-5);
}

.ec-gap-6 {
    gap: var(--ec-space-6);
}

.ec-gap-8 {
    gap: var(--ec-space-8);
}

.ec-gap-10 {
    gap: var(--ec-space-10);
}


/* ============================================================
   08. BUTTON SYSTEM
   ============================================================ */

.ec-btn {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;

    min-height: 44px;
    padding: 0.7rem 1.15rem;

    border: 1px solid transparent;
    border-radius: var(--ec-radius-md);

    font-size: var(--ec-font-size-sm);
    font-weight: var(--ec-weight-semibold);

    line-height: 1;
    white-space: nowrap;

    transition:
        transform var(--ec-transition),
        box-shadow var(--ec-transition),
        background var(--ec-transition),
        border-color var(--ec-transition),
        color var(--ec-transition);

    user-select: none;
}

.ec-btn:hover {
    transform: translateY(-1px);
}

.ec-btn:active {
    transform: translateY(0);
}

.ec-btn:focus-visible {
    outline: 3px solid rgba(8, 117, 209, 0.22);
    outline-offset: 2px;
}

.ec-btn:disabled {
    opacity: 0.55;
    transform: none;
}

/* Primary */

.ec-btn-primary {
    color: var(--ec-white);
    background: var(--ec-blue-700);
    box-shadow: var(--ec-shadow-blue);
}

.ec-btn-primary:hover {
    background: var(--ec-blue-800);
}

/* Gold CTA */

.ec-btn-gold {
    color: var(--ec-navy-950);
    background: var(--ec-gold);
    box-shadow: var(--ec-shadow-gold);
}

.ec-btn-gold:hover {
    background: var(--ec-yellow-600);
}

/* Navy */

.ec-btn-navy {
    color: var(--ec-white);
    background: var(--ec-navy-900);
}

.ec-btn-navy:hover {
    background: var(--ec-navy-800);
}

/* Outline */

.ec-btn-outline {
    color: var(--ec-blue-700);
    background: transparent;
    border-color: var(--ec-blue-600);
}

.ec-btn-outline:hover {
    color: var(--ec-white);
    background: var(--ec-blue-700);
}

/* White */

.ec-btn-white {
    color: var(--ec-navy-900);
    background: var(--ec-white);
    border-color: var(--ec-border);
}

.ec-btn-white:hover {
    border-color: var(--ec-blue-300);
    box-shadow: var(--ec-shadow-sm);
}

/* Ghost */

.ec-btn-ghost {
    color: var(--ec-text-muted);
    background: transparent;
}

.ec-btn-ghost:hover {
    color: var(--ec-blue-700);
    background: var(--ec-blue-50);
}

/* Danger */

.ec-btn-danger {
    color: var(--ec-white);
    background: var(--ec-danger-600);
}

.ec-btn-danger:hover {
    background: var(--ec-danger-700);
}

/* Success */

.ec-btn-success {
    color: var(--ec-white);
    background: var(--ec-success-600);
}

.ec-btn-success:hover {
    background: var(--ec-success-700);
}


/* Button sizes */

.ec-btn-xs {
    min-height: 32px;
    padding: 0.45rem 0.7rem;
    font-size: var(--ec-font-size-xs);
}

.ec-btn-sm {
    min-height: 38px;
    padding: 0.55rem 0.85rem;
}

.ec-btn-lg {
    min-height: 50px;
    padding: 0.85rem 1.4rem;
    font-size: var(--ec-font-size-md);
}

.ec-btn-xl {
    min-height: 56px;
    padding: 1rem 1.6rem;
    font-size: var(--ec-font-size-lg);
}

.ec-btn-block {
    width: 100%;
}


/* ============================================================
   09. CARD SYSTEM
   ============================================================ */

.ec-card {
    background: var(--ec-surface);
    border: 1px solid var(--ec-border);
    border-radius: var(--ec-radius-xl);
    box-shadow: var(--ec-shadow-sm);
}

.ec-card-hover {
    transition:
        transform var(--ec-transition),
        box-shadow var(--ec-transition),
        border-color var(--ec-transition);
}

.ec-card-hover:hover {
    transform: translateY(-3px);
    border-color: var(--ec-border-blue);
    box-shadow: var(--ec-shadow-lg);
}

.ec-card-header {
    padding: var(--ec-space-5) var(--ec-space-6);
    border-bottom: 1px solid var(--ec-border);
}

.ec-card-body {
    padding: var(--ec-space-6);
}

.ec-card-footer {
    padding: var(--ec-space-5) var(--ec-space-6);
    border-top: 1px solid var(--ec-border);
}

.ec-card-flat {
    box-shadow: none;
}

.ec-card-blue {
    background: var(--ec-blue-50);
    border-color: var(--ec-blue-200);
}

.ec-card-gold {
    background: var(--ec-yellow-50);
    border-color: var(--ec-yellow-200);
}

.ec-card-dark {
    color: var(--ec-white);
    background: var(--ec-navy-900);
    border-color: rgba(255,255,255,0.08);
}


/* ============================================================
   10. FORM ELEMENTS
   ============================================================ */

.ec-label {
    display: block;
    margin-bottom: 0.45rem;

    color: var(--ec-text-dark);

    font-size: var(--ec-font-size-sm);
    font-weight: var(--ec-weight-semibold);
}

.ec-input,
.ec-select,
.ec-textarea {
    width: 100%;

    min-height: 46px;
    padding: 0.7rem 0.9rem;

    color: var(--ec-text);

    background: var(--ec-white);

    border: 1px solid var(--ec-border-dark);
    border-radius: var(--ec-radius-md);

    outline: none;

    font-size: var(--ec-font-size-base);

    transition:
        border-color var(--ec-transition),
        box-shadow var(--ec-transition),
        background var(--ec-transition);
}

.ec-textarea {
    min-height: 120px;
    resize: vertical;
}

.ec-input::placeholder,
.ec-textarea::placeholder {
    color: var(--ec-text-light);
}

.ec-input:hover,
.ec-select:hover,
.ec-textarea:hover {
    border-color: var(--ec-blue-300);
}

.ec-input:focus,
.ec-select:focus,
.ec-textarea:focus {
    border-color: var(--ec-blue-600);

    box-shadow:
        0 0 0 3px rgba(8, 117, 209, 0.12);
}

.ec-input-error {
    border-color: var(--ec-danger-500);
}

.ec-input-success {
    border-color: var(--ec-success-500);
}

.ec-form-group {
    margin-bottom: var(--ec-space-5);
}

.ec-form-hint {
    display: block;
    margin-top: 0.4rem;

    color: var(--ec-text-muted);
    font-size: var(--ec-font-size-xs);
}

.ec-form-error {
    display: block;
    margin-top: 0.4rem;

    color: var(--ec-danger-600);
    font-size: var(--ec-font-size-xs);
    font-weight: var(--ec-weight-medium);
}


/* ============================================================
   11. BADGES
   ============================================================ */

.ec-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;

    min-height: 26px;
    padding: 0.3rem 0.65rem;

    border-radius: var(--ec-radius-full);

    font-size: var(--ec-font-size-xs);
    font-weight: var(--ec-weight-semibold);

    line-height: 1;
}

.ec-badge-primary {
    color: var(--ec-blue-700);
    background: var(--ec-blue-100);
}

.ec-badge-gold {
    color: var(--ec-yellow-900);
    background: var(--ec-yellow-100);
}

.ec-badge-success {
    color: var(--ec-success-700);
    background: var(--ec-success-100);
}

.ec-badge-warning {
    color: var(--ec-warning-700);
    background: var(--ec-warning-100);
}

.ec-badge-danger {
    color: var(--ec-danger-700);
    background: var(--ec-danger-100);
}

.ec-badge-info {
    color: var(--ec-info-700);
    background: var(--ec-info-100);
}

.ec-badge-purple {
    color: var(--ec-purple-600);
    background: var(--ec-purple-100);
}

.ec-badge-neutral {
    color: var(--ec-gray-700);
    background: var(--ec-gray-100);
}


/* ============================================================
   12. AVATARS
   ============================================================ */

.ec-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    flex: 0 0 auto;

    overflow: hidden;

    color: var(--ec-white);
    background: var(--ec-blue-700);

    border-radius: 50%;

    font-weight: var(--ec-weight-bold);
}

.ec-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ec-avatar-sm {
    width: 32px;
    height: 32px;
    font-size: var(--ec-font-size-xs);
}

.ec-avatar-lg {
    width: 54px;
    height: 54px;
    font-size: var(--ec-font-size-lg);
}

.ec-avatar-xl {
    width: 72px;
    height: 72px;
    font-size: var(--ec-font-size-xl);
}


/* ============================================================
   13. ICON CONTAINERS
   ============================================================ */

.ec-icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 44px;
    height: 44px;

    color: var(--ec-blue-700);
    background: var(--ec-blue-50);

    border-radius: var(--ec-radius-md);

    flex: 0 0 auto;
}

.ec-icon-box-gold {
    color: var(--ec-yellow-900);
    background: var(--ec-yellow-100);
}

.ec-icon-box-success {
    color: var(--ec-success-700);
    background: var(--ec-success-100);
}

.ec-icon-box-danger {
    color: var(--ec-danger-700);
    background: var(--ec-danger-100);
}

.ec-icon-box-purple {
    color: var(--ec-purple-600);
    background: var(--ec-purple-100);
}


/* ============================================================
   14. STATISTICS
   ============================================================ */

.ec-stat {
    position: relative;

    padding: var(--ec-space-5);

    background: var(--ec-white);

    border: 1px solid var(--ec-border);
    border-radius: var(--ec-radius-xl);

    box-shadow: var(--ec-shadow-sm);

    overflow: hidden;
}

.ec-stat::after {
    content: "";

    position: absolute;

    right: -30px;
    bottom: -30px;

    width: 100px;
    height: 100px;

    background: rgba(8, 117, 209, 0.05);

    border-radius: 50%;
}

.ec-stat-label {
    margin-bottom: 0.35rem;

    color: var(--ec-text-muted);

    font-size: var(--ec-font-size-sm);
    font-weight: var(--ec-weight-medium);
}

.ec-stat-value {
    color: var(--ec-navy-900);

    font-size: clamp(
        1.6rem,
        3vw,
        2.25rem
    );

    font-weight: var(--ec-weight-extrabold);
    line-height: 1.1;
}

.ec-stat-change {
    margin-top: 0.5rem;

    font-size: var(--ec-font-size-xs);
    font-weight: var(--ec-weight-semibold);
}

.ec-stat-change.up {
    color: var(--ec-success-600);
}

.ec-stat-change.down {
    color: var(--ec-danger-600);
}


/* ============================================================
   15. TABLE SYSTEM
   ============================================================ */

.ec-table-wrap {
    width: 100%;
    overflow-x: auto;

    border: 1px solid var(--ec-border);
    border-radius: var(--ec-radius-lg);

    background: var(--ec-white);
}

.ec-table {
    min-width: 680px;
}

.ec-table th,
.ec-table td {
    padding: 0.85rem 1rem;

    text-align: left;

    border-bottom: 1px solid var(--ec-border-light);

    vertical-align: middle;
}

.ec-table th {
    color: var(--ec-text-dark);

    background: var(--ec-gray-50);

    font-size: var(--ec-font-size-xs);
    font-weight: var(--ec-weight-bold);

    text-transform: uppercase;
    letter-spacing: 0.035em;
}

.ec-table td {
    color: var(--ec-text);
    font-size: var(--ec-font-size-sm);
}

.ec-table tbody tr {
    transition: background var(--ec-transition-fast);
}

.ec-table tbody tr:hover {
    background: var(--ec-blue-50);
}

.ec-table tbody tr:last-child td {
    border-bottom: 0;
}


/* ============================================================
   16. DIVIDERS
   ============================================================ */

.ec-divider {
    width: 100%;
    height: 1px;
    background: var(--ec-border);
}

.ec-divider-dark {
    background: rgba(255,255,255,0.12);
}

.ec-divider-blue {
    background: var(--ec-blue-200);
}


/* ============================================================
   17. BACKGROUND UTILITIES
   ============================================================ */

.ec-bg-white {
    background: var(--ec-white);
}

.ec-bg-soft {
    background: var(--ec-bg-soft);
}

.ec-bg-blue {
    background: var(--ec-blue-50);
}

.ec-bg-navy {
    background: var(--ec-navy-900);
}

.ec-bg-dark {
    background: var(--ec-navy-950);
}

.ec-bg-gold {
    background: var(--ec-gold);
}

.ec-bg-gradient {
    background: var(--ec-gradient-brand);
}

.ec-bg-gradient-blue {
    background: var(--ec-gradient-blue);
}

.ec-bg-gradient-gold {
    background: var(--ec-gradient-gold);
}

.ec-bg-hero {
    background: var(--ec-gradient-hero);
}


/* ============================================================
   18. BORDER UTILITIES
   ============================================================ */

.ec-border {
    border: 1px solid var(--ec-border);
}

.ec-border-blue {
    border: 1px solid var(--ec-border-blue);
}

.ec-border-gold {
    border: 1px solid var(--ec-border-yellow);
}

.ec-border-none {
    border: 0 !important;
}


/* ============================================================
   19. RADIUS UTILITIES
   ============================================================ */

.ec-radius-sm {
    border-radius: var(--ec-radius-sm);
}

.ec-radius-md {
    border-radius: var(--ec-radius-md);
}

.ec-radius-lg {
    border-radius: var(--ec-radius-lg);
}

.ec-radius-xl {
    border-radius: var(--ec-radius-xl);
}

.ec-radius-2xl {
    border-radius: var(--ec-radius-2xl);
}

.ec-radius-full {
    border-radius: var(--ec-radius-full);
}


/* ============================================================
   20. SHADOW UTILITIES
   ============================================================ */

.ec-shadow-none {
    box-shadow: none;
}

.ec-shadow-sm {
    box-shadow: var(--ec-shadow-sm);
}

.ec-shadow-md {
    box-shadow: var(--ec-shadow-md);
}

.ec-shadow-lg {
    box-shadow: var(--ec-shadow-lg);
}

.ec-shadow-xl {
    box-shadow: var(--ec-shadow-xl);
}

.ec-shadow-blue {
    box-shadow: var(--ec-shadow-blue);
}

.ec-shadow-gold {
    box-shadow: var(--ec-shadow-gold);
}


/* ============================================================
   21. SPACING UTILITIES
   ============================================================ */

.ec-m-0 {
    margin: 0 !important;
}

.ec-mt-1 {
    margin-top: var(--ec-space-1);
}

.ec-mt-2 {
    margin-top: var(--ec-space-2);
}

.ec-mt-3 {
    margin-top: var(--ec-space-3);
}

.ec-mt-4 {
    margin-top: var(--ec-space-4);
}

.ec-mt-5 {
    margin-top: var(--ec-space-5);
}

.ec-mt-6 {
    margin-top: var(--ec-space-6);
}

.ec-mt-8 {
    margin-top: var(--ec-space-8);
}

.ec-mb-1 {
    margin-bottom: var(--ec-space-1);
}

.ec-mb-2 {
    margin-bottom: var(--ec-space-2);
}

.ec-mb-3 {
    margin-bottom: var(--ec-space-3);
}

.ec-mb-4 {
    margin-bottom: var(--ec-space-4);
}

.ec-mb-5 {
    margin-bottom: var(--ec-space-5);
}

.ec-mb-6 {
    margin-bottom: var(--ec-space-6);
}

.ec-mb-8 {
    margin-bottom: var(--ec-space-8);
}

.ec-p-0 {
    padding: 0 !important;
}

.ec-p-2 {
    padding: var(--ec-space-2);
}

.ec-p-3 {
    padding: var(--ec-space-3);
}

.ec-p-4 {
    padding: var(--ec-space-4);
}

.ec-p-5 {
    padding: var(--ec-space-5);
}

.ec-p-6 {
    padding: var(--ec-space-6);
}

.ec-p-8 {
    padding: var(--ec-space-8);
}


/* ============================================================
   22. TEXT UTILITIES
   ============================================================ */

.ec-text-left {
    text-align: left;
}

.ec-text-center {
    text-align: center;
}

.ec-text-right {
    text-align: right;
}

.ec-text-xs {
    font-size: var(--ec-font-size-xs);
}

.ec-text-sm {
    font-size: var(--ec-font-size-sm);
}

.ec-text-base {
    font-size: var(--ec-font-size-base);
}

.ec-text-lg {
    font-size: var(--ec-font-size-lg);
}

.ec-text-xl {
    font-size: var(--ec-font-size-xl);
}

.ec-font-medium {
    font-weight: var(--ec-weight-medium);
}

.ec-font-semibold {
    font-weight: var(--ec-weight-semibold);
}

.ec-font-bold {
    font-weight: var(--ec-weight-bold);
}

.ec-font-extrabold {
    font-weight: var(--ec-weight-extrabold);
}

.ec-uppercase {
    text-transform: uppercase;
}

.ec-capitalize {
    text-transform: capitalize;
}

.ec-nowrap {
    white-space: nowrap;
}

.ec-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ============================================================
   23. VISIBILITY
   ============================================================ */

.ec-hidden {
    display: none !important;
}

.ec-block {
    display: block !important;
}

.ec-inline-block {
    display: inline-block !important;
}

.ec-visible {
    visibility: visible;
}

.ec-invisible {
    visibility: hidden;
}


/* ============================================================
   24. POSITIONING
   ============================================================ */

.ec-relative {
    position: relative;
}

.ec-absolute {
    position: absolute;
}

.ec-fixed {
    position: fixed;
}

.ec-sticky {
    position: sticky;
}

.ec-top-0 {
    top: 0;
}

.ec-right-0 {
    right: 0;
}

.ec-bottom-0 {
    bottom: 0;
}

.ec-left-0 {
    left: 0;
}


/* ============================================================
   25. OVERFLOW
   ============================================================ */

.ec-overflow-hidden {
    overflow: hidden;
}

.ec-overflow-auto {
    overflow: auto;
}

.ec-overflow-x-auto {
    overflow-x: auto;
}

.ec-overflow-y-auto {
    overflow-y: auto;
}


/* ============================================================
   26. INTERACTION
   ============================================================ */

.ec-clickable {
    cursor: pointer;
}

.ec-no-select {
    user-select: none;
}

.ec-pointer-none {
    pointer-events: none;
}


/* ============================================================
   27. FOCUS ACCESSIBILITY
   ============================================================ */

:focus-visible {
    outline: 3px solid rgba(8, 117, 209, 0.25);
    outline-offset: 3px;
}


/* ============================================================
   28. LOADING / SKELETON
   ============================================================ */

.ec-skeleton {
    position: relative;

    overflow: hidden;

    background:
        linear-gradient(
            90deg,
            var(--ec-gray-100) 25%,
            var(--ec-gray-200) 50%,
            var(--ec-gray-100) 75%
        );

    background-size: 200% 100%;

    animation:
        ec-skeleton-loading 1.5s infinite;
}

@keyframes ec-skeleton-loading {

    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}


/* ============================================================
   29. SPINNER
   ============================================================ */

.ec-spinner {
    width: 24px;
    height: 24px;

    border: 3px solid rgba(8, 117, 209, 0.18);
    border-top-color: var(--ec-blue-700);

    border-radius: 50%;

    animation: ec-spin 0.8s linear infinite;
}

.ec-spinner-white {
    border-color: rgba(255,255,255,0.25);
    border-top-color: var(--ec-white);
}

.ec-spinner-gold {
    border-color: rgba(255,197,47,0.25);
    border-top-color: var(--ec-gold);
}

@keyframes ec-spin {
    to {
        transform: rotate(360deg);
    }
}


/* ============================================================
   30. BRAND MARK / LOGO HELPERS
   ============================================================ */

.ec-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;

    color: var(--ec-navy-900);

    font-size: 1.1rem;
    font-weight: var(--ec-weight-extrabold);

    letter-spacing: -0.02em;
}

.ec-brand span {
    color: var(--ec-blue-700);
}

.ec-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    color: var(--ec-white);

    background:
        linear-gradient(
            135deg,
            var(--ec-navy-900),
            var(--ec-blue-700)
        );

    border-radius: 12px;

    box-shadow: var(--ec-shadow-blue);
}


/* ============================================================
   31. HERO HELPERS
   ============================================================ */

.ec-hero {
    position: relative;

    overflow: hidden;

    color: var(--ec-white);

    background: var(--ec-gradient-hero);
}

.ec-hero::before {
    content: "";

    position: absolute;

    width: 420px;
    height: 420px;

    top: -180px;
    right: -120px;

    background:
        radial-gradient(
            circle,
            rgba(41, 156, 240, 0.28),
            transparent 68%
        );

    pointer-events: none;
}

.ec-hero::after {
    content: "";

    position: absolute;

    width: 360px;
    height: 360px;

    left: -180px;
    bottom: -180px;

    background:
        radial-gradient(
            circle,
            rgba(255, 197, 47, 0.13),
            transparent 70%
        );

    pointer-events: none;
}

.ec-hero-content {
    position: relative;
    z-index: 2;
}


/* ============================================================
   32. GOLD ACCENT
   ============================================================ */

.ec-accent-line {
    width: 54px;
    height: 4px;

    margin: 0.75rem 0;

    background: var(--ec-gold);

    border-radius: var(--ec-radius-full);
}

.ec-accent-line-center {
    margin-inline: auto;
}


/* ============================================================
   33. LINK SYSTEM
   ============================================================ */

.ec-link {
    color: var(--ec-blue-700);
    font-weight: var(--ec-weight-semibold);

    transition:
        color var(--ec-transition);
}

.ec-link:hover {
    color: var(--ec-blue-900);
}

.ec-link-gold {
    color: var(--ec-yellow-700);
}

.ec-link-gold:hover {
    color: var(--ec-yellow-900);
}


/* ============================================================
   34. PAGE HEADER
   ============================================================ */

.ec-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: var(--ec-space-5);

    margin-bottom: var(--ec-space-6);
}

.ec-page-title {
    margin: 0;

    color: var(--ec-navy-900);

    font-size: clamp(
        1.4rem,
        2.5vw,
        2rem
    );

    font-weight: var(--ec-weight-bold);
}

.ec-page-subtitle {
    margin: 0.35rem 0 0;

    color: var(--ec-text-muted);

    font-size: var(--ec-font-size-sm);
}


/* ============================================================
   35. EMPTY STATE
   ============================================================ */

.ec-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    min-height: 260px;

    padding: var(--ec-space-8);

    text-align: center;

    background: var(--ec-white);

    border: 1px dashed var(--ec-border-dark);
    border-radius: var(--ec-radius-xl);
}

.ec-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 64px;
    height: 64px;

    margin-bottom: var(--ec-space-4);

    color: var(--ec-blue-700);
    background: var(--ec-blue-50);

    border-radius: 50%;

    font-size: 1.5rem;
}

.ec-empty-title {
    margin-bottom: 0.4rem;

    color: var(--ec-text-dark);

    font-weight: var(--ec-weight-bold);
}

.ec-empty-text {
    max-width: 420px;

    margin-bottom: var(--ec-space-5);

    color: var(--ec-text-muted);

    font-size: var(--ec-font-size-sm);
}


/* ============================================================
   36. RESPONSIVE FOUNDATION
   ============================================================ */

@media (max-width: 1024px) {

    :root {
        --ec-space-20: 4rem;
        --ec-space-24: 5rem;
    }

    .ec-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 768px) {

    :root {
        --ec-space-16: 3rem;
        --ec-space-20: 3.5rem;
        --ec-space-24: 4rem;
    }

    .ec-container,
    .ec-container-wide,
    .ec-container-narrow {
        width: min(
            calc(100% - 1.5rem),
            var(--ec-container-xl)
        );
    }

    .ec-grid-2,
    .ec-grid-3,
    .ec-grid-4 {
        grid-template-columns: 1fr;
    }

    .ec-page-header {
        align-items: flex-start;
        flex-direction: column;
    }

}

@media (max-width: 480px) {

    :root {
        --ec-space-12: 2.5rem;
        --ec-space-16: 2.75rem;
    }

    .ec-container,
    .ec-container-wide,
    .ec-container-narrow {
        width: calc(100% - 1rem);
    }

    .ec-btn {
        width: 100%;
    }

    .ec-btn-inline {
        width: auto;
    }

}


/* ============================================================
   37. REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

}