/* =============================================
   Pet Hotel Management — register.css
   ============================================= */

@import url("https://fonts.googleapis.com/css2?family=Prompt:wght@400;600;700&family=Sarabun:wght@300;400;500;600&display=swap");

:root {
  --navy:       #0D1B2A;
  --navy-mid:   #1A2E45;
  --blue:       #2D4A7A;
  --teal:       #4ECDC4;
  --teal-dark:  #3ABDB4;
  --teal-light: #E0F7F6;
  --border:     #E2E8F0;
  --surface:    #F5F7FA;
  --text-body:  #334155;
  --text-muted: #64748B;
  --white:      #FFFFFF;

  --shadow-card: 0 20px 60px rgba(13, 27, 42, .35), 0 4px 16px rgba(13, 27, 42, .2);
  --radius-card: 18px;
  --radius-input: 9px;
}

/* ── Page Background ── */
.register-page {
  font-family: "Sarabun", sans-serif;
  background: var(--navy);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.register-page::before {
  content: "";
  position: fixed;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(78, 205, 196, .12) 0%, transparent 65%);
  top: -200px;
  right: -150px;
  pointer-events: none;
  z-index: 0;
}

.register-page::after {
  content: "";
  position: fixed;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(45, 74, 122, .5) 0%, transparent 65%);
  bottom: -150px;
  left: -100px;
  pointer-events: none;
  z-index: 0;
}

/* ── Card ── */
.card {
  border: 1px solid rgba(255, 255, 255, .07) !important;
  border-radius: var(--radius-card) !important;
  box-shadow: var(--shadow-card) !important;
  overflow: hidden;
  position: relative;
  z-index: 1;
  background: var(--white);
}

/* Teal top stripe */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal) 0%, var(--blue) 100%);
  z-index: 2;
}

/* Override AdminLTE card-outline-primary blue border */
.card.card-outline.card-primary {
  border-top: none !important;
}

/* ── Brand Header ── */
.brand-link {
  background: var(--white);
  padding: 36px 32px 24px;
  text-align: center;
  border-bottom: 1px solid var(--border) !important;
}

.brand-icon {
  margin-bottom: 14px;
  display: flex;
  justify-content: center;
}

.brand-icon img {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--teal-light);
  box-shadow: 0 4px 16px rgba(78, 205, 196, .25);
}

.brand-text {
  display: block;
  font-family: "Prompt", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -.01em;
  line-height: 1.2;
  margin-bottom: 5px;
}

/* ── Card Body ── */
.register-card-body {
  padding: 28px 32px 24px !important;
  background: var(--white);
  border-radius: 0 !important;
}

/* ── Form Labels ── */
.form-group > label {
  font-weight: 600;
  font-size: .82rem;
  color: var(--text-muted);
  letter-spacing: .03em;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.form-group > label i {
  color: var(--teal-dark);
  font-size: .8rem;
}

/* ── Input Group ── */
.input-group {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-input);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
  background: var(--white);
}

.input-group:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(78, 205, 196, .15);
}

.input-group-text {
  background: var(--surface) !important;
  border: none !important;
  color: var(--text-muted);
  padding: 0 14px;
  font-size: .9rem;
  min-width: 42px;
  justify-content: center;
  transition: color .2s, background .2s;
}

.input-group:focus-within .input-group-text {
  background: var(--teal-light) !important;
  color: var(--teal-dark);
}

.subdomain-suffix {
  background: var(--surface) !important;
  border: none !important;
  color: var(--text-muted) !important;
  font-size: .85rem;
  font-weight: 600;
  padding: 0 14px;
  transition: background .2s;
}

.input-group:focus-within .subdomain-suffix {
  background: var(--teal-light) !important;
  color: var(--teal-dark) !important;
}

.form-control {
  border: none !important;
  padding: 11px 12px !important;
  font-family: "Sarabun", sans-serif;
  font-size: .95rem;
  color: var(--text-body);
  background: var(--white) !important;
  border-radius: 0 !important;
}

.form-control::placeholder {
  color: #CBD5E1;
  font-weight: 300;
}

.form-control:focus {
  box-shadow: none !important;
  outline: none !important;
}

.form-control.is-invalid {
  background: #FFF5F5 !important;
}

/* ── Helper Text ── */
.form-text {
  font-size: .82rem;
  margin-top: 5px;
}

