/* ToySail Account — 登录弹窗 + 我的询盘页样式 */
.toysail-account { position: fixed; inset: 0; z-index: 260; }
.toysail-account[hidden] { display: none; }
.toysail-account__backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.42); }
.toysail-account__panel {
	position: absolute; top: 78px; right: max(24px, calc((100vw - 1600px) / 2 + 24px));
	width: 360px; max-width: calc(100vw - 32px); background: #fff;
	border: 1px solid var(--ts-line, #E2E8F0); border-radius: 14px;
	box-shadow: 0 18px 44px rgba(15,23,42,.18); padding: 22px 22px 20px;
}
.toysail-account__close {
	position: absolute; top: 10px; right: 12px; border: none; background: none;
	font-size: 22px; line-height: 1; color: var(--ts-ink-400, #64748B); cursor: pointer; padding: 4px;
}
.toysail-account__close:hover { color: var(--ts-ink-900, #0B1220); }
.toysail-account__title { margin: 0 0 6px; font-size: 1.1rem; font-family: var(--ts-font-display, inherit); color: var(--ts-ink-900, #0B1220); }
.toysail-account__sub { margin: 0 0 16px; font-size: .84rem; color: var(--ts-ink-400, #64748B); line-height: 1.55; }
.toysail-account__label { display: block; font-size: .78rem; font-weight: 600; color: var(--ts-ink-600, #1E293B); margin: 10px 0 5px; }
.toysail-account__input {
	width: 100%; min-height: 42px; padding: 8px 12px; font-size: .92rem;
	border: 1px solid var(--ts-line, #E2E8F0); border-radius: var(--ts-radius-btn, 8px); background: #fff; color: var(--ts-ink-900, #0B1220);
}
.toysail-account__input:focus { outline: none; border-color: var(--ts-brand, #1D4ED8); box-shadow: 0 0 0 3px var(--ts-brand-tint, #EFF6FF); }
.toysail-account__coderow { display: flex; gap: 8px; }
.toysail-account__coderow .toysail-account__input { flex: 1; min-width: 0; }
.toysail-account__send {
	flex: none; padding: 0 12px; font-size: .82rem; font-weight: 600; white-space: nowrap; cursor: pointer;
	border: 1px solid var(--ts-line, #E2E8F0); border-radius: var(--ts-radius-btn, 8px);
	background: #fff; color: var(--ts-brand, #1D4ED8);
}
.toysail-account__send:hover:not(:disabled) { border-color: var(--ts-brand, #1D4ED8); background: var(--ts-brand-tint, #EFF6FF); }
/* disabled（冷却倒计时）时 Kadence button:hover 会盖蓝底，必须连 :hover 一起锁回 */
.toysail-account__send:disabled, .toysail-account__send:disabled:hover { background: #fff; border-color: var(--ts-line, #E2E8F0); color: var(--ts-ink-400, #64748B); cursor: default; }
.toysail-account__msg { min-height: 20px; margin: 10px 0 4px; font-size: .82rem; }
.toysail-account__msg.is-ok { color: var(--ts-success, #059669); }
.toysail-account__msg.is-err { color: #DC2626; }
.toysail-account__submit {
	display: block; width: 100%; margin-top: 8px; padding: 11px 16px; text-align: center;
	font-size: .92rem; font-weight: 600; cursor: pointer; text-decoration: none;
	border: none; border-radius: var(--ts-radius-btn, 8px); background: var(--ts-brand, #1D4ED8); color: #fff;
}
.toysail-account__submit:hover { background: var(--ts-brand-hover, #1E40AF); color: #fff; }
.toysail-account__ghost {
	display: block; width: 100%; margin-top: 10px; padding: 9px 16px; font-size: .86rem; cursor: pointer;
	border: 1px solid var(--ts-line, #E2E8F0); border-radius: var(--ts-radius-btn, 8px); background: #fff; color: var(--ts-ink-600, #1E293B);
}
.toysail-account__ghost:hover { border-color: var(--ts-brand, #1D4ED8); color: var(--ts-brand, #1D4ED8); background: var(--ts-brand-tint, #EFF6FF); }

/* 已登录面板：My Inquiries + 浏览历史 并排一行 */
.toysail-account__row { display: flex; gap: 10px; }
.toysail-account__row .toysail-account__submit,
.toysail-account__row .toysail-account__ghost { flex: 1 1 0; margin-top: 8px; white-space: nowrap; }

/* 浏览历史列表 */
.toysail-account__history { max-height: 320px; overflow-y: auto; margin: 4px 0 10px; border: 1px solid var(--ts-line, #E2E8F0); border-radius: var(--ts-radius-btn, 8px); }
.toysail-account__stephead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.toysail-account__stephead .toysail-account__title { margin: 0; }
.toysail-account__viewall { font-size: 12px; color: var(--ts-brand, #1D4ED8); text-decoration: none; white-space: nowrap; }
.toysail-account__viewall:hover { text-decoration: underline; }
.toysail-account__history:empty { display: none; }
.toysail-account__historyempty { margin: 0; padding: 22px 14px; text-align: center; font-size: .84rem; color: var(--ts-ink-400, #64748B); }
.toysail-account__historyitem { display: flex; align-items: center; gap: 10px; padding: 9px 12px; text-decoration: none; border-bottom: 1px solid var(--ts-line, #E2E8F0); }
.toysail-account__historyitem:last-child { border-bottom: none; }
.toysail-account__historyitem:hover { background: var(--ts-brand-tint, #EFF6FF); }
.toysail-account__historyimg { flex: 0 0 44px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: #F8FAFC; border: 1px solid var(--ts-line, #E2E8F0); border-radius: 8px; overflow: hidden; }
.toysail-account__historyimg img { max-width: 100%; max-height: 100%; object-fit: contain; }
.toysail-account__historyph { font-family: var(--ts-font-mono, monospace); font-size: 10px; color: var(--ts-ink-400, #64748B); }
.toysail-account__historymeta { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.toysail-account__historymeta strong { font-size: .84rem; font-weight: 600; color: var(--ts-ink-900, #0B1220); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toysail-account__historymeta em { font-style: normal; font-size: 11px; font-family: var(--ts-font-mono, monospace); color: var(--ts-ink-400, #64748B); }

/* 浏览历史全量页（/view-history/） */
.toysail-vh__bar { display: flex; justify-content: flex-end; margin: 0 0 12px; }
.toysail-vh__clear { padding: 8px 18px; font-size: 13px; }
.toysail-vh__list { border: 1px solid var(--ts-line, #E2E8F0); border-radius: var(--ts-radius-btn, 10px); overflow: hidden; }
.toysail-vh__row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--ts-line, #E2E8F0); }
.toysail-vh__row:last-child { border-bottom: none; }
.toysail-vh__row:hover { background: var(--ts-brand-tint, #EFF6FF); }
.toysail-vh__main { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; text-decoration: none; }
.toysail-vh__thumb { flex: 0 0 56px; width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; background: #F8FAFC; border: 1px solid var(--ts-line, #E2E8F0); border-radius: 8px; overflow: hidden; }
.toysail-vh__thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.toysail-vh__meta { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.toysail-vh__meta strong { font-size: .95rem; font-weight: 600; color: var(--ts-ink-900, #0B1220); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toysail-vh__meta em { font-style: normal; font-size: 12px; font-family: var(--ts-font-mono, monospace); color: var(--ts-ink-400, #64748B); }
.toysail-vh__remove { flex: 0 0 auto; width: 30px; height: 30px; border: 1px solid var(--ts-line, #E2E8F0); border-radius: 8px; background: #fff; color: var(--ts-ink-400, #64748B); font-size: 17px; line-height: 1; cursor: pointer; }
.toysail-vh__remove:hover { border-color: #FCA5A5; color: #DC2626; background: #FEF2F2; }

/* 我的询盘页 */
.toysail-myi { max-width: 960px; margin: 0 auto; padding: 40px 0 72px; }
.toysail-myi--guest { text-align: center; padding-top: 72px; }
.toysail-myi--guest .toysail-account__submit { max-width: 220px; margin: 18px auto 0; }
.toysail-myi--guest h2, .toysail-myi__head h2 { font-family: var(--ts-font-display, inherit); color: var(--ts-ink-900, #0B1220); }
.toysail-myi__head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.toysail-myi__who { font-size: .84rem; color: var(--ts-ink-400, #64748B); font-family: var(--ts-font-mono, monospace); }
.toysail-myi__empty { color: var(--ts-ink-400, #64748B); }
.toysail-myi__back { display: inline-block; margin-bottom: 14px; font-size: .86rem; color: var(--ts-brand, #1D4ED8); text-decoration: none; }
.toysail-myi__table { width: 100%; border-collapse: collapse; font-size: .88rem; background: #fff; border: 1px solid var(--ts-line, #E2E8F0); border-radius: 10px; overflow: hidden; }
.toysail-myi__table th { text-align: left; padding: 10px 14px; background: var(--ts-surface-50, #F8FAFC); color: var(--ts-ink-600, #1E293B); font-weight: 600; font-size: .8rem; white-space: nowrap; }
.toysail-myi__table td { padding: 10px 14px; border-top: 1px solid var(--ts-line, #E2E8F0); color: var(--ts-ink-600, #1E293B); }
.toysail-myi__table td a { color: var(--ts-brand, #1D4ED8); font-weight: 600; text-decoration: none; }
.toysail-myi__sku { font-family: var(--ts-font-mono, monospace); font-size: .82rem; }
.toysail-myi__status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .76rem; font-weight: 600; }
.toysail-myi__status.is-new { background: var(--ts-brand-tint, #EFF6FF); color: var(--ts-brand, #1D4ED8); }
.toysail-myi__status.is-following { background: #FFEDD5; color: #C2410C; }
.toysail-myi__status.is-quoted { background: #D1FAE5; color: #047857; }
.toysail-myi__status.is-closed { background: #F1F5F9; color: #64748B; }
.toysail-myi__meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 24px; margin: 0 0 24px; padding: 16px 18px; background: var(--ts-surface-50, #F8FAFC); border: 1px solid var(--ts-line, #E2E8F0); border-radius: 10px; }
.toysail-myi__meta dt { font-size: .74rem; color: var(--ts-ink-400, #64748B); margin-bottom: 2px; }
.toysail-myi__meta dd { margin: 0; font-size: .9rem; color: var(--ts-ink-900, #0B1220); overflow-wrap: anywhere; }
/* 详情页单号复制按钮 + hover 提示气泡 */
.toysail-myi__refrow { position: relative; display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toysail-myi__copy {
	display: inline-flex; align-items: center; justify-content: center;
	width: 26px; height: 26px; min-height: 0; flex: none; padding: 0; cursor: pointer;
	border: 1px solid var(--ts-line, #E2E8F0); border-radius: 7px; background: #fff; color: var(--ts-ink-400, #64748B);
}
.toysail-myi__copy:hover, .toysail-myi__copy:focus-visible {
	color: var(--ts-brand, #1D4ED8); border-color: var(--ts-brand, #1D4ED8); background: var(--ts-brand-tint, #EFF6FF);
	outline: none;
}
.toysail-myi__copy.is-copied { color: var(--ts-success, #059669); border-color: var(--ts-success, #059669); background: #ECFDF5; }
.toysail-myi__tip {
	position: absolute; top: calc(100% + 8px); left: 0; z-index: 30; pointer-events: none;
	width: max-content; max-width: 270px; padding: 8px 12px; border-radius: 8px;
	background: var(--ts-ink-900, #0B1220); color: #fff; font-size: .76rem; font-weight: 400; line-height: 1.55;
	opacity: 0; visibility: hidden; transform: translateY(-3px); transition: opacity .15s, transform .15s, visibility .15s;
}
.toysail-myi__copy:hover ~ .toysail-myi__tip,
.toysail-myi__copy:focus-visible ~ .toysail-myi__tip,
.toysail-myi__tip.is-on { opacity: 1; visibility: visible; transform: none; }

/* 详情页头部：徽标 - 单号 - 复制 -（下一行）专员卡 */
.toysail-myi__head--detail { align-items: center; gap: 10px; }
.toysail-myi__head--detail .toysail-myi__refrow h2 { margin: 0; }

/* 详情页服务专员卡 */
.toysail-myi__sp {
	display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap;
	margin: -4px 0 20px; padding: 10px 16px; max-width: 100%;
	border: 1px solid var(--ts-line, #E2E8F0); border-radius: 10px; background: var(--ts-surface-50, #F8FAFC);
}
.toysail-myi__sp-phone { font-size: .8rem; font-family: var(--ts-font-mono, monospace); color: var(--ts-ink-600, #1E293B); }
.toysail-myi__sp-label { font-size: .74rem; font-weight: 700; letter-spacing: .02em; color: var(--ts-ink-400, #64748B); }
/* 专员变更后首次进入：标签闪烁 ~5 秒提醒，动画结束后恢复常态 */
@keyframes ts-sp-flash {
	0%, 100% { background: transparent; color: var(--ts-ink-400, #64748B); }
	50% { background: #D1FAE5; color: #047857; }
}
.toysail-myi__sp-label.is-updated { border-radius: 6px; padding: 2px 6px; animation: ts-sp-flash 1s ease-in-out 5; }
.toysail-myi__sp-main { display: flex; flex-direction: column; line-height: 1.35; }
.toysail-myi__sp-main strong { font-size: .92rem; color: var(--ts-ink-900, #0B1220); }
.toysail-myi__sp-mail { font-size: .8rem; font-family: var(--ts-font-mono, monospace); color: var(--ts-ink-400, #64748B); overflow-wrap: anywhere; }
.toysail-myi__sp-wa {
	display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 8px;
	font-size: .82rem; font-weight: 600; text-decoration: none; white-space: nowrap;
	border: 1px solid #25D366; color: #128C4B; background: #F0FFF6;
}
.toysail-myi__sp-wa:hover { background: #25D366; color: #fff; border-color: #25D366; }

.toysail-myi__note { margin-top: 24px; }
.toysail-myi__note h3 { font-size: .95rem; margin: 0 0 8px; color: var(--ts-ink-900, #0B1220); }
.toysail-myi__note p { margin: 0; padding: 14px 16px; background: var(--ts-surface-50, #F8FAFC); border: 1px solid var(--ts-line, #E2E8F0); border-radius: 10px; font-size: .9rem; color: var(--ts-ink-600, #1E293B); line-height: 1.7; }

@media (max-width: 640px) {
	.toysail-account__panel { top: 64px; right: 16px; left: 16px; width: auto; }
	.toysail-myi__table { display: block; overflow-x: auto; }
}
