/* ===== JISR Filament Professional Theme ===== */

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

.fi-app,
.fi-simple-layout,
body {
    font-family: 'Cairo', system-ui, -apple-system, sans-serif !important;
}

/* ===== Login Page — Split Layout ===== */
.fi-simple-layout {
    background: #f0fdf4;
    min-height: 100vh;
}

.fi-simple-main-ctn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 100vh !important;
    padding: 0 !important;
    position: relative;
    z-index: 1;
}

[dir="ltr"] .fi-simple-main-ctn {
    margin-left: 45%;
}

[dir="rtl"] .fi-simple-main-ctn {
    margin-right: 45%;
}

.fi-simple-main {
    width: 100% !important;
    max-width: 480px !important;
    margin: 0 auto !important;
    padding: 2rem !important;
    animation: jisr-card-enter 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes jisr-card-enter {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Login card */
.fi-simple-page {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 30px 80px -20px rgba(7, 116, 61, 0.15), 0 8px 24px -8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e2e8f0;
    position: relative;
}

/* Top accent bar */
.fi-simple-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #07743d 0%, #0d9d52 50%, #07743d 100%);
    z-index: 10;
}

.fi-simple-page-content {
    padding: 3rem 2.5rem 2.5rem;
}

/* Login header */
.fi-simple-page .fi-header {
    text-align: center;
    margin-bottom: 2rem;
}

.fi-simple-page .fi-header-logo img {
    height: 3.5rem !important;
    width: auto !important;
    margin: 0 auto 0.75rem !important;
    display: block;
}

.fi-simple-page .fi-header-heading {
    font-size: 1.6rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    letter-spacing: -0.02em;
}

.fi-simple-page .fi-header-subheading {
    color: #64748b !important;
    font-size: 0.9rem !important;
    margin-top: 0.25rem;
}

/* Login form inputs — Modern Style */
.fi-simple-page .fi-fo-field {
    margin-bottom: 1.25rem;
}

.fi-simple-page .fi-fo-field-label-col {
    margin-bottom: 0.5rem;
}

.fi-simple-page .fi-fo-field-label {
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    color: #475569 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
}

.fi-simple-page .fi-fo-field-label-required-mark {
    color: #07743d !important;
}

.fi-simple-page .fi-input-wrp {
    border-radius: 14px;
}

.fi-simple-page .fi-input {
    border-radius: 14px !important;
    border: 2px solid #e2e8f0 !important;
    padding: 0.875rem 1.125rem !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    background: #f8fafc !important;
    color: #0f172a !important;
}

.fi-simple-page .fi-input::placeholder {
    color: #94a3b8 !important;
    font-weight: 400 !important;
}

.fi-simple-page .fi-input:hover {
    border-color: #cbd5e1 !important;
    background: #fff !important;
}

.fi-simple-page .fi-input:focus {
    border-color: var(--filament-color-primary-500, #07743d) !important;
    box-shadow: 0 0 0 4px rgba(7, 116, 61, 0.12) !important;
    background: #fff !important;
    outline: none !important;
}

/* Checkbox — Modern */
.fi-simple-page .fi-checkbox-input {
    width: 1.125rem !important;
    height: 1.125rem !important;
    border-radius: 6px !important;
    accent-color: #07743d !important;
    cursor: pointer !important;
}

.fi-simple-page .fi-fo-field-label-content {
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: #64748b !important;
    cursor: pointer !important;
}

/* Login button */
.fi-simple-page .fi-btn {
    border-radius: 14px !important;
    font-weight: 700 !important;
    padding: 0.875rem 1.5rem !important;
    font-size: 1rem !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
    letter-spacing: 0.02em;
}

.fi-simple-page .fi-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px -8px rgba(7, 116, 61, 0.35);
}

.fi-simple-page .fi-btn:active {
    transform: translateY(0);
}

/* ===== JISR Branded Login Side Panel ===== */
.jisr-login-brand {
    position: fixed;
    top: 0;
    left: 0;
    width: 45%;
    height: 100vh;
    background: linear-gradient(160deg, #07743d 0%, #054d28 60%, #033b1e 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem;
    z-index: 0;
    overflow: hidden;
}

[dir="rtl"] .jisr-login-brand {
    left: auto;
    right: 0;
}

/* Decorative pattern overlay */
.jisr-login-brand::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.04) 0%, transparent 40%);
    pointer-events: none;
}

