/* ==============================================================================
   Medical-CP: Shanti Mukand Hospital Captive Portal Design System
   Aesthetic: Clinical Trust, Navy & Deep Teal, Glassmorphism, Micro-Interactions
   ============================================================================== */

:root {
  --primary-navy: #0B3D5C;
  --primary-navy-dark: #07273B;
  --accent-teal: #0284C7;
  --accent-cyan: #38BDF8;
  --accent-emerald: #059669;
  --accent-gold: #D97706;
  --bg-gradient: linear-gradient(135deg, #0B3D5C 0%, #082F49 50%, #031726 100%);
  --card-bg: rgba(255, 255, 255, 0.95);
  --card-border: rgba(255, 255, 255, 0.3);
  --text-main: #0F172A;
  --text-muted: #64748B;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 25px rgba(2, 132, 199, 0.25);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-gradient);
  min-height: 100vh;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 16px 12px;
  line-height: 1.5;
}

/* Background Subtle Medical Cross Pattern */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1.5px, transparent 1.5px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

.portal-container {
  width: 100%;
  max-width: 480px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Header & Dual Branding */
.portal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.smh-seal-img {
  width: 54px;
  height: 54px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

.brand-text h1 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.2px;
  line-height: 1.2;
}

.brand-text p {
  font-size: 0.72rem;
  color: #BAE6FD;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.lang-toggle-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #FFFFFF;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.lang-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* Promotional Video Container */
.video-section {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000000;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.video-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  background: #0F172A;
}

.video-overlay-banner {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.badge-video-status {
  background: rgba(11, 61, 92, 0.85);
  backdrop-filter: blur(6px);
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-countdown {
  background: rgba(217, 119, 6, 0.9);
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

.video-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  background: var(--accent-teal);
  width: 0%;
  transition: width 0.2s linear;
}

/* Fallback watch button if CNA video suppressed */
.video-fallback-btn {
  display: none;
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: var(--accent-emerald);
  color: #FFFFFF;
  border: none;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
}

/* Authentication Card */
.auth-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(20px);
}

/* Tabs */
.auth-tabs {
  display: flex;
  background: #F1F5F9;
  padding: 4px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  border: 1px solid #E2E8F0;
}

.tab-btn {
  flex: 1;
  padding: 10px 8px;
  font-size: 0.85rem;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn.active {
  background: #FFFFFF;
  color: var(--primary-navy);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Form Styles */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}

.phone-input-wrapper {
  display: flex;
  align-items: center;
  background: #F8FAFC;
  border: 1.5px solid #CBD5E1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: var(--transition);
}

.phone-input-wrapper:focus-within {
  border-color: var(--accent-teal);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.country-code {
  padding: 12px 14px;
  font-weight: 700;
  color: #475569;
  background: #E2E8F0;
  font-size: 0.95rem;
  border-right: 1.5px solid #CBD5E1;
}

.text-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  color: var(--text-main);
}

.code-input-standalone {
  border: 1.5px solid #CBD5E1;
  border-radius: var(--radius-sm);
  background: #F8FAFC;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
}

.code-input-standalone:focus {
  border-color: var(--accent-teal);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* 6-Digit OTP Boxes */
.otp-boxes-container {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
}

.otp-box {
  width: 100%;
  max-width: 52px;
  height: 54px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-navy);
  border: 1.5px solid #CBD5E1;
  border-radius: var(--radius-sm);
  background: #F8FAFC;
  outline: none;
  transition: var(--transition);
}

.otp-box:focus {
  border-color: var(--accent-teal);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* Buttons */
.submit-btn {
  width: 100%;
  background: linear-gradient(135deg, #0B3D5C 0%, #0284C7 100%);
  color: #FFFFFF;
  border: none;
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 800;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.3);
  transition: var(--transition);
}

.submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  filter: grayscale(40%);
}

.resend-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  margin-top: 12px;
  color: var(--text-muted);
}

.resend-btn {
  background: none;
  border: none;
  color: var(--accent-teal);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}

.resend-btn:disabled {
  color: #94A3B8;
  text-decoration: none;
  cursor: not-allowed;
}

/* Alerts & Notices */
.alert-banner {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 14px;
  display: none;
}

.alert-banner.success {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
  display: block;
}

.alert-banner.error {
  background: #FEF2F2;
  color: #991B1B;
  border: 1px solid #FECACA;
  display: block;
}

/* Terms Checkbox */
.terms-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 14px;
}

.terms-row a {
  color: var(--accent-teal);
  font-weight: 600;
  text-decoration: none;
}

/* Footer / Netwall Co-Branding */
.portal-footer {
  text-align: center;
  padding: 12px 0;
  color: #94A3B8;
  font-size: 0.76rem;
}

.netwall-co-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.netwall-logo-img {
  height: 22px;
  opacity: 0.85;
}

/* Success Card */
.success-card {
  display: none;
  text-align: center;
  padding: 28px 16px;
}

.success-check-icon {
  width: 68px;
  height: 68px;
  background: #ECFDF5;
  border: 3px solid #10B981;
  color: #059669;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin: 0 auto 16px auto;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.success-card h2 {
  color: var(--primary-navy);
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.success-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 18px;
}

.session-info-badge {
  background: #F0F9FF;
  border: 1px solid #BAE6FD;
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
}

.session-stat strong {
  display: block;
  color: var(--primary-navy);
  font-size: 1.05rem;
}

.session-stat span {
  font-size: 0.72rem;
  color: #0369A1;
  font-weight: 600;
}
