/* 全局重置 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Microsoft YaHei", sans-serif; background-color: #f0f2f5; height: 100vh; }

/* 视图容器：默认占满全屏 */
.view-container {
    width: 100%;
    height: 100%;
}

/* --- 登录页样式 --- */
#login-view {
    /* 使用 Flexbox 实现绝对居中 (类似 WPF Grid Center) */
    display: flex;
    justify-content: center;
    align-items: center;
    background: #2c3e50; /*以此深色背景衬托 */
}

.login-box {
    width: 400px;
    padding: 40px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    text-align: center;
}

.login-box h2 { margin-bottom: 30px; color: #333; }

.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: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

#btn-login {
    width: 100%;
    padding: 12px;
    background-color: #1890ff; /* 支付宝蓝 */
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}
#btn-login:hover { background-color: #40a9ff; }

.tip { margin-top: 15px; font-size: 12px; color: #999; }

/* --- 顶部状态栏样式 --- */
.top-bar {
    height: 50px;
    background-color: #1f1f1f; /* 黑灰底色 */
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.actions a { color: #aaa; text-decoration: none; font-size: 14px; }
.actions a:hover { color: #fff; }
.divider { margin: 0 10px; color: #444; }

.workspace { padding: 20px; }

/* --- 工作区工具栏 --- */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: #fff;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.filter-group { display: flex; align-items: center; gap: 10px; }
.filter-group select, .filter-group input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.filter-group input { width: 250px; }

/* 按钮通用样式 */
.btn-primary {
    background: #1890ff; color: #fff; border: none; padding: 8px 16px; 
    border-radius: 4px; cursor: pointer;
}
.btn-primary:hover { background: #40a9ff; }

/* --- 数据表格 --- */
.table-container {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow-x: auto; /* 防止窄屏爆开 */
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

thead { background: #fafafa; border-bottom: 2px solid #f0f0f0; }
th { text-align: left; padding: 16px; color: #333; font-weight: 600; }
td { padding: 16px; border-bottom: 1px solid #f0f0f0; color: #666; vertical-align: top;}

/* 状态标签样式 */
.status-tag {
    display: inline-block; padding: 4px 8px; border-radius: 4px; font-size: 12px;
}
.status-未联系 { background: #fff1f0; color: #f5222d; border: 1px solid #ffa39e; }
.status-已联系 { background: #e6f7ff; color: #1890ff; border: 1px solid #91d5ff; }
.status-有合作意向 { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }

/* 备注样式 */
.remark-text { font-size: 12px; color: #999; margin-top: 4px; display: block;}

/* 分页 */
.pagination { margin-top: 20px; text-align: right; display: flex; justify-content: flex-end; align-items: center; gap: 10px;}
.pagination button { padding: 6px 12px; cursor: pointer; }

/* --- 弹窗 (Modal) 样式 --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); /* 半透明遮罩 */
    display: flex; justify-content: center; align-items: center; /* 居中神器 */
    z-index: 1000;
}

.modal {
    background: #fff; width: 500px; border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    overflow: hidden; 
    animation: fadeIn 0.2s ease; /* 简单的入场动画 */
}

.modal-header {
    padding: 15px 20px; border-bottom: 1px solid #eee;
    display: flex; justify-content: space-between; align-items: center;
    background: #f8f9fa;
}
.modal-header h3 { font-size: 16px; margin: 0; color: #333; }
.close-btn { font-size: 24px; cursor: pointer; color: #999; line-height: 1; }
.close-btn:hover { color: #666; }

.modal-body { padding: 20px; }
.modal-body textarea {
    width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px;
    font-family: inherit; resize: vertical; margin-top: 5px;
}

.modal-footer {
    padding: 15px 20px; border-top: 1px solid #eee;
    text-align: right; background: #f8f9fa;
}

/* 次要按钮样式 */
.btn-secondary {
    background: #fff; border: 1px solid #ddd; color: #666;
    padding: 8px 16px; border-radius: 4px; margin-right: 10px; cursor: pointer;
}
.btn-secondary:hover { color: #333; border-color: #bbb; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

td:nth-child(2), 
td:nth-child(3),
td:nth-child(7),
td:nth-child(8) {
    white-space: nowrap;
}