/* Custom Design Tokens & Variables (Light Theme / White Themed) */
:root {
  --bg-primary: hsl(220, 20%, 97%);
  --bg-secondary: hsl(0, 0%, 100%);
  --bg-input: hsl(220, 16%, 95%);
  --bg-hover: hsl(220, 15%, 90%);
  --border-color: hsl(220, 15%, 86%);
  --border-focus: hsl(258, 80%, 58%);
  
  --text-primary: hsl(222, 28%, 12%);
  --text-secondary: hsl(220, 12%, 40%);
  --text-muted: hsl(220, 8%, 56%);
  
  --accent-primary: hsl(172, 90%, 34%);
  --accent-secondary: hsl(258, 80%, 56%);
  --accent-gradient: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
  
  --error-color: hsl(352, 80%, 48%);
  --error-bg: hsl(352, 100%, 97%);
  --success-color: hsl(142, 70%, 32%);
  --success-bg: hsl(142, 80%, 96%);
  
  --font-display: 'Outfit', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --transition-smooth: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Security: Disable text selection */
* {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
}

/* Allow text selection inside input fields only */
input, textarea {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
}

/* Security: Hide content when printing (prevents print-screen) */
@media print {
  * {
    display: none !important;
    visibility: hidden !important;
  }
  html::after {
    content: 'Printing is not allowed.';
    display: block !important;
    visibility: visible !important;
    font-size: 24px;
    text-align: center;
    padding: 100px;
    color: #ff4757;
    font-family: 'Inter', sans-serif;
  }
}

/* Reset & Global Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-smooth);
}

a:hover {
  color: var(--accent-primary);
  text-shadow: 0 0 8px hsla(172, 90%, 34%, 0.15);
}

/* Outer Split Layout Wrapper */
.login-wrapper {
  display: grid;
  grid-template-columns: 60fr 40fr;
  width: 100vw;
  min-height: 100vh;
}

/* Left Brand Panel (60% Width) */
.brand-panel {
  position: relative;
  background: url('login_background.png') no-repeat center center/cover;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px;
  overflow: hidden;
}

/* Grid Overlay for High-tech Aesthetic */
.brand-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: 2;
  pointer-events: none;
}

.brand-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, hsla(222, 40%, 8%, 0.45) 0%, hsla(222, 28%, 7%, 0.6) 100%);
  backdrop-filter: blur(1.5px);
  z-index: 1;
}

/* Decorative Background Glow Blobs */
.glow-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  z-index: 2;
  opacity: 0.18;
  pointer-events: none;
}

.blob-1 {
  top: 15%;
  left: 10%;
  width: 250px;
  height: 250px;
  background: var(--accent-secondary);
  animation: blob-float 10s infinite alternate ease-in-out;
}

.blob-2 {
  bottom: 20%;
  right: 15%;
  width: 280px;
  height: 280px;
  background: var(--accent-primary);
  animation: blob-float 12s infinite alternate-reverse ease-in-out;
}

@keyframes blob-float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, 20px) scale(1.15); }
}

.brand-content {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}


