@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #2c6cff;
  --primary-foreground: #ffffff;
  --foreground: #0a1120;
  --background: #f5f6f8;
  --card: #ffffff;
  --muted: #fafafb;
  --muted-foreground: #898c93;
  --secondary: #e2efff;
  --accent: #f3f8fe;
  --accent-foreground: #165dff;
  --border: #e9e9e9;
  --destructive: #f84721;
  --yellow: #f5a623;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--background);
  color: var(--foreground);
  min-height: 100vh;
  min-height: 100dvh;
}

a { color: inherit; text-decoration: none; }
input, textarea, button, select { font-family: inherit; outline: none; }
input::placeholder, textarea::placeholder { color: var(--muted-foreground); }

.page { display: none; min-height: 100vh; min-height: 100dvh; }
.page.active { display: flex; flex-direction: column; }

.header-blue {
  background: var(--primary);
  padding: 48px 20px 24px;
  padding-top: calc(48px + env(safe-area-inset-top, 0px));
}
.header-blue h1 { font-size: 20px; font-weight: 700; color: var(--primary-foreground); }
.header-blue p { color: rgba(255,255,255,0.7); font-size: 12px; margin-top: 4px; }
.header-greeting { margin-top: 14px; }
.greeting-date { font-size: 13px; color: rgba(255,255,255,0.85); line-height: 1.6; }
.greeting-msg { font-size: 15px; color: #fff; font-weight: 600; line-height: 1.6; }

.biz-tabs { display:flex;gap:0;margin-bottom:12px;background:var(--card);border-radius:12px;padding:4px;border:1px solid var(--border); }
.biz-tab { flex:1;padding:8px 0;border:none;background:none;font-size:13px;font-weight:500;color:var(--muted-foreground);cursor:pointer;border-radius:10px;transition:all 0.2s; }
.biz-tab.active { background:var(--primary);color:#fff;box-shadow:0 1px 4px rgba(0,0,0,0.1); }
.biz-panel { display:none; }
.biz-panel.active { display:block; }

.card {
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.card-plain {
  background: var(--card);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.content { padding: 0 16px; display: flex; flex-direction: column; gap: 16px; }
.content-pb { padding-bottom: 96px; }

.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border);
}
.section-header .icon { width: 16px; height: 16px; color: var(--primary); flex-shrink: 0; }
.section-header span { font-weight: 600; font-size: 14px; color: var(--foreground); }

.input-group { padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }

.input-row {
  display: flex;
  align-items: center;
  background: var(--muted);
  border-radius: 12px;
  padding: 8px 12px;
  gap: 8px;
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}
.input-row:focus-within { border-color: var(--primary); }
.input-row .input-icon { width: 16px; height: 16px; color: var(--muted-foreground); flex-shrink: 0; }
.input-row input, .input-row select {
  flex: 1;
  background: transparent;
  border: none;
  font-size: 12px;
  color: var(--foreground);
}
.input-row .btn-clear { padding: 0; background: none; border: none; cursor: pointer; }

.empty-state { padding: 32px 16px; text-align: center; color: var(--muted-foreground); font-size: 14px; }

.list-divider > * + * { border-top: 1px solid var(--border); }

.announce-item {
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}
.announce-item:active { background: var(--muted); }
.announce-item .ann-content { flex: 1; min-width: 0; }
.announce-item .ann-tags { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.announce-item .tag {
  font-size: 11px;
  background: var(--secondary);
  color: var(--accent-foreground);
  padding: 2px 8px;
  border-radius: 12px;
  flex-shrink: 0;
}
.tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 12px;
  line-height: 1.4;
}
.announce-item .tag {
  background: var(--secondary);
  color: var(--accent-foreground);
}
.time { font-size: 11px; color: var(--muted-foreground); white-space: nowrap; }
.announce-item .time { font-size: 11px; color: var(--muted-foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.announce-item .title { font-size: 14px; font-weight: 500; color: var(--foreground); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.announce-item .desc { font-size: 12px; color: var(--muted-foreground); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.announce-item .arrow { width: 16px; height: 16px; color: var(--muted-foreground); flex-shrink: 0; margin-top: 4px; }

.badge-red { display:inline-block;padding:1px 6px;border-radius:10px;font-size:10px;font-weight:600;background:#cf1322;color:#fff;vertical-align:middle;margin-right:4px; }

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 100;
  align-items: center;
  justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal-box {
  background: #fff;
  border-radius: 14px;
  padding: 24px;
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

.ann-detail-box { max-width:540px;width:90%;max-height:85vh;display:flex;flex-direction:column;padding:0;position:relative;overflow:hidden; }

.ann-detail-top { padding:24px 20px 0;border-bottom:1px solid var(--border); }

.ann-detail-header { display:flex;align-items:center;margin-bottom:10px;flex-wrap:wrap;gap:6px; }
.ann-detail-title { font-size:18px;font-weight:700;color:var(--foreground);margin:12px 0 14px;line-height:1.4; }

.ann-detail-body { flex:1;overflow-y:auto;padding:0 20px; }
.ann-detail-body .ann-detail-content { font-size:14px;color:var(--foreground);line-height:1.8;padding:16px 0; }

.ann-detail-footer { padding:12px 20px;border-top:1px solid var(--border);background:#fff; }

.ann-reward-bar { display:flex;flex-direction:column;gap:8px;background:#fff7e6;border:1px solid #ffd591;border-radius:12px;padding:14px 16px;margin:0 0 12px; }
.ann-reward-bar.ann-reward-done { background:#f6ffed;border-color:#b7eb8f; }
.ann-reward-info { display:flex;align-items:center;gap:6px;font-size:13px;color:#ad6800; }
.ann-reward-info img { flex-shrink:0; }
.ann-reward-done .ann-reward-info, .ann-reward-done span { color:#389e0d; }
.ann-reward-done-row { display:flex;align-items:center;justify-content:space-between; }
.ann-reward-done-left { display:flex;align-items:center;gap:6px; }
.ann-reward-img { height:70px;width:auto;flex-shrink:0;border-radius:6px;object-fit:contain; }
.ann-countdown-bar { height:6px;background:#ffd591;border-radius:3px;overflow:hidden; }
.ann-cd-fill { height:100%;background:#fa8c16;border-radius:3px;width:0;transition:width 1s linear; }

.ann-close-btn { position:absolute;top:12px;right:16px;background:none;border:none;font-size:24px;color:#999;cursor:pointer;line-height:1;padding:0;z-index:1; }
.ann-close-btn:hover { color:#333; }

.meal-card {
  background: var(--muted);
  border-radius: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.meal-card .meal-route { font-weight: 700; font-size: 15px; color: var(--foreground); }
.meal-card .meal-update-time {
  font-size: 11px;
  color: var(--primary);
  background: rgba(44,108,255,0.08);
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-block;
  width: fit-content;
}
.meal-card .meal-prices { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.meal-card .mp-original { font-size: 13px; color: var(--muted-foreground); }
.meal-card .mp-desc { font-size: 11px; margin-right: 2px; }
.meal-card .mp-xing { font-size: 13px; color: #7c3aed; font-weight: 600; }
.meal-card .mp-jin { font-size: 13px; color: #d4a017; font-weight: 600; }
.meal-card .meal-crew { font-size: 13px; color: var(--foreground); }
.meal-card .meal-passenger { font-size: 13px; color: var(--muted-foreground); }

.btn-primary {
  width: 100%;
  background: var(--primary);
  color: var(--primary-foreground);
  border-radius: 12px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.15s;
}
.btn-primary:active { opacity: 0.8; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  flex: 1;
  background: var(--muted);
  color: var(--foreground);
  border-radius: 12px;
  padding: 10px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
}

.btn-more-link {
  width: 100%;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 13px;
  padding: 8px 0;
  cursor: pointer;
  font-weight: 500;
}

.btn-sm {
  font-size: 12px;
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 4px 8px;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
}
.btn-sm:disabled { opacity: 0.4; cursor: not-allowed; }

.spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--primary-foreground);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--card);
  border-top: 1px solid var(--border);
  z-index: 40;
  padding: 0 8px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottom-nav .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  max-width: 512px;
  margin: 0 auto;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 16px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted-foreground);
  transition: color 0.15s;
  font-size: 12px;
  font-weight: 500;
}
.nav-item svg { width: 20px; height: 20px; }
.nav-item.active { color: var(--primary); font-weight: 600; }

.login-page { align-items: center; justify-content: center; padding: 0 20px; }
.login-card { width: 100%; max-width: 384px; padding: 24px; }
.login-card h2 { font-size: 18px; font-weight: 600; color: var(--foreground); margin-bottom: 24px; text-align: center; }

.login-badge {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  overflow: hidden;
}

.form-group { margin-bottom: 16px; }
.form-label { font-size: 14px; color: var(--muted-foreground); margin-bottom: 6px; display: block; }

.form-input-row {
  display: flex;
  align-items: center;
  background: var(--muted);
  border-radius: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}
.form-input-row:focus-within { border-color: var(--primary); }
.form-input-row input {
  flex: 1; background: transparent; border: none; font-size: 14px; color: var(--foreground);
}
.form-input-row .input-icon { width: 16px; height: 16px; color: var(--muted-foreground); margin-right: 8px; flex-shrink: 0; }
.form-input-row .toggle-pwd { margin-left: 8px; flex-shrink: 0; padding: 0; background: none; border: none; cursor: pointer; }

.shop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.product-card { border-radius: 16px; overflow: hidden; }
.product-card .prod-img {
  aspect-ratio: 1;
  background: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  position: relative;
}
.product-card .prod-img img { width: 100%; height: 100%; object-fit: cover; }
.prod-stock-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #16a34a;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.prod-stock-badge.prod-stock-low {
  background: #cf1322;
}
.prod-limit-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(24,144,255,0.85);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}
.prod-img-sold img { filter: grayscale(1); opacity: 0.5; }
.prod-sold-out {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  padding: 6px 18px;
  border-radius: 6px;
  letter-spacing: 2px;
}
.product-card .prod-body { padding: 12px; }
.product-card .prod-name { font-size: 12px; font-weight: 600; color: var(--foreground); margin-bottom: 4px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card .prod-footer { display: flex; align-items: center; justify-content: space-between; }
.product-card .prod-points { display: flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 600; color: var(--primary); }

.points-disp { display: flex; align-items: center; justify-content: space-between; padding: 16px; }
.points-disp .label { font-size: 12px; color: var(--muted-foreground); margin-bottom: 4px; display:flex;align-items:center;gap:4px; }
.points-help-btn { display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:50%;border:1px solid #bbb;color:#888;cursor:pointer;flex-shrink:0;transition:all 0.2s;vertical-align:middle; }
.points-help-btn:hover { border-color:var(--primary);color:var(--primary); }
.points-disp .val-row { display: flex; align-items: center; gap: 4px; }
.points-disp .val { font-size: 18px; font-weight: 700; color: var(--foreground); }
.points-disp .val-suffix { font-size: 12px; color: var(--muted-foreground); }
.points-record-entry { display:flex;flex-direction:column;align-items:center;gap:4px;cursor:pointer;flex-shrink:0;padding:8px 10px;border-radius:12px;transition:background 0.2s; }
.points-record-entry:hover { background:var(--secondary); }
.points-record-entry svg { flex-shrink:0; }
.points-record-label { font-size:10px;color:var(--muted-foreground);white-space:nowrap; }

.record-item { display: flex; align-items: center; justify-content: space-between; padding: 12px; border-radius: 12px; }
.record-item .rec-name { font-size: 14px; color: var(--foreground); font-weight: 500; }
.record-item .rec-time { font-size: 12px; color: var(--muted-foreground); margin-top: 2px; }
.record-item .rec-right { text-align: right; flex-shrink: 0; }
.record-item .rec-points { font-size: 12px; color: var(--muted-foreground); }
.btn-more { display:flex;align-items:center;justify-content:center;gap:4px;width:100%;padding:10px;background:none;border:none;font-size:12px;color:var(--muted-foreground);cursor:pointer;border-radius:8px;transition:all 0.2s; }
.btn-more:hover { color:var(--primary);background:var(--secondary); }

.profile-info { padding: 16px; display: flex; align-items: center; justify-content: space-between; }
.profile-info .pi-left {  }
.profile-info .pi-label { font-size: 12px; color: var(--muted-foreground); margin-bottom: 4px; display:flex;align-items:center;gap:4px; }
.profile-info .pi-right { text-align: right; }
.profile-info .pi-dept { font-size: 12px; color: var(--foreground); font-weight: 500; }
.profile-info .pi-sub { font-size: 12px; color: var(--muted-foreground); margin-top: 2px; }

.menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}
.menu-item:active { background: var(--muted); }
.menu-item .mi-left { display: flex; align-items: center; gap: 12px; }
.menu-item .mi-icon { width: 36px; height: 36px; border-radius: 12px; background: var(--secondary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.menu-item .mi-label { font-size: 14px; font-weight: 500; color: var(--foreground); }
.menu-item .mi-right { display: flex; align-items: center; gap: 8px; }
.menu-item .mi-count { font-size: 12px; color: var(--muted-foreground); }

.rank-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
.rank-item .rk-left { display: flex; align-items: center; gap: 12px; }
.rank-item .rk-num { font-size: 14px; font-weight: 700; width: 24px; text-align: center; }
.rank-item .rk-num.gold { color: var(--yellow); }

.me-tag {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 4px;
  font-weight: 500;
  vertical-align: middle;
}

.rank-item .rk-name { font-size: 14px; color: var(--foreground); font-weight: 500; }
.rank-item .rk-role { font-size: 12px; color: var(--muted-foreground); }
.rank-item .rk-right { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--foreground); font-weight: 500; }

.mail-item {
  text-align: left;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
  margin: 0 12px 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.mail-item:first-child { margin-top: 12px; }
.mail-item:last-child { margin-bottom: 12px; }
.mail-item:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.mail-item:active { background: var(--muted); }
.mail-item .mail-content { flex: 1; min-width: 0; }
.mail-item .mail-tags { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.mail-item .mail-text { font-size: 13px; color: var(--foreground); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.overlay {
  display: none;
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,0.4);
  align-items: center; justify-content: center;
  padding: 0 20px;
}
.overlay.show { display: flex; }

.overlay-bottom {
  display: none;
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,0.4);
  align-items: flex-end; justify-content: center;
}
.overlay-bottom.show { display: flex; }

.modal { width: 100%; max-width: 384px; padding: 24px; }
.modal h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.modal .modal-info { font-size: 12px; color: var(--muted-foreground); margin-bottom: 16px; line-height: 1.6; }
.modal .modal-btns { display: flex; gap: 12px; }

.bottom-sheet { width: 100%; border-radius: 16px 16px 0 0; padding: 24px; }
.bottom-sheet h3 { font-size: 16px; font-weight: 600; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; }

.toast {
  display: none;
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  background: var(--foreground);
  color: white;
  font-size: 14px;
  padding: 12px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.toast.show { display: block; }

.offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  background: #6b7280;
  color: #fff;
  text-align: center;
  font-size: 13px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  animation: offlineSlideDown 0.3s ease-out;
}
@keyframes offlineSlideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

.header-flex { display: flex; align-items: center; justify-content: space-between; }
.header-flex .logout-btn { color: rgba(255,255,255,0.7); font-size: 12px; background: none; border: none; cursor: pointer; }

.user-row { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.avatar-placeholder {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.user-name { font-size: 18px; font-weight: 700; color: var(--primary-foreground); }
.user-name .rank-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  background: rgba(255,255,255,0.25);
  color: #fff;
  padding: 1px 7px;
  border-radius: 8px;
  margin-left: 6px;
  vertical-align: middle;
  line-height: 1.5;
}
.user-id { font-size: 14px; color: rgba(255,255,255,0.7); }

.negative-mt { margin-top: -12px; }

.error-text { font-size: 12px; color: var(--destructive); text-align: center; background: rgba(248,71,33,0.05); border-radius: 8px; padding: 8px; margin-bottom: 16px; }

.accent-box { background: var(--accent); border-radius: 12px; padding: 16px; }
.accent-box p { font-size: 12px; color: var(--muted-foreground); line-height: 1.6; }
.accent-box .highlight { color: var(--accent-foreground); font-weight: 500; }

.forgot-link { text-align: right; margin-bottom: 8px; }
.forgot-link button { font-size: 12px; color: var(--muted-foreground); background: none; border: none; cursor: pointer; }
.remember-me-label { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; font-size: 13px; color: var(--muted-foreground); cursor: pointer; }
.remember-me-label input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }

.footer-text { font-size: 12px; color: var(--muted-foreground); margin-top: 24px; text-align: center; }

.meal-list { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 12px; }

.tag-reply {
  font-size: 11px;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  line-height: 1.4;
}
.tag-pending {
  font-size: 11px;
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #fff;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  line-height: 1.4;
}

.reply-box { background: var(--muted); border-radius: 12px; padding: 16px; }
.reply-box .reply-label { font-size: 12px; font-weight: 500; color: var(--accent-foreground); margin-bottom: 6px; }
.reply-box .reply-text { font-size: 12px; color: var(--foreground); line-height: 1.6; }

.safe-tip { font-size: 12px; padding: 12px; border-radius: 8px; margin-bottom: 16px; background: var(--accent); color: var(--accent-foreground); }

.rank-tabs { display: flex; gap: 4px; padding: 0 16px 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rank-tabs::-webkit-scrollbar { display: none; }

.rank-countdown {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px 4px;
  font-size: 12px;
  color: var(--primary);
  background: var(--primary-light, #e6f0ff);
  margin: 0 16px 4px;
  border-radius: 8px;
}
.rank-countdown svg { flex-shrink: 0; }
.rank-tab {
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  background: var(--muted);
  color: var(--muted-foreground);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
}
.rank-tab.active { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }

.gr-sub {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted-foreground);
  margin-left: 6px;
  padding: 1px 6px;
  background: var(--muted);
  border-radius: 4px;
}

.equip-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.equip-item .equip-icon {
  width: 36px; height: 36px;
  border-radius: 12px;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.equip-item .equip-info { flex: 1; min-width: 0; }
.equip-item .equip-name { font-size: 14px; font-weight: 500; color: var(--foreground); }
.equip-item .equip-model { font-size: 11px; color: var(--muted-foreground); }
.equip-item .status-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 9999px;
  background: var(--secondary);
  color: var(--accent-foreground);
  flex-shrink: 0;
}
.equip-item .status-badge.warn { background: #fff3e0; color: #e65100; }

.group-rank-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }

.ac-card { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.ac-header {
  width: 100%; text-align: left;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}
.ac-header:active { background: var(--muted); }
.ac-header-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.ac-icon { width: 36px; height: 36px; border-radius: 12px; background: var(--secondary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ac-model { font-size: 14px; font-weight: 600; color: var(--foreground); }
.ac-reg { font-size: 14px; font-weight: 400; color: #999; margin-left: 6px; }
.ac-info { font-size: 11px; color: var(--muted-foreground); margin-top: 2px; }
.ac-arrow { width: 16px; height: 16px; color: var(--muted-foreground); flex-shrink: 0; transition: transform 0.2s ease; }
.ac-body { border-top: 1px solid var(--border); }
.ac-equip-list { padding: 8px 16px 12px; display: flex; flex-direction: column; gap: 4px; }

.equip-detail-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.equip-detail-item:last-child { border-bottom: none; }
.edi-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.edi-row-clickable {
  cursor: pointer;
  user-select: none;
}
.edi-row-sub {
  padding-left: 32px;
}
.edi-sub-row {
  padding-left: 32px;
}
.edi-sub-text {
  font-size: 11px;
  color: #999;
}
.equip-detail-item .edi-qty {
  color: var(--primary);
  font-weight: 600;
  margin-left: auto;
  flex-shrink: 0;
  font-size: 12px;
}
.equip-detail-item .edi-model {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  line-height: 1.5;
  flex-shrink: 0;
  min-width: 24px;
  text-align: center;
}
.equip-detail-item .edi-name {
  font-size: 13px;
  color: var(--foreground);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.equip-detail-item .edi-caret {
  width: 14px; height: 14px;
  transition: transform 0.25s ease;
}
.edi-detail {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.35s ease, padding 0.35s ease;
}
.edi-detail.open {
  max-height: 2000px;
  opacity: 1;
}
.edi-detail-label {
  font-size: 11px;
  color: var(--primary);
  font-weight: 600;
  margin-top: 8px;
  margin-bottom: 4px;
  padding-left: 28px;
}
.edi-detail-label:first-child { margin-top: 4px; }
.edi-detail-text {
  font-size: 12px;
  color: var(--muted-foreground);
  line-height: 1.5;
  padding-left: 28px;
  padding-bottom: 6px;
}
.equip-detail-item .edi-qty { font-size: 12px; color: var(--primary); font-weight: 600; margin-left: auto; flex-shrink: 0; }
.equip-detail-item .edi-loc { font-size: 11px; color: var(--muted-foreground); text-align: right; }
.group-rank-item .gr-left { display: flex; align-items: center; gap: 12px; }
.group-rank-item .gr-name { font-size: 14px; font-weight: 500; color: var(--foreground); }
.group-rank-item .gr-members { font-size: 12px; color: var(--muted-foreground); }
.group-rank-item .gr-right { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--foreground); font-weight: 500; }

.org-section { padding: 12px 16px 16px; }
.org-root { text-align: center; padding: 16px 0; border-bottom: 1px dashed var(--border); margin-bottom: 12px; }
.org-root .org-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--secondary); display: flex; align-items: center; justify-content: center; margin: 0 auto 8px; }
.org-root .org-name { font-size: 14px; font-weight: 600; color: var(--foreground); }
.org-root .org-sub { font-size: 11px; color: var(--muted-foreground); margin-top: 2px; }

.org-squads { display: flex; flex-direction: column; gap: 8px; }
.org-squad { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.org-squad .os-header { display: flex; align-items: center; padding: 10px 12px; cursor: pointer; background: var(--muted); }
.org-squad .os-name { font-size: 13px; font-weight: 600; color: var(--foreground); flex: 1; }
.org-squad .os-count { font-size: 11px; color: var(--muted-foreground); margin-right: 6px; }
.org-squad .os-arrow { width: 14px; height: 14px; color: var(--muted-foreground); transition: transform 0.2s; }
.org-squad.expanded .os-arrow { transform: rotate(180deg); }

.org-squad .os-groups { display: none; flex-wrap: wrap; gap: 6px; padding: 10px 12px; }
.org-squad.expanded .os-groups { display: flex; }
.os-group { font-size: 11px; padding: 3px 8px; border-radius: 6px; background: var(--secondary); color: var(--accent-foreground); }

.dept-req-item { padding: 12px 16px; display: flex; gap: 10px; }
.dept-req-item .dr-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--destructive); margin-top: 5px; flex-shrink: 0; }
.dept-req-item .dr-text { font-size: 13px; color: var(--foreground); line-height: 1.5; }

.form-input-full {
  width: 100%;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--foreground);
  transition: border-color 0.2s;
}
.form-input-full:focus { border-color: var(--primary); }
.form-input-full::placeholder { color: var(--muted-foreground); }

.pwd-hint { font-size: 11px; color: var(--muted-foreground); margin-top: 4px; }
.pwd-hint.ok { color: #16a34a; }
.pwd-hint.error { color: var(--destructive); }

#overlay-pwd-reset .modal { animation: slideUp 0.3s ease; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
