/* ========================================
   龙擎联运开放平台 - 开发者前台通用样式
   官方正式风格
   ======================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f0f2f5;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

a {
    color: #165DFF;
    text-decoration: none;
}
a:hover {
    color: #4080FF;
}

/* ========== 顶部导航 ========== */
.header {
    height: 56px;
    background: #fff;
    border-bottom: 1px solid #e5e6eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.header-left {
    display: flex;
    align-items: center;
}
.logo {
    font-size: 18px;
    font-weight: 600;
    color: #165DFF;
    margin-right: 40px;
    display: flex;
    align-items: center;
}
.logo-icon {
    width: 28px;
    height: 28px;
    margin-right: 10px;
}
.header-nav {
    display: flex;
    align-items: center;
}
.header-nav a {
    display: inline-block;
    padding: 0 16px;
    height: 56px;
    line-height: 56px;
    color: #4e5969;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
}
.header-nav a:hover {
    color: #165DFF;
}
.header-nav a.active {
    color: #165DFF;
    font-weight: 500;
    border-bottom: 2px solid #165DFF;
}
.header-right {
    display: flex;
    align-items: center;
}
.user-info {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #4e5969;
}
.user-info span {
    margin-right: 16px;
}
.user-info a {
    color: #165DFF;
    margin-left: 16px;
    font-size: 14px;
}
.user-info a:hover {
    color: #4080FF;
}

/* ========== 主内容区 ========== */
.main {
    margin-top: 56px;
    padding: 24px;
    min-height: calc(100vh - 56px);
}
.container {
    max-width: 1200px;
    margin: 0 auto;
}
.page-title {
    font-size: 20px;
    font-weight: 600;
    color: #1d2129;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.page-title a {
    font-size: 14px;
    padding: 8px 16px;
    background: #165DFF;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 400;
    transition: background 0.2s;
}
.page-title a:hover {
    background: #4080FF;
}

/* ========== 卡片 ========== */
.card {
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e5e6eb;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e6eb;
    font-size: 16px;
    font-weight: 500;
    color: #1d2129;
}
.card-body {
    padding: 20px;
}

/* ========== 表格 ========== */
.table-card {
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e5e6eb;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    overflow: hidden;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #f2f3f5;
    font-size: 14px;
    color: #4e5969;
}
th {
    background: #f7f8fa;
    font-weight: 500;
    color: #86909c;
    font-size: 13px;
}
tr:last-child td {
    border-bottom: none;
}
tr:hover td {
    background: #f7f8fa;
}