.brand-body {
  width: 100%;
  margin: auto 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.brand-body h1 {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  background: linear-gradient(120deg, #ffffff 40%, hsl(172, 85%, 80%) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1px;
  max-width: 600px;
}

.brand-subtitle {
  font-size: 16px;
  line-height: 1.6;
  color: hsl(220, 15%, 85%);
  margin-bottom: 32px;
  max-width: 600px;
}

/* Floating Cards Layout */
.floating-cards-container {
  position: relative;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: stretch;
  gap: 20px;
  margin-top: 40px;
  width: 100%;
}

/* Glassmorphism Card Style */
.glass-card {
  background: hsla(0, 0%, 100%, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid hsla(0, 0%, 100%, 0.12);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
  transition: border-color 0.3s, transform 0.3s;
  user-select: none;
  flex: 1;
  min-width: 240px;
  max-width: 320px;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.glass-card:hover {
  border-color: hsla(0, 0%, 100%, 0.25);
  transform: scale(1.02);
}

/* Appointment Card specific styles */
.card-appointment {
}

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

.card-appointment .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 12px;
  background-color: hsla(142, 70%, 45%, 0.2);
  color: hsl(142, 70%, 65%);
  border: 1px solid hsla(142, 70%, 45%, 0.3);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: hsl(142, 70%, 45%);
  position: relative;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: hsl(142, 70%, 45%);
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2.5); opacity: 0; }
}

.card-time {
  font-size: 12px;
  font-weight: 500;
  color: hsl(220, 10%, 80%);
}

.card-user {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar-placeholder {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.user-details h4 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 2px;
}

.user-details p {
  font-size: 12px !important;
  color: hsl(220, 10%, 80%) !important;
  margin: 0 !important;
}

/* Action Buttons inside Mockup Card */
.card-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  width: 100%;
}

.btn-action {
  flex: 1;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
  outline: none;
  text-align: center;
}

.btn-decline {
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.btn-decline:hover {
  background-color: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-join {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 10px hsla(258, 80%, 56%, 0.2);
}

.btn-join:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 14px hsla(258, 80%, 56%, 0.35);
}

/* EHR Integration Card Styles */
/* Clinical Patient Record Card Styles */
.clinical-record {
  text-align: left;
  margin-top: 10px;
  width: 100%;
}

.clinical-section {
  margin-bottom: 12px;
}

.clinical-label {
  font-size: 10px;
  font-weight: 700;
  color: hsl(220, 10%, 70%);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  display: block;
}

.clinical-text {
  font-size: 12px !important;
  color: #ffffff !important;
  margin: 0 !important;
  line-height: 1.4;
}

.clinical-vitals-row {
  display: flex;
  justify-content: space-between;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 12px;
  margin: 12px 0;
}

.vital-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.vital-lbl {
  font-size: 9px;
  font-weight: 600;
  color: hsl(220, 10%, 75%);
}

.vital-val {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: hsl(172, 85%, 70%);
}

/* Scheduler Slots Card Styles */
.scheduler-content {
  text-align: left;
  margin-top: 10px;
  width: 100%;
}

.scheduler-header h4 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2px;
}

.scheduler-desc {
  font-size: 12px !important;
  color: hsl(220, 10%, 80%) !important;
  margin: 0 0 14px 0 !important;
}

.slots-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 8px;
  transition: background-color 0.25s, border-color 0.25s;
}

.slot-booked {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: hsl(220, 10%, 60%);
  text-decoration: line-through;
  cursor: not-allowed;
}

.slot-open {
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  cursor: pointer;
}

.slot-open:hover {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Badges */
.badge-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 12px;
  background-color: hsla(188, 78%, 40%, 0.18);
  color: hsl(188, 78%, 68%);
  border: 1px solid hsla(188, 78%, 40%, 0.28);
}

.badge-purple {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 12px;
  background-color: hsla(258, 80%, 56%, 0.18);
  color: hsl(258, 80%, 75%);
  border: 1px solid hsla(258, 80%, 56%, 0.28);
}

/* Prescription & Summary Styles */
.rx-content {
  text-align: left;
  margin-top: 10px;
  width: 100%;
}

.rx-summary {
  margin-bottom: 12px;
}

.rx-label {
  font-size: 10px;
  font-weight: 700;
  color: hsl(220, 10%, 75%);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  display: block;
}

.rx-text {
  font-size: 12px !important;
  color: #ffffff !important;
  margin: 0 !important;
  line-height: 1.4;
}

.rx-list-title {
  font-size: 9px;
  font-weight: 700;
  color: hsl(220, 10%, 70%);
  letter-spacing: 0.5px;
  margin: 12px 0 6px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 8px;
}

.rx-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rx-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 6px 10px;
}

.rx-name {
  font-size: 11px;
  font-weight: 600;
  color: #ffffff;
}

.rx-dosage {
  font-size: 11px;
  color: hsl(172, 85%, 70%);
}

/* Float Keyframes */
@keyframes floatSlow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(0.5deg); }
}

@keyframes floatFast {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(-0.5deg); }
}

.animate-float-slow {
  animation: floatSlow 6s ease-in-out infinite;
}

.animate-float-fast {
  animation: floatFast 5s ease-in-out infinite;
}

@keyframes floatSlowest {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(0.3deg); }
}

.animate-float-slowest {
  animation: floatSlowest 7s ease-in-out infinite;
}

.brand-footer {
  width: 100%;
  text-align: center;
}

.brand-footer p {
  font-size: 13px;
  color: hsl(220, 10%, 70%);
}

/* Animations for Brand Content */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

.animate-fade-in {
  animation: fadeIn 1s ease-out forwards;
}

