/* IT 设备管理系统 - 主样式
   主题：白 + 蓝（主色 #1B6AC9）*/

:root {
    --it-primary: #1B6AC9;
    --it-primary-dark: #14549F;
    --it-primary-light: #E8F1FC;
    --it-bg: #F7F9FC;
    --it-card: #FFFFFF;
    --it-border: #E4E9F0;
    --it-text: #1F2733;
    --it-text-secondary: #5A6472;
    --it-text-muted: #8A93A0;
    --it-success: #1D9E75;
    --it-warning: #EF9F27;
    --it-danger: #E24B4A;
    --it-radius: 12px;
    --it-radius-sm: 8px;
    --it-shadow: 0 1px 3px rgba(31, 39, 51, .06);
}

body {
    background: var(--it-bg);
    color: var(--it-text);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

/* ---------- 导航 ---------- */
.app-navbar {
    background: var(--it-card);
    border-bottom: 1px solid var(--it-border);
    box-shadow: var(--it-shadow);
}

.app-navbar .navbar-brand {
    color: var(--it-primary);
    font-weight: 500;
    font-size: 16px;
}

.app-navbar .nav-link {
    color: var(--it-text-secondary);
    font-size: 14px;
    padding: 8px 14px;
    border-radius: var(--it-radius-sm);
}

.app-navbar .nav-link:hover {
    color: var(--it-primary);
    background: var(--it-primary-light);
}

.app-navbar .nav-link.active {
    color: var(--it-primary);
    background: var(--it-primary-light);
    font-weight: 500;
}

/* ---------- 主体 ---------- */
.app-main {
    padding: 20px 24px 40px;
    max-width: 1600px;
}

/* ---------- 卡片 ---------- */
.app-card {
    background: var(--it-card);
    border: 1px solid var(--it-border);
    border-radius: var(--it-radius);
    box-shadow: var(--it-shadow);
    padding: 18px 20px;
    margin-bottom: 16px;
}

.app-card-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--it-text);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--it-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ---------- 统计卡 ---------- */
.stat-card {
    background: var(--it-card);
    border: 1px solid var(--it-border);
    border-radius: var(--it-radius);
    box-shadow: var(--it-shadow);
    padding: 16px 18px;
    height: 100%;
}

.stat-label {
    font-size: 13px;
    color: var(--it-text-muted);
    margin-bottom: 6px;
}

.stat-value {
    font-size: 26px;
    font-weight: 500;
    color: var(--it-text);
    line-height: 1.2;
}

.stat-value.text-primary { color: var(--it-primary); }
.stat-value.text-success { color: var(--it-success); }
.stat-value.text-warning { color: var(--it-warning); }
.stat-value.text-danger { color: var(--it-danger); }

.stat-hint {
    font-size: 12px;
    color: var(--it-text-muted);
    margin-top: 4px;
}

/* ---------- 表格 ---------- */
.app-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

.app-table thead th {
    background: #FAFBFD;
    color: var(--it-text-secondary);
    font-weight: 500;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--it-border);
    white-space: nowrap;
}

.app-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--it-border);
    vertical-align: middle;
}

.app-table tbody tr:hover {
    background: #FAFCFF;
}

.app-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ---------- 状态标签 ---------- */
.status-tag {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 12px;
    line-height: 20px;
    white-space: nowrap;
}

