/* 用户前台 / 用户中心 / 公开登录注册 页面样式 */
@import url("common.css");

/* Public / init pages */
body.public-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 90% 70% at 10% -10%, rgba(37, 99, 235, 0.2), transparent 62%),
    radial-gradient(ellipse 80% 65% at 100% 0%, rgba(59, 130, 246, 0.14), transparent 58%),
    linear-gradient(180deg, #f4f7fd 0%, #eef3fb 100%);
}
.public-wrap {
  width: 100%;
  max-width: 460px;
  padding: 1.2rem;
}
.login-card,
.init-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #d9e3f2;
  border-radius: 18px;
  padding: 1.95rem 2rem 1.35rem;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(6px);
}
.login-card h1,
.init-card h1 {
  margin: 0 0 0.3rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.login-card .sub,
.init-card .sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 1.25rem;
}
.login-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.65rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, 0.26);
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.login-form .form-group {
  margin-bottom: 0.85rem;
}
.login-form input[type="text"],
.login-form input[type="password"] {
  max-width: none;
  min-height: 42px;
}
.login-submit {
  width: 100%;
  max-width: none;
  margin-top: 0.1rem;
}
.login-footnote {
  margin: 0.9rem 0 0;
  color: #7b8aa3;
  font-size: 0.8rem;
  text-align: center;
}
/* Public frontend page */
body.site-page {
  margin: 0;
  font-family: var(--font);
  background: linear-gradient(180deg, #f5f8ff 0%, #eef3fb 100%);
  color: var(--text);
}
.site-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.2rem;
}
.site-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
  background: rgba(245, 248, 255, 0.86);
  border-bottom: 1px solid #e2e9f5;
}
.site-topbar .site-wrap {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.8rem;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.site-brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #2d67e8;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  overflow: hidden;
}
.site-brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.site-brand-name {
  font-weight: 700;
  letter-spacing: -0.01em;
}
.site-main {
  padding: 1.4rem 0 2rem;
}
.site-hero {
  padding: 2rem 0 1.3rem;
}
.site-kicker {
  display: inline-flex;
  margin-bottom: 0.5rem;
  padding: 0.16rem 0.56rem;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.08);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.site-hero h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.site-hero p {
  margin: 0.8rem 0 0;
  color: var(--text-muted);
  max-width: 42rem;
}
.site-hero-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.site-hero-admin-hint {
  margin: 0.75rem 0 0;
  font-size: 0.86rem;
  line-height: 1.5;
  max-width: 42rem;
}
.site-hero-admin-hint a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}
.site-hero-admin-hint a:hover {
  text-decoration: underline;
}
.site-hero-tags {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.site-hero-tags span {
  border: 1px solid #d6e1f0;
  background: #fff;
  color: #42516f;
  border-radius: 999px;
  padding: 0.2rem 0.58rem;
  font-size: 0.78rem;
  font-weight: 600;
}
.site-section {
  padding: 1.1rem 0;
}
.site-section-soft {
  background: rgba(255, 255, 255, 0.56);
  border-top: 1px solid #e1e8f5;
  border-bottom: 1px solid #e1e8f5;
}
.site-section-head h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.site-section-head p {
  margin: 0.35rem 0 0.8rem;
  color: var(--text-muted);
}
.site-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 0.7rem;
}
.site-feature-card {
  border: 1px solid #dce6f3;
  background: #fff;
  border-radius: 12px;
  padding: 0.8rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}
