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

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    font-size: 16px;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

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

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

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 24px;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border 0.3s;
}

.form-group input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
}

.btn-login {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.btn-login:hover {
    opacity: 0.9;
}

.error-message {
    margin-top: 15px;
    padding: 10px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
    font-size: 14px;
    text-align: center;
}

/* ====== 卡片样式 ====== */
.card {
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    border: none;
    background: white;
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
    padding: 15px 20px;
    font-size: 18px;
    font-weight: bold;
    color: white;
}

.card-header.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.card-header.bg-success {
    background: linear-gradient(135deg, #1cc88a 0%, #13855c 100%);
}

.card-header.bg-info {
    background: linear-gradient(135deg, #36b9cc 0%, #258391 100%);
}

.card-body {
    padding: 25px;
}

/* ====== 用户信息栏 ====== */
.user-info {
    text-align: right;
    margin-bottom: 20px;
    color: #666;
}

.user-info .btn-sm {
    background-color: #6c757d;
    padding: 5px 10px;
    font-size: 12px;
    margin-left: 10px;
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

/* ====== 选项卡样式 ====== */
.nav-tabs {
    border-bottom: 2px solid #dee2e6;
}

.nav-tabs .nav-link {
    color: #495057;
    font-weight: 500;
    font-size: 16px;
    padding: 12px 25px;
    border: none;
    background: none;
    cursor: pointer;
}

.nav-tabs .nav-link:hover {
    color: #007bff;
}

.nav-tabs .nav-link.active {
    color: #007bff;
    font-weight: 600;
    background: white;
    border-bottom: 2px solid #007bff;
}

.tab-content {
    background: white;
    padding: 25px;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 15px 15px;
    min-height: 500px;
}

iframe.tab-frame {
    width: 100%;
    border: none;
    min-height: 500px;
}

/* ====== 表格样式 ====== */
.table-responsive {
    border-radius: 10px;
    border: 1px solid #dee2e6;
    overflow-x: auto;
}

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

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    padding: 15px 12px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
}

.table td {
    padding: 15px 12px;
    vertical-align: middle;
    border-bottom: 1px solid #dee2e6;
}

.table tr:last-child td {
    border-bottom: none;
}

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

/* ====== 进度条 ====== */
.progress {
    height: 25px;
    border-radius: 15px;
    background-color: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    color: white;
    text-align: center;
    line-height: 25px;
    font-size: 13px;
    transition: width 0.3s;
}

.progress-bar.bg-success { background-color: #1cc88a; }
.progress-bar.bg-warning { background-color: #f6c23e; }
.progress-bar.bg-danger { background-color: #e74a3b; }

/* ====== 表单控件 ====== */
.form-label {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
    display: block;
}

.form-control, .form-select {
    width: 100%;
    font-size: 15px;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #dde0e3;
    transition: all 0.3s;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

textarea.form-control {
    font-size: 15px;
    line-height: 1.5;
    resize: vertical;
}

.form-text {
    font-size: 13px;
    color: #6c757d;
    margin-top: 5px;
    display: block;
}

.form-check {
    margin-bottom: 10px;
}

.form-check-input {
    margin-right: 5px;
}

/* ====== 按钮样式 ====== */
.btn {
    display: inline-block;
    padding: 12px 25px;
    font-size: 16px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #1cc88a 0%, #13855c 100%);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, #36b9cc 0%, #258391 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #e74a3b 0%, #be2617 100%);
    color: white;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 14px;
    margin: 0 3px;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 18px;
}

.btn-close {
    float: right;
    font-size: 20px;
    font-weight: bold;
    line-height: 20px;
    color: #000;
    text-shadow: 0 1px 0 #fff;
    opacity: 0.5;
    background: none;
    border: none;
    cursor: pointer;
}

/* ====== 警告框 ====== */
.alert {
    font-size: 16px;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    position: relative;
}

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

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

.alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.alert-dismissible {
    padding-right: 40px;
}

.alert-dismissible .btn-close {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
}

/* ====== 徽章 ====== */
.badge {
    display: inline-block;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    text-align: center;
}

.badge.bg-danger {
    background-color: #e74a3b;
    color: white;
}

.badge.bg-success {
    background-color: #1cc88a;
    color: white;
}

.badge.bg-warning {
    background-color: #f6c23e;
    color: white;
}

.badge.bg-info {
    background-color: #17a2b8;
    color: white;
}

.badge.bg-light {
    background-color: #f8f9fa;
    color: #333;
}

/* ====== 统计卡片 ====== */
.stats-card {
    transition: all 0.3s;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.stats-card .card-title {
    font-size: 18px;
    margin-bottom: 15px;
    color: rgba(255,255,255,0.9);
}

.stats-card h2 {
    font-size: 42px;
    font-weight: bold;
    margin: 0;
    color: white;
}

/* ====== 表格名称样式 ====== */
.table-name {
    font-weight: 600;
    color: #0056b3;
}

.table-name-fh {
    color: #dc3545;
    font-weight: 700;
}

/* ====== 综合设置页面样式 ====== */
.settings-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.settings-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 8px;
}

.radio-group {
    background: white;
    border-radius: 8px;
    padding: 10px 15px;
    border: 1px solid #dde0e3;
}

.radio-item {
    display: inline-block;
    margin-right: 20px;
}

.radio-item input[type="radio"] {
    margin-right: 5px;
}

/* ====== 话术卡片样式 ====== */
.huashu-card {
    margin-bottom: 20px;
    transition: all 0.3s;
    border: 1px solid #eaeef2;
    border-radius: 8px;
}

.huashu-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.huashu-card .card-header {
    background-color: #f8f9fa;
    color: #333;
    border-radius: 8px 8px 0 0;
    padding: 12px 15px;
}

.huashu-card .card-body {
    padding: 15px;
}

/* ====== 队伍喊话卡片样式 ====== */
.message-card {
    margin-bottom: 15px;
    transition: all 0.3s;
    border: 1px solid #eaeef2;
    border-radius: 8px;
}

.message-card:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.status-badge {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 10px;
}

.status-enabled {
    background-color: #d4edda;
    color: #155724;
}

.status-disabled {
    background-color: #f8d7da;
    color: #721c24;
}

/* ====== 示例文本 ====== */
.example-text {
    background-color: #e9ecef;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 15px;
}

.example-text code {
    background: white;
    padding: 2px 5px;
    border-radius: 4px;
    color: #d63384;
}

/* ====== 颜色工具类 ====== */
.text-success { color: #1cc88a !important; }
.text-danger { color: #e74a3b !important; }
.text-muted { color: #6c757d !important; }
.text-white { color: white !important; }

.bg-primary { background: #667eea; }
.bg-success { background: #1cc88a; }
.bg-info { background: #36b9cc; }
.bg-danger { background: #e74a3b; }
.bg-warning { background: #f6c23e; }

.fw-bold { font-weight: 700 !important; }
.text-center { text-align: center; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.ms-2 { margin-left: 0.5rem; }
.w-100 { width: 100%; }

/* ====== 响应式布局 ====== */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.col-md-2, .col-md-3, .col-md-4, .col-md-6, .col-md-8, .col-md-12 {
    padding: 0 10px;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .col-md-2 { width: 16.666%; }
    .col-md-3 { width: 25%; }
    .col-md-4 { width: 33.333%; }
    .col-md-6 { width: 50%; }
    .col-md-8 { width: 66.666%; }
    .col-md-12 { width: 100%; }
}