/* Admin Specific CSS Extending style.css */

.admin-body {
    background-color: var(--bg-light);
    overflow-x: hidden;
}

/* Auth Section */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-image: linear-gradient(135deg, var(--bg-light) 0%, #e2e8f0 100%);
}

.auth-card {
    background: white;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.w-100 {
    width: 100%;
}

.error-text {
    color: #e53e3e;
    font-size: 0.9rem;
    margin-top: 10px;
    text-align: center;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    border-top: 1px solid #edf2f7;
    padding-top: 20px;
}

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

.sidebar {
    width: 280px;
    background-color: var(--bg-dark);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
}

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

.sidebar-header h2 {
    font-size: 1.2rem;
    margin: 0;
    color: white;
}

.badge {
    background-color: var(--primary-color);
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 700;
}

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

.sidebar-menu li {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: #a0aec0;
    border-left: 3px solid transparent;
}

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

.sidebar-menu li.active {
    background-color: rgba(46, 125, 50, 0.2);
    color: white;
    border-left-color: var(--primary-color);
}

.sidebar-menu i {
    width: 20px;
    text-align: center;
}

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

.main-content {
    flex-grow: 1;
    margin-left: 280px;
    padding: 0;
}

.dashboard-header {
    background: white;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 90;
}

.dashboard-header h1 {
    font-size: 1.5rem;
    margin: 0;
}

.dashboard-body {
    padding: 40px;
}

.panel-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

/* Tables */
.table-responsive {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

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

.admin-table th,
.admin-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid #edf2f7;
}

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

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

.table-img {
    width: 60px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
    background-color: #eee;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-muted);
    padding: 5px;
    transition: color 0.2s;
}

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

.action-btn.delete:hover {
    color: #e53e3e;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

#media-modal {
    z-index: 1100;
    /* Ensure the image selector stays above other modals */
}

.modal-content {
    background-color: #fefefe;
    padding: 30px;
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 500px;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close-modal:hover {
    color: black;
}

.modal-content h2 {
    margin-bottom: 25px;
    font-size: 1.5rem;
    border-bottom: 1px solid #edf2f7;
    padding-bottom: 15px;
}

/* Admin Responsive */
@media (max-width: 768px) {
    .dashboard-wrapper {
        flex-direction: column;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        flex-direction: column;
    }

    .sidebar-menu {
        display: flex;
        flex-wrap: wrap;
        padding: 10px;
    }

    .sidebar-menu li {
        padding: 10px;
        flex: 1 1 50%;
        border-left: none;
        border-bottom: 3px solid transparent;
        justify-content: center;
        text-align: center;
    }

    .sidebar-menu li.active {
        border-left: none;
        border-bottom-color: var(--primary-color);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .dashboard-header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .dashboard-body {
        padding: 15px;
    }

    .panel-actions {
        justify-content: center;
    }
}