.site-feature-card h3 {
  margin: 0;
  font-size: 0.95rem;
}
.site-feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.5;
  min-height: 3.6em;
}
.site-feature-link {
  margin-top: auto;
  color: #2563eb;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
}
.site-feature-link:hover {
  text-decoration: underline;
}
.site-tld-showcase {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}
.site-tld-group {
  border: 1px solid #d8e3f4;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  padding: 0.75rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}
.site-tld-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}
.site-tld-group-head h3 {
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
}
.site-tld-group-head span {
  border: 1px solid #d7e3f8;
  border-radius: 999px;
  background: #eef4ff;
  color: #35528a;
  padding: 0.1rem 0.48rem;
  font-size: 0.72rem;
  font-weight: 700;
}
.site-tld-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}
.site-tld-list span {
  border: 1px solid #dbe5f6;
  border-radius: 9px;
  background: #fff;
  padding: 0.36rem 0.52rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #2b3e61;
  text-align: center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.site-tld-list span.is-featured {
  background: linear-gradient(180deg, #edf4ff 0%, #e2edff 100%);
  border-color: #b7cffa;
  color: #1748a5;
}
.site-tld-list span:hover {
  border-color: #a8bfeb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}
.site-faq-list {
  display: grid;
  gap: 0.55rem;
}
.site-faq-list details {
  border: 1px solid #dce6f3;
  border-radius: 10px;
  background: #fff;
  padding: 0.62rem 0.72rem;
}
.site-faq-list summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
}
.site-faq-list p {
  margin: 0.55rem 0 0;
  color: var(--text-muted);
  font-size: 0.84rem;
}
.site-footer {
  border-top: 1px solid #dfe7f4;
  margin-top: 1.25rem;
  padding-top: 1rem;
  padding-bottom: 1.2rem;
}
.site-footer p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.84rem;
}
.site-footer-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.8rem;
  flex-wrap: wrap;
}
.site-footer-copyright {
  color: #6b7c98;
  font-size: 0.8rem;
}
.site-footer-links {
  margin-top: 0.45rem;
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.site-footer-links a {
  color: #4f5f7e;
  text-decoration: none;
  font-size: 0.83rem;
}
.site-footer-links a:hover {
  color: #1d4ed8;
}

/* 用户中心（子页面：概览 / 域名 / 联系人） */
body.user-portal {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  background:
    radial-gradient(ellipse 100% 85% at 0% -16%, rgba(14, 165, 233, 0.09), transparent 62%),
    linear-gradient(180deg, #f8fbff 0%, #f2f7ff 100%);
}
.user-portal-shell {
  display: flex;
  flex: 1;
  min-height: 0;
  max-width: 100%;
}
.user-portal-aside {
  width: 248px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  padding: 1.25rem 1.05rem 1.35rem;
  background: linear-gradient(180deg, #0b1325 0%, #121f37 48%, #0d1a2f 100%);
  color: #dbe7fa;
  border-right: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.02);
}
.user-portal-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: #f8fafc;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}
.user-portal-brand:hover {
  color: #fff;
}
.user-portal-brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(150deg, #22d3ee 0%, #3b82f6 55%, #4f46e5 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}
.user-portal-nav {
  display: flex;
  flex-direction: column;
  gap: 0.26rem;
}
.user-portal-nav-item {
  display: block;
  padding: 0.56rem 0.72rem;
  border-radius: 10px;
  color: #9fb0ca;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}
.user-portal-nav-item:hover {
  color: #eff6ff;
  background: rgba(148, 163, 184, 0.14);
  transform: translateX(2px);
}
.user-portal-nav-item.is-active {
  color: #fff;
  background: linear-gradient(125deg, rgba(56, 189, 248, 0.3) 0%, rgba(37, 99, 235, 0.52) 100%);
  box-shadow: inset 0 0 0 1px rgba(186, 230, 253, 0.26);
}
.user-portal-aside-foot {
  margin-top: auto;
  padding-top: 0.82rem;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
  font-size: 0.82rem;
}
.user-portal-quiet {
  color: #9fb0ca;
  text-decoration: none;
}
.user-portal-quiet:hover {
  color: #eff6ff;
  text-decoration: underline;
}
.user-portal-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: transparent;
}
.user-portal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  padding: 0.92rem 1.28rem 0.8rem;
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid #dbe6f4;
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 3;
}
.user-portal-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #0b1325;
  letter-spacing: -0.02em;
}
.user-portal-top-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem 0.75rem;
}
.user-portal-username {
  font-size: 0.86rem;
  color: #4f5f7a;
  font-weight: 600;
  background: #e9f2ff;
  border: 1px solid #d3e3fc;
  border-radius: 999px;
  padding: 0.2rem 0.58rem;
}
.user-portal-content {
  padding: 1.35rem 1.32rem 2.2rem;
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
}
.user-portal-footer {
  margin-top: auto;
  padding: 0.95rem 1.3rem 1.05rem;
  border-top: 1px solid #d9e6f7;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(245, 250, 255, 0.96) 100%);
}
.user-portal-footer-main {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem 1rem;
  flex-wrap: wrap;
}
.user-portal-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.user-portal-footer-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(145deg, #22d3ee 0%, #3b82f6 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
}
.user-portal-footer-brand strong {
  display: block;
  font-size: 0.84rem;
  color: #0f172a;
}
.user-portal-footer-brand p {
  margin: 0.08rem 0 0;
  font-size: 0.76rem;
  color: #60718d;
}
.user-portal-footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.34rem 0.65rem;
}
.user-portal-footer-links a {
  color: #42557a;
  text-decoration: none;
  font-size: 0.79rem;
  font-weight: 600;
}
.user-portal-footer-links a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}
.user-portal-footer-meta {
  max-width: 1080px;
  margin: 0.55rem auto 0;
  padding-top: 0.55rem;
  border-top: 1px dashed #dbe6f5;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  color: #6b7c98;
  font-size: 0.75rem;
}
.user-portal-lead {
  margin: 0 0 1.2rem;
  line-height: 1.65;
  color: #52637d;
  font-size: 0.91rem;
  max-width: 54rem;
}
.user-portal-alert {
  margin-bottom: 1rem;
  border-radius: 10px;
}
.user-portal-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.86rem;
  margin-bottom: 1.26rem;
}
.user-portal-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.58rem 0.7rem;
  margin-bottom: 1rem;
}
.user-portal-stat {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dce8f8;
  border-radius: 14px;
  padding: 1.08rem 1rem 0.95rem;
  text-align: center;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}
