/* ============================================================
   天蝎客 · 商家后台
   布局基础复用 console.css；本文件负责商家端差异与登录/状态页
   ============================================================ */

/* 侧边栏品牌文字头像 */

.tk-brandmark--text {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
}

/* 待开放导航 */

.tk-nav__item.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.tk-nav__item.is-disabled:hover {
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
}

.tk-nav__badge {
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.45);
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.02em;
}

/* ------------------------------------------------------------
   商家登录 / 状态页
   ------------------------------------------------------------ */

.tk-mlogin {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 40px 20px;
  background:
    radial-gradient(900px 600px at 15% 10%, #eef0ff 0%, rgba(238, 240, 255, 0) 60%),
    radial-gradient(800px 600px at 90% 90%, #f3e8ff 0%, rgba(243, 232, 255, 0) 60%),
    #f7f8fc;
}

.tk-mlogin__card {
  width: 100%;
  max-width: 420px;
  padding: 34px 34px 26px;
  border: 1px solid #eef1f7;
  border-radius: 24px;
  background: #fff;
  box-shadow:
    0 34px 70px -34px rgba(15, 23, 42, 0.22),
    0 6px 18px -12px rgba(15, 23, 42, 0.08);
}

.tk-mlogin__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.tk-mlogin__mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 8px 18px -8px rgba(99, 102, 241, 0.8);
}

.tk-mlogin__brand strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #0f172a;
}

.tk-mlogin__brand small {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: #94a3b8;
}

.tk-mlogin h1 {
  margin: 0 0 6px;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tk-mlogin__sub {
  margin: 0 0 22px;
  font-size: 12.5px;
  line-height: 1.7;
  color: #64748b;
}

.tk-mlogin .tk-alert {
  margin: 0 0 18px;
}

.tk-mlogin__field {
  margin-bottom: 14px;
}

.tk-mlogin__field label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

.tk-mlogin__field .form-control {
  height: 46px;
  border-color: #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 13.5px;
}

.tk-mlogin__field .form-control:focus {
  border-color: #6366f1;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.tk-mlogin__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2px 0 18px;
  font-size: 12px;
  color: #64748b;
}

.tk-mlogin__row label {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}

.tk-mlogin__row input {
  accent-color: #4f46e5;
}

.tk-mlogin__submit {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(118deg, #5b5bf0 0%, #7c3aed 100%);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  cursor: pointer;
  box-shadow: 0 16px 30px -14px rgba(93, 76, 240, 0.72);
  transition: transform 0.16s, box-shadow 0.16s;
}

.tk-mlogin__submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 34px -14px rgba(93, 76, 240, 0.8);
}

.tk-mlogin__links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 12px;
  color: #94a3b8;
}

.tk-mlogin__links a {
  color: #4f46e5;
  font-weight: 500;
  text-decoration: none;
}

.tk-mlogin__links a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tk-mlogin__foot {
  margin: 16px 0 0;
  text-align: center;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: #b3bccd;
}

/* 状态页 */

.tk-status {
  text-align: center;
  max-width: 460px;
}

.tk-status__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
}

.tk-status__icon svg {
  width: 26px;
  height: 26px;
}

.tk-status__icon--pending {
  background: #fffbeb;
  color: #b45309;
}

.tk-status__icon--danger {
  background: #fef2f2;
  color: #dc2626;
}

.tk-status__icon--muted {
  background: #f1f5f9;
  color: #64748b;
}

.tk-status h1 {
  margin: 0 0 8px;
  font-size: 23px;
}

.tk-status__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.8;
  color: #64748b;
}

.tk-status__reason {
  margin: 18px 0 0;
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 12.5px;
  line-height: 1.6;
  text-align: left;
}

.tk-status__meta {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.tk-status__meta li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed #eef2f7;
  font-size: 12.5px;
}

.tk-status__meta li:last-child {
  border-bottom: 0;
}

.tk-status__meta span {
  color: #64748b;
}

.tk-status__meta strong {
  font-weight: 500;
  color: #0f172a;
}

.tk-status__logout {
  width: 100%;
  height: 44px;
  margin-top: 22px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #475569;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.tk-status__logout:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

/* ------------------------------------------------------------
   商家首页
   ------------------------------------------------------------ */

.tk-merchant-brief {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px dashed #eef2f7;
}

.tk-merchant-brief__avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eef0ff, #f3e8ff);
  color: #4f46e5;
  font-size: 18px;
  font-weight: 600;
}

.tk-merchant-brief h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.tk-merchant-brief p {
  margin: 4px 0 0;
  font-size: 11.5px;
  color: #94a3b8;
}

.tk-plan-name {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tk-steps {
  display: grid;
  gap: 8px;
}

.tk-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #eef1f7;
  border-radius: 11px;
  background: #fbfcfe;
}

.tk-step > span {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
}

.tk-step strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
}

.tk-step small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #94a3b8;
}

.tk-step.is-done {
  border-color: #d1fae5;
  background: #f6fffb;
}