/* ── Password Strength ── */
.progress {
  border-radius: 50px;
  background: var(--border);
  overflow: hidden;
}

.progress-bar {
  border-radius: 50px;
  transition: width .3s ease, background-color .3s ease;
}

/* ── Password Rules ── */
#passwordRules {
  padding-left: 4px;
  margin-top: 8px;
  margin-bottom: 0;
}

#passwordRules li {
  list-style: none;
  font-size: .82rem;
  margin-bottom: 3px;
  color: var(--text-muted);
  transition: color .2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

#passwordRules li::before {
  content: "○";
  font-size: .7rem;
  opacity: .5;
}

.rule-valid {
  color: #16A34A !important;
}

.rule-valid::before {
  content: "●" !important;
  opacity: 1 !important;
  color: #16A34A;
}

.rule-invalid {
  color: #DC2626 !important;
}

.rule-invalid::before {
  content: "●" !important;
  opacity: 1 !important;
  color: #DC2626;
}

/* ── Toggle Password Button ── */
#togglePassword {
  background: var(--surface) !important;
  border: none !important;
  border-left: 1px solid var(--border) !important;
  color: var(--text-muted);
  padding: 0 14px;
  border-radius: 0 !important;
  transition: background .2s, color .2s;
}

#togglePassword:hover,
#togglePassword:focus {
  background: var(--teal-light) !important;
  color: var(--teal-dark);
  box-shadow: none !important;
  outline: none !important;
}

/* ── Register Button ── */
.btn-register {
  background: var(--navy) !important;
  border: none !important;
  border-radius: 50px !important;
  padding: 13px 24px !important;
  font-family: "Sarabun", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--white) !important;
  letter-spacing: .04em;
  transition: background .2s, box-shadow .2s, transform .15s, opacity .2s;
  position: relative;
  overflow: hidden;
}

.btn-register::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(78, 205, 196, .15) 100%);
  opacity: 0;
  transition: opacity .25s;
}

.btn-register:not(:disabled):hover {
  background: var(--blue) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(13, 27, 42, .3) !important;
}

.btn-register:not(:disabled):hover::after {
  opacity: 1;
}

.btn-register:disabled {
  opacity: .45 !important;
  cursor: not-allowed;
  transform: none !important;
}

.btn-register .spinner-border-sm {
  width: 1rem;
  height: 1rem;
  border-width: 2px;
}

/* ── Divider ── */
hr {
  border-color: var(--border);
  margin: 20px 0;
}

/* ── Login Link ── */
.register-card-body p.text-center a {
  font-size: .9rem;
  color: var(--teal-dark);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color .2s;
}

.register-card-body p.text-center a:hover {
  color: var(--navy);
}

/* ── Alert Messages ── */
#alert-box .alert {
  border-radius: var(--radius-input) !important;
  font-size: .9rem;
  border: none !important;
  padding: 14px 16px;
}

#alert-box .alert-success {
  background: #DCFCE7;
  color: #15803D;
}

#alert-box .alert-danger {
  background: #FEE2E2;
  color: #DC2626;
}

#alert-box .alert h5 {
  font-family: "Prompt", sans-serif;
  font-size: .95rem;
  font-weight: 600;
  margin-bottom: 8px;
}

#alert-box .alert ul {
  margin: 0;
  padding-left: 16px;
}

#alert-box .alert ul li {
  font-size: .88rem;
  line-height: 1.6;
}

#alert-box .alert .close {
  color: inherit;
  opacity: .5;
}

#alert-box .alert .close:hover {
  opacity: 1;
}

/* ── Back Link ── */
.text-center a[href*="index"] {
  font-family: "Sarabun", sans-serif;
  font-size: .9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .55) !important;
  text-decoration: none;
  transition: color .2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.text-center a[href*="index"]:hover {
  color: var(--teal) !important;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .brand-link         { padding: 28px 20px 18px; }
  .register-card-body { padding: 22px 20px 20px !important; }
  .brand-icon img     { width: 70px; height: 70px; }
  .brand-text         { font-size: 1.15rem; }
}

/* ── Accessibility ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

/* ── Fix: page scroll when content taller than viewport ── */
body.register-page,
body.hold-transition.register-page {
  overflow-y: auto !important;
  display: block !important;
  padding: 40px 16px 60px !important;
}

body.register-page .container {
  min-height: unset !important;
  align-items: flex-start !important;
}