:root {
  --orange: #ff6a00;
  --orange-deep: #e85d00;
  --orange-soft: #fff4eb;
  --orange-line: #ffd2b0;
  --bg: #ffffff;
  --bg-page: #f5f6f8;
  --text: #1a1a1a;
  --text-2: #666666;
  --text-3: #999999;
  --line: #eeeeee;
  --ok: #1e8449;
  --ok-soft: #e8f8ef;
  --bad: #c0392b;
  --bad-soft: #fdecea;
  --warn: #d68910;
  --warn-soft: #fff8e8;
  --radius: 12px;
  --shadow: 0 8px 28px rgba(26, 26, 26, 0.06);
  --nav-h: 56px;
  --bottom-h: 62px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  min-height: 100%;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Heiti SC", sans-serif;
  color: var(--text);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--orange-deep); }
button, input, select, textarea { font-family: inherit; }
img { max-width: 100%; display: block; }

.container { width: min(1100px, 100% - 32px); margin: 0 auto; }
.container-sm { width: min(480px, 100% - 32px); margin: 0 auto; }

/* Auth */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255,106,0,.18), transparent 55%),
    linear-gradient(180deg, #fff 0%, var(--bg-page) 100%);
}
.auth-card {
  width: min(440px, 100%);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px 28px 28px;
  box-shadow: var(--shadow);
}
.auth-brand {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: .04em;
  margin-bottom: 6px;
}
.auth-brand em { font-style: normal; color: var(--orange); }
.auth-sub { color: var(--text-2); font-size: 14px; margin-bottom: 24px; line-height: 1.6; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 20px; background: var(--bg-page); border-radius: 999px; padding: 4px; }
.auth-tabs button {
  flex: 1; border: 0; background: transparent; padding: 10px; border-radius: 999px;
  font-size: 14px; font-weight: 600; color: var(--text-2); cursor: pointer;
}
.auth-tabs button.active { background: var(--bg); color: var(--orange); box-shadow: 0 2px 8px rgba(0,0,0,.06); }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; font-weight: 600; }
.form-group .hint { font-size: 12px; color: var(--text-3); margin-top: 6px; line-height: 1.5; }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; font-size: 15px; background: #fff; color: var(--text);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255,106,0,.12);
}
.textarea { min-height: 88px; resize: vertical; }
.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-row .input { flex: 1; }
.captcha-img {
  height: 44px; width: 120px; border-radius: 10px; border: 1px solid var(--line);
  cursor: pointer; background: #fafafa; object-fit: cover; flex-shrink: 0;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 10px; padding: 12px 18px; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: .15s background, .15s transform, .15s opacity;
}
.btn:active { transform: scale(.98); }
.btn-primary,
a.btn-primary,
a.btn-primary:hover,
a.btn-primary:focus,
a.btn-primary:active,
a.btn-primary:visited {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 8px 20px rgba(255,106,0,.28);
}
.auth-card .btn-primary,
.auth-card a.btn-primary { width: 100%; }
.btn-primary:hover,
a.btn-primary:hover { background: var(--orange-deep); color: #fff; }
a.btn-danger,
a.btn-danger:hover,
a.btn-danger:focus,
a.btn-danger:active,
a.btn-danger:visited { color: #fff; }
.btn-ghost { background: var(--orange-soft); color: var(--orange-deep); }
.btn-outline { background: #fff; border: 1px solid var(--line); color: var(--text); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-sm { padding: 8px 12px; font-size: 13px; border-radius: 8px; width: auto; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.alert {
  border-radius: 10px; padding: 12px 14px; font-size: 14px; margin-bottom: 16px; line-height: 1.5;
}
.alert-error { background: var(--bad-soft); color: var(--bad); }
.alert-success { background: var(--ok-soft); color: var(--ok); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }
.alert-info { background: var(--orange-soft); color: var(--orange-deep); }

/* Employee shell */
.app-shell { min-height: 100vh; padding-bottom: calc(var(--bottom-h) + var(--safe-bottom) + 12px); }
@media (min-width: 900px) {
  .app-shell { padding-bottom: 24px; display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
}

.side-nav {
  display: none;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 24px 16px;
  position: sticky; top: 0; height: 100vh;
}
@media (min-width: 900px) {
  .side-nav { display: flex; flex-direction: column; gap: 8px; padding: 28px 18px; }
}
.side-brand { font-size: 24px; font-weight: 900; margin-bottom: 22px; padding: 0 10px; }
.side-brand em { font-style: normal; color: var(--orange); }
.side-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 14px; border-radius: 12px; color: var(--text-2); font-weight: 700; font-size: 16px;
}
.side-nav a:hover { background: var(--orange-soft); color: var(--orange-deep); }
.side-nav a.active { background: var(--orange); color: #fff; }
.side-nav .nav-icon { width: 22px; height: 22px; flex-shrink: 0; }
.side-spacer { flex: 1; }

.top-mobile {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
  gap: 10px;
}
.top-mobile .title { font-size: 17px; font-weight: 800; min-width: 0; }
.top-mobile-right {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.top-mobile-right .muted {
  font-size: 13px; color: var(--text-3); max-width: 96px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.btn-intro {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 10px; border-radius: 8px;
  background: var(--orange); color: #fff !important;
  font-size: 12px; font-weight: 800; text-decoration: none; white-space: nowrap;
  line-height: 1.2;
}
.btn-intro:hover { background: var(--orange-deep); color: #fff !important; }
@media (min-width: 900px) {
  .top-mobile { padding: 16px 28px; }
  .top-mobile .title { font-size: 20px; }
  .btn-intro { font-size: 13px; padding: 7px 14px; }
  .top-mobile-right .muted { max-width: 160px; font-size: 14px; }
}
.side-nav a.side-intro,
.admin-side a.side-intro {
  color: var(--orange); font-weight: 800;
  border: 1px solid var(--orange-line); background: var(--orange-soft);
}
.side-nav a.side-intro:hover,
.admin-side a.side-intro:hover { background: var(--orange); color: #fff; }

.main-area { min-width: 0; }
.page-pad { padding: 16px; }
@media (min-width: 900px) {
  .page-pad { padding: 28px 36px 48px; max-width: 1040px; }
}

.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  height: calc(var(--bottom-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr);
}
@media (min-width: 900px) { .bottom-nav { display: none; } }
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--text-3); font-size: 11px; font-weight: 600;
}
.bottom-nav a.active { color: var(--orange); }
.bottom-nav svg { width: 22px; height: 22px; }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
  min-width: 0; overflow-wrap: anywhere; word-break: break-word;
}
.card + .card { margin-top: 14px; }
.card a { overflow-wrap: anywhere; word-break: break-all; }
.card-title { font-size: 16px; font-weight: 800; margin-bottom: 12px; }
.card-title .sub { font-size: 12px; font-weight: 500; color: var(--text-3); margin-left: 8px; }

.stat-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 700px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
}
.stat .label { font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.stat .value { font-size: 24px; font-weight: 900; letter-spacing: -.02em; }
.stat .value em { font-style: normal; font-size: 14px; color: var(--text-3); font-weight: 600; }
.stat.accent { background: linear-gradient(135deg, #ff8a2b, #ff6a00); color: #fff; border: 0; }
.stat.accent .label { color: rgba(255,255,255,.85); }
.stat.accent .value em { color: rgba(255,255,255,.8); }

.tip-box {
  background: var(--orange-soft); border: 1px solid var(--orange-line);
  border-radius: var(--radius); padding: 14px 16px; font-size: 13px; line-height: 1.7; color: var(--orange-deep);
  margin-bottom: 14px;
}

.list-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 0; border-bottom: 1px solid var(--line);
  min-width: 0;
}
.list-item:last-child { border-bottom: 0; }
.list-item > div { min-width: 0; flex: 1; }
.list-item a { overflow-wrap: anywhere; word-break: break-all; }
.badge {
  display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
}
.badge-pending { background: var(--warn-soft); color: var(--warn); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data {
  width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px;
}
table.data th, table.data td {
  text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle;
}
table.data th { color: var(--text-3); font-weight: 600; font-size: 12px; background: #fafafa; }
table.data tr:hover td { background: #fcfcfc; }

.thumb {
  width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line);
  cursor: pointer;
}
.thumb-lg { width: 100%; max-width: 360px; border-radius: 12px; border: 1px solid var(--line); }

.pager { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.pager a {
  min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; border: 1px solid var(--line); color: var(--text-2); background: #fff; font-size: 13px;
}
.pager a.active { background: var(--orange); color: #fff; border-color: var(--orange); }

.grid-2 { display: grid; gap: 14px; min-width: 0; }
@media (min-width: 800px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.grid-2 > * { min-width: 0; }

.url-break,
a.url-break {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-all;
  vertical-align: top;
}

.user-profile-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.user-profile-main {
  display: flex;
  align-items: center;
  gap: 12px;
}
.user-avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ff8a2b, #ff6a00);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 900;
  flex: 0 0 auto;
}
.user-profile-text h2 {
  font-size: 20px;
  font-weight: 900;
  margin: 0;
  line-height: 1.2;
}
.user-profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.user-profile-stats > div {
  background: var(--bg-page);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
}
.user-profile-stats em {
  display: block;
  font-style: normal;
  font-size: 18px;
  font-weight: 900;
  color: var(--orange);
  line-height: 1.2;
}
.user-profile-stats span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-3);
}
.user-plat-panel { padding: 14px; }
.acct-fold-list { display: grid; gap: 10px; }
.acct-fold {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}
.acct-fold-summary {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.acct-logo {
  width: 40px; height: 40px; border-radius: 12px; overflow: hidden;
  background: var(--bg-page); display: flex; align-items: center; justify-content: center;
  font-weight: 900; flex: 0 0 auto;
}
.acct-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.acct-mini-shot {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  object-position: top center;
  border: 1px solid var(--line);
  flex: 0 0 auto;
  background: var(--bg-page);
}
.acct-fold-text { flex: 1; min-width: 0; }
.acct-fold-text strong { font-size: 15px; }
.acct-fold-toggle {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--orange-deep);
}
.acct-fold-body {
  display: none;
  padding: 0 12px 12px;
  border-top: 1px solid var(--line);
}
.acct-fold.is-open .acct-fold-body { display: block; padding-top: 12px; }
.acct-shot {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
  margin-bottom: 12px;
}
.acct-shot img {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  object-position: top center;
  display: block;
  cursor: pointer;
}
.acct-link-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.acct-link-row .acct-link { flex: 1; min-width: 0; }
.acct-link-row .btn { flex: 0 0 auto; }
.acct-miss-list { display: grid; gap: 8px; }
.acct-miss {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-page);
}
.acct-miss span:nth-child(2) { flex: 1; font-weight: 700; }

.list-stack { display: grid; gap: 10px; }
.compact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
}
.compact-row.bare {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.compact-row.bare:last-child { border-bottom: 0; }
.compact-main { flex: 1; min-width: 0; }
.compact-title { font-weight: 800; font-size: 15px; }
.compact-amt {
  font-size: 20px;
  font-weight: 900;
  color: var(--orange);
  line-height: 1.2;
}
.compact-side {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  text-align: right;
}

.pay-hero {
  background: linear-gradient(135deg, #ff8a2b, #ff6a00);
  color: #fff;
  border-radius: 16px;
  padding: 20px 16px;
  margin-bottom: 14px;
  box-shadow: 0 10px 24px rgba(255,106,0,.28);
}
.pay-hero-amt {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.1;
}
.pay-hero-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.pay-hero .muted { color: rgba(255,255,255,.85); }
.pay-hero .badge { background: rgba(255,255,255,.2); color: #fff; }
.pay-qr-card { text-align: center; }
.pay-qr-img {
  width: min(260px, 72vw);
  margin: 0 auto;
  border-radius: 14px;
  border: 1px solid var(--line);
  display: block;
  background: #fff;
  cursor: pointer;
}
.pay-preview-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.copy-link-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 6px;
  min-width: 0;
}
.copy-link-row .url-break { flex: 1; min-width: 0; }
.copy-ico {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.copy-ico.is-copied { color: var(--ok); border-color: var(--ok); }

.review-card { padding: 0; overflow: hidden; }
.review-card + .review-card { margin-top: 12px; }
.review-summary {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.review-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  object-position: top center;
  border: 1px solid var(--line);
  background: #fff;
  flex: 0 0 auto;
}
.empty-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-3);
  background: var(--bg-page);
}
.review-summary-main { flex: 1; min-width: 0; }
.review-summary-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.review-summary-meta {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
}
.review-summary-right {
  flex: 0 0 auto;
  text-align: right;
}
.review-amt {
  font-size: 18px;
  font-weight: 900;
  color: var(--orange);
  line-height: 1.2;
}
.review-toggle {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--orange-deep);
}
.review-detail {
  display: none;
  padding: 0 14px 14px;
  border-top: 1px solid var(--line);
}
.review-card.is-open .review-detail { display: block; }

.app-toast {
  position: fixed;
  left: 50%;
  bottom: calc(80px + var(--safe-bottom));
  transform: translateX(-50%) translateY(12px);
  background: rgba(26,26,26,.92);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  z-index: 120;
  opacity: 0;
  transition: .2s ease;
  pointer-events: none;
  white-space: nowrap;
}
.app-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.empty {
  text-align: center; padding: 40px 16px; color: var(--text-3); font-size: 14px;
}

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

.file-input {
  border: 1.5px dashed var(--orange-line); background: var(--orange-soft);
  border-radius: 12px; padding: 20px; text-align: center; cursor: pointer; position: relative;
}
.file-input input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-input .t1 { font-weight: 700; color: var(--orange-deep); margin-bottom: 4px; }
.file-input .t2 { font-size: 12px; color: var(--text-3); }
.preview-box { margin-top: 10px; }
.preview-box img { max-height: 220px; margin: 0 auto; border-radius: 10px; }

.muted { color: var(--text-3); font-size: 12px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-12 { margin-bottom: 12px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* Admin */
.page-admin { min-height: 100%; }
.admin-shell { min-height: 100vh; min-width: 0; }
.admin-content { min-width: 0; }
@media (min-width: 960px) {
  .admin-shell { display: grid; grid-template-columns: 280px 1fr; }
}
.admin-side {
  display: none;
  background: #1f1f1f; color: #fff; padding: 22px 14px;
  position: sticky; top: 0; height: auto;
}
@media (min-width: 960px) {
  .admin-side {
    display: block;
    height: 100vh;
    overflow: auto;
  }
}
.admin-side .logo { font-size: 18px; font-weight: 900; padding: 4px 10px 18px; }
.admin-side .logo em { font-style: normal; color: var(--orange); }
.admin-side a {
  display: flex; align-items: center; gap: 10px;
  color: rgba(255,255,255,.72); padding: 11px 12px; border-radius: 10px;
  font-size: 15px; font-weight: 600; margin-bottom: 2px;
}
.admin-side a svg { width: 16px; height: 16px; fill: currentColor; flex: 0 0 auto; }
.admin-side a:hover, .admin-side a.active { background: rgba(255,106,0,.18); color: #fff; }
.admin-side a.active { background: var(--orange); }
@media (min-width: 960px) {
  .admin-side .logo { font-size: 22px; padding: 6px 12px 22px; }
  .admin-side a {
    gap: 12px;
    padding: 14px;
    border-radius: 12px;
    font-size: 18px;
    margin-bottom: 4px;
  }
  .admin-side a svg { width: 20px; height: 20px; }
}
.admin-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.admin-main { padding: 16px; min-width: 0; }
@media (max-width: 959px) {
  .page-admin {
    padding-bottom: calc(var(--bottom-h) + var(--safe-bottom));
  }
  .admin-shell {
    min-height: calc(100vh - var(--bottom-h) - var(--safe-bottom));
    padding-bottom: 12px;
    min-width: 0;
  }
  .admin-main { padding-bottom: 20px; }
}
@media (min-width: 960px) { .admin-main { padding: 24px 28px; } }

.admin-bottom-nav {
  display: none;
}
@media (max-width: 959px) {
  .admin-bottom-nav {
    position: fixed !important;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    height: calc(var(--bottom-h) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 20px rgba(0,0,0,.06);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }
  .admin-bottom-nav a,
  .admin-bottom-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border: 0;
    background: transparent;
    color: var(--text-3);
    font-size: 11px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
  }
  .admin-bottom-nav a.active,
  .admin-bottom-nav button.active { color: var(--orange); }
  .admin-bottom-nav svg { width: 20px; height: 20px; fill: currentColor; display: block; }
}

.admin-menu-btn {
  display: inline-flex; border: 0; background: var(--orange-soft); color: var(--orange-deep);
  padding: 8px 12px; border-radius: 8px; font-weight: 700; cursor: pointer;
}
@media (min-width: 960px) { .admin-menu-btn { display: none; } }

.admin-side.mobile-open {
  display: block;
  position: fixed; inset: 0 auto 0 0; width: min(280px, 86vw); z-index: 95;
  height: 100vh; overflow: auto;
  box-shadow: 20px 0 40px rgba(0,0,0,.25);
}
.admin-mask {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 85;
}
.admin-mask.show { display: block; }
@media (min-width: 960px) {
  .admin-mask { display: none !important; }
  .admin-bottom-nav { display: none !important; }
}

.modal-bg {
  position: fixed; inset: 0; background: rgba(0,0,0,.72); z-index: 100;
  display: none; align-items: center; justify-content: center; padding: 16px;
}
.modal-bg.show { display: flex; }
.modal-bg img { max-width: 100%; max-height: 90vh; border-radius: 8px; }

.filters {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; align-items: center;
}
.filters .input, .filters .select { width: auto; min-width: 140px; padding: 9px 12px; font-size: 13px; }

.kpis { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); margin-bottom: 16px; }
@media (min-width: 800px) { .kpis { grid-template-columns: repeat(4, 1fr); } }

/* ????? */
.thumb-preview {
  margin-top: 12px;
  display: none;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.thumb-preview.show { display: flex; }
.thumb-preview .frame {
  width: 96px; height: 96px; border-radius: 12px; overflow: hidden;
  border: 2px solid var(--orange-line); background: #fff;
  box-shadow: 0 4px 14px rgba(255,106,0,.12); flex-shrink: 0;
  position: relative;
}
.thumb-preview .frame img {
  width: 100%; height: 100%; object-fit: cover; cursor: pointer;
}
.thumb-preview .meta { flex: 1; min-width: 140px; }
.thumb-preview .meta .ok { color: var(--ok); font-weight: 700; font-size: 13px; }
.file-input.has-file {
  border-style: solid; background: #fff;
}
.file-input.has-file .t1 { color: var(--text); }

/* ?????? */
.pending-hero {
  text-align: center;
  padding: 36px 20px 28px;
  background: linear-gradient(180deg, #fff7f0 0%, #fff 55%);
  border: 1px solid var(--orange-line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.pending-icon {
  width: 88px; height: 88px; margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--orange-soft);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.pending-icon::after {
  content: "";
  position: absolute; inset: -6px;
  border-radius: 50%;
  border: 2px dashed var(--orange-line);
  animation: pending-spin 12s linear infinite;
}
.pending-icon svg { width: 44px; height: 44px; color: var(--orange); }
@keyframes pending-spin { to { transform: rotate(360deg); } }
.pending-hero h2 { font-size: 22px; font-weight: 900; margin-bottom: 8px; }
.pending-hero .lead { color: var(--text-2); font-size: 14px; line-height: 1.7; max-width: 420px; margin: 0 auto 18px; }
.pending-steps {
  display: grid; gap: 10px; text-align: left;
  max-width: 420px; margin: 0 auto 20px;
}
.pending-steps li {
  list-style: none; display: flex; gap: 10px; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  font-size: 13px; color: var(--text-2); line-height: 1.5;
}
.pending-steps .dot {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  background: var(--orange); color: #fff; font-size: 12px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.pulse-bar {
  height: 4px; border-radius: 999px; overflow: hidden; background: var(--orange-line);
  max-width: 280px; margin: 0 auto 18px;
}
.pulse-bar i {
  display: block; height: 100%; width: 40%;
  background: linear-gradient(90deg, var(--orange), #ffb06a);
  animation: pending-pulse 1.6s ease-in-out infinite;
  border-radius: 999px;
}
@keyframes pending-pulse {
  0% { transform: translateX(-20%); }
  50% { transform: translateX(160%); }
  100% { transform: translateX(-20%); }
}

/* ?????? */
.qr-upload-grid { display: grid; gap: 12px; }
@media (min-width: 600px) { .qr-upload-grid { grid-template-columns: 1fr 1fr; } }
.qr-slot {
  border: 1.5px dashed var(--orange-line); background: var(--orange-soft);
  border-radius: 12px; padding: 14px; text-align: center; position: relative; min-height: 140px;
}
.qr-slot input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 2; }
.qr-slot img {
  max-width: 120px; max-height: 120px; margin: 8px auto 0; border-radius: 8px;
  border: 1px solid var(--line); background: #fff;
}
.qr-slot .label { font-size: 13px; font-weight: 700; color: var(--orange-deep); }

/* ???? */
.pay-modal {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(0,0,0,.55);
  display: none; align-items: flex-end; justify-content: center;
  padding: 0;
}
@media (min-width: 720px) {
  .pay-modal { align-items: center; padding: 16px; }
}
.pay-modal.show { display: flex; }
.pay-sheet {
  width: min(440px, 100%);
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 20px 18px calc(20px + var(--safe-bottom));
  max-height: 92vh; overflow: auto;
  box-shadow: 0 -8px 40px rgba(0,0,0,.2);
}
@media (min-width: 720px) {
  .pay-sheet { border-radius: 16px; padding: 24px; }
}
.pay-sheet .qr-big {
  width: min(260px, 70vw); height: auto; margin: 12px auto;
  border-radius: 12px; border: 1px solid var(--line); display: block; background: #fff;
}
.pay-sheet h3 { font-size: 18px; font-weight: 900; text-align: center; }
.pay-sheet .amt { text-align: center; font-size: 28px; font-weight: 900; color: var(--orange); margin: 8px 0; }

/* ??????? */
.wd-cards { display: grid; gap: 12px; }
.wd-card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 14px; box-shadow: var(--shadow);
}
.wd-card .row1 { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.wd-card .amt { font-size: 22px; font-weight: 900; color: var(--orange); }
@media (min-width: 900px) {
  .wd-cards.desktop-hide { display: none; }
}
@media (max-width: 899px) {
  .wd-table-wrap.mobile-hide { display: none !important; }
}

.alert-warn { background: var(--warn-soft); color: var(--warn); }

/* ===== ????????? / ??? ===== */
.work-page {
  display: grid;
  gap: 16px;
  max-width: 920px;
}
.work-hero {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 20px 18px 18px;
  color: #fff;
  background:
    radial-gradient(ellipse 70% 80% at 100% 0%, rgba(255,255,255,.22), transparent 50%),
    linear-gradient(135deg, #ff8a2b 0%, #ff6a00 48%, #e85d00 100%);
  box-shadow: 0 14px 36px rgba(255, 106, 0, 0.22);
}
.work-hero-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.work-hero-title {
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.work-hero-sub {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255,255,255,.88);
}
.work-hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.work-hero-links a {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.28);
  color: #fff !important;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(6px);
  white-space: nowrap;
}
.work-hero-links a:hover {
  background: rgba(255,255,255,.28);
  color: #fff !important;
}
.work-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.work-metric {
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 14px;
  padding: 14px 12px;
  backdrop-filter: blur(8px);
  min-width: 0;
}
.work-metric.accent {
  background: rgba(255,255,255,.92);
  border-color: transparent;
  color: var(--text);
}
.work-metric.accent .work-metric-label { color: var(--text-3); }
.work-metric.accent .work-metric-value { color: var(--orange); }
.work-metric.accent .work-metric-value small { color: var(--text-3); }
.work-metric-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,.82);
  margin-bottom: 6px;
}
.work-metric-value {
  font-size: clamp(22px, 5vw, 30px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.work-metric-value small {
  margin-left: 2px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.75);
}
.work-metric-bar {
  margin-top: 10px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.25);
  overflow: hidden;
}
.work-metric.accent .work-metric-bar { background: rgba(255,106,0,.15); }
.work-metric-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #fff;
}
.work-metric.accent .work-metric-bar span { background: var(--orange); }

.work-body {
  display: grid;
  gap: 14px;
}
.work-guide {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--orange-soft);
  border: 1px solid var(--orange-line);
  font-size: 13px;
  line-height: 1.65;
  color: var(--orange-deep);
}
.work-guide strong {
  font-size: 13px;
  font-weight: 900;
}
.work-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 16px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.work-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.work-panel-head h2 {
  font-size: 17px;
  font-weight: 900;
  line-height: 1.3;
}
.work-panel-head p {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.4;
}
.work-panel-date {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--bg-page);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.work-link-more {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  padding-top: 2px;
}

.plat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 640px) {
  .plat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
}
.plat-card {
  position: relative;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 16px 12px 14px;
  text-align: center;
  cursor: pointer;
  min-width: 0;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .15s ease;
}
.plat-card:active { transform: scale(0.98); }
.plat-card input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }
.plat-card .logo {
  width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 14px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #fafafa, #f0f0f0);
  font-weight: 900; font-size: 18px; color: var(--text-2);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.04);
}
.plat-card .logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.plat-card .name { font-weight: 800; font-size: 14px; line-height: 1.3; }
.plat-card .price { font-size: 12px; color: var(--text-3); margin-top: 4px; font-weight: 600; }
.plat-card.on {
  border-color: var(--orange);
  background: linear-gradient(180deg, #fff8f2, #fff4eb);
  box-shadow: 0 0 0 3px rgba(255,106,0,.12), 0 8px 20px rgba(255,106,0,.08);
}
.plat-card.done {
  opacity: .7;
  cursor: default;
  background: #f7f7f7;
}
.plat-card.done:active { transform: none; }
.plat-card .mark {
  position: absolute; top: 10px; right: 10px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--ok); color: #fff;
  font-size: 12px; line-height: 22px; font-weight: 900;
  box-shadow: 0 2px 8px rgba(30,132,73,.25);
}
.plat-card .done-tag {
  position: absolute; top: 10px; left: 10px;
  padding: 3px 7px; border-radius: 999px;
  background: #ececec; color: var(--text-3);
  font-size: 11px; font-weight: 700;
}
.plat-qty {
  margin-top: 12px;
  display: none;
  text-align: left;
}
.plat-card.on .plat-qty { display: block; }
.plat-qty label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  margin-bottom: 6px;
}
.plat-qty input { width: 100%; text-align: center; font-weight: 800; }

.confirm-box {
  margin-top: 16px;
  padding: 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff8f2, #fff4eb);
  border: 1px solid var(--orange-line);
  line-height: 1.7;
}
.confirm-box .confirm-title {
  font-size: 14px;
  font-weight: 900;
  margin-bottom: 6px;
}
.confirm-box .time {
  font-size: 12px;
  font-weight: 700;
  color: var(--orange-deep);
  margin-bottom: 10px;
}
.confirm-list {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}
.confirm-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,.7);
}
.confirm-item strong { color: var(--orange); font-weight: 900; white-space: nowrap; }
.confirm-pay {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--orange-line);
  font-size: 15px;
}
.confirm-pay strong {
  color: var(--orange);
  font-size: 20px;
  font-weight: 900;
}
.confirm-tip {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-3);
}