/* ========== 状态标签 ========== */
.status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.5;
}
.status-0 { background: #fff2f0; color: #f53f3f; } /* 待审核/禁用/失败 */
.status-1 { background: #e8ffea; color: #00b42a; } /* 正常/启用/成功 */
.status-2 { background: #fff7e8; color: #ff7d00; } /* 处理中 */
.status-3 { background: #e8f3ff; color: #165DFF; } /* 已完成 */

/* ========== 按钮 ========== */
.btn {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    line-height: 1.5;
}
.btn-sm {
    padding: 4px 12px;
    font-size: 13px;
}
.btn-primary {
    background: #165DFF;
    color: #fff;
    border-color: #165DFF;
}
.btn-primary:hover {
    background: #4080FF;
    border-color: #4080FF;
    color: #fff;
}
.btn-success {
    background: #00b42a;
    color: #fff;
    border-color: #00b42a;
}
.btn-success:hover {
    background: #23c343;
    border-color: #23c343;
    color: #fff;
}
.btn-danger {
    background: #f53f3f;
    color: #fff;
    border-color: #f53f3f;
}
.btn-danger:hover {
    background: #ff7875;
    border-color: #ff7875;
    color: #fff;
}
.btn-warning {
    background: #ff7d00;
    color: #fff;
    border-color: #ff7d00;
}
.btn-warning:hover {
    background: #ff9a2e;
    border-color: #ff9a2e;
    color: #fff;
}
.btn-default {
    background: #fff;
    color: #4e5969;
    border-color: #c9cdd4;
}
.btn-default:hover {
    color: #165DFF;
    border-color: #165DFF;
}

/* ========== 表单 ========== */
.form-card {
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e5e6eb;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    padding: 24px;
    max-width: 600px;
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-size: 14px;
    color: #4e5969;
    margin-bottom: 8px;
    font-weight: 500;
}
.form-group label .required {
    color: #f53f3f;
    margin-left: 2px;
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #c9cdd4;
    border-radius: 4px;
    font-size: 14px;
    color: #1d2129;
    transition: border-color 0.2s;
    background: #fff;
}
.form-group textarea {
    height: auto;
    padding: 8px 12px;
    resize: vertical;
    min-height: 80px;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #165DFF;
    box-shadow: 0 0 0 2px rgba(22, 93, 255, 0.1);
}
.form-group input:disabled, .form-group select:disabled {
    background: #f7f8fa;
    color: #86909c;
    cursor: not-allowed;
}
.form-group .tip {
    font-size: 12px;
    color: #86909c;
    margin-top: 6px;
}
.form-actions {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #f2f3f5;
}

/* ========== 数据统计卡片 ========== */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e5e6eb;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    padding: 20px;
}
.stat-card-title {
    font-size: 14px;
    color: #86909c;
    margin-bottom: 8px;
}
.stat-card-value {
    font-size: 28px;
    font-weight: 600;
    color: #1d2129;
    line-height: 1.2;
}
.stat-card-unit {
    font-size: 14px;
    color: #86909c;
    font-weight: 400;
    margin-left: 4px;
}
.stat-card-desc {
    font-size: 12px;
    color: #86909c;
    margin-top: 8px;
}

/* ========== 搜索栏 ========== */
.search-bar {
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e5e6eb;
    padding: 16px 20px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.search-bar input, .search-bar select {
    height: 32px;
    padding: 0 10px;
    border: 1px solid #c9cdd4;
    border-radius: 4px;
    font-size: 13px;
    color: #4e5969;
}
.search-bar input:focus, .search-bar select:focus {
    outline: none;
    border-color: #165DFF;
}
.search-bar button {
    height: 32px;
    padding: 0 16px;
    background: #165DFF;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
}
.search-bar button:hover {
    background: #4080FF;
}

/* ========== 分页 ========== */
.pagination {
    margin-top: 20px;
    text-align: center;
}
.pagination a, .pagination span {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 2px;
    border: 1px solid #e5e6eb;
    border-radius: 4px;
    font-size: 13px;
    color: #4e5969;
    text-decoration: none;
    background: #fff;
}
.pagination a:hover {
    color: #165DFF;
    border-color: #165DFF;
}
.pagination .current {
    background: #165DFF;
    color: #fff;
    border-color: #165DFF;
}

/* ========== 详情页 ========== */
.detail-card {
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e5e6eb;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.detail-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e6eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.detail-title {
    font-size: 16px;
    font-weight: 500;
    color: #1d2129;
}
.detail-body {
    padding: 20px;
}
.detail-item {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #f2f3f5;
}
.detail-item:last-child {
    border-bottom: none;
}
.detail-label {
    width: 120px;
    color: #86909c;
    font-size: 14px;
    flex-shrink: 0;
}
.detail-value {
    flex: 1;
    color: #1d2129;
    font-size: 14px;
}

/* ========== 响应式 ========== */
@media (max-width: 1200px) {
    .stat-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    .stat-cards {
        grid-template-columns: 1fr;
    }
    .header-nav {
        display: none;
    }
}

/* ========== 通用工具类 ========== */
.text-success {
    color: #00b42a;
    font-weight: 600;
}

.required {
    color: #f53f3f;
    margin-left: 2px;
}

/* ========== 余额卡片 ========== */
.balance-card {
    background: linear-gradient(135deg, #165DFF 0%, #4080FF 100%);
    border-radius: 8px;
    padding: 24px 28px;
    color: #fff;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(22, 93, 255, 0.15);
}

.balance-left .balance-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.balance-left .balance-amount {
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.balance-right {
    display: flex;
    gap: 32px;
}

.balance-item {
    text-align: right;
}

.balance-item-label {
    font-size: 13px;
    opacity: 0.85;
    display: block;
    margin-bottom: 4px;
}

.balance-item-value {
    font-size: 15px;
    font-weight: 500;
}

/* ========== 金额输入框 ========== */
.amount-input-wrap {
    position: relative;
}

.amount-input-wrap input {
    padding-right: 80px;
}

.all-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    padding: 4px 12px;
    background: #f2f3f5;
    color: #165DFF;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.all-btn:hover {
    background: #e8f3ff;
}

/* ========== 费用计算框 ========== */
.fee-box {
    background: #f7f8fa;
    border: 1px solid #e5e6eb;
    border-radius: 6px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.fee-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 14px;
    color: #4e5969;
}

.fee-row.fee-total {
    padding-top: 12px;
    margin-top: 6px;
    border-top: 1px solid #e5e6eb;
    font-size: 16px;
    font-weight: 600;
    color: #1d2129;
}

/* ========== 联系客服卡片 ========== */
.contact-card {
    background: #fff;
    border: 1px solid #e5e6eb;
    border-radius: 8px;
    padding: 24px;
    margin-top: 20px;
}

.contact-title {
    font-size: 16px;
    font-weight: 600;
    color: #1d2129;
    margin-bottom: 16px;
}

.contact-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 24px;
}

.contact-item {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.contact-label {
    color: #86909c;
    width: 70px;
    flex-shrink: 0;
}

.contact-value {
    color: #1d2129;
    font-weight: 500;
}

/* ========== 提示框 ========== */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: #f53f3f;
}

.alert-warning {
    background: #fff7e6;
    border: 1px solid #ffd591;
    color: #ff7d00;
}

.alert-success {
    background: #f2fff7;
    border: 1px solid #b7eb8f;
    color: #00b42a;
}

/* ========== 表单分区 ========== */
.form-section {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f2f3f5;
}

.form-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.form-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #1d2129;
    margin-bottom: 16px;
    padding-left: 8px;
    border-left: 3px solid #165DFF;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
    margin-bottom: 0;
}

/* ========== 应用凭证 ========== */
.app-credential-box {
    background: #f2fff7;
    border: 1px solid #b7eb8f;
    border-radius: 6px;
    padding: 16px 20px;
}

.credential-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
}

.credential-item + .credential-item {
    border-top: 1px dashed #d9f7be;
}

.credential-label {
    width: 90px;
    font-size: 14px;
    color: #4e5969;
    flex-shrink: 0;
    font-weight: 500;
}

.credential-value {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.credential-text {
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 13px;
    color: #1d2129;
    word-break: break-all;
}

/* ========== 按钮尺寸 ========== */
.btn-xs {
    padding: 3px 10px;
    font-size: 12px;
    border-radius: 4px;
}

.btn-sm {
    padding: 6px 16px;
    font-size: 13px;
    border-radius: 4px;
}

.btn-warning {
    background: #ff7d00;
    color: #fff;
    border: 1px solid #ff7d00;
}

.btn-warning:hover {
    background: #ff9a2e;
    border-color: #ff9a2e;
    color: #fff;
}
