/* 废弃车辆管理系统 - 自定义样式 */

:root {
  --sidebar-width: 0px;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f5f7fa;
}

/* 统计卡片 */
.stat-card {
    border: none;
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.stat-card .card-body {
    padding: 1.5rem;
}
.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
}
.stat-card .stat-label {
    font-size: 0.875rem;
    color: #6c757d;
}

/* 图表容器 */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* 表单 */
.form-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.form-card .card-header {
    background: transparent;
    border-bottom: 1px solid #eef0f2;
    padding: 1rem 1.5rem;
    font-weight: 600;
}
.form-section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #495057;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #0d6efd;
    display: inline-block;
}

/* 表格 */
.table-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.table th {
    font-weight: 600;
    white-space: nowrap;
}

/* 状态标签 */
.status-badge {
    padding: 0.35em 0.65em;
    border-radius: 50rem;
    font-size: 0.8rem;
    font-weight: 500;
}

/* 详情页 */
.detail-label {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}
.detail-value {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

/* 空状态 */
.empty-state {
    padding: 3rem 1rem;
    text-align: center;
    color: #adb5bd;
}
.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}

/* 搜索框美化 */
.search-box .input-group-text {
    background: #fff;
    border-right: none;
}
.search-box .form-control {
    border-left: none;
}
.search-box .form-control:focus {
    border-color: #dee2e6;
    box-shadow: none;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .stat-card .stat-value {
        font-size: 1.5rem;
    }
    .chart-container {
        height: 250px;
    }
}

/* 表单分组行 - 组间轻量分隔 */
.form-card .card-body > .row.g-3 {
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px dashed #e9ecef;
}
.form-card .card-body > .row.g-3:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
}

/* 无牌车勾选框 */
.form-check-inline label.form-check-label {
    cursor: pointer;
    font-weight: 400 !important;
}

/* ===== Bootstrap Datepicker BS5 兼容样式 ===== */
.datepicker {
    font-size: 0.9rem;
    padding: 8px;
}
.datepicker table {
    width: 100%;
}
.datepicker table tr td,
.datepicker table tr th {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
    border-radius: 6px;
}
.datepicker .datepicker-switch {
    font-size: 0.95rem;
    font-weight: 600;
}
.datepicker .dow {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
}
.datepicker .prev,
.datepicker .next {
    font-size: 1rem;
    color: #495057;
}
.datepicker .prev:hover,
.datepicker .next:hover {
    background: #e9ecef;
    border-radius: 6px;
}
.datepicker .day {
    border-radius: 6px;
    transition: background 0.15s;
}
.datepicker .day:hover {
    background: #e7f0ff;
}
.datepicker .day.active {
    background: #0d6efd !important;
    color: #fff !important;
}
.datepicker .day.today {
    color: #0d6efd;
    font-weight: 700;
}
.datepicker .day.today.active {
    color: #fff;
}

/* 日期输入框：添加日历图标提示 */
input.datepicker-input {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='%236c757d' d='M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5M2 2a1 1 0 0 0-1 1v1h14V3a1 1 0 0 0-1-1zm13 3H1v9a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    background-size: 16px 16px;
    padding-right: 2.2rem;
    cursor: pointer;
}
input.datepicker-input::placeholder {
    color: #adb5bd;
    font-size: 0.85rem;
}

/* datalist 下拉输入框：添加下拉箭头提示可展开 */
input[list] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

/* 下拉框 placeholder 灰色文字 */
/* :has() 选择器：当选中 disabled 占位选项时显示灰色，选中真实选项后恢复正常 */
select.select-placeholder:has(> option[value=""]:checked) {
    color: #adb5bd;
}
/* Firefox 不支持 :has() 的兼容写法：通过 JS 辅助（见 main.js） */

/* 车辆状态多选下拉按钮 */
.vs-dropdown-btn {
    cursor: pointer;
    white-space: normal;
    min-height: 38px;
}
.vs-dropdown-btn:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* 下拉面板：确保与按钮等宽，不裁剪复选框 */
.vs-dropdown-panel {
    width: 100%;
    padding: 0.35rem 0.25rem !important;
    box-sizing: border-box;
}
.vs-dropdown-panel .form-check {
    margin: 0;
    padding-left: 1.5em;
}
.vs-dropdown-panel .form-check-input {
    margin-left: -1.5em;
}

/* 下拉框内选项悬停高亮 */
.vs-dropdown-item {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    cursor: pointer;
}
.vs-dropdown-item:hover {
    background-color: #f0f4ff;
}

