@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg-color: #EDF2F7;
  --card-bg: #FFFFFF;
  --text-dark: #0F172A;
  --text-muted: #475569;
  --text-subtle: #64748B;
  --tab-active: #3E5667;
  --tab-inactive: #6E8495;
  --primary-blue: #1A73E8;
  --primary-blue-hover: #1557B0;
  --accent-orange: #F7941E;
  --border-dark: #1E293B;
  --divider-color: #CBD5E1;
  --link-color: #1A73E8;
  --radius-card: 22px;
  --radius-pill: 30px;
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-family);
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-color);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 10px;
}

/* App / Screen Wrapper */
.app-container {
  width: 100%;
  max-width: 440px;
  min-height: 92vh;
  background-color: var(--bg-color);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  margin: 0 auto;
}

/* Content Area */
.content-wrapper {
  padding: 24px 16px 16px 16px;
  flex: 1;
}

/* Header Typography */
.welcome-header {
  margin-bottom: 24px;
}

.welcome-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.welcome-subtitle {
  font-size: 15px;
  line-height: 1.45;
  color: var(--text-muted);
  font-weight: 400;
}

/* Top Tab Switcher Card */
.tab-card {
  background: var(--card-bg);
  border-radius: var(--radius-card);
  padding: 8px 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.tab-group {
  display: flex;
  gap: 12px;
}

.tab-btn {
  flex: 1;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 12px 10px;
  font-size: 17px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  transition: all 0.25s ease;
  text-align: center;
  color: #FFFFFF;
}

.tab-btn.active {
  background-color: var(--tab-active);
  box-shadow: 0 3px 8px rgba(62, 86, 103, 0.3);
}

.tab-btn.inactive {
  background-color: var(--tab-inactive);
  opacity: 0.85;
}

.tab-btn.inactive:hover {
  opacity: 0.95;
}

/* Pointer Arrow */
.tab-arrow-container {
  display: flex;
  height: 12px;
  position: relative;
  margin-top: -1px;
  margin-bottom: 4px;
}

.tab-arrow-half {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.triangle-indicator {
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 10px solid var(--card-bg);
  transition: opacity 0.2s ease;
}

.triangle-indicator.hidden {
  visibility: hidden;
  opacity: 0;
}

/* Main Form Card */
.form-card {
  background: var(--card-bg);
  border-radius: var(--radius-card);
  padding: 24px 20px 28px 20px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.03);
  margin-top: 4px;
}

.form-section {
  display: none;
  animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-section.active {
  display: block;
}

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

/* Field Group */
.field-group {
  margin-bottom: 20px;
}

.field-label {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 8px;
}

/* Input Container */
.input-pill {
  display: flex;
  align-items: center;
  border: 1.8px solid var(--border-dark);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  background: #FFFFFF;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-pill:focus-within {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

.country-flag {
  display: flex;
  align-items: center;
  margin-right: 8px;
}

.country-flag svg,
.country-flag img {
  width: 26px;
  height: auto;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.country-code {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-dark);
  margin-right: 12px;
  user-select: none;
}

.input-icon {
  display: flex;
  align-items: center;
  margin-right: 12px;
}

.input-icon svg {
  width: 22px;
  height: 22px;
}

.text-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
  width: 100%;
}

.text-input::placeholder {
  color: #64748B;
  font-weight: 600;
}

/* Action Button */
.btn-primary {
  display: inline-block;
  background-color: var(--primary-blue);
  color: #FFFFFF;
  border: none;
  outline: none;
  border-radius: var(--radius-pill);
  padding: 13px 44px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(26, 115, 232, 0.35);
  transition: all 0.2s ease;
  margin-top: 4px;
  margin-bottom: 22px;
}

.btn-primary:hover {
  background-color: var(--primary-blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(26, 115, 232, 0.4);
}

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

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

/* Divider "OR" */
.divider-row {
  display: flex;
  align-items: center;
  margin: 10px 0 24px 0;
}

.divider-line {
  flex: 1;
  height: 1.2px;
  background-color: var(--divider-color);
}

.divider-text {
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-subtle);
  letter-spacing: 0.5px;
}

/* Social Login */
.social-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 36px;
  padding: 4px 0 8px 0;
}

.social-btn {
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-btn:hover {
  transform: scale(1.08);
}

.social-btn svg,
.social-btn img {
  width: 48px;
  height: 48px;
}

/* Footer Section */
.app-footer {
  padding: 16px 20px 24px 20px;
  text-align: center;
}

.terms-text {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.terms-links {
  margin-top: 2px;
}

.terms-links a {
  color: var(--link-color);
  text-decoration: underline;
  font-size: 11.5px;
  font-weight: 500;
}

.terms-links a:hover {
  text-decoration: none;
}

.terms-links span {
  margin: 0 4px;
  color: var(--text-muted);
}

.developed-by {
  font-size: 14.5px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 10px;
}

.developed-by .company-name {
  color: var(--accent-orange);
  font-weight: 700;
  margin-left: 3px;
}

/* Alert Notification */
.alert {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  display: none;
}

.alert-success {
  background-color: #DEF7EC;
  color: #03543F;
  border: 1px solid #BCF0DA;
}

.alert-error {
  background-color: #FDE8E8;
  color: #9B1C1C;
  border: 1px solid #F8B4B4;
}

/* Password Toggle Icon */
.password-toggle {
  cursor: pointer;
  padding: 4px;
  color: var(--text-subtle);
  display: flex;
  align-items: center;
}

/* OTP Modal Dialog (Matching Android cusom_dialog_design.xml) */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-backdrop.show {
  display: flex;
}

.otp-dialog-card {
  background: #FFFFFF;
  border-radius: var(--radius-card);
  width: 100%;
  max-width: 380px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  text-align: center;
  position: relative;
  animation: modalPop 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalPop {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.otp-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.otp-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-blue);
  flex: 1;
}

.otp-close-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-subtle);
  padding: 4px;
  position: absolute;
  right: 18px;
  top: 18px;
}

.otp-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.otp-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.otp-inputs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.otp-box {
  width: 44px;
  height: 52px;
  border: 1.8px solid var(--border-dark);
  border-radius: 12px;
  font-size: 22px;
  font-weight: 800;
  text-align: center;
  outline: none;
  transition: all 0.2s ease;
}

.otp-box:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.2);
}

.resend-box {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.resend-link {
  color: #FF4081;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  margin-left: 4px;
}

.resend-link.disabled {
  color: var(--text-subtle);
  cursor: not-allowed;
  opacity: 0.6;
}
