/* ==========================================================================
   Shrinkdot — Dedicated Auth Styles (Login & Register)
   Pure Vanilla CSS, Accessible, Responsive, Modern Graphite Theme
   ========================================================================== */

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bg-dark: #1e2229;
  --bg-gradient-radial: radial-gradient(circle at 50% 20%, rgba(68, 77, 95, 0.45) 0%, rgba(26, 30, 38, 0.98) 85%);
  --brand-gold: #f5b800;
  --brand-blue: #2563eb;
  --brand-blue-hover: #1d4ed8;
  --brand-blue-active: #1e40af;
  --card-bg: #ffffff;
  --card-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.25);
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-color: #cbd5e1;
  --border-focus: #3b82f6;
  --focus-ring: rgba(59, 130, 246, 0.25);
  --error-bg: #fef2f2;
  --error-border: #fecaca;
  --error-text: #991b1b;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --success-text: #065f46;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--text-main);
  background-color: var(--bg-dark);
  background-image: var(--bg-gradient-radial);
  background-attachment: fixed;
  background-size: cover;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

/* ── Container & Layout ─────────────────────────────────────────── */
.auth-wrapper {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Branding Header ────────────────────────────────────────────── */
.auth-brand {
  margin-bottom: 1.5rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  user-select: none;
}

.auth-brand-icon {
  width: 36px;
  height: 36px;
  color: var(--brand-gold);
  flex-shrink: 0;
}

.auth-brand-text {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  line-height: 1;
}

.auth-brand-text .dot {
  color: var(--brand-gold);
}

.auth-brand-text .tld {
  font-size: 1rem;
  font-weight: 600;
  color: #94a3b8;
  margin-left: 1px;
}

/* ── Card Container ─────────────────────────────────────────────── */
.auth-card {
  width: 100%;
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  padding: 2rem 1.75rem;
}

.auth-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
  margin-bottom: 0.25rem;
}

.auth-subtitle {
  font-size: 0.825rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1.5rem;
}

/* ── Form Elements ──────────────────────────────────────────────── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input {
  width: 100%;
  height: 42px;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  color: #0f172a;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input::placeholder {
  color: var(--text-light);
}

.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.form-input.has-error {
  border-color: #ef4444;
}

.toggle-pwd-btn {
  position: absolute;
  right: 0.5rem;
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.toggle-pwd-btn:hover {
  color: #0f172a;
}

.toggle-pwd-btn:focus-visible {
  outline: 2px solid var(--border-focus);
}

.toggle-pwd-btn svg {
  width: 18px;
  height: 18px;
}

.form-hint {
  font-size: 0.725rem;
  color: var(--text-muted);
}

/* ── Primary Submit Button ──────────────────────────────────────── */
.btn-submit {
  width: 100%;
  height: 42px;
  background-color: var(--brand-blue);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background-color 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  margin-top: 0.25rem;
}

.btn-submit:hover:not(:disabled) {
  background-color: var(--brand-blue-hover);
}

.btn-submit:active:not(:disabled) {
  background-color: var(--brand-blue-active);
  transform: translateY(1px);
}

.btn-submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* ── Alerts ─────────────────────────────────────────────────────── */
.auth-alert {
  padding: 0.75rem 0.85rem;
  border-radius: 6px;
  font-size: 0.8rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

.auth-alert[hidden] {
  display: none !important;
}

.auth-alert-error {
  background-color: var(--error-bg);
  border: 1px solid var(--error-border);
  color: var(--error-text);
}

.auth-alert-success {
  background-color: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success-text);
}

.auth-alert svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Card Footer & Links ────────────────────────────────────────── */
.auth-footer {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  text-align: center;
}

.auth-link {
  font-size: 0.8rem;
  color: var(--brand-blue);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.auth-link:hover {
  color: var(--brand-blue-hover);
  text-decoration: underline;
}

.auth-link:focus-visible {
  outline: 2px solid var(--border-focus);
  border-radius: 2px;
}

.auth-subview {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-subview[hidden] {
  display: none !important;
}

/* ── Bottom Page Note ───────────────────────────────────────────── */
.auth-page-foot {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: #64748b;
  text-align: center;
}
