/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei',sans-serif;
    background: linear-gradient(135deg,#667eea,#764ba2);
    min-height:100vh; padding:10px;
    line-height:1.5; color:#333;
    -webkit-font-smoothing:antialiased;
}

.page {
    max-width:720px; margin:0 auto;
    background:#fff; border-radius:14px;
    overflow:hidden; box-shadow:0 12px 40px rgba(0,0,0,.25);
}

/* ===== Header ===== */
.header {
    background:linear-gradient(135deg,#667eea,#764ba2);
    color:#fff; padding:20px 18px; text-align:center;
    position: relative;
}
.header h1{ font-size:20px; font-weight:700; }
.subtitle{ font-size:12px; opacity:.85; margin-top:2px; }

/* 前台 → 后台管理按钮 */
.btn-goto-admin {
    position: absolute;
    top: 10px; right: 12px;
    background: transparent !important;
    border: none !important;
    color: rgba(255,255,255,.35) !important;
    font-size: 16px;
    padding: 4px 6px;
    border-radius: 6px;
    text-decoration: none !important;
    transition: .2s;
}
.btn-goto-admin:hover {
    color: rgba(255,255,255,.8) !important;
    background: rgba(255,255,255,.12) !important;
}

/* ===== Query Bar ===== */
.query-bar{
    display:flex; gap:8px; padding:10px 14px;
    background:#f7f8fc; border-bottom:1px solid #eee;
}
.query-bar input{ flex:1; padding:9px 12px;
    border:1.5px solid #ddd; border-radius:8px; font-size:13.5px;
    outline:none; transition:.2s;
}
.query-bar input:focus{ border-color:#667eea; box-shadow:0 0 0 3px rgba(102,126,234,.12); }

/* ===== Form ===== */
.form{ padding:12px 14px; }

/* Section */
.sec{ margin-bottom:14px; }
.sec-compact{ margin-bottom:10px; }
.sec-header{ display:flex; justify-content:space-between; align-items:center;
    margin-bottom:10px; padding-bottom:6px; border-bottom:1.5px solid #f0f0f0; }
.sec-title{ font-size:14px; font-weight:600; color:#667eea; display:flex; align-items:center; gap:4px; }

/* Row layout */
.row{ display:flex; gap:10px; margin-bottom:0; }
.row-3 .field{ flex:1; min-width:0; }

/* 联系人网格：2x2 + 底部全宽快递 */
.contact-grid{
    display:flex;
    flex-wrap:wrap;
    gap:8px 10px;
}
.contact-grid .field{ flex:1 1 calc(50% - 5px); min-width:0; }
.contact-grid .field-full{ flex:1 1 100%; }

/* Field */
.field{ flex:1; min-width:0; margin-bottom:10px; }
.field-grow{ flex:1.4; }
.field-lg{ flex:2.2; }
.field label{ display:block; font-size:12px; color:#555; font-weight:500; margin-bottom:3px; }
.req{ color:#e74c3c; font-size:11px; }

.field input,.field textarea,.field select{
    width:100%; padding:9px 11px;
    border:1.5px solid #e0e0e0; border-radius:7px;
    font-size:13.5px; font-family:inherit; outline:none; transition:.2s;
}
.field input:focus,.field textarea:focus,.field select:focus{
    border-color:#667eea; box-shadow:0 0 0 3px rgba(102,126,234,.1);
}
.field input::placeholder,.field textarea::placeholder{ color:#bbb; }
.field textarea{ resize:vertical; min-height:60px; }

/* ===== 物品卡片 ===== */
.item-card{
    background:#fafbff; border:1.5px solid #eaeef3;
    border-radius:10px; padding:12px; margin-bottom:10px;
    position:relative; transition:.2s;
}
.item-card:hover{ border-color:#c8d4ea; background:#fff; }
.item-card-num{
    position:absolute; top:-8px; left:12px;
    background:linear-gradient(135deg,#667eea,#764ba2); color:#fff;
    font-size:11px; font-weight:700; padding:2px 10px; border-radius:10px;
}
.item-del{
    position:absolute; top:-6px; right:-6px;
    width:24px; height:24px; background:#e74c3c; color:#fff;
    border:none; border-radius:50%; font-size:14px; line-height:1;
    cursor:pointer; display:flex; align-items:center; justify-content:center;
    transition:.15s;
}
.item-del:hover{ background:#c0392b; transform:scale(1.15); }

/* 物品卡片内三列布局：物品名/型号/SN码 */
.item-row-3{ display:flex; gap:8px; margin-top:6px; }
.item-row-3 .field{ margin-bottom:8px; min-width:0; }

/* 故障区域 */
.item-fault{ margin-top:6px; }
.item-fault textarea{ min-height:52px; font-size:13px; }

/* 图片上传 */
.img-upload{
    border:1.5px dashed #d0d8e0; border-radius:8px; padding:12px;
    text-align:center; cursor:pointer; transition:.2s; margin-top:6px;
    background:#fcfdfe;
}
.img-upload:hover{ border-color:#667eea; background:rgba(102,126,234,.02); }
.upload-icon{ font-size:28px; display:block; margin-bottom:2px; }
.upload-text{ font-size:12px; color:#999; }
.upload-hint{ font-size:11px !important; color:#ccc !important; margin-top:2px; }

.img-preview-list{
    display:flex; gap:6px; flex-wrap:wrap; margin-top:8px;
}
.img-preview-item{
    width:56px; height:56px; border-radius:6px; overflow:hidden;
    border:1.5px solid #e0e0e0; position:relative; flex-shrink:0;
}
.img-preview-item img{ width:100%; height:100%; object-fit:cover; }
.img-preview-item .rm-btn{
    position:absolute; top:-4px; right:-4px; width:18px; height:18px;
    background:#e74c3c; color:#fff; border:none; border-radius:50%;
    font-size:11px; line-height:1; cursor:pointer;
    display:flex; align-items:center; justify-content:center;
}

/* 添加按钮 */
.add-item-btn{
    display:block; width:100%; padding:9px;
    border:1.5px dashed #c8d4e8; border-radius:8px;
    background:transparent; color:#667eea; font-size:13px;
    font-weight:600; cursor:pointer; transition:.2s;
}
.add-item-btn:hover{ background:rgba(102,126,234,.05); border-color:#667eea; }

/* ===== Buttons ===== */
.btn{
    display:inline-flex; align-items:center; justify-content:center; gap:4px;
    padding:8px 18px; border:none; border-radius:7px;
    font-size:13.5px; font-weight:500; font-family:inherit;
    cursor:pointer; transition:.2s; white-space:nowrap;
}
.btn-primary{ background:linear-gradient(135deg,#667eea,#764ba2); color:#fff; }
.btn-primary:hover{ transform:translateY(-1px); box-shadow:0 4px 16px rgba(102,126,234,.35); }
/* 取消按钮 — 红色警告风 */
.modal-footer .btn-secondary {
  background: transparent !important;
  color: #c0392b;
  border: 1.5px solid #e74c3c;
  font-weight: 500;
  letter-spacing: .3px;
}
.modal-footer .btn-secondary:hover {
  background: #e74c3c !important;
  border-color: #c0392b;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(231,76,60,.4);
}
.btn-success{ background:linear-gradient(135deg,#27ae60,#2ecc71); color:#fff; }
.btn-success:hover{ transform:translateY(-1px); box-shadow:0 4px 16px rgba(39,174,96,.3); }
.btn-warning{ background:linear-gradient(135deg,#e67e22,#f39c12); color:#fff; }
.btn-warning:hover{ transform:translateY(-1px); box-shadow:0 4px 16px rgba(230,126,34,.35); }
.btn-danger{ background:linear-gradient(135deg,#e74c3c,#c0392b); color:#fff; }
.btn-danger:hover{ transform:translateY(-1px); box-shadow:0 4px 16px rgba(231,76,60,.35); }

/* 前端重置按钮 — 幽灵边框，hover变红 */
.btn-reset-form {
  background: transparent !important;
  color: #8b92a5;
  border: 1.5px solid #d1d6e0;
  font-weight: 500;
}
.btn-reset-form:hover {
  background: #e74c3c !important;
  border-color: #c0392b;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(231,76,60,.4);
}

/* 查询结果弹窗关闭按钮 — 幽灵边框 */
.btn-close-query {
  background: transparent !important;
  color: #8b92a5;
  border: 1.5px solid #d1d6e0;
}
.btn-close-query:hover {
  background: #e74c3c !important;
  border-color: #c0392b;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(231,76,60,.4);
}

/* 返回前台按钮 — 半透明白边框，融入头部渐变 */
.btn-goto-front {
  background: rgba(255,255,255,.12) !important;
  border: 1.5px solid rgba(255,255,255,.35);
  color: #fff;
  letter-spacing: .3px;
  text-decoration: none !important;
}
.btn-goto-front:hover {
  background: rgba(255,255,255,.25) !important;
  border-color: rgba(255,255,255,.55);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 12px rgba(0,0,0,.12);
}

/* 行内删除按钮 — 幽灵边框，hover变红 */
.btn-delete-row {
  background: transparent !important;
  color: #8b92a5;
  border: 1.5px solid #d1d6e0;
}
.btn-delete-row:hover {
  background: #e74c3c !important;
  border-color: #c0392b;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(231,76,60,.4);
}
.btn-outline{ background:transparent; border:1.5px solid #667eea; color:#667eea; }
.btn-outline:hover{ background:#667eea; color:#fff; }
.btn-sm{ padding:6px 14px; font-size:12.5px; }
.btn-xs{ padding:4px 12px; font-size:12px; }
.btn-block{ width:100%; padding:11px; font-size:15px; border-radius:8px; }

/* Actions */
.actions{ display:flex; gap:10px; padding-top:12px; border-top:1.5px solid #f0f0f0; }
.actions .btn{ flex:1; }

/* ===== Success ===== */
.success{ padding:40px 20px; text-align:center; }
.success-icon{ font-size:52px; margin-bottom:12px; }
.success h3{ font-size:20px; color:#27ae60; margin-bottom:6px; }
.success p{ color:#777; font-size:14px; margin-bottom:4px; }
.order-id-text{ color:#333 !important; font-size:15px; margin-top:10px !important; }

.hidden{ display:none !important; }

/* ===== Modal ===== */
.modal{
    position:fixed; inset:0;
    background:rgba(0,0,0,.55); z-index:1200;
    display:flex; align-items:center; justify-content:center;
    backdrop-filter:blur(4px); animation:fadeIn .2s ease;
}
@keyframes fadeIn{ from{opacity:0;} to{opacity:1;} }

.modal-box{
    background:#fff; border-radius:14px;
    width:92%; max-width:700px;
    max-height:88vh; overflow-y:auto;
    box-shadow:0 20px 50px rgba(0,0,0,.25);
}
.modal-lg{ max-width:800px; }
.modal-sm{ max-width:420px; }

.modal-hd{
    display:flex; justify-content:space-between; align-items:center;
    padding:14px 18px;
    background:linear-gradient(135deg,#667eea,#764ba2); color:#fff;
    border-radius:14px 14px 0 0;
}
.modal-hd h2{ font-size:16px; font-weight:600; }
.btn-close{
    background:rgba(255,255,255,.15); border:1.5px solid rgba(255,255,255,.3);
    color:#fff; font-size:18px; line-height:1; cursor:pointer;
    width:28px; height:28px; min-width:28px;
    display:flex; align-items:center; justify-content:center;
    border-radius:50%; transition:.25s ease;
}
.btn-close:hover{
    background:#e74c3c; border-color:#c0392b;
    transform:scale(1.15);
    box-shadow:0 2px 10px rgba(231,76,60,.45);
}
.modal-bd{
    padding:16px 18px;
    max-height:70vh; overflow-y:auto; overscroll-behavior:contain;
}
/* 查询结果弹窗滚动条 */
.modal-bd::-webkit-scrollbar{ width:7px; }
.modal-bd::-webkit-scrollbar-track{ background:transparent; }
.modal-bd::-webkit-scrollbar-thumb{
    background:linear-gradient(180deg,#a8b0c4,#8e99b5);
    border-radius:10px; border:1.5px solid #fff;
    background-clip:padding-box;
}
.modal-bd::-webkit-scrollbar-thumb:hover{
    background:linear-gradient(180deg,#7b869e,#667085);
    border-color:#eee;
}
.modal-ft{
    padding:12px 18px; border-top:1px solid #eee;
    background:#fafafa; display:flex; justify-content:flex-end;
    border-radius:0 0 14px 14px;
}

/* ===== 后台弹窗通用样式（所有弹窗共用）===== */
.modal-content {
    background:#fff; border-radius:14px;
    box-shadow:0 20px 60px rgba(0,0,0,.3);
    display:flex; flex-direction:column;
    overflow:hidden;
}
.modal-content.modal-sm { width:92%; max-width:420px; }
.modal-content.modal-lg { width:94%; max-width:820px; max-height:85vh; }

/* 弹窗内部组件 */
.modal-content > .modal-header {
    display:flex; justify-content:space-between; align-items:center;
    padding:13px 18px;
    background:linear-gradient(135deg,#667eea,#764ba2); color:#fff;
    border-radius:14px 14px 0 0; flex-shrink:0;
}
.modal-content > .modal-header h2 { font-size:16px; font-weight:600; margin:0; }
/* 弹窗关闭按钮 - 强制覆盖 */
.modal-content > .modal-close,
#detailModal .modal-close,
.modal-close {
    background:rgba(255,255,255,.18) !important;
    border:1.5px solid rgba(255,255,255,.35) !important;
    color:#fff !important; font-size:17px !important; line-height:1 !important;
    cursor:pointer !important; outline:none !important;
    width:30px !important; height:30px !important; min-width:30px !important; max-width:30px !important;
    padding:0 !important; margin:0 !important;
    display:inline-flex !important; align-items:center !important; justify-content:center !important;
    border-radius:50% !important; transition:all .25s ease !important;
    font-weight:300 !important; letter-spacing:0 !important;
    text-shadow:none !important; box-shadow:none !important;
}
.modal-content > .modal-close:hover,
#detailModal .modal-close:hover,
.modal-close:hover {
    background:#e74c3c !important;
    border-color:#c0392b !important;
    transform:scale(1.15) !important;
    box-shadow:0 2px 12px rgba(231,76,60,.5) !important;
}
.modal-content > .modal-body {
    padding:14px 18px;
    overflow-y:auto; flex:1; overscroll-behavior:contain;
}

/* ===== 弹窗内美化滚动条 ===== */
.modal-content > .modal-body::-webkit-scrollbar { width:7px; }
.modal-content > .modal-body::-webkit-scrollbar-track {
    background:transparent; margin:4px 0; }
.modal-content > .modal-body::-webkit-scrollbar-thumb {
    background:linear-gradient(180deg,#c5cae0,#a5b4cb);
    border-radius:10px; border:1.5px solid rgba(255,255,255,.8);
}
.modal-content > .modal-body::-webkit-scrollbar-thumb:hover {
    background:linear-gradient(180deg,#9aa8c4,#8496b8); }

/* Firefox 滚动条 */
.modal-content > .modal-body {
    scrollbar-width:thin;
    scrollbar-color: #b5c3d9 transparent;
}
.modal-content > .modal-footer {
    padding:11px 18px; border-top:1px solid #eee;
    background:#fafafa; flex-shrink:0;
    border-radius:0 0 14px 14px;
    display:flex; justify-content:flex-end; gap:10px;
}

/* ===== 后台详情编辑样式 ===== */
/* 详情弹窗 section 标题紧凑化 */
#editOrderForm .detail-item.full-width > h4 {
    font-size:13px; margin-bottom:8px !important; padding-bottom:5px;
}

.edit-field-inline input,
.edit-field-inline select,
.edit-field-inline textarea,
.edit-field input,
.edit-field textarea,
#editOrderForm textarea[name="auditRemark"] {
    width:100%; padding:6px 9px;
    border:1.5px solid #ddd; border-radius:6px;
    font-size:12.5px; transition:border-color .2s;
    outline:none; background:#fff;
}
.edit-field-inline input:focus,
.edit-field-inline select:focus,
.edit-field input:focus,
.edit-field textarea:focus,
#editOrderForm textarea[name="auditRemark"]:focus {
    border-color:#667eea; box-shadow:0 0 0 3px rgba(102,126,234,.1);
}
.edit-field-inline { margin-top:2px; }
.edit-field label {
    display:block; font-size:11.5px; color:#777; font-weight:500;
    margin-bottom:2px;
}
.edit-field { margin-bottom:5px; }
.edit-field textarea {
    resize:vertical; min-height:36px; font-family:inherit;
}

/* 编辑物品卡片 */
.edit-item-card {
    background:#f9fafc; border:1.5px solid #e8ecf1;
    border-radius:8px; padding:10px 12px; margin-bottom:8px;
    transition:border-color .2s;
}
.edit-item-card:hover { border-color:#c5d0e0; }
.edit-item-header {
    display:flex; justify-content:space-between; align-items:center;
    margin-bottom:6px;
}
.edit-row-3 {
    display:grid; grid-template-columns:1fr 1fr 1fr; gap:7px;
}

/* 查询结果卡片 */
.q-card{
    background:linear-gradient(135deg,#fafbff,#f5f7fa);
    border-radius:10px; padding:14px; margin-bottom:12px;
    border-left:4px solid #667eea;
}
.q-card:last-child{ margin-bottom:0; }
.q-hd{ display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.q-id{ font-size:14px; font-weight:700; color:#667eea;
    background:rgba(102,126,234,.07); padding:3px 10px; border-radius:14px; }
.status-badge{ font-size:11px; font-weight:600; padding:3px 10px; border-radius:12px; }
.status-pending{ background:#fff3cd; color:#856404; }
.status-warranty{ background:#d4edda; color:#155724; }
.status-repair{ background:#d1ecf1; color:#0c5460; }
.status-approved{ background:#d4edda; color:#155724; }
.status-rejected{ background:#f8d7da; color:#721c24; }

.q-grid{ display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-bottom:8px; }
.q-item{ background:#fff; padding:8px 10px; border-radius:6px; box-shadow:0 1px 3px rgba(0,0,0,.04); }
.q-label{ font-size:11px; color:#888; margin-bottom:2px; }
.q-val{ font-size:13px; color:#333; font-weight:500; word-break:break-all; }
.q-full{ grid-column:span 2; background:#fff5f5; }
.q-full .q-label{ color:#e74c3c; }
.q-fault-text{ white-space:pre-wrap; font-size:12.5px; }

.q-img-row{ display:flex; gap:6px; flex-wrap:wrap; margin-top:6px; }
.q-thumb{
    width:54px; height:54px; object-fit:cover; border-radius:6px;
    border:1.5px solid #e8e8e8; cursor:pointer; transition:.15s;
}
.q-thumb:hover{ border-color:#667eea; transform:scale(1.06); }
.q-remark{ background:#fffbea; padding:8px 10px; border-radius:6px;
    border-left:3px solid #ffc107; margin-top:8px; font-size:12.5px; color:#856404; font-style:italic; }
.q-ft{ margin-top:8px; padding-top:8px; border-top:1px dashed #ddd; font-size:12px; color:#888; }

/* 多物品展示区 */
.q-items-section{ margin-top:8px; }
.q-item-title{ font-size:12.5px; font-weight:600; color:#667eea; margin-bottom:6px; }
.q-single-item{
    background:white; border:1px solid #eee; border-radius:8px; padding:10px; margin-bottom:8px;
}
.q-single-item:last-child{ margin-bottom:0; }
.q-single-item .q-label{ color:#aaa; }

/* ===== 验证码弹窗 ===== */
.captcha-modal{
    position:fixed; inset:0;
    background:rgba(0,0,0,.5); z-index:1500;
    display:flex; align-items:center; justify-content:center;
    backdrop-filter:blur(3px); animation:fadeIn .2s ease;
}
.captcha-box{
    background:#fff; border-radius:14px; padding:22px 26px;
    width:300px; text-align:center;
    box-shadow:0 16px 48px rgba(0,0,0,.22);
    animation:slideUp .22s ease;
}
@keyframes slideUp{ from{transform:translateY(20px);opacity:0;} to{transform:0;opacity:1;} }
.captcha-hd h3{ font-size:17px; margin-bottom:2px; }
.captcha-hd p{ font-size:12.5px; color:#999; margin-bottom:16px; }
.captcha-bd{ display:flex; flex-direction:column; align-items:center; gap:12px; margin-bottom:18px; }
.cap-canvas{
    border-radius:8px; cursor:pointer;
    border:1.5px solid #e0e0e0; display:block; transition:.2s;
}
.cap-canvas:hover{ border-color:#667eea; box-shadow:0 2px 10px rgba(102,126,234,.15); }
.cap-input{
    width:150px; padding:10px 12px;
    border:1.5px solid #ddd; border-radius:8px;
    font-size:17px; text-align:center; letter-spacing:5px;
    font-weight:700; outline:none; text-transform:uppercase;
    transition:.2s;
}
.cap-input:focus{ border-color:#667eea; box-shadow:0 0 0 3px rgba(102,126,234,.1); }
.captcha-ft{ display:flex; gap:10px; justify-content:center; }
.captcha-ft .btn{ flex:1; }

/* ===== 图片预览弹窗 ===== */
.img-modal{
    position:fixed; inset:0;
    background:rgba(0,0,0,.88); z-index:2000;
    display:flex; align-items:center; justify-content:center;
    backdrop-filter:blur(6px); animation:fadeIn .2s ease;
}
.img-modal-content{ position:relative; text-align:center; animation:zoomIn .25s ease; }
@keyframes zoomIn{ from{transform:scale(.85);opacity:0;} to{transform:1;opacity:1;} }
.preview-img{
    max-width:90vw; max-height:78vh;
    border-radius:10px; object-fit:contain;
}
.btn-img-close{
    position:absolute; top:-38px; right:-10px;
    background:rgba(255,255,255,.2); border:none;
    color:#fff; font-size:30px; width:36px; height:36px;
    line-height:34px; text-align:center; cursor:pointer;
    border-radius:50%;
}
.btn-img-close:hover{ background:rgba(231,76,60,.8); }
.img-caption{ color:rgba(255,255,255,.65); font-size:13px; margin-top:10px; }

/* ===== Admin (keep existing) ===== */
.admin-container{ max-width:1400px; margin:0 auto; background:#fff;
    border-radius:16px; box-shadow:0 20px 60px rgba(0,0,0,.3);
    overflow:hidden; min-height:calc(100vh - 20px); }
.admin-header{ background:linear-gradient(135deg,#667eea,#764ba2); color:#fff;
    padding:20px 24px; display:flex; justify-content:space-between; align-items:center; }
.admin-header h1{ font-size:22px; font-weight:600; }
.header-actions{ display:flex; gap:8px; }

.stats-container{ display:grid; grid-template-columns:repeat(5,1fr); gap:14px; padding:20px; background:#fafafa; }
.stat-card{ background:#fff; padding:18px; border-radius:10px; text-align:center; box-shadow:0 2px 8px rgba(0,0,0,.04); }
.stat-number{ font-size:30px; font-weight:700; margin-bottom:4px; }
.stat-label{ color:#666; font-size:13px; }
.stat-total .stat-number{color:#3498db;}
.stat-pending .stat-number{color:#f39c12;}
.stat-approved .stat-number{color:#27ae60;}
.stat-repair .stat-number{color:#16a34a;}
.stat-rejected .stat-number{color:#e74c3c;}

.filter-bar{ padding:14px 20px; background:#fafafa; border-top:1px solid #eee;
    display:flex; gap:14px; flex-wrap:wrap; align-items:center; }
.filter-group{ display:flex; align-items:center; gap:6px; }
.filter-group label{ font-size:13px; color:#555; font-weight:500; }
.filter-group select{ padding:7px 10px; border:1px solid #ddd; border-radius:6px; font-size:13px; cursor:pointer; }
.search-box{ display:flex; gap:8px; flex:1; max-width:360px; }
.search-box input{ flex:1; padding:7px 10px; border:1px solid #ddd; border-radius:6px; font-size:13px; }

.orders-list{ padding:0 20px 20px; }
.orders-table{ width:100%; border-collapse:collapse; background:#fff; border-radius:8px; overflow:hidden; box-shadow:0 2px 6px rgba(0,0,0,.04); }
.orders-table th{ background:linear-gradient(135deg,#667eea,#764ba2); color:#fff;
    padding:12px 10px; text-align:left; font-weight:600; font-size:12.5px; }
.orders-table td{ padding:12px 10px; border-bottom:1px solid #f0f0f0; font-size:13px; color:#555; }
.orders-table tbody tr:hover{ background:#f9f9f9; }
.orders-table tbody tr:last-child td{ border-bottom:none; }

.action-buttons{ display:flex; gap:6px; }
.action-buttons .btn{ padding:5px 10px; font-size:11.5px; }

.empty-state{ text-align:center; padding:50px 20px; }
.empty-state .empty-icon{ font-size:64px; margin-bottom:14px; display:block; }
.empty-state h3{ color:#999; margin-bottom:6px; }
.empty-state p{ color:#ccc; }

.detail-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:10px; margin-bottom:10px; }
.detail-item{ padding:8px 10px; background:#f9f9f9; border-radius:7px; }
.detail-item.full-width{ grid-column:span 2; }
.detail-label{ font-size:11.5px; color:#888; margin-bottom:2px; text-transform:uppercase; letter-spacing:.3px; }
.detail-value{ font-size:13.5px; color:#333; font-weight:500; word-break:break-all; }

/* 详情弹窗内嵌套网格更紧凑 */
#editOrderForm .detail-item.full-width .detail-grid { gap:8px; margin-bottom:0; }
#editOrderForm .detail-item.full-width .detail-grid .detail-item { padding:6px 8px; }

.fault-images{ display:grid; grid-template-columns:repeat(auto-fill,minmax(130px,1fr)); gap:10px; margin-top:10px; }
.fault-image-item{ border-radius:8px; overflow:hidden; border:1.5px solid #e8e8e8; }
.fault-image-item img{ width:100%; height:130px; object-fit:cover; display:block; }

.audit-actions{ background:#fff3cd; border:1.5px solid #ffc107; border-radius:10px; padding:16px; margin-top:14px; }
.audit-actions h4{ color:#856404; margin-bottom:10px; font-size:14.5px; }
.audit-textarea{ width:100%; padding:10px; border:1px solid #ddd; border-radius:7px;
    font-size:13.5px; resize:vertical; font-family:inherit; margin-bottom:10px; }
.audit-buttons{ display:flex; gap:10px; }


/* ===== 响应式（移动端优先）===== */
@media(max-width:600px){
    body{ padding:6px; }
    .page{ border-radius:10px; }

    /* 头部 */
    .header{ padding:16px 14px; }
    .header h1{ font-size:17px; }
    .subtitle{ font-size:11px; }
    .btn-goto-admin{ top:8px; right:10px; font-size:15px; padding:3px 5px; }

    /* 查询栏 */
    .query-bar{ padding:8px 10px; gap:6px; }
    #queryInput{ font-size:14px; }

    /* 表单 */
    .form{ padding:10px 12px; }

    /* 日期+场所行 → 单列 */
    .row{ flex-direction:column; gap:0; }
    .row-3 .field{ margin-bottom:8px; }
    .row-3 .field:first-child{ flex:auto; width:100%; }

    /* section标题 + 按钮 */
    .sec-header{ margin-bottom:8px; padding-bottom:6px; }
    .sec-title{ font-size:13px; }
    .btn-xs{ font-size:12px; padding:4px 10px; }

    /* 联系人网格移动端单列 */
    .contact-grid{ flex-direction:column; gap:0; }
    .contact-grid .field,
    .contact-grid .field-full{ flex:1 1 100%; }

    /* 提交按钮区 */
    .actions{ flex-direction:column; gap:8px; }
    .btn-block{ width:100%; }

    /* 物品卡片 */
    .item-row-3{ flex-direction:column; gap:6px; }
    .img-preview-list{ gap:4px; }
    .img-preview-item{ width:48px; height:48px; }

    /* 成功提示 */
    .success{ padding:28px 16px; }
    .success-icon{ font-size:44px; }
    .success h3{ font-size:18px; }

    /* 图片预览弹窗 */
    .preview-img{ max-width:95vw; max-height:75vh; border-radius:8px; }
    .btn-img-close{ top:-32px; right:-4px; font-size:22px; width:28px; height:28px; }
    .img-caption{ font-size:12px; }

    /* 查询结果弹窗 */
    .modal-box{ width:96%; border-radius:12px; }
    .modal-hd{ padding:12px 14px; border-radius:12px 12px 0 0; }
    .modal-hd h2{ font-size:15px; }
    .modal-bd{ padding:12px 14px; }
    .q-grid{ grid-template-columns:1fr; }
    .q-full{ grid-column:span 1; }
    .q-thumb{ width:46px; height:46px; }
    .modal-ft{ padding:10px 14px; }

    /* 验证码弹窗 */
    .captcha-box{ width:88%; padding:18px 20px; }
    .cap-input{ width:130px; font-size:15px; letter-spacing:4px; }
    .captcha-hd h3{ font-size:16px; }

    /* Toast 移动端 */
    .toast-container{ top:10px; right:10px; left:10px; align-items:center; }
    .toast{ max-width:100%; font-size:13px; padding:10px 14px; }

    /* ===== Admin 后台移动端 ===== */
    .stats-container{ grid-template-columns:repeat(3,1fr); padding:14px; gap:8px; }
    .stat-card{ padding:12px 8px; }
    .stat-number{ font-size:20px; }
    .stat-label{ font-size:11px; }
    .filter-bar{ flex-direction:column; align-items:stretch; padding:12px 14px; }
    .search-box{ max-width:100%; }
    .orders-table{ font-size:11px; display:block; overflow-x:auto; white-space:nowrap; }
    .orders-table th,.orders-table td{ padding:8px 6px; min-width:70px; }
    .detail-grid{ grid-template-columns:1fr; }
    .detail-item.full-width{ grid-column:span 1; }

    .admin-header{ padding:14px 12px; flex-direction:column; gap:8px; text-align:center; }
    .admin-header h1{ font-size:18px; }
    .header-actions{ justify-content:center; }

    /* 编辑表单移动端 */
    .edit-row-3{ grid-template-columns:1fr; gap:6px; }
    #detailModal .modal-content{ width:97%; max-height:90vh; }
    .modal-content.modal-sm{ width:94%; max-width:340px; }

    /* 登录页移动端 */
    .login-box{ width:88%; padding:28px 24px 22px; border-radius:14px; }
    .login-header h2{ font-size:17px; }
    .login-input{ font-size:14px; padding:11px 12px; letter-spacing:2px; }

    /* 删除/清空确认弹窗 */
    .modal-content.modal-sm .modal-header h2{ font-size:16px; }
    .modal-content.modal-sm .modal-body{ padding:14px 16px; font-size:13px; }
}

@media(min-width:601px) and (max-width:768px){
    /* 平板端：两列布局 */
    .row-3{ flex-wrap:wrap; }
    .row-3 .field{ flex:1 1 calc(33.33% - 8px); }
    .row-3 .field:nth-child(1){ flex:1 1 100% !important; }

    .contact-grid{ grid-template-columns:1fr 1fr; gap:8px; }

    .stats-container{ grid-template-columns:repeat(5,1fr); padding:14px; gap:10px; }
    .stat-number{ font-size:22px; }
}

/* 大屏优化 */
@media(min-width:1024px){
    .page{ max-width:1100px; margin:0 auto; box-shadow:0 4px 30px rgba(0,0,0,.08); border-radius:16px; }
}

/* ===== Toast 提示 ===== */
.toast-container{
    position:fixed; top:20px; right:20px; z-index:9999;
    display:flex; flex-direction:column; gap:8px;
    pointer-events:none;
}
.toast{
    display:flex; align-items:center; gap:8px;
    padding:12px 18px; border-radius:10px;
    font-size:14px; font-weight:500; color:#fff;
    background:#333; box-shadow:0 4px 16px rgba(0,0,0,.2);
    transform:translateX(120%); opacity:0;
    transition:all .3s cubic-bezier(.4,0,.2,1);
    pointer-events:auto; max-width:320px;
}
.toast.show{ transform:translateX(0); opacity:1; }
.toast-icon{ font-size:16px; flex-shrink:0; }
.toast-msg{ line-height:1.4; word-break:break-word; }

/* 类型颜色 */
.toast-success{ background:linear-gradient(135deg,#27ae60,#2ecc71); }
.toast-warning{ background:linear-gradient(135deg,#e67e22,#f39c12); }
.toast-error{ background:linear-gradient(135deg,#e74c3c,#c0392b); }
.toast-info{ background:linear-gradient(135deg,#3498db,#2980b9); }
