.app-shell {
    min-height: 100vh;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 50;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    height: var(--header-height);
    padding: 0 24px;

    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.brand-logo {
    display: grid;
    place-items: center;

    width: 36px;
    height: 36px;

    color: #fff;
    background: linear-gradient(135deg, #6879f5, #4655cf);

    border-radius: 11px;

    font-size: 21px;
    font-weight: 900;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text strong {
    font-size: 15px;
    letter-spacing: -0.3px;
}

.brand-text span {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 2px;
}

.header-project {
    display: flex;
    align-items: center;
    gap: 10px;

    flex: 1;
    min-width: 0;
    max-width: 560px;
}

.status-dot {
    width: 7px;
    height: 7px;
    flex-shrink: 0;

    background: #28b789;
    border-radius: 50%;
}

.header-project input {
    width: 100%;
    min-width: 0;

    padding: 7px 8px;

    color: var(--text);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;

    font-size: 13px;
    font-weight: 700;
}

.header-project input:hover,
.header-project input:focus {
    background: #fff;
    border-color: var(--border);
}

.save-status {
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: 11px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.app-main {
    display: grid;

    grid-template-columns:
        var(--rail-width) var(--segment-width) minmax(0, 1fr);

    min-height: calc(100vh - var(--header-height));
}

.workspace {
    display: flex;
    flex-direction: column;

    min-width: 0;
    min-height: 0;
    padding: 26px 28px 0;

    overflow: hidden;
}

.workspace-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;

    margin-bottom: 24px;
}

.workspace-heading h1 {
    margin: 7px 0 5px;

    font-size: 25px;
    line-height: 1.3;
    letter-spacing: -0.7px;
}

.workspace-heading p {
    margin: 0;

    color: var(--text-secondary);
    font-size: 13px;
}

.workspace-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    padding: 7px 10px;

    color: var(--text-secondary);
    background: #fff;

    border: 1px solid var(--border);
    border-radius: 999px;

    font-size: 11px;
}

.panel-host {
    flex: 1;
    min-width: 0;
    min-height: 320px;
    padding-bottom: 24px;
}

.panel-page {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}

.panel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.panel-grid .full-width {
    grid-column: 1 / -1;
}

.section-gap {
    margin-top: 18px;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    margin-top: 16px;
}

.divider {
    height: 1px;
    margin: 18px 0;
    background: var(--border);
}

.timeline-dock {
    flex-shrink: 0;
    margin: 0 -28px;
    background: #fff;
    border-top: 1px solid var(--border);
}

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

    min-height: 56px;
    padding: 0 28px;
}

.timeline-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.timeline-icon {
    display: grid;
    place-items: center;

    width: 30px;
    height: 30px;

    color: var(--primary);
    background: var(--primary-soft);

    border-radius: 8px;

    font-size: 20px;
}

.timeline-title>div {
    display: flex;
    flex-direction: column;
}

.timeline-title strong {
    font-size: 12px;
}

.timeline-title span:last-child {
    color: var(--text-muted);
    font-size: 10px;
}

.timeline-tools {
    display: flex;
    align-items: center;
    gap: 12px;

    color: var(--text-secondary);
    font-size: 12px;
}

.timeline-body {
    padding: 0 28px 18px;
}

.timeline-dock.collapsed .timeline-body {
    display: none;
}

@media (min-width: 1500px) {
    :root {
        --segment-width: 285px;
    }

    .workspace {
        padding-right: 36px;
        padding-left: 36px;
    }

    .timeline-dock {
        margin-right: -36px;
        margin-left: -36px;
    }
}


.export-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.export-option strong {
    display: block;
    font-size: 13px;
}

.export-option p {
    margin: 5px 0 0;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.7;
}