/* 问卷系统样式 - 小米风格 */

:root {
    --primary: #FF6900;
    --primary-light: #FFF5F0;
    --primary-dark: #E55D00;
    --secondary: #F5F5F5;
    --success: #22C55E;
    --danger: #EF4444;
    --warning: #F59E0B;
    --info: #0EA5E9;
    --text: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border: #E5E5E5;
    --bg: #F8F9FA;
    --white: #FFFFFF;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

/* 布局 */
.app {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: 240px;
    background: var(--white);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.sidebar-toggle {
    display: none;
}

/* 移动端退出按钮：默认隐藏 */

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    transition: all 0.2s;
}

.nav-item:hover {
    background: var(--secondary);
    color: var(--text);
}

.nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 500;
    color: var(--text);
}

.user-role {
    font-size: 12px;
    color: var(--text-muted);
}

.btn-logout {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
}

.btn-logout:hover {
    background: var(--secondary);
    color: var(--danger);
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: 240px;
    padding: 32px;
    max-width: 1200px;
}

/* 页面头部 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.page-subtitle {
    color: var(--text-secondary);
}

.page-actions {
    display: flex;
    gap: 12px;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

/* 区块 */
.section {
    margin-bottom: 32px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
}

.section-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
}

/* 快速操作 */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.quick-action-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.quick-action-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.quick-action-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-action-title {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.quick-action-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

/* 卡片 */
.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-danger {
    border: 1px solid var(--danger);
}

/* 问卷列表 */
.survey-list {
    display: grid;
    gap: 16px;
}

.survey-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.survey-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.survey-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.survey-title-link {
    text-decoration: none;
    color: inherit;
    flex: 1;
}

.survey-title-link:hover {
    text-decoration: none;
}

.survey-title-link:hover .survey-title {
    color: var(--primary);
}

.survey-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-draft { background: var(--secondary); color: var(--text-secondary); }
.status-published { background: #DCFCE7; color: var(--success); }
.status-paused { background: #FEF3C7; color: var(--warning); }
.status-closed { background: #FEE2E2; color: var(--danger); }

.survey-desc {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 13px;
}

.survey-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.survey-stat, .survey-date, .survey-author {
    display: flex;
    align-items: center;
    gap: 6px;
}

.survey-actions {
    display: flex;
    gap: 8px;
}

/* 分页控件 */
.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #fff;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    margin-top: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.pagination-info {
    font-size: 14px;
    color: var(--text-secondary);
}

.pagination-size {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.pagination-size select {
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    cursor: pointer;
    background: #fff;
}

.pagination-size select:hover {
    border-color: var(--primary);
}

.pagination-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border-radius: 6px;
    font-size: 14px;
    text-decoration: none;
    border: 1px solid #e0e0e0;
    background: #fff;
    color: var(--text);
    cursor: pointer;
    transition: all 0.15s;
}

.page-btn:hover:not(.disabled):not(.active) {
    border-color: var(--primary);
    color: var(--primary);
}

.page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.page-btn.disabled {
    color: #bbb;
    cursor: not-allowed;
    background: #f5f5f5;
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--text);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    background: var(--secondary);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background: #DC2626;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}

.btn-icon:hover {
    background: var(--secondary);
}

.btn-icon.btn-danger:hover {
    background: #FEE2E2;
    color: var(--danger);
}

/* 表单 */
.form {
    max-width: 600px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.required {
    color: var(--danger);
}

/* 表格 */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.data-table th {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 13px;
    white-space: nowrap;
}

.data-table tr:hover {
    background: var(--bg);
}

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-secondary { background: var(--secondary); color: var(--text-secondary); }
.badge-success { background: #DCFCE7; color: var(--success); }
.badge-danger { background: #FEE2E2; color: var(--danger); }

.table-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
}

/* 登录页 */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo svg {
    margin-bottom: 16px;
}

.login-logo h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.login-logo p {
    color: var(--text-secondary);
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-muted);
}

/* 提示 */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

.alert-success {
    background: #DCFCE7;
    color: #166534;
}

.alert-error {
    background: #FEE2E2;
    color: #991B1B;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state.small {
    padding: 40px 20px;
}

.empty-icon {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

/* 两列布局 */
.two-column-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
}

.column-main {
    min-width: 0;
}

.column-side {
    min-width: 0;
}

/* 题目列表 */
.question-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.question-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
}

.question-number {
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.question-content {
    flex: 1;
    min-width: 0;
}

.question-title {
    font-weight: 500;
    margin-bottom: 4px;
}

.question-type {
    font-size: 12px;
    color: var(--text-muted);
}

.question-options-preview {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.question-actions {
    display: flex;
    gap: 4px;
}

.required-badge {
    font-size: 11px;
    color: var(--danger);
    margin-left: 4px;
}

/* 模态框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    position: relative;
    background: var(--white);
    border-radius: var(--radius);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-content form {
    padding: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

/* 题型选择器 */
.type-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.type-option {
    cursor: pointer;
}

.type-option input {
    display: none;
}

.type-option span {
    display: block;
    padding: 10px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    transition: all 0.2s;
}

.type-option input:checked + span {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

/* 选项输入 */
.option-input {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.option-input input {
    flex: 1;
}

/* 快捷链接 */
.quick-links {
    display: flex;
    flex-direction: column;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    color: var(--text);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
    /* button reset */
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
}

.quick-link:hover {
    background: var(--bg);
}

/* 信息列表 */
.info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.info-label {
    color: var(--text-secondary);
}

.info-value {
    color: var(--text);
    font-weight: 500;
}

/* 状态栏 */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--white);
    border-radius: var(--radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.status-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.status-text {
    color: var(--text-secondary);
    font-size: 13px;
}

.status-actions {
    display: flex;
    gap: 8px;
}

/* 统计条 */
.stats-bar {
    display: flex;
    gap: 32px;
    padding: 20px;
    background: var(--white);
    border-radius: var(--radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.stats-bar.large .stat-value {
    font-size: 36px;
}

/* 题目预览 */
.question-preview-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.question-preview-item {
    padding: 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
}

.question-preview-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.question-preview-title-inline {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    line-height: 1.5;
}

.req-star {
    color: #e53e3e;
    font-weight: 700;
    margin-right: 3px;
    font-size: 15px;
}

.question-preview-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.question-preview-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.preview-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

/* 分享链接 */
.share-link {
    display: flex;
    gap: 12px;
}

.share-link input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
}

/* 响应式 */
@media (max-width: 1024px) {
    .two-column-layout {
        grid-template-columns: 1fr;
    }
    
    .column-side {
        order: -1;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 16px 16px 20px;
    }
    
    .sidebar-toggle {
        display: block;
        position: fixed;
        top: 16px;
        left: 16px;
        z-index: 101;
        background: var(--white);
        border: none;
        padding: 10px;
        border-radius: var(--radius-sm);
        box-shadow: var(--shadow);
    }

    .form-row {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        gap: 16px;
    }
    
    .stats-bar {
        flex-wrap: wrap;
    }
}

/* 帮助文本 */
.help-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* 内联表单 */
.inline-form {
    display: inline;
}

/* =============================================
   主题风格系统
   ============================================= */

/* 禅意风 - body.theme-zen */
body.theme-zen {
    --primary:        #7C9E7E;
    --primary-light:  #F0F5F0;
    --primary-dark:   #5E8060;
    --secondary:      #F5F0E8;
    --bg:             #FAFAF6;
    --border:         #DDD8CC;
    --text:           #3A3530;
    --text-secondary: #6B6258;
    --shadow:         0 2px 8px rgba(100,90,80,0.10);
    --shadow-lg:      0 4px 16px rgba(100,90,80,0.14);
    font-family: "STSong", "SimSun", "Noto Serif SC", Georgia, serif;
}
body.theme-zen .sidebar {
    background: #F5F0E8;
    border-right-color: #DDD8CC;
}
body.theme-zen .sidebar-header {
    border-bottom-color: #DDD8CC;
}
body.theme-zen .nav-item:hover {
    background: #EDE8DF;
}
body.theme-zen .nav-item.active {
    background: #E4EDE4;
    color: var(--primary);
}
body.theme-zen .card {
    box-shadow: 0 2px 12px rgba(100,90,80,0.08);
}
body.theme-zen .btn-primary {
    background: var(--primary);
}
body.theme-zen .btn-primary:hover {
    background: var(--primary-dark);
}
body.theme-zen .logo svg rect { fill: var(--primary); }

/* 中国风 - body.theme-chinese */
body.theme-chinese {
    --primary:        #C0392B;
    --primary-light:  #FDF2F0;
    --primary-dark:   #992D22;
    --secondary:      #F7F0ED;
    --bg:             #FAF6F4;
    --border:         #E8D5D0;
    --text:           #2C1A18;
    --text-secondary: #6B4040;
    --shadow:         0 2px 8px rgba(120,60,50,0.10);
    --shadow-lg:      0 4px 16px rgba(120,60,50,0.14);
    font-family: "STKaiti", "KaiTi", "Noto Serif SC", serif;
}
body.theme-chinese .sidebar {
    background: #F2E8E5;
    border-right-color: #E0CBCA;
}
body.theme-chinese .sidebar-header {
    border-bottom-color: #E0CBCA;
    background: linear-gradient(135deg, #F2E8E5 0%, #F9F0EE 100%);
}
body.theme-chinese .nav-item:hover {
    background: #EAD8D5;
}
body.theme-chinese .nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
}
body.theme-chinese .card {
    box-shadow: 0 2px 12px rgba(120,60,50,0.08);
    border-top: 2px solid var(--primary);
}
body.theme-chinese .page-title {
    color: var(--primary);
}
body.theme-chinese .btn-primary {
    background: var(--primary);
}
body.theme-chinese .btn-primary:hover {
    background: var(--primary-dark);
}
body.theme-chinese .logo svg rect { fill: var(--primary); }

/* 森林风 - body.theme-forest */
body.theme-forest {
    --primary:        #2E7D52;
    --primary-light:  #EBF5EF;
    --primary-dark:   #1E5C3A;
    --secondary:      #EEF2ED;
    --bg:             #F3F7F4;
    --border:         #C8D8CC;
    --text:           #1A2E22;
    --text-secondary: #4A6B55;
    --shadow:         0 2px 8px rgba(30,80,50,0.10);
    --shadow-lg:      0 4px 16px rgba(30,80,50,0.14);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
body.theme-forest .sidebar {
    background: #ECF2EE;
    border-right-color: #C8D8CC;
}
body.theme-forest .sidebar-header {
    border-bottom-color: #C8D8CC;
    background: linear-gradient(135deg, #ECF2EE 0%, #F3F7F4 100%);
}
body.theme-forest .nav-item:hover {
    background: #DDE8E0;
}
body.theme-forest .nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
}
body.theme-forest .card {
    box-shadow: 0 2px 12px rgba(30,80,50,0.08);
}
body.theme-forest .btn-primary {
    background: var(--primary);
}
body.theme-forest .btn-primary:hover {
    background: var(--primary-dark);
}
body.theme-forest .logo svg rect { fill: var(--primary); }

/* ========== 主题登录页样式 ========== */

/* 禅意风 登录页 */
body.theme-zen.login-page {
    background: linear-gradient(135deg, #8FAE91 0%, #6B8F6E 100%);
}
body.theme-zen .login-box {
    border-top: 3px solid var(--primary);
    font-family: "STSong", "SimSun", "Noto Serif SC", Georgia, serif;
}
body.theme-zen .login-logo svg rect { fill: var(--primary); }
body.theme-zen .login-logo h1 { color: var(--text); }
body.theme-zen .form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,158,126,0.18); }
body.theme-zen .btn-primary { background: var(--primary); }
body.theme-zen .btn-primary:hover { background: var(--primary-dark); }

/* 中国风 登录页 */
body.theme-chinese.login-page {
    background: linear-gradient(135deg, #C0392B 0%, #8B1A13 100%);
}
body.theme-chinese .login-box {
    border-top: 3px solid var(--primary);
    font-family: "STKaiti", "KaiTi", "Noto Serif SC", serif;
}
body.theme-chinese .login-logo svg rect { fill: var(--primary); }
body.theme-chinese .login-logo h1 { color: var(--text); }
body.theme-chinese .form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(192,57,43,0.18); }
body.theme-chinese .btn-primary { background: var(--primary); }
body.theme-chinese .btn-primary:hover { background: var(--primary-dark); }

/* 森林风 登录页 */
body.theme-forest.login-page {
    background: linear-gradient(135deg, #2E7D52 0%, #1A4A30 100%);
}
body.theme-forest .login-box {
    border-top: 3px solid var(--primary);
}
body.theme-forest .login-logo svg rect { fill: var(--primary); }
body.theme-forest .login-logo h1 { color: var(--text); }
body.theme-forest .form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(46,125,82,0.18); }
body.theme-forest .btn-primary { background: var(--primary); }
body.theme-forest .btn-primary:hover { background: var(--primary-dark); }

/* ==============================================
   移动端原生App体验
   ============================================== */

/* 隐藏 Alpine.js 初始化前的内容 */
[x-cloak] { display: none !important; }

/* 全局触摸优化 */
body {
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior: none;
}

/* 侧边栏遮罩层 - 由 Alpine.js x-show 控制显隐 */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 99;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    animation: overlayFadeIn 0.2s ease;
}
@keyframes overlayFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* 底部导航栏 - 默认隐藏 */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    /* 侧边栏过渡动画优化 */
    .sidebar {
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* 顶栏 Hamburger 按钒优化 */
    .sidebar-toggle {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    .sidebar-toggle:active {
        opacity: 0.7;
        transform: scale(0.95);
    }

    /* 主内容底部留出导航栏空间 */
    .main-content {
        padding-bottom: calc(68px + env(safe-area-inset-bottom));
    }

    /* 展示底部导航 */
    .mobile-bottom-nav {
        display: flex;
        align-items: stretch;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: calc(56px + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
        background: var(--white);
        border-top: 1px solid var(--border);
        box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
        z-index: 98;
    }

    .mobile-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        color: var(--text-muted);
        text-decoration: none;
        font-size: 10px;
        font-weight: 500;
        padding: 6px 0;
        transition: color 0.15s;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    .mobile-nav-item:active {
        background: var(--secondary);
        border-radius: 8px;
    }
    .mobile-nav-item.active {
        color: var(--primary);
    }
    .mobile-nav-item.active svg {
        stroke: var(--primary);
    }
    .mobile-nav-item svg {
        stroke: var(--text-muted);
        transition: stroke 0.15s;
    }

    /* 中间 新建 按钒 */
    .mobile-nav-create-wrap {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        padding-bottom: 4px;
    }
    .mobile-nav-create {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        background: var(--primary);
        border-radius: 50%;
        color: white;
        box-shadow: 0 4px 12px rgba(255,105,0,0.4);
        transition: transform 0.15s, box-shadow 0.15s;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        margin-top: -16px;
    }
    .mobile-nav-create:active {
        transform: scale(0.93);
        box-shadow: 0 2px 6px rgba(255,105,0,0.3);
    }
    .mobile-nav-create svg {
        stroke: white;
    }
}
