/* Global Custom Design System for Smart Hospital System */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Colors */
  --primary: #2563eb; /* Royal blue */
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-glow: rgba(37, 99, 235, 0.25);
  
  --accent: #8b5cf6; /* Vibrant violet */
  --accent-hover: #7c3aed;
  --accent-light: #f5f3ff;
  
  --success: #059669;
  --success-light: #d1fae5;
  --success-text: #064e3b;
  
  --warning: #d97706;
  --warning-light: #fef3c7;
  --warning-text: #78350f;
  
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --danger-text: #7f1d1d;
  
  --bg-base: #f1f5f9; /* Slightly darker base for contrast with surface */
  --bg-surface: #ffffff;
  --bg-surface-translucent: rgba(255, 255, 255, 0.75);
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-inverse: #ffffff;
  
  --border-color: #cbd5e1;
  --border-color-light: #e2e8f0;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.15);
  --shadow-glow: 0 0 24px rgba(37, 99, 235, 0.25);

  /* Borders */
  --border-radius-sm: 10px;
  --border-radius-md: 16px;
  --border-radius-lg: 28px;
  
  /* Transitions */
  --transition-fast: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  
  /* Layout Metrics */
  --sidebar-width: 280px;
  --topbar-height: 80px;
}

/* Base resets & styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  background-color: var(--bg-base);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.4s ease-out;
}

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

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* App Layout Grid */
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  padding: 1.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  z-index: 100;
  transition: var(--transition-normal);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 2.5rem;
  padding-left: 0.5rem;
  text-decoration: none;
}

.sidebar-brand i {
  font-size: 1.5rem;
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
}

.sidebar-menu-item a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--border-radius-sm);
  transition: var(--transition-fast);
  border-left: 3px solid transparent;
}

.sidebar-menu-item a:hover {
  background-color: var(--border-color-light);
  color: var(--text-main);
}

.sidebar-menu-item.active a {
  background-color: var(--primary-light);
  color: var(--primary);
  border-left: 3px solid var(--primary);
}

.sidebar-menu-item a i {
  font-size: 1.2rem;
  transition: var(--transition-fast);
}

.sidebar-menu-item a:hover i {
  transform: scale(1.1);
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding-top: 1.25rem;
}

.user-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: var(--border-radius-sm);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.user-role {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* Main Content Area */
.main-wrapper {
  margin-left: var(--sidebar-width);
  flex-grow: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: var(--transition-normal);
}

.top-bar {
  height: var(--topbar-height);
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
}

.page-title-group h1 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.notification-badge {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--bg-base);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  color: var(--text-muted);
}

.notification-badge:hover {
  background-color: var(--border-color);
  color: var(--text-main);
}

.notification-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  background-color: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--bg-surface);
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--danger-text);
  background-color: var(--danger-light);
  border-radius: var(--border-radius-sm);
  text-decoration: none;
  transition: var(--transition-fast);
}

.logout-btn:hover {
  background-color: #fca5a5;
  color: #7f1d1d;
}

.container {
  padding: 2rem;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  flex-grow: 1;
}

/* Glassmorphic Card system */
.card {
  background: var(--bg-surface);
  border-radius: var(--border-radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition-normal);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-title-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color-light);
  padding-bottom: 0.75rem;
}

.card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card h3 i {
  color: var(--primary);
}

/* Typography elements */
h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1.5rem;
}

h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

p {
  color: var(--text-muted);
}

/* Metrics Dashboard Widget */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.metric-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}

.metric-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(13, 148, 136, 0.4);
}

.metric-icon-box {
  width: 54px;
  height: 54px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.metric-icon-box.teal { background-color: var(--primary-light); color: var(--primary); }
.metric-icon-box.blue { background-color: var(--accent-light); color: var(--accent); }
.metric-icon-box.green { background-color: var(--success-light); color: var(--success); }
.metric-icon-box.amber { background-color: var(--warning-light); color: var(--warning); }
.metric-icon-box.danger { background-color: var(--danger-light); color: var(--danger); }

.metric-details {
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
  margin: 0.15rem 0;
}

.metric-change {
  font-size: 0.75rem;
  font-weight: 600;
}
.metric-change.positive { color: var(--success); }
.metric-change.negative { color: var(--danger); }

/* Table Overhauls */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  background-color: var(--bg-surface);
}

th {
  padding: 1rem;
  text-align: left;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border-color);
  background: var(--bg-base);
  position: sticky;
  top: 0;
  z-index: 10;
}

