﻿:root {
    --font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --bg-color: #f0f2f5;
    --text-color: #2d3436;
    --banner-bg: linear-gradient(90deg, #2c3e50, #3498db);
    --banner-text: #ffffff;
    --sidebar-bg: linear-gradient(360deg, #2c3e50, #3498db);
    --sidebar-border: transparent;
    --navlink-color: #ecf0f1;
    --navlink-hover-bg: rgba(236, 240, 241, 0.2);
    --active-bg: rgba(255, 255, 255, 0.3);
    --active-text: #ffffff;
    --collapse-border: #3498db;
    --expanded-group-bg: rgba(52, 152, 219, 0.1);
    --banner-height: 140px;
    --sidebar-width: 200px;
} 
@font-face {
    font-family: 'Cairo';
    src: url('/fonts/cairo_weights/400.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cairo';
    src: url('/fonts/cairo_weights/500.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cairo';
    src: url('/fonts/cairo_weights/600.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cairo';
    src: url('/fonts/cairo_weights/700.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Thuluth II';
    src: url('../fonts/arfonts-decotype-thuluth-ii.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

body {
    direction: rtl;
    text-align: right;
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
}

.unselectable-text {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* LTR text direction for phone and email fields */
.ltr-text,
[type="email"],
[type="tel"],
input[name*="phone" i],
input[name*="email" i],
input[id*="phone" i],
input[id*="email" i],
.phone-field,
.email-field,
td[class*="phone" i],
td[class*="email" i],
span[class*="phone" i],
span[class*="email" i],
div[class*="phone" i]:not([class*="icon"]):not([class*="label"]),
div[class*="email" i]:not([class*="icon"]):not([class*="label"]) {
    direction: ltr !important;
    text-align: left !important;
}

/* Modern Circular Loader */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loader-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loader-content {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    text-align: center;
    min-width: 280px;
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.loader {
    display: inline-block;
    width: 48px;
    height: 48px;
    border: 4px solid #e3f2fd;
    border-top: 4px solid #2196f3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.loader-pulse {
    display: inline-block;
    width: 48px;
    height: 48px;
    border: 4px solid #e3f2fd;
    border-radius: 50%;
    position: relative;
    animation: pulse-loader 1.5s ease-in-out infinite;
    margin-bottom: 1rem;
}

.loader-pulse::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 4px solid #2196f3;
    border-radius: 50%;
    animation: pulse-ring 1.5s ease-in-out infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse-loader {
    0%, 100% { 
        transform: scale(1);
        border-color: #e3f2fd;
    }
    50% { 
        transform: scale(1.1);
        border-color: #2196f3;
    }
}

@keyframes pulse-ring {
    0% { 
        transform: scale(1);
        opacity: 1;
    }
    100% { 
        transform: scale(1.3);
        opacity: 0;
    }
}

.loader-message {
    color: #424242;
    font-weight: 500;
    font-size: 16px;
    margin-top: 0.5rem;
}

.loader-submessage {
    color: #757575;
    font-size: 14px;
    margin-top: 0.25rem;
}

/* Success animation */
.success-checkmark {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-block;
    stroke-width: 2;
    stroke: #4caf50;
    stroke-miterlimit: 10;
    margin-bottom: 1rem;
    box-shadow: inset 0px 0px 0px #4caf50;
    animation: fill-success 0.4s ease-in-out 0.4s forwards, scale-success 0.3s ease-in-out 0.9s both;
}

.success-checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #4caf50;
    fill: none;
    animation: stroke-success 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.success-checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke-success 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke-success {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scale-success {
    0%, 100% {
        transform: none;
    }
    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

@keyframes fill-success {
    100% {
        box-shadow: inset 0px 0px 0px 30px #4caf50;
    }
}

/* Prevent image extraction */
.protected-image {
    pointer-events: none; /* Prevents right-click */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none; /* Prevents long-press on iOS */
    user-drag: none;
    -webkit-user-drag: none; /* Safari */
}

.sso-mode-switch-form {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    padding: 0 8px;
}

.sso-mode-switch-label {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    margin-left: 10px;
    margin-bottom: 0;
    letter-spacing: 0.3px;
    white-space: nowrap;
    text-shadow: 0 1px 2px #2223;
}

.sso-mode-switch-select {
    direction: rtl;
    font-family: inherit;
    text-align-last: center;
    font-size: 1rem;
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 8px #0001;
    min-width: 175px;
    max-width: 260px;
    padding: 4px 12px 4px 32px;
    background: #f8fafd;
    color: #2d3436;
    transition: box-shadow 0.2s;
    font-weight: 500;
    outline: none;
}
.login-title {
    text-align: center !important;
}
 
.login-outer-wrap {
    background: #ececec;
}

.login-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 32px #0002;
    overflow: hidden;
}

.login-form-col {
    background: #fafbfc;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-form-wrapper {
    max-width: 400px;
    margin: 40px auto;
}

.login-banner-col {
    position: relative;
    min-height: 600px;
    padding: 0 !important;
}

.img-cover {
    object-fit: cover;
    width: 100%;
    height: 100%;
    display: block;
}

.login-banner-overlay {
    z-index: 2;
    padding-top: 60px;
    padding-right: 60px;
}

@media (max-width: 991.98px) {
    .login-banner-col {
        display: none !important;
    }

    .login-form-col {
        min-height: 400px;
    }
}



.small-link {
    color: #3498db !important;
    font-size: .97rem;
    text-decoration: underline !important;
    cursor: pointer;
    font-weight: 500;
}

    .small-link:hover {
        color: #2c3e50 !important;
        text-decoration: underline;
    }

.sso-mode-switch-select:focus {
    box-shadow: 0 0 0 2px #3498db44;
    border: 1.5px solid #3498db;
    background: #fff;
}

.sso-mode-switch-select option {
    text-align: right;
    font-size: 1rem;
    color: #2c3e50;
}

.main-content {
    margin-right: calc(var(--sidebar-width) + 20px);
    max-width: 100%;
    width: 100%;
    padding: 0px;
    transition: margin-right 0.3s;
}

    .main-content.no-sidebar {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .main-content {
        margin-right: 0;
    }

    .login-title {
        padding: 15px 0; /* Reduced padding on mobile */
        border-radius: 15px 15px 0 0; /* Smaller radius for mobile */
    }

        .login-title h2 {
            font-size: 1.5rem; /* Smaller on mobile (24px) */
            padding: 0 15px; /* Adjusted padding */
        }
}

.login-title {
    background: linear-gradient(90deg, #2c3e50, #3498db);
    color: var(--banner-text);
    padding: 20px 0;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3), 0 6px 6px rgba(0, 0, 0, 0.23);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

    .login-title h2 {
        margin: 0;
        font-size: 2rem;
        font-weight: 700;
        letter-spacing: 0.5px;
        line-height: 1.2;
        padding: 0 20px;
    }

.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 25px;
    background-color: #333;
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s, color 0.3s;
}

.employee-container {
    margin: 20px 0 0 0;
    width: 100%;
    max-width: 100%;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    direction: rtl;
    overflow-x: auto;
}

.employee-header {
    background: var(--banner-bg);
    color: var(--banner-text);
    padding: 15px;
    border-radius: 8px 8px 0 0;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.employee-table {
    background-color: #ffffff;
    border-radius: 0 0 8px 8px;
    margin-top: 10px;
    width: 100%;
    border-collapse: collapse;
}

    .employee-table th {
        background: linear-gradient(360deg, #2c3e50, #3498db);
        color: #ecf0f1;
        font-weight: 600;
        padding: 12px;
        text-align: center;
        border-bottom: 2px solid rgba(236, 240, 241, 0.2);
    }

    .employee-table td {
        padding: 12px;
        text-align: center;
        border-top: 1px solid #dee2e6;
        color: var(--text-color);
    }

.circulars-toggle-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.circulars-toggle-button {
    white-space: nowrap;
    position: relative;
    left: 70px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    display:   ruby;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

    .circulars-toggle-button::after {
        content: "▼";
        padding: 5px;
        font-size: 20px;
        margin-right: 5px;
        transition: transform 0.3s;
    }

    .circulars-toggle-button[aria-expanded="true"]::after {
        content: "▲";
        transform: rotate(180deg);
    }

.circulars-panel {
    width: auto;
    min-width: 200px;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.circulars-list {
    padding: 0;
    display: flex;
    flex-direction: column;
}

.circulars-item {
    padding: 10px;
    border: none;
}

    .circulars-item:hover {
        background-color: #f8f9fa;
    }

    .circulars-item a {
        color: var(--text-color);
        text-decoration: none;
    }

        .circulars-item a:hover {
            color: #3498db;
            text-decoration: underline;
        }

.education-card-container {
    margin-bottom: 20px;
}

.education-card-image {
    border-radius: 8px;
}

/* Optimized New Styles */
.input-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 20px;
    align-items: center;
    background-color: #ffffff;
    border-radius: 0 0 8px 8px;
}

    .input-group label {
        font-weight: 600;
        margin-bottom: 5px;
        color: var(--text-color);
        font-size: 1.1rem;
    }

.custom-select {
    flex: 1;
    min-width: 200px;
    padding: 12px;
    font-family: var(--font-family);
    background-color: #f9f9f9;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    color: var(--text-color);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: border-color 0.3s, box-shadow 0.3s;
}

    .custom-select:focus {
        outline: none;
        border-color: #3498db;
        box-shadow: 0 0 8px rgba(52, 152, 219, 0.3);
    }

.custom-btn {
    padding: 12px 25px;
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

    .custom-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }

.custom-btn-primary {
    background: linear-gradient(90deg, #2c3e50, #3498db);
}

    .custom-btn-primary:hover {
        background: linear-gradient(90deg, #3498db, #2c3e50);
    }

.custom-btn-success {
    background: linear-gradient(90deg, #27ae60, #2ecc71);
}

    .custom-btn-success:hover {
        background: linear-gradient(90deg, #2ecc71, #27ae60);
    }

.custom-btn-danger {
    background: linear-gradient(90deg, #c0392b, #e74c3c);
}

    .custom-btn-danger:hover {
        background: linear-gradient(90deg, #e74c3c, #c0392b);
    }

.employee-body {
    padding: 20px;
    background-color: #ffffff;
    border-radius: 0 0 8px 8px;
}

.table-row-admin {
    background-color: #ffebee; 
}

.table-row-user {
    background-color: #e3f2fd; 
}

.table-row-other {
    background-color: #fff3e0; 
}

.table-row-inactive {
    opacity: 0.7; 
    background-color: rgba(0, 0, 0, 0.05); 
}

input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0 auto;
    display: block;
    accent-color: #3498db;
    cursor: pointer;
}
 
.sidebar .nav-link[data-toggle="collapse"] {
    font-weight: bold;
    color: var(--navlink-color);
    background: rgba(0, 0, 0, 0.1); 
    margin: 5px 10px;
    border-radius: 5px;
    padding: 10px 15px;
    position: relative;
    transition: background 0.3s, color 0.3s;
}
 
    .sidebar .nav-link[data-toggle="collapse"]:hover {
        background: var(--navlink-hover-bg);
    }
     
    .sidebar .nav-link[data-toggle="collapse"].active-page {
        background: var(--active-bg);
        color: var(--active-text);
    }
     
.sidebar .nav-link .expand-icon {
    display: inline-block;
    transition: transform 0.3s;
    margin-left: 5px;
}

.sidebar .nav-link[aria-expanded="true"] .expand-icon {
    transform: rotate(90deg);
}
 
.sidebar .collapse .nav-link {
    font-size: 0.9rem;
    padding: 8px 25px; 
    margin: 2px 10px;
    transition: background 0.3s, border-left 0.3s;
}
 
    .sidebar .collapse .nav-link:hover {
        background: var(--navlink-hover-bg);
    }
     
    .sidebar .collapse .nav-link.active-page {
        background: var(--active-bg);
        border-left: 3px solid var(--collapse-border);
        color: var(--active-text);
    }
