/* Admin Panel Styling - Matching Website Theme */

/* Admin Page Layout */
.admin-area {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    padding: 120px 0 60px;
}

/* Admin Cards */
.admin-card {
    background: #fff;
    border-radius: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.admin-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
}

.admin-card-header {
    background: linear-gradient(135deg, #b68834 0%, #a0762e 100%);
    color: #fff;
    padding: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.admin-card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.admin-card-header h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.admin-card-header p {
    font-size: 16px;
    opacity: 0.9;
    margin: 0;
    position: relative;
    z-index: 1;
}

.admin-card-header i {
    margin-right: 10px;
    font-size: 24px;
}

.admin-card-body {
    padding: 40px;
}

/* Login Form Styling */
#login-form .form-group {
    margin-bottom: 25px;
}

#login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#login-form label i {
    margin-right: 8px;
    color: #b68834;
}

#login-form .form-control {
    height: 50px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    padding: 15px 20px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

#login-form .form-control:focus {
    border-color: #b68834;
    box-shadow: 0 0 0 3px rgba(182, 136, 52, 0.1);
    background: #fff;
}

/* Password Input Group */
.password-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-group .form-control {
    padding-right: 50px;
}

.btn-toggle-password {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10;
}

.btn-toggle-password:hover {
    color: #b68834;
    background: rgba(182, 136, 52, 0.1);
}

.btn-toggle-password:focus {
    outline: none;
    color: #b68834;
    background: rgba(182, 136, 52, 0.1);
}

.btn-toggle-password i {
    font-size: 16px;
}

.form-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: space-between;
    margin-top: 30px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.btn-back:hover {
    color: #b68834;
}

.alert {
    border-radius: 15px;
    border: none;
    padding: 15px 20px;
    margin-top: 20px;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
}

/* Admin Panel Styling */
.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    margin-bottom: 30px;
}

.user-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #b68834 0%, #a0762e 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    box-shadow: 0 5px 15px rgba(182, 136, 52, 0.3);
}

.user-details h4 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.user-details p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
}

/* API Section */
.api-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
}

.api-section h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.api-section h3 i {
    margin-right: 10px;
    color: #b68834;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: #fff;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
}

.stat-icon.training {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.stat-icon.sponsor {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

.stat-icon.contact {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

.stat-icon.newsletter {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #333;
}

.stat-info h3 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: #333;
}

.stat-info p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
}

/* Submissions Section */
.submissions-section {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-header h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: #333;
}

.section-header h3 i {
    margin-right: 10px;
    color: #b68834;
}

.filter-controls {
    min-width: 200px;
}

.filter-controls .form-control {
    border-radius: 15px;
    border: 2px solid #e9ecef;
    padding: 10px 15px;
    font-size: 14px;
}

.filter-controls .form-control:focus {
    border-color: #b68834;
    box-shadow: 0 0 0 3px rgba(182, 136, 52, 0.1);
}

/* Submissions Table */
.table-responsive {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.submissions-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.submissions-table th {
    background: linear-gradient(135deg, #b68834 0%, #a0762e 100%);
    color: #fff;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
}

.submissions-table td {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
    vertical-align: middle;
}

.submissions-table tr:hover {
    background: #f8f9fa;
}

.submissions-table tr:last-child td {
    border-bottom: none;
}

/* Type Badges */
.type-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.type-badge i {
    font-size: 10px;
}

.type-badge.type-training {
    background: #e3f2fd;
    color: #1976d2;
}

.type-badge.type-sponsor {
    background: #e8f5e8;
    color: #388e3c;
}

.type-badge.type-contact {
    background: #e0f7fa;
    color: #00838f;
}

.type-badge.type-newsletter {
    background: #fff8e1;
    color: #f57c00;
}

/* States */
.empty-state, .loading-state, .error-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state i, .loading-state i, .error-state i {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h4, .loading-state h4, .error-state h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.empty-state p, .loading-state p, .error-state p {
    margin: 0;
    font-size: 14px;
}

.loading-state i.fa-spinner {
    animation: spin 1s linear infinite;
    color: #b68834;
}

.error-state i {
    color: #dc3545;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Logout Button */
.btn-logout {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-logout:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

/* Hidden Class */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-area {
        padding: 100px 0 40px;
    }
    
    .admin-card-body {
        padding: 25px;
    }
    
    .admin-card-header {
        padding: 25px 20px;
    }
    
    .admin-card-header h2 {
        font-size: 24px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-actions .primary-btn,
    .btn-back {
        width: 100%;
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .stat-info h3 {
        font-size: 24px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-controls {
        width: 100%;
    }
    
    .user-info {
        padding: 20px;
    }
    
    .api-section {
        padding: 20px;
    }
    
    .submissions-section {
        padding: 20px;
    }
    
    .table-responsive {
        font-size: 12px;
    }
    
    .submissions-table th,
    .submissions-table td {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .admin-area {
        padding: 80px 0 30px;
    }
    
    .admin-card-body {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .type-badge {
        font-size: 10px;
        padding: 4px 8px;
    }
    
    .submissions-table th,
    .submissions-table td {
        padding: 8px;
        font-size: 11px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Scrollbar Styling */
.table-responsive::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #b68834;
    border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #a0762e;
}
