/* CopiloTrade 用户认证 / 中心共享样式 */
* { box-sizing: border-box; }
:root {
  --primary: #f4c95d;
  --primary-dark: #d8aa34;
  --primary-soft: rgba(244, 201, 93, .10);
  --success: #50c878;
  --warn: #f59e0b;
  --danger: #ef6461;
  --text: #f5f3ed;
  --text-muted: #9b9ba6;
  --border: #2a2a33;
  --surface: #15151b;
  --surface-2: #0e0e13;
  --bg: #09090d;
}
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ============ 登录 / 注册 卡片 (2026-09-17 与首页同一套视觉: 主视觉环境光 + 玻璃卡片 + 金色渐变) ============ */
.auth-page {
  min-height: 100vh; position: relative; isolation: isolate;
  display: flex; align-items: center; justify-content: center;
  background: #07070B; padding: 24px;
  font-family: 'Inter', -apple-system, 'Segoe UI', 'Microsoft YaHei UI', 'PingFang SC', Arial, sans-serif;
}
.auth-page::before {
  content: ''; position: absolute; inset: 0; z-index: -2;
  background: #07070B url('/img/hero.jpg') center 40% / cover no-repeat; opacity: .42;
}
.auth-page::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 55% 45% at 50% 0%, rgba(255,215,0,.10), transparent 60%),
    linear-gradient(180deg, rgba(7,7,11,.55) 0%, rgba(7,7,11,.78) 50%, rgba(7,7,11,.96) 100%);
}
.auth-card {
  position: relative; width: 100%; max-width: 440px;
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.035));
  border: 1px solid rgba(255,255,255,.10); border-radius: 22px;
  padding: 42px 38px 34px;
  box-shadow: 0 30px 80px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.07);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  animation: authRise .7s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes authRise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .auth-card { animation: none; } }