/* Dot grid pattern */
.jisr-login-brand::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

/* Floating decorative shapes */
.jisr-shape {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.jisr-shape-1 {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(13, 157, 82, 0.25) 0%, transparent 70%);
    top: -80px;
    right: -60px;
    animation: jisr-float 8s ease-in-out infinite;
}

.jisr-shape-2 {
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    bottom: -60px;
    left: -40px;
    animation: jisr-float 10s ease-in-out infinite reverse;
}

.jisr-shape-3 {
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(179, 102, 40, 0.15) 0%, transparent 70%);
    top: 40%;
    right: 10%;
    animation: jisr-float 12s ease-in-out infinite;
}

@keyframes jisr-float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, -30px); }
}

/* Brand content wrapper — above overlays */
.jisr-login-brand > *:not(.jisr-shape):not(.jisr-login-brand-footer) {
    position: relative;
    z-index: 2;
}

.jisr-login-brand-logo {
    margin-bottom: 2rem;
}

.jisr-login-brand-logo img {
    height: 4rem;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.95;
    animation: jisr-fade-in 0.8s ease 0.2s both;
}

.jisr-login-brand-title {
    color: #ffffff;
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.25;
    letter-spacing: -0.02em;
    animation: jisr-fade-in 0.8s ease 0.35s both;
}

.jisr-login-brand-tagline {
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 400px;
    animation: jisr-fade-in 0.8s ease 0.5s both;
}

.jisr-login-brand-features {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    animation: jisr-fade-in 0.8s ease 0.65s both;
}

.jisr-login-brand-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.9rem;
    font-weight: 500;
}

.jisr-login-brand-feature-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.6);
    flex-shrink: 0;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
}

/* Brand footer */
.jisr-login-brand-footer {
    position: absolute;
    bottom: 2rem;
    left: 4rem;
    right: 4rem;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.jisr-login-brand-footer-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.7rem;
    font-weight: 600;
}