.user-portal-stat::after {
  content: "";
  position: absolute;
  left: 16%;
  right: 16%;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.35) 0%, rgba(37, 99, 235, 0.75) 100%);
}
.user-portal-stat-muted {
  opacity: 0.9;
  background: linear-gradient(180deg, #fafcff, #f3f7ff);
}
.user-portal-stat-value {
  display: block;
  font-size: 1.72rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #1e40af;
  line-height: 1.1;
}
.user-portal-stat-muted .user-portal-stat-value {
  color: #51617a;
}
.user-portal-stat-label {
  display: block;
  margin-top: 0.38rem;
  font-size: 0.77rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}
.user-portal-card h2,
.user-portal-block .user-portal-h2 {
  font-size: 1.04rem;
  margin: 0 0 0.82rem;
  letter-spacing: -0.01em;
}
.user-portal-block {
  margin-bottom: 1.25rem;
  border: 1px solid #dce8f8;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
  padding: 1rem 1rem 0.95rem;
}
.user-portal-block-pool {
  margin-top: 0.5rem;
  padding-top: 0.1rem;
}
.user-portal-pool-lead {
  margin: -0.2rem 0 0.75rem;
  font-size: 0.86rem;
}
.user-portal-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.46rem 1.3rem;
  margin: 0;
  font-size: 0.91rem;
}
.user-portal-dl dt {
  margin: 0;
  color: #62738e;
  font-weight: 600;
}
.user-portal-dl dd {
  margin: 0;
  color: #0f172a;
  font-weight: 600;
}
.user-portal-hint {
  margin: 0;
  font-size: 0.86rem;
  color: #5a6a84;
  line-height: 1.55;
}
.user-overview-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem 1rem;
  padding: 1.05rem 1.08rem;
  margin-bottom: 1rem;
  border: 1px solid #dce8f8;
  border-radius: 14px;
  background: linear-gradient(130deg, #ffffff 0%, #f5f9ff 58%, #eef6ff 100%);
}
.user-overview-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.74rem;
  color: #1d4ed8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}
