/* 
 * EventPro - Custom Styles
 * نظام إدارة الفعاليات - التصاميم المخصصة
 */

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: #f8f9fa;
    direction: rtl;
    text-align: right;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Navbar Styles */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
}

.navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255,255,255,.1);
    border-radius: 4px;
}

.dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,.1);
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,.08);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    transform: translateY(-2px);
}

.card-header {
    background-color: #fff;
    border-bottom: 2px solid #f0f0f0;
    font-weight: 600;
    padding: 1rem 1.25rem;
}

.card-body {
    padding: 1.5rem;
}

/* Stats Cards */
.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.stat-card.primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
}

.stat-card.success {
    background: linear-gradient(135deg, #198754 0%, #146c43 100%);
}

.stat-card.warning {
    background: linear-gradient(135deg, #ffc107 0%, #f59f00 100%);
}

.stat-card.danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.stat-card.info {
    background: linear-gradient(135deg, #0dcaf0 0%, #0aa2c0 100%);
}

.stat-card .stat-icon {
    font-size: 2.5rem;
    opacity: 0.3;
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.stat-card .stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Tables */
.table {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    padding: 1rem;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Badges */
.badge {
    padding: 0.5em 0.8em;
    font-weight: 600;
    border-radius: 6px;
}

/* Buttons */
.btn {
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,.15);
}

.btn-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, #198754 0%, #146c43 100%);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 0.625rem 0.875rem;
}

.form-control:focus, .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13,110,253,.25);
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #495057;
}

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

.login-card {
    max-width: 450px;
    width: 100%;
}

.login-card .card-body {
    padding: 2.5rem;
}

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

.login-logo i {
    font-size: 4rem;
    color: #0d6efd;
}

.login-logo h3 {
    margin-top: 1rem;
    color: #333;
}

/* Dashboard */
.dashboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    margin-bottom: 0.5rem;
}

.dashboard-header p {
    opacity: 0.9;
    margin-bottom: 0;
}

/* Event Card */
.event-card {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.event-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.event-card-body {
    padding: 1.5rem;
}

.event-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.event-card-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    color: #6c757d;
    font-size: 0.9rem;
}

.event-card-meta i {
    margin-left: 0.25rem;
}

/* Badge Design */
.badge-preview {
    border: 2px dashed #dee2e6;
    padding: 2rem;
    text-align: center;
    border-radius: 12px;
    background-color: white;
}

.badge-template {
    width: 400px;
    height: 250px;
    margin: 0 auto;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Certificate Design */
.certificate-preview {
    border: 2px solid #dee2e6;
    padding: 2rem;
    border-radius: 12px;
    background-color: white;
    text-align: center;
}

.certificate-template {
    width: 800px;
    height: 600px;
    margin: 0 auto;
    border: 10px double #0d6efd;
    padding: 2rem;
    position: relative;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZGVmcz48cGF0dGVybiBpZD0iZ3JpZCIgd2lkdGg9IjEwMCIgaGVpZ2h0PSIxMDAiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiPjxwYXRoIGQ9Ik0gMTAwIDAgTCAwIDAgMCAxMDAiIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2Y4ZjlmYSIgc3Ryb2tlLXdpZHRoPSIxIi8+PC9wYXR0ZXJuPjwvZGVmcz48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2dyaWQpIi8+PC9zdmc+');
}

/* QR Code */
.qr-code-container {
    text-align: center;
    padding: 1rem;
}

.qr-code-container img {
    max-width: 200px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 0.5rem;
    background-color: white;
}

/* Notifications */
.notification-item {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.notification-item:hover {
    background-color: #f8f9fa;
}

.notification-item.unread {
    background-color: #e7f3ff;
}

.notification-item.unread:hover {
    background-color: #d0e7ff;
}

/* Pagination */
.pagination {
    margin-top: 2rem;
}

.page-link {
    color: #0d6efd;
    border-radius: 6px;
    margin: 0 0.25rem;
}

.page-link:hover {
    background-color: #e7f3ff;
}

.page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Footer */
footer {
    border-top: 1px solid #dee2e6;
}

/* Responsive */
@media (max-width: 768px) {
    .stat-card {
        margin-bottom: 1rem;
    }
    
    .event-card-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .certificate-template {
        width: 100%;
        height: auto;
    }
    
    .badge-template {
        width: 100%;
        height: auto;
    }
}

/* Print Styles */
@media print {
    .navbar, .btn, footer {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-approved {
    background-color: #d1e7dd;
    color: #0f5132;
}

.status-rejected {
    background-color: #f8d7da;
    color: #842029;
}

.status-active {
    background-color: #d1e7dd;
    color: #0f5132;
}

.status-inactive {
    background-color: #e2e3e5;
    color: #41464b;
}

/* File Upload */
.file-upload-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.file-upload-wrapper input[type=file] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.file-upload-button {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background-color: #0d6efd;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-button:hover {
    background-color: #0a58ca;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}
