/* layout.css — App shell, header, sidebar, responsive */

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 26px 24px 18px;
    border-bottom: 1px solid rgba(23, 23, 23, 0.08);
}

.content-row {
    display: flex;
    flex: 1;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 26px 24px 56px;
}

/* Brand */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #171717;
}

.brand-glyph {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(180deg, #262626 0%, #090909 100%);
    position: relative;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
    overflow: hidden;
}

.brand-glyph::before,
.brand-glyph::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.brand-glyph::before {
    width: 24px;
    height: 12px;
    bottom: 6px;
    border-radius: 8px 8px 4px 4px;
    background: linear-gradient(180deg, #fb923c 0%, #f97316 100%);
    box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset;
}

.brand-glyph::after {
    width: 22px;
    height: 15px;
    top: 7px;
    background:
        linear-gradient(90deg,
            transparent 0,
            transparent 16%,
            #f8f7f2 16%,
            #f8f7f2 22%,
            transparent 22%,
            transparent 78%,
            #f8f7f2 78%,
            #f8f7f2 84%,
            transparent 84%,
            transparent 100%),
        linear-gradient(180deg, #fde68a 0%, #f59e0b 100%);
    clip-path: polygon(0 0, 100% 0, 84% 100%, 16% 100%);
    border-radius: 4px 4px 8px 8px;
}

.brand-wordmark {
    font-size: 1.1rem;
    font-weight: 650;
    letter-spacing: -0.03em;
}

/* Step navigation */
.step-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(23,23,23,0.08);
}

.step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: #6b6b63;
    font-size: 0.88rem;
    font-weight: 550;
    cursor: pointer;
}

.step.active {
    background: #171717;
    color: #f8f7f2;
}

.step.completed {
    color: #171717;
}

.step:disabled,
.step.disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Side panel */
.side-panel {
    width: 0;
    min-width: 0;
    background: #f8f8f6;
    border-left: 1px solid rgba(23, 23, 23, 0.08);
    padding: 0;
    overflow: hidden;
    overflow-y: auto;
    transition: width 0.2s ease, padding 0.2s ease;
}

.side-panel.visible {
    width: 300px;
    padding: 20px 18px 24px;
}

.panel-section {
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(23, 23, 23, 0.07);
}

.panel-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.panel-title {
    font-size: 0.75rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #7c7c74;
    margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 479px) {
    /* phones portrait */
    .side-panel.visible {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        z-index: 100;
        background: #f8f8f6;
        border-left: 0;
        padding: 20px 16px 28px;
    }

    .main-content {
        padding: 12px 10px 24px;
    }

    .app-header {
        padding: 16px 12px;
        gap: 12px;
        flex-direction: column;
        align-items: flex-start;
    }

    .step {
        padding: 8px 10px;
        font-size: 0.75rem;
    }

    .step-nav {
        width: 100%;
        justify-content: space-between;
    }

    .upload-container {
        padding: 8px 0 0;
    }

    .upload-title {
        margin-bottom: 22px;
    }

    .upload-box {
        padding: 34px 20px;
        border-radius: 22px;
    }

    .review-header {
        flex-direction: column;
        align-items: stretch;
    }

    .review-actions {
        justify-content: flex-start;
    }

    .controls {
        justify-content: stretch;
    }

    .controls .btn {
        width: 100%;
    }
}

@media (max-width: 768px) {
    /* tablets */
    .app-container {
        flex-direction: column;
    }

    .main-content {
        padding: 18px 16px 36px;
    }

    .app-header {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 32px;
    }

    .upload-container {
        padding: 8px 0 0;
    }

    .upload-title {
        margin-bottom: 22px;
    }

    .upload-box {
        padding: 34px 20px;
        border-radius: 22px;
    }

    .step-nav {
        width: 100%;
        justify-content: space-between;
    }

    .review-header {
        flex-direction: column;
        align-items: stretch;
    }

    .review-actions {
        justify-content: flex-start;
    }

    .side-panel.visible {
        width: 100%;
        border-left: 0;
        border-top: 1px solid #eee;
        padding: 20px 16px 28px;
    }

    .controls {
        justify-content: stretch;
    }

    .controls .btn {
        width: 100%;
    }
}

@media (max-width: 767px) and (orientation: landscape) {
    .practice-script {
        height: 50vh;
    }
}