.user-overview-title {
  margin: 0;
  font-size: 1.32rem;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.user-overview-desc {
  margin: 0.45rem 0 0;
  max-width: 38rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #4e607d;
}
.user-overview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}
.user-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.86rem;
  margin-bottom: 1rem;
}
.user-overview-stat-card {
  text-align: left;
  padding-bottom: 1.1rem;
}
.user-overview-inline-link {
  display: inline-block;
  margin-top: 0.5rem;
  color: #1d4ed8;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
}
.user-overview-inline-link:hover {
  text-decoration: underline;
}
.user-overview-account {
  margin-bottom: 0;
}
.user-account-block {
  max-width: 620px;
}
.user-account-form .form-group {
  margin-bottom: 0.88rem;
}
.user-account-form input[type="password"] {
  max-width: none;
  min-height: 40px;
}
.user-account-actions {
  margin-top: 0.25rem;
}
.user-portal-hint a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}
.user-portal-hint a:hover {
  text-decoration: underline;
}
.user-portal-table-wrap {
  overflow-x: auto;
  border: 1px solid #dce8f8;
  border-radius: 12px;
  background: #fff;
}
.user-portal-data {
  min-width: 640px;
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
}
.user-portal-data thead th {
  font-size: 0.79rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #4f5f7b;
  font-weight: 700;
  background: #f7faff;
}
.user-portal-data tbody td {
  vertical-align: middle;
}
.user-portal-data tbody tr:hover td {
  background: #f8fbff;
}
.user-portal-inline-form {
  margin: 0;
  display: inline;
}
.user-portal-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.64rem;
  margin-top: 0.76rem;
  padding-top: 0.62rem;
  border-top: 1px solid #e6eef9;
}
.user-portal-content .settings-code {
  margin: 0;
  background: #0f172a;
  color: #e2e8f0;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  font-size: 0.8rem;
  line-height: 1.5;
  overflow: auto;
}
.user-portal-content .settings-code code {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
}

/* 用户中心 · 新建联系人（布局与后台创建页一致） */
.user-portal-content .code-sm {
  font-size: 0.85em;
  background: #f0f4fa;
  border: 1px solid #e0e8f5;
  padding: 0.1em 0.35em;
  border-radius: 6px;
}
.user-portal-content .contact-create-card {
  max-width: 900px;
  margin: 0;
}
.user-portal-content .contact-create-head {
  margin-bottom: 1.1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}
.user-portal-content .contact-create-head h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}
.user-portal-content .contact-create-lead {
  margin: 0 0 0.45rem;
  line-height: 1.6;
  max-width: 52rem;
}
.user-portal-content .contact-create-api-line {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.user-portal-content .contact-create-warn {
  margin: 0 0 1rem;
}
.user-portal-content .contact-create-warn a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.user-portal-content .contact-create-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.user-portal-content .contact-create-section {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1rem;
  padding: 1.05rem 1.15rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, #fcfdff 0%, #f5f8ff 100%);
  box-shadow: var(--shadow-sm);
}
.user-portal-content .contact-create-section .form-group {
  margin-bottom: 0;
}
.user-portal-content .contact-create-section-title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #64748b;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}
.user-portal-content .contact-create-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem 1.15rem;
  align-items: start;
}
.user-portal-content .contact-create-span-full {
  grid-column: 1 / -1;
}
.user-portal-content .contact-create-pair {
  display: grid;
  grid-template-columns: minmax(0, 5.5rem) minmax(0, 1fr);
  gap: 0.7rem 1rem;
  align-items: end;
}
.user-portal-content .contact-create-input-cc {
  max-width: 100%;
  font-variant-numeric: tabular-nums;
}
.user-portal-content .contact-create-grid-addr {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem 1.15rem;
  align-items: start;
}
.user-portal-content .contact-create-input-country {
  max-width: 6.5rem;
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
}
.user-portal-content .contact-create-hint {
  margin: 0.3rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-muted);
}
.user-portal-content .contact-create-section input[type="text"],
.user-portal-content .contact-create-section input[type="email"] {
  width: 100%;
  max-width: 100%;
}
.user-portal-content .contact-create-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.6rem 0.75rem;
  margin-top: 1.15rem;
  padding-top: 1.05rem;
  border-top: 1px solid var(--border);
}
@media (max-width: 720px) {
  .user-portal-content .contact-create-grid-2,
  .user-portal-content .contact-create-grid-addr,
  .user-portal-content .contact-create-pair {
    grid-template-columns: 1fr;
  }
  .user-portal-content .contact-create-span-full {
    grid-column: 1;
  }
}

/* Front user domain detail: copied from admin domain styles */
.domain-page-head {
  margin-bottom: 0.5rem;
}
.domain-page-back {
  display: inline-block;
  margin: 0 0 0.6rem;
}
.domain-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.42rem 0.78rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}
.domain-back-btn:hover {
  text-decoration: none;
  background: #f8fbff;
  border-color: rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}
.domain-section {
  scroll-margin-top: 5.25rem;
}
.domain-section .domain-section-head {
  margin-bottom: 1.1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}
