/**
 * 合同管理系统 - 全局样式
 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

a {
    text-decoration: none;
    color: #409eff;
}

a:hover {
    color: #66b1ff;
}

/* ==================== 容器 ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ==================== 首页样式 ==================== */
.welcome-box {
    background: white;
    padding: 60px 40px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    text-align: center;
    margin-top: 50px;
}

.welcome-box h1 {
    font-size: 36px;
    color: #409eff;
    margin-bottom: 20px;
}

.welcome-box > p {
    font-size: 18px;
    color: #666;
    margin-bottom: 40px;
}

.button-group {
    margin: 40px 0;
}

.features {
    margin: 60px 0;
}

.features h2 {
    font-size: 24px;
    margin-bottom: 30px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.feature-item {
    padding: 30px 20px;
    background: #f9fafb;
    border-radius: 8px;
    transition: transform 0.3s;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.feature-item .icon {
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
}

.feature-item h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.feature-item p {
    color: #666;
    font-size: 14px;
}

.info {
    margin-top: 40px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
}

.info p {
    margin: 10px 0;
    font-size: 16px;
}

/* ==================== 按钮样式 ==================== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background-color: #409eff;
    color: white;
}

.btn-primary:hover {
    background-color: #66b1ff;
}

.btn-secondary {
    background-color: #909399;
    color: white;
}

.btn-secondary:hover {
    background-color: #a6a9ad;
}

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

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

/* ==================== 登录/注册页面 ==================== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    color: #409eff;
    font-size: 28px;
    margin-bottom: 10px;
    text-align: center;
}

.login-box h2 {
    font-size: 20px;
    margin-bottom: 30px;
    text-align: center;
    color: #666;
}

.login-divider {
    position: relative;
    text-align: center;
    margin: 20px 0;
    color: #94a3b8;
    font-size: 12px;
}

.login-divider::before,
.login-divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #e2e8f0;
}

.login-divider::before {
    left: 0;
}

.login-divider::after {
    right: 0;
}

.btn-wechat {
    background-color: #07c160;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
}

.btn-wechat:hover {
    background-color: #06a857;
}

.btn-wechat svg {
    width: 18px;
    height: 18px;
}

.wechat-tip {
    text-align: center;
    margin-top: 8px;
    font-size: 12px;
    color: #94a3b8;
}

.version-info {
    font-size: 12px;
    color: #999;
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.version-info span {
    color: #999;
    cursor: default;
    pointer-events: none;
}

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

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

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

.form-group input:focus {
    outline: none;
    border-color: #409eff;
}

.checkbox {
    display: flex;
    align-items: center;
    font-weight: normal;
}

.checkbox input {
    width: auto;
    margin-right: 8px;
}

.form-links {
    margin-top: 20px;
    text-align: center;
    display: flex;
    justify-content: space-between;
}

.message {
    margin-top: 20px;
    padding: 12px;
    border-radius: 4px;
    display: none;
}

.message-info {
    background-color: #ecf5ff;
    color: #409eff;
    border: 1px solid #b3d8ff;
}

.message-success {
    background-color: #f0f9ff;
    color: #67c23a;
    border: 1px solid #b3e19d;
}

.message-error {
    background-color: #fef0f0;
    color: #f56c6c;
    border: 1px solid #fbc4c4;
}

.default-account {
    margin-top: 30px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 4px;
    font-size: 13px;
    color: #666;
    text-align: center;
}

.default-account strong {
    color: #409eff;
}

/* ==================== 仪表盘页面 ==================== */
.dashboard-page {
    background-color: #f5f7fa;
}

.dashboard-container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    min-height: auto;
}

.main-content {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
}

.main-content h2 {
    font-size: 24px;
    margin-bottom: 30px;
    color: #303133;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.stat-icon {
    font-size: 48px;
    margin-right: 20px;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #409eff;
}

.stat-label {
    color: #909399;
    font-size: 14px;
    margin-top: 5px;
}

.section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #303133;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.action-card {
    background: #f9fafb;
    padding: 30px 20px;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s;
    color: #606266;
}

.action-card:hover {
    background: #409eff;
    color: white;
    transform: translateY(-5px);
}

.action-card .icon {
    font-size: 36px;
    display: block;
    margin-bottom: 10px;
}

/* ==================== 表格样式 ==================== */
.table-container {
    overflow-x: auto;
}

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

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

.data-table th {
    background-color: #f5f7fa;
    color: #606266;
    font-weight: 600;
}

.data-table tr:hover {
    background-color: #f5f7fa;
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
    }
    
    .menu {
        display: flex;
        overflow-x: auto;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .action-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .action-card {
        padding: 20px 15px;
    }
    
    .action-card .icon {
        font-size: 32px;
    }
    
    /* 手机端显示快速操作区域，显示所有卡片 */
    .quick-actions-section {
        display: block !important;
    }
    
    /* 确保所有卡片在手机端都显示 */
    .action-card {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
}