@keyframes jisr-fade-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile: compact brand header instead of side panel */
@media (max-width: 768px) {
    .jisr-login-brand {
        position: relative;
        width: 100%;
        height: auto;
        padding: 2rem 1.5rem 1.5rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .jisr-login-brand::after {
        background-size: 24px 24px;
    }
    .jisr-shape {
        display: none;
    }
    .jisr-login-brand-logo {
        margin-bottom: 0.75rem;
    }
    .jisr-login-brand-logo img {
        height: 2.5rem;
    }
    .jisr-login-brand-title {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }
    .jisr-login-brand-tagline {
        font-size: 0.8rem;
        max-width: 100%;
    }
    .jisr-login-brand-features {
        display: none;
    }
    .jisr-login-brand-footer {
        display: none;
    }
    [dir="ltr"] .fi-simple-main-ctn,
    [dir="rtl"] .fi-simple-main-ctn {
        margin: 0;
    }
    .fi-simple-main {
        max-width: 420px !important;
        padding: 1.5rem !important;
    }
    .fi-simple-page-content {
        padding: 2rem 1.5rem 1.5rem;
    }
}

/* ===== Sidebar — Deep Green Dark Theme ===== */
.fi-sidebar {
    background: linear-gradient(180deg, #0c1f17 0%, #0e261c 40%, #102a20 100%) !important;
    border-inline-end: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
}

/* Sidebar header / brand area */
.fi-sidebar-header-ctn {
    background: rgba(7, 116, 61, 0.08);
    border-bottom: 1px solid rgba(7, 116, 61, 0.15);
}

.fi-sidebar-header {
    padding: 1.125rem 1.25rem !important;
}

.fi-sidebar-header-logo-ctn a {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
}

.fi-sidebar-header-logo-ctn img {
    height: 2.25rem !important;
    width: auto !important;
    filter: brightness(0) invert(1);
    opacity: 0.95;
    transition: opacity 0.2s ease;
}

.fi-sidebar-header-logo-ctn a:hover img {
    opacity: 1;
}

/* Sidebar nav */
.fi-sidebar-nav {
    padding: 0.875rem 0.75rem !important;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.fi-sidebar-nav-groups {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

/* Group label */
.fi-sidebar-group-label {
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    color: rgba(255, 255, 255, 0.75) !important;
    padding: 0.875rem 0.75rem 0.375rem !important;
}

.fi-sidebar-group-btn .fi-sidebar-group-label {
    color: rgba(255, 255, 255, 0.75) !important;
}

.fi-sidebar-group-btn:hover .fi-sidebar-group-label {
    color: #ffffff !important;
}

.fi-sidebar-group-btn {
    padding: 0.5rem 0.75rem !important;
    border-radius: 10px !important;
    transition: background 0.15s ease;
    cursor: pointer;
}

.fi-sidebar-group-btn:hover {
    background: rgba(255, 255, 255, 0.04);
}

/* Nav items */
.fi-sidebar-item {
    margin-bottom: 1px !important;
}

.fi-sidebar-item-btn {
    padding: 0.625rem 0.75rem !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center;
    gap: 0.75rem !important;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
    color: #ffffff !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    position: relative;
    text-decoration: none !important;
}

.fi-sidebar-item-label {
    color: #ffffff !important;
    font-weight: 600 !important;
}

.fi-sidebar-item-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

.fi-sidebar-item-btn:hover .fi-sidebar-item-label {
    color: #ffffff !important;
}

/* Active nav item */
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
    background: rgba(7, 116, 61, 0.2) !important;
    color: #fff !important;
    font-weight: 700 !important;
}

.fi-sidebar-item.fi-active > .fi-sidebar-item-btn .fi-sidebar-item-label {
    color: #ffffff !important;
    font-weight: 700 !important;
}

.fi-sidebar-item.fi-active > .fi-sidebar-item-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    inset-inline-start: 0;
    width: 3px;
    height: 60%;
    border-radius: 0 3px 3px 0;
    background: var(--filament-color-primary-500, #07743d);
    box-shadow: 0 0 12px rgba(7, 116, 61, 0.4);
}

.fi-sidebar-item.fi-active > .fi-sidebar-item-btn .fi-sidebar-item-icon {
    color: var(--filament-color-primary-400, #0d9d52) !important;
}

/* Nav item icons */
.fi-sidebar-item-icon {
    flex-shrink: 0;
    transition: color 0.18s ease;
}

.fi-sidebar-item-btn:hover .fi-sidebar-item-icon {
    color: #ffffff !important;
}

/* Sidebar footer */
.fi-sidebar-footer {
    border-top: 1px solid rgba(7, 116, 61, 0.12);
    padding: 0.75rem !important;
}

/* Sidebar scrollbar */
.fi-sidebar-nav::-webkit-scrollbar {
    width: 5px;
}

.fi-sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.fi-sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
}

.fi-sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ===== Dashboard Background ===== */
.fi-main {
    background: #f8fafc !important;
}

.fi-main-ctn {
    padding: 1.5rem 1.75rem !important;
}

/* ===== Topbar ===== */
.fi-topbar {
    background: #fff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    height: 56px !important;
}

.fi-topbar-brand img {
    height: 1.75rem !important;
}

/* ===== Cards ===== */
.fi-card {
    border-radius: 16px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.fi-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07) !important;
    transform: translateY(-2px);
}

/* ===== Stat Widgets — Premium Cards ===== */
.fi-wi-stats-overview-stat {
    border-radius: 16px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background: #fff !important;
    position: relative;
}

.fi-wi-stats-overview-stat::before {
    content: '';
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--filament-color-primary-500, #07743d), var(--filament-color-primary-400, #0d9d52));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fi-wi-stats-overview-stat:hover {
    box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.12) !important;
    transform: translateY(-4px);
    border-color: #cbd5e1 !important;
}

.fi-wi-stats-overview-stat:hover::before {
    opacity: 1;
}

.fi-wi-stats-overview-stat-content {
    padding: 1.25rem 1.5rem !important;
}

/* Stat label with icon */
.fi-wi-stats-overview-stat-label-ctn {
    display: flex !important;
    align-items: center;
    gap: 0.5rem !important;
    margin-bottom: 0.625rem !important;
}

.fi-wi-stats-overview-stat-label-ctn .fi-icon {
    width: 1.5rem !important;
    height: 1.5rem !important;
    padding: 0.25rem;
    border-radius: 8px;
    background: rgba(7, 116, 61, 0.08);
    color: var(--filament-color-primary-600, #07743d) !important;
}

/* Color variants for stat icons */
.fi-color-success .fi-wi-stats-overview-stat-label-ctn .fi-icon,
.fi-wi-stats-overview-stat.fi-color-success .fi-icon {
    background: rgba(22, 163, 74, 0.08);
    color: #16a34a !important;
}

.fi-color-danger .fi-wi-stats-overview-stat-label-ctn .fi-icon,
.fi-wi-stats-overview-stat.fi-color-danger .fi-icon {
    background: rgba(220, 38, 38, 0.08);
    color: #dc2626 !important;
}

.fi-color-warning .fi-wi-stats-overview-stat-label-ctn .fi-icon,
.fi-wi-stats-overview-stat.fi-color-warning .fi-icon {
    background: rgba(217, 119, 6, 0.08);
    color: #d97706 !important;
}

.fi-color-info .fi-wi-stats-overview-stat-label-ctn .fi-icon,
.fi-wi-stats-overview-stat.fi-color-info .fi-icon {
    background: rgba(2, 132, 199, 0.08);
    color: #0284c7 !important;
}

.fi-wi-stats-overview-stat-label {
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    font-size: 0.7rem !important;
    color: #64748b !important;
}

.fi-wi-stats-overview-stat-value {
    font-weight: 800 !important;
    font-size: 1.875rem !important;
    color: #0f172a !important;
    letter-spacing: -0.02em;
    line-height: 1.2 !important;
}

.fi-wi-stats-overview-stat-description {
    margin-top: 0.5rem !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center;
    gap: 0.375rem !important;
}

.fi-wi-stats-overview-stat-description .fi-icon {
    width: 1rem !important;
    height: 1rem !important;
}

/* ===== Table Widgets ===== */
.fi-wi-table {
    border-radius: 16px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    overflow: hidden;
    background: #fff !important;
}

.fi-wi-table-heading {
    font-weight: 700 !important;
    font-size: 1rem !important;
    color: #0f172a !important;
    padding: 1.25rem 1.5rem 0.75rem !important;
    border-bottom: 1px solid #f1f5f9;
}

/* ===== Tables ===== */
.fi-tbl {
    border-radius: 14px !important;
    overflow: hidden;
    border: 1px solid #e2e8f0 !important;
}

.fi-tbl-header {
    font-weight: 700 !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    color: #64748b !important;
    background: #f8fafc !important;
}

.fi-tbl-row:hover {
    background: #f8fafc !important;
}

/* ===== Buttons ===== */
.fi-btn {
    border-radius: 10px !important;
    font-weight: 600 !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.fi-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ===== Topbar Actions ===== */
.fi-topbar-action {
    border-radius: 10px !important;
}

/* ===== Page Header ===== */
.fi-page-header,
.fi-header {
    padding-bottom: 1.5rem !important;
}

.fi-page-header-heading,
.fi-header-heading {
    font-weight: 800 !important;
    font-size: 1.625rem !important;
    color: #0f172a !important;
    letter-spacing: -0.02em;
}

/* ===== Section Headers ===== */
.fi-section-header-heading {
    font-weight: 700 !important;
    font-size: 1.05rem !important;
    color: #0f172a !important;
}

/* ===== Section Component ===== */
.fi-section {
    border-radius: 16px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    overflow: hidden;
    background: #fff !important;
}

.fi-section-content {
    padding: 1.25rem 1.5rem !important;
}

/* ===== Widget Container ===== */
.fi-wi-widget {
    border-radius: 16px !important;
}

/* ===== Notifications ===== */
.fi-notification {
    border-radius: 12px !important;
}

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

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
