/* ═══════════════════════════════════════════════════
   InfiniSync — auth.css
   Shared by login.php, register.php, account/index.php
   ═══════════════════════════════════════════════════ */

/* ─── BODY FLEX ─── */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── AUTH LAYOUT ─── */
.auth-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem 3rem;
  position: relative;
}

.auth-glow {
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(64,77,255,0.12) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem;
  width: 100%;
  max-width: 440px;
  position: relative;
}

.auth-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
}

.auth-sub {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.auth-sub a { color: var(--accent); text-decoration: none; font-weight: 600; }
.auth-sub a:hover { text-decoration: underline; }

/* ─── FORM ELEMENTS ─── */
.form-group { margin-bottom: 1.1rem; }

label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(64,77,255,0.15);
}

input.error { border-color: var(--accent2); }

/* password strength bar */
.pw-bar { height: 3px; border-radius: 2px; background: var(--border); margin-top: 0.5rem; overflow: hidden; }
.pw-bar-fill { height: 100%; border-radius: 2px; width: 0; transition: width 0.3s, background 0.3s; }

/* ─── CHECKBOX ─── */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.checkbox-group input[type="checkbox"] {
  width: 18px; height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
}

.checkbox-group span { font-size: 0.85rem; color: var(--muted); line-height: 1.5; }
.checkbox-group a { color: var(--accent); text-decoration: none; }
.checkbox-group a:hover { text-decoration: underline; }

/* ─── FORM INLINE ROW ─── */
.form-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.form-row-between a {
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.form-row-between a:hover { color: var(--text); }

/* ─── ERRORS ─── */
.error-list {
  background: rgba(255,95,126,0.08);
  border: 1px solid rgba(255,95,126,0.25);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.5rem;
}

.error-list li {
  font-size: 0.85rem;
  color: #ff8fa3;
  line-height: 1.55;
  list-style: none;
  padding-left: 1rem;
  position: relative;
}

.error-list li::before { content: '·'; position: absolute; left: 0; color: var(--accent2); }

/* ─── SUBMIT BUTTON ─── */
.btn-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--accent), #2535c4);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.875rem;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 24px rgba(64,77,255,0.35);
  letter-spacing: 0.01em;
}

.btn-submit:hover { opacity: 0.88; transform: translateY(-1px); box-shadow: 0 8px 32px rgba(64,77,255,0.45); }
.btn-submit:active { transform: translateY(0); }

/* ─── AUTH FOOTER NOTE ─── */
.auth-footer-note {
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 1.5rem;
  line-height: 1.6;
}

.auth-footer-note a { color: var(--muted); }
.auth-footer-note a:hover { color: var(--text); }

/* ─── FLASH MESSAGE ─── */
.flash {
  border-radius: 10px;
  padding: 0.875rem 1.1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: slideIn 0.4s ease both;
}

.flash.success {
  background: rgba(0,229,192,0.1);
  border: 1px solid rgba(0,229,192,0.25);
  color: #00e5c0;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── DASHBOARD MAIN ─── */
main.dashboard {
  max-width: 900px;
  margin: 0 auto;
  padding: 6rem 1.5rem 3rem;
}

/* ─── AVATAR ─── */
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.avatar-lg {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
}

/* ─── WELCOME ROW ─── */
.welcome-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.welcome-text h1 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.welcome-text p { color: var(--muted); font-size: 0.9rem; margin-top: 0.2rem; }

/* ─── CARDS GRID ─── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.3s, transform 0.3s;
}

.card:hover { border-color: rgba(64,77,255,0.25); transform: translateY(-2px); }

.card-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.card-value {
  font-size: 1rem;
  font-weight: 600;
  word-break: break-all;
}

.card-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}

/* ─── INFO SECTION ─── */
.section-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.info-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.info-row:last-child { border-bottom: none; }

.info-row-label { color: var(--muted); }
.info-row-value { font-weight: 600; }

/* ─── BADGE ─── */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-user  { background: rgba(64,77,255,0.12); color: var(--accent); }
.badge-admin { background: rgba(255,180,50,0.12); color: #ffa020; }

/* ─── DANGER ZONE ─── */
.danger-zone {
  margin-top: 3rem;
  background: var(--surface);
  border: 1px solid rgba(255,95,126,0.2);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.danger-zone h3 { font-size: 0.875rem; font-weight: 700; color: var(--accent2); margin-bottom: 0.5rem; }
.danger-zone p  { font-size: 0.85rem; color: var(--muted); margin-bottom: 1rem; }

.btn-danger {
  background: transparent;
  border: 1px solid rgba(255,95,126,0.35);
  color: var(--accent2);
  border-radius: 50px;
  padding: 0.5rem 1.1rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-danger:hover { background: rgba(255,95,126,0.1); }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  /* Auth card top padding (nav is 64px) */
  .auth-wrap { padding: 5rem 1.25rem 2rem; }

  /* Dashboard main */
  main.dashboard { padding: 5rem 1.25rem 2.5rem; }

  /* Cards grid — 1 column on mobile */
  .cards-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  /* Welcome row stacks */
  .welcome-row { flex-direction: column; align-items: flex-start; }

  /* Auth card narrower padding */
  .auth-card { padding: 1.75rem 1.5rem; border-radius: 16px; }

  /* Info box — smaller padding */
  .info-box { padding: 1rem 1.25rem; }

  /* Info rows — stack label + value vertically on very narrow screens */
  .info-row { flex-direction: column; align-items: flex-start; gap: 0.2rem; }
  .info-row-label { font-size: 0.75rem; }

  /* Welcome text shrink */
  .welcome-text h1 { font-size: 1.3rem; }

  /* Danger zone */
  .danger-zone { padding: 1.25rem; }
}
