/* Admin Panel Styles */

@import url('style.css');

/* Login Page */
.login-page {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 10px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.login-title {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.login-footer a {
    color: var(--secondary-color);
    text-decoration: none;
}

/* Admin Layout */
.admin-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.admin-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-logo a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
}

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-user {
    font-weight: 500;
}

.admin-container {
    display: flex;
    min-height: calc(100vh - 70px);
}

.admin-sidebar {
    width: 260px;
    background-color: var(--light-bg);
    border-right: 1px solid var(--border-color);
    padding: 2rem 0;
}

.admin-nav {
    display: flex;
    flex-direction: column;
}

.nav-section {
    padding: 1rem 1.5rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 1px;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.admin-nav-link:hover {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--secondary-color);
}

.admin-nav-link.active {
    background-color: var(--secondary-color);
    color: white;
}

.nav-icon {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.admin-main {
    flex: 1;
    padding: 2rem;
    overflow-x: auto;
}

/* Page Header */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    font-size: 3rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.dashboard-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.dashboard-card h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.action-btn {
    display: block;
    padding: 0.8rem;
    background-color: var(--light-bg);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 5px;
    transition: var(--transition);
    text-align: center;
}

.action-btn:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* Tables */
.table-container {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background-color: var(--light-bg);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.data-table tr:hover {
    background-color: var(--light-bg);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-success {
    background-color: #d4edda;
    color: #155724;
}

.badge-warning {
    background-color: #fff3cd;
    color: #856404;
}

.badge-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.badge-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Button Sizes */
.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* Utility Classes */
.text-muted {
    color: #6c757d;
}

.text-right {
    text-align: right;
}

/* Website Sections Editor */
.sections-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.section-card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.section-header h3 {
    margin: 0;
    color: var(--primary-color);
    text-transform: uppercase;
    font-size: 1.1rem;
}

.section-form .form-group {
    margin-bottom: 1.5rem;
}

.section-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.section-form .form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
}

.section-form textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.section-form .form-text {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal !important;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 0.5rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Photo Gallery Manager */
.gallery-upload-card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.gallery-upload-card h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.gallery-upload-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.gallery-images-section {
    margin-top: 2rem;
}

.gallery-images-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.gallery-item:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.gallery-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-image .badge {
    position: absolute;
    top: 10px;
    right: 10px;
}

.gallery-details {
    padding: 1rem;
}

.gallery-edit-form .form-group {
    margin-bottom: 0.8rem;
}

.form-control-sm {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 0.9rem;
}

.checkbox-label-sm {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    cursor: pointer;
}

.checkbox-label-sm input[type="checkbox"] {
    margin-right: 0.5rem;
}

.gallery-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.gallery-delete-form {
    margin-top: 0.5rem;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* Classes Management */
.table-container {
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background-color: var(--primary-color);
    color: white;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tbody tr:hover {
    background-color: #f8f9fa;
}

.data-table td {
    font-size: 0.95rem;
}

.data-table td code {
    background-color: #e9ecef;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
}

.badge {
    display: inline-block;
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 5px;
    text-transform: uppercase;
}

.badge-success {
    background-color: #28a745;
    color: white;
}

.badge-danger {
    background-color: #dc3545;
    color: white;
}

/* 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);
}

.modal-content {
    background-color: white;
    margin: 2rem auto;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.3);
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-close {
    color: #aaa;
    float: right;
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
}

.modal-close:hover {
    color: #000;
}

.modal-content h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    clear: both;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-container {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
