/* ------------------------------------------------------- */
/* ========== 1. Font-Face Declarations ========== */
/* ------------------------------------------------------- */

@font-face {
    font-family: 'Lahzeh';
    src: url('../fonts/Lahzeh-FaNum-Black.woff') format('woff');
    font-weight: 900; /* Black weight */
    font-style: normal;
}
  
@font-face {
    font-family: 'Lahzeh';
    src: url('../fonts/Lahzeh-FaNum-ExtraBold.woff') format('woff');
    font-weight: 800; /* Extra Bold */
    font-style: normal;
}
  
@font-face {
    font-family: 'Lahzeh';
    src: url('../fonts/Lahzeh-FaNum-Bold.woff') format('woff');
    font-weight: 700; /* Bold */
    font-style: normal;
}
  
@font-face {
    font-family: 'Lahzeh';
    src: url('../fonts/Lahzeh-FaNum-SemiBold.woff') format('woff');
    font-weight: 600; /* Semi Bold */
    font-style: normal;
}
  
@font-face {
    font-family: 'Lahzeh';
    src: url('../fonts/Lahzeh-FaNum-Medium.woff') format('woff');
    font-weight: 500; /* Medium */
    font-style: normal;
}
  
@font-face {
    font-family: 'Lahzeh';
    src: url('../fonts/Lahzeh-FaNum-Regular.woff') format('woff');
    font-weight: 400; /* Regular */
    font-style: normal;
}
  
@font-face {
    font-family: 'Lahzeh';
    src: url('../fonts/Lahzeh-FaNum-Light.woff') format('woff');
    font-weight: 300; /* Light */
    font-style: normal;
}
  
@font-face {
    font-family: 'Lahzeh';
    src: url('../fonts/Lahzeh-FaNum-ExtraLight.woff') format('woff');
    font-weight: 200; /* Extra Light */
    font-style: normal;
}
  
@font-face {
    font-family: 'Lahzeh';
    src: url('../fonts/Lahzeh-FaNum-Thin.woff') format('woff');
    font-weight: 100; /* Thin */
    font-style: normal;
}

/* ------------------------------------------------------- */
/* ========== 2. Root Variables ========== */
/* ------------------------------------------------------- */

:root {
    --primary-color: #f15a29;
    --secondary-color: #343a40;
    --accent-color: #4cc9f0;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --error-color: #e74c3c;
    --text-color-light: #ffffff;
    --text-color-dark: #2d3748;
    --text-color-muted: #718096;
    --bg-color-light: #f8f9fa;
    --bg-color-dark: #121212;
    --card-bg-color: #ffffff;
    --border-color: #e2e8f0;
    --font-family: 'Lahzeh', sans-serif;
    --font-size-xs: 12px;
    --font-size-small: 14px;
    --font-size-medium: 16px;
    --font-size-large: 18px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --primary-gradient: linear-gradient(135deg, #4361ee, #3a0ca3);
    --form-bg: #ffffff;
    --input-bg: #f8f9fa;
    --input-border: #e2e8f0;
    --button-gradient: linear-gradient(135deg, #4361ee, #3a0ca3);
    --shadow-color: rgba(67, 97, 238, 0.15);
}

/* ------------------------------------------------------- */
/* ========== 3. Global Body (Needed for .login-page) ========== */
/* ------------------------------------------------------- */

body {
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    direction: rtl;
    text-align: right;
    background-color: var(--bg-color-light);
    color: var(--text-color-dark);
    line-height: 1.5;
    font-size: var(--font-size-medium);
}

/* ------------------------------------------------------- */
/* ========== 4. Form Elements (Used by .form-group/.form-control) ========== */
/* ------------------------------------------------------- */

.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    font-size: var(--font-size-medium);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    background-color: var(--text-color-light);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    font-family: var(--font-family);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
    outline: none;
}

/* ------------------------------------------------------- */
/* ========== 5. Login Page Styles (Classes from index.php) ========== */
/* ------------------------------------------------------- */

/* Body with .login-page */
body.login-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: #f5f7ff;
    background-image: radial-gradient(#e5e9ff 1.5px, transparent 1.5px);
    background-size: 30px 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-family);
}

/* .login-container */
.login-container {
    width: 100%;
    max-width: 1200px;
    min-height: 600px;
    display: flex;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    margin: 20px;
    position: relative;
    background-color: var(--form-bg);
}

/* .login-image */
.login-image {
    display: none;
    flex: 1;
    position: relative;
    overflow: hidden;
}

.login-image-inner {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 3rem;
    color: white;
    text-align: center;
}

.login-image-text {
    position: relative;
    z-index: 1;
}

