<?php get_header(); ?>
<?php $mi_mode = function_exists( 'techcon_theme_booking_mode' ) ? techcon_theme_booking_mode() : 'simple'; ?>
<main id="primary" class="site-main mi-login-main">
    <section class="mi-portal-shell" aria-labelledby="mi-portal-title">
        <div class="mi-portal-card">
            <div class="mi-system-top">
                <?php $logo_url = techcon_theme_opt( 'logo_url' ); ?>
                <div class="mi-system-logo" aria-hidden="true"><?php if ( $logo_url ) : ?><img src="<?php echo esc_url( $logo_url ); ?>" alt=""><?php else : ?>MI<?php endif; ?></div>
                <div class="mi-system-copy">
                    <div class="mi-kicker"><?php echo esc_html( techcon_theme_opt( 'event_name' ) ); ?></div>
                    <h1 id="mi-portal-title"><?php echo esc_html( techcon_theme_opt( 'system_title' ) ); ?></h1>
                    <p><?php echo esc_html( techcon_theme_opt( 'event_tagline' ) ); ?></p>
                </div>
            </div>

            <div class="mi-event-meta" aria-label="Current event details">
                <span><?php echo esc_html( techcon_theme_opt( 'event_dates' ) ); ?></span>
                <span><?php echo esc_html( techcon_theme_opt( 'event_venue' ) ); ?></span>
            </div>

            <div class="mi-login-grid" aria-label="Login options">
                <a class="mi-login-card" href="<?php echo techcon_theme_url( 'speaker_login_url' ); ?>">
                    <span class="mi-icon" aria-hidden="true"><svg viewBox="0 0 24 24"><path d="M12 3a3 3 0 0 0-3 3v6a3 3 0 0 0 6 0V6a3 3 0 0 0-3-3Z"/><path d="M5 11a7 7 0 0 0 14 0"/><path d="M12 18v3"/><path d="M8 21h8"/></svg></span>
                    <span class="mi-card-label">Speaker Portal</span>
                    <strong>Login as Speaker</strong>
                    <small><?php echo $mi_mode === 'simple' ? 'View available slots and send a simple interview request.' : 'Request interview slots and track updates from your dashboard.'; ?></small>
                </a>
                <a class="mi-login-card" href="<?php echo techcon_theme_url( 'partner_login_url' ); ?>">
                    <span class="mi-icon" aria-hidden="true"><svg viewBox="0 0 24 24"><path d="M12 2v20"/><path d="M17 5H9.5a4.5 4.5 0 0 0 0 9H17"/><path d="M17 5a4.5 4.5 0 0 1 0 9"/><path d="M7 18h10"/></svg></span>
                    <span class="mi-card-label">Media Partner Portal</span>
                    <strong>Login as Media Partner</strong>
                    <small><?php echo $mi_mode === 'simple' ? 'Review incoming speaker requests and manage your availability.' : 'Manage slots, review requests, and confirm scheduled interviews.'; ?></small>
                </a>
            </div>

            <div class="mi-journey" aria-label="System journey">
                <div class="mi-journey-step"><b>01</b><span>Login</span></div>
                <div class="mi-journey-line"></div>
                <div class="mi-journey-step"><b>02</b><span>Select Partner / Slot</span></div>
                <div class="mi-journey-line"></div>
                <div class="mi-journey-step"><b>03</b><span><?php echo $mi_mode === 'simple' ? 'Request Sent to Partner' : 'Track Pending / Approved / Declined'; ?></span></div>
                <div class="mi-journey-line"></div>
                <div class="mi-journey-step"><b>04</b><span><?php echo $mi_mode === 'simple' ? 'Partner Contacts Speaker' : 'Get Final Update'; ?></span></div>
            </div>

            <div class="mi-actions">
                <a class="mi-btn mi-btn-primary" href="<?php echo techcon_theme_url( 'booking_url' ); ?>">View Media Partners</a>
                <?php if ( function_exists( 'techcon_theme_agenda_enabled' ) && techcon_theme_agenda_enabled() ) : ?>
                <a class="mi-btn mi-btn-outline" href="<?php echo techcon_theme_url( 'agenda_url' ); ?>">View Agenda</a>
                <?php endif; ?>
                <a class="mi-help-link" href="mailto:<?php echo esc_attr( techcon_theme_opt( 'support_email' ) ); ?>">Need Help?</a>
            </div>
        </div>
    </section>
</main>
<?php get_footer(); ?>
