/* ============================================
   HIPAA-Compliant Auth UI — Shared Styles
   ============================================ */

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

:root {
  --primary:       #2563eb;
  --primary-dark:  #1d4ed8;
  --primary-light: #eff6ff;
  --danger:        #dc2626;
  --success:       #16a34a;
  --warning:       #d97706;
  --text:          #111827;
  --text-muted:    #6b7280;
  --border:        #d1d5db;
  --border-focus:  #2563eb;
  --bg:            #f3f4f6;
  --card:          #ffffff;
  --radius:        10px;
  --shadow:        0 4px 24px rgba(0, 0, 0, 0.08);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* ---- Card ---- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
}

/* ---- Logo / Header ---- */
.card-header {
  text-align: center;
  margin-bottom: 28px;
}

.card-header .logo {
  width: 48px;
  height: 48px;
  background: var(--primary);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.card-header .logo svg {
  width: 26px;
  height: 26px;
  fill: #fff;
}

.card-header h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.card-header p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ---- Form elements ---- */
.form-group {
  margin-bottom: 18px;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"] {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  font-size: 0.95rem;
  color: var(--text);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

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

.field-error {
  font-size: 0.78rem;
  color: var(--danger);
  margin-top: 5px;
  display: none;
}

.field-error.visible {
  display: block;
}

/* ---- Password strength ---- */
.pwd-rules {
  margin-top: 10px;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 12px;
}

.pwd-rules li {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.15s;
}

.pwd-rules li::before {
  content: "○";
  font-size: 0.65rem;
  transition: content 0.15s;
}

.pwd-rules li.pass {
  color: var(--success);
}

.pwd-rules li.pass::before {
  content: "✓";
}

/* ---- Buttons ---- */
.btn {
  display: block;
  width: 100%;
  padding: 11px;
  border: none;
  border-radius: 7px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  margin-top: 10px;
}

.btn-outline:hover {
  background: var(--primary-light);
}

/* ---- Alert banners ---- */
.alert {
  padding: 10px 14px;
  border-radius: 7px;
  font-size: 0.875rem;
  margin-bottom: 18px;
  display: none;
}

.alert.visible {
  display: block;
}

.alert-error {
  background: #fef2f2;
  color: var(--danger);
  border: 1px solid #fecaca;
}

.alert-success {
  background: #f0fdf4;
  color: var(--success);
  border: 1px solid #bbf7d0;
}

/* ---- Links ---- */
.footer-link {
  text-align: center;
  margin-top: 20px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-link a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.footer-link a:hover {
  text-decoration: underline;
}

/* ---- OTP input ---- */
.otp-group {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 20px 0;
}

.otp-group input {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  padding: 0;
}

.otp-group input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* ---- Success page ---- */
.success-icon {
  width: 64px;
  height: 64px;
  background: #f0fdf4;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}

.success-icon svg {
  width: 34px;
  height: 34px;
  stroke: var(--success);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.user-badge {
  background: var(--primary-light);
  border-radius: 8px;
  padding: 12px 16px;
  text-align: center;
  margin: 18px 0;
  font-size: 0.9rem;
  color: var(--primary-dark);
  font-weight: 500;
}

/* ---- HIPAA notice ---- */
.hipaa-notice {
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 24px;
  line-height: 1.5;
}

.hipaa-notice span {
  display: inline-block;
  background: #f3f4f6;
  border-radius: 4px;
  padding: 4px 8px;
  font-weight: 500;
}
