:root {
  --bg: #eef2f8;
  --surface: #ffffff;
  --surface-subtle: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #eff6ff;
  --amber: #d97706;
  --amber-soft: #fef3c7;
  --green: #059669;
  --green-soft: #d1fae5;
  --purple: #7c3aed;
  --purple-soft: #ede9fe;
  --red: #dc2626;
  --red-soft: #fee2e2;
  --radius: 14px;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.14);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  padding-bottom: 88px;
}

/* 顶部导航栏 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.03);
}

.topbar-inner {
  max-width: 1260px;
  margin: 0 auto;
  padding: 11px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.22);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.brand-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.store-badge-btn {
  border: 1px solid #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s;
}

.store-badge-btn:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}

.sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
}

.sync-dot.online {
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.sync-dot.offline {
  background: #ef4444;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.container {
  max-width: 1260px;
  margin: 0 auto;
  padding: 18px;
}

/* 带 3D 彩色插画的搜索横幅区 */
.query-hero {
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 48%, #ffffff 100%);
  border: 1px solid #bfdbfe;
  border-radius: 20px;
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.08);
  position: relative;
  overflow: hidden;
}

.hero-top-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.hero-banner-left {
  flex: 1;
  min-width: 0;
}

.hero-feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.feat-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.pill-blue { background: rgba(37, 99, 235, 0.12); color: #1d4ed8; }
.pill-green { background: rgba(16, 185, 129, 0.14); color: #047857; }
.pill-amber { background: rgba(245, 158, 11, 0.16); color: #b45309; }

.query-title {
  font-size: 21px;
  font-weight: 800;
  color: #0f172a;
}

.query-subtitle {
  font-size: 13.5px;
  color: #334155;
  margin-top: 4px;
  margin-bottom: 10px;
}

.record-count-pill {
  display: inline-block;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 4px 13px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.record-count-pill b {
  color: var(--primary);
  font-size: 14.5px;
}

.hero-banner-art {
  width: 245px;
  height: 138px;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.14);
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: #dbeafe;
}

.hero-banner-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 组合搜索栏 */
.search-row {
  margin-bottom: 14px;
}

.search-combo {
  display: flex;
  align-items: stretch;
  border: 2px solid #60a5fa;
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-combo:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16);
}

.field-select-wrap {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border-right: 1px solid var(--border);
}

.search-field-select {
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  padding: 0 14px;
  height: 100%;
  cursor: pointer;
  outline: none;
}

.search-field-select:hover {
  background: #e2e8f0;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  font-size: 17px;
  pointer-events: none;
}

#searchInput {
  width: 100%;
  padding: 13.5px 86px 13.5px 42px;
  border: none;
  font-size: 15.5px;
  font-weight: 500;
  outline: none;
  background: transparent;
  color: var(--text);
}

.search-kbd {
  position: absolute;
  right: 14px;
  padding: 2px 8px;
  font-size: 12px;
  font-family: monospace;
  color: var(--text-muted);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 6px;
  pointer-events: none;
}

.clear-search {
  position: absolute;
  right: 10px;
  border: none;
  background: #fee2e2;
  color: #dc2626;
  cursor: pointer;
  padding: 5px 11px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
}

.clear-search:hover {
  background: #fecaca;
}

/* 状态胶囊筛选栏 */
.filter-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.right-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sort-select {
  padding: 6.5px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  outline: none;
  cursor: pointer;
}

.status-tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.status-tabs::-webkit-scrollbar {
  display: none;
}

.status-tab {
  border: 1px solid #cbd5e1;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-secondary);
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s;
}

.status-tab:hover {
  border-color: #93c5fd;
  background: #fff;
}

.status-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.25);
}

.status-tab .cnt {
  margin-left: 3px;
  font-size: 11.5px;
  opacity: 0.88;
}

/* 档案卡片网格 */
.records-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(375px, 1fr));
  gap: 16px;
}

.record-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 11px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.record-card.has-history {
  border: 1.5px solid #fbbf24;
}

.record-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.09);
}

/* 多次到店醒目横幅 */
.repeat-visit-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #fcd34d;
  color: #92400e;
  padding: 7px 11px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.repeat-visit-banner:hover {
  filter: brightness(0.97);
}