.work-actions {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 10px;
  margin-top: 18px;
  position: sticky;
  bottom: calc(var(--bottom-h) + var(--safe-bottom) + 10px);
  z-index: 15;
  padding: 10px;
  margin-left: -10px;
  margin-right: -10px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 8px 28px rgba(26,26,26,.08);
}
.work-actions .btn {
  width: 100%;
  min-height: 46px;
  font-size: 15px;
  font-weight: 800;
}
@media (min-width: 900px) {
  .work-actions {
    position: static;
    padding: 0;
    margin-left: 0;
    margin-right: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
  }
}

.work-recent { padding-bottom: 12px; }
.work-empty { padding: 28px 12px; }
.work-record-list { display: grid; gap: 0; }
.work-record {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.work-record:last-child { border-bottom: 0; }
.work-record-main { min-width: 0; flex: 1; }
.work-record-title {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
}
.work-record-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.work-record-side {
  flex-shrink: 0;
  text-align: right;
  display: grid;
  gap: 6px;
  justify-items: end;
}
.work-record-amt {
  font-size: 16px;
  font-weight: 900;
  color: var(--orange);
}

@media (max-width: 640px) {
  .work-hero { padding: 16px 14px 14px; border-radius: 16px; }
  .work-hero-head {
    flex-direction: column;
    align-items: stretch;
  }
  .work-hero-links {
    justify-content: flex-start;
    margin-top: 2px;
  }
  .work-hero-links a { padding: 6px 10px; font-size: 12px; }
  .work-metric-grid { gap: 8px; }
  .work-metric { padding: 12px 8px; border-radius: 12px; }
  .work-metric-label { font-size: 11px; }
  .work-metric-value { font-size: 22px; }
  .work-metric-value small { font-size: 11px; }
  .work-panel { padding: 14px 12px; border-radius: 14px; }
  .work-panel-head { margin-bottom: 12px; }
  .work-panel-head h2 { font-size: 16px; }
  .plat-card { padding: 14px 10px 12px; border-radius: 14px; }
  .plat-card .logo { width: 44px; height: 44px; border-radius: 12px; }
  .work-actions { grid-template-columns: 1fr; }
}

.plat-logo-field {
  display: flex;
  align-items: center;
  gap: 12px;
}
.plat-logo-prev {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--bg-page);
  flex-shrink: 0;
}
.plat-logo-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--bg-page);
  border: 1px solid var(--line);
  font-weight: 900;
  color: var(--text-2);
}
.record-list { display: grid; gap: 12px; }
.record-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #fafafa;
}