table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

table tbody tr:hover td {
  background-color: var(--bg-base);
}

/* Badge styling */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge-success { background-color: var(--success-light); color: var(--success-text); }
.badge-warning { background-color: var(--warning-light); color: var(--warning-text); }
.badge-danger { background-color: var(--danger-light); color: var(--danger-text); }
.badge-info { background-color: var(--accent-light); color: var(--accent); }

/* Custom Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition-normal);
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
}

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

.btn-primary {
  background-color: var(--primary);
  color: var(--text-inverse);
  box-shadow: 0 2px 4px 0 rgba(13, 148, 136, 0.2);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 8px 0 rgba(13, 148, 136, 0.3);
}

.btn-secondary {
  background-color: var(--border-color-light);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--border-color);
}

.btn-accent {
  background-color: var(--accent);
  color: var(--text-inverse);
}

.btn-accent:hover {
  background-color: var(--accent-hover);
}

.btn-danger {
  background-color: var(--danger-light);
  color: var(--danger-text);
  border-color: #fca5a5;
}

.btn-danger:hover {
  background-color: #fca5a5;
  color: #7f1d1d;
}

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

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  border-radius: 6px;
}

.btn-block {
  display: flex;
  width: 100%;
}

/* Custom Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  background-color: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.95rem;
  transition: var(--transition-normal);
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

select.form-control {
  appearance: auto;
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

.form-control::placeholder {
  color: var(--text-muted);
}

input[type="file"].form-control {
  padding: 0.5rem;
  background: var(--bg-base);
  cursor: pointer;
}

/* Alert Notification Overlays */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--border-radius-sm);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  animation: slideInDown 0.3s forwards;
}

.alert-success {
  background-color: var(--success-light);
  color: var(--success-text);
  border-color: #a7f3d0;
}

.alert-error, .alert-danger {
  background-color: var(--danger-light);
  color: var(--danger-text);
  border-color: #fecaca;
}

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

/* Smart Clinical Timeline Components */
.timeline {
  position: relative;
  padding-left: 2rem;
  margin-left: 0.75rem;
  border-left: 2px solid var(--border-color);
}

.timeline::before {
  content: '';
  position: absolute;
  left: -2px;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--border-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: calc(-2rem - 6px);
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--bg-surface);
  border: 3px solid var(--primary);
  box-shadow: 0 0 0 4px var(--bg-base);
  z-index: 2;
  transition: var(--transition-fast);
}

.timeline-item:hover .timeline-dot {
  transform: scale(1.25);
  background-color: var(--primary);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.timeline-date {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.timeline-category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 0.05em;
  background-color: var(--primary-light);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.timeline-content-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}

.timeline-item:hover .timeline-content-card {
  box-shadow: var(--shadow-md);
  border-color: rgba(13, 148, 136, 0.2);
}

.timeline-content-card p {
  color: var(--text-main);
  margin-top: 0.25rem;
  font-size: 0.9rem;
}

/* Patient Summary Capsules (Header grid) */
.patient-profile-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  background: var(--bg-base);
  padding: 1.25rem;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.profile-summary-item {
  display: flex;
  flex-direction: column;
}

.profile-summary-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.15rem;
}

.profile-summary-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

/* AI diagnostics confidence bar */
.ai-diagnosis-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: white;
  border-radius: var(--border-radius-md);
  padding: 1.5rem;
}

.ai-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 0.75rem;
}

.ai-header h4 {
  color: white;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ai-pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--primary);
  box-shadow: 0 0 10px var(--primary);
  animation: pulse 1.5s infinite;
}

.ai-result-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.ai-result-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.ai-result-class {
  font-size: 1.35rem;
  font-weight: 800;
  color: #2dd4bf;
}

.confidence-bar-container {
  height: 10px;
  background-color: #334155;
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}

.confidence-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0d9488 0%, #10b981 100%);
  border-radius: 5px;
  transition: width 1s ease-out;
}

.confidence-percentage {
  font-size: 0.9rem;
  font-weight: 700;
  color: white;
  margin-left: auto;
}

/* Handwritten Notepad style for Prescriptions */
.prescription-notepad {
  background-color: #fffdf5;
  border: 1px solid #f2e9d2;
  box-shadow: var(--shadow-md);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  padding: 2.5rem 2rem;
}

.prescription-notepad::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background-color: var(--primary);
}

