.admin-login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.admin-login-box {
    max-width: 450px;
    width: 100%;
    padding: 50px 40px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(91, 44, 111, 0.3);
}

.admin-login-box h1 {
    text-align: center;
    margin-bottom: 40px;
    color: #5B2C6F;
    font-size: 26px;
    font-weight: 700;
}

.admin-login-box .form-group {
    margin-bottom: 25px;
}

.admin-login-box label {
    display: block;
    margin-bottom: 8px;
    color: #5B2C6F;
    font-weight: 600;
    font-size: 14px;
}

.admin-login-box input[type="email"],
.admin-login-box input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s;
    background-color: white;
}

.admin-login-box input[type="email"]:focus,
.admin-login-box input[type="password"]:focus {
    outline: none;
    border-color: #FF6B4A;
    box-shadow: 0 0 0 4px rgba(255, 107, 74, 0.1);
}

.admin-login-box .error-message {
    display: block;
    text-align: center;
    margin-bottom: 15px;
    min-height: 20px;
}

.admin-login-box .submit-btn {
    width: 100%;
    margin-top: 10px;
}

.admin-container {
    min-height: 100vh;
    background: #f5f5f5;
}

.admin-header {
    background: linear-gradient(135deg, #5B2C6F 0%, #7B3E8E 50%, #FF6B4A 100%);
    color: white;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.admin-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: white;
}

.header-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.admin-header .secondary-btn,
.admin-header a.secondary-btn {
    background: white;
    color: #5B2C6F;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.admin-header .secondary-btn:hover,
.admin-header a.secondary-btn:hover {
    background: #f0f0f0;
}

.admin-nav {
    background: white;
    padding: 0 40px;
    display: flex;
    gap: 10px;
    border-bottom: 2px solid #e0e0e0;
    overflow-x: auto;
}

.nav-btn {
    padding: 15px 25px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.nav-btn:hover {
    color: #5B2C6F;
    background: #f9f9f9;
}

.nav-btn.active {
    color: #5B2C6F;
    border-bottom-color: #FF6B4A;
}

.admin-content {
    padding: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.admin-section {
    display: none;
    animation: fadeIn 0.3s;
}

.admin-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
}

.section-header h2 {
    color: #5B2C6F;
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.section-header select {
    min-width: 250px;
}

.filters-container {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filters-container input,
.filters-container select {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
}

.table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead {
    background: #5B2C6F;
    color: white;
}

.admin-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.admin-table tbody tr:hover {
    background: #f9f9f9;
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.active {
    background: #4CAF50;
    color: white;
}

.status-badge.inactive {
    background: #999;
    color: white;
}

.status-badge.completed {
    background: #2196F3;
    color: white;
}

.action-btn {
    padding: 6px 12px;
    margin: 0 3px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Montserrat', sans-serif;
}

.action-btn.view {
    background: #2196F3;
    color: white;
}

.action-btn.edit {
    background: #FF9800;
    color: white;
}

.action-btn.delete {
    background: #F44336;
    color: white;
}

.action-btn.activate {
    background: #4CAF50;
    color: white;
}

.action-btn.draw {
    background: #9C27B0;
    color: white;
}

.action-btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.pagination span {
    color: #666;
    font-weight: 600;
}

.locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.location-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.location-card h3 {
    color: #5B2C6F;
    font-size: 20px;
    margin-bottom: 20px;
}

.location-card .submit-btn,
.location-card select {
    width: 100%;
    margin-bottom: 20px;
}

.location-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
}

.location-item {
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.location-item:last-child {
    border-bottom: none;
}

.location-item:hover {
    background: #f9f9f9;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.stat-card h3 {
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.stat-number {
    color: #5B2C6F;
    font-size: 48px;
    font-weight: 700;
    margin: 0;
}

.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.chart-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.chart-card h3 {
    color: #5B2C6F;
    font-size: 18px;
    margin-bottom: 20px;
}

.event-stats {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #5B2C6F;
}

.modal h2 {
    color: #5B2C6F;
    margin-bottom: 20px;
}

.winner-display {
    text-align: center;
    padding: 40px 20px;
}

.winner-number {
    font-size: 72px;
    font-weight: 800;
    color: #5B2C6F;
    margin: 20px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.winner-info {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
}

.winner-info p {
    margin: 10px 0;
    font-size: 16px;
}

@media (max-width: 768px) {
    .admin-header {
        padding: 15px 15px;
        flex-direction: column;
        gap: 12px;
    }

    .admin-header h1 {
        font-size: 16px;
        text-align: center;
        line-height: 1.3;
    }

    .header-buttons {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .header-buttons .secondary-btn,
    .header-buttons a.secondary-btn {
        flex: 1 1 auto;
        min-width: 120px;
        justify-content: center;
        padding: 10px 16px;
        font-size: 12px;
    }

    .admin-nav {
        padding: 0 10px;
        gap: 5px;
    }

    .nav-btn {
        padding: 12px 15px;
        font-size: 12px;
    }

    .admin-content {
        padding: 15px;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .section-header h2 {
        font-size: 22px;
    }

    .section-header select {
        min-width: 100%;
    }

    .section-header .secondary-btn,
    .section-header .submit-btn {
        width: 100%;
    }

    .filters-container {
        flex-direction: column;
        gap: 10px;
    }

    .filters-container input,
    .filters-container select {
        width: 100%;
        min-width: 100%;
    }

    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-table {
        min-width: 800px;
        font-size: 13px;
    }

    .admin-table th,
    .admin-table td {
        padding: 10px 8px;
        font-size: 12px;
    }

    .action-btn {
        padding: 5px 8px;
        font-size: 11px;
        margin: 2px;
    }

    .status-badge {
        padding: 3px 8px;
        font-size: 10px;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 10px;
    }

    .pagination span {
        font-size: 13px;
    }

    .pagination .secondary-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .locations-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .location-card {
        padding: 20px;
    }

    .location-card h3 {
        font-size: 18px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .stat-card {
        padding: 20px;
    }

    .stat-number {
        font-size: 36px;
    }

    .charts-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .chart-card {
        padding: 20px;
    }

    .modal-content {
        padding: 25px;
        width: 95%;
        max-height: 85vh;
    }

    .modal h2 {
        font-size: 20px;
    }

    .winner-number {
        font-size: 48px;
    }

    .winner-info p {
        font-size: 14px;
    }

    .custom-dialog {
        width: 95%;
        padding: 20px;
    }

    .custom-dialog-title {
        font-size: 18px;
    }

    .custom-dialog-message {
        font-size: 14px;
    }

    .custom-dialog-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .custom-dialog-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .admin-header h1 {
        font-size: 14px;
    }

    .section-header h2 {
        font-size: 18px;
    }

    .admin-table {
        min-width: 600px;
    }

    .stat-number {
        font-size: 28px;
    }

    .winner-number {
        font-size: 36px;
    }
}

.custom-dialog-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.2s;
}

.custom-dialog-overlay.show {
    display: flex;
}

.custom-dialog {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s;
}

.custom-dialog-title {
    font-size: 20px;
    font-weight: 700;
    color: #5B2C6F;
    margin-bottom: 15px;
}

.custom-dialog-message {
    font-size: 15px;
    color: #333;
    margin-bottom: 25px;
    line-height: 1.5;
}

.custom-dialog-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.custom-dialog-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.custom-dialog-btn.primary {
    background: linear-gradient(135deg, #5B2C6F 0%, #FF6B4A 100%);
    color: white;
}

.custom-dialog-btn.secondary {
    background: #f0f0f0;
    color: #666;
}

.custom-dialog-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.custom-dialog-btn.primary:hover {
    box-shadow: 0 4px 12px rgba(91, 44, 111, 0.3);
}

.custom-dialog.alert .custom-dialog-buttons {
    justify-content: center;
}

.custom-dialog.success .custom-dialog-title {
    color: #4CAF50;
}

.custom-dialog.error .custom-dialog-title {
    color: #F44336;
}

.custom-dialog.warning .custom-dialog-title {
    color: #FF9800;
}