/* 汉传禅修修持记录系统 - 样式表 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
    background: #f5f0e8;
    color: #333;
    line-height: 1.6;
}

/* 头部导航 */
.header {
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 50%, #CD853F 100%);
    color: #fff;
    padding: 15px 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header .container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 22px;
    font-weight: 500;
    letter-spacing: 2px;
}

.header .user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header .user-info span {
    font-size: 14px;
}

.header .user-info a {
    color: #fff;
    text-decoration: none;
    padding: 5px 15px;
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.3s;
}

.header .user-info a:hover {
    background: rgba(255,255,255,0.2);
}

/* 导航栏 */
.nav {
    background: #fff;
    border-bottom: 1px solid #e8e0d5;
    padding: 0 30px;
}

.nav .container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 5px;
}

.nav a {
    padding: 12px 20px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.nav a:hover,
.nav a.active {
    color: #8B4513;
    border-bottom-color: #8B4513;
}

/* 主内容区 */
.main {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 30px;
}

/* 卡片 */
.card {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #e8e0d5;
}

.card h2 {
    font-size: 18px;
    color: #8B4513;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e8e0d5;
    font-weight: 500;
}

.card h3 {
    font-size: 16px;
    color: #555;
    margin: 15px 0 10px;
    font-weight: 500;
}

/* 登录页 */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f0e8 0%, #e8dcc8 100%);
}

.login-box {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    width: 400px;
    border: 1px solid #e8e0d5;
}

.login-box h1 {
    text-align: center;
    color: #8B4513;
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: 500;
}

.login-box .subtitle {
    text-align: center;
    color: #999;
    margin-bottom: 30px;
    font-size: 14px;
}

/* 表单 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-size: 14px;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #8B4513;
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

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

/* 按钮 */
.btn {
    display: inline-block;
    padding: 10px 25px;
    background: #8B4513;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s;
    font-family: inherit;
}

.btn:hover {
    background: #A0522D;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
}

.btn-secondary {
    background: #f5f0e8;
    color: #8B4513;
    border: 1px solid #d4c4a8;
}

.btn-secondary:hover {
    background: #ebe3d5;
}

.btn-danger {
    background: #c0392b;
}

.btn-danger:hover {
    background: #e74c3c;
}

.btn-sm {
    padding: 6px 15px;
    font-size: 12px;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* 量表列表 */
.scale-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.scale-item {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e8e0d5;
    transition: all 0.3s;
    cursor: pointer;
}

.scale-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #d4c4a8;
}

.scale-item h3 {
    color: #8B4513;
    margin-bottom: 10px;
    font-size: 16px;
}

.scale-item .method-type {
    display: inline-block;
    padding: 3px 10px;
    background: #f5f0e8;
    color: #8B4513;
    border-radius: 12px;
    font-size: 12px;
    margin-bottom: 10px;
}

.scale-item p {
    color: #666;
    font-size: 13px;
    line-height: 1.5;
}

.scale-item .meta {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #f0ebe3;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
}

/* 维度区块 */
.dimension-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #faf7f2;
    border-radius: 8px;
    border-left: 4px solid #8B4513;
}

.dimension-section h3 {
    color: #8B4513;
    margin-bottom: 5px;
    font-size: 17px;
}

.dimension-section .dim-desc {
    color: #888;
    font-size: 13px;
    margin-bottom: 15px;
}

/* 题项 */
.question-item {
    margin-bottom: 20px;
    padding: 15px;
    background: #fff;
    border-radius: 6px;
}

.question-item .question-text {
    font-size: 14px;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.6;
}

.question-item .question-text .q-num {
    color: #8B4513;
    font-weight: 500;
    margin-right: 8px;
}

/* 选项 */
.options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.option-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 15px;
    background: #f5f0e8;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.option-label:hover {
    background: #ebe3d5;
}

.option-label input[type="radio"] {
    accent-color: #8B4513;
}

.option-label.selected {
    background: #8B4513;
    color: #fff;
}

/* 表格 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

table th,
table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e8e0d5;
    font-size: 14px;
}

table th {
    background: #faf7f2;
    color: #555;
    font-weight: 500;
}

table tr:hover {
    background: #faf7f2;
}

/* 得分展示 */
.score-display {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #faf7f2 0%, #f5f0e8 100%);
    border-radius: 8px;
    margin-bottom: 20px;
}

.score-display .score-number {
    font-size: 48px;
    color: #8B4513;
    font-weight: 300;
    margin-bottom: 10px;
}

.score-display .score-label {
    color: #888;
    font-size: 14px;
}

/* 维度得分 */
.dimension-scores {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.dim-score-item {
    padding: 15px;
    background: #faf7f2;
    border-radius: 6px;
    text-align: center;
}

.dim-score-item .dim-name {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.dim-score-item .dim-score {
    font-size: 24px;
    color: #8B4513;
    font-weight: 500;
}

.dim-score-item .dim-max {
    font-size: 12px;
    color: #999;
}

/* 进度条 */
.progress-bar {
    height: 8px;
    background: #e8e0d5;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-bar .progress {
    height: 100%;
    background: linear-gradient(90deg, #8B4513, #CD853F);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* 评语区 */
.comment-section {
    margin-top: 20px;
    padding: 20px;
    background: #f0f7f0;
    border-radius: 8px;
    border-left: 4px solid #27ae60;
}

.comment-section h4 {
    color: #27ae60;
    margin-bottom: 10px;
    font-size: 15px;
}

.comment-section .comment-text {
    color: #555;
    line-height: 1.7;
    font-size: 14px;
}

.comment-section .comment-meta {
    margin-top: 10px;
    font-size: 12px;
    color: #999;
}

/* 学员卡片 */
.student-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.student-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e8e0d5;
    transition: all 0.3s;
}

.student-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.student-card .student-name {
    font-size: 16px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 500;
}

.student-card .student-meta {
    font-size: 13px;
    color: #888;
    margin-bottom: 15px;
}

.student-card .stats {
    display: flex;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid #f0ebe3;
}

.student-card .stat-item {
    text-align: center;
}

.student-card .stat-value {
    font-size: 20px;
    color: #8B4513;
    font-weight: 500;
}

.student-card .stat-label {
    font-size: 12px;
    color: #999;
}

/* 管理端编辑 */
.editor-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e8e0d5;
}

.dimension-editor {
    margin-bottom: 25px;
    padding: 20px;
    background: #faf7f2;
    border-radius: 8px;
    position: relative;
}

.dimension-editor .dim-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.dimension-editor .dim-header h4 {
    color: #8B4513;
    font-size: 16px;
}

.question-editor {
    background: #fff;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.question-editor .q-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

/* 提示消息 */
.alert {
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* 趋势图容器 */
.chart-container {
    height: 300px;
    margin: 20px 0;
    background: #faf7f2;
    border-radius: 8px;
    padding: 20px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 14px;
}

/* 响应式 */
@media (max-width: 768px) {
    .header .container,
    .nav .container,
    .main {
        padding: 0 15px;
    }

    .scale-list,
    .student-grid,
    .dimension-scores {
        grid-template-columns: 1fr;
    }

    .options {
        flex-direction: column;
    }

    .option-label {
        justify-content: flex-start;
    }
}
