/* 专家投票系统 - 高保真原型样式 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
}

#app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 页面切换 */
.page {
    display: none;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.page.active {
    display: block;
}

/* 头部 */
.header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: #169BD5;
    color: white;
}

.header h1 {
    flex: 1;
    font-size: 20px;
    font-weight: 500;
}

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

/* 按钮 */
.btn-primary {
    background: #169BD5;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary:hover {
    background: #1287b8;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

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

.btn-link {
    background: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.5);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.btn-back {
    background: transparent;
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 16px;
    margin-right: 12px;
}

/* 登录页 */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
    text-align: center;
}

.login-container h1 {
    color: #169BD5;
    margin-bottom: 30px;
    font-size: 28px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

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

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: #169BD5;
}

/* 导航网格 */
.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    padding: 30px;
}

.nav-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.nav-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.nav-title {
    font-size: 14px;
    color: #333;
}

/* 内容区 */
.content {
    padding: 20px;
}

/* 投票选项 */
.vote-section {
    margin-bottom: 30px;
}

.vote-section h2 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
}

.candidate-card {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.candidate-card:hover {
    border-color: #169BD5;
    background: #f0f8ff;
}

.candidate-card.selected {
    border-color: #169BD5;
    background: #e6f4ff;
}

.candidate-card input[type="radio"] {
    margin-right: 12px;
}

.candidate-info {
    flex: 1;
}

.candidate-name {
    font-weight: 500;
    margin-bottom: 4px;
}

.candidate-org {
    font-size: 13px;
    color: #666;
}

/* 操作按钮区 */
.action-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

/* 确认框 */
.confirm-box {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
}

.confirm-box h3 {
    margin-bottom: 16px;
    color: #333;
}

#confirm-details {
    background: white;
    padding: 16px;
    border-radius: 4px;
}

/* 进度条 */
.progress-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 24px;
}

.progress-bar {
    height: 24px;
    background: #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #169BD5, #00cc66);
    border-radius: 12px;
    transition: width 0.3s;
}

.progress-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.stat {
    text-align: center;
    padding: 16px;
    background: white;
    border-radius: 8px;
}

.stat-label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

/* 结果表格 */
.result-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
}

.result-table th,
.result-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.result-table th {
    background: #f8f9fa;
    font-weight: 500;
    color: #666;
}

.result-table tr:hover {
    background: #f8f9fa;
}

/* 搜索栏 */
.search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.search-bar input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* 专家列表 */
.expert-list {
    display: grid;
    gap: 12px;
}

.expert-card {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.expert-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #169BD5;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-right: 16px;
}

.expert-details {
    flex: 1;
}

.expert-name {
    font-weight: 500;
    margin-bottom: 4px;
}

.expert-info {
    font-size: 13px;
    color: #666;
}

/* 数据表格 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 500;
}

.data-table .status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.status-badge.active {
    background: #e6f4ea;
    color: #00cc66;
}

.status-badge.inactive {
    background: #fef0f0;
    color: #ff5918;
}

/* 文件列表 */
.file-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.file-card {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.file-icon {
    font-size: 24px;
    margin-right: 12px;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    margin-bottom: 4px;
}

.file-meta {
    font-size: 13px;
    color: #666;
}

/* 设置项 */
.settings-group {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.settings-group h3 {
    margin-bottom: 16px;
    color: #333;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-item label {
    color: #666;
}

.setting-item select,
.setting-item input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 8px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
}

.modal-content h3 {
    margin-bottom: 16px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Toast 提示 */
.toast {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    z-index: 1001;
}

.toast.active {
    display: block;
}

.toast.error {
    background: #ff5918;
}

/* 响应式 */
@media (max-width: 768px) {
    .nav-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .progress-stats {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons button {
        width: 100%;
    }
}
