/* Admin-specific styles with multilingual support */

.admin-body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    font-family: var(--font-family-ar);
}

html[lang="en"] .admin-body {
    font-family: var(--font-family-en);
}

/* Login Screen */
.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

.login-screen::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="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.login-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 1;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    height: 60px;
    margin-bottom: 1rem;
}

.login-header h1 {
    color: var(--text-primary);
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin: 0;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.login-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 1rem;
    border-radius: var(--border-radius);
    font-size: var(--font-size-lg);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.login-error {
    color: var(--error-color);
    text-align: center;
    font-size: var(--font-size-sm);
    margin-top: 1rem;
    display: none;
}

.login-error.show {
    display: block;
}

.language-selector-container {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* Admin Dashboard */
.admin-dashboard {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    box-shadow: var(--shadow);
}

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

.nav-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-logo {
    height: 40px;
}

.nav-left h1 {
    color: var(--text-primary);
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin: 0;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-email {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--error-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: var(--font-size-sm);
}

.logout-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* Main Content */
.admin-main {
    flex: 1;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 2rem 20px;
    width: 100%;
}

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

.stat-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
    border-left: 4px solid var(--primary-color);
}

html[dir="rtl"] .stat-card {
    border-left: none;
    border-right: 4px solid var(--primary-color);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-card.pending {
    border-left-color: var(--warning-color);
}

html[dir="rtl"] .stat-card.pending {
    border-right-color: var(--warning-color);
}

.stat-card.approved {
    border-left-color: var(--success-color);
}

html[dir="rtl"] .stat-card.approved {
    border-right-color: var(--success-color);
}

.stat-card.rejected {
    border-left-color: var(--error-color);
}

html[dir="rtl"] .stat-card.rejected {
    border-right-color: var(--error-color);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    background: var(--primary-color);
}

.stat-card.pending .stat-icon {
    background: var(--warning-color);
}

.stat-card.approved .stat-icon {
    background: var(--success-color);
}

.stat-card.rejected .stat-icon {
    background: var(--error-color);
}

.stat-content h3 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
}

.stat-content p {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin: 0;
}

/* Admin Controls */
.admin-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-secondary);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.action-controls {
    display: flex;
    gap: 0.5rem;
}

.refresh-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: var(--font-size-sm);
}

.refresh-btn:hover {
    background: #0891b2;
    transform: translateY(-1px);
}

/* Table Container */
.table-container {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.table-container h2 {
    padding: 1.5rem;
    margin: 0;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: var(--font-size-xl);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

.table-wrapper {
    position: relative;
    overflow-x: auto;
}

.requests-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-sm);
}

.requests-table th,
.requests-table td {
    padding: 1rem;
    text-align: right;
    border-bottom: 1px solid var(--border-color);
}

html[dir="ltr"] .requests-table th,
html[dir="ltr"] .requests-table td {
    text-align: left;
}

.requests-table th {
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.requests-table tbody tr {
    transition: var(--transition);
}

.requests-table tbody tr:hover {
    background: var(--bg-secondary);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.status-badge.approved {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.status-badge.rejected {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: var(--font-size-xs);
    font-weight: 500;
    text-decoration: none;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: var(--font-size-xs);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--error-color);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-secondary {
    background: var(--text-light);
    color: white;
}

.btn-secondary:hover {
    background: var(--text-secondary);
}

.btn:hover {
    transform: translateY(-1px);
}

.table-loading {
    text-align: center;
    padding: 3rem;
}

.no-requests {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.no-requests i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

.modal-content.small {
    max-width: 400px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: var(--font-size-lg);
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
    padding: 0.25rem;
    border-radius: 50%;
}

.modal-close:hover {
    color: var(--error-color);
    background: rgba(239, 68, 68, 0.1);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

html[dir="rtl"] .modal-footer {
    justify-content: flex-start;
}

.request-details {
    display: grid;
    gap: 1rem;
}

.detail-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.detail-value {
    color: var(--text-primary);
    font-size: var(--font-size-base);
}

.detail-value.email {
    font-family: monospace;
    background: var(--bg-secondary);
    padding: 0.5rem;
    border-radius: var(--border-radius);
}

/* Animations */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-nav {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .nav-left,
    .nav-right {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .admin-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-controls {
        justify-content: center;
    }
    
    .action-controls {
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .requests-table {
        font-size: var(--font-size-xs);
    }
    
    .requests-table th,
    .requests-table td {
        padding: 0.5rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .login-container {
        margin: 1rem;
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .admin-main {
        padding: 1rem 15px;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .table-container h2 {
        padding: 1rem;
        font-size: var(--font-size-lg);
    }
    
    .requests-table th,
    .requests-table td {
        padding: 0.25rem;
    }
    
    .login-container {
        padding: 1.5rem;
    }
}

