/* ── Auth pages ──────────────────────────────────────────────────────────── */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 1rem;
}
.auth-container {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.auth-logo {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 800;
}
.auth-logo a {
  color: var(--text);
  text-decoration: none;
}
.auth-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 8px 40px rgba(0,0,0,.3);
}
[data-theme="light"] .auth-card {
  box-shadow: 0 8px 40px rgba(0,0,0,.1);
}
.auth-icon {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: .75rem;
}
.auth-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 .35rem;
  text-align: center;
}
.auth-subtitle {
  color: var(--muted);
  font-size: .88rem;
  text-align: center;
  margin: 0 0 1.5rem;
}
.auth-alert {
  border-radius: 8px;
  padding: .75rem 1rem;
  font-size: .85rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}
.auth-alert.error   { background: rgba(255,77,106,.12); border: 1px solid var(--danger); color: var(--danger); }
.auth-alert.success { background: rgba(0,212,170,.12); border: 1px solid var(--accent2); color: var(--accent2); }
.auth-alert.info    { background: rgba(108,99,255,.12); border: 1px solid var(--accent); color: var(--accent); }
.auth-alert.hidden  { display: none; }
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.auth-field {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.auth-field label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.auth-link-sm {
  font-size: .78rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.auth-link-sm:hover { text-decoration: underline; }
.auth-field input {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: .65rem .9rem;
  font-size: .95rem;
  outline: none;
  transition: border-color .2s;
  width: 100%;
  font-size: 16px; /* prevent iOS zoom */
}
.auth-field input:focus { border-color: var(--accent); }
.auth-field input:disabled { opacity: .6; cursor: not-allowed; }
.auth-input-wrap {
  position: relative;
}
.auth-input-wrap input { padding-right: 2.5rem; }
.toggle-pw {
  position: absolute;
  right: .65rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--muted);
  padding: 0;
  line-height: 1;
}
.auth-input-standalone {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: .65rem .9rem;
  font-size: 16px;
  outline: none;
  width: 100%;
  transition: border-color .2s;
}
.auth-input-standalone:focus { border-color: var(--accent); }
.auth-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: .85rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
  margin-top: .25rem;
}
.auth-btn:hover:not(:disabled) { opacity: .88; transform: translateY(-1px); }
.auth-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.auth-footer-text {
  text-align: center;
  font-size: .85rem;
  color: var(--muted);
  margin: 1.25rem 0 0;
}
.auth-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.auth-link:hover { text-decoration: underline; }

/* Password strength indicator */
.pw-strength {
  height: 4px;
  border-radius: 2px;
  margin-top: .4rem;
  background: var(--bg3);
  transition: all .3s;
  font-size: .72rem;
  color: var(--muted);
}
.pw-strength.weak   { background: linear-gradient(90deg, var(--danger) 33%, var(--bg3) 33%); }
.pw-strength.medium { background: linear-gradient(90deg, var(--warn) 66%, var(--bg3) 66%); }
.pw-strength.strong { background: var(--accent2); }

/* Loading spinner */
.auth-loading {
  text-align: center;
  color: var(--muted);
  padding: 2rem;
  font-size: .9rem;
}

/* Dashboard welcome */
.dashboard-welcome {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.dw-avatar {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dw-actions {
  margin-left: auto;
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

/* Dashboard tool grid */
.dash-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.dash-tool-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem 1.25rem;
  text-align: center;
  text-decoration: none;
  transition: border-color .2s, transform .2s, box-shadow .2s;
  display: block;
}
.dash-tool-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(108,99,255,.15);
}
.dash-tool-icon {
  font-size: 2rem;
  margin-bottom: .6rem;
}
.dash-tool-name {
  font-weight: 700;
  font-size: .95rem;
  color: var(--text);
  margin-bottom: .3rem;
}
.dash-tool-desc {
  font-size: .78rem;
  color: var(--muted);
}

/* Profile header */
.profile-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.profile-avatar {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-size: 1.35rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Header user badge */
.header-user {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-size: .85rem;
}
.header-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile */
@media (max-width: 480px) {
  .auth-card { padding: 1.5rem; }
  .dw-actions { width: 100%; }
  .dw-actions .btn { flex: 1; text-align: center; }
}