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

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

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

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

.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

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

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

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

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #667eea;
    color: white;
}

.btn-primary:hover {
    background-color: #5a6fd8;
}

.btn-block {
    width: 100%;
}

.alert {
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
}

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

/* 后台布局 */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: white;
    padding: 20px 0;
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 18px;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: block;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-menu a:hover {
    background-color: rgba(255,255,255,0.1);
    color: white;
}

.sidebar-menu a.active {
    background-color: #3498db;
    color: white;
}

.main-content {
    flex: 1;
    padding: 20px;
    background-color: #f5f5f5;
}

.header {
    background-color: white;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h2 {
    margin: 0;
    font-size: 20px;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-info span {
    margin-right: 10px;
}

.btn-logout {
    background-color: #dc3545;
    color: white;
}

.btn-logout:hover {
    background-color: #c82333;
}

/* 卡片样式 */
.card {
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.card-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.card-header h3 {
    margin: 0;
    font-size: 18px;
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

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

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

/* 按钮样式 */
.btn-sm {
    padding: 5px 10px;
    font-size: 14px;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
}

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

.btn-danger:hover {
    background-color: #c82333;
}

/* 表单样式 */
.form-row {
    display: flex;
    margin: 0 -10px;
}

.form-row .form-group {
    flex: 1;
    margin: 0 10px;
}

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

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.stat-card h4 {
    margin: 0 0 10px;
    font-size: 14px;
    opacity: 0.9;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: bold;
    margin: 10px 0;
}

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

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    width: 100%;
    max-width: 800px;
    min-height: 600px;
    position: relative;
    z-index: 9999999;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

/* 导入车辆模态框特定样式 */
#importVehicleModal .modal-content {
    max-width: 500px;
    min-height: auto;
    padding: 25px;
}

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

#importVehicleModal .form-group:last-of-type {
    margin-bottom: 0;
}

#importVehicleModal input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 2px dashed #667eea;
    border-radius: 8px;
    background-color: #f8f9ff;
    cursor: pointer;
    transition: all 0.3s ease;
}

#importVehicleModal input[type="file"]:hover {
    border-color: #764ba2;
    background-color: #f0f2ff;
}

#importVehicleModal textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    resize: vertical;
    font-family: inherit;
}

#importVehicleModal textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

#importVehicleModal .help-text {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

#importVehicleModal .btn-group {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .admin-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        padding: 10px 0;
    }
    
    .sidebar-menu {
        display: flex;
        overflow-x: auto;
    }
    
    .sidebar-menu li {
        margin: 0 5px;
    }
    
    .sidebar-menu a {
        white-space: nowrap;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-row .form-group {
        margin: 0 0 20px 0;
    }
}

/* 可搜索下拉框样式 */
.searchable-select {
    position: relative;
}

.searchable-select input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.searchable-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 5px 5px;
    z-index: 1000;
    display: none;
}

.searchable-select-options.show {
    display: block;
}

.searchable-select-option {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.searchable-select-option:hover {
    background-color: #f5f5f5;
}

.searchable-select-option:last-child {
    border-bottom: none;
}

.searchable-select-option .plate {
    font-weight: bold;
    color: #333;
}

.searchable-select-option .owner {
    font-size: 14px;
    color: #666;
    margin-left: 10px;
}