/* frontend/common/css/layout.css */

.app-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px;
}

.app-header {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border-radius: var(--radius);
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(37,99,235,.25);
}
.app-header .title { font-size: 15px; font-weight: 600; white-space: nowrap; }
.app-header .user {
    margin-left: auto; font-size: 12px; opacity: .95; white-space: nowrap;
}
.app-header .user span + span { margin-left: 12px; }
.app-header a.title { color: inherit; text-decoration: none; }
.app-header .account-avatar {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-left: 12px;
    border-radius: 50%;
    background: #dce8ff;
    color: #194aab;
    font-weight: 700;
    text-decoration: none;
}

.app-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--gray-2);
}

/* 预览图 */
.preview-wrap {
    background: #fff;
    border: 1px dashed var(--gray-3);
    border-radius: var(--radius);
    padding: 8px;
    height: 340px;
    position: relative;
    overflow: hidden;
}
.preview-wrap canvas { display: block !important; }
.preview-wrap .placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--gray-4);
    font-size: 13px;
}

/* 顶部 SEM 概念图 */
.sem-banner {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 12px;
    margin-bottom: 12px;
    text-align: center;
}
.sem-banner img { max-width: 100%; max-height: 240px; }
.sem-banner .sem-caption { font-size: 12px; color: var(--gray-4); margin-top: 6px; }

/* 步骤标题 */
.step-title-bar {
    background: #fff;
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 12px 16px;
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}
.step-title-bar .step-num { color: var(--primary); }

/* 分布预览画布 */
.dist-wrap {
    background: #fff;
    border: 1px dashed var(--gray-3);
    border-radius: var(--radius);
    padding: 8px;
    height: 240px;
}
.dist-wrap canvas {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

/* 模型卡片网格 */
.model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.model-card {
    border: 2px solid var(--gray-2);
    border-radius: var(--radius);
    padding: 10px;
    background: #fff;
    cursor: pointer;
    transition: all .15s;
    position: relative;
}
.model-card:hover { border-color: var(--primary); }
.model-card.selected { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37,99,235,.2); }
.model-card img {
    width: 100%; height: 130px; object-fit: contain;
    background: #f8f9fa; border-radius: 6px;
}
.model-card .model-name { font-weight: 600; font-size: 13px; margin-top: 8px; }
.model-card .model-desc { color: var(--gray-4); font-size: 12px; margin-top: 4px; line-height: 1.4; }
