/**
 * Admin Panel Specific Styles
 */
.admin-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}
/* Sidebar */
.admin-sidebar {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-right: 3px solid #ffd700;
    padding: 0;
    overflow-y: auto;
}
.sidebar-header {
    padding: 2rem 1.5rem 1rem;
    border-bottom: 2px solid #ffd700;
    text-align: center;
}
.sidebar-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}
.sidebar-header p {
    color: rgba(255, 215, 0, 0.8);
    font-size: 0.875rem;
}
.sidebar-nav {
    padding: 1rem 0;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: rgba(255, 215, 0, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}
.nav-item:hover {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
}
.nav-item.active {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.2);
    border-left-color: #ffd700;
}
.sidebar-footer {
    margin-top: auto;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}
.logout-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #dc3545;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}
.logout-link:hover {
    color: #c82333;
}
/* Main Content */
.admin-main {
    padding: 2rem;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.8);
}
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}
.admin-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}
.admin-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 215, 0, 0.9);
    font-weight: 500;
}
/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    border: 2px solid #ffd700;
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}
.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}
.stat-info h3 {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}
.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}
/* Content Sections */
.content-section {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    border: 2px solid #ffd700;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}
.content-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #ffd700;
}
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.section-header h2 {
    margin-bottom: 0;
}
.view-all-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.3s ease;
}
.view-all-link:hover {
    color: #5a67d8;
}
/* Quick Actions */
.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 0.5rem;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}
.action-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateY(-1px);
}
/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(0, 0, 0, 0.2);
}
.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
.data-table th {
    background: rgba(0, 0, 0, 0.3);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.data-table td {
    color: var(--text-primary);
}
.data-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}
.prize-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.prize-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.spin-details small {
    color: var(--text-secondary);
    font-size: 0.75rem;
}
/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}
.empty-state svg {
    margin-bottom: 1rem;
    opacity: 0.5;
}
.empty-state p {
    font-size: 1.125rem;
    margin: 0;
}
/* Alerts */
.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}
.alert-success {
    background: rgba(81, 207, 102, 0.1);
    color: #51cf66;
    border: 1px solid rgba(81, 207, 102, 0.3);
}
.alert-error {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.3);
}
.alert-warning {
    background: rgba(255, 212, 59, 0.1);
    color: #ffd43b;
    border: 1px solid rgba(255, 212, 59, 0.3);
}
/* Forms */
.admin-form {
    display: grid;
    gap: 1.5rem;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}
.btn-primary {
    background: var(--primary-gradient);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}
.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-secondary:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.4);
}
.btn-danger {
    background: #dc3545;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-danger:hover {
    background: #c82333;
}
/* File Upload */
.file-upload {
    position: relative;
    display: inline-block;
    cursor: pointer;
}
.file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}
.file-upload-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}
.file-upload:hover .file-upload-btn {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.5);
}
/* Color Picker */
.color-input {
    width: 60px;
    height: 40px;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
}
/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}
.pagination a,
.pagination span {
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    text-decoration: none;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}
.pagination a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}
.pagination .current {
    background: var(--primary-gradient);
    color: white;
    border-color: #667eea;
}

/* ================== Responsive Design ================== */
@media (max-width: 768px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }
    .admin-main {
        padding: 1rem;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .quick-actions {
        flex-direction: column;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-actions {
        flex-direction: column;
    }
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}
@media (max-width: 480px) {
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .admin-header h1 {
        font-size: 1.5rem;
    }
    .data-table {
        font-size: 0.875rem;
    }
    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
    }
}

/* ==== Mobile off-canvas sidebar FIX (override) ==== */
@media (max-width: 991px) {
  .admin-layout { grid-template-columns: 1fr !important; }
  .sidebar-toggle { display: inline-flex !important; }

  .admin-sidebar {
    display: block !important;
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    right: 0 !important;
    left: auto !important;
    width: 270px !important;
    max-width: 85vw !important;
    background: rgba(0,0,0,0.92) !important;
    backdrop-filter: blur(6px) !important;
    border-left: 2px solid rgba(255,215,0,.25) !important;
    transform: translateX(110%) !important;
    transition: transform .3s ease !important;
    z-index: 10050 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  body.sidebar-open .admin-sidebar { transform: translateX(0) !important; }

  body.sidebar-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 10000;
  }
  .admin-main { position: relative; z-index: 1; padding: 16px !important; }
  .admin-header { gap: 10px; }
}
.arabic-animated-background { z-index: 0 !important; pointer-events: none !important; }