.animate-slide-up {
  animation: slideUp 1s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

/* Right Form Panel (40% Width) */
.form-panel {
  background-color: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  position: relative;
  border-left: 1px solid var(--border-color);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.02);
}

.form-container {
  width: 100%;
  max-width: 400px;
}

.form-header {
  margin-bottom: 32px;
  text-align: center;
}

.form-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
}

.form-logo img {
  height: 52px;
  width: auto;
  object-fit: contain;
}

.form-header h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.form-header p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Portal Selector Container */
.portal-selector-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 10px;
  width: 100%;
}

/* Individual Portal Card */
.portal-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background-color: var(--bg-primary);
  border: 1.5px solid var(--border-color);
  border-radius: 16px;
  cursor: pointer;
  transition: var(--transition-bounce);
  position: relative;
  overflow: hidden;
}

/* Icon Container */
.portal-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

/* Text Content */
.portal-card-content {
  flex: 1;
  text-align: left;
}

.portal-card-content h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  transition: var(--transition-smooth);
}

.portal-card-content p {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-secondary);
}

/* Arrow Indicator */
.portal-card-arrow {
  color: var(--text-muted);
  opacity: 0.5;
  transition: var(--transition-smooth);
  transform: translateX(0);
  display: flex;
  align-items: center;
}

/* Card Specific Themes (Provider - Violet, Hospital - Teal) */
.card-provider .portal-card-icon {
  background: hsla(258, 80%, 56%, 0.08);
  color: var(--accent-secondary);
  border: 1px solid hsla(258, 80%, 56%, 0.15);
}

.card-hospital .portal-card-icon {
  background: hsla(172, 90%, 34%, 0.08);
  color: var(--accent-primary);
  border: 1px solid hsla(172, 90%, 34%, 0.15);
}

/* Hover States with Custom Glows & Scaling */
.portal-card:hover {
  transform: translateY(-4px) scale(1.02);
  background-color: var(--bg-secondary);
}

.card-provider:hover {
  border-color: var(--accent-secondary);
  box-shadow: 
    0 12px 30px hsla(258, 80%, 56%, 0.1),
    0 2px 8px hsla(258, 80%, 56%, 0.05);
}

.card-hospital:hover {
  border-color: var(--accent-primary);
  box-shadow: 
    0 12px 30px hsla(172, 90%, 34%, 0.1),
    0 2px 8px hsla(172, 90%, 34%, 0.05);
}

.card-provider:hover .portal-card-icon {
  background: var(--accent-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 15px hsla(258, 80%, 56%, 0.3);
}

.card-hospital:hover .portal-card-icon {
  background: linear-gradient(135deg, var(--accent-primary), hsl(172, 85%, 45%));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 15px hsla(172, 90%, 34%, 0.3);
}

.portal-card:hover .portal-card-content h3 {
  color: var(--text-primary);
}

.card-provider:hover .portal-card-content h3 {
  color: var(--accent-secondary);
}

.card-hospital:hover .portal-card-content h3 {
  color: var(--accent-primary);
}

.portal-card:hover .portal-card-arrow {
  opacity: 1;
  transform: translateX(4px);
}

.card-provider:hover .portal-card-arrow {
  color: var(--accent-secondary);
}

.card-hospital:hover .portal-card-arrow {
  color: var(--accent-primary);
}

/* Active Pressed States */
.portal-card:active {
  transform: translateY(-1px) scale(1.01);
}

/* ==========================================================================
   Responsive Design Media Queries
   ========================================================================== */

/* Large Tablets & Medium Screen Sizes */
@media (max-width: 1024px) {
  .login-wrapper {
    grid-template-columns: 50fr 50fr;
  }
  .brand-body h1 {
    font-size: 34px;
  }
}

/* Small Tablets & Mobile Screen Sizes */
@media (max-width: 900px) {
  .login-wrapper {
    grid-template-columns: 1fr;
  }
  
  .brand-panel {
    display: none; /* Hide left 60% panel to fit form cleanly on mobile screen sizes */
  }
  
  .form-panel {
    border-left: none;
    padding: 40px 24px;
  }
}

/* Stacking cards horizontally on medium viewports */
@media (max-width: 1300px) {
  .floating-cards-container {
    flex-direction: column !important;
    align-items: center !important;
    gap: 20px !important;
  }
  .glass-card {
    max-width: 320px !important;
    width: 100% !important;
    min-width: 320px !important;
  }
}