.tk-step.is-done > span {
  background: #ecfdf5;
  color: #059669;
}

/* 成功页补充链接 */

.tk-success__link {
  margin-top: 14px !important;
  font-size: 12px;
  color: #94a3b8;
}

.tk-success__link a {
  color: #4f46e5;
  text-decoration: none;
}

/* 等宽字体（状态页未加载 console.css） */

.tk-mono {
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
  color: #475569;
}

@media (max-width: 480px) {
  .tk-mlogin {
    padding: 24px 14px;
  }

  .tk-mlogin__card {
    padding: 28px 22px 22px;
    border-radius: 20px;
  }
}

/* ------------------------------------------------------------
   商品
   ------------------------------------------------------------ */

.tk-product {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tk-product__cover {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  object-fit: cover;
  background: #f1f5f9;
}

.tk-product__cover--text {
  display: grid;
  place-items: center;
  color: #4f46e5;
  font-size: 13px;
  font-weight: 600;
}

.tk-product strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
}

.tk-product small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #94a3b8;
}

/* 入驻进度 */
.tk-step > div {
  flex: 1;
}

.tk-step__badge {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #94a3b8;
  font-size: 9.5px;
  font-style: normal;
  white-space: nowrap;
}

.tk-step .tk-action {
  margin-left: auto;
  white-space: nowrap;
}

/* 客户 */
.tk-customer {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tk-customer__avatar {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 13px;
  font-weight: 600;
}

.tk-customer strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
}

.tk-customer small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #94a3b8;
}

.tk-docs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tk-docs span {
  padding: 2px 6px;
  border-radius: 6px;
  background: #f8fafc;
  color: #cbd5e1;
  font-size: 10px;
  white-space: nowrap;
}

.tk-docs span.is-ok {
  background: #ecfdf5;
  color: #059669;
}

.tk-badge--cash {
  background: #eef2ff;
  color: #4f46e5;
}

.tk-badge--weekly {
  background: #fffbeb;
  color: #b45309;
}

.tk-doc {
  display: block;
  max-width: 100%;
  max-height: 260px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  object-fit: contain;
}

.tk-form__section {
  margin: 6px 0 12px;
  color: #0f172a;
  font-size: 12px;
  font-weight: 600;
}

.tk-form__section:not(:first-child) {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #eef2f7;
}

/* 订单 */
.tk-order-items .form-select {
  min-width: 260px;
}

.tk-order-items .form-control {
  min-width: 80px;
}

.tk-order-items .form-text {
  margin-top: 2px;
  white-space: nowrap;
}

/* 小程序预览 */
.tk-phone-wrap {
  display: flex;
  justify-content: center;
  padding: 6px 0;
}

.tk-phone {
  width: 260px;
  padding: 10px;
  border-radius: 34px;
  background: #0f172a;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.tk-phone--sm {
  width: 220px;
  padding: 8px;
  border-radius: 28px;
}

.tk-phone__screen {
  width: 240px;
  height: 500px;
  margin: 0 auto;
  border-radius: 26px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.tk-phone--sm .tk-phone__screen {
  width: 204px;
  height: 420px;
  border-radius: 20px;
}

.tk-phone__nav {
  flex: none;
  color: #fff;
}

.tk-phone__status {
  display: flex;
  justify-content: space-between;
  padding: 7px 13px 2px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 8px;
}

.tk-phone__status--light {
  color: rgba(255, 255, 255, 0.9);
}

.tk-phone__navrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 13px 9px;
  font-size: 9px;
}

.tk-phone__navrow strong {
  font-size: 11px;
  font-weight: 500;
}

.tk-phone__body {
  flex: 1;
  overflow: hidden;
  padding: 8px 9px;
}

.tk-phone__search {
  padding: 7px 10px;
  border-radius: 999px;
  background: #fff;
  color: #94a3b8;
  font-size: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.tk-phone__banner {
  width: 100%;
  height: 82px;
  margin-top: 8px;
  border-radius: 9px;
  object-fit: cover;
}

.tk-phone__banner--placeholder {
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 9px;
}

.tk-phone__notice {
  margin-top: 7px;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.7);
  color: #64748b;
  font-size: 7.5px;
  line-height: 1.5;
}

.tk-phone__cats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 9px;
  text-align: center;
}

.tk-phone__cats span {
  width: 30px;
  height: 30px;
  margin: 0 auto 3px;
  border-radius: 10px;
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 600;
}

.tk-phone__cats small {
  display: block;
  color: #64748b;
  font-size: 7px;
}

.tk-phone__section-title {
  margin: 10px 0 6px;
  font-size: 10px;
  font-weight: 600;
}

