.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
}

.auth-dialog {
  width: min(460px, 100%);
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.22);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  padding: 12px 14px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.94), rgba(236, 254, 255, 0.88));
}

.auth-brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(37, 99, 235, 0.2));
}

.auth-brand div {
  display: grid;
  gap: 2px;
}

.auth-brand strong {
  color: #0f2852;
  font-size: 1.65rem;
  line-height: 1;
  letter-spacing: -0.03em;
}

.auth-brand span {
  color: #5f7188;
  font-size: 0.78rem;
}

.auth-dialog-copy h1,
.auth-login-form label span {
  margin: 0;
}

.auth-eyebrow {
  margin: 0 0 10px;
  color: #0f766e;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.auth-dialog-copy p {
  margin: 10px 0 0;
  color: #64748b;
}

.auth-dialog-copy > p:not(.auth-eyebrow):not(.auth-login-intro) {
  display: none;
}

.auth-login-intro {
  margin-top: 10px;
  color: #64748b;
}

.auth-server-notice {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(217, 119, 6, 0.12);
  color: #9a3412;
}

.auth-server-notice p,
.auth-server-notice strong {
  margin: 0;
}

.auth-server-notice p {
  margin-top: 8px;
}

.auth-login-form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.auth-login-form-disabled {
  opacity: 0.72;
}

.auth-login-form label {
  display: grid;
  gap: 8px;
}

.auth-login-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.auth-check-row {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  color: #475569;
  font-size: 0.92rem;
}

.auth-check-row input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.auth-login-form input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
}

