/* ===== 大理游玩管理后台样式 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #4f6ef7;
  --primary-dark: #3b55d9;
  --grad: linear-gradient(135deg, #4f6ef7 0%, #8b5cf6 100%);
  --bg: #f4f6fb;
  --card: #fff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --danger: #ef4444;
  --ok: #10b981;
  --radius: 12px;
}
body { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }
.hidden { display: none !important; }
.ipt, select.ipt, textarea.ipt {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; font-family: inherit; background: #fff; outline: none; transition: border .15s;
}
.ipt:focus { border-color: var(--primary); }
textarea.ipt { resize: vertical; min-height: 90px; }
label.fld { display: block; margin: 12px 0 4px; font-weight: 600; color: #374151; }
label.fld .req { color: var(--danger); }
.hint { color: var(--muted); font-size: 12px; margin-top: 4px; }

.btn {
  display: inline-block; padding: 9px 18px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--text); font-size: 14px; cursor: pointer; transition: all .15s; font-family: inherit;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary { background: var(--grad); border: none; color: #fff; }
.btn-primary:hover { opacity: .9; color: #fff; }
.btn-danger { background: #fff; color: var(--danger); border-color: #fecaca; }
.btn-danger:hover { background: #fef2f2; border-color: var(--danger); }
.btn-sm { padding: 5px 12px; font-size: 13px; border-radius: 6px; }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.35); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ===== 登录页 ===== */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #4f6ef7 0%, #8b5cf6 55%, #d946ef 100%);
}
.login-card { background: #fff; border-radius: 20px; padding: 40px 36px; width: 360px; box-shadow: 0 20px 60px rgba(30,27,75,.35); text-align: center; }
.login-logo { font-size: 42px; }
.login-card h1 { font-size: 22px; margin: 10px 0 4px; }
.login-sub { color: var(--muted); margin-bottom: 24px; font-size: 13px; }
.login-card .ipt { margin-bottom: 14px; }
.login-msg { color: var(--danger); margin-top: 12px; min-height: 18px; font-size: 13px; }

/* ===== 布局 ===== */
.app { display: flex; min-height: 100vh; }
.side { width: 220px; background: linear-gradient(180deg, #1e2a5e 0%, #2b3f8f 100%); color: #fff; display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; }
.side-logo { padding: 22px 20px; font-size: 18px; font-weight: 700; }
.side-nav { flex: 1; padding: 8px 10px; }
.nav-item { display: block; padding: 12px 14px; border-radius: 8px; color: rgba(255,255,255,.82); text-decoration: none; margin-bottom: 4px; cursor: pointer; transition: background .15s; }
.nav-item:hover { background: rgba(255,255,255,.1); }
.nav-item.active { background: var(--grad); color: #fff; font-weight: 600; }
.side-foot { padding: 16px; border-top: 1px solid rgba(255,255,255,.12); font-size: 13px; }
.side-foot span { display: block; margin-bottom: 10px; opacity: .85; }
.main { flex: 1; margin-left: 220px; padding: 28px 32px; }
.main h2 { font-size: 22px; margin-bottom: 20px; }

/* ===== 仪表盘 ===== */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: 0 2px 10px rgba(31,41,55,.06); }
.stat-num { font-size: 34px; font-weight: 800; }
.stat-label { color: var(--muted); margin-top: 4px; }
.stat-sub { font-size: 12px; color: var(--ok); margin-top: 2px; }
.c1 .stat-num { color: #4f6ef7; } .c2 .stat-num { color: #10b981; } .c3 .stat-num { color: #f59e0b; } .c4 .stat-num { color: #d946ef; }
.panel { background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: 0 2px 10px rgba(31,41,55,.06); }
.quick-list { padding-left: 20px; line-height: 2; color: #374151; }

/* ===== 列表 ===== */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .ipt { width: 240px; }
.toolbar .spacer { flex: 1; }
.tbl { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: 0 2px 10px rgba(31,41,55,.06); }
.tbl th, .tbl td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl th { background: #f9fafb; font-weight: 600; color: #374151; white-space: nowrap; }
.tbl tr:hover td { background: #fafbff; }
.tbl .thumb { width: 64px; height: 44px; object-fit: cover; border-radius: 6px; display: block; }
.tbl .ops { white-space: nowrap; }
.tbl .ops .btn { margin-left: 6px; }
.tag { display: inline-block; background: #eef2ff; color: #4f6ef7; border-radius: 6px; padding: 2px 8px; font-size: 12px; margin-right: 4px; }
.badge-on, .badge-off { display: inline-block; border-radius: 20px; padding: 2px 10px; font-size: 12px; }
.badge-on { background: #d1fae5; color: #047857; }
.badge-off { background: #f3f4f6; color: #6b7280; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 16px; color: var(--muted); }

/* ===== 弹窗 ===== */
.modal-mask { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal { background: #fff; border-radius: 16px; width: 640px; max-width: 94vw; max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 25px 60px rgba(0,0,0,.25); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 17px; }
.modal-close { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--muted); }
.modal-body { padding: 18px 22px; overflow-y: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.switch-row { display: flex; align-items: center; gap: 14px; margin: 12px 0; }
.switch-row label { font-weight: 600; color: #374151; }
.chk { width: 18px; height: 18px; accent-color: var(--primary); }

/* 行程行 */
.itn-row { display: grid; grid-template-columns: 100px 1fr 2.2fr auto; gap: 8px; margin-bottom: 8px; align-items: center; }
.itn-row .ipt { padding: 8px 10px; font-size: 13px; }
.itn-del { background: none; border: none; color: var(--danger); font-size: 18px; cursor: pointer; }

/* 图片上传组件 */
.upd { display: flex; gap: 14px; align-items: flex-start; }
.upd-preview { width: 180px; height: 120px; border-radius: 10px; border: 1px dashed #cbd5e1; background: #f8fafc; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.upd-preview img { width: 100%; height: 100%; object-fit: cover; }
.upd-preview .upd-empty { color: #94a3b8; font-size: 13px; }
.upd-ops { display: flex; flex-direction: column; gap: 8px; }
.upd-list { display: flex; flex-wrap: wrap; gap: 8px; }
.upd-item { position: relative; }
.upd-item img { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; display: block; }
.upd-item .rm { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--danger); color: #fff; border: none; cursor: pointer; font-size: 12px; line-height: 20px; text-align: center; }