.status-PENDING_INBOUND { background: #E1F5EE; color: #0F6E56; }
.status-IN_STOCK        { background: #F1EFE8; color: #5F5E5A; }
.status-IN_USE          { background: #E6F1FB; color: #185FA5; }
.status-ON_LOAN         { background: #E6F1FB; color: #378ADD; }
.status-REPAIRING       { background: #FAEEDA; color: #854F0B; }
.status-PENDING_DISPOSE { background: #EEEDFE; color: #534AB7; }
.status-DISPOSED        { background: #F1EFE8; color: #444441; }

.status-PENDING_HANDOVER { background: #FAEEDA; color: #854F0B; }
.status-COMPLETED        { background: #E1F5EE; color: #0F6E56; }
.status-CANCELLED        { background: #F1EFE8; color: #8A93A0; }
.status-PENDING_EXECUTE  { background: #FAEEDA; color: #854F0B; }
.status-PENDING_APPROVAL { background: #FAEEDA; color: #854F0B; }
.status-APPROVED         { background: #E1F5EE; color: #0F6E56; }
.status-REJECTED         { background: #FCEBEB; color: #A32D2D; }
.status-RECALLED         { background: #F1EFE8; color: #5F5E5A; }
.status-PARSE_FAILED     { background: #FCEBEB; color: #A32D2D; }
.status-PENDING_INBOUND  { background: #E6F1FB; color: #185FA5; }
.status-DONE             { background: #E1F5EE; color: #0F6E56; }

/* ---------- 时间轴 ---------- */
.timeline {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--it-border);
}

.timeline-item {
    position: relative;
    padding: 0 0 18px 26px;
}

.timeline-dot {
    position: absolute;
    left: 0;
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--it-primary);
    border: 3px solid var(--it-primary-light);
    box-sizing: border-box;
}

.timeline-dot.gray { background: var(--it-text-muted); border-color: #F1EFE8; }
.timeline-dot.green { background: var(--it-success); border-color: #E1F5EE; }
.timeline-dot.orange { background: var(--it-warning); border-color: #FAEEDA; }
.timeline-dot.red { background: var(--it-danger); border-color: #FCEBEB; }

.timeline-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--it-text);
}

.timeline-meta {
    font-size: 12px;
    color: var(--it-text-muted);
    margin-top: 1px;
}

.timeline-desc {
    font-size: 13px;
    color: var(--it-text-secondary);
    margin-top: 3px;
}

/* ---------- 按钮与表单 ---------- */
.btn-primary {
    background: var(--it-primary);
    border-color: var(--it-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--it-primary-dark);
    border-color: var(--it-primary-dark);
}

.btn-outline-primary {
    color: var(--it-primary);
    border-color: var(--it-primary);
}

.btn-outline-primary:hover {
    background: var(--it-primary);
    border-color: var(--it-primary);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--it-primary);
    box-shadow: 0 0 0 3px rgba(27, 106, 201, .12);
}

.form-label {
    font-size: 13px;
    color: var(--it-text-secondary);
    margin-bottom: 5px;
}

.required::after {
    content: ' *';
    color: var(--it-danger);
}

/* ---------- 工具条 ---------- */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 14px;
}

.toolbar .form-control,
.toolbar .form-select {
    width: auto;
    min-width: 130px;
}

.toolbar-spacer {
    flex: 1;
}

/* ---------- 空状态 ---------- */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--it-text-muted);
}

.empty-state i {
    font-size: 40px;
    opacity: .45;
    display: block;
    margin-bottom: 12px;
}

/* ---------- 提示条 ---------- */
.note-bar {
    background: var(--it-primary-light);
    border: 1px solid #B5D4F4;
    border-radius: var(--it-radius-sm);
    padding: 10px 14px;
    font-size: 13px;
    color: #185FA5;
    margin-bottom: 14px;
}

.note-bar.warning {
    background: #FAEEDA;
    border-color: #FAC775;
    color: #854F0B;
}

/* ---------- 分页 ---------- */
.pagination-sm .page-link {
    color: var(--it-text-secondary);
    border-color: var(--it-border);
    padding: 4px 10px;
    font-size: 13px;
}

.pagination-sm .page-item.active .page-link {
    background: var(--it-primary);
    border-color: var(--it-primary);
}

.pagination-sm .page-link:hover {
    color: var(--it-primary);
    background: var(--it-primary-light);
}

/* ---------- 打印 ---------- */
@media print {
    .no-print { display: none !important; }
    body { background: #fff; }
}