.auth-primary-button,
.auth-session-button {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.auth-primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.auth-error {
  margin: 0;
  color: #dc2626;
  font-size: 0.92rem;
  font-weight: 600;
}

.auth-session-bar {
  position: fixed;
  top: 16px;
  right: 16px;
  left: auto;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
}

.auth-session-meta {
  display: grid;
  gap: 4px;
}

.auth-session-meta strong {
  font-size: 0.94rem;
}

.auth-session-meta span {
  color: #64748b;
  font-size: 0.82rem;
}

.auth-profile-button { background: #eaf3ff; color: #1767ad; }
.auth-session-avatar { position: relative; display: grid; place-items: center; flex: none; width: 42px; height: 42px; padding: 0; overflow: hidden; border: 2px solid #fff; border-radius: 50%; background: linear-gradient(145deg,#2374c1,#52b7e9); color: #fff; box-shadow: 0 4px 12px rgba(32,105,166,.25); font-weight: 900; }
.auth-session-avatar img,.auth-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.auth-profile-modal { position: fixed; z-index: 1200; inset: 0; display: grid; place-items: center; padding: 20px; }
.auth-profile-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0 !important; background: rgba(15,35,56,.64); backdrop-filter: blur(4px); }
.auth-profile-card { position: relative; width: min(620px,calc(100vw - 28px)); max-height: min(850px,calc(100vh - 30px)); overflow: auto; border-radius: 24px; background: #f6f9fc; box-shadow: 0 32px 90px rgba(8,30,50,.35); }
.auth-profile-head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; gap: 18px; padding: 22px 24px 17px; border-bottom: 1px solid rgba(255,255,255,.35); background: linear-gradient(120deg,rgba(238,248,255,.98),rgba(255,255,255,.98)); }
.auth-profile-head span { color: #2a78bd; font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.auth-profile-head h2,.auth-profile-head p,.auth-profile-section h3 { margin: 0; }
.auth-profile-head h2 { margin-top: 3px; color: #152c43; }
.auth-profile-head p { margin-top: 5px; color: #6a7c8e; font-size: 13px; }
.auth-profile-close { flex: none; width: 38px; height: 38px; border: 0; border-radius: 12px; background: #edf2f6; color: #51687c; font-size: 24px; }
.auth-profile-form { display: grid; gap: 12px; padding: 16px; }
.auth-profile-identity { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 15px; padding: 18px; overflow: hidden; border-radius: 19px; color: #fff; background: radial-gradient(circle at 85% 10%,rgba(100,211,255,.38),transparent 32%),linear-gradient(135deg,#123c67,#2379bd); box-shadow: 0 12px 28px rgba(18,60,103,.18); }
.auth-profile-avatar { position: relative; display: grid; place-items: center; width: 82px; height: 82px; padding: 0; overflow: hidden; border: 3px solid rgba(255,255,255,.9); border-radius: 50%; background: linear-gradient(145deg,#5bbbe8,#226fb3); color: #fff; box-shadow: 0 10px 24px rgba(3,29,54,.28); font-size: 30px; font-weight: 900; }
.auth-profile-avatar i { position: absolute; right: 0; bottom: 0; left: 0; padding: 3px; background: rgba(4,30,53,.72); color: #fff; font-size: 10px; font-style: normal; font-weight: 800; }
.auth-profile-identity-copy { display: grid; gap: 3px; min-width: 0; }
.auth-profile-identity-copy span { color: rgba(255,255,255,.68); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.auth-profile-identity-copy strong { overflow: hidden; font-size: 21px; text-overflow: ellipsis; white-space: nowrap; }
.auth-profile-identity-copy small { color: rgba(255,255,255,.78); font-size: 12px; }
.auth-avatar-actions { display: grid; justify-items: stretch; gap: 7px; }
.auth-avatar-actions label,.auth-avatar-actions button { min-width: 88px; border: 1px solid rgba(255,255,255,.38); border-radius: 10px; background: rgba(255,255,255,.14); color: #fff; padding: 8px 10px; text-align: center; font-size: 11px; font-weight: 800; cursor: pointer; }
.auth-avatar-actions button { background: rgba(10,31,50,.2); }
.auth-avatar-actions button[hidden] { display: none !important; }
.auth-profile-vip-setting { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; padding: 15px 17px; border: 1px solid #ead9a6; border-radius: 17px; background: linear-gradient(120deg,#fffaf0,#fff4cf); color: #5c4313; }
.auth-profile-vip-setting[hidden] { display: none !important; }
.auth-profile-vip-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: linear-gradient(145deg,#20263c,#704d12); color: #ffd978; font-size: 25px; box-shadow: 0 7px 16px rgba(100,71,18,.18); }
.auth-profile-vip-setting strong { font-size: 15px; }
.auth-profile-vip-setting p { margin: 3px 0 0; color: #8b7139; font-size: 11px; }
.auth-profile-switch { position: relative; display: block !important; width: 50px; height: 29px; cursor: pointer; }
.auth-profile-switch input { position: absolute; opacity: 0; pointer-events: none; }
.auth-profile-switch span { position: absolute; inset: 0; border-radius: 999px; background: #c8c3b5; transition: .2s; }
.auth-profile-switch span::after { content: ""; position: absolute; top: 4px; left: 4px; width: 21px; height: 21px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(32,35,45,.24); transition: .2s; }
.auth-profile-switch input:checked+span { background: linear-gradient(135deg,#c58a16,#f0bd3d); }
.auth-profile-switch input:checked+span::after { transform: translateX(21px); }
.auth-profile-section { display: grid; gap: 11px; padding: 17px; border: 1px solid #dce6ef; border-radius: 17px; background: #fff; }
.auth-profile-section h3 { color: #20384f; font-size: 16px; }
.auth-profile-section h3 small { margin-left: 6px; color: #8191a1; font-size: 11px; font-weight: 600; }
.auth-profile-form label { display: grid; gap: 6px; }
.auth-profile-form label>span { color: #52697d; font-size: 12px; font-weight: 800; }
.auth-profile-form input,.auth-profile-form select,.auth-profile-form textarea { width: 100%; border: 1px solid #cad8e5; border-radius: 11px; background: #fff; padding: 11px 12px; font: inherit; outline: none; }
.auth-profile-form input:focus,.auth-profile-form select:focus,.auth-profile-form textarea:focus { border-color: #68a3d3; box-shadow: 0 0 0 3px rgba(83,155,211,.16); }
.auth-profile-two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-profile-actions { display: flex; justify-content: flex-end; gap: 8px; }
.auth-profile-actions>button:first-child { border: 0; border-radius: 11px; background: #e8eef4; color: #405a70; padding: 11px 16px; font-weight: 800; }
body.auth-profile-open { overflow: hidden; }

.auth-quick-actions {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  display: none !important;
}

.auth-quick-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
}

.auth-quick-copy {
  display: grid;
  gap: 2px;
}

.auth-quick-copy strong {
  font-size: 0.92rem;
}

.auth-quick-copy span {
  color: #64748b;
  font-size: 0.8rem;
}

.hidden {
  display: none !important;
}

@media (max-width: 720px) {
  .auth-session-bar {
    top: 10px;
    right: 10px;
    left: auto;
    padding: 7px 8px;
    gap: 6px;
    border-radius: 14px;
  }

  .auth-session-meta { display: none; }
  .auth-session-button { min-height: 36px; padding: 0 10px; font-size: 12px; }
  .auth-profile-modal { padding: 8px; }
  .auth-profile-card { width: 100%; max-height: calc(100vh - 16px); border-radius: 19px; }
  .auth-profile-head { padding: 17px; }
  .auth-profile-form { padding: 10px; }
  .auth-profile-two-cols { grid-template-columns: 1fr; }
  .auth-profile-identity { grid-template-columns: auto 1fr; padding: 14px; }
  .auth-profile-avatar { width: 68px; height: 68px; }
  .auth-avatar-actions { grid-column: 1/-1; grid-template-columns: 1fr 1fr; }

  .auth-dialog {
    padding: 22px 18px;
    border-radius: 24px;
  }

  .auth-quick-actions {
    top: 10px;
    right: 10px;
    left: auto;
    justify-content: flex-end;
  }

  .auth-quick-card {
    padding: 8px 10px;
    border-radius: 14px;
  }

  .auth-quick-copy span {
    display: none;
  }
}

@media (max-width: 430px) {
  .auth-quick-actions {
    top: 8px;
    right: 8px;
  }

  .auth-quick-card {
    padding: 7px 9px;
  }

  .auth-quick-copy {
    display: none;
  }
}
