/* =============================================
   EpassPack — Auth Pages (Premium)
   ============================================= */

/* ---- Background ---- */
.auth-page {
  min-height: 100vh;
  background: #f4f4f6;
  background-image: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(255,107,53,0.10) 0%, transparent 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  font-family: var(--font-family);
}

.auth-page-scroll {
  align-items: flex-start;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

/* ---- Container ---- */
.auth-container {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  animation: authContainerIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.auth-container-wide { max-width: 460px; }

@keyframes authContainerIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Logo ---- */
.auth-logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-mark {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #FF6B35, #E85D04);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  font-weight: 900;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(255,107,53,0.35);
}

.logo-text { color: #111; }
.logo-text span { color: var(--primary); }

/* ---- Card ---- */
.auth-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.07);
  padding: 2rem 2rem 1.75rem;
  width: 100%;
  box-shadow:
    0 1px 2px rgba(0,0,0,0.05),
    0 4px 16px rgba(0,0,0,0.06),
    0 16px 40px rgba(0,0,0,0.04);
}

.auth-card-title {
  font-size: 1.1875rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.auth-card-sub {
  font-size: 0.8125rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* ---- Google Button ---- */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.625rem 1rem;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-family: var(--font-family);
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin-bottom: 1.25rem;
}

.btn-google:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}

.btn-google:active { transform: translateY(0); }

/* ---- Divider ---- */
.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #f0f0f0;
}

.divider span {
  font-size: 0.75rem;
  color: #9ca3af;
  font-weight: 500;
  white-space: nowrap;
}

/* ---- Fields ---- */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: 0.875rem;
}

.field label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.field-label-block {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
  display: block;
  margin-bottom: 0.375rem;
}

.label-link {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
}

.label-link:hover { text-decoration: underline; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; } }

/* ---- Inputs with Icons ---- */
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap .ico {
  position: absolute;
  left: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  color: #9ca3af;
  transition: color 0.2s;
  z-index: 1;
}

.input-wrap .ico svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.input-wrap:focus-within .ico { color: var(--primary); }

.input-wrap input,
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field select {
  width: 100%;
  padding: 0.5625rem 0.875rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-family: var(--font-family);
  font-size: 0.875rem;
  color: #111;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  -webkit-appearance: none;
}

.input-wrap input {
  padding-left: 2.375rem;
}

.input-wrap input:focus,
.field input:focus,
.field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,107,53,0.12);
}

.input-wrap input::placeholder,
.field input::placeholder { color: #c4c4c4; }

/* ---- Password Toggle ---- */
.pw-toggle {
  position: absolute;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #9ca3af;
  transition: color 0.15s;
  z-index: 1;
}

.pw-toggle:hover { color: var(--primary); }

.pw-toggle svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.input-wrap.has-toggle input { padding-right: 2.5rem; }

/* ---- Password Strength ---- */
.pw-strength-bar {
  height: 3px;
  border-radius: 99px;
  background: #e5e7eb;
  margin-top: 4px;
  transition: all 0.4s ease;
}
.pw-strength-bar.weak   { background: linear-gradient(to right, #ef4444 30%, #e5e7eb 30%); }
.pw-strength-bar.medium { background: linear-gradient(to right, #f59e0b 65%, #e5e7eb 65%); }
.pw-strength-bar.strong { background: #22c55e; }

/* ---- Level Selector ---- */
.level-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.level-option input[type="radio"] { display: none; }

.level-btn {
  position: relative;
  border: 2px solid #f3f4f6;
  border-radius: 14px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #fdfdfd;
  text-align: center;
  user-select: none;
}

.level-btn:hover {
  border-color: #fbb49a;
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255,107,53,0.08);
}

.level-option input[type="radio"]:checked + .level-btn {
  border-color: var(--primary);
  background: #fff5f2;
  box-shadow: 0 6px 20px rgba(255,107,53,0.15);
  transform: translateY(-2px);
}

.level-btn-title {
  font-size: 1rem;
  font-weight: 700;
  color: #111;
}

.level-btn-sub {
  font-size: 0.6875rem;
  color: #9ca3af;
  margin-top: 2px;
}

/* ---- Stream Selector ---- */
.stream-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.375rem;
}

@media (max-width: 480px) { .stream-selector { grid-template-columns: repeat(2, 1fr); } }

.stream-option { display: block; cursor: pointer; }
.stream-option input[type="radio"] { display: none; }

.stream-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.65rem 0.25rem;
  border: 2px solid #f3f4f6;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #4b5563;
  background: #fdfdfd;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  line-height: 1.35;
  min-height: 46px;
  user-select: none;
}

.stream-option span:hover { 
  border-color: #fbb49a; 
  color: var(--primary); 
  background: #fff; 
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(255,107,53,0.06);
}

.stream-option input[type="radio"]:checked + span {
  border-color: var(--primary);
  color: var(--primary);
  background: #fff5f2;
  font-weight: 700;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255,107,53,0.12);
}

/* ---- Checkbox ---- */
.check-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: #4b5563;
  cursor: pointer;
  line-height: 1.5;
}

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

.inline-link { color: var(--primary); text-decoration: none; }
.inline-link:hover { text-decoration: underline; }

/* ---- Submit Button ---- */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.6875rem 1.5rem;
  background: linear-gradient(135deg, #FF6B35, #E85D04);
  color: white;
  border: none;
  border-radius: 10px;
  font-family: var(--font-family);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.01em;
  position: relative;
  margin-top: 0.25rem;
  box-shadow: 0 2px 8px rgba(255,107,53,0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255,107,53,0.4);
}

.btn-primary:active { transform: translateY(0); }

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Loading spinner inside button */
.btn-primary .btn-spinner {
  display: inline-block;
  width: 17px;
  height: 17px;
  border: 2.5px solid rgba(255,255,255,0.35);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  margin-right: 0.5rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Errors / Messages ---- */
.field-error {
  font-size: 0.8125rem;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 0.5625rem 0.875rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.5;
  animation: slideIn 0.2s ease;
}

.field-error svg {
  width: 15px;
  height: 15px;
  stroke: #dc2626;
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
  margin-top: 1px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.field-success {
  font-size: 0.8125rem;
  color: #15803d;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 0.5625rem 0.875rem;
  margin-bottom: 0.75rem;
  animation: slideIn 0.2s ease;
}

.setup-notice {
  font-size: 0.8125rem;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 0.75rem 0.875rem;
  margin-bottom: 0.875rem;
  line-height: 1.55;
  animation: slideIn 0.2s ease;
}

.setup-notice strong { display: block; margin-bottom: 0.25rem; }
.setup-notice a { color: var(--primary); font-weight: 600; }

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

@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-6px); }
  40%     { transform: translateX(6px); }
  60%     { transform: translateX(-4px); }
  80%     { transform: translateX(4px); }
}