.prescription-header {
  border-bottom: 2px solid #ecdcb9;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.prescription-logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.prescription-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  font-size: 0.85rem;
  color: #786d5f;
  margin-top: 0.5rem;
  gap: 0.5rem;
}

.prescription-rx {
  font-size: 2.25rem;
  font-family: 'Times New Roman', serif;
  font-style: italic;
  font-weight: bold;
  color: #5c5346;
  margin-bottom: 0.5rem;
}

.prescription-body {
  font-family: 'Inter', sans-serif;
  color: #3b352e;
  line-height: 1.8;
  font-size: 1.05rem;
  min-height: 150px;
}

.prescription-notes {
  margin-top: 2rem;
  border-top: 1px dashed #ecdcb9;
  padding-top: 1rem;
  font-size: 0.95rem;
  color: #61574a;
}

/* Voice assistant kiosk custom design */
.kiosk-wrapper {
  background: radial-gradient(circle at top right, #f1f5f9 0%, #cbd5e1 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 1.5rem;
}

.kiosk-card {
  max-width: 650px;
  width: 100%;
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 3.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.7);
  text-align: center;
  position: relative;
}

.kiosk-logo {
  color: var(--primary);
  font-size: 2.75rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.kiosk-card h1 {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.kiosk-card h2 {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.kiosk-btn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.kiosk-lang-btn {
  background-color: var(--bg-base);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 1.5rem 1rem;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-normal);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.kiosk-lang-btn:hover {
  border-color: var(--primary);
  background-color: var(--primary-light);
  color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.mic-section {
  margin: 2rem 0;
}

.kiosk-mic-btn {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white;
  border: none;
  font-size: 2.5rem;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(13, 148, 136, 0.4);
  transition: var(--transition-normal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.kiosk-mic-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 15px 30px rgba(13, 148, 136, 0.5);
}

.kiosk-mic-btn.recording {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  animation: pulse-danger 1.5s infinite cubic-bezier(0.66, 0, 0, 1);
}

.kiosk-textarea {
  width: 100%;
  min-height: 140px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 1.25rem;
  font-family: inherit;
  font-size: 1.1rem;
  color: var(--text-main);
  background-color: var(--bg-base);
  margin-top: 1.5rem;
  resize: none;
  transition: var(--transition-fast);
}

.kiosk-textarea:focus {
  outline: none;
  border-color: var(--primary);
  background-color: white;
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.qr-receipt-box {
  background-color: var(--bg-base);
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 2rem;
  margin: 2.5rem 0;
  display: inline-block;
  min-width: 280px;
}

.qr-code-img {
  max-width: 200px;
  width: 100%;
  border-radius: var(--border-radius-sm);
  box-shadow: var(--shadow-md);
}

/* Animations */
@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 12px rgba(13, 148, 136, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(13, 148, 136, 0); }
}

@keyframes pulse-danger {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Auth Page layout centering */
.auth-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #f0fdfa 0%, #e0f2fe 100%);
  padding: 1.5rem;
}

.auth-card {
  max-width: 420px;
  width: 100%;
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255,255,255,0.8);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo {
  font-size: 2.25rem;
  color: var(--primary);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.auth-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

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

/* Flex Grid layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.grid-3-1 {
  display: grid;
  grid-template-columns: 2.5fr 1.2fr;
  gap: 1.75rem;
}

@media (max-width: 992px) {
  .grid-3-1 {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    transform: translateX(-100%);
  }
  
  .main-wrapper {
    margin-left: 0;
  }
  
  .sidebar.mobile-open {
    transform: translateX(0);
  }
}

/* Print styles for Patient Prescriptions */
@media print {
  /* Hide all elements on the page */
  body * {
    visibility: hidden;
  }
  
  /* Show only the prescriptions card and its contents */
  .printable-prescriptions,
  .printable-prescriptions * {
    visibility: visible;
  }
  
  /* Layout modifications for print */
  .printable-prescriptions {
    position: absolute;
    left: 0;
    top: 0;
    width: 100% !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    background: transparent !important;
  }
  
  /* Hide unnecessary elements within the prescriptions card when printing */
  .no-print {
    display: none !important;
  }
  
  /* Custom clean look for prescription notepad for print */
  .prescription-notepad {
    border: 1px solid #ddd !important;
    background-color: #fff !important;
    box-shadow: none !important;
    page-break-inside: avoid;
    margin-bottom: 2rem;
    padding: 1.5rem !important;
  }
  
  .prescription-notepad::before {
    display: none !important;
  }
}
