/* dashboard.css - لوحة التحكم */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', sans-serif;
    background: #f0f4f8;
    color: #1e293b;
    overflow-x: hidden;
}

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

::-webkit-scrollbar-track {
    background: #e9eef2;
}

::-webkit-scrollbar-thumb {
    background: #c1904f;
    border-radius: 10px;
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #1e3c5c 0%, #0f2a3f 100%);
    color: white;
    padding: 2rem 1.5rem;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: 0.3s;
    z-index: 100;
    box-shadow: 4px 0 20px rgba(0,0,0,0.1);
}

.sidebar.collapsed {
    width: 80px;
    padding: 2rem 0.5rem;
}

.sidebar.collapsed .sidebar-title,
.sidebar.collapsed .sidebar-menu a span {
    display: none;
}

.sidebar.collapsed .sidebar-menu a {
    justify-content: center;
    padding: 1rem;
}

.sidebar.collapsed .sidebar-menu a i {
    margin: 0;
    font-size: 1.3rem;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid rgba(193, 144, 79, 0.3);
}

.sidebar-logo {
    background: #c1904f;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #1e3c5c;
    flex-shrink: 0;
}

.sidebar-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
}

.sidebar-header span {
    font-size: 0.8rem;
    color: #c1904f;
    display: block;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 0.8rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 1rem 1.2rem;
    color: #e0e7ff;
    text-decoration: none;
    border-radius: 12px;
    transition: 0.3s;
    font-weight: 500;
}

.sidebar-menu a i {
    width: 25px;
    font-size: 1.2rem;
    color: #c1904f;
}

.sidebar-menu a:hover {
    background: rgba(193, 144, 79, 0.15);
    color: white;
    transform: translateX(-5px);
}

.sidebar-menu a.active {
    background: #c1904f;
    color: #1e3c5c;
    font-weight: 700;
}

.sidebar-menu a.active i {
    color: #1e3c5c;
}

.logout-item {
    margin-top: 2rem;
    border-top: 1px solid rgba(193, 144, 79, 0.3);
    padding-top: 1rem;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    z-index: 99;
    padding: 0.5rem;
    border-top: 3px solid #c1904f;
}

.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    color: #64748b;
    text-decoration: none;
    font-size: 0.8rem;
    transition: 0.3s;
    border-radius: 8px;
}

.mobile-nav-item i {
    font-size: 1.3rem;
    margin-bottom: 0.2rem;
}

.mobile-nav-item.active {
    color: #c1904f;
    background: rgba(193, 144, 79, 0.1);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-right: 280px;
    padding: 2rem;
    transition: 0.3s;
}

.sidebar.collapsed + .main-content {
    margin-right: 80px;
}

/* Top Bar */
.top-bar {
    background: white;
    padding: 1rem 2rem;
    border-radius: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
    border: 1px solid #e9eef2;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #1e3c5c;
    cursor: pointer;
}

.search-box {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    width: 300px;
    border: 1px solid #e2e8f0;
}

.search-box i {
    color: #c1904f;
    margin-left: 10px;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notifications {
    position: relative;
    cursor: pointer;
}

.notifications i {
    font-size: 1.3rem;
    color: #1e3c5c;
}

.badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #c1904f;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.admin-avatar {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #1e3c5c, #2a4f73);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    border: 2px solid #c1904f;
}

/* Content Sections */
.content-section {
    display: none;
}

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

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
    border: 1px solid #e9eef2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: #c1904f;
    box-shadow: 0 10px 25px rgba(193, 144, 79, 0.1);
}

.stat-info h3 {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.stat-info .stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: #1e3c5c;
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #f0f4fa, #ffffff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #c1904f;
    border: 2px dashed #c1904f;
}

/* Quick Actions */
.quick-actions {
    background: white;
    padding: 2rem;
    border-radius: 25px;
    margin-bottom: 2rem;
    border: 1px solid #e9eef2;
}

