/* Global Design Tokens */
/* Content Layout */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

:root {
  /* Fonts */
  --font-family: "SF Pro Text", "SF Pro Icons", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
  
  /* Colors */
  --primary-grad: linear-gradient(135deg, #009185ff 0%, #004051ff 100%);
  --primary-color: #009185;
  --secondary-color: #004051;
  
  /* Neutral Palette */
  --white: #ffffff;
  --bg-main: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.85);
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-light: rgba(226, 232, 240, 0.6);
  
  /* Accents */
  --accent-teal: #009185;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.2);
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-primary: 0 10px 20px rgba(0, 145, 133, 0.2);
  
  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Utility Classes */
.text-gradient {
  background: var(--primary-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.bg-gradient {
  background: var(--primary-grad);
}

.glass-morphism {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
}

/* Responsiveness Utilities */
@media (max-width: 1200px) {
  :root {
    --fs-base: 15px;
  }
}

@media (max-width: 768px) {
  :root {
    --fs-base: 14px;
  }
  .hide-mobile {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .p-mobile-2 {
    padding: 1rem !important;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
/* Global Header Styles */
.header {
  background: #ffffff;
  width: 100%;
  z-index: 9999;
  position: fixed;
  top: 0;
  left: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.header-main-row {
  height: 85px;
  display: flex;
  align-items: center;
  width: 100%;
}

.header-logo { text-decoration: none !important; color: inherit; display: flex; align-items: center; }
.header-logo span {
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 26px;
  background: var(--primary-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
  text-transform: capitalize;
}

.header-search-bar { min-width: 750px; padding: 0 25px; position: relative; }
.header-search-form { 
  width: 100%; 
  height: 48px; 
  display: flex; 
  align-items: center; 
  overflow: visible; 
  border-radius: 10px; 
  border: 2px solid #eef2f7; 
  background: #f8fafc; 
  position: relative;
}

.header-search-form input {
  border: none;
  padding: 0 25px;
  width: 100%;
  background: transparent;
  font-size: 14px;
  font-weight: 400;
  flex: 1; outline: none;
}

.header-search-form button { 
  height: 48px;
  margin-top: -2px; margin-bottom: -2px; margin-right: -2px;
  padding: 0 16px;
  border: 0; 
  border-radius: 0px 10px 10px 0px;
  background: var(--primary-grad); 
  color: #fff;
  display: flex;
  align-items: center; justify-content: center;
  transition: 0.3s;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  z-index: 10;
}

.header-nav-icons { display: flex; gap: 15px; margin-right: 35px; align-items: center; }
.header-nav-icons a { 
  background: var(--primary-grad);
  color: #fff !important; 
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 600; text-decoration: none; transition: 0.3s;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.header-profile-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 18px 6px 6px;
  background: #f8fafc;
  border-radius: 40px;
  border: 1px solid #eef2f7;
  cursor: pointer;
  transition: 0.3s;
  text-decoration: none !important;
}

.profile-icon-circle {
  width: 38px; height: 38px;
  background: var(--primary-grad);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 18px;
  box-shadow: 0 4px 8px rgba(0, 145, 133, 0.2);
}

.profile-name { display: block; font-size: 14px; font-weight: 700; color: var(--text-main); line-height: 1.2; }
.profile-role { display: block; font-size: 11px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }

/* Global Footer Styles */
.footer {
  backdrop-filter: blur(8px);
  border-top: 1px solid #eef2f7;
  background: #fff;
  font-family: var(--font-family);
}

/* Mobile Header Styles */
@media (max-width: 768px) {
  .header { 
    height: 70px; 
    padding: 0 15px 0 5px; 
    position: absolute; 
    padding-left: 10px !important;
  }
  
  .header-logo span { font-size: 13px; }
  .header-logo div { width: 32px !important; height: 32px !important; }
  .header-logo i { font-size: 16px !important; }

  .header-search-bar { 
    display: none !important;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: #ffffff;
    padding: 10px 15px;
    box-shadow: 0 10px 15px rgba(0,0,0,0.05);
    border-bottom: 1px solid #eef2f7;
    z-index: 999;
  }
  .header-search-bar.active { display: block !important; }
  .header-search-form { height: 45px; }
  .header-nav-icons { gap: 8px; margin-right: 10px; }
  .header-nav-icons a { width: 32px; height: 32px; font-size: 16px; }
  .header-profile-pill { padding: 3px 8px 3px 4px; gap: 5px; }
  .profile-icon-circle { width: 30px; height: 30px; font-size: 14px; }
}

/* Content Area Setup */
.content-area {
  min-height: calc(100vh - 55px); /* Full screen minus footer */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-bottom: 55px; /* Offset to keep content truly centered between header and footer */
  padding-left: 30px;
  padding-right: 30px;
  transition: padding-top 0.5s ease; /* Smooth padding adjust when header collapses */
}

/* Tier 2: Info Bar */
.header-tier-2 {
  background: #ffffff;
  border-bottom: 1px solid #eef2f7;
  height: 70px;
  display: flex;
  align-items: stretch;
  width: 100%;
}

.header-tier-2 .container-fluid {
  height: 100%;
}

.info-bar-strip {
  display: flex;
  width: 100%;
  height: 100%;
  padding: 0 48px;
  gap: 15px;
  align-items: center;
}

.info-item-left {
  flex: 0.4;
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  background: #f0fafa;
  border-radius: 8px;
  border: 1px solid #e0f2f2;
  box-shadow: 0 2px 8px rgba(0, 145, 133, 0.05);
}

.info-item-center {
  flex: 2;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-item-right {
  flex: 0.4;
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  background: #f0fafa;
  border-radius: 8px;
 
  box-shadow: 0 2px 8px rgba(0, 145, 133, 0.05);
}

.clock-time, .clock-date {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color);
  line-height: 1;
  margin: 0;
}

.hospital-info-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
}

.hospital-title-small {
  font-size: 1em;
  font-weight: 600;
  color: var(--primary-color);
  letter-spacing: 1.5px;
}

.hospital-address {
  font-size: 0.70rem;
  font-weight: 500;
  color: var(--secondary-color);
  opacity: 0.8;
  letter-spacing: 0.5px;
}

/* Tier 3: Stats Buttons */
.header-tier-3 {
  background: #ffffff;
  border-bottom: 1px solid #eef2f7;
  height: 85px;
  display: flex;
  align-items: center;
  width: 100%;
}

/* Hide 3rd header tier on all pages except home.html */
body:not(.home-page) .header-tier-3,
body:not(.home-page) #header-placeholder + .header-tier-3 {
  display: none !important;
}

.stats-button-strip {
  display: flex;
  width: 100%;
  height: 100%;
  padding: 0 48px;
  gap: 8px;
  align-items: center;
}

.stat-btn-item {
  flex: 1;
  height: 65px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none !important;
  border-radius: 6px;
  transition: all 0.3s;
  background: #f0fafa;
  border: 1px solid #e0f2f2;
  padding: 0 8px;
  min-width: 0;
}

.stat-btn-icon {
  width: 30px;
  height: 30px;
  background: var(--primary-grad);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  box-shadow: 0 4px 10px rgba(0, 145, 133, 0.3);
  flex-shrink: 0;
}

.stat-btn-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
}

.stat-btn-item:hover {
  background: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 145, 133, 0.15);
}

.stat-btn-item:hover .stat-btn-label,
.stat-btn-item:hover .stat-btn-value,
.stat-btn-item:hover .stat-btn-icon {
  color: #ffffff !important;
}

.stat-btn-item:hover .stat-btn-icon {
  background: rgba(255, 255, 255, 0.2);
}

.stat-btn-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--secondary-color);
  text-transform: capitalize;
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  text-align: center;
}

.stat-btn-value {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-color);
  line-height: 1;
  text-align: center;
}

.clock-time, .clock-date {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color);
}

/* Stats Strip is now global across all pages */