/* wallet / withdraw / profile layout */
.emp-page {
  display: grid;
  gap: 16px;
  max-width: 920px;
}
.emp-hero {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 20px 18px 18px;
  color: #fff;
  background:
    radial-gradient(ellipse 70% 80% at 100% 0%, rgba(255,255,255,.22), transparent 50%),
    linear-gradient(135deg, #ff8a2b 0%, #ff6a00 48%, #e85d00 100%);
  box-shadow: 0 14px 36px rgba(255, 106, 0, 0.22);
}
.emp-hero-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.emp-hero-title {
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.2;
  word-break: break-word;
}
.emp-hero-sub {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255,255,255,.88);
  overflow-wrap: anywhere;
}
.emp-hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.emp-hero-links a {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.28);
  color: #fff !important;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(6px);
  white-space: nowrap;
}
.emp-hero-links a:hover,
.emp-hero-links a.is-strong {
  background: rgba(255,255,255,.28);
  color: #fff !important;
}
.emp-hero-links a.is-strong {
  background: #fff;
  color: var(--orange) !important;
  border-color: transparent;
}
.emp-hero-links a.is-strong:hover {
  background: rgba(255,255,255,.92);
  color: var(--orange-deep) !important;
}
.emp-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.emp-metric {
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 14px;
  padding: 14px 12px;
  backdrop-filter: blur(8px);
  min-width: 0;
}
.emp-metric.accent {
  background: rgba(255,255,255,.92);
  border-color: transparent;
  color: var(--text);
}
.emp-metric.accent .emp-metric-label { color: var(--text-3); }
.emp-metric.accent .emp-metric-value { color: var(--orange); }
.emp-metric-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,.82);
  margin-bottom: 6px;
}
.emp-metric-value {
  font-size: clamp(18px, 4.5vw, 26px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.emp-metric-value.emp-metric-text {
  font-size: clamp(16px, 4vw, 22px);
  letter-spacing: 0;
}
.emp-body { display: grid; gap: 14px; }
.emp-guide {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--orange-soft);
  border: 1px solid var(--orange-line);
  font-size: 13px;
  line-height: 1.65;
  color: var(--orange-deep);
}
.emp-guide strong { font-size: 13px; font-weight: 900; }
.emp-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 16px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.emp-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.emp-panel-head h2 {
  font-size: 17px;
  font-weight: 900;
  line-height: 1.3;
}
.emp-panel-head p {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.4;
}
.emp-empty { padding: 28px 12px; }
.emp-flow-list { display: grid; gap: 0; }
.emp-flow {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.emp-flow:last-child { border-bottom: 0; }
.emp-flow-main { min-width: 0; flex: 1; }
.emp-flow-title {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
}
.emp-flow-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.emp-flow-meta.bad { color: var(--bad); font-weight: 600; }
.emp-flow-side {
  flex-shrink: 0;
  text-align: right;
  display: grid;
  gap: 4px;
  justify-items: end;
}
.emp-flow-amt {
  font-size: 16px;
  font-weight: 900;
}
.emp-flow-amt.up { color: var(--ok); }
.emp-flow-amt.down { color: var(--bad); }
.emp-flow-bal { font-size: 12px; color: var(--text-3); }

.emp-amount-input {
  font-size: 22px !important;
  font-weight: 900 !important;
  letter-spacing: -0.02em;
  height: 52px;
}
.emp-pay-methods {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .emp-pay-methods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.emp-pay-opt { display: block; cursor: pointer; }
.emp-pay-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.emp-pay-card {
  display: grid;
  gap: 6px;
  justify-items: start;
  padding: 14px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  min-width: 0;
}
.emp-pay-card .thumb {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--line);
}
.emp-pay-card strong { font-size: 14px; font-weight: 800; }
.emp-pay-card em {
  font-style: normal;
  font-size: 12px;
  color: var(--text-3);
  overflow-wrap: anywhere;
}
.emp-pay-opt input:checked + .emp-pay-card {
  border-color: var(--orange);
  background: linear-gradient(180deg, #fff8f2, #fff4eb);
  box-shadow: 0 0 0 3px rgba(255,106,0,.12);
}
.emp-pay-empty {
  grid-column: 1 / -1;
  padding: 18px;
  border-radius: 14px;
  background: var(--bg-page);
  border: 1px dashed var(--line);
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
}
.emp-pay-empty a { font-weight: 800; }
.emp-form-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
  margin-top: 18px;
}
.emp-form-actions .btn { width: 100%; min-height: 46px; font-weight: 800; }
@media (max-width: 520px) {
  .emp-form-actions { grid-template-columns: 1fr; }
}

.emp-profile-grid {
  display: grid;
  gap: 14px;
}
@media (min-width: 860px) {
  .emp-profile-grid { grid-template-columns: 1.4fr 1fr; align-items: start; }
}
.emp-profile-side { display: grid; gap: 14px; }
.emp-form-2 {
  display: grid;
  gap: 0;
}
@media (min-width: 560px) {
  .emp-form-2 { grid-template-columns: 1fr 1fr; gap: 0 12px; }
}
.emp-section-label {
  margin: 8px 0 12px;
  font-size: 14px;
  font-weight: 900;
}
.req { color: var(--bad); }
.emp-quick-links {
  display: grid;
  gap: 8px;
}
.emp-quick-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-page);
  border: 1px solid var(--line);
  color: var(--text) !important;
  font-size: 14px;
  font-weight: 700;
}
.emp-quick-links a::after {
  content: "\2192";
  color: var(--orange);
  font-weight: 900;
}
.emp-quick-links a:hover {
  border-color: var(--orange-line);
  background: var(--orange-soft);
  color: var(--orange-deep) !important;
}

