/* css/admin.css */

.admin-body {
    background-color: #f0f4f8;
    margin: 0;
    height: 100vh;
    overflow: hidden;
}

.admin-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 86, 179, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.admin-modal.active {
    opacity: 1;
    visibility: visible;
}

.admin-modal-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.admin-modal-content.login-content {
    transform: translateY(-20px);
}

.admin-layout {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: 260px;
    background-color: var(--primary-blue-dark);
    color: white;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: relative;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: center;
}

.sidebar-nav {
    padding: 20px 0;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 25px;
    color: rgba(255,255,255,0.7);
    transition: all 0.2s;
    font-weight: 500;
}

.nav-item i {
    font-size: 1.2rem;
}

.nav-item:hover, .nav-item.active {
    color: white;
    background-color: rgba(255,255,255,0.1);
    border-left: 4px solid var(--brand-red);
}

.badge {
    background: var(--brand-red);
    color: white;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
}

/* Main Content */
.admin-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.admin-header {
    height: 70px;
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    z-index: 10;
}

.admin-header h2 {
    font-size: 1.3rem;
    color: var(--text-main);
    margin: 0;
}

.admin-content {
    flex-grow: 1;
    padding: 30px;
    overflow-y: auto;
}

.view-panel {
    display: none;
    animation: fadeIn 0.3s;
}

.view-panel.active {
    display: block;
}

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

/* Stats */
.stat-card {
    background: white;
    border-radius: 8px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
}

.stat-info h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0 0 5px 0;
    font-weight: 600;
}

.stat-info h2 {
    font-size: 2rem;
    margin: 0;
    color: var(--text-main);
}

/* Tables */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th, .admin-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.admin-table tr:hover {
    background-color: #f8fafc;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-pending { background: #fff3cd; color: #856404; }
.status-read { background: #d4edda; color: #155724; }

.service-edit-row {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.service-edit-row img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.service-actions {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

/* Edit Modal */
.modal-lg {
    max-width: 600px;
}

.upload-box {
    border: 2px dashed var(--border-color);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    background: #f8fafc;
    margin-bottom: 15px;
}

.upload-box img {
    max-height: 100px;
    margin-top: 10px;
    border-radius: 4px;
    display: none;
}

/* Admin Responsive Layout */
.mobile-sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
}

@media (max-width: 992px) {
    .admin-layout {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        height: auto;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 10px 20px;
        position: fixed;
        bottom: 0;
        z-index: 1000;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    }
    
    .sidebar-header, #logoutBtn {
        display: none;
    }
    
    .sidebar-nav {
        display: flex;
        flex-direction: row;
        width: 100%;
        justify-content: space-around;
        padding: 0;
    }
    
    .nav-item {
        flex-direction: column;
        padding: 10px;
        font-size: 0.75rem;
        gap: 5px;
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    
    .nav-item:hover, .nav-item.active {
        border-left: none;
        border-bottom: 3px solid var(--brand-red);
    }
    
    .admin-main {
        margin-bottom: 60px; /* Space for bottom nav */
    }
    
    .admin-table {
        display: block;
        overflow-x: auto;
    }
    
    .service-edit-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .service-actions {
        margin-left: 0;
        width: 100%;
        justify-content: space-between;
    }
}
