/* Admin Dashboard Styles */
:root {
    --primary-color: #4CD5FF;
    --secondary-color: #FF00FF;
    --dark-color: #171923;
    --light-color: #f9f9f9;
    --gray-color: #777;
    --border-color: #ddd;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --sidebar-width: 260px;
    --header-height: 60px;
    --purple-color: #9c27b0;
    --green-color: #4caf50;
    --orange-color: #ff9800;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    text-align: right;
    direction: rtl;
}

.admin-body {
    background: linear-gradient(135deg, #1a1f27, #2d3748);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Login Page Styles */
.login-container {
    max-width: 400px;
    width: 90%;
    margin: 0 auto;
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.login-box::before, .login-box::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    opacity: 0.1;
    z-index: -1;
}

.login-box::before {
    background: var(--primary-color);
    top: -150px;
    right: -150px;
    animation: pulse 6s infinite;
}

.login-box::after {
    background: var(--secondary-color);
    bottom: -150px;
    left: -150px;
    animation: pulse 6s infinite 3s;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.2;
    }
    100% {
        transform: scale(0.8);
        opacity: 0.1;
    }
}

.login-logo {
    text-align: center;
    margin-bottom: 25px;
}

.login-logo img {
    width: 120px;
    margin-bottom: 15px;
}

.login-logo h2 {
    font-size: 1.8rem;
    color: var(--dark-color);
    margin: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
}

.form-group .form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.form-group .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 213, 255, 0.3);
    background-color: white;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 213, 255, 0.4);
}

.forgot-password {
    text-align: center;
    margin-top: 15px;
}

.forgot-password a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.forgot-password a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Dashboard Layout Styles */
.dashboard-body {
    background-color: #f0f2f5;
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
}

.dashboard-container {
    display: flex;
    height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(to bottom, #1a1f27, #2d3748);
    color: white;
    height: 100vh;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}

.sidebar-collapsed .sidebar {
    width: 70px;
}

.sidebar-logo {
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

.sidebar-logo::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(to right, 
        rgba(76, 213, 255, 0.1), 
        rgba(76, 213, 255, 0.5), 
        rgba(255, 0, 255, 0.5), 
        rgba(76, 213, 255, 0.1));
}

.sidebar-logo img {
    width: 60px;
    margin-bottom: 10px;
}

.sidebar-logo h3 {
    font-size: 1.2rem;
    margin: 0;
    color: white;
    font-weight: 500;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    flex-grow: 1;
}

.sidebar-menu li {
    margin-bottom: 5px;
    transition: all 0.3s ease;
    position: relative;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-menu li a i {
    margin-left: 10px;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.sidebar-menu li:hover a {
    color: white;
    background-color: rgba(255, 255, 255, 0.05);
}

.sidebar-menu li.active {
    background: linear-gradient(to right, rgba(76, 213, 255, 0.2), rgba(255, 0, 255, 0.2));
}

.sidebar-menu li.active::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
}

.sidebar-menu li.active a {
    color: white;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.sidebar-footer a i {
    margin-left: 10px;
    font-size: 0.8rem;
    color: var(--gray-color);
}

.sidebar-footer a:hover {
    color: white;
}

/* Main Content Styles */
.main-content {
    flex-grow: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

/* Header Styles */
.dashboard-header {
    height: var(--header-height);
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 5;
}

.header-left {
    display: flex;
    align-items: center;
}

#sidebar-toggle {
    background: none;
    border: none;
    color: var(--dark-color);
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: 15px;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

#sidebar-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.search-box {
    position: relative;
    margin-right: 20px;
}

.search-box input {
    padding: 8px 15px;
    padding-right: 35px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 200px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    width: 250px;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 213, 255, 0.2);
}

.search-box i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
}

.header-right {
    display: flex;
    align-items: center;
}

.notifications, .messages {
    position: relative;
    margin-left: 20px;
}

.notifications a, .messages a {
    color: var(--dark-color);
    text-decoration: none;
    font-size: 1.1rem;
}

.badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-profile {
    display: flex;
    align-items: center;
    margin-right: 20px;
    cursor: pointer;
    position: relative;
}

.profile-img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    margin-left: 10px;
}

