/**
 * Admin Dashboard Styles
 * Specific styles for admin dashboard functionality
 */

/* Admin Body */
body.admin-page {
    color: #222;
}

/* Admin Table Styles */
.admin-table-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin-top: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table th,
.admin-table td {
    padding: 15px 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.admin-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

.admin-table td {
    color: #666;
}

/* Admin Action Buttons */
.admin-action-btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-right: 8px;
}

.view-btn {
    background: #667eea;
    color: white;
}

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

.edit-btn {
    background: #28a745;
    color: white;
}

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

.delete-btn {
    background: #dc3545;
    color: white;
}

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

/* Database Wipe Styles (Development) */
.danger-card {
    background: linear-gradient(135deg, #fee5e5 0%, #fecaca 100%);
    border: 2px solid #f87171;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.danger-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(248, 113, 113, 0.3), transparent);
    transition: left 0.5s;
}

.danger-card:hover::before {
    left: 100%;
}

.danger-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f87171;
}

.danger-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #991b1b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.danger-icon {
    font-size: 1.5rem;
    color: #ef4444;
}

.danger-description {
    color: #7f1d1d;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 20px;
    font-weight: 500;
}

.danger-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Wipe Form Styles */
.wipe-form {
    width: 100%;
}

.danger-warning {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    border: 1px solid #f87171;
}

.wipe-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #f87171;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background: white;
    margin-bottom: 15px;
}

.wipe-input:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.wipe-input.valid {
    border-color: #dc2626;
    background: rgba(220, 38, 38, 0.05);
}

.wipe-btn {
    width: 100%;
    padding: 12px 20px;
    background: #9ca3af;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: not-allowed;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.wipe-btn:enabled {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    cursor: pointer;
    animation: dangerPulse 2s infinite;
}

.wipe-btn:enabled:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.3);
    animation: none;
}

.wipe-btn:active {
    transform: translateY(0);
}

.wipe-btn.processing {
    background: #f59e0b;
    cursor: not-allowed;
    animation: spin 1s linear infinite;
}

.wipe-status {
    min-height: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.wipe-status.success {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.wipe-status.error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* Animation for dangerous actions */
@keyframes dangerPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 38, 38, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
    }
}

.wipe-confirmation {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid #f87171;
    border-radius: 6px;
    padding: 10px;
    margin-top: 10px;
    font-size: 0.85rem;
    color: #7f1d1d;
    display: none;
}

.wipe-confirmation.show {
    display: block;
    animation: slideDown 0.3s ease-out;
}

.wipe-warning {
    font-weight: 600;
    color: #991b1b;
    text-align: center;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

/* Debug Card Styles */
.debug-card {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px solid #29b6f6;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.debug-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(41, 182, 246, 0.3), transparent);
    transition: left 0.5s;
}

.debug-card:hover::before {
    left: 100%;
}

.debug-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #29b6f6;
}

.debug-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0277bd;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.debug-icon {
    font-size: 1.5rem;
    color: #29b6f6;
}

/* Debug Status Notifications */
.debug-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: linear-gradient(135deg, #29b6f6 0%, #0288d1 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 1002;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(41, 182, 246, 0.3);
}

.debug-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.debug-notification::before {
    content: "🔧 ";
}

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

.admin-stat-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

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

.admin-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 8px;
}

.admin-stat-label {
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

.admin-stat-change {
    font-size: 0.8rem;
    margin-top: 5px;
}

.admin-stat-change.positive {
    color: #28a745;
}

.admin-stat-change.negative {
    color: #dc3545;
}

.admin-stat-change.neutral {
    color: #6c757d;
}

/* Admin Dashboard Sections */
.admin-section {
    margin-bottom: 40px;
}

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

.admin-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #495057;
    margin: 0;
}

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

.admin-filter-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-filter-btn:hover,
.admin-filter-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Quick Actions Panel */
.quick-actions {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border: 2px solid #ffb74d;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.quick-actions-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.quick-actions-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #e65100;
    margin: 0;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.quick-action-btn {
    background: white;
    border: 1px solid #ffb74d;
    color: #e65100;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 0.9rem;
}

.quick-action-btn:hover {
    background: #ffb74d;
    color: white;
    transform: translateY(-2px);
}

/* Admin Dashboard Empty States */
.admin-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.admin-empty-state-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.admin-empty-state-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
}

.admin-empty-state-description {
    font-size: 1rem;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
}

/* System Status Indicators */
.system-status {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-indicator.online {
    background: #28a745;
}

.status-indicator.warning {
    background: #ffc107;
}

.status-indicator.offline {
    background: #dc3545;
}

.status-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #495057;
}