@media (max-width: 640px) {
  .emp-hero { padding: 16px 14px 14px; border-radius: 16px; }
  .emp-hero-head { flex-direction: column; align-items: stretch; }
  .emp-hero-links { justify-content: flex-start; }
  .emp-hero-links a { padding: 6px 10px; }
  .emp-metric-grid { gap: 8px; }
  .emp-metric { padding: 12px 8px; border-radius: 12px; }
  .emp-metric-label { font-size: 11px; }
  .emp-metric-value { font-size: 18px; }
  .emp-panel { padding: 14px 12px; border-radius: 14px; }
  .emp-panel-head h2 { font-size: 16px; }
}

.staff-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.staff-toolbar .filters { margin: 0; flex: 1; }
.staff-panel-head { margin-bottom: 12px; }
.staff-panel-head h2 { font-size: 18px; font-weight: 900; }
.staff-panel-head p { margin-top: 4px; font-size: 13px; color: var(--text-3); }
.staff-name { font-weight: 800; line-height: 1.3; }
.staff-ops { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.staff-ops form { display: inline; margin: 0; }
.staff-table-wrap { display: none; }
.staff-cards { display: grid; gap: 10px; }
.staff-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}
.staff-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.staff-modal {
  position: fixed;
  inset: 0;
  z-index: 240;
  background: rgba(0,0,0,.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}
.staff-modal[hidden] { display: none; }
.staff-sheet {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 18px 16px;
  box-shadow: 0 18px 48px rgba(0,0,0,.2);
}
.staff-sheet h3 { font-size: 17px; font-weight: 900; margin-bottom: 12px; }
.staff-sheet-actions { display: grid; grid-template-columns: 1fr 1.3fr; gap: 8px; }
.staff-sheet-actions .btn { width: 100%; }
@media (min-width: 900px) {
  .staff-table-wrap { display: block; }
  .staff-cards { display: none; }
  .staff-modal { align-items: center; }
}
