/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

/* 通用样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.mb-10 { margin-bottom: 10px !important; }
.mb-20 { margin-bottom: 20px !important; }
.ml-10 { margin-left: 10px !important; }
.mt-15 { margin-top: 15px !important; }
.text-center { text-align: center !important; }
.text-primary { color: #1296db; }

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #1296db;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #0f79b9;
}

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

.btn-primary { background-color: #1296db; }
.btn-secondary { background-color: #6c757d; }
.btn-success { background-color: #28a745; }
.btn-warning { background-color: #ffc107; color: #333; }
.btn-danger { background-color: #dc3545; }

/* 表单样式 */
.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
}

.form-control:focus {
    border-color: #1296db;
    box-shadow: 0 0 0 2px rgba(18, 150, 219, 0.2);
}

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

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.radio-group {
    display: flex;
    gap: 15px;
    margin-top: 5px;
}

.radio-item {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.radio-item input {
    margin-right: 5px;
}

/* 卡片样式 */
.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header {
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
    font-weight: 500;
    font-size: 16px;
}

.card-body {
    padding: 20px;
}

/* 表格样式 */
.table {
    width: 100%;
    min-width: 600px; /* 设置最小宽度 */
    table-layout: fixed; /* 固定表格布局 */
}

.table th,
.table td {
    padding: 8px 12px; /* 减少内边距 */
    text-align: center;
    white-space: nowrap; /* 禁止文本换行 */
    overflow: hidden; /* 超出部分隐藏 */
    text-overflow: ellipsis; /* 显示省略号 */
}

/* 调整各列宽度比例 */
.table th:nth-child(1) { width: 8%; } /* 申请ID */
.table th:nth-child(2) { width: 10%; } /* 车牌号 */
.table th:nth-child(3) { width: 15%; } /* 支付宝 */
.table th:nth-child(4) { width: 15%; } /* 申请时间 */
.table th:nth-child(5) { width: 10%; } /* 金额 */
.table th:nth-child(6) { width: 12%; } /* 状态 */
.table th:nth-child(7) { width: 30%; } /* 备注 */

/* 备注列特殊处理 */
.note-cell {
    white-space: normal; /* 允许备注换行 */
    word-break: break-all; /* 强制换行 */
}

/* 响应式调整 - 小屏幕设备 */
@media (max-width: 768px) {
    .table-responsive {
        overflow-x: auto; /* 小屏幕仍允许横向滚动但优化体验 */
    }
    
    .table th,
    .table td {
        padding: 6px 8px;
        font-size: 14px;
    }
}

.table th {
    background-color: #f8f9fa;
    font-weight: 500;
}

.table-responsive {
    overflow-x: auto;
}

/* 提示框样式 */
.alert {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

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

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

/* 文本颜色 */
.text-success { color: #28a745; }
.text-danger { color: #dc3545; }
.text-warning { color: #ffc107; }
.text-primary { color: #1296db; }

/* 管理员后台样式 */
.admin-body {
    padding-bottom: 20px;
}

.admin-header {
    background-color: #1296db;
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-radius: 8px;
}

.admin-header h1 {
    font-size: 18px;
    font-weight: 500;
}

.admin-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 15px;
}

.logout-btn, .back-btn {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 数据统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    display: flex;
    align-items: center;
    padding: 15px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 24px;
    color: #fff;
}

.bg-primary { background-color: #1296db; }
.bg-success { background-color: #28a745; }
.bg-warning { background-color: #ffc107; }
.bg-info { background-color: #17a2b8; }

.stat-title {
    font-size: 14px;
    color: #666;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

/* 功能导航 */
.func-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.func-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    color: #333;
    text-decoration: none;
    transition: transform 0.3s;
}

.func-item:hover {
    transform: translateY(-5px);
}

.func-item i {
    font-size: 32px;
    color: #1296db;
    margin-bottom: 10px;
}

/* 筛选栏 */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 15px;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 广告预览图 */
.ad-preview {
    width: 80px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

/* 导出选项 */
.export-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.export-icon {
    font-size: 48px;
    color: #1296db;
    margin-bottom: 15px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    overflow: auto;
}

.modal-dialog {
    max-width: 500px;
    margin: 100px auto;
}

.modal-content {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

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

.modal-title {
    font-size: 18px;
    font-weight: 500;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .func-nav {
        grid-template-columns: 1fr 1fr;
    }
    
    .table th, .table td {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .admin-header h1 {
        font-size: 16px;
    }
    
    .modal-dialog {
        max-width: 90%;
        margin: 50px auto;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .func-nav {
        grid-template-columns: 1fr;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .filter-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

.admin-layout {
    display: flex !important;
    min-height: 100vh;
    margin: 0 !important;
    padding: 0 !important;
    background: #f0f2f5;
}

.admin-sidebar {
    width: 220px;
    min-width: 220px;
    background: linear-gradient(180deg, #1a2a3a 0%, #2c3e50 100%);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-logo {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}

.sidebar-logo h2 {
    font-size: 18px !important;
    font-weight: 600;
    color: #fff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 !important;
}

.sidebar-menu {
    flex: 1;
    padding: 15px 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-menu .menu-item {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.7) !important;
    text-decoration: none !important;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

.sidebar-menu .menu-item:hover {
    background: rgba(255,255,255,0.1);
    color: #fff !important;
}

.sidebar-menu .menu-item.active {
    background: rgba(18,150,219,0.3) !important;
    color: #fff !important;
    border-left-color: #1296db;
}

.sidebar-menu .menu-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
    flex-shrink: 0;
}

.sidebar-menu .menu-item span {
    flex: 1;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}

.sidebar-footer .logout-link {
    display: flex !important;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.7) !important;
    text-decoration: none !important;
    padding: 10px 0;
    transition: color 0.3s;
}

.sidebar-footer .logout-link:hover {
    color: #ff6b6b !important;
}

.admin-main {
    flex: 1;
    margin-left: 220px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-topbar {
    background: #fff;
    padding: 15px 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.admin-topbar .page-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.admin-topbar .user-info {
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.admin-content {
    flex: 1;
    padding: 25px;
    background: #f0f2f5;
}

.sidebar-mobile-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 200;
    background: #1296db;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 18px;
}

@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .admin-sidebar.open {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .sidebar-mobile-toggle {
        display: block;
    }
    
    .admin-topbar {
        padding-left: 60px;
    }
}


