/* ── Dashboard Container ─────────────────────────────── */
.dashboard-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 30px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.dashboard-container .header {
    text-align: center;
    margin-bottom: 24px;
}

/* ── Views ────────────────────────────────────────────── */
.view {
    width: 100%;
}

/* ── Dashboard Header ─────────────────────────────────── */
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.dash-header-left {
    flex: 1;
    min-width: 0;
}

.dash-title {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.dash-host-name {
    font-size: 14px;
    color: #b0b0b0;
    margin-top: 4px;
}

.dash-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.dash-add-btn {
    width: auto !important;
    padding: 10px 20px !important;
    font-size: 14px !important;
    white-space: nowrap;
}

.dash-logout-btn {
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #b0b0b0;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.dash-logout-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

/* ── Sort Bar ─────────────────────────────────────────── */
.sort-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.sort-label {
    font-size: 13px;
    color: #999;
    white-space: nowrap;
}

.sort-btn {
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #b0b0b0;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sort-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.sort-btn.active {
    background: rgba(233, 69, 96, 0.15);
    border-color: rgba(233, 69, 96, 0.4);
    color: #ffffff;
}

/* ── Event Sections ───────────────────────────────────── */
.event-section {
    margin-bottom: 28px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #d0d0d0;
    margin-bottom: 12px;
}

.section-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot-in-progress {
    background: #22c55e;
}

.dot-not-started {
    background: #eab308;
}

.dot-ended {
    background: #6b7280;
}

.count {
    font-size: 13px;
    color: #999;
    font-weight: 400;
}

/* ── Event Cards ──────────────────────────────────────── */
.event-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.event-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 16px;
    transition: all 0.2s ease;
}

.event-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.event-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.event-card-info {
    flex: 1;
    min-width: 0;
}

.event-card-name {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.event-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
    color: #b0b0b0;
}

.event-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.event-card-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.edit-btn,
.delete-btn {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.edit-btn {
    background: rgba(88, 101, 242, 0.2);
    border: 1px solid rgba(88, 101, 242, 0.4);
    color: #a5b4fc;
}

.edit-btn:hover {
    background: rgba(88, 101, 242, 0.3);
    color: #ffffff;
}

.delete-btn {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.delete-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #ffffff;
}

/* ── Status Badge ─────────────────────────────────────── */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-in-progress {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
}

.badge-not-started {
    background: rgba(234, 179, 8, 0.2);
    color: #fde047;
}

.badge-ended {
    background: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
}

/* ── Empty State ──────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 20px;
    color: #888;
    font-size: 14px;
}

/* ── Form Card ────────────────────────────────────────── */
.form-card {
    max-width: 640px;
    margin: 0 auto;
}

/* Brighten labels inside the form card for readability */
.form-card .form-group label {
    color: #d0d0d0;
}

.form-card .field-helper {
    color: #999;
}

.form-section {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 20px;
}

.section-heading {
    font-size: 16px;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 16px;
}

.optional-label {
    font-size: 12px;
    color: #999;
    font-weight: 400;
}

/* ── Form Row (side-by-side fields) ───────────────────── */
.form-row {
    display: flex;
    gap: 16px;
}

.form-half {
    flex: 1;
}

/* ── Media Preview ────────────────────────────────────── */
.media-preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.media-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.media-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-preview-item .remove-media {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ── Delete Modal ─────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-card {
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 30px;
    max-width: 400px;
    width: 100%;
}

.modal-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 12px;
}

.modal-card p {
    font-size: 14px;
    color: #b0b0b0;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* ── Wizard Pages ─────────────────────────────────────── */
.wizard-page {
    display: none;
}

.wizard-page.active {
    display: block;
}

/* ── Optional Info Banner ─────────────────────────────── */
.wizard-optional-banner {
    background: rgba(88, 101, 242, 0.1);
    border: 1px solid rgba(88, 101, 242, 0.25);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 24px;
}

.wizard-optional-banner p {
    font-size: 14px;
    color: #a5b4fc;
    margin: 0;
    line-height: 1.5;
}

/* ── Toggle for native registration ───────────────────── */
.toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #d0d0d0;
}

.toggle-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #e94560;
}

.toggle-text {
    font-weight: 500;
}

/* ── Triple button row for Page 2 ─────────────────────── */
.btn-row-triple {
    display: flex;
    gap: 10px;
}

.btn-row-triple .btn-back {
    flex: 0 1 auto;
}

.btn-skip {
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #a0a0a0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-skip:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.btn-row-triple .verify-btn {
    flex: 1;
}

/* ── Progress bar inside form ─────────────────────────── */
.form-card .progress {
    margin-bottom: 24px;
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 640px) {
    .dashboard-container {
        padding: 16px 12px;
    }

    .dash-header {
        gap: 10px;
    }

    .dash-title {
        font-size: 18px;
    }

    .dash-actions {
        width: 100%;
    }

    .dash-add-btn {
        flex: 1;
        padding: 10px 16px !important;
        font-size: 13px !important;
    }

    .dash-logout-btn {
        padding: 10px 14px;
        font-size: 12px;
    }

    /* Form view header stays horizontal on mobile */
    .form-view-header {
        gap: 12px;
    }

    .form-view-header .dash-title {
        font-size: 16px;
    }

    .dash-back-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .form-card {
        max-width: 100%;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .section-heading {
        font-size: 15px;
    }

    .event-card {
        padding: 12px 14px;
    }

    .event-card-header {
        flex-direction: column;
        gap: 10px;
    }

    .event-card-name {
        font-size: 14px;
        white-space: normal;
    }

    .event-card-meta {
        font-size: 12px;
        gap: 8px;
    }

    .event-card-actions {
        width: 100%;
    }

    .event-card-actions button {
        flex: 1;
    }

    .sort-bar {
        gap: 6px;
    }

    .sort-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    .btn-row-triple {
        flex-direction: column;
    }

    .btn-row-triple .btn-back,
    .btn-row-triple .btn-skip,
    .btn-row-triple .verify-btn {
        flex: 1;
    }
}
