/* 重置和基础样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #2c3e50;
    line-height: 1.6;
    font-size: 16px;
}
.status-4 { 
    background-color: #f5e6e8; 
    color: #a94442; 
}

/* 变量定义 */
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --dark-color: #34495e;
    --light-color: #ecf0f1;
    --text-color: #2c3e50;
    --border-radius: 6px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

/* 头部样式 */
header {
    background-color: white;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

header h1 {
    color: var(--dark-color);
    font-size: 1.8rem;
    margin: 0;
}

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

.offer-status {
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

.offer-status.active {
    background-color: var(--secondary-color);
    color: white;
}

.offer-status.inactive {
    background-color: var(--warning-color);
    color: white;
}

/* 按钮样式 */
.btn {
    padding: 10px 16px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    text-decoration: none;
    font-size: 1rem;
    line-height: 1.5;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-success {
    background-color: var(--secondary-color);
    color: white;
}

.btn-success:hover {
    background-color: #27ae60;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-warning {
    background-color: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background-color: #d35400;
}

/* 卡片样式 */
.card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
    font-size: 1rem;
}

input[type="text"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

/* 激活的OFFER显示样式 */
.active-offer-display {
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
    border: 1px solid #ddd;
    margin-bottom: 10px;
}

/* 模态框样式 */
.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-content {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.modal-body {
    padding: 20px;
}

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

/* 警告框样式 */
.alert {
    padding: 12px 15px;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    font-size: 1rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 1rem;
}

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

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: var(--dark-color);
}

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

/* 标签页样式 */
.tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-size: 1rem;
    transition: all 0.3s;
}

.tab.active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 500;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.subtab-content {
    display: none;
}

.subtab-content.active {
    display: block;
}

/* 操作按钮组 */
.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 状态徽章 */
.status-badge {
    padding: 6px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
}

.status-1 { 
    background-color: #e3f2fd; 
    color: #1976d2; 
} /* 未使用 */

.status-2 { 
    background-color: #fff8e1; 
    color: #f57c00; 
} /* 未确认 */

.status-3 { 
    background-color: #e8f5e9; 
    color: #388e3c; 
} /* 已确认 */

/* 消息容器 */
#messageContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
    max-width: 400px;
}

.message {
    padding: 15px;
    margin-bottom: 10px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    animation: slideIn 0.3s ease;
    font-size: 1rem;
    position: relative;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.message:hover {
    opacity: 0.9;
}

.message .close-btn {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
}

.message .close-btn:hover {
    opacity: 1;
}

/* 为错误消息添加特殊样式以便复制 */
.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
    cursor: text;
    user-select: text;
}

.message.error:hover {
    background-color: #f5c6cb;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.message.warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

/* 弹性布局 */
.flex-row {
    display: flex;
    gap: 15px;
}

.flex-row > * {
    flex: 1;
}

/* 登录页面特定样式 */
body.login-page {
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    padding: 20px;
}

.login-container {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-container h2 {
    text-align: center;
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    .container {
        padding: 15px;
    }
    
    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 1rem;
    }
    
    .user-info {
        flex-direction: column;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .tab {
        padding: 8px 12px;
    }
    
    .modal-content {
        width: 95%;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    input[type="text"],
    input[type="password"],
    input[type="number"],
    select,
    textarea {
        padding: 10px;
        font-size: 0.9rem;
    }
}

/* 强制样式重置以确保应用 */
body * {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

input, button, select, textarea {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

/* 确保所有文本元素使用正确字体和大小 */
h1, h2, h3, h4, h5, h6, p, span, div, a {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}
/* 模态框居中显示 */
.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-content {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    margin: auto; /* 确保居中 */
}

/* 确认使用模态框特定样式 */
#confirmUsageModal .modal-content {
    text-align: center;
    padding: 20px;
}

#confirmUsageModal .modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

#confirmUsageModal .form-group {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* 卡号信息样式 */
.card-info {
    margin-top: 5px;
    color: #666;
    font-size: 0.85em;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    #confirmUsageModal .form-group {
        flex-direction: column;
    }
}