/* ========== Shared modals ========== */

/* Login */
.modal-card.login-card {
  width: 100%;
  max-width: 26.5rem;
  background: #fff;
  color: #1a1d21;
  border-radius: 1.15rem;
  padding: 1.5rem 1.6rem 1.25rem;
  position: relative;
  box-shadow: 0 1.5rem 4rem rgba(0,0,0,.35);
}
html[data-theme="dark"] .page-marketing ~ #modal-root .login-card,
body.page-app #modal-root .login-card,
.login-card.theme-dark {
  background: linear-gradient(165deg, #23252b, #1b1d22);
  color: #f3f4f6;
  box-shadow: 0 1.5rem 4rem rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.08);
}
.modal-close {
  position: absolute; top: .85rem; right: .9rem;
  width: 1.75rem; height: 1.75rem;
  border-radius: 50%;
  color: #8a939b;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
}
.modal-close:hover { background: rgba(0,0,0,.06); color: #222; }
.login-card.theme-dark .modal-close:hover { background: rgba(255,255,255,.08); color: #fff; }

.login-logo { display: flex; justify-content: center; margin-bottom: .55rem; }
.login-logo img { width: 44px; height: 44px; border-radius: .55rem; }
.login-card h3 { text-align: center; font-size: 1.15rem; font-weight: 700; color: #111; margin-bottom: .7rem; }
.login-card.theme-dark h3 { color: #f3f4f6; }

.login-gift {
  text-align: center;
  margin: 0 0 1rem;
  padding: .55rem .5rem .65rem;
  border-radius: .7rem;
  background: linear-gradient(180deg, #fff8ec, #fff);
}
.login-card.theme-dark .login-gift { background: linear-gradient(180deg, rgba(245,197,66,.1), transparent); }
.login-gift .gift-title {
  color: #e89a12;
  font-weight: 700;
  font-size: .92rem;
  display: flex; align-items: center; justify-content: center; gap: .3rem;
}
.login-gift .gift-chips { display: flex; justify-content: center; gap: .4rem; margin: .45rem 0 .3rem; flex-wrap: wrap; }
.login-gift .gift-chips span {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .15rem .5rem;
  border-radius: 999px;
  border: 1px solid #b8e8f0;
  color: #1aa0b8;
  font-size: .72rem;
  background: #f4fcfe;
}
.login-gift .gift-note { font-size: .68rem; color: #9aa3ab; }

.login-tabs {
  display: flex;
  border-bottom: 1px solid #eee;
  margin-bottom: 1rem;
  gap: 0;
}
.login-card.theme-dark .login-tabs { border-bottom-color: rgba(255,255,255,.08); }
.login-tabs button {
  flex: 1;
  padding: .65rem 0 .55rem;
  font-size: .875rem;
  color: #8a939b;
  border-bottom: 2px solid transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: .3rem;
}
.login-tabs button.is-active {
  color: #00A8BE;
  border-bottom-color: #00CAE0;
  font-weight: 600;
}
.login-card .field label { color: #5b656c; font-size: .8rem; }
.login-card.theme-dark .field label { color: #9aa3ab; }
.login-card .input {
  background: #fff;
  border: 1px solid #e6eaed;
  color: #1a1d21;
  border-radius: .45rem;
  height: 2.45rem;
  padding: 0 .7rem;
}
.login-card.theme-dark .input {
  background: #1B1C21;
  border-color: rgba(255,255,255,.1);
  color: #F5FBFF;
}
.login-card .input:focus { border-color: #00CAE0; box-shadow: 0 0 0 3px rgba(0,202,224,.12); }
.btn-get-code {
  flex-shrink: 0;
  padding: 0 .85rem;
  height: 2.45rem;
  border-radius: .45rem;
  border: 1px solid #d0eef3;
  background: #f4fcfe;
  color: #00A8BE;
  font-size: .8rem;
  font-weight: 500;
}
.btn-get-code:hover { background: #e7f8fb; }
.btn-login {
  width: 100%;
  height: 2.65rem;
  border-radius: .45rem;
  background: #7ed7e4;
  color: #fff;
  font-size: .95rem;
  font-weight: 600;
  margin-top: .15rem;
  transition: background .18s ease, box-shadow .18s ease;
}
.btn-login.is-ready { background: #00CAE0; box-shadow: 0 0 .8rem rgba(0,202,224,.3); }
.btn-login.is-ready:hover { filter: brightness(1.05); }
.agree-row {
  display: flex; align-items: flex-start; gap: .45rem;
  margin: .85rem 0 1rem;
  font-size: .78rem;
  color: #6b757c;
  line-height: 1.5;
}
.agree-row a { color: #00A8BE; }
.agree-row input { margin-top: .15rem; accent-color: #00CAE0; }
.third-label {
  text-align: center;
  font-size: .75rem;
  color: #9aa3ab;
  margin: .2rem 0 .7rem;
  position: relative;
}
.third-row { display: flex; gap: .55rem; flex-wrap: wrap; }
.btn-third {
  flex: 1 1 42%;
  height: 2.35rem;
  border-radius: .45rem;
  border: 1px solid #e6eaed;
  background: #fff;
  color: #333;
  font-size: .82rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
}
.btn-third:hover { background: #f7f8f9; }
.login-card.theme-dark .btn-third {
  background: #23252A; border-color: rgba(255,255,255,.1); color: #eee;
}
.forgot-link {
  display: block; text-align: center;
  margin-top: .85rem;
  font-size: .78rem;
  color: #9aa3ab;
}
.forgot-link:hover { color: #00A8BE; }
.login-hint { font-size: .72rem; color: #9aa3ab; margin: -.4rem 0 .7rem; }

/* Download client */
.modal-card.download-card {
  width: min(1080px, 96vw);
  max-height: 92vh;
  overflow: hidden;
  border-radius: 1.25rem;
  background: #0d1016 url("../assets/download-bg.jpg") center / cover no-repeat;
  color: #fff;
  position: relative;
  box-shadow: 0 2rem 5rem rgba(0,0,0,.55);
  padding: 0;
}
.download-inner {
  position: relative;
  padding: 1.1rem 1.4rem 1.6rem;
  background: linear-gradient(180deg, rgba(8,10,16,.55) 0%, rgba(8,10,16,.35) 30%, rgba(8,10,16,.55) 100%);
}
.download-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: .4rem;
}
.download-top .brand-word { font-size: 1rem; }
.download-title {
  position: absolute; left: 50%; top: 1.2rem;
  transform: translateX(-50%);
  font-size: 1rem;
  color: rgba(255,255,255,.88);
  font-weight: 500;
}
.download-stage {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 1rem;
  align-items: end;
  min-height: 280px;
  padding: 1.5rem 1rem .5rem;
}
.device-laptop, .device-phone { display: flex; flex-direction: column; align-items: center; }
.laptop-frame {
  width: min(520px, 100%);
  background: linear-gradient(180deg, #c8ccd1, #9aa1a8);
  border-radius: 12px 12px 0 0;
  padding: 8px 8px 0;
  box-shadow: 0 20px 50px rgba(0,0,0,.45);
}
.laptop-frame .screen {
  background: #111;
  border-radius: 6px 6px 0 0;
  overflow: hidden;
  aspect-ratio: 16/10;
}
.laptop-frame .screen img { width: 100%; height: 100%; object-fit: cover; }
.laptop-base {
  width: min(580px, 108%);
  height: 12px;
  background: linear-gradient(180deg, #d5d8dc, #8b9198);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 8px 16px rgba(0,0,0,.3);
}
.phone-frame {
  width: 150px;
  background: #1a1c20;
  border-radius: 22px;
  padding: 8px;
  box-shadow: 0 20px 40px rgba(0,0,0,.5);
  border: 2px solid #3a3d44;
}
.phone-frame .pscreen {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 9/16;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .5rem;
  padding: .6rem;
}
.phone-frame .pscreen img { width: 78%; height: auto; }
.phone-frame .pscreen .tip { font-size: .7rem; color: #333; }
.download-cols {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 1rem;
  text-align: center;
  padding: .5rem 1rem 0;
}
.download-cols h4 { font-size: 1.55rem; font-weight: 700; margin-bottom: .35rem; }
.download-cols .meta { font-size: .8rem; color: rgba(255,255,255,.65); margin-bottom: .45rem; }
.download-cols .note { font-size: .75rem; color: rgba(255,255,255,.5); margin-bottom: .7rem; }
.btn-copy-link {
  min-width: 16rem;
  height: 2.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(20,22,28,.7);
  color: #fff;
  font-size: .9rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
}
.btn-copy-link:hover { background: rgba(40,44,52,.85); border-color: rgba(255,255,255,.3); }
.mac-link, .apk-link {
  display: inline-block;
  margin-top: .55rem;
  font-size: .8rem;
  color: rgba(255,255,255,.55);
}
.mac-link:hover, .apk-link:hover { color: var(--color-primary); }
.download-card .modal-close { color: #fff; background: rgba(0,0,0,.25); }
@media (max-width: 800px) {
  .download-stage, .download-cols { grid-template-columns: 1fr; }
  .download-title { position: static; transform: none; text-align: center; width: 100%; margin-top: .3rem; }
}

/* Customer service */
.modal-card.cs-card {
  width: 100%;
  max-width: 22rem;
  background: #1a1c22;
  color: #fff;
  border-radius: 1rem;
  border: 1px solid rgba(255,255,255,.08);
  padding: 0 0 1.25rem;
  position: relative;
  box-shadow: var(--shadow-xl);
}
.cs-head {
  display: flex; align-items: center; gap: .5rem;
  padding: .9rem 1.1rem .75rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
  font-weight: 600;
}
.cs-head .sub { font-weight: 400; font-size: .75rem; color: var(--text-secondary); margin-left: .15rem; }
.cs-body { display: flex; flex-direction: column; align-items: center; padding: 1.4rem 1.2rem 0; }
.cs-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.1);
}
.cs-name { margin-top: .65rem; font-weight: 600; }
.cs-online {
  margin-top: .25rem;
  font-size: .78rem;
  color: #3dce7a;
  display: inline-flex; align-items: center; gap: .3rem;
}
.cs-online i { width: .45rem; height: .45rem; border-radius: 50%; background: #3dce7a; display: inline-block; }
.cs-qr {
  margin-top: 1rem;
  background: #fff;
  padding: .55rem;
  border-radius: .4rem;
}
.cs-qr img { width: 180px; height: 180px; }
.cs-qr-tip { margin-top: .55rem; font-size: .75rem; color: var(--text-tertiary); }

/* Business partner */
.modal-card.biz-card {
  width: 100%;
  max-width: 32rem;
  max-height: 92vh;
  overflow: auto;
  background: #1a1d24;
  color: #fff;
  border-radius: 1.15rem;
  border: 1px solid rgba(255,255,255,.08);
  padding: 1.6rem 1.5rem 1.2rem;
  position: relative;
}
.biz-icon {
  width: 3rem; height: 3rem; margin: 0 auto .7rem;
  border-radius: .85rem;
  background: linear-gradient(135deg, #00CAE0, #4C8DFF);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.3rem;
  box-shadow: 0 0 1.2rem rgba(0,202,224,.3);
}
.biz-card h3 { text-align: center; color: var(--color-primary); font-size: 1.2rem; margin-bottom: .4rem; }
.biz-lead { text-align: center; font-size: .82rem; color: var(--text-secondary); margin-bottom: 1.1rem; line-height: 1.6; }
.biz-card .field label, .rpt-card .field label { color: #c5cdd2; }
.looking-label { font-size: .8rem; color: #c5cdd2; margin-bottom: .45rem; }
.looking-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.looking-chips button {
  padding: .28rem .65rem;
  border-radius: 999px;
  border: 1px solid rgba(0,202,224,.3);
  background: rgba(0,202,224,.08);
  color: #9feaf3;
  font-size: .75rem;
}
.looking-chips button.is-on {
  background: rgba(0,202,224,.22);
  border-color: var(--color-primary);
  color: #fff;
}
.seg-switch {
  display: flex; gap: .4rem; margin-bottom: .45rem;
}
.seg-switch button {
  padding: .28rem .7rem;
  border-radius: .4rem;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  color: var(--text-secondary);
  font-size: .78rem;
}
.seg-switch button.is-on { background: rgba(0,202,224,.18); color: var(--color-primary); border-color: rgba(0,202,224,.4); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .7rem; }
.biz-note {
  display: flex; gap: .4rem; align-items: flex-start;
  font-size: .75rem; color: var(--text-secondary);
  margin: .2rem 0 1rem;
}
.modal-actions { display: flex; justify-content: flex-end; gap: .6rem; }
.modal-actions .btn-cancel {
  padding: .55rem 1.15rem;
  border-radius: .5rem;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  color: #ddd;
  font-size: .875rem;
}
.modal-actions .btn-send {
  padding: .55rem 1.15rem;
  border-radius: .5rem;
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
  font-size: .875rem;
  box-shadow: var(--glow);
}
@media (max-width: 600px) { .field-grid { grid-template-columns: 1fr; } }

/* Report */
.modal-card.rpt-card {
  width: 100%;
  max-width: 36rem;
  max-height: 92vh;
  overflow: auto;
  background: #1a1d24;
  color: #fff;
  border-radius: 1.15rem;
  border: 1px solid rgba(255,255,255,.08);
  padding: 1.3rem 1.4rem 1.2rem;
  position: relative;
}
.rpt-head { display: flex; align-items: flex-start; gap: .55rem; margin-bottom: .85rem; }
.rpt-head h3 { font-size: 1.05rem; }
.rpt-head p { font-size: .75rem; color: var(--text-secondary); }
.rpt-notice {
  background: rgba(0,202,224,.08);
  border: 1px solid rgba(0,202,224,.22);
  border-radius: .55rem;
  padding: .65rem .8rem;
  font-size: .78rem;
  color: #c5eef3;
  line-height: 1.65;
  margin-bottom: 1rem;
}
.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: .3rem; }
.type-opt {
  text-align: left;
  padding: .65rem .75rem;
  border-radius: .55rem;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
}
.type-opt.is-on { border-color: rgba(0,202,224,.45); background: rgba(0,202,224,.08); }
.type-opt .n { display: flex; align-items: center; gap: .4rem; font-size: .88rem; font-weight: 500; }
.type-opt .d { font-size: .72rem; color: var(--text-tertiary); margin: .2rem 0 0 1.25rem; }
.type-opt input { accent-color: var(--color-primary); }
.char-count { text-align: right; font-size: .7rem; color: var(--text-tertiary); margin-top: -.55rem; margin-bottom: .7rem; }

.insp-detail { position: fixed; inset: 0; z-index: 90; display: none; }
.insp-detail.is-open { display: block; }
.insp-detail-bg { position: absolute; inset: 0; background: rgba(4,8,12,.62); }
.insp-detail-panel {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%,-50%);
  width: min(980px, 94vw);
  max-height: 88vh;
  overflow: auto;
  background: #14161c;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 1.1rem;
  display: grid;
  grid-template-columns: 1.15fr .9fr;
}
.insp-detail-media img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 320px; }
.insp-detail-body { padding: 1.3rem 1.25rem 1.4rem; color: #e8eef2; }
.insp-detail-body h3 { font-size: 1.25rem; margin-bottom: .35rem; }
.insp-detail-body h4 { margin: 1rem 0 .4rem; font-size: .9rem; }
.insp-detail-body .meta { font-size: .78rem; color: #8C99A0; }
.insp-detail-body .prompt { font-size: .84rem; color: #c5ccd1; line-height: 1.7; }
.insp-detail-actions { display: flex; gap: .5rem; margin-top: .8rem; }
.similar-row { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.similar-card { text-align: left; color: #dfe7ec; }
.similar-card img { width: 100%; height: 88px; object-fit: cover; border-radius: .45rem; display: block; margin-bottom: .25rem; }
.similar-card span { font-size: .72rem; }
@media (max-width: 800px) { .insp-detail-panel { grid-template-columns: 1fr; } }
