/* ===========================================
   Desktop Layout (single-page, no screens)
   =========================================== */
@media (min-width: 601px) {
    body {
        max-width: 900px;
        margin: 0 auto;
        padding: 20px;
    }

    .screen {
        display: block !important;
        position: static !important;
    }

    /* Hide login screen on desktop once app is active */
    body.app-ready #screenLogin {
        display: none !important;
    }

    /* When login is showing, hide all other screens */
    body:not(.app-ready) .screen:not(#screenLogin) {
        display: none !important;
    }

    .screen-nav {
        display: none;
    }

    .tab-bar {
        display: none;
    }

    .screen-content {
        background: var(--mm-card);
        padding: 24px;
        border-radius: var(--mm-radius);
        margin-bottom: 20px;
        box-shadow: var(--mm-shadow);
    }

    .home-hero {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 30px 0;
    }

    .brand-title {
        font-size: 28px;
        font-weight: 700;
        color: var(--mm-text);
        margin: 16px 0 4px;
    }

    .brand-cta {
        font-size: 16px;
        color: var(--mm-text-secondary);
        margin: 0 0 4px;
    }

    .brand-subtitle {
        font-size: 14px;
        color: var(--mm-text-muted);
        margin: 0;
    }

    .upload-toggle {
        display: block;
        text-align: center;
        margin: 20px 0;
        color: var(--mm-primary);
        font-size: 14px;
        cursor: pointer;
    }

    .upload-section {
        margin-top: 16px;
    }

    /* Desktop: always show upload section */
    .upload-section.hidden {
        display: block !important;
    }

    .screen-bottom-actions {
        margin-top: 24px;
        display: flex;
        align-items: center;
        gap: 16px;
    }

    .screen-desc {
        color: var(--mm-text-secondary);
        margin: 0 0 16px;
    }

    .progress-bar-container {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 20px;
    }

    .progress-bar {
        flex: 1;
        height: 6px;
        background: var(--mm-border-light);
        border-radius: 3px;
        overflow: hidden;
    }

    .progress-bar-fill {
        height: 100%;
        background: var(--mm-primary);
        border-radius: 3px;
        transition: width 0.3s ease;
    }

    .progress-text {
        font-size: 13px;
        color: var(--mm-text-muted);
        font-weight: 500;
    }

    .tab-switcher {
        display: flex;
        gap: 4px;
        background: var(--mm-border-light);
        border-radius: 20px;
        padding: 4px;
        margin-bottom: 20px;
    }

    .tab-btn {
        flex: 1;
        padding: 8px 16px;
        border: none;
        border-radius: 16px;
        background: transparent;
        font-size: 14px;
        font-weight: 500;
        color: var(--mm-text-secondary);
        cursor: pointer;
        transition: all 0.2s;
    }

    .tab-btn.active {
        background: var(--mm-card);
        color: var(--mm-text);
        box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    }

    .tab-content {
        display: none;
    }

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

    .meeting-info {
        margin-bottom: 20px;
    }

    .enrolled-heading {
        margin-top: 24px;
        font-size: 16px;
        color: var(--mm-text);
    }

    .empty-state {
        color: var(--mm-text-muted);
    }

    /* Desktop accordion - always expanded */
    .accordion-chevron {
        display: none;
    }

    .section-count {
        display: none;
    }
}

/* ===========================================
   Speakers List (Enrollment)
   =========================================== */
.speakers-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.speaker-tag {
    background: var(--mm-bg);
    padding: 8px 14px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--mm-border-light);
}

.speaker-tag .name {
    font-weight: 500;
    font-size: 14px;
}

.speaker-tag .count {
    color: var(--mm-text-muted);
    font-size: 12px;
}

.speaker-tag .delete {
    color: #dc3545;
    cursor: pointer;
    font-weight: bold;
}

/* ===========================================
   Meeting Info
   =========================================== */
.meeting-info {
    padding: 16px;
    background: var(--mm-bg);
    border-radius: var(--mm-radius);
    margin-bottom: 16px;
}

.meeting-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.meeting-info-title {
    font-weight: 600;
    font-size: 16px;
}

.meeting-info-detail {
    font-size: 13px;
    color: var(--mm-text-secondary);
}

/* ===========================================
   Enroll Checkbox
   =========================================== */
.enroll-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 13px;
    color: var(--mm-text-secondary);
}

.enroll-checkbox input {
    width: auto;
}

/* ===========================================
   MOBILE STYLES (max-width: 600px)
   =========================================== */