.login-image-text h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.login-image-text p {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.7;
    margin-bottom: 2rem;
}

/* .login-curves and .login-curveX */
.login-curves {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.login-curve {
    position: absolute;
    opacity: 0.15;
    background: white;
    border-radius: 50%;
}

.login-curve-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -100px;
}

.login-curve-2 {
    width: 500px;
    height: 500px;
    bottom: -200px;
    right: -200px;
}

/* .login-form-container */
.login-form-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2.5rem;
    position: relative;
}

/* .floating-shapes / .shape classes */
.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.shape {
    position: absolute;
    opacity: 0.05;
    border-radius: 50%;
    background: var(--primary-color);
}

.shape-1 {
    width: 150px;
    height: 150px;
    top: 10%;
    left: 10%;
}

.shape-2 {
    width: 80px;
    height: 80px;
    bottom: 20%;
    right: 10%;
}

.shape-3 {
    width: 60px;
    height: 60px;
    bottom: 15%;
    left: 20%;
}

/* .login-logo */
.login-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 2.5rem;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    padding: 5px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-logo img {
    width: 90%;
    height: 90%;
    object-fit: cover;
    border-radius: 50%;
}

/* .login-form */
.login-form {
    width: 100%;
    max-width: 420px;
}

/* .login-header */
.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-header h1 {
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 0.8rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
}

.login-header p {
    color: var(--text-color-muted);
    font-size: 1rem;
    margin: 0;
}

/* Within the .login-form, the .form-group was already defined above, 
   but we also have margin adjustments here. */
.login-form .form-group {
    margin-bottom: 1.8rem;
    position: relative;
}

/* label inside the login form */
.login-form label {
    display: block;
    margin-bottom: 0.7rem;
    font-weight: 500;
    color: var(--text-color-dark);
    font-size: 0.95rem;
}

/* .input-with-icon */
.login-form .input-with-icon {
    position: relative;
}

.login-form .input-with-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-color-muted);
    font-size: 1.2rem;
    transition: color 0.3s;
}

/* .login-form .form-control extension */
.login-form .form-control {
    width: 100%;
    padding: 15px 15px;
    padding-left: 50px;
    font-size: 1rem;
    border: 2px solid var(--input-border);
    border-radius: 12px;
    background-color: var(--input-bg);
    transition: all 0.3s;
    font-family: var(--font-family);
    box-sizing: border-box;
}

.login-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--shadow-color);
    outline: none;
    background-color: #ffffff;
}

.login-form .form-control:focus + i {
    color: var(--primary-color);
}

/* .btn-login */
.btn-login {
    width: 100%;
    padding: 15px;
    background: var(--button-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--font-family);
    position: relative;
    overflow: hidden;
    margin-top: 1rem;
    box-shadow: 0 8px 15px var(--shadow-color);
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 20px var(--shadow-color);
}

.btn-login:active {
    transform: translateY(-1px);
}

.btn-login::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.2);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-login:hover::after {
    opacity: 1;
}

/* .error-message (shown if $error is set) */
.login-form .error-message {
    color: var(--error-color);
    font-size: 14px;
    margin-bottom: 1.5rem;
    padding: 15px;
    background-color: rgba(231, 76, 60, 0.1);
    border-radius: 10px;
    text-align: center;
    border-right: 4px solid var(--error-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-form .error-message i {
    margin-left: 8px;
    font-size: 16px;
}

/* .login-footer */
.login-footer {
    margin-top: 3rem;
    text-align: center;
    color: var(--text-color-muted);
    font-size: 0.9rem;
}

/* ------------------------------------------------------- */
/* ========== 6. Responsive Media Queries ========== */
/* ------------------------------------------------------- */

@media (max-width: 767px) {
    /* Mobile adjustments for the login page */

    .login-container {
        margin: 0;
        border-radius: 0;
        height: 100vh;
        max-height: none;
    }

    .login-form-container {
        padding: 1.5rem;
    }

    .login-logo {
        width: 100px;
        height: 100px;
        margin-bottom: 2rem;
    }

    .login-header h1 {
        font-size: 1.8rem;
    }

    .login-form .form-control {
        padding: 13px 15px;
        padding-left: 45px;
    }

    .btn-login {
        padding: 13px;
    }

    .login-footer {
        margin-top: 2rem;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    /* Medium screen adjustments for the login page */

    .login-container {
        box-shadow: 0 15px 30px -12px rgba(0, 0, 0, 0.1);
    }

    .login-form-container {
        padding: 2rem;
    }
}

@media (min-width: 992px) {
    /* Larger screen adjustments for the login page */

    .login-image {
        display: block;
    }

    .login-container {
        max-height: 85vh;
    }
}
