/* =================================================================
   ORGANIZER DASHBOARD STYLES
   ================================================================= */

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0A1F44 0%, #1a3a6b 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(108, 99, 255, 0.3) 0%, transparent 70%);
    top: -250px;
    right: -250px;
}

.login-page::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 107, 157, 0.3) 0%, transparent 70%);
    bottom: -250px;
    left: -250px;
}

.login-container {
    max-width: 450px;
    width: 100%;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: var(--white);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.login-logo {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.login-title {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Dashboard Layout */
.dashboard {
    min-height: 100vh;
    background: var(--bg-light);
}

.dashboard-header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.dashboard-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dashboard-logo h2 {
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.user-info {
    text-align: right;
}

.user-name {
    font-weight: 600;
    color: var(--text-dark);
}

.user-role {
    font-size: 0.85rem;
    color: var(--text-light);
}

.logout-btn {
    padding: 0.6rem 1.2rem;
    background: var(--danger-color);
    color: var(--white);
    border-radius: 50px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Event Summary Card */
.event-summary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: var(--shadow);
}

.event-summary-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.event-image-dashboard {
    width: 100px;
    height: 100px;
    border-radius: 15px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.event-image-dashboard img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-image-dashboard .initials {
    font-size: 2.5rem;
    font-weight: 700;
}

.event-details h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.event-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.event-countdown-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
    animation: countdownPulse 2s ease-in-out infinite;
}

.event-countdown-badge.long-time {
    background: rgba(34, 197, 94, 0.2);
    color: #ffffff;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.event-countdown-badge.medium-time {
    background: rgba(251, 191, 36, 0.2);
    color: #d97706;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.event-countdown-badge.short-time {
    background: rgba(249, 115, 22, 0.2);
    color: #ea580c;
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.event-countdown-badge.urgent-time {
    background: rgba(239, 68, 68, 0.2);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
    animation: countdownUrgent 1s ease-in-out infinite;
}

.event-countdown-badge.ended {
    background: rgba(107, 114, 128, 0.2);
    color: #4b5563;
    border: 1px solid rgba(107, 114, 128, 0.3);
    animation: none;
}

@keyframes countdownPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.02);
        opacity: 0.9;
    }
}

@keyframes countdownUrgent {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
}

/* Dashboard Navigation Tabs */
.dashboard-tabs {
    background: var(--white);
    border-radius: 15px;
    padding: 1rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
}

.tabs-container {
    display: flex;
    gap: 1rem;
    min-width: max-content;
}

.tab-btn {
    padding: 0.8rem 1.5rem;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    background: var(--light-purple);
    color: var(--primary-color);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

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

.stat-card {
    background: var(--white);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

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

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

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

.stat-icon.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.stat-icon.success {
    background: linear-gradient(135deg, #00D4AA, #00E5BC);
}

.stat-icon.warning {
    background: linear-gradient(135deg, #FFB800, #FFC933);
}

.stat-icon.danger {
    background: linear-gradient(135deg, #FF4757, #FF6B7A);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.stat-change.positive {
    background: #e8f8f5;
    color: var(--success-color);
}

.stat-change.negative {
    background: #ffebee;
    color: var(--danger-color);
}

/* Detailed Stats Card */
.detailed-stat-card {
    background: var(--white);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.detailed-stat-header {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-row-label {
    color: var(--text-light);
}

.stat-row-value {
    font-weight: 600;
    font-size: 1.1rem;
}

.stat-row-value.success {
    color: var(--success-color);
}

.stat-row-value.danger {
    color: var(--danger-color);
}

/* Chart Card */
.chart-card {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.chart-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
}

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

.chart-control-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    background: var(--white);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.chart-control-btn:hover,
.chart-control-btn.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--light-purple);
}

.chart-container {
    position: relative;
    height: 400px;
}

/* Category Votes Grid */
.category-votes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.category-vote-card {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
}

.category-vote-card:hover {
    background: var(--light-purple);
}

.category-vote-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.category-vote-count {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Data Table */
.data-table-card {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.data-table-container {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.table-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
}

.table-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    background: var(--white);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.action-btn.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border: none;
}

.action-btn.primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.data-table thead {
    background: var(--bg-light);
}

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

.data-table th {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tbody tr {
    transition: background 0.3s ease;
}

.data-table tbody tr:hover {
    background: var(--bg-light);
}

.status-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge.success {
    background: #e8f8f5;
    color: var(--success-color);
}

.status-badge.pending {
    background: #fff3e0;
    color: var(--warning-color);
}

.status-badge.failed {
    background: #ffebee;
    color: var(--danger-color);
}

/* Download Controls */
.download-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.download-card {
    flex: 1;
    background: var(--white);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.download-card h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.permission-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.permission-badge.allowed {
    background: #e8f8f5;
    color: var(--success-color);
}

.permission-badge.denied {
    background: #ffebee;
    color: var(--danger-color);
}

/* Revenue Overview */
.revenue-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.revenue-card {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.revenue-card h3 {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.revenue-amount {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.revenue-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.revenue-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-top: 1px solid var(--border-color);
}

/* Loading State */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--light-purple);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Dashboard */
@media (max-width: 968px) {
    .event-summary-content {
        flex-direction: column;
        text-align: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .revenue-grid {
        grid-template-columns: 1fr;
    }

    .download-controls {
        flex-direction: column;
    }

    .dashboard-tabs {
        overflow-x: auto;
    }

    .data-table-container {
        padding: 1.5rem;
    }

    .data-table {
        min-width: 700px;
    }
}

@media (max-width: 768px) {
    .login-card {
        padding: 2rem;
    }

    .dashboard-header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .dashboard-user {
        width: 100%;
        justify-content: space-between;
    }

    .table-header {
        flex-direction: column;
        gap: 1rem;
    }

    .table-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .action-btn {
        flex: 1;
        min-width: 150px;
        justify-content: center;
    }

    .chart-container {
        height: 300px;
    }

    .data-table-container {
        padding: 1.5rem;
    }

    .data-table {
        font-size: 0.9rem;
        min-width: 800px;
        white-space: nowrap;
    }

    .data-table th,
    .data-table td {
        padding: 0.7rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .data-table-container {
        padding: 1rem;
    }

    .data-table {
        font-size: 0.8rem;
        min-width: 600px;
    }

    .data-table th,
    .data-table td {
        padding: 0.5rem 0.3rem;
    }

    .contestant-cell {
        gap: 0.5rem;
    }

    .contestant-avatar {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }
}


/* =================================================================
   MODAL STYLES
   ================================================================= */

.modal-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: 1000;
    padding: 20px;
}

.modal-content {
    background: var(--white);
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

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

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-dark);
}

.modal-body {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

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

/* Nomination Details Specific Styles */
.nomination-details-container {
    font-size: 14px;
}

.nomination-header {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--light-gray);
}

.nomination-image img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--light-gray);
}

.nomination-info h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    color: var(--text-dark);
    font-weight: 600;
}

.nomination-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 1rem;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-approved {
    background: #d1edff;
    color: #155724;
    border: 1px solid #bee5eb;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

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

.detail-row {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 1rem;
    align-items: start;
}

.detail-row.full-width {
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.detail-label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.detail-value {
    color: var(--text-light);
    line-height: 1.5;
}

.detail-value a {
    color: var(--primary-color);
    text-decoration: none;
    word-break: break-all;
}

.detail-value a:hover {
    text-decoration: underline;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content {
        margin: 10px;
        max-width: calc(100% - 20px);
    }

    .modal-header, .modal-body, .modal-footer {
        padding: 1rem 1.5rem;
    }

    .nomination-header {
        flex-direction: column;
        text-align: center;
    }

    .nomination-image img {
        width: 120px;
        height: 120px;
    }

    .detail-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .detail-label {
        font-weight: 600;
    }
}