.auth-card-wide { max-width: 520px; }
.auth-back {
  position: absolute; top: 16px; left: 20px;
  font-size: 13px; color: var(--text-muted); text-decoration: none;
}
.auth-back:hover { color: var(--primary); }
.auth-brand { text-align: center; margin-bottom: 26px; }
.brand-logo {
  width: 54px; height: 54px; line-height: 54px; text-align: center;
  background: linear-gradient(135deg, #FFE27A, #F5B300 60%, #C98A00);
  color: #151000; font-weight: 800; font-size: 20px;
  border-radius: 16px; margin: 0 auto 12px;
  box-shadow: 0 10px 30px rgba(255,215,0,.32), inset 0 1px 0 rgba(255,255,255,.5);
}
.brand-name { font-size: 22px; font-weight: 800; color: #FFF; letter-spacing: -.3px; }
/* 2026-09-20: 登录/注册页品牌区改用透明底 logo 图 (取代 CT 方块 + 文字) */
.brand-img { display: block; height: 104px; width: auto; margin: -10px auto 0; }
.brand-tag  { font-size: 12px; color: var(--text-muted); margin-top: 2px; letter-spacing: .4px; }

.auth-title { text-align: center; margin: 0 0 6px; font-size: 22px; font-weight: 800; color: #FFF; letter-spacing: -.3px; }
.auth-subtitle { text-align: center; color: var(--text-muted); font-size: 13.5px; margin: 0 0 24px; }

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form label { display: flex; flex-direction: column; gap: 7px; font-size: 13px; color: #D6D6DE; }
.auth-form label span { font-weight: 600; }
.auth-form label em.req { color: var(--danger); font-style: normal; margin-left: 2px; }
.auth-form input {
  height: 46px; padding: 0 14px;
  border: 1px solid rgba(255,255,255,.12); border-radius: 12px;
  font-size: 14.5px; outline: none; transition: border-color .15s, box-shadow .15s;
  background: rgba(0,0,0,.35); color: #FFF;
}
.auth-form input::placeholder { color: #5E5E6A; }
.auth-form input:focus { border-color: #FFD700; box-shadow: 0 0 0 3px rgba(255,215,0,.15); }

.auth-msg { font-size: 13px; min-height: 20px; }
.auth-msg.err { color: var(--danger); }
.auth-msg.ok  { color: var(--success); }

.auth-btn {
  height: 48px;
  background: linear-gradient(135deg, #FFE27A 0%, #FFD700 45%, #F5B300 100%);
  color: #151000; border: 0; border-radius: 12px;
  font-size: 15.5px; font-weight: 800; cursor: pointer; letter-spacing: .3px;
  margin-top: 6px;
  box-shadow: 0 10px 28px rgba(255,215,0,.22), inset 0 1px 0 rgba(255,255,255,.55);
  transition: transform .12s, box-shadow .15s;
}
.auth-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 14px 34px rgba(255,215,0,.32), inset 0 1px 0 rgba(255,255,255,.6); }
.auth-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.auth-footer { margin-top: 22px; text-align: center; font-size: 13.5px; color: var(--text-muted); }
.auth-footer a { color: #FFD700; text-decoration: none; font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }
.auth-footer .dot { margin: 0 8px; color: rgba(255,255,255,.18); }

.auth-tips {
  margin: 20px 0 0; padding: 14px 16px 14px 32px;
  background: rgba(255,215,0,.06); border-radius: 12px;
  border: 1px solid rgba(255,215,0,.22);
  font-size: 12.5px; color: #D8CDA9; line-height: 1.75;
}
.auth-tips strong { color: #FFD700; }
.auth-tips a { color: #FFD700; }
/* ============ 用户中心 dashboard ============ */
.dash-shell {
  min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg);
}
.dash-header {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(14,14,19,.94); border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  padding: 12px 24px; position: sticky; top: 0; z-index: 20;
}
.dash-header .logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 17px; font-weight: 700; color: var(--text); text-decoration: none;
}
.dash-header .logo-img {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, #ffe08a, var(--primary-dark));
  color: #111; line-height: 32px; text-align: center; font-size: 13px;
}
.dash-header .nav-links {
  display: flex; gap: 18px; align-items: center;
}
.dash-header .nav-links a {
  color: var(--text-muted); text-decoration: none; font-size: 14px;
}
.dash-header .nav-links a:hover { color: var(--primary); }
.dash-header .user-pop {
  display: flex; align-items: center; gap: 10px; font-size: 13px;
}
.dash-header .user-name {
  font-weight: 600; color: var(--text);
}
.dash-header .logout-btn {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 14px; font-size: 13px; cursor: pointer; color: var(--text);
}
.dash-header .logout-btn:hover { background: #fee2e2; color: var(--danger); border-color: #fca5a5; }

.dash-main {
  max-width: 1100px; width: 100%; margin: 0 auto;
  padding: 28px 24px 60px;
}

.dash-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px;
}
.dash-stat {
  background: var(--surface); border-radius: 12px; padding: 18px 20px;
  border: 1px solid var(--border);
}
.dash-stat .label { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.dash-stat .value { font-size: 24px; font-weight: 700; color: var(--text); }
.dash-stat .hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.dash-stat.ok    .value { color: var(--success); }
.dash-stat.warn  .value { color: var(--warn); }
.dash-stat.danger .value { color: var(--danger); }

.dash-section {
  background: var(--surface); border-radius: 12px; padding: 24px;
  border: 1px solid var(--border); margin-bottom: 18px;
  scroll-margin-top: 76px;   /* 锚点跳转 (#copytrade / #ai-key 等) 时不被 sticky 头部盖住 */
}
.dash-section .sec-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.dash-section h2 { margin: 0; font-size: 16px; }
.dash-section .sec-desc { font-size: 13px; color: var(--text-muted); margin: 4px 0 0; }

.btn {
  background: var(--primary); color: #111; border: 0; border-radius: 8px;
  padding: 8px 16px; font-size: 13px; cursor: pointer; transition: all .15s;
}
.btn:hover:not(:disabled) { background: var(--primary-dark); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn.secondary:hover:not(:disabled) { background: var(--bg); border-color: var(--text-muted); }
.btn.danger { background: var(--danger); }
.btn.danger:hover:not(:disabled) { background: #b91c1c; }
.btn.small { padding: 5px 10px; font-size: 12px; }

.bind-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.bind-table th, .bind-table td {
  text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border);
}
.bind-table th { color: var(--text-muted); font-weight: 500; background: var(--surface-2); }
.bind-table tr:last-child td { border-bottom: 0; }
.bind-table .actions { display: flex; gap: 6px; }

.empty-state {
  text-align: center; padding: 32px 16px; color: var(--text-muted); font-size: 14px;
}
.empty-state .ic { font-size: 36px; margin-bottom: 10px; }

/* 模态框 */
.modal-bg {
  position: fixed; inset: 0; background: rgba(15,23,42,.5);
  display: none; align-items: center; justify-content: center; z-index: 100;
}
.modal-bg.show { display: flex; }
.modal {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 26px;
  width: 100%; max-width: 420px;
}
.modal h3 { margin: 0 0 6px; font-size: 18px; }
.modal .desc { font-size: 13px; color: var(--text-muted); margin: 0 0 16px; }
.modal label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; margin-bottom: 12px; }
.modal input, .modal select {
  height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; outline: none; background: var(--surface-2); color: var(--text);
}
.modal input:focus, .modal select:focus { border-color: var(--primary); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.modal-msg { font-size: 13px; min-height: 18px; }
.modal-msg.err { color: var(--danger); }

.badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 500;
}
.badge.online  { background: #dcfce7; color: #166534; }
.badge.offline { background: #f1f5f9; color: #64748b; }
.badge.disabled{ background: #fef3c7; color: #92400e; }
.badge.expired { background: #fee2e2; color: #991b1b; }
.badge.trial   { background: #fef9c3; color: #854d0e; }
.badge.vip     { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #fff; }

@media (max-width: 720px) {
  .dash-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-header { padding: 12px 16px; }
  .dash-header .nav-links { display: none; }
  .dash-main { padding: 20px 14px 40px; }
  .dash-section { padding: 18px; }
  .bind-table { font-size: 12px; }
  .bind-table th:nth-child(3), .bind-table td:nth-child(3) { display: none; } /* 隐藏服务器列 */
}