.quick-actions h3 {
    color: #1e3c5c;
    margin-bottom: 1.5rem;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.action-card {
    background: linear-gradient(135deg, #f8fafc, #ffffff);
    border: 2px dashed #c1904f;
    border-radius: 15px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: 0.3s;
    border: none;
    font-family: 'Tajawal', sans-serif;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(193, 144, 79, 0.2);
}

.action-card i {
    font-size: 2rem;
    color: #c1904f;
}

.action-card span {
    font-weight: 600;
    color: #1e3c5c;
}

/* Recent News */
.recent-news {
    background: white;
    padding: 2rem;
    border-radius: 25px;
    border: 1px solid #e9eef2;
}

.recent-news h3 {
    color: #1e3c5c;
    margin-bottom: 1.5rem;
}

.news-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.news-preview-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 15px;
    transition: 0.3s;
}

.news-preview-item:hover {
    background: #fff2e0;
}

.news-preview-item img {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
}

.news-preview-info h4 {
    font-size: 1rem;
    color: #1e3c5c;
    margin-bottom: 0.3rem;
}

.news-preview-info p {
    font-size: 0.8rem;
    color: #64748b;
}

/* Add Forms */
.add-section {
    background: white;
    padding: 2rem;
    border-radius: 25px;
    margin-bottom: 2rem;
    border: 1px solid #e9eef2;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    color: #1e3c5c;
    font-weight: 700;
}

.section-title i {
    color: #c1904f;
    font-size: 1.8rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

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

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #1e3c5c;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e9eef2;
    border-radius: 12px;
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    transition: 0.3s;
    background: #f8fafc;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #c1904f;
    outline: none;
    background: white;
}

.image-upload {
    border: 2px dashed #c1904f;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    background: #fff9f0;
    cursor: pointer;
    transition: 0.3s;
}

.image-upload:hover {
    background: #fff2e0;
}

.image-upload i {
    font-size: 3rem;
    color: #c1904f;
    margin-bottom: 1rem;
}

.image-upload p {
    color: #64748b;
}

.image-upload span {
    color: #c1904f;
    font-weight: 700;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: #1e3c5c;
    color: white;
}

.btn-primary:hover {
    background: #2a4f73;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 60, 92, 0.3);
}

.btn-secondary {
    background: #c1904f;
    color: white;
}

.btn-secondary:hover {
    background: #d4a56a;
    transform: translateY(-2px);
}

/* Tables */
.table-container {
    background: white;
    border-radius: 25px;
    padding: 1.5rem;
    border: 1px solid #e9eef2;
}

.table-container h3 {
    color: #1e3c5c;
    margin-bottom: 1.5rem;
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

th {
    text-align: right;
    padding: 1rem;
    background: #f8fafc;
    color: #1e3c5c;
    font-weight: 700;
    border-bottom: 3px solid #c1904f;
}

td {
    padding: 1rem;
    border-bottom: 1px solid #e9eef2;
    vertical-align: middle;
}

.news-image {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
}

.status-badge {
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

.status-published {
    background: #d1fae5;
    color: #065f46;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.edit-btn {
    background: #e9eef2;
    color: #1e3c5c;
}

.edit-btn:hover {
    background: #c1904f;
    color: white;
}

.delete-btn {
    background: #fee2e2;
    color: #dc2626;
}

.delete-btn:hover {
    background: #dc2626;
    color: white;
}

/* Gallery Management */
.gallery-management {
    background: white;
    border-radius: 25px;
    padding: 1.5rem;
    border: 1px solid #e9eef2;
}

.gallery-management h3 {
    color: #1e3c5c;
    margin-bottom: 1.5rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid #e9eef2;
    position: relative;
    transition: 0.3s;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-color: #c1904f;
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.gallery-item-info {
    padding: 1rem;
    background: white;
}

.gallery-item-info h4 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
    color: #1e3c5c;
}

.gallery-item-info p {
    font-size: 0.8rem;
    color: #64748b;
}

.gallery-actions {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: 0.3s;
}

.gallery-item:hover .gallery-actions {
    opacity: 1;
}

.gallery-btn {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .news-preview-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(100%);
        width: 250px;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-right: 0;
        padding: 1rem;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .mobile-bottom-nav {
        display: flex;
        justify-content: space-around;
    }
    
    .admin-details {
        display: none;
    }
    
    .search-box {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-group.full-width {
        grid-column: span 1;
    }
    
    .top-bar {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .search-box {
        width: 100%;
    }
    
    .admin-profile {
        justify-content: space-between;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button {
        width: 100%;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}
.news-cards-container {
    margin-top: 2rem;
}

.news-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.news-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: 0.3s;
    border: 1px solid #e9eef2;
}

    .news-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(193, 144, 79, 0.1);
        border-color: #c1904f;
    }

    .news-card img {
        width: 100%;
        height: 200px;
        object-fit: cover;
    }

.news-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

    .news-card-content h4 {
        margin: 0;
        font-size: 1.1rem;
        color: #1e3c5c;
    }

.news-category,
.news-date {
    font-size: 0.85rem;
    color: #64748b;
}

.status-badge {
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

.status-published {
    background: #d1fae5;
    color: #065f46;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.action-btn {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.edit-btn {
    background: #e9eef2;
    color: #1e3c5c;
}

    .edit-btn:hover {
        background: #c1904f;
        color: white;
    }

.delete-btn {
    background: #fee2e2;
    color: #dc2626;
}

    .delete-btn:hover {
        background: #dc2626;
        color: white;
    }