/* ===== 短信发送平台 - 样式表 ===== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
    background: #f0f2f5;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: #1890ff;
    text-decoration: none;
}

a:hover {
    color: #40a9ff;
}

/* ===== 登录页 ===== */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-box {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.login-box h1 {
    text-align: center;
    font-size: 28px;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.login-subtitle {
    text-align: center;
    color: #999;
    margin-bottom: 30px;
}

.login-tip {
    text-align: center;
    color: #bbb;
    font-size: 12px;
    margin-top: 20px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form input {
    width: 100%;
    height: 44px;
    font-size: 15px;
}

/* ===== Header ===== */
.header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    padding: 0 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    height: 60px;
}

.logo {
    font-size: 20px;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* ===== Container ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== 统计卡片 ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border-left: 4px solid #e0e0e0;
}

.stat-card.stat-success { border-left-color: #52c41a; }
.stat-card.stat-error   { border-left-color: #ff4d4f; }
.stat-card.stat-info    { border-left-color: #1890ff; }
.stat-card.stat-default { border-left-color: #722ed1; }

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a2e;
}

.stat-value-sm {
    font-size: 18px;
    font-weight: 600;
    color: #722ed1;
}

.stat-label {
    font-size: 13px;
    color: #999;
    margin-top: 4px;
}

/* ===== 提示 ===== */
.alert {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success { background: #f6ffed; border: 1px solid #b7eb8f; color: #389e0d; }
.alert-error   { background: #fff2f0; border: 1px solid #ffccc7; color: #cf1322; }
.alert-warning  { background: #fffbe6; border: 1px solid #ffe58f; color: #d48806; }
.alert-info    { background: #e6f7ff; border: 1px solid #91d5ff; color: #096dd9; }

/* ===== Tab导航 ===== */
.tab-nav {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.tab-item {
    flex: 1;
    text-align: center;
    padding: 14px 10px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.tab-item:hover {
    color: #1890ff;
    background: #fafafa;
}

.tab-item.active {
    color: #1890ff;
    border-bottom-color: #1890ff;
    background: #e6f7ff;
}

/* ===== 卡片 ===== */
.card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-highlight {
    border: 2px solid #1890ff;
}

.card-header {
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-body {
    padding: 20px;
}

/* ===== 表单 ===== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    margin-bottom: 6px;
}

.form-group small {
    display: block;
    color: #999;
    font-size: 12px;
    margin-top: 4px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    background: #fff;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.form-col {
    flex: 1;
    min-width: 200px;
}

.form-actions {
    margin-top: 10px;
}

.char-count {
    color: #999;
    font-size: 12px;
}

/* ===== 按钮 ===== */
.btn {
    display: inline-block;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    text-decoration: none;
    color: #333;
    background: #f0f0f0;
}

.btn:hover {
    opacity: 0.85;
}

.btn-primary {
    background: #1890ff;
    color: #fff;
}

.btn-primary:hover {
    background: #40a9ff;
    color: #fff;
}

.btn-lg {
    padding: 12px 32px;
    font-size: 16px;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-outline {
    background: #fff;
    border: 1px solid #d9d9d9;
    color: #555;
}

.btn-outline:hover {
    border-color: #1890ff;
    color: #1890ff;
}

/* ===== 表格 ===== */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.table th {
    background: #fafafa;
    font-weight: 600;
    color: #555;
}

.table tbody tr:hover {
    background: #fafafa;
}

.table-responsive {
    overflow-x: auto;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: #999;
    font-size: 13px;
    font-weight: 400;
}

.text-error {
    color: #ff4d4f;
}

.text-ellipsis {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-nowrap {
    white-space: nowrap;
}

/* ===== 徽章 ===== */
.badge {
    display: inline-block;
    padding: 2px 10px;
    font-size: 12px;
    border-radius: 10px;
    background: #f0f0f0;
    color: #666;
}

.badge-success {
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.badge-error {
    background: #fff2f0;
    color: #ff4d4f;
    border: 1px solid #ffccc7;
}

.badge-info {
    background: #e6f7ff;
    color: #1890ff;
    border: 1px solid #91d5ff;
}

/* ===== 分页 ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 16px;
}

.pagination-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: 6px;
    border: 1px solid #d9d9d9;
    color: #555;
    font-size: 14px;
    transition: all 0.2s;
}

.pagination-item:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.pagination-item.active {
    background: #1890ff;
    border-color: #1890ff;
    color: #fff;
}

/* ===== API 文档 ===== */
.api-item {
    background: #fafafa;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid #f0f0f0;
}

.api-item pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 13px;
    overflow-x: auto;
    margin-top: 8px;
}

.api-item code {
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 13px;
    color: #e83e8c;
}

h3 {
    font-size: 18px;
    margin: 24px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

/* ===== 过滤器表单 ===== */
.filter-form .form-row {
    align-items: flex-end;
}

/* ===== 页脚 ===== */
.footer {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 13px;
}

/* ===== 删除按钮 ===== */
.btn-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff2f0;
    color: #ff4d4f;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid #ffccc7;
}

.btn-delete:hover {
    background: #ff4d4f;
    color: #fff;
    border-color: #ff4d4f;
}

/* ===== 发送按钮文字 ===== */
.btn-send-text {
    font-size: 12px;
    color: #999;
    margin-left: 8px;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .tab-nav {
        flex-wrap: wrap;
    }
    .tab-item {
        flex: 1 1 50%;
    }
    .form-row {
        flex-direction: column;
    }
    .form-col {
        min-width: 100%;
    }
    .header-inner {
        flex-direction: column;
        height: auto;
        padding: 10px 0;
        gap: 8px;
    }
}
