/* ============================================================
   Auth / User pages – Pet POS
   ============================================================ */

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  background: #f5f7fa;
  color: #1a1a2e;
}

a { color: #4361ee; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Navbar ---------- */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 56px;
  background: #1a1a2e;
  color: #fff;
}

.navbar__brand {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.navbar__link {
  color: #c9d1e8;
  font-size: 0.9rem;
}

.navbar__link--button {
  background: none;
  border: 1px solid #4a4e6a;
  border-radius: 4px;
  padding: 0.3rem 0.75rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: #c9d1e8;
}

.navbar__link--button:hover {
  background: #2e3155;
}

/* ---------- Main content ---------- */
.main-content {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* ---------- Flash messages ---------- */
.flash {
  padding: 0.8rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.flash--notice {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.flash--alert {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* ---------- Auth card (login / register) ---------- */
.auth-card {
  max-width: 420px;
  margin: 3rem auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  padding: 2.5rem 2rem;
}

.auth-card__title {
  margin: 0 0 1.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  color: #1a1a2e;
}

.auth-card__footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: #6c757d;
}

/* ---------- Page card (edit / settings) ---------- */
.page-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
  padding: 2rem 2.5rem;
}

.page-card__title {
  margin: 0 0 1.5rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a1a2e;
}

/* ---------- Settings sections ---------- */
.settings-section {
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid #e9ecef;
}

.settings-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.settings-section__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: #343a40;
}

.settings-section--danger { background: #fff5f5; border-radius: 8px; padding: 1.5rem; }
.settings-section__title--danger { color: #c0392b; }

/* Settings detail list */
.settings-dl { margin: 0 0 1rem; }

.settings-dl__row {
  display: flex;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f1f3f5;
}

.settings-dl__row dt {
  width: 130px;
  font-weight: 600;
  color: #6c757d;
  flex-shrink: 0;
}

.settings-dl__row dd { margin: 0; }

/* ---------- Form elements ---------- */
.auth-form { display: flex; flex-direction: column; gap: 1.1rem; }

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

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #495057;
}

.form-control {
  width: 100%;
  padding: 0.55rem 0.75rem;
  font-size: 1rem;
  border: 1px solid #ced4da;
  border-radius: 6px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus {
  outline: none;
  border-color: #4361ee;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

/* Fieldset */
.fieldset {
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.fieldset__legend {
  font-size: 0.85rem;
  font-weight: 600;
  color: #6c757d;
  padding: 0 0.4rem;
}

.fieldset__hint {
  margin: 0;
  font-size: 0.8rem;
  color: #adb5bd;
}

/* Form actions */
.form-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.5rem;
}

/* ---------- Form errors ---------- */
.form-errors {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
}

.form-errors__title {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #856404;
}

.form-errors__list {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.875rem;
  color: #856404;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, opacity 0.15s;
}

.btn--primary { background: #4361ee; color: #fff; }
.btn--primary:hover { background: #3451d1; color: #fff; }

.btn--secondary { background: #e9ecef; color: #495057; }
.btn--secondary:hover { background: #dee2e6; color: #495057; }

.btn--danger { background: #dc3545; color: #fff; }
.btn--danger:hover { background: #c82333; color: #fff; }

.btn--full { width: 100%; }