.admin-profile span {
    font-weight: 500;
    color: var(--dark-color);
}

.admin-profile i {
    font-size: 0.8rem;
    margin-right: 5px;
    color: var(--gray-color);
}

/* Content Wrapper Styles */
.content-wrapper {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    position: relative;
}

.content-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--dark-color);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 0;
    width: 50px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* Dashboard Stats Styles */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    margin: 20px 10px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    background-color: rgba(255, 255, 255, 0.95);
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.stat-card:nth-child(1)::after {
    background: linear-gradient(to right, #4CD5FF, #FF00FF);
    box-shadow: 0 0 10px rgba(76, 213, 255, 0.7), 0 0 20px rgba(255, 0, 255, 0.7);
}

.stat-card:nth-child(2)::after {
    background: linear-gradient(to right, #FF00FF, #4CD5FF);
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.7), 0 0 20px rgba(76, 213, 255, 0.7);
}

.stat-card:nth-child(3)::after {
    background: linear-gradient(to right, #4CD5FF, #FF9E00);
    box-shadow: 0 0 10px rgba(76, 213, 255, 0.7), 0 0 20px rgba(255, 158, 0, 0.7);
}

.stat-card:hover::after {
    transform: scaleX(1);
}

.stat-card .icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 35px;
    position: relative;
    z-index: 1;
    transition: all 0.4s ease;
}

.stat-card:nth-child(1) .icon {
    background: linear-gradient(135deg, #4CD5FF, #FF00FF);
    box-shadow: 0 0 15px rgba(76, 213, 255, 0.7), 0 0 30px rgba(255, 0, 255, 0.4);
}

.stat-card:nth-child(2) .icon {
    background: linear-gradient(135deg, #FF00FF, #4CD5FF);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.7), 0 0 30px rgba(76, 213, 255, 0.4);
}

.stat-card:nth-child(3) .icon {
    background: linear-gradient(135deg, #FF9E00, #4CD5FF);
    box-shadow: 0 0 15px rgba(255, 158, 0, 0.7), 0 0 30px rgba(76, 213, 255, 0.4);
}

.stat-card:hover .icon {
    transform: rotateY(180deg);
}

.stat-card h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: var(--dark-color);
    transition: all 0.3s ease;
}

.stat-card:hover h3 {
    color: #4CD5FF;
    text-shadow: 0 0 5px rgba(76, 213, 255, 0.5);
}

.stat-card p {
    color: var(--gray-color);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

/* Dashboard Widgets Styles */
.dashboard-widgets {
    margin-top: 30px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
    margin-bottom: 20px;
}

.col-md-4, .col-md-6, .col-md-8 {
    padding: 0 10px;
    margin-bottom: 20px;
    box-sizing: border-box;
}

.col-md-4 {
    width: 33.333%;
}

.col-md-6 {
    width: 50%;
}

.col-md-8 {
    width: 66.667%;
}

.widget {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.widget:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.widget-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--dark-color);
}

.widget-actions {
    display: flex;
}

.btn-widget {
    background: none;
    border: none;
    color: var(--gray-color);
    font-size: 1rem;
    cursor: pointer;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.btn-widget:hover {
    color: var(--primary-color);
}

.widget-body {
    padding: 20px;
    flex-grow: 1;
}

.chart-container {
    height: 300px;
    position: relative;
}

/* Messages List Styles */
.messages-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.messages-list li {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
}

.messages-list li:last-child {
    border-bottom: none;
}

.message-avatar {
    margin-left: 15px;
}

.message-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.message-content {
    flex-grow: 1;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.message-header h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--dark-color);
}

.message-time {
    font-size: 0.8rem;
    color: var(--gray-color);
}

.message-content p {
    margin: 0;
    color: var(--gray-color);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.view-all {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.view-all:hover {
    color: var(--secondary-color);
}

/* Projects List Styles */
.projects-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.projects-list li {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.projects-list li:last-child {
    border-bottom: none;
}

.project-info {
    margin-bottom: 10px;
}

.project-info h4 {
    margin: 0 0 5px;
    font-size: 1rem;
    color: var(--dark-color);
}

.project-info p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--gray-color);
}

.project-progress {
    display: flex;
    align-items: center;
}

.progress {
    flex-grow: 1;
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    margin-left: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
}

.project-progress span {
    font-size: 0.9rem;
    color: var(--dark-color);
    font-weight: 500;
}

/* Stats Grid Styles */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.stat-grid-item {
    background-color: rgba(76, 213, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-grid-item:hover {
    background-color: rgba(76, 213, 255, 0.1);
}

.stat-grid-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat-grid-item h4 {
    margin: 5px 0;
    font-size: 1.5rem;
    color: var(--dark-color);
}

.stat-grid-item p {
    margin: 0;
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* Section Tools Styles */
.section-tools {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 5px 15px rgba(76, 213, 255, 0.3);
    transform: translateY(-2px);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
}

.btn-filter {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background-color: white;
    color: var(--gray-color);
    margin-left: 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-filter.active, .btn-filter:hover {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: transparent;
}

/* Hero Slider Management Styles */
.sliders-list {
    margin-top: 30px;
}

.slider-item {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
}

.slider-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.slider-preview {
    flex: 0 0 300px;
    position: relative;
    overflow: hidden;
}

.slider-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.slider-item:hover .slider-preview img {
    transform: scale(1.1);
}

.slider-actions {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    opacity: 0;
    transition: all 0.3s ease;
}

.slider-preview:hover .slider-actions {
    opacity: 1;
}

.btn-action {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background-color: white;
    margin-right: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--dark-color);
}

.btn-action:hover {
    background-color: white;
    color: var(--primary-color);
    transform: translateY(-2px);
}

.slider-details {
    flex-grow: 1;
    padding: 20px;
}

.slider-details h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.3rem;
    color: var(--dark-color);
}

/* Portfolio Management Styles */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.portfolio-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.portfolio-image {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.portfolio-card:hover .portfolio-image img {
    transform: scale(1.1);
}

.portfolio-actions {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    opacity: 0;
    transition: all 0.3s ease;
}

.portfolio-image:hover .portfolio-actions {
    opacity: 1;
}

.portfolio-info {
    padding: 15px;
}

.portfolio-info h3 {
    margin: 0 0 10px;
    font-size: 1.1rem;
    color: var(--dark-color);
}

.portfolio-info p {
    margin: 0 0 15px;
    color: var(--gray-color);
    font-size: 0.9rem;
}

.portfolio-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}

.category {
    background-color: rgba(76, 213, 255, 0.1);
    color: var(--primary-color);
    padding: 3px 10px;
    border-radius: 20px;
}

.date {
    color: var(--gray-color);
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.pagination-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background-color: white;
    margin: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--dark-color);
}

.pagination-btn.active, .pagination-btn:hover {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: transparent;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .col-md-4, .col-md-6, .col-md-8 {
        width: 50%;
    }
}

@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        right: -100%;
        z-index: 100;
    }
    
    .sidebar-open .sidebar {
        right: 0;
    }
    
    .main-content {
        width: 100%;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .slider-item {
        flex-direction: column;
    }
    
    .slider-preview {
        flex: none;
        height: 200px;
    }
}

@media (max-width: 768px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .col-md-4, .col-md-6, .col-md-8 {
        width: 100%;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .slider-preview {
        height: 180px;
    }
}

@media (max-width: 576px) {
    .search-box {
        display: none;
    }
    
    .admin-profile span {
        display: none;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .stat-info h3 {
        font-size: 1.5rem;
    }
}