/* 商业地产诊断工具 - 样式文件 */
/* 与现有工具保持一致：深蓝商务风格 */
/* 版本：1.0 */
/* 日期：2026-05-24 */

/* ==================== 基础样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a365d;
    --primary-light: #2a4a7d;
    --accent-color: #2b6cb0;
    --secondary-color: #38a169;
    --danger-color: #e53e3e;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-light: #718096;
    --border-color: #e2e8f0;
    --bg-white: #ffffff;
    --bg-light: #f7fafc;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
    --radius: 6px;
    --transition: all 0.25s ease;
}

body {
    font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f0f4f8;
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.7;
}

/* ==================== 页面通用样式 ==================== */
.page {
    display: none;
    min-height: 100vh;
}

.page.active {
    display: block;
}

/* ==================== 首页样式 ==================== */
#home-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
}

.home-container {
    background: white;
    border-radius: 12px;
    padding: 3rem;
    max-width: 600px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.home-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.home-header h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.home-header .subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
    letter-spacing: 0.01em;
}

.home-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
    letter-spacing: 0.01em;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--bg-white);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.1);
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.home-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-light);
}

/* ==================== 按钮样式 ==================== */
.btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
    letter-spacing: 0.02em;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.btn-large {
    padding: 0.8rem 2rem;
    font-size: 1rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-icon {
    background: transparent;
    color: var(--text-secondary);
    padding: 0.5rem;
}

.btn-icon:hover {
    background: var(--bg-light);
    border-radius: 50%;
}

/* ==================== 主页面布局 ==================== */
#main-page {
    background: var(--bg-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部导航栏 */
.header {
    background: white;
    padding: 0.8rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    z-index: 100;
    border-bottom: 3px solid var(--primary-color);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-title {
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.header-center {
    display: flex;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* 主内容区 */
.main-content {
    display: grid;
    grid-template-columns: 250px 1fr 350px;
    gap: 2rem;
    padding: 2rem;
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* 左侧：步骤指示器 */
.step-indicator {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    height: fit-content;
    position: sticky;
    top: 2rem;
    border: 1px solid var(--border-color);
}

.step-part {
    margin-bottom: 1.5rem;
}

.step-part:last-child {
    margin-bottom: 0;
}

.step-part-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.step-part-icon {
    font-size: 1.2rem;
}

.step-part-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.01em;
}

.step-section {
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.25rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.step-section:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

.step-section.active {
    background: var(--bg-light);
    color: var(--primary-color);
    font-weight: 500;
    border-left-color: var(--primary-color);
}

/* 中间：内容区域 */
.step-content {
    background: white;
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    min-height: 70vh;
    border: 1px solid var(--border-color);
}

.step-section-title {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.step-section-description {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    line-height: 1.8;
}

/* 表单字段样式 */
.form-field {
    margin-bottom: 1.5rem;
}

.form-field-label {
    display: block;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
}

.form-field-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--bg-white);
    color: var(--text-primary);
}

.form-field-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.1);
}

/* 填空式输入 */
.fill-blank-input {
    display: inline-block;
    width: auto;
    min-width: 200px;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.95rem;
    background: var(--bg-light);
    color: var(--primary-color);
    font-weight: 500;
}

.fill-blank-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.1);
}

/* 表格输入样式 */
.table-container {
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.table-input {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.table-input thead {
    background: var(--primary-color);
    color: white;
}

.table-input th {
    padding: 1rem;
    text-align: left;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
}

.table-input td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.table-input tbody tr:hover {
    background: var(--bg-light);
}

.table-input tbody tr:last-child td {
    border-bottom: none;
}

.table-input input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
}

.table-input input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-add-row {
    background: var(--secondary-color);
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    margin-top: 1rem;
}

.btn-delete-row {
    background: var(--danger-color);
    color: white;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* 模板填空样式 */
.template-text {
    font-size: 1.05rem;
    line-height: 1.8;
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: var(--radius);
    color: var(--text-primary);
    white-space: pre-wrap;
}

/* 引导文字样式 */
.step-guidance {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* 选择题列表 */
.choice-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

/* 选择题选项 */
.choice-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: white;
    transition: var(--transition);
}

.choice-item:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-sm);
}

.choice-item:has(input:checked) {
    border-color: var(--primary-color);
    background: #f0f4ff;
}

.choice-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
    flex-shrink: 0;
    margin-right: 0.5rem;
}

.choice-item label {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.6;
}

.choice-item label::before {
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* 选项自带备注 */
.choice-note {
    font-size: 0.85rem;
    color: var(--text-light);
    font-style: italic;
    margin-left: 2.5rem;
    line-height: 1.7;
    padding: 0.5rem 0.75rem;
    background: #f9fafb;
    border-radius: 4px;
}

/* 用户备注输入框 */
.choice-textarea {
    width: 100%;
    min-height: 60px;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    color: var(--text-primary);
    background: var(--bg-white);
    margin-top: 0.25rem;
}

.choice-textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.1);
}

.choice-textarea::placeholder {
    color: var(--text-light);
    font-style: italic;
}

/* 右侧：讨论记录侧边栏 */
.discussion-sidebar {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    height: fit-content;
    position: sticky;
    top: 2rem;
    border: 1px solid var(--border-color);
}

.sidebar-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.sidebar-header h3 {
    font-size: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.discussion-input {
    width: 100%;
    min-height: 120px;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    color: var(--text-primary);
}

.discussion-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

/* 底部导航按钮 */
.navigation {
    background: white;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    border-top: 1px solid var(--border-color);
}

.step-info {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* ==================== 会议模式样式 ==================== */
.meeting-mode .step-indicator,
.meeting-mode .discussion-sidebar {
    display: none;
}

.meeting-mode .main-content {
    grid-template-columns: 1fr;
    max-width: 100%;
}

.meeting-mode .step-content {
    min-height: 80vh;
    font-size: 1.2rem;
}

.meeting-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.meeting-overlay.active {
    transform: translateY(0);
}

.meeting-overlay.hidden {
    display: none;
}

/* ==================== 加载遮罩 ==================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.loading-overlay.hidden {
    display: none;
}

.loading-content {
    text-align: center;
    color: var(--text-secondary);
}

.loading-content i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.loading-content p {
    font-size: 1.1rem;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 200px 1fr 300px;
        gap: 1.5rem;
        padding: 1.5rem;
    }
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .step-indicator {
        order: 2;
        position: static;
    }
    
    .step-content {
        order: 1;
    }
    
    .discussion-sidebar {
        order: 3;
        position: static;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .header-left,
    .header-center,
    .header-right {
        width: 100%;
        justify-content: center;
    }
    
    .main-content {
        padding: 1rem;
        gap: 1rem;
    }
    
    .step-content {
        padding: 1.5rem;
    }
    
    .navigation {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .home-container {
        padding: 2rem 1.5rem;
    }
}

/* ==================== 动画 ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* ==================== 滚动条样式 ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--text-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}
