/* Admin Panel Styles */

/* Admin Body */
.admin-body {
    background: #f5f5f5;
    margin: 0;
    padding-top: 70px;
}

.admin-login-body {
    background: linear-gradient(135deg, var(--primary-yellow) 0%, var(--primary-green) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Admin Navigation */
.admin-nav {
    background: var(--text-dark);
    color: var(--text-light);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.admin-nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    height: 70px;
}

.admin-logo a {
    display: flex;
    align-items: center;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
}

.admin-logo i {
    margin-right: 10px;
    color: var(--primary-yellow);
    font-size: 1.5rem;
}

.admin-menu {
    display: flex;
    list-style: none;
    gap: 0;
    margin: 0;
    padding: 0;
}

.admin-menu a {
    display: flex;
    align-items: center;
    color: var(--text-light);
    text-decoration: none;
    padding: 25px 20px;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.admin-menu a:hover,
.admin-menu a.active {
    background: rgba(255, 255, 255, 0.1);
    border-bottom-color: var(--primary-yellow);
}

.admin-menu i {
    margin-right: 8px;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    color: var(--text-light);
    font-weight: 500;
}

.user-info i {
    margin-right: 8px;
    color: var(--primary-yellow);
}

.user-actions {
    display: flex;
    gap: 10px;
}

.user-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.user-action:hover {
    background: var(--primary-yellow);
    color: var(--text-dark);
}

.mobile-menu-toggle {
    display: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Admin Messages */
.admin-messages {
    margin-top: 20px;
    margin-bottom: 20px;
}

.admin-messages .alert {
    max-width: 1400px;
    margin: 0 auto 10px;
    padding: 15px 20px;
    border-radius: 8px;
    font-weight: 500;
}

.alert-error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
}

.alert-success {
    background: #efe;
    border: 1px solid #cfc;
    color: #3c3;
}

/* Admin Main Content */
.admin-main {
    min-height: calc(100vh - 120px);
    padding: 20px;
}

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
}

.admin-header {
    background: var(--text-light);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.admin-header h1 {
    color: var(--text-dark);
    margin-bottom: 10px;
    font-size: 2.5rem;
}

.admin-header p {
    color: #666;
    font-size: 1.1rem;
}

/* Statistics Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--text-light);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    position: relative;
}

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

.stat-card.urgent {
    border-left: 5px solid #ff4757;
    background: linear-gradient(135deg, #fff 0%, #ffe8e8 100%);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--text-light);
    background: linear-gradient(135deg, var(--primary-green), var(--primary-yellow));
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.stat-info p {
    color: #666;
    font-weight: 500;
}

.stat-link {
    position: absolute;
    top: 15px;
    right: 15px;
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.stat-link:hover {
    color: var(--dark-green);
}

/* Activity Section */
.activity-section {
    margin-bottom: 30px;
}

.activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.activity-card {
    background: var(--text-light);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.activity-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-yellow) 0%, var(--primary-green) 100%);
    color: var(--text-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.activity-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.view-all {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.view-all:hover {
    opacity: 1;
}

.activity-list {
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-info strong {
    color: var(--text-dark);
    font-weight: 600;
}

.activity-detail {
    color: #666;
    font-size: 0.9rem;
    margin-left: 10px;
}

.activity-time {
    color: #999;
    font-size: 0.85rem;
}

.no-activity {
    padding: 40px 20px;
    text-align: center;
    color: #999;
}

/* Quick Actions */
.quick-actions {
    background: var(--text-light);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.quick-actions h3 {
    color: var(--text-dark);
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.action-btn {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, var(--primary-green), var(--primary-yellow));
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(50, 205, 50, 0.3);
}

.action-btn i {
    margin-right: 10px;
}

/* Login Styles */
.login-container {
    max-width: 400px;
    width: 100%;
}

.login-card {
    background: var(--text-light);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, var(--primary-yellow) 0%, var(--primary-green) 100%);
    padding: 30px;
    text-align: center;
    color: var(--text-dark);
}

.login-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.login-logo p {
    font-size: 1rem;
    opacity: 0.8;
}

.login-form {
    padding: 30px;
}

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

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

.login-form input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-green);
}

.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--primary-green), var(--primary-yellow));
    color: var(--text-dark);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(50, 205, 50, 0.3);
}