/* 门店与时间栏 */
.store-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
}

.store-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #e0e7ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
  padding: 3px 10px;
  border-radius: 7px;
  font-weight: 700;
}

.store-tag.unset {
  background: var(--surface-subtle);
  color: var(--text-muted);
  border-color: var(--border);
  font-weight: 500;
}

/* 带彩色手机图标的机型标题栏 */
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.device-brand-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.device-avatar {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.1);
}

.model-title {
  font-size: 17.5px;
  font-weight: 800;
  color: var(--text);
  word-break: break-word;
}

/* 状态胶囊 */
.status-select-chip {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 4.5px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  flex-shrink: 0;
  text-align: center;
}

.status-待维修 { background: var(--amber-soft); color: #b45309; border-color: #fde68a; }
.status-维修中 { background: #dbeafe; color: #1d4ed8; border-color: #93c5fd; }
.status-已修好 { background: var(--green-soft); color: var(--green); border-color: #6ee7b7; }
.status-已交付, .status-已出库 { background: var(--purple-soft); color: var(--purple); border-color: #c4b5fd; }
.status-异常退回 { background: var(--red-soft); color: var(--red); border-color: #fca5a5; }

/* 单号、串码、顾客电话区 */
.meta-codes {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
  color: var(--text-secondary);
  background: #f8fafc;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.code-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.code-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--text);
  word-break: break-all;
}

.copy-btn {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 5px;
  cursor: pointer;
  flex-shrink: 0;
}

.copy-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* 鲜明双色故障与维修对比框 */
.fault-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  font-size: 13px;
}

.fault-item {
  background: #fffbeb;
  border: 1px solid #fde68a;
  padding: 9px 11px;
  border-radius: 10px;
}

.fault-item.repair {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.fault-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 3px;
}

.fault-val {
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
}

/* 单客背景标签 */
.record-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
}

.detail-pill {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: var(--text-secondary);
  padding: 2.5px 9px;
  border-radius: 6px;
}

.detail-pill b {
  color: var(--text);
}

/* 备注与照片 */
.notes-box {
  font-size: 12.5px;
  color: var(--text-secondary);
  background: #f8fafc;
  border-left: 3.5px solid #60a5fa;
  padding: 6px 10px;
  border-radius: 0 7px 7px 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.card-thumbs {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.card-thumbs img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 1.5px solid #cbd5e1;
  cursor: zoom-in;
  transition: transform 0.15s;
}

.card-thumbs img:hover {
  transform: scale(1.06);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  margin-top: auto;
  font-size: 12px;
  color: var(--text-muted);
  gap: 6px;
  flex-wrap: wrap;
}

.card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* 按钮通用 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8.5px 15px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-sm { padding: 6.5px 12px; font-size: 13px; }
.btn-xs { padding: 4.5px 9px; font-size: 12px; border-radius: 7px; }

.btn-primary {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.25);
}
.btn-primary:hover { background: var(--primary-hover); }

.btn-primary-soft {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: #bfdbfe;
}
.btn-primary-soft:hover { background: #dbeafe; }

.btn-amber { background: #f59e0b; color: #fff; }
.btn-danger { background: var(--red); color: #fff; }

.btn-ghost {
  background: #ffffff;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: #f1f5f9; border-color: #cbd5e1; }

.btn-outline {
  background: #fff;
  border-color: #cbd5e1;
  color: var(--text-secondary);
}

.btn-danger-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
  padding: 4px 8px;
  font-size: 12px;
}
.btn-danger-ghost:hover {
  background: var(--red-soft);
  color: var(--red);
}

.btn-link {
  border: none;
  background: none;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
}

/* 带 3D 插画的空状态 */
.empty-state {
  text-align: center;
  padding: 44px 20px;
  background: #ffffff;
  border: 1.5px dashed #cbd5e1;
  border-radius: 20px;
}

.empty-art-img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  margin-bottom: 8px;
}

.empty-state h3 { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.empty-state p { font-size: 13.5px; color: var(--text-secondary); margin-bottom: 20px; }
.empty-actions { display: inline-flex; gap: 10px; }

/* 手机端悬浮按钮 */
.fab {
  position: fixed;
  right: 18px;
  bottom: 22px;
  z-index: 35;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.38);
  cursor: pointer;
}

/* 弹窗 Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.modal-panel {
  background: var(--surface);
  width: 100%;
  max-width: 680px;
  max-height: 92vh;
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-panel.modal-sm { max-width: 500px; }
.modal-panel.modal-xs { max-width: 380px; }

.modal-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 11px;
}

.modal-head-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  flex-shrink: 0;
}

.modal-header h2 { font-size: 17px; font-weight: 800; }
.modal-subtitle { font-size: 12px; color: var(--text-secondary); }

.icon-close {
  border: none;
  background: #f1f5f9;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
}

.modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--surface-subtle);
}

/* 跨店历史预警 */
.history-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fffbeb;
  border: 1.5px solid #f59e0b;
  color: #92400e;
  padding: 10px 13px;
  border-radius: 11px;
  margin-bottom: 14px;
  font-size: 13px;
}

/* 智能粘贴框 */
.smart-paste-box {
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 55%, #f8fafc 100%);
  border: 1px solid #93c5fd;
  border-radius: 13px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.smart-paste-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.smart-badge { font-size: 13.5px; font-weight: 800; color: #1d4ed8; }
.smart-actions { display: flex; align-items: center; gap: 6px; }

#rawPasteInput {
  width: 100%;
  border: 1px solid #93c5fd;
  border-radius: 9px;
  padding: 9px 11px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  background: #fff;
  outline: none;
}

#rawPasteInput:focus { border-color: var(--primary); }

/* 表单网格 */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group.full-width { grid-column: 1 / -1; }

.form-group label {
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 9px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* 传图面板 */
.upload-dropzone {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 15px;
  background: #eff6ff;
  border: 1.5px dashed #60a5fa;
  border-radius: 11px;
  cursor: pointer;
}

.upload-dropzone:hover { background: #dbeafe; }

.upload-cam-badge {
  font-size: 24px;
  line-height: 1;
}

.upload-dropzone-text {
  display: flex;
  flex-direction: column;
}

.upload-dropzone-text b { font-size: 13.5px; color: #1d4ed8; }
.upload-dropzone-text span { font-size: 12px; color: var(--text-secondary); font-weight: 400; }

/* 设置分区 */
.settings-section {
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
  margin-bottom: 14px;
}

.settings-section-title {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 8px;
}

.pin-change-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
}

.pin-change-row input {
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  width: 100%;
}

.thumb-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.thumb-item {
  position: relative;
  width: 68px;
  height: 68px;
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.thumb-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  cursor: pointer;
  line-height: 20px;
  text-align: center;
}

/* 全屏安全登录锁屏页 */
.auth-lockscreen {
  position: fixed;
  inset: 0;
  z-index: 85;
  background: linear-gradient(135deg, #dbeafe 0%, #eef2f8 55%, #e0e7ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.login-card {
  width: 100%;
  max-width: 410px;
  background: #ffffff;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(30, 64, 175, 0.16);
  border: 1px solid #bfdbfe;
}

.login-banner-img {
  width: 100%;
  height: 165px;
  object-fit: cover;
  display: block;
}

.login-card-body {
  padding: 22px 24px 26px;
}

.login-brand-row {
  display: flex;
  align-items: center;
  gap: 11px;
}

.login-brand-row h2 {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

.login-brand-row p {
  font-size: 12.5px;
  color: var(--text-secondary);
}

.login-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.lightbox img {
  max-width: 95vw;
  max-height: 90vh;
  border-radius: 8px;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: all 0.22s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.mobile-only { display: none; }

@media (max-width: 768px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: inline-flex; }

  .query-hero { padding: 15px; }
  .query-title { font-size: 17px; }
  .search-field-select { font-size: 13px; padding: 0 9px; }
  #searchInput { font-size: 14.5px; padding: 11px 68px 11px 36px; }
  .search-icon { left: 11px; font-size: 15px; }

  .records-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .pin-change-row { grid-template-columns: 1fr; }

  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal-panel { max-height: 94vh; border-radius: 18px 18px 0 0; }
}