.shake { animation: shake 0.45s ease; }

/* ---- Footer link ---- */
.auth-footer-link {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.8125rem;
  color: #6b7280;
}

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

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

/* ---- New Brand Logo ---- */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  user-select: none;
}

.brand-text-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-main {
  font-size: 1.25rem;
  font-style: italic;
  font-weight: 500;
  color: #111;
  line-height: 1;
  letter-spacing: -0.02em;
}

.brand-main span {
  font-weight: 900;
}

.brand-sub {
  font-size: 0.4rem;
  font-weight: 700;
  color: #111;
  letter-spacing: 0.22em;
  line-height: 1;
  margin-top: 0.2rem;
  white-space: nowrap;
}

.brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-left: 0.1rem;
  flex-shrink: 0;
}

.brand-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.brand-icon svg circle {
  fill: currentColor;
}

.auth-logo-override {
  justify-content: center;
  margin-bottom: 0.5rem;
}
.sidebar-logo-override {
  padding: 1.5rem 1rem 1.5rem 1rem; width: 100%; box-sizing: border-box;
}


/* ---- Animated Background Bubbles ---- */
.bubbles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bubble {
  position: absolute;
  bottom: -150px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 107, 53, 0.15), rgba(255, 107, 53, 0.05));
  backdrop-filter: blur(2px);
  border: 1px solid rgba(255, 107, 53, 0.1);
  border-radius: 50%;
  animation: floatUp linear infinite;
  box-shadow: inset 0 0 20px rgba(255, 107, 53, 0.05);
}

.bubble:nth-child(1) { width: 80px; height: 80px; left: 10%; animation-duration: 12s; animation-delay: 0s; }
.bubble:nth-child(2) { width: 120px; height: 120px; left: 25%; animation-duration: 15s; animation-delay: 2s; }
.bubble:nth-child(3) { width: 60px; height: 60px; left: 45%; animation-duration: 10s; animation-delay: 5s; }
.bubble:nth-child(4) { width: 90px; height: 90px; left: 65%; animation-duration: 18s; animation-delay: 1s; }
.bubble:nth-child(5) { width: 150px; height: 150px; left: 80%; animation-duration: 20s; animation-delay: 4s; }
.bubble:nth-child(6) { width: 50px; height: 50px; left: 90%; animation-duration: 14s; animation-delay: 7s; }

@keyframes floatUp {
  0% { transform: translateY(0) scale(0.8) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-120vh) scale(1.2) rotate(360deg); opacity: 0; }
}