.login-footer {
    padding: 20px 30px;
    background: #f8f9fa;
    text-align: center;
    color: #666;
}

.login-footer p {
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.back-to-site {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.back-to-site:hover {
    color: var(--dark-green);
}

/* Admin Footer */
.admin-footer {
    background: var(--text-dark);
    color: var(--text-light);
    padding: 20px;
    margin-top: 50px;
}

.admin-footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.admin-footer-links {
    display: flex;
    gap: 20px;
}

.admin-footer-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.admin-footer-links a:hover {
    color: var(--primary-yellow);
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-nav-container {
        padding: 0 15px;
    }
    
    .admin-menu {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--text-dark);
        flex-direction: column;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }
    
    .admin-menu.active {
        display: flex;
    }
    
    .admin-menu a {
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .user-info span {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .activity-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .admin-footer-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .admin-main {
        padding: 15px;
    }
    
    .admin-header {
        padding: 20px;
    }
    
    .admin-header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .login-container {
        margin: 0 15px;
    }
    
    .login-header {
        padding: 20px;
    }
    
    .login-form {
        padding: 20px;
    }
    
    .activity-grid {
        grid-template-columns: 1fr;
    }
    
    .activity-card {
        margin: 0 -5px;
    }
}

/* Enhanced Admin Tables */
.admin-table {
    width: 100%;
    background: var(--text-light);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-collapse: collapse;
    margin-bottom: 30px;
}

.admin-table thead {
    background: linear-gradient(135deg, var(--primary-yellow) 0%, var(--primary-green) 100%);
}

.admin-table th {
    padding: 20px 15px;
    color: var(--text-dark);
    font-weight: 700;
    text-align: left;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table td {
    padding: 18px 15px;
    border-bottom: 1px solid #f0f0f0;
    color: var(--text-dark);
    font-size: 0.95rem;
    vertical-align: middle;
}

.admin-table tbody tr:hover {
    background: rgba(50, 205, 50, 0.05);
    transform: scale(1.01);
    transition: all 0.3s ease;
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

/* Enhanced Admin Forms */
.admin-form {
    background: var(--text-light);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.admin-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.admin-form .form-group {
    margin-bottom: 25px;
}

.admin-form label {
    display: block;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafafa;
    font-family: inherit;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
    outline: none;
    border-color: var(--primary-green);
    background: var(--text-light);
    box-shadow: 0 0 0 3px rgba(50, 205, 50, 0.1);
}

.admin-form textarea {
    min-height: 120px;
    resize: vertical;
}

.admin-form .form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #f0f0f0;
}

/* Enhanced Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-yellow));
    color: var(--text-dark);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(50, 205, 50, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: var(--text-light);
}

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

.btn-danger {
    background: #dc3545;
    color: var(--text-light);
}

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

.btn-success {
    background: var(--primary-green);
    color: var(--text-light);
}

.btn-success:hover {
    background: var(--dark-green);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* Action Buttons in Tables */
.table-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.table-actions .btn {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* Status Badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.active {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.status-badge.inactive {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.status-badge.published {
    background: rgba(50, 205, 50, 0.1);
    color: var(--primary-green);
}

.status-badge.draft {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

/* Enhanced Cards */
.admin-card {
    background: var(--text-light);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.admin-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.admin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.admin-card-header h3 {
    color: var(--text-dark);
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
}

.admin-card-body {
    color: var(--text-dark);
    line-height: 1.6;
}

/* Enhanced Alerts */
.alert {
    padding: 18px 24px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-error {
    background: rgba(220, 53, 69, 0.1);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-info {
    background: rgba(23, 162, 184, 0.1);
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

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

.pagination a,
.pagination span {
    padding: 10px 15px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-dark);
    background: var(--text-light);
    border: 2px solid #e8e8e8;
    transition: all 0.3s ease;
}

.pagination a:hover,
.pagination .current {
    background: var(--primary-green);
    color: var(--text-light);
    border-color: var(--primary-green);
    transform: translateY(-2px);
}

/* Loading States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
