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

:root {
    --madlink-sky: #0284c7;
    --madlink-sky-light: #0ea5e9;
    --madlink-sky-bg: #f0f9ff;
    --font-family: 'Tajawal', system-ui, -apple-system, sans-serif;
}

body, html, .fi-body {
    font-family: var(--font-family) !important;
    letter-spacing: normal !important;
}

/* ==========================================================================
   CLEAN & ORDERLY LOGIN PAGE DESIGN
   ========================================================================== */
html:not(.dark) .fi-simple-page {
    background-color: #f8fafc !important;
    background-image: 
        radial-gradient(ellipse at 50% 0%, rgba(14, 165, 233, 0.08) 0%, transparent 60%),
        linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%) !important;
    min-height: 100vh !important;
}

html.dark .fi-simple-page {
    background-color: #090d16 !important;
    min-height: 100vh !important;
}

/* Neat & Ordered Card */
html:not(.dark) .fi-simple-main {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-top: 4px solid #0284c7 !important;
    border-radius: 1rem !important;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.06), 0 8px 10px -6px rgba(15, 23, 42, 0.04) !important;
    padding: 2.25rem 2rem !important;
    max-width: 28rem !important;
    margin: 0 auto !important;
}

html.dark .fi-simple-main {
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-top: 4px solid #0284c7 !important;
    border-radius: 1rem !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.35) !important;
    padding: 2.25rem 2rem !important;
    max-width: 28rem !important;
    margin: 0 auto !important;
}

/* Clean Header text */
html:not(.dark) .fi-simple-header-heading {
    color: #0f172a !important;
    font-weight: 800 !important;
    font-size: 1.5rem !important;
    text-align: center !important;
}

html.dark .fi-simple-header-heading {
    color: #f8fafc !important;
    font-weight: 800 !important;
    font-size: 1.5rem !important;
    text-align: center !important;
}

.fi-simple-header-subheading {
    color: #64748b !important;
    font-weight: 500 !important;
    font-size: 0.9rem !important;
    text-align: center !important;
    margin-top: 0.25rem !important;
}

/* Orderly Inputs */
html:not(.dark) .fi-input-wrp {
    border: 1px solid #cbd5e1 !important;
    border-radius: 0.625rem !important;
    background-color: #ffffff !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

html.dark .fi-input-wrp {
    border: 1px solid #334155 !important;
    border-radius: 0.625rem !important;
    background-color: #1e293b !important;
    color: #f8fafc !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

.fi-input-wrp:focus-within {
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
}

/* Clean Primary Button */
.fi-btn-primary,
.fi-simple-main button[type="submit"] {
    background-color: #0284c7 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border-radius: 0.625rem !important;
    box-shadow: 0 2px 4px rgba(2, 132, 199, 0.2) !important;
    transition: background-color 0.15s ease-in-out !important;
    border: none !important;
    padding: 0.625rem 1.25rem !important;
}

.fi-btn-primary:hover,
.fi-simple-main button[type="submit"]:hover {
    background-color: #0369a1 !important;
}

/* ==========================================================================
   CLEAN & ORDERLY DASHBOARD & RESOURCES (LIGHT MODE ONLY)
   ========================================================================== */

/* Clean Sidebar */
html:not(.dark) .fi-sidebar {
    background-color: #ffffff !important;
    border-inline-end: 1px solid #e2e8f0 !important;
}

.fi-sidebar-item-btn {
    border-radius: 0.5rem !important;
    padding: 0.5rem 0.75rem !important;
}

html:not(.dark) .fi-sidebar-item-active .fi-sidebar-item-btn {
    background-color: #f0f9ff !important;
    color: #0284c7 !important;
    font-weight: 700 !important;
}

html:not(.dark) .fi-sidebar-group-label {
    color: #0284c7 !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
}

/* Topbar */
html:not(.dark) .fi-topbar {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

/* Clean Tables & Containers */
html:not(.dark) .fi-section,
html:not(.dark) .fi-ta-ctn {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05) !important;
}

html:not(.dark) .fi-ta-header-ctn {
    background-color: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

html:not(.dark) .fi-ta-row:hover {
    background-color: #f8fafc !important;
}

/* Badges */
.fi-badge {
    border-radius: 0.375rem !important;
    font-weight: 600 !important;
}
