/* Admin Panel Styles */

/* Login Page Styles */
.login-container {
    min-height: 100vh;
    background: linear-gradient(rgba(60, 10, 10, 0.7), rgba(10, 0, 0, 0.9)), url('../images/hero-bg.jpg') center/cover no-repeat fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-box {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    width: 100%;
    max-width: 450px;
    padding: 50px 40px;
    position: relative;
    overflow: hidden;
    color: #fff;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-box::before {
    display: none;
}

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-header .logo {
    margin-bottom: 25px;
}

.login-header .logo img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 5px;
    border: 3px solid rgba(255, 152, 0, 0.8);
    box-shadow: 0 0 20px rgba(255, 152, 0, 0.4);
    background: #fff;
    padding: 2px;
}

.login-header h2 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 32px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    letter-spacing: 1px;
}

.login-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    font-weight: 300;
}

.login-form .form-group {
    margin-bottom: 25px;
}

.login-form label {
    display: block;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    transition: color 0.3s;
}

.login-form input:focus + i, 
.login-form input:not(:placeholder-shown) + i {
    color: #ff9800;
}

.login-form input {
    width: 100%;
    padding: 16px 16px 16px 50px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 16px;
    color: #fff;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.login-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.login-form input:focus {
    outline: none;
    border-color: #ff9800;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 15px rgba(255, 152, 0, 0.3), inset 0 2px 4px rgba(0,0,0,0.1);
}

.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Poppins', sans-serif;
    margin-top: 10px;
    box-shadow: 0 10px 20px rgba(245, 124, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(245, 124, 0, 0.5);
    background: linear-gradient(135deg, #f57c00, #e65100);
}

.login-footer {
    text-align: center;
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.login-footer p {
    margin: 0;
}

.login-footer p a {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.05);
}

.login-footer p a:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(-3px);
}

/* Fix error message display */
.login-error {
    background: rgba(220, 53, 69, 0.15);
    border-left: 4px solid #dc3545;
    color: #ffd2d6;
    padding: 12px 15px;
    border-radius: 8px;
    text-align: left;
    margin-bottom: 25px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Dashboard Styles */
body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: #f5f5f5;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    width: 250px;
    height: 100vh;
    background: #333;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 3px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #444;
}

.sidebar-header .logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sidebar-header .logo img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.sidebar-header h3 {
    color: white;
    font-size: 18px;
    margin: 0;
}

.sidebar-menu {
    padding: 20px 0;
    overflow-y: auto;
    flex: 1;
}

.sidebar-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    color: #ccc;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 15px;
}

.menu-item:hover,
.menu-item.active {
    background: #8B0000;
    color: white;
    border-left: 4px solid #6a0000;
}

.menu-item i {
    width: 20px;
    text-align: center;
    font-size: 18px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #444;
}

.logout-btn {
    width: 100%;
    padding: 12px;
    background: #8B0000;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #6a0000;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    min-height: 100vh;
    transition: all 0.3s ease;
}

.admin-header {
    background: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 999;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: #333;
    cursor: pointer;
    margin-right: 20px;
    display: none;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-left h1 {
    color: #333;
    margin: 0;
    font-size: 24px;
}

.header-right .user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info span {
    color: #666;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: #8B0000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

/* Content Area */
.content {
    padding: 30px;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.page-header h2 {
    color: #333;
    margin: 0;
    font-size: 28px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: #8B0000;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.stat-info h3 {
    font-size: 28px;
    color: #333;
    margin: 0 0 5px 0;
}

.stat-info p {
    color: #666;
    margin: 0;
    font-size: 14px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.recent-activity,
.quick-actions {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.recent-activity h3,
.quick-actions h3 {
    margin-top: 0;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.activity-list {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    background: #8B0000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    min-width: 40px;
}

.activity-content h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 16px;
}

.activity-content p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.activity-time {
    color: #888;
    font-size: 12px;
    margin-top: 5px;
}

.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.action-btn {
    padding: 15px;
    background: #f8f8f8;
    border: 2px solid #eee;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.action-btn:hover {
    background: #8B0000;
    color: white;
    border-color: #8B0000;
    transform: translateY(-3px);
}

.action-btn i {
    font-size: 24px;
}

.action-btn span {
    font-size: 14px;
    font-weight: 500;
}

/* Buttons */
.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: #8B0000;
    color: white;
}

.btn-primary:hover {
    background: #6a0000;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-sm {
    padding: 8px 15px;
    font-size: 14px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #8B0000;
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Lists */
.services-list,
.events-list,
.gallery-management,
.donations-list,
.seva-list,
.messages-list {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.list-item {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.list-item:last-child {
    border-bottom: none;
}

.item-info {
    flex: 1;
    min-width: 200px;
}

.item-info h4 {
    margin: 0 0 5px 0;
    color: #333;
}

.item-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.item-actions {
    display: flex;
    gap: 10px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.close-modal {
    font-size: 24px;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

/* Settings */
.settings-content {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.settings-section {
    margin-bottom: 30px;
}

.settings-section h3 {
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

/* Responsive Design */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .login-box {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .content {
        padding: 20px 15px;
    }
    
    .admin-header {
        padding: 15px 20px;
    }
    
    .item-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 576px) {
    .login-header h2 {
        font-size: 24px;
    }
    
    .stat-info h3 {
        font-size: 24px;
    }
    
    .action-btn {
        padding: 12px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.fade-in.show {
    opacity: 1;
    transform: translateY(0);
}

.slide-in {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s ease;
}

.slide-in.show {
    opacity: 1;
    transform: translateX(0);
}

/* Loading States */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #8B0000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}