/* 
    Absence System Professional Design System
    Focus: Glassmorphism, IBM Plex Arabic, and Modern UX
*/

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@100;200;300;400;500;600;700&display=swap');

:root {
    /* Color Palette - Simplified Slate */
    --primary: #334155;
    --brand: #3b82f6;
    --brand-hover: #2563eb;

    /* Backgrounds */
    --bg-light: #f8fafc;
    --bg-dark: #0f172a;

    /* Surface Colors (Minimalist) */
    --glass-white: #ffffff;
    --glass-dark: #1e293b;
    --glass-border-white: #e2e8f0;
    --glass-border-dark: #334155;

    /* Standardized Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-premium: 0 1px 3px rgba(0, 0, 0, 0.1);
    
    --font-arabic: "IBM Plex Sans Arabic", sans-serif;
    --font-english: "IBM Plex Sans", sans-serif;
}

* {
    font-family: var(--font-arabic);
}

/* Global Font Application - This will be managed by header.php dynamically */
body,
button,
input,
select,
textarea {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* Minimalist Panels */
.glass-panel {
    background: var(--glass-white);
    border: 1px solid var(--glass-border-white);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
}

.dark .glass-panel {
    background: #0f172a;
    border: 1px solid #1e293b;
}

.glass-card {
    background: var(--glass-white);
    border: 1px solid var(--glass-border-white);
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.dark .glass-card {
    background: #0f172a;
    border: 1px solid #1e293b;
}

.glass-card:hover {
    border-color: var(--brand);
}



/* Sidebar & Navbar */
.sidebar-glass {
    background: white !important;
    border-right: 1px solid var(--glass-border-white);
}

.dark .sidebar-glass {
    background: #0f172a !important;
    border-right: 1px solid var(--glass-border-dark);
}


/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Forms & Inputs Enhancement */
.custom-input {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.625rem 1rem;
    transition: all 0.2s ease;
}

.custom-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-soft);
    outline: none;
}

.dark .custom-input {
    background-color: #0f172a;
    border-color: #1e293b;
    color: white;
}

/* Professional Tables */
.custom-table-container {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.dark .custom-table-container {
    background: #0f172a;
    border-color: #1e293b;
}

.custom-table {
    width: 100%;
}

.custom-table th {
    background: #f1f5f9;
    padding: 0.875rem 1rem;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.dark .custom-table th {
    background: #1e293b;
    color: #cbd5e1;
    border-bottom: 1px solid #334155;
}

.dark .custom-table td {
    color: #94a3b8;
}

.dark .custom-table tr {
    border-bottom: 1px solid #1e293b;
    transition: background 0.2s ease;
}

.dark .custom-table tr:hover {
    background: #0f172a;
}

/* Fix icon alignment */
.custom-table td button,
.custom-table td a,
.custom-table td form {
    margin-bottom: 0 !important;
}

/* Sidebar Transitions for RTL/LTR handled by CSS logical properties where possible */
#logo-sidebar a {
    transition: all 0.2s ease;
}

[dir="ltr"] #logo-sidebar a:hover {
    padding-left: 1.5rem;
}

[dir="rtl"] #logo-sidebar a:hover {
    padding-right: 1.5rem;
}

/* Compact Buttons */
.btn-primary {
    background: var(--brand);
    color: white;
    font-weight: 600;
    padding: 0.4rem 1rem;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: var(--brand-hover);
}

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

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

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 100vh;
}

.dark ::-webkit-scrollbar-thumb {
    background: #334155;
}

/* Sidebar Toggle Animation */
.burger-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3px;
    width: 20px;
    height: 20px;
}

.burger-span {
    height: 1.5px;
    width: 18px;
    background-color: currentColor;
    display: block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 99px;
}

#sidebar-toggle.is-open .burger-span:nth-child(1) {
    transform: translateY(4.5px) rotate(45deg);
    background-color: #ef4444 !important;
}

#sidebar-toggle.is-open .burger-span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

#sidebar-toggle.is-open .burger-span:nth-child(3) {
    transform: translateY(-4.5px) rotate(-45deg);
    background-color: #ef4444 !important;
}

#sidebar-toggle.is-open {
    color: #ef4444 !important;
    border-color: #fecaca !important;
    background-color: #fef2f2 !important;
}

.dark #sidebar-toggle.is-open {
    border-color: #7f1d1d !important;
    background-color: #450a0a !important;
}