/* 后台管理 */
.auth-screen {
  min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr;
  background: #0b1020;
}
.auth-visual {
  position: relative; overflow: hidden; padding: 48px; color: #fff;
  display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(circle at 20% 20%, rgba(99,102,241,.55), transparent 45%),
              radial-gradient(circle at 80% 70%, rgba(236,72,153,.3), transparent 42%),
              linear-gradient(150deg, #111827, #0f172a 55%, #1e1b4b);
}
.auth-visual::after {
  content: ""; position: absolute; inset: 0; opacity: .24;
  background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 42px 42px; mask-image: linear-gradient(to bottom, #000, transparent);
}
.auth-visual > * { position: relative; z-index: 1; }
.auth-brand { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.auth-brand .logo { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, #818cf8, #ec4899); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(129,140,248,.4); }
.auth-hero h1 { font-size: clamp(32px, 4vw, 54px); line-height: 1.15; margin: 0 0 20px; letter-spacing: -.03em; }
.auth-hero p { max-width: 480px; color: rgba(255,255,255,.68); font-size: 16px; line-height: 1.8; }
.auth-features { display: flex; flex-wrap: wrap; gap: 10px; }
.auth-features span { padding: 8px 14px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; font-size: 13px; color: rgba(255,255,255,.82); background: rgba(255,255,255,.05); }
.auth-panel { display: grid; place-items: center; padding: 40px 24px; background: #fff; }
.auth-card { width: min(100%, 400px); }
.auth-card h2 { margin: 0 0 8px; font-size: 28px; letter-spacing: -.02em; }
.auth-card .sub { margin: 0 0 28px; color: var(--muted); font-size: 14px; }
.auth-tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 24px; background: var(--surface-soft); border-radius: 12px; }
.auth-tab { flex: 1; border: 0; background: transparent; color: var(--muted); padding: 10px; border-radius: 9px; font-weight: 700; font-size: 14px; }
.auth-tab.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form .btn { margin-top: 6px; }
.auth-foot { margin-top: 22px; text-align: center; font-size: 12px; color: var(--muted); }

.app-screen { min-height: 100vh; display: flex; }
.sidebar {
  width: 248px; flex: 0 0 248px; background: #0f172a; color: #fff; padding: 24px 16px;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 28px; font-weight: 800; font-size: 18px; }
.sidebar .brand .logo { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #818cf8, #ec4899); display: grid; place-items: center; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: transparent; color: #94a3b8; padding: 12px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; text-align: left; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: rgba(99,102,241,.22); color: #c7d2fe; }
.sidebar-foot { margin-top: auto; padding: 16px 8px 0; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-user { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.avatar { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #6366f1, #ec4899); font-weight: 800; font-size: 14px; }
.sidebar-user .name { font-size: 14px; font-weight: 700; }
.sidebar-user .role { font-size: 11px; color: #64748b; }
.sidebar-foot .btn { width: 100%; background: rgba(255,255,255,.08); }

.main { flex: 1; min-width: 0; padding: 28px 34px 60px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.topbar h1 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.topbar p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.topbar-actions { display: flex; gap: 10px; align-items: center; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.stat-card .label { color: var(--muted); font-size: 12px; font-weight: 600; }
.stat-card .value { margin-top: 6px; font-size: 28px; font-weight: 800; letter-spacing: -.03em; }
.stat-card .trend { margin-top: 4px; font-size: 11px; color: var(--success); }

.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-head h2 { margin: 0; font-size: 17px; }
.section-head p { margin: 3px 0 0; font-size: 12px; color: var(--muted); }
.search-box { position: relative; }
.search-box input { width: 220px; min-height: 38px; padding: 0 12px 0 36px; border: 1px solid var(--line); border-radius: 10px; background: #fff; outline: none; }
.search-box svg { position: absolute; left: 11px; top: 10px; color: var(--muted); }

.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.room-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s;
}
.room-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.room-cover { height: 132px; position: relative; background: linear-gradient(135deg, #312e81, #7c3aed 55%, #db2777); overflow: hidden; }
.room-cover img { width: 100%; height: 100%; object-fit: cover; }
.room-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(15,23,42,.5), transparent 60%); }
.room-cover .room-badge { position: absolute; z-index: 1; left: 14px; top: 14px; background: rgba(255,255,255,.94); color: #e11d48; }
.room-cover .room-count { position: absolute; z-index: 1; right: 14px; bottom: 12px; color: #fff; font-size: 12px; font-weight: 700; }
.room-card-body { padding: 18px; }
.room-card h3 { margin: 0 0 6px; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font-size: 12px; margin-bottom: 16px; }
.room-meta span { display: inline-flex; align-items: center; gap: 5px; }
.room-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.room-actions .btn { padding: 0 6px; }

.settings-card { max-width: 640px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
.settings-card h3 { margin: 0 0 6px; font-size: 17px; }
.settings-card > p { margin: 0 0 24px; color: var(--muted); font-size: 13px; }
.settings-form { display: flex; flex-direction: column; gap: 16px; }

.detail-grid { display: grid; grid-template-columns: 300px 1fr; gap: 24px; }
.detail-info h3 { margin: 0 0 12px; font-size: 19px; }
.detail-cover { width: 100%; height: 160px; object-fit: cover; border-radius: 12px; background: linear-gradient(135deg, #312e81, #db2777); margin-bottom: 14px; }
.detail-kv { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.detail-kv div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.detail-kv span:first-child { color: var(--muted); }
.detail-kv span:last-child { text-align: right; font-weight: 600; }
.share-block { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); margin-bottom: 12px; }
.share-block .label { font-size: 12px; font-weight: 700; color: var(--ink-soft); margin-bottom: 8px; }
.qr-wrap { display: flex; align-items: center; gap: 14px; }
.qr-wrap .qr-box img { width: 116px; height: 116px; }
.detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.detail-photos-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.detail-photos-head h4 { margin: 0; font-size: 15px; }
.photo-grid-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.photo-tile { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface-soft); border: 1px solid var(--line); }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.photo-tile .del { position: absolute; right: 6px; top: 6px; width: 26px; height: 26px; border: 0; border-radius: 8px; background: rgba(15,23,42,.7); color: #fff; font-size: 15px; line-height: 1; opacity: 0; transition: opacity .15s; }
.photo-tile:hover .del { opacity: 1; }

.create-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.create-grid .full { grid-column: 1 / -1; }
.icon-preview { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.icon-preview img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); background: var(--surface-soft); }

@media (max-width: 980px) {
  .auth-screen { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .sidebar { width: 72px; flex-basis: 72px; padding: 18px 10px; align-items: center; }
  .sidebar .brand span:last-child, .nav-item span, .sidebar-user .meta, .sidebar-foot .btn span { display: none; }
  .nav-item { justify-content: center; padding: 12px; }
  .sidebar-foot .btn { padding: 0; }
  .main { padding: 22px 18px 50px; }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr; gap: 10px; }
  .stat-card { padding: 14px 16px; }
  .stat-card .value { font-size: 24px; }
  .topbar { align-items: flex-start; }
  .topbar-actions .btn-ghost { display: none; }
  .search-box input { width: 150px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .create-grid { grid-template-columns: 1fr; }
  .create-grid .full { grid-column: auto; }
  .room-actions { grid-template-columns: 1fr 1fr; }
  .room-actions .btn:last-child { grid-column: span 2; }
}
