html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* 移动端优化 */
@media (max-width: 576px) {
  .container-fluid {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  
  .card-body {
    padding: 0.75rem;
  }
  
  .table {
    font-size: 0.875rem;
  }
  
  .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
  }
}

/* 触摸优化 */
@media (hover: none) and (pointer: coarse) {
  .btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  .nav-link {
    padding: 0.75rem 1rem;
  }
}

/* ---------- 登录 / 注册独立页 ---------- */
.auth-body {
  margin: 0;
  min-height: 100vh;
  color: #f4f6fb;
  background: #0f1419;
  position: relative;
}

.auth-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 120% 80% at 20% 20%, rgba(124, 92, 255, 0.35) 0%, transparent 55%),
    radial-gradient(ellipse 90% 70% at 85% 75%, rgba(34, 211, 238, 0.22) 0%, transparent 50%),
    linear-gradient(165deg, #121826 0%, #0c1018 45%, #0a1628 100%);
  pointer-events: none;
}

.auth-topbar {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(15, 20, 25, 0.45);
  backdrop-filter: blur(12px);
}

.auth-brand {
  color: #fff !important;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-brand-mark {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.6rem;
  background: linear-gradient(135deg, #7c5cff 0%, #22d3ee 100%);
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 8px 24px rgba(124, 92, 255, 0.35);
}

.auth-brand-text {
  font-size: 1.05rem;
}

.auth-main {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  padding: 2rem 1rem 4rem;
}

.auth-footer {
  position: relative;
  z-index: 2;
  padding: 1rem;
}

.auth-shell {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
}

.auth-panel {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 992px) {
  .auth-panel {
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
  }
}

.auth-panel-intro {
  text-align: center;
}

@media (min-width: 992px) {
  .auth-panel-intro {
    text-align: left;
    padding-right: 1rem;
  }
}

.auth-tagline {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(34, 211, 238, 0.9);
  font-weight: 600;
}

.auth-title {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0.75rem 0 1rem;
  line-height: 1.2;
  background: linear-gradient(135deg, #ffffff 0%, #c4d4f1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-sub {
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 992px) {
  .auth-sub {
    margin-left: 0;
  }
}

.auth-card {
  border-radius: 1.25rem !important;
  background: rgba(255, 255, 255, 0.97);
  color: #1a1f2e;
}

.auth-card .form-label {
  color: #4a5568 !important;
}

.auth-input {
  border-radius: 0.65rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input:focus {
  border-color: #7c5cff;
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.2);
}

.btn-auth-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: #5b4fd6;
  --bs-btn-border-color: transparent;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #4a3fc4;
  --bs-btn-hover-border-color: transparent;
  --bs-btn-focus-shadow-rgb: 124, 92, 255;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #3f36b0;
  --bs-btn-active-border-color: transparent;
  font-weight: 600;
  border-radius: 0.65rem;
  border: none;
  background: linear-gradient(135deg, #6d5ffc 0%, #4b9cfe 52%, #22c9d8 100%);
  box-shadow: 0 10px 28px rgba(91, 79, 214, 0.4);
}

.btn-auth-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(91, 79, 214, 0.45);
}

.btn-auth-primary:active {
  transform: translateY(0);
}

.auth-link {
  color: #5b4fd6 !important;
  font-size: 0.9rem;
}

.auth-link:hover {
  color: #4338ca !important;
}
