/* 全局样式重置 */
* {
    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.5;
    color: #333;
    background-color: #f5f5f5;
}

/* 容器 */
.container {
    max-width: 100%;
    margin: 0 auto;
    background-color: #fff;
    min-height: 100vh;
}

/* 头部样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: #1890ff;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-left {
    display: flex;
    align-items: center;
}

.back-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    margin-right: 12px;
    padding: 4px;
}

.header h1 {
    font-size: 18px;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    margin-right: 12px;
}

.user-avatar {
    font-size: 18px;
    margin-right: 8px;
}

.user-name {
    font-size: 14px;
}

.menu-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
}

/* 主内容区域 */
.main-content {
    padding: 16px;
}

/* 添加保单区域 */
.add-policy-section {
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    gap: 12px;
}

#policyName {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}

#policyName:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.add-btn {
    padding: 10px 20px;
    background-color: #52c41a;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.add-btn:hover {
    background-color: #73d13d;
}

.add-btn:active {
    background-color: #389e0d;
}

/* 标签页样式 */
.tabs-section {
    margin-bottom: 20px;
}

.tabs {
    display: flex;
    border-bottom: 1px solid #e8e8e8;
}

.tab {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
    position: relative;
}

.tab.active {
    color: #1890ff;
    border-bottom-color: #1890ff;
}

.tab-count {
    display: inline-block;
    background-color: #ff4d4f;
    color: #fff;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 6px;
}

/* 保单列表区域 */
.policies-section {
    background-color: #fff;
    border-radius: 4px;
    overflow: hidden;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 表格样式 */
.policies-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.policies-table th,
.policies-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e8e8e8;
}

.policies-table th {
    background-color: #fafafa;
    font-weight: 600;
    color: #333;
}

.policies-table tr:hover {
    background-color: #f5f5f5;
}

/* 状态样式 */
.status-normal {
    color: #52c41a;
}

.status-invalid {
    color: #ff4d4f;
}

.status-pending {
    color: #faad14;
}

.status-signed {
    color: #1890ff;
}

.status-unsigned {
    color: #faad14;
}

/* 操作按钮样式 */
.action-btn {
    padding: 4px 8px;
    margin-right: 6px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    background-color: #fff;
}

.action-btn.edit {
    color: #1890ff;
    border-color: #1890ff;
}

.action-btn.edit:hover {
    background-color: rgba(24, 144, 255, 0.1);
}

.action-btn.sign {
    color: #52c41a;
    border-color: #52c41a;
}

.action-btn.sign:hover {
    background-color: rgba(82, 196, 26, 0.1);
}

.action-btn.delete {
    color: #ff4d4f;
    border-color: #ff4d4f;
}

.action-btn.delete:hover {
    background-color: rgba(255, 77, 79, 0.1);
}

.action-btn.reinsure {
    color: #faad14;
    border-color: #faad14;
}

.action-btn.reinsure:hover {
    background-color: rgba(250, 173, 20, 0.1);
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: #fff;
    border-radius: 4px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #e8e8e8;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #333;
}

.modal-body {
    padding: 16px;
}

.modal-body input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}

.modal-body input:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px;
    border-top: 1px solid #e8e8e8;
}

.cancel-btn {
    padding: 8px 16px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background-color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.cancel-btn:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.save-btn {
    padding: 8px 16px;
    border: 1px solid #1890ff;
    border-radius: 4px;
    background-color: #1890ff;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.save-btn:hover {
    background-color: #40a9ff;
    border-color: #40a9ff;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

/* 登录提示样式 */
.login-prompt {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.login-prompt.hidden {
    display: none;
}

.login-content {
    text-align: center;
    padding: 40px 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 90%;
}

.login-content h2 {
    font-size: 20px;
    margin-bottom: 16px;
    color: #333;
}

.login-content p {
    font-size: 14px;
    color: #666;
    margin-bottom: 32px;
}

.wechat-login-btn {
    padding: 12px 32px;
    background-color: #07C160;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.wechat-login-btn:hover {
    background-color: #06ad56;
}

.wechat-login-btn:active {
    background-color: #059a4b;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header {
        padding: 10px 12px;
    }
    
    .header h1 {
        font-size: 16px;
    }
    
    .main-content {
        padding: 12px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .tabs {
        overflow-x: auto;
    }
    
    .tab {
        white-space: nowrap;
    }
    
    .policies-table {
        font-size: 12px;
    }
    
    .policies-table th,
    .policies-table td {
        padding: 8px 10px;
    }
    
    .action-btn {
        padding: 2px 6px;
        font-size: 11px;
        margin-right: 4px;
        margin-bottom: 4px;
    }
}
