/* Google Fonts - Droid Arabic Kufi */
@import url('https://fonts.googleapis.com/css2?family=Droid+Arabic+Kufi:wght@400;700&display=swap');

/* Basic Variables */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --dark-bg: #212529;
    --sidebar-width: 280px;
    --header-height: 60px;
}

body {
    font-family: 'Droid Arabic Kufi', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    background-color: #f8f9fa;
    direction: rtl;
    text-align: right;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    height: 100vh;
    width: var(--sidebar-width);
    position: fixed;
    top: 0;
    right: 0;
    background-color: var(--dark-bg);
    color: #fff;
    padding-top: 0;
    transition: all 0.3s;
    z-index: 1000;
}

.sidebar a {
    color: #adb5bd;
    text-decoration: none;
    padding: 10px 20px;
    display: block;
    transition: 0.2s;
    border-right: 4px solid transparent;
}

.sidebar a:hover,
.sidebar a.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    border-right-color: var(--primary-color);
}

.sidebar i {
    margin-left: 10px;
}

/* Main Content */
.main-content {
    margin-right: var(--sidebar-width);
    padding: 20px;
    padding-top: calc(var(--header-height) + 20px);
    transition: all 0.3s;
}

/* Header */
.header {
    height: var(--header-height);
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    right: var(--sidebar-width);
    left: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 999;
}

.navbar-brand-box {
    width: var(--sidebar-width);
    position: fixed;
    top: 0;
    right: 0;
    height: var(--header-height);
    background-color: #1a1e21;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    z-index: 1001;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    margin-bottom: 20px;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #eee;
    font-weight: bold;
    padding: 15px 20px;
    border-radius: 10px 10px 0 0 !important;
}

/* File Manager Styles */
.file-item {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
    background: #fff;
}

.file-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.file-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.folder-icon {
    color: #ffc107;
}

/* Login Page */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background-color: #ffffff;
    background: #ffffff;
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        right: -280px;
        /* Use fixed width instead of percentage for smoother transition */
    }

    .sidebar.show {
        right: 0;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .main-content {
        margin-right: 0;
    }

    .header {
        right: 0;
        padding-right: 15px;
        /* Adjust padding for mobile */
    }

    .navbar-brand-box {
        display: none;
    }
}

/* Pro Theme Enhancements */
.card {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.01), 0 10px 15px rgba(0, 0, 0, 0.02);
    /* Softer, layered shadows */
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.04);
}

.btn {
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 500;
}

.form-control,
.form-select {
    border-radius: 8px;
    padding: 10px 15px;
    border-color: #e2e8f0;
}

.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
    border-color: var(--primary-color);
}

/* Sidebar Active State Polish */
.sidebar a.active {
    background: linear-gradient(90deg, rgba(13, 110, 253, 0.1) 0%, transparent 100%);
    color: #fff;
    border-right-color: var(--primary-color);
}