/* ============================================
   公共基础样式 - 最后加载，优先级最高
============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f8fafc;
    color: #0f172a;
    font-size: 14px;
    line-height: 1.5;
}

/* ============================================
   表单元素统一样式
============================================ */

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

/* 标签 */
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    margin-bottom: 8px;
}

/* 输入框 */
.form-control,
input.form-control,
select.form-control,
textarea.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
    background: #ffffff;
}

.form-control:focus,
input.form-control:focus,
select.form-control:focus,
textarea.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 文本域 */
textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* 提示文字 */
.form-hint,
small.form-hint,
.form-text {
    display: block;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 6px;
    line-height: 1.4;
}

/* 错误提示 */
.form-error {
    display: block;
    font-size: 12px;
    color: #dc2626;
    margin-top: 6px;
}

/* ============================================
   按钮统一样式
============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: transparent;
    font-family: inherit;
}

.btn-primary {
    background: #0f172a;
    color: white;
}

.btn-primary:hover {
    background: #1e293b;
    transform: translateY(-1px);
}

.btn-outline {
    border: 1px solid #e2e8f0;
    background: white;
    color: #475569;
}

.btn-outline:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-warning {
    background: #f97316;
    color: white;
}

.btn-warning:hover {
    background: #ea580c;
}

.btn-sm {
    padding: 4px 12px;
    font-size: 12px;
}

/* ============================================
   卡片统一样式
============================================ */

.admin-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #eef2f6;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f2f5;
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ============================================
   消息提示统一样式
============================================ */

.alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: #e6f7e6;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* ============================================
   信息框统一样式
============================================ */

.info-box {
    background: #f8fafc;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eef2f6;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #64748b;
    font-size: 14px;
}

.info-value {
    font-weight: 500;
    color: #0f172a;
    font-size: 14px;
}

/* ============================================
   徽章统一样式
============================================ */

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.badge-success {
    background: #e6f7e6;
    color: #2e7d32;
}

.badge-warning {
    background: #fff3e0;
    color: #ef6c00;
}

.badge-secondary {
    background: #eef2f6;
    color: #64748b;
}

/* ============================================
   表格统一样式
============================================ */

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 12px 8px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    border-bottom: 1px solid #eef2f6;
}

.data-table td {
    padding: 14px 8px;
    font-size: 14px;
    border-bottom: 1px solid #f1f5f9;
}

.data-table tr:hover {
    background: #fafcff;
}

/* ============================================
   分页统一样式
============================================ */

.pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.pagination a,
.pagination span {
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    color: #475569;
    font-size: 13px;
}

.pagination .active span {
    background: #0f172a;
    color: white;
    border-color: #0f172a;
}

/* ============================================
   工具类
============================================ */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }

/* ============================================
   头部导航（基础样式，详细在 admin.css）
============================================ */

.admin-header {
    background: #ffffff;
    border-bottom: 1px solid #eef2f6;
    padding: 0 32px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px;
    min-height: calc(100vh - 130px);
}

/* 响应式 */
@media (max-width: 768px) {
    .admin-container {
        padding: 20px;
    }
    
    .admin-card {
        padding: 20px;
    }
    
    .form-control,
    input.form-control,
    select.form-control,
    textarea.form-control {
        font-size: 16px;
        padding: 12px 14px;
    }
}


/* ============================================
   强制覆盖所有表单样式 - 解决样式冲突
============================================ */

/* 强制标签样式 */
.form-label {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #334155 !important;
    margin-bottom: 8px !important;
}

/* 强制输入框样式 */
.form-control,
input.form-control,
select.form-control,
textarea.form-control {
    font-size: 14px !important;
    padding: 10px 14px !important;
    line-height: 1.5 !important;
}

/* 强制提示文字样式 */
.form-hint,
small.form-hint,
.form-text {
    font-size: 12px !important;
    color: #94a3b8 !important;
    margin-top: 6px !important;
    line-height: 1.4 !important;
}

/* 强制文本域样式 */
textarea.form-control {
    font-size: 14px !important;
    font-family: inherit !important;
}