.domain-section .domain-section-head h2 {
  margin: 0 0 0.2rem;
  font-size: 1.02rem;
}
.domain-section .domain-section-lead {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  max-width: 48rem;
}
.domain-subheading {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.3rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.domain-subheading .code-sm {
  font-size: 0.88em;
  font-weight: 600;
}
.domain-extra {
  margin-top: 1.15rem;
  padding-top: 1.05rem;
  border-top: 1px solid var(--border);
}
.domain-kv-tight {
  font-size: 0.86rem;
  grid-template-columns: minmax(100px, 160px) 1fr;
  gap: 0.4rem 0.75rem;
  margin: 0;
}
.domain-kv-tight dt {
  align-self: start;
}
.domain-hero-card {
  overflow: hidden;
  padding: 0;
  border-radius: 14px;
}
.domain-hero-top {
  background: linear-gradient(130deg, #062b31 0%, #0d3136 55%, #1a3f44 100%);
  color: #fff;
  padding: 1.2rem 1.25rem 1.15rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.9rem 1rem;
  flex-wrap: wrap;
}
.domain-hero-main {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: min(580px, 100%);
}
.domain-hero-name-wrap {
  display: block;
  min-width: 0;
}
.domain-hero-kicker {
  display: inline-block;
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: rgba(233, 255, 247, 0.72);
}
.domain-hero-name {
  margin: 0;
  font-size: clamp(1.35rem, 2.7vw, 2rem);
  line-height: 1.2;
  color: #fff;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.domain-hero-card .domain-hero-name {
  color: #e9fff7;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
}
.domain-hero-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.domain-hero-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.58rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.78rem;
  font-weight: 600;
}
.domain-hero-status {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.58rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.14);
  color: rgba(233, 255, 247, 0.94);
  font-size: 0.78rem;
  font-weight: 600;
}
.domain-hero-expire {
  background: #fff;
  color: #0f172a;
  border-radius: 12px;
  padding: 0.55rem 0.82rem;
  min-width: 210px;
  margin-left: auto;
  box-shadow: 0 6px 18px rgba(2, 8, 23, 0.18);
}
.domain-hero-expire .muted {
  display: block;
  font-size: 0.74rem;
  margin-bottom: 0.1rem;
}
.domain-hero-expire strong {
  font-size: 1.15rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.domain-hero-actions {
  margin: 1rem;
  border: 1px solid #e8ecf4;
  border-radius: 12px;
  padding: 1rem;
  background: linear-gradient(120deg, #f0f1f3 8%, #eef2d5 45%, #d6ff67 100%);
}
.domain-hero-actions h3 {
  margin: 0;
  font-size: 1.35rem;
}
.domain-hero-actions .muted {
  color: #4b5563;
}
.domain-hero-actions p {
  margin: 0.2rem 0 0.8rem;
  font-size: 0.9rem;
  color: #1f2937;
}
.domain-hero-btns {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.domain-hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.35rem;
  padding: 0 0.95rem;
  border-radius: 10px;
  border: 1px solid #d7dee9;
  background: #fff;
  text-decoration: none;
  color: #0f172a;
  font-weight: 700;
  font-size: 0.93rem;
  cursor: pointer;
}
.domain-hero-btn:hover {
  border-color: #b8c5dc;
  background: #f8fbff;
}
.domain-dialog {
  border: none;
  padding: 0;
  max-width: calc(100vw - 2rem);
  width: min(700px, 100%);
  background: transparent;
  color: var(--text);
}
.domain-dialog::backdrop {
  background: rgba(7, 12, 24, 0.52);
  backdrop-filter: blur(6px);
}
.domain-dialog-surface {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid #d7e1f1;
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.2);
  padding: 1.05rem 1.1rem 1.15rem;
  max-height: min(88vh, 900px);
  overflow: auto;
}
.domain-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.7rem;
  margin-bottom: 0.65rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid #e7edf8;
}
.domain-dialog-head h3 {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.domain-dialog-head .domain-dialog-close {
  border: 1px solid #d6e1f1;
  background: #fff;
  color: #4a5a78;
  font-size: 1.15rem;
  line-height: 1;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}
.domain-dialog-head .domain-dialog-close:hover {
  background: #f4f8ff;
  border-color: #b8c8e2;
  color: #1f2d47;
}
.domain-dialog-lead {
  margin: 0 0 0.9rem;
  font-size: 0.86rem;
  line-height: 1.55;
}
.domain-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  border-top: 1px solid #e7edf8;
  padding-top: 0.75rem;
  margin-top: 0.75rem;
}
.domain-dialog .form-group {
  margin-bottom: 0.8rem;
}
.domain-dialog .form-group label {
  font-size: 0.8rem;
}
.domain-dialog-inline-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.domain-dialog-inline-actions-spaced {
  margin-bottom: 0.8rem;
}
.domain-dialog-section {
  border: 1px solid #e2eaf7;
  border-radius: 11px;
  background: #f9fbff;
  padding: 0.65rem 0.72rem;
  margin-bottom: 0.82rem;
}
.domain-dialog-section-title {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #4a5a78;
  letter-spacing: 0.02em;
}
.domain-dnssec-form {
  border: 1px solid #e2eaf7;
  border-radius: 11px;
  background: #fff;
  padding: 0.75rem 0.8rem 0.35rem;
}
.domain-dnssec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 0.7rem;
}
.domain-dialog-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}
.domain-dialog-info-card {
  border: 1px solid #e0e8f6;
  border-radius: 11px;
  padding: 0.72rem 0.78rem;
  background: #f8fbff;
}
.domain-dialog-info-label {
  font-size: 0.74rem;
}
.domain-dialog-info-value {
  font-weight: 700;
  margin-top: 0.24rem;
  font-size: 0.9rem;
}
.domain-detail-table-wrap {
  border: 1px solid #e6e9f0;
  border-radius: 12px;
  overflow: hidden;
}
.domain-detail-table {
  width: 100%;
  border: none;
  margin: 0;
}
.domain-detail-table th,
.domain-detail-table td {
  border-bottom: 1px solid #edf0f5;
  padding: 0.82rem 0.92rem;
}
.domain-detail-table tr:last-child th,
.domain-detail-table tr:last-child td {
  border-bottom: none;
}
.domain-detail-table th {
  width: 42%;
  text-align: left;
  font-size: 0.93rem;
  color: #111827;
  background: #fff;
  font-weight: 600;
}
.domain-detail-table td {
  font-size: 0.93rem;
  text-align: right;
  font-weight: 700;
  color: #111827;
  word-break: break-word;
}
@media (max-width: 740px) {
  .domain-hero-top {
    align-items: stretch;
  }
  .domain-hero-main {
    min-width: 0;
  }
  .domain-hero-expire {
    width: 100%;
    min-width: 0;
    margin-left: 0;
  }
  .domain-dialog-info-grid {
    grid-template-columns: 1fr;
  }
  .domain-dnssec-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .user-portal-shell {
    flex-direction: column;
  }
  .user-portal-aside {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.7rem 0.5rem;
    padding: 0.82rem 0.9rem;
  }
  .user-portal-nav {
    flex: 1;
    flex-direction: row;
    flex-wrap: wrap;
    min-width: 0;
  }
  .user-portal-nav-item {
    padding: 0.45rem 0.65rem;
  }
  .user-portal-aside-foot {
    width: 100%;
    border-top: none;
    border-left: 1px solid rgba(148, 163, 184, 0.22);
    margin-top: 0;
    padding-top: 0;
    margin-left: 0;
    padding-left: 0.75rem;
  }
  .user-portal-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .user-portal-content {
    padding: 1.1rem 0.92rem 1.6rem;
  }
  .user-portal-footer {
    padding: 0.82rem 0.92rem 0.9rem;
  }
  .user-portal-block {
    padding: 0.85rem 0.8rem 0.78rem;
  }
  .site-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .site-topbar .site-wrap {
    min-height: auto;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }
  .site-tld-showcase {
    grid-template-columns: 1fr;
  }
  .site-tld-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .user-portal-stats {
    grid-template-columns: 1fr;
  }
  .user-overview-hero {
    padding: 0.9rem 0.85rem;
  }
  .user-overview-title {
    font-size: 1.15rem;
  }
  .user-overview-grid {
    grid-template-columns: 1fr;
  }
  .user-portal-footer-main {
    flex-direction: column;
    align-items: flex-start;
  }
  .user-portal-footer-meta {
    margin-top: 0.45rem;
    padding-top: 0.45rem;
    font-size: 0.74rem;
  }
  .user-portal-top {
    padding-left: 0.88rem;
    padding-right: 0.88rem;
  }
  .user-portal-title {
    font-size: 1.08rem;
  }
}