.tk-phone__products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.tk-phone__product {
  padding: 5px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.tk-phone__product-img {
  height: 48px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: rgba(15, 23, 42, 0.35);
  font-size: 7px;
}

.tk-phone__product strong {
  display: block;
  margin-top: 4px;
  font-size: 7.5px;
  font-weight: 500;
}

.tk-phone__product small {
  display: block;
  margin-top: 1px;
  color: #ef4444;
  font-size: 7.5px;
}

.tk-phone__store {
  margin-top: 9px;
  padding: 9px 10px;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.tk-phone__store strong {
  display: block;
  font-size: 9px;
}

.tk-phone__store small {
  display: block;
  margin-top: 3px;
  color: #94a3b8;
  font-size: 7px;
}

.tk-phone__tabbar {
  flex: none;
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 40px;
  background: #fff;
  border-top: 1px solid #f1f5f9;
  color: #94a3b8;
  font-size: 8px;
}

.tk-phone__empty {
  padding: 40px 10px;
  text-align: center;
  color: #94a3b8;
  font-size: 9px;
}

.tk-phone__login {
  flex: 1;
  height: 100%;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  color: #fff;
}

.tk-phone__login-body {
  flex: 1;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.tk-phone__logo {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.2);
}

.tk-phone__logo--text {
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 20px;
  font-weight: 600;
}

.tk-phone__login-body h4 {
  margin: 12px 0 4px;
  font-size: 15px;
  font-weight: 600;
}

.tk-phone__login-body p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 8.5px;
}

.tk-phone__login-btn {
  display: block;
  width: 100%;
  padding: 9px 0;
  background: #fff;
  font-size: 9px;
  font-weight: 600;
}

.tk-phone__login-body small {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 8px;
}

/* 模板卡片 */
.tk-template-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
}

.tk-template-card__preview {
  display: flex;
  justify-content: center;
  height: 430px;
  padding-top: 14px;
  overflow: hidden;
  background: #f1f5f9;
}

.tk-template-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 14px 16px 16px;
}

.tk-template-card__body h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.tk-template-card__body p {
  flex: 1;
  margin: 6px 0 12px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.6;
}

.tk-phone__status--dark {
  color: rgba(15, 23, 42, 0.55);
}

.tk-phone__login--plain .tk-phone__login-body p,
.tk-phone__login--store .tk-phone__login-body p {
  color: #64748b;
}

.tk-phone__login--plain .tk-phone__login-body small,
.tk-phone__login--store .tk-phone__login-body small {
  color: #94a3b8;
}

.tk-phone__login--store .tk-phone__login-body {
  padding-top: 16px;
}

.tk-phone__login-hero {
  flex: none;
  padding: 14px 12px;
  color: #fff;
  text-align: center;
}

.tk-phone__login-hero strong {
  display: block;
  font-size: 12px;
}

.tk-phone__login-hero small {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 7px;
}

/* 模板缩略图 */
.tk-template-card__thumb {
  height: 180px;
  overflow: hidden;
  background: #f1f5f9;
}

.tk-template-thumb-card {
  width: 100%;
  height: 100%;
}

.tk-template-thumb-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tk-template-thumb-card--generated {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
}

.tk-template-thumb-card__phone {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 76px;
  height: 104px;
  padding: 5px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

.tk-template-thumb-card__bar {
  height: 6px;
  border-radius: 3px;
}

.tk-template-thumb-card__banner {
  height: 18px;
  border-radius: 4px;
  background: #f1f5f9;
}

.tk-template-thumb-card__line {
  height: 4px;
  border-radius: 2px;
  background: #e2e8f0;
}

.tk-template-thumb-card__line--short {
  width: 60%;
}

.tk-template-thumb-card__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  flex: 1;
}

.tk-template-thumb-card__grid i {
  border-radius: 2px;
  background: #f1f5f9;
}

.tk-template-thumb-card--generated strong {
  font-size: 11px;
  font-weight: 500;
}

/* 手机截图缩略图：竖屏、按高度缩放，不做大图裁切 */
.tk-template-card__thumb {
  height: 260px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef2f7;
}

.tk-template-thumb-card {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tk-template-thumb-card img {
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

.tk-order-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.tk-rest-order {
  padding: 20px;
}

.tk-rest-order__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.tk-rest-order__pickup {
  color: #0f172a;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1.1;
}

.tk-rest-order__type {
  margin-top: 6px;
  color: #94a3b8;
  font-size: 12px;
}

.tk-rest-order__payment {
  margin-top: 8px;
  color: #ef4444;
  font-size: 12px;
}

.tk-rest-order__payment.is-paid {
  color: #10b981;
}

.tk-rest-order__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  color: #94a3b8;
  font-size: 12px;
}

.tk-rest-order__items {
  margin-top: 12px;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
}

.tk-rest-order__item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  color: #334155;
  font-size: 13px;
}

.tk-rest-order__qty {
  margin-left: 6px;
  color: #64748b;
}

.tk-rest-order__options {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 4px;
  color: #94a3b8;
  font-size: 12px;
}

.tk-rest-order__remark {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
}

.tk-rest-order__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

.tk-rest-order__total {
  margin-left: 8px;
  color: #ef4444;
  font-size: 20px;
}

.tk-code {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #334155;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

@media (max-width: 992px) {
  .tk-order-grid {
    grid-template-columns: 1fr;
  }
}