@media (max-width: 600px) {
    /* Screen navigation system */
    .screen {
        display: none;
        position: fixed;
        inset: 0;
        background: var(--mm-bg);
        z-index: 10;
        flex-direction: column;
    }

    .screen.active {
        display: flex;
    }

    .screen-nav {
        display: flex;
        align-items: center;
        padding: 12px 16px;
        background: var(--mm-card);
        border-bottom: 1px solid var(--mm-border-light);
        flex-shrink: 0;
        min-height: 56px;
        position: sticky;
        top: 0;
        z-index: 5;
    }

    .back-btn {
        background: none;
        border: none;
        font-size: 22px;
        color: var(--mm-text);
        padding: 8px;
        margin-left: -8px;
        cursor: pointer;
    }

    .screen-title {
        flex: 1;
        text-align: center;
        font-size: 17px;
        font-weight: 600;
        margin: 0;
    }

    .nav-spacer {
        width: 38px;
    }

    .screen-content {
        flex: 1;
        overflow-y: auto;
        padding: 20px 16px;
        -webkit-overflow-scrolling: touch;
        background: transparent;
        box-shadow: none;
        border-radius: 0;
        margin: 0;
    }

    .screen-content.scrollable {
        padding-bottom: 120px;
    }

    .screen-desc {
        color: var(--mm-text-secondary);
        font-size: 14px;
        margin: 0 0 16px;
    }

    /* Home screen hero */
    .home-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding-bottom: 100px;
    }

    .home-hero {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding-top: 40px;
    }

    .brand-title {
        font-size: 26px;
        font-weight: 700;
        color: var(--mm-text);
        margin: 20px 0 6px;
    }

    .brand-cta {
        font-size: 16px;
        color: var(--mm-primary);
        font-weight: 500;
        margin: 0 0 6px;
    }

    .brand-subtitle {
        font-size: 14px;
        color: var(--mm-text-muted);
        margin: 0;
        max-width: 260px;
    }

    /* Upload toggle */
    .upload-toggle {
        display: block;
        text-align: center;
        margin-top: 24px;
        color: var(--mm-primary);
        font-size: 14px;
        font-weight: 500;
        text-decoration: none;
        padding: 12px;
        -webkit-tap-highlight-color: transparent;
    }

    .upload-section {
        width: 100%;
        padding: 0 4px;
        margin-top: 8px;
    }

    .upload-section .btn-primary {
        margin-top: 12px;
    }

    /* Progress bar */
    .progress-bar-container {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 16px;
    }

    .progress-bar {
        flex: 1;
        height: 6px;
        background: var(--mm-border-light);
        border-radius: 3px;
        overflow: hidden;
    }

    .progress-bar-fill {
        height: 100%;
        background: var(--mm-primary);
        border-radius: 3px;
        transition: width 0.3s ease;
    }

    .progress-text {
        font-size: 13px;
        color: var(--mm-text-muted);
        font-weight: 500;
    }

    /* Bottom actions */
    .screen-bottom-actions {
        padding: 16px 0;
    }

    /* Tab bar */
    .tab-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--mm-card);
        border-top: 1px solid var(--mm-border-light);
        padding-bottom: env(safe-area-inset-bottom, 34px);
        z-index: 50;
        height: calc(84px + env(safe-area-inset-bottom, 0px));
    }

    .tab-bar-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        background: none;
        border: none;
        color: var(--mm-text-muted);
        font-size: 11px;
        font-weight: 500;
        padding: 8px 4px;
        cursor: pointer;
        font-family: var(--mm-font);
        -webkit-tap-highlight-color: transparent;
    }

    .tab-bar-item.active {
        color: var(--mm-primary);
    }

    .tab-icon {
        width: 24px;
        height: 24px;
    }

    /* Tab switcher (transcript/summary toggle) */
    .tab-switcher {
        display: flex;
        gap: 4px;
        background: var(--mm-border-light);
        border-radius: 20px;
        padding: 4px;
        margin-bottom: 16px;
    }

    .tab-btn {
        flex: 1;
        padding: 10px 16px;
        border: none;
        border-radius: 16px;
        background: transparent;
        font-size: 14px;
        font-weight: 500;
        color: var(--mm-text-secondary);
        cursor: pointer;
        transition: all 0.2s;
        font-family: var(--mm-font);
    }

    .tab-btn.active {
        background: var(--mm-card);
        color: var(--mm-text);
        box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    }

    .tab-content {
        display: none;
    }

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

    .meeting-info {
        margin-bottom: 16px;
    }

    /* Speaker cards — mobile refinements */
    .speaker-card {
        margin-bottom: 0;
    }

    .name-input-group {
        flex-direction: column;
        gap: 10px;
    }

    .name-input-group input {
        width: 100%;
        padding: 12px 14px;
        font-size: 15px;
    }

    .name-input-group button {
        width: 100%;
        padding: 12px;
        min-height: 44px;
    }

    .suggestion-buttons {
        gap: 8px;
    }

    .confirm-btn, .rename-btn {
        padding: 10px 16px;
        font-size: 14px;
    }

    /* Enrollment */
    .enrolled-heading {
        margin-top: 24px;
        font-size: 16px;
    }

    .empty-state {
        color: var(--mm-text-muted);
    }

    /* Status in mobile */
    .status {
        width: 100%;
        border-radius: var(--mm-radius-sm);
    }

    /* Mobile accordion */
    .accordion-chevron {
        display: inline-block;
    }

    .section-count {
        display: inline-block;
    }

    .summary-card-header {
        min-height: 48px;
    }

    /* Mobile copy buttons */
    .copy-btn {
        position: static;
        margin-top: 12px;
        width: 100%;
        padding: 10px;
        font-size: 13px;
        min-height: 44px;
    }

    /* Touch targets */
    button {
        min-height: 44px;
    }

    /* Record button larger on mobile */
    .record-btn {
        width: 140px;
        height: 140px;
    }
}
