/* VioVoc Brand Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,500;0,8..60,600;0,8..60,700;1,8..60,400&display=swap');

/* Burgues Script Accent Font */
@font-face {
  font-family: 'Burgues Script';
  src: url('../fonts/BurguesScript-Regular.woff2') format('woff2'),
       url('../fonts/BurguesScript-Regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* VioVoc Brand Colors & Fonts */
:root {
  /* Brand Colors - Extracted from VioVoc Logo */
  --color-precision-blue: #1ca6c0;      /* Primary brand blue-teal */
  --color-spirit-teal: #66cad8;         /* Light teal accent */
  --color-miami-blue: #0891a6;          /* Deep blue for contrast */
  
  /* Extended Color Palette */
  --color-navy: #0f4c5c;                /* Dark navy for text/headers */
  --color-light-blue: #e0f2f4;          /* Light backgrounds */
  --color-white: #ffffff;
  --color-off-white: #f8fafb;
  
  /* Semantic Colors */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-info: var(--color-spirit-teal);
  
  /* Text Colors */
  --color-text-primary: #1e293b;
  --color-text-secondary: #64748b;
  --color-text-light: #94a3b8;
  
  /* Border & Background */
  --color-border: #cbd5e1;
  --color-border-light: #e2e8f0;
  --color-bg-overlay: rgba(255, 255, 255, 0.95);
  
  /* Brand Fonts */
  --font-heading: 'Montserrat', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Source Serif 4', Georgia, serif;
  --font-ui: 'Montserrat', 'Segoe UI', sans-serif;
  --font-accent: 'Burgues Script', 'Source Serif 4', cursive;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--color-text-primary);
  background: linear-gradient(135deg, var(--color-light-blue) 0%, var(--color-spirit-teal) 50%, var(--color-precision-blue) 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* Homepage Styles */
.header {
  background: #fff;
  box-shadow: 0 1px 6px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  padding: 0;
}

.nav-container {
  max-width: 100%;
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 2.5rem 0.6rem 1.5rem;
}

.logo-section {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 50px;
  width: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.logo-img:hover {
  transform: scale(1.05);
}

.logo {
  font-size: 2rem;
  font-weight: bold;
  color: var(--color-precision-blue);
  text-decoration: none;
  font-family: var(--font-heading);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* Data Controls in Content Area */
.data-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin: 1.5rem 0 2rem 0;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.data-controls .left-controls {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.data-controls .right-controls {
  display: flex;
  align-items: center;
}

/* User Selector Styles */
.user-selector {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-selector-label {
  color: var(--color-text-primary);
  font-weight: 500;
  font-size: 0.9rem;
  font-family: var(--font-ui);
}

.user-select {
  background: var(--color-white);
  border: 2px solid var(--color-border-light);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 220px;
  font-family: var(--font-ui);
}

.user-select:hover {
  border-color: var(--color-precision-blue);
}

.user-select:focus {
  outline: none;
  border-color: var(--color-precision-blue);
  box-shadow: 0 0 0 3px rgba(28, 166, 192, 0.15);
}

/* User Info Display Styles */
.user-info-display {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  min-width: 250px;
}

.user-avatar {
  flex-shrink: 0;
}

.avatar-img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-precision-blue);
  background: var(--color-off-white);
}

.user-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.user-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-text-primary);
  line-height: 1.2;
  font-family: var(--font-ui);
}

.user-group {
  font-size: 0.85rem;
  color: var(--color-precision-blue);
  font-weight: 500;
  background: rgba(28, 166, 192, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  text-align: center;
  white-space: nowrap;
  font-family: var(--font-ui);
}

.user-group.super-admin {
  color: var(--color-error);
  background: rgba(239, 68, 68, 0.1);
}

.user-group.standard-user {
  color: var(--color-success);
  background: rgba(16, 185, 129, 0.1);
}

/* User Profile Display Styles */
.user-profile-display {
  display: flex;
  align-items: center;
}

.profile-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, rgba(28, 166, 192, 0.1), rgba(255, 255, 255, 0.95));
  border-radius: 12px;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(28, 166, 192, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.profile-pic-container {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--color-spirit-teal);
  background: var(--color-off-white);
  flex-shrink: 0;
}

.profile-pic {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 120px;
}

.profile-name {
  font-weight: 600;
  color: var(--color-text-primary);
  font-size: 1rem;
  line-height: 1.2;
  font-family: var(--font-ui);
}

.profile-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  font-family: var(--font-ui);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-success);
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.status-text {
  font-weight: 500;
  color: var(--color-success);
  text-transform: capitalize;
}

.status-text.super-admin {
  color: var(--color-success);
}

.status-text.standard-user {
  color: var(--color-text-secondary);
}

/* Button Selector Styles */
.button-selector {
  display: flex;
  align-items: center;
}

.button-radio-group {
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
}

.button-radio-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(28, 166, 192, 0.2);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  white-space: nowrap;
  font-family: var(--font-ui);
}

.button-radio-item:hover {
  background: rgba(28, 166, 192, 0.1);
  border-color: rgba(28, 166, 192, 0.4);
}

.button-radio-item input[type="radio"] {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--color-precision-blue);
  flex-shrink: 0;
}

.button-radio-item input[type="radio"]:checked + .button-radio-label {
  color: var(--color-precision-blue);
  font-weight: 600;
}

.button-radio-item:has(input[type="radio"]:checked) {
  background: rgba(28, 166, 192, 0.15);
  border-color: var(--color-precision-blue);
  box-shadow: 0 0 0 2px rgba(28, 166, 192, 0.1);
}

.button-radio-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-primary);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.button-count {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  background: var(--color-light-blue);
  padding: 0.2rem 0.4rem;
  border-radius: 10px;
  font-weight: 500;
  min-width: 30px;
  text-align: center;
  flex-shrink: 0;
}

.button-radio-item:has(input[type="radio"]:checked) .button-count {
  background: var(--color-precision-blue);
  color: var(--color-white);
}

/* Button Indicator Styles */
.button-indicator {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-precision-blue);
  background: rgba(28, 166, 192, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-left: 0.5rem;
  font-family: var(--font-ui);
}

/* Selected User Display Styles */
.selected-user-display {
  background: linear-gradient(135deg, var(--color-light-blue) 0%, var(--color-off-white) 100%);
  border: 2px solid var(--color-border-light);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.selected-user-label {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  margin-right: 0.5rem;
  font-family: var(--font-ui);
}

.selected-user-name {
  color: var(--color-precision-blue);
  font-size: 1.1rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--color-precision-blue) 0%, var(--color-spirit-teal) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: var(--font-heading);
}

.nav-link {
  text-decoration: none;
  color: #034ea2;
  font-family: 'Montserrat', var(--font-ui), sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--color-precision-blue);
}

.nav-link.active {
  color: var(--color-precision-blue);
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 50%;
  background: var(--color-precision-blue);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Top Accent Bar */
.top-accent-bar {
  height: 28px;
  background: #f16669;
}

/* User Avatar Dropdown */
.user-avatar-dropdown {
  position: relative;
}
.avatar-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #1ca6c0;
  background: linear-gradient(135deg, #1ca6c0, #0891a6);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.2s;
  line-height: 1;
}
.avatar-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(28,166,192,0.3);
}
.avatar-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 260px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 1100;
  overflow: hidden;
}
.avatar-dropdown-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.avatar-dropdown-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
}
.avatar-dropdown-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1ca6c0, #0891a6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  flex-shrink: 0;
}
.avatar-dropdown-info {
  overflow: hidden;
}
.avatar-dropdown-name {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: #1a3238;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.avatar-dropdown-email {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  color: #7c93a0;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.avatar-dropdown-divider {
  height: 1px;
  background: #e5e7eb;
}
.avatar-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  transition: background 0.15s;
}
.avatar-dropdown-item:hover {
  background: #f3f4f6;
  color: #dc2626;
}
.avatar-dropdown-item svg {
  flex-shrink: 0;
}

/* Shared Footer (for authenticated pages) */
.lp-footer {
  background: #7c93a0;
  color: #fff;
  padding: 0;
}
.lp-footer-accent {
  height: 3px;
  background: linear-gradient(90deg, #1ca6c0, #66cad8);
}
.lp-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem 1.5rem;
  position: relative;
}
.lp-footer-cols {
  display: flex;
  gap: 12rem;
  justify-content: center;
  margin-bottom: 2rem;
}
.lp-footer-col h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 1rem;
}
.lp-footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.lp-footer-col li {
  margin-bottom: 0.5rem;
}
.lp-footer-col a {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  color: #fff;
  text-decoration: none;
  transition: opacity 0.2s;
}
.lp-footer-col a:hover { opacity: 0.7; }
.lp-footer-col address {
  font-style: normal;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  line-height: 1.7;
  color: #fff;
}
.lp-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.lp-footer-bottom p {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  color: #fff;
  margin: 0;
}
.lp-social-icons {
  display: flex;
  gap: 1.5rem;
}
.lp-social-icons a {
  color: #fff;
  transition: opacity 0.2s;
}
.lp-social-icons a svg {
  width: 28px;
  height: 28px;
}
.lp-social-icons a:hover { opacity: 0.7; }
.lp-back-to-top {
  position: absolute;
  top: 2rem;
  right: 2rem;
  width: 40px;
  height: 40px;
  background: #f16669;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s;
  text-decoration: none;
}
.lp-back-to-top:hover { opacity: 0.85; }
.lp-back-to-top svg {
  width: 22px;
  height: 22px;
}

/* Ask AI about VioVoc */
.lp-ask-ai {
  text-align: center;
  margin-top: 1rem;
  margin-bottom: 0.25rem;
}
.lp-ask-ai p {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  font-style: italic;
  color: rgba(255,255,255,0.7);
  margin: 0 0 0.6rem;
  letter-spacing: 0.03em;
}
.lp-ask-ai-icons {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  align-items: center;
}
.lp-ask-ai-icons a {
  color: #fff;
  opacity: 0.65;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lp-ask-ai-icons a:hover {
  opacity: 1;
}
.lp-ask-ai-icons a svg {
  width: 26px;
  height: 26px;
}

.login-btn-header {
  background: linear-gradient(135deg, var(--color-precision-blue) 0%, var(--color-miami-blue) 100%);
  color: var(--color-white);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  box-shadow: 0 4px 15px rgba(28, 166, 192, 0.3);
  font-family: var(--font-ui);
}

.login-btn-header:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(28, 166, 192, 0.4);
}

/* Dashboard Navigation Styles */
.nav-greeting {
  color: var(--color-text-primary);
  font-weight: 500;
  margin-right: 1rem;
  font-size: 0.9rem;
  font-family: var(--font-ui);
}

.logout-btn-header {
  background: linear-gradient(135deg, var(--color-error) 0%, #dc2626 100%);
  color: var(--color-white);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
  font-family: var(--font-ui);
}

.logout-btn-header:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
  color: var(--color-white);
  text-decoration: none;
}

/* Dashboard Container */
.dashboard-container {
  margin-top: 2rem !important;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: auto;
  padding: 2rem;
  padding-bottom: 4rem;
  min-height: calc(100vh - 200px);
}

/* Hero Section */
.hero {
  margin-top: 0;
  padding: 6rem 0;
  background: transparent;
  color: var(--color-white);
  min-height: 80vh;
  display: flex;
  align-items: center;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-logo-tagline {
  height: 120px;
  width: auto;
  margin-bottom: 2rem;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3));
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--color-white) 0%, var(--color-light-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
  font-family: var(--font-heading);
}

.hero-subtitle {
  font-size: 1.4rem;
  margin-bottom: 2rem;
  opacity: 0.95;
  font-weight: 300;
  text-shadow: 0 1px 5px rgba(0,0,0,0.3);
  font-family: var(--font-body);
}

.hero-buttons {
  margin-top: 2rem;
}

.btn-primary {
  background: rgba(255, 255, 255, 0.2);
  color: var(--color-white);
  padding: 1.2rem 2.5rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  backdrop-filter: blur(10px);
  font-family: var(--font-ui);
}

.btn-primary:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

.hero-image {
  text-align: center;
}

.hero-img {
  max-width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
}

/* Accent Font Decorative Classes */
.hero-tagline {
  font-family: var(--font-accent);
  font-size: 1.8rem;
  color: var(--color-white);
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  font-weight: normal;
  letter-spacing: 0.5px;
}

.decorative-heading {
  font-family: var(--font-accent);
  font-size: 2.2rem;
  color: var(--color-precision-blue);
  margin-bottom: 1rem;
  font-weight: normal;
}

.brand-quote {
  font-family: var(--font-accent);
  font-size: 1.5rem;
  color: var(--color-miami-blue);
  font-style: normal;
  margin: 2rem 0;
  padding: 1.5rem;
  border-left: 4px solid var(--color-spirit-teal);
  background: rgba(102, 202, 216, 0.1);
}


.hero-img:hover {
  transform: scale(1.02) translateY(-5px);
}

/* Sections */
.about-section,
.technology-section {
  padding: 3rem 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  scroll-margin-top: 100px; /* Account for fixed header */
}

.about-section {
  background: rgba(255, 255, 255, 0.9);
}

.technology-section {
  background: rgba(247, 250, 252, 0.9);
}

.section-title {
  font-size: 3rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, var(--color-precision-blue) 0%, var(--color-spirit-teal) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: var(--font-heading);
}

.section-subtitle {
  font-size: 1.2rem;
  text-align: center;
  color: var(--color-text-secondary);
  margin-bottom: 1.5rem;
  font-weight: 300;
  font-family: var(--font-body);
}

.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text h3 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--color-precision-blue) 0%, var(--color-spirit-teal) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
  font-family: var(--font-heading);
}

.about-text p {
  margin-bottom: 1.5rem;
  color: var(--color-navy);
  line-height: 1.8;
  font-size: 1.1rem;
  font-weight: 300;
  font-family: var(--font-body);
}

.benefits-section {
  margin: 2rem 0;
}

.benefits-section h4 {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  color: var(--color-text-primary);
  font-weight: 600;
  font-family: var(--font-heading);
}

.benefits-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.6);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(28, 166, 192, 0.1);
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
}

.benefit-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(28, 166, 192, 0.15);
  border-color: rgba(28, 166, 192, 0.2);
}

.benefit-icon {
  font-size: 2rem;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-precision-blue) 0%, var(--color-spirit-teal) 100%);
  border-radius: 12px;
  flex-shrink: 0;
}

.benefit-content h5 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text-primary);
  font-family: var(--font-heading);
}

.benefit-content p {
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 0;
  font-size: 1rem;
  font-family: var(--font-body);
}

.mission-statement {
  margin: 1.5rem 0;
  text-align: center;
}

.mission-text {
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--color-navy);
  font-weight: 400;
  font-style: italic;
  background: rgba(255, 255, 255, 0.7);
  padding: 1.5rem;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(28, 166, 192, 0.1);
  margin-bottom: 0;
  font-family: var(--font-body);
}

.about-img {
  max-width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
  transition: transform 0.3s ease;
}

.about-img:hover {
  transform: scale(1.02) translateY(-5px);
}

/* Responsive adjustments for About section */
@media (max-width: 768px) {
  .benefit-item {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .benefit-icon {
    align-self: center;
  }
}

/* Technology Section */
.technology-content {
  max-width: 1000px;
  margin: 0 auto;
  text-align: left;
}

.tech-intro {
  margin-bottom: 2rem;
  text-align: center;
}

.tech-intro p {
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--color-navy);
  font-weight: 300;
  font-family: var(--font-body);
}

.tech-process {
  margin-bottom: 2.5rem;
}

.tech-process h3 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  text-align: center;
  background: linear-gradient(135deg, var(--color-precision-blue) 0%, var(--color-spirit-teal) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
  font-family: var(--font-heading);
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.step {
  background: rgba(255, 255, 255, 0.7);
  padding: 2rem;
  border-radius: 15px;
  border: 1px solid rgba(28, 166, 192, 0.1);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.step:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(28, 166, 192, 0.2);
  border-color: rgba(28, 166, 192, 0.3);
}

.step-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.step-number {
  background: linear-gradient(135deg, var(--color-precision-blue) 0%, var(--color-spirit-teal) 100%);
  color: var(--color-white);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  font-family: var(--font-ui);
}

.step h4 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-text-primary);
  font-family: var(--font-heading);
}

.step p {
  color: var(--color-text-secondary);
  line-height: 1.6;
  font-size: 1rem;
  font-family: var(--font-body);
}

.tech-advantages {
  margin-bottom: 2rem;
}

.tech-advantages h3 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  text-align: center;
  background: linear-gradient(135deg, var(--color-precision-blue) 0%, var(--color-spirit-teal) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
  font-family: var(--font-heading);
}

.advantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.advantage {
  background: rgba(255, 255, 255, 0.8);
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  border: 2px solid transparent;
  background-clip: padding-box;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.advantage::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--color-precision-blue) 0%, var(--color-spirit-teal) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.advantage:hover::before {
  opacity: 0.1;
}

.advantage:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(28, 166, 192, 0.2);
}

.advantage h4 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--color-precision-blue) 0%, var(--color-spirit-teal) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: var(--font-heading);
}

.advantage p {
  color: var(--color-text-secondary);
  line-height: 1.6;
  font-size: 1rem;
  font-family: var(--font-body);
}

.tech-conclusion {
  text-align: center;
  margin-top: 2rem;
}

.conclusion-text {
  font-size: 1.3rem;
  line-height: 1.8;
  color: var(--color-navy);
  font-weight: 400;
  font-style: italic;
  background: rgba(255, 255, 255, 0.8);
  padding: 2rem;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(28, 166, 192, 0.1);
  font-family: var(--font-body);
}

/* Footer */
.footer {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
  color: #e2e8f0;
  padding: 4rem 0 0;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(28, 166, 192, 0.05) 0%, rgba(102, 202, 216, 0.05) 100%);
  z-index: 1;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 2;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
  justify-items: start;
}

.footer-section h4,
.footer-heading {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-precision-blue) 0%, var(--color-spirit-teal) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: var(--font-heading);
}

.footer-logo-img {
  height: 60px;
  width: auto;
  object-fit: contain;
  margin-bottom: 1rem;
  filter: brightness(1.1);
}

.footer-description {
  color: #a0aec0;
  line-height: 1.7;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(28, 166, 192, 0.1);
  border-radius: 8px;
  color: #a0aec0;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(28, 166, 192, 0.2);
}

.social-link:hover {
  background: linear-gradient(135deg, var(--color-precision-blue) 0%, var(--color-spirit-teal) 100%);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(28, 166, 192, 0.3);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-link {
  color: #a0aec0;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  position: relative;
}

.footer-link:hover {
  color: #ffffff;
  padding-left: 5px;
}

.footer-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -2px;
  left: 0;
  background: linear-gradient(135deg, var(--color-precision-blue) 0%, var(--color-spirit-teal) 100%);
  transition: width 0.3s ease;
}

.footer-link:hover::after {
  width: 100%;
}

/* Newsletter Section */
.footer-newsletter {
  background: rgba(255, 255, 255, 0.05);
  padding: 2.5rem;
  border-radius: 16px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 3rem;
  text-align: center;
}

.newsletter-heading {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-precision-blue) 0%, var(--color-spirit-teal) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: var(--font-heading);
}

.newsletter-description {
  color: #a0aec0;
  margin-bottom: 2rem;
  line-height: 1.6;
  font-size: 0.95rem;
}

.newsletter-form {
  display: flex;
  gap: 1rem;
  max-width: 400px;
  margin: 0 auto 1rem;
}

.newsletter-input {
  flex: 1;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 0.9rem;
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
}

.newsletter-input::placeholder {
  color: #a0aec0;
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--color-precision-blue);
  box-shadow: 0 0 0 3px rgba(28, 166, 192, 0.2);
  background: rgba(255, 255, 255, 0.15);
}

.newsletter-btn {
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--color-precision-blue) 0%, var(--color-spirit-teal) 100%);
  color: var(--color-white);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  white-space: nowrap;
  font-family: var(--font-ui);
}

.newsletter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(28, 166, 192, 0.4);
}

.newsletter-disclaimer {
  color: #718096;
  font-size: 0.8rem;
  margin-top: 1rem;
}

/* Footer Bottom */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem 0;
}

.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.copyright {
  color: #a0aec0;
  font-size: 0.9rem;
  font-weight: 400;
  margin: 0;
}

.footer-bottom-links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.bottom-link {
  color: #a0aec0;
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.3s ease;
}

.bottom-link:hover {
  color: #ffffff;
}

/* Responsive Footer */
@media (max-width: 968px) {
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  
  .footer-section:first-child {
    grid-column: 1 / -1;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  .newsletter-form {
    flex-direction: column;
    max-width: 300px;
  }
  
  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
  
  .footer-bottom-links {
    justify-content: center;
  }
}

/* Login Modal */
.login-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.6);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
}

.login-modal.active {
  display: flex;
}

/* Inline Login Panel */
.login-panel {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: 0 25px 80px rgba(0,0,0,0.3);
  max-width: 420px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-panel-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-panel-logo {
  height: 45px;
  margin-bottom: 1rem;
}

.login-panel-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--color-precision-blue) 0%, var(--color-spirit-teal) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

.login-form-group {
  margin-bottom: 1.25rem;
}

.login-form-group label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-primary);
  margin-bottom: 0.4rem;
}

.login-input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: var(--color-text-primary);
  background: var(--color-white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.login-input::placeholder {
  color: var(--color-text-light);
}

.login-input:focus {
  outline: none;
  border-color: var(--color-precision-blue);
  box-shadow: 0 0 0 3px rgba(28, 166, 192, 0.15);
}

.login-input.input-error {
  border-color: var(--color-error);
}

.login-input.input-error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.password-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-secondary);
  padding: 0.25rem;
  font-size: 0.85rem;
  font-family: var(--font-ui);
}

.password-toggle:hover {
  color: var(--color-precision-blue);
}

.login-error-message {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.login-error-message.visible {
  display: flex;
}

.login-error-message p {
  color: #991b1b;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.4;
}

.login-error-icon {
  flex-shrink: 0;
  color: var(--color-error);
  font-size: 1.1rem;
}

.login-submit-btn {
  width: 100%;
  padding: 0.9rem;
  border: none;
  border-radius: 25px;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-white);
  background: linear-gradient(135deg, var(--color-precision-blue) 0%, var(--color-spirit-teal) 100%);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(28, 166, 192, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.login-submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(28, 166, 192, 0.4);
}

.login-submit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.login-submit-btn .spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.login-cancel-btn {
  width: 100%;
  padding: 0.7rem;
  border: 1.5px solid var(--color-border);
  border-radius: 25px;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0.75rem;
}

.login-cancel-btn:hover {
  border-color: var(--color-text-secondary);
  color: var(--color-text-primary);
}

.login-panel-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border-light);
}

/* New Password Info */
.new-password-info {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin: 0 0 1.25rem 0;
  padding: 0.75rem 1rem;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-radius: 10px;
}

/* MFA (TOTP) Styles */
.mfa-info-text {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  line-height: 1.4;
  margin: 0 0 0.75rem 0;
  padding: 0.5rem 0.75rem;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-radius: 8px;
}

.mfa-qr-container {
  display: flex;
  justify-content: center;
  margin: 0 0 0.6rem 0;
  padding: 0.6rem;
  background: #ffffff;
  border: 1px solid var(--color-border-light);
  border-radius: 10px;
}

.mfa-qr-container svg {
  display: block;
}

.mfa-secret-fallback {
  margin: 0 0 0.75rem 0;
  text-align: center;
}

.mfa-secret-fallback p {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--color-text-light);
  margin: 0 0 0.3rem 0;
}

.mfa-secret-display {
  display: inline-block;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--color-miami-blue);
  background: #f1f5f9;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--color-border-light);
  user-select: all;
  cursor: text;
}

.mfa-code-input {
  text-align: center;
  font-size: 1.3rem !important;
  letter-spacing: 0.3em;
  font-weight: 600;
  font-family: 'Courier New', Courier, monospace;
  padding: 0.5rem 0.75rem !important;
}

/* Password Requirements */
.password-requirements {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-top: 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  line-height: 1.5;
}

.password-requirements .met {
  color: #059669;
}

.password-requirements .unmet {
  color: #94a3b8;
}

.login-panel-footer p {
  color: var(--color-text-light);
  font-size: 0.8rem;
  font-family: var(--font-ui);
  margin: 0;
}

@media (max-width: 480px) {
  .login-panel {
    padding: 1.75rem;
    border-radius: 16px;
    width: 95%;
  }
  .login-panel-title {
    font-size: 1.3rem;
  }
}

.modal-content {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 3rem;
  border-radius: 20px;
  box-shadow: 0 25px 80px rgba(0,0,0,0.3);
  max-width: 450px;
  width: 90%;
  position: relative;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.close-modal {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text-secondary);
  background: none;
  border: none;
  transition: color 0.3s ease;
}

.close-modal:hover {
  color: var(--color-text-primary);
}

.modal-content h2 {
  margin-bottom: 2rem;
  background: linear-gradient(135deg, var(--color-precision-blue) 0%, var(--color-spirit-teal) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
  font-family: var(--font-heading);
}

.login-btn {
  background: linear-gradient(135deg, var(--color-precision-blue) 0%, var(--color-spirit-teal) 100%);
  color: var(--color-white);
  padding: 1.2rem 2.5rem;
  border: none;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  width: 100%;
  margin: 1rem 0;
  box-shadow: 0 8px 25px rgba(28, 166, 192, 0.3);
  font-family: var(--font-ui);
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(28, 166, 192, 0.4);
}

.login-subtitle {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  margin-top: 0.5rem;
  font-weight: 300;
  font-family: var(--font-body);
}

.loading-spinner {
  font-size: 2rem;
  margin: 1rem 0;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.error-message {
  color: #e53e3e;
  margin: 1rem 0;
  font-weight: 500;
}

.retry-btn {
  background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.retry-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(229, 62, 62, 0.3);
}

/* Iframe Login Styles */
.iframe-container {
  width: 100%;
  height: 500px;
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  margin: 1rem 0;
  background: #f8f9fa;
}

.iframe-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 15px;
}

.iframe-subtitle {
  color: #666;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  font-weight: 300;
}

/* Adjust modal content for iframe */
#iframeSection .modal-content {
  max-width: 600px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 1rem;
    padding: 0 1rem;
  }
  
  .nav-menu {
    flex-direction: column;
    gap: 1rem;
  }
  
  .data-controls {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
    margin: 1rem 0 1.5rem 0;
    padding: 1rem;
  }
  
  .data-controls .left-controls,
  .data-controls .right-controls {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }
  
  .user-selector {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
  }
  
  .user-profile-display {
    order: -1; /* Show profile at the top on mobile */
  }
  
  .profile-info {
    padding: 1rem;
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
  
  .button-selector {
    align-items: center;
  }
  
  .button-radio-group {
    gap: 0.75rem;
    justify-content: center;
  }
  
  .button-radio-item {
    padding: 0.4rem 0.6rem;
  }
  
  .button-radio-label {
    font-size: 0.85rem;
  }
  
  .button-count {
    font-size: 0.75rem;
    padding: 0.15rem 0.35rem;
    min-width: 25px;
  }
  
  .user-select {
    min-width: 200px;
    text-align: center;
  }
  
  .button-selector {
    flex-direction: column;
    gap: 0.3rem;
    align-items: center;
  }
  
  .button-select {
    min-width: 120px;
    text-align: center;
  }
  
  .selected-user-display {
    margin: 1.5rem 0;
    padding: 1rem 1rem;
  }
  
  .selected-user-label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
  }
  
  .selected-user-name {
    font-size: 1rem;
  }
  
  .dashboard-container {
    margin-top: 1.5rem !important;
    padding: 1rem;
  }
  
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
  }
  
  .about-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .section-title {
    font-size: 2.2rem;
  }
  
  .modal-content {
    padding: 2rem;
    margin: 1rem;
  }
}

/* Dashboard Styles (existing) */
.dashboard-body {
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, #e1d4fd, #c3e9f2, #ffe5ce);
  text-align: center;
  padding: 2rem;
}

.container {
  max-width: 1400px;
  margin: auto;
  padding: 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Dashboard Header Styles */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
}

.logo-container {
  display: flex;
  align-items: center;
}

.dashboard-logo {
  max-height: 80px;
  width: auto;
  object-fit: contain;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dashboard-header h1 {
  margin: 0;
  color: var(--color-navy);
  font-size: 2rem;
  font-family: var(--font-heading);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-right #greeting {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  font-family: var(--font-ui);
}

/* Logout Button Styles */
.logout-btn {
  background: #dc3545;
  color: white !important;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.logout-btn:hover {
  background: #c82333;
  text-decoration: none;
}

/* Loading Indicator Styles */
.loading-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem;
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  font-family: var(--font-ui);
}

.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border-light);
  border-top: 2px solid var(--color-navy);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .dashboard-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .dashboard-logo {
    max-height: 64px;
  }
  
  .header-right {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .container {
    padding: 1rem;
    margin: 1rem;
  }
}

.login-btn {
  background: var(--color-navy);
  color: var(--color-white);
  padding: 1rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  font-family: var(--font-ui);
}

.login-subtitle {
  font-size: 0.9em;
  color: var(--color-text-secondary);
  margin-top: 10px;
  font-family: var(--font-body);
}

.error-message {
  color: var(--color-error);
  margin-bottom: 15px;
  font-family: var(--font-ui);
}

.retry-btn {
  background-color: var(--color-error);
  color: var(--color-white);
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-family: var(--font-ui);
}

.retry-btn:hover {
  background-color: #dc2626;
}

/* IoT Data Section Styling */
#iotSection {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

#iotSection h2 {
  color: #495057;
  margin-bottom: 1rem;
}

#loadDataBtn {
  background: #007bff;
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  margin-bottom: 1rem;
}

#loadDataBtn:hover {
  background: #0056b3;
}

#loadingStatus {
  color: #6c757d;
  font-style: italic;
  margin: 1rem 0;
}

#summaryReport {
  margin-top: 1.5rem;
  padding-top: 1rem;
}

#summaryReport h3 {
  color: var(--color-text-primary);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-align: center;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--color-precision-blue) 0%, var(--color-spirit-teal) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: var(--font-heading);
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.intelligence-caption {
  color: #6c757d;
  font-style: italic;
  margin-bottom: 1rem;
  margin-top: 0;
  font-size: 1.1rem;
  text-align: center;
  font-weight: 400;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* VOC Intelligence Meter Styles */
.meter-panel {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border: 1px solid #e9ecef;
  margin-bottom: 2rem;
}

.meter-wrapper {
  position: relative;
  min-height: 400px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  gap: 5rem;
}

.meter-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
}

.meter-gauge {
  width: 100%;
  max-width: 450px;
  height: auto;
  margin-bottom: -1rem;
}

.meter-svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}

.baseline-label {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  fill: #7B9A7B;
}

.meter-needle {
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.meter-display {
  text-align: center;
  margin-bottom: 2rem;
}

.meter-value {
  font-size: 4rem;
  font-weight: 700;
  color: #2c3e50;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.meter-caption {
  font-size: 1rem;
  color: #6c757d;
  margin-bottom: 0.25rem;
}

.meter-date {
  font-size: 0.9rem;
  color: #adb5bd;
  font-weight: 500;
}

.meter-insight {
  max-width: 450px;
  text-align: left;
  padding: 1.5rem;
  background: rgba(52, 152, 219, 0.1);
  border-radius: 12px;
  border-left: 4px solid #3498db;
  flex: 0 0 auto;
  align-self: center;
  margin-left: 0.5rem;
}

.meter-insight p {
  margin: 0;
  color: #2c3e50;
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 400;
}

.meter-info {
  color: #6c757d;
  cursor: help;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s ease;
}

.meter-info:hover {
  color: #495057;
}

/* Loading State */
.meter-loading {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 3rem;
  width: 100%;
}

.meter-loading .meter-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
}

.skeleton-dial {
  width: 300px;
  height: 180px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 150px 150px 0 0;
}

.skeleton-shimmer {
  width: 200px;
  height: 24px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Error State */
.meter-error {
  text-align: center;
  padding: 2rem;
  color: #6c757d;
}

.meter-error p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.error-link {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
}

.error-link:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  .meter-wrapper {
    flex-direction: column;
    gap: 2rem;
    padding: 1.5rem 1rem;
  }
  
  .meter-left {
    width: 100%;
  }
  
  .meter-value {
    font-size: 2.5rem;
  }
  
  .meter-gauge {
    max-width: 250px;
  }
  
  .meter-insight {
    max-width: 100%;
    text-align: center;
  }
}

/* ─── My VioVoc V-Meter (image-based gauge) ─── */
.myviovoc-meter-section {
  display: flex;
  justify-content: center;
  margin: 2rem 0 1rem;
}

.myviovoc-meter-wrapper {
  text-align: center;
  max-width: 480px;
  width: 100%;
}

.myviovoc-gauge-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1834 / 1232;
}

.myviovoc-gauge-bg {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.myviovoc-needle-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.myviovoc-needle {
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.myviovoc-meter-display {
  margin-top: 0.5rem;
}

.myviovoc-meter-summary {
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: #6b7280;
  line-height: 1.4;
}

.myviovoc-meter-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #1a3238;
  margin-top: 0.25rem;
}

.myviovoc-meter-date {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-top: 0.25rem;
}

@media (max-width: 768px) {
  .myviovoc-meter-wrapper {
    max-width: 340px;
  }
  .myviovoc-meter-summary {
    font-size: 0.9rem;
  }
}

/* ── V-Factor & Weight Recommendation Section ── */
.recommendation-section {
  margin: 2.5rem 0 1.5rem;
}

.recommendation-panel {
  background: #fff;
  border: 1px solid #e5e5e7;
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  width: 100%;
}

.recommendation-weight-line {
  font-size: 0.95rem;
  color: #444;
  margin-bottom: 0.75rem;
}

.recommendation-classification {
  font-size: 1rem;
  color: #333;
  margin-bottom: 0.75rem;
}

.rec-badge {
  display: inline-block;
  padding: 0.2em 0.65em;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
}

.rec-badge-low {
  background: #fce4e4;
  color: #c0392b;
}

.rec-badge-ok {
  background: #e0f5f3;
  color: #0e7c6b;
}

.rec-badge-high {
  background: #fff3e0;
  color: #b35c00;
}

.rec-badge-neutral {
  background: #f0f0f0;
  color: #888;
}

.recommendation-text {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid #eee;
}

.rec-heading {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: #1ca6c0;
  margin-bottom: 0.4rem;
}

.rec-detail {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.rec-stars {
  font-weight: 600;
  font-size: 0.9rem;
  color: #0891a6;
}

.recommendation-messages {
  margin-top: 0.75rem;
}

.rec-msg {
  font-size: 0.85rem;
  padding: 0.45rem 0.75rem;
  border-radius: 5px;
  margin-bottom: 0.35rem;
}

.rec-msg-error {
  background: #fef0ef;
  color: #c0392b;
  border-left: 3px solid #e74c3c;
}

.rec-msg-info {
  background: #edf8ff;
  color: #2471a3;
  border-left: 3px solid #3498db;
}

/* ── V-Foods Recommendation List ── */
.vfood-rec-section {
  margin: 1.5rem 0;
}

.vfood-rec-panel {
  background: #fff;
  border: 1px solid #e5e5e7;
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  width: 100%;
}

.vfood-rec-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: #1ca6c0;
  margin: 0 0 0.25rem;
}

.vfood-rec-subtitle {
  font-size: 0.85rem;
  color: #888;
  margin: 0 0 1rem;
}

.vfood-rec-list {
  border-radius: 10px;
  overflow: hidden;
}

.vfood-rec-row-even .vfood-rec-summary {
  background: #f8fcfd;
}

.vfood-rec-row-odd .vfood-rec-summary {
  background: #eef7f9;
}

.vfood-rec-summary {
  display: flex;
  align-items: center;
  padding: 0.6rem 0.75rem;
  cursor: pointer;
  transition: background 0.15s;
  gap: 0.75rem;
  border-bottom: 1px solid #e9eff1;
}

.vfood-rec-summary:hover {
  background: #dff0f4 !important;
}

.vfood-rec-img-wrap {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #f0f5f6;
}

.vfood-rec-img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  display: block;
}

.vfood-rec-img-placeholder {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: #f0f5f6;
}

.vfood-rec-name {
  flex: 1;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 0.92rem;
  color: #333;
}

.vfood-rec-stars {
  font-size: 0.85rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.vfood-rec-arrow {
  flex-shrink: 0;
  width: 20px;
  text-align: center;
  font-size: 0.7rem;
  color: #0891a6;
  transition: transform 0.25s;
}

.vfood-rec-arrow.open {
  transform: rotate(180deg);
}

.vfood-rec-arrow-spacer {
  width: 20px;
  flex-shrink: 0;
}

.vfood-rec-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.25s ease;
  padding: 0 1rem;
  background: #fff;
  border-bottom: 1px solid #e9eff1;
}

.vfood-rec-detail.open {
  max-height: 500px;
  padding: 0.75rem 1rem;
}

.vfood-rec-desc,
.vfood-rec-culinary {
  font-size: 0.85rem;
  color: #555;
  line-height: 1.55;
  margin-bottom: 0.4rem;
}

.vfood-rec-desc strong,
.vfood-rec-culinary strong {
  color: #0891a6;
}

@media (max-width: 768px) {
  .vfood-rec-panel {
    padding: 1rem;
  }
  .vfood-rec-summary {
    gap: 0.5rem;
    padding: 0.5rem;
  }
  .vfood-rec-img-wrap,
  .vfood-rec-img,
  .vfood-rec-img-placeholder {
    width: 40px;
    height: 40px;
  }
  .vfood-rec-name {
    font-size: 0.85rem;
  }
}

@media (max-width: 768px) {
  .recommendation-section {
    padding: 0 0.5rem;
  }
  .recommendation-panel {
    padding: 1rem;
  }
}

.report-controls {
  margin-bottom: 1rem;
  text-align: right;
}

.download-btn {
  background: #28a745;
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.download-btn:hover {
  background: #218838;
}

.download-btn:active {
  transform: translateY(1px);
}

.download-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
  opacity: 0.5;
}

.download-btn:disabled:hover {
  background: #6c757d;
  transform: none;
}

/* Charts Container - Side by Side Layout */
.charts-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 2rem 0;
}

.chart-panel {
  background: white;
  border-radius: 16px;
  border: 1px solid #e5e5e7;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* Full Width Chart Container */
.full-width-chart {
  margin: 2rem 0;
}

.full-width-chart .chart-panel {
  width: 100%;
}

/* Withings Weight Progression Styles */
.withings-state-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  background: white;
  border-radius: 16px;
  border: 1px solid #e5e5e7;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 32px 20px;
}

.withings-message {
  text-align: center;
  max-width: 420px;
}

.withings-message p {
  font-size: 15px;
  color: #515154;
  line-height: 1.5;
  margin: 12px 0 16px;
}

.withings-icon {
  font-size: 36px;
  color: #86868b;
}

.withings-logo-small {
  height: 28px;
  opacity: 0.8;
}

.withings-connect-btn {
  background: linear-gradient(135deg, #1ca6c0 0%, #66cad8 100%);
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Montserrat', sans-serif;
}

.withings-connect-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(28, 166, 192, 0.3);
}

.withings-disconnect-btn {
  background: transparent;
  border: 1px solid #e5e5e7;
  color: #86868b;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.withings-disconnect-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}

.withings-retry-btn {
  background: #e5e5e7;
  border: none;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #515154;
  cursor: pointer;
  transition: all 0.2s ease;
}

.withings-retry-btn:hover {
  background: #d1d1d6;
}

.withings-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e5e5e7;
  border-top-color: #1ca6c0;
  border-radius: 50%;
  animation: withingsSpin 0.8s linear infinite;
  margin: 0 auto 12px;
}

@keyframes withingsSpin {
  to { transform: rotate(360deg); }
}

.weight-change {
  font-size: 14px;
  font-weight: 600;
  margin-top: 4px;
}

.weight-change.positive {
  color: #dc2626;
}

.weight-change.negative {
  color: #16a34a;
}

.weight-change.neutral {
  color: #86868b;
}

/* Chart Container Styles - iOS Style */
.chart-container {
  margin: 2rem 0;
  padding: 0;
  background: white;
  border-radius: 16px;
  border: 1px solid #e5e5e7;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 8px 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #e5e5e7;
}

.chart-header h4 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: #1d1d1f;
}

.time-period-selector {
  display: flex;
  background: #e5e5e7;
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.period-btn {
  background: transparent;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #86868b;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 32px;
}

.period-btn.active {
  background: white;
  color: #1d1d1f;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.period-btn:hover:not(.active) {
  color: #515154;
}

/* Date Selector Styles */
.date-selector {
  display: flex;
  align-items: center;
  gap: 6px;
}

.date-nav-btn {
  background: #e5e5e7;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #1d1d1f;
}

.date-nav-btn:hover:not(:disabled) {
  background: #007AFF;
  color: white;
}

.date-nav-btn:hover:not(:disabled) svg {
  stroke: white;
}

.date-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.date-nav-btn svg {
  transition: stroke 0.2s ease;
}

.date-input {
  background: #e5e5e7;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #1d1d1f;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 140px;
}

.date-input:focus {
  outline: none;
  background: #d1d1d6;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.3);
}

.date-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: opacity(0.6);
}

.date-input:hover {
  background: #d1d1d6;
}

/* Date Range Selector Styles */
.date-range-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
}

.date-range-input {
  background: #e5e5e7;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #1d1d1f;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 130px;
}

.date-range-input:focus {
  outline: none;
  background: #d1d1d6;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.3);
}

.date-range-input:hover {
  background: #d1d1d6;
}

.date-range-separator {
  color: #86868b;
  font-weight: 500;
  font-size: 14px;
}

/* Comparison Controls Styles */
.comparison-controls {
  display: flex;
  gap: 8px;
}

.control-btn {
  background: #e5e5e7;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #1d1d1f;
  cursor: pointer;
  transition: all 0.2s ease;
}

.control-btn:hover {
  background: #d1d1d6;
}

.control-btn:active {
  background: #007AFF;
  color: white;
}

/* Date Selection Panel */
.date-selection-panel {
  margin-top: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e5e5e7;
}

.date-list {
  max-height: 200px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

.date-option {
  display: flex;
  align-items: center;
  padding: 8px;
  background: white;
  border-radius: 6px;
  border: 1px solid #e5e5e7;
  cursor: pointer;
  transition: all 0.2s ease;
}

.date-option:hover {
  background: #f0f0f0;
  border-color: #007AFF;
}

.date-option.selected {
  background: #007AFF;
  color: white;
  border-color: #007AFF;
}

.date-option input[type="checkbox"] {
  margin-right: 8px;
  accent-color: #007AFF;
}

.date-option label {
  flex: 1;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}

.chart-summary {
  padding: 20px;
  text-align: left;
}

.average-value {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 4px;
}

.average-value .value {
  font-size: 48px;
  font-weight: 300;
  color: #1d1d1f;
  line-height: 1;
}

.average-value .unit {
  font-size: 20px;
  font-weight: 400;
  color: #86868b;
}

.date-range {
  font-size: 15px;
  color: #86868b;
  font-weight: 400;
}

.chart-wrapper {
  height: 200px;
  padding: 0 20px;
  position: relative;
}

#aocTrendChart {
  width: 100% !important;
  height: 100% !important;
}

.weight-chart-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 6px 20px 0;
  font-size: 11px;
  color: #86868b;
}

.weight-chart-legend .legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.weight-chart-legend .legend-swatch {
  display: inline-block;
  flex-shrink: 0;
}

.trend-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #f8f9fa;
  border-top: 1px solid #e5e5e7;
}

.trend-label {
  font-size: 15px;
  color: #86868b;
  font-weight: 400;
}

.trend-value {
  font-size: 15px;
  font-weight: 600;
  color: #1d1d1f;
}

.trend-value.trending-up {
  color: #34c759;
}

.trend-value.trending-down {
  color: #ff3b30;
}

.chart-summary .summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.chart-summary .summary-item .label {
  font-size: 14px;
  color: #86868b;
  font-weight: 400;
}

.chart-summary .summary-item .value {
  font-size: 16px;
  font-weight: 600;
  color: #1d1d1f;
}

@media (max-width: 768px) {
  .charts-container {
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 1rem 0;
  }
  
  .chart-container {
    margin: 1rem 0;
  }
  
  .chart-header {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  
  .time-period-selector {
    justify-content: center;
  }
  
  .period-btn {
    flex: 1;
  }
  
  .average-value .value {
    font-size: 36px;
  }
  
  .chart-wrapper {
    height: 160px;
  }
}

#summaryTable {
  width: 100%;
  border-collapse: collapse;
  margin: 0 auto;
  background: white;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#summaryTable td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e9ecef;
  text-align: left;
}

#summaryTable td:first-child {
  background: #f8f9fa;
  font-weight: bold;
  width: 40%;
}

#summaryTable td:last-child {
  color: #007bff;
  font-weight: bold;
}

#summaryTable tr:last-child td {
  border-bottom: none;
}

#errorDisplay {
  background: #f8d7da;
  color: #721c24;
  padding: 0.75rem;
  border-radius: 6px;
  border: 1px solid #f5c6cb;
  margin-top: 1rem;
}

/* Daily Results Table Styling */
.table-container {
  margin-top: 1rem;
  overflow-x: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.daily-results-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  font-size: 0.9rem;
}

.daily-results-table thead {
  background: #007bff;
  color: white;
}

.daily-results-table th {
  padding: 1rem 0.75rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #0056b3;
  position: sticky;
  top: 0;
  background: #007bff;
}

.daily-results-table th:first-child {
  border-top-left-radius: 8px;
}

.daily-results-table th:last-child {
  border-top-right-radius: 8px;
}

.daily-results-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

.daily-results-table tbody tr:nth-child(even) {
  background-color: #f8f9fa;
}

.daily-results-table tbody tr:hover {
  background-color: #e3f2fd !important;
  cursor: pointer;
}

.daily-results-table tbody tr:last-child {
  border-bottom: none;
}

.daily-results-table td {
  padding: 0.75rem;
  vertical-align: middle;
}

.date-cell {
  font-weight: 600;
  color: #495057;
  white-space: nowrap;
}

.time-cell {
  color: #6c757d;
  font-size: 0.85rem;
  white-space: nowrap;
}

.data-cell {
  text-align: right;
  font-family: 'Courier New', monospace;
  color: #495057;
}

.percent-cell {
  font-weight: 600;
  color: #dc3545;
}

.total-aoc-cell {
  font-weight: bold;
  color: #28a745;
  background-color: #f8fff9;
}

.error-row {
  background-color: #f8d7da;
}

.error-cell {
  color: #721c24;
  font-style: italic;
  text-align: center;
}

/* Table legend styling */
.table-legend {
  margin: 0.5rem 0;
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  border-left: 4px solid #007bff;
  border-radius: 4px;
  font-size: 0.9rem;
}

.table-legend p {
  margin: 0;
  color: #495057;
}

/* Negative value styling */
.negative-value {
  color: #dc2626;
  font-weight: 500;
}

/* V-Factor cell styling */
.v-factor-cell {
  color: #0066cc;
  font-weight: 600;
  background-color: #f0f8ff;
}

.results-summary {
  margin-top: 1rem;
  padding: 1rem;
  background: #e9ecef;
  border-radius: 6px;
  text-align: center;
  color: #495057;
}

/* Responsive table design */
@media (max-width: 768px) {
  .table-container {
    font-size: 0.8rem;
  }
  
  .daily-results-table th,
  .daily-results-table td {
    padding: 0.5rem 0.4rem;
  }
  
  .daily-results-table th {
    font-size: 0.75rem;
  }
  
  /* Stack table headers for mobile */
  .daily-results-table {
    font-size: 0.75rem;
  }
}

@media (max-width: 600px) {
  .table-container {
    margin: 0 -1rem;
    border-radius: 0;
  }
  
  .daily-results-table th,
  .daily-results-table td {
    padding: 0.4rem 0.3rem;
  }
}

/* Responsive design for IoT section */
@media (max-width: 768px) {
  .container {
    max-width: 100%;
    padding: 1rem;
    margin: 0.5rem;
  }
  
  #iotSection {
    padding: 1rem;
  }
  
  #loadDataBtn {
    width: 100%;
    padding: 1rem;
  }
}

/* Chart Controls */
/* Chart Controls (for date pickers and action buttons) */
.chart-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.fullscreen-btn {
  background: #e5e5e7;
  border: none;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1d1d1f;
}

.fullscreen-btn:hover {
  background: #d1d1d6;
}

.fullscreen-btn:active {
  background: #007AFF;
  color: white;
}

/* Fullscreen Modal */
.fullscreen-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.modal-content {
  background: white;
  border-radius: 16px;
  width: 95%;
  height: 90%;
  max-width: 1400px;
  max-height: 900px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e5e7;
  background: #f8f9fa;
  gap: 16px;
}

.modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #1d1d1f;
  flex-shrink: 0;
}

.modal-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  justify-content: center;
}

.modal-summary {
  padding: 16px 24px;
  background: #f8f9fa;
  border-bottom: 1px solid #e5e5e7;
  display: flex;
  gap: 24px;
  align-items: center;
}

.modal-summary .summary-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.modal-summary .label {
  font-size: 12px;
  color: #86868b;
  font-weight: 500;
}

.modal-summary .value {
  font-size: 16px;
  font-weight: 600;
  color: #1d1d1f;
}

.close-btn {
  background: none;
  border: none;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #86868b;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  background: #e5e5e7;
  color: #1d1d1f;
}

.modal-body {
  flex: 1;
  padding: 24px;
  position: relative;
  min-height: 0;
}

.modal-body canvas {
  width: 100% !important;
  height: 100% !important;
}

/* Modal specific date selection styles */
.modal-controls .date-selection-panel {
  margin-top: 12px;
  background: rgba(248, 249, 250, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(229, 229, 231, 0.8);
}

.modal-controls .date-list {
  max-height: 150px;
  font-size: 14px;
}

.modal-controls .date-option {
  padding: 6px 8px;
  font-size: 13px;
}

/* Animation */
.fullscreen-modal {
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Mobile responsiveness for modal */
@media (max-width: 768px) {
  .modal-content {
    width: 98%;
    height: 95%;
    border-radius: 12px;
  }
  
  .modal-header {
    padding: 16px 20px;
  }
  
  .modal-body {
    padding: 16px;
  }
  
  .chart-controls {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }
  
  .comparison-controls {
    width: 100%;
    justify-content: center;
  }
  
  .date-range-selector {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }
  
  .date-range-input {
    min-width: 110px;
    font-size: 12px;
    padding: 6px 10px;
  }
}

/* No Data Found Styles */
.no-data-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  margin: 2rem auto;
  max-width: 600px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.no-data-content {
  text-align: center;
  padding: 3rem;
}

.no-data-icon {
  margin-bottom: 2rem;
  opacity: 0.7;
  display: flex;
  justify-content: center;
}

.no-data-icon svg {
  width: 80px;
  height: 80px;
  color: #6b7280;
}

.no-data-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 1rem;
}

.no-data-message {
  font-size: 1rem;
  color: #6b7280;
  line-height: 1.6;
  max-width: 400px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .no-data-container {
    margin: 1rem;
    min-height: 300px;
  }
  
  .no-data-content {
    padding: 2rem 1.5rem;
  }
  
  .no-data-icon svg {
    width: 60px;
    height: 60px;
  }
  
  .no-data-title {
    font-size: 1.5rem;
  }
  
  .no-data-message {
    font-size: 0.9rem;
  }
}

/* V-Factor Metadata Accordion Styles */
.vfactor-event-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.vfactor-event-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.vfactor-event-card.featured {
  border: 2px solid #1ca6c0;
  background: linear-gradient(to right, #e6f7f9, #ffffff);
}

.vfactor-event-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  cursor: pointer;
  user-select: none;
  background: #fafafa;
  transition: background 0.2s;
}

.vfactor-event-card.featured .vfactor-event-header {
  background: #e6f7f9;
}

.vfactor-event-header:hover {
  background: #f5f5f5;
}

.vfactor-event-card.featured .vfactor-event-header:hover {
  background: #d1f2f6;
}

.vfactor-event-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  flex-wrap: wrap;
}

.vfactor-event-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  margin-bottom: 0.25rem;
}

.vfactor-event-badge.featured {
  background: #d1f2f6;
  color: #0891a6;
  border: 1px solid #66cad8;
}

.vfactor-event-badge.regular {
  background: #e0f2f7;
  color: #0891a6;
  border: 1px solid #a8dbe2;
}

.vfactor-event-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.vfactor-event-info strong {
  font-size: 0.95rem;
  color: #1e293b;
}

.vfactor-event-info span {
  font-size: 0.85rem;
  color: #64748b;
}

.vfactor-event-metrics {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.metric-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.35rem 0.75rem;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  min-width: 80px;
}

.metric-chip-label {
  font-size: 0.7rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
  margin-bottom: 0.125rem;
}

.metric-chip-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
}

.metric-chip-value.v-factor {
  color: #2563eb;
  font-size: 1.1rem;
}

.expand-icon {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
  color: #64748b;
}

.vfactor-event-card.expanded .expand-icon {
  transform: rotate(180deg);
}

.vfactor-event-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.vfactor-event-card.expanded .vfactor-event-content {
  max-height: 5000px;
}

.vfactor-event-details {
  padding: 1.5rem 1.25rem;
  border-top: 1px solid #e2e8f0;
}

.detail-section {
  margin-bottom: 1.5rem;
}

.detail-section:last-child {
  margin-bottom: 0;
}

.detail-section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
}

.detail-section-header svg {
  width: 18px;
  height: 18px;
  color: #2563eb;
}

.detail-section-header h5 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.metric-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.85rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  transition: background 0.2s;
}

.metric-item:hover {
  background: #f1f5f9;
}

.metric-label {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 500;
}

.metric-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1e293b;
  font-family: 'Monaco', 'Courier New', monospace;
}

.quality-flags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.quality-flag {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.quality-flag.warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.quality-flag.info {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

.confidence-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

.confidence-bar {
  flex: 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.confidence-fill {
  height: 100%;
  background: linear-gradient(to right, #ef4444, #f59e0b, #10b981);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.confidence-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e293b;
  min-width: 50px;
  text-align: right;
}

.nested-section {
  margin-left: 1rem;
  padding-left: 1rem;
  border-left: 3px solid #e2e8f0;
}

/* Metrics Comparison Table */
.comparison-table-container {
  width: 100%;
  overflow-x: auto;
  margin: 0.5rem 0;
}

.metrics-comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.metrics-comparison-table thead {
  background: linear-gradient(135deg, var(--color-precision-blue) 0%, var(--color-spirit-teal) 100%);
  color: var(--color-white);
}

.metrics-comparison-table th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.025em;
  border-bottom: 2px solid #e2e8f0;
}

.metrics-comparison-table .header-with-icon {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.metrics-comparison-table .header-with-icon svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.metrics-comparison-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.15s ease;
}

.metrics-comparison-table tbody tr:hover {
  background-color: #f8fafc;
}

.metrics-comparison-table tbody tr:last-child {
  border-bottom: none;
}

.metrics-comparison-table td {
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
}

.metrics-comparison-table .metric-name {
  font-weight: 600;
  color: #334155;
  background: #f8fafc;
}

.metrics-comparison-table .user-value {
  color: #0f766e;
  font-weight: 500;
}

.metrics-comparison-table .adaptive-value {
  color: #7c3aed;
  font-weight: 500;
}

.metrics-comparison-table .delta-value {
  font-family: 'Courier New', monospace;
  font-weight: 600;
  text-align: left;
  font-size: 0.8rem;
}

.metrics-comparison-table .delta-value:not(:contains("—")) {
  color: #dc2626;
}

.metrics-comparison-table .metric-name-col {
  width: 25%;
}

.metrics-comparison-table .user-responded-col,
.metrics-comparison-table .adaptive-col {
  width: 28%;
}

.metrics-comparison-table .delta-col {
  width: 19%;
  text-align: left;
}

@media (max-width: 768px) {
  .vfactor-event-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .vfactor-event-metrics {
    width: 100%;
    justify-content: space-between;
  }
  
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  
  .metric-chip {
    min-width: 70px;
  }
  
  .metrics-comparison-table {
    font-size: 0.75rem;
  }
  
  .metrics-comparison-table th,
  .metrics-comparison-table td {
    padding: 0.625rem 0.5rem;
  }
  
  .metrics-comparison-table .header-with-icon {
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-start;
  }
}

/* ===================================
   Organization Management Styles
   =================================== */

.org-management-section {
  min-height: 100vh;
  padding: 2rem 0;
  background: linear-gradient(135deg, var(--color-light-blue) 0%, var(--color-off-white) 100%);
}

.org-management-section .container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.org-management-section .page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--color-precision-blue);
}

.org-management-section .page-header h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-navy);
  margin: 0;
}

/* Organization Tree Container */
.org-tree-container {
  background: transparent;
  padding: 0;
}

.org-tree-container .loading,
.org-tree-container .no-data {
  text-align: center;
  padding: 3rem;
  color: var(--color-text-secondary);
  font-family: var(--font-ui);
}

/* Tree Node Styles */
.org-tree-node {
  margin-bottom: 0.25rem;
  border-left: 2px solid transparent;
  transition: all 0.2s ease;
}

.org-tree-node:hover {
  border-left-color: var(--color-precision-blue);
}

.org-tree-node.partner-node {
  border-left-color: var(--color-precision-blue);
  margin-bottom: 1.5rem;
}

.org-tree-node.group-node {
  margin-left: 2.5rem;
  border-left-color: transparent;
}

.org-tree-node.program-node {
  margin-left: 5rem;
  border-left-color: transparent;
  margin-bottom: 0.125rem;
}

/* Node Header */
.node-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: transparent;
  border-radius: 8px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.node-header:hover {
  background: rgba(28, 166, 192, 0.03);
  border-color: rgba(28, 166, 192, 0.1);
}

.partner-node .node-header {
  background: rgba(28, 166, 192, 0.04);
  border: none;
  padding-left: 1rem;
  border-radius: 6px;
}

.group-node .node-header {
  background: transparent;
  border: none;
}

.program-node .node-header {
  background: rgba(102, 202, 216, 0.04);
  border: none;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
}

.node-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  opacity: 0.7;
}

.node-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-navy);
  flex-grow: 1;
}

.partner-node .node-title {
  font-size: 1.15rem;
  font-weight: 600;
}

.group-node .node-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.program-node .node-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-light);
}

.node-code {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  background: rgba(28, 166, 192, 0.08);
  padding: 0.25rem 0.625rem;
  border-radius: 4px;
  border: none;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.node-stats {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-light);
  white-space: nowrap;
}

.group-node .node-stats {
  font-size: 0.75rem;
}

.program-node .node-stats {
  font-size: 0.7rem;
}

/* Node Actions */
.node-actions {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

.node-actions button {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--color-border-light);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  background: var(--color-white);
  color: var(--color-text-primary);
}

.group-node .node-actions button {
  font-size: 0.75rem;
  padding: 0.325rem 0.625rem;
}

.program-node .node-actions button {
  font-size: 0.75rem;
  padding: 0.325rem 0.625rem;
}

.node-actions button:hover {
  border-color: var(--color-precision-blue);
  color: var(--color-precision-blue);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.btn-edit {
  background: var(--color-white);
  color: var(--color-text-primary);
}

.btn-edit:hover {
  background: var(--color-white);
  color: var(--color-precision-blue);
  border-color: var(--color-precision-blue);
}

.btn-add {
  background: var(--color-white);
  color: var(--color-text-primary);
}

.btn-add:hover {
  background: var(--color-white);
  color: var(--color-success);
  border-color: var(--color-success);
}

.btn-delete {
  background: var(--color-white);
  color: var(--color-text-primary);
}

.btn-delete:hover {
  background: var(--color-white);
  color: var(--color-error);
  border-color: var(--color-error);
}

/* Node Children Container */
.node-children {
  margin-top: 0.5rem;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
}

.modal .modal-content {
  position: relative;
  background-color: var(--color-white);
  margin: 5% auto;
  padding: 1.25rem 1.25rem 0.5rem 1.25rem;
  border-radius: 12px;
  width: 90%;
  max-width: 450px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  animation: modalSlideIn 0.2s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal .close {
  position: absolute;
  right: 1.25rem;
  top: 1.25rem;
  color: var(--color-text-secondary);
  font-size: 1.75rem;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.15s ease;
}

.modal .close:hover {
  color: var(--color-error);
}

.modal h2,
.modal h3 {
  font-family: var(--font-heading);
  color: var(--color-navy);
  margin-bottom: 0.75rem;
}

.modal h2 {
  font-size: 1.25rem;
  font-weight: 600;
}

.modal h3 {
  font-size: 1.35rem;
  font-weight: 600;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-family: var(--font-ui);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  text-align: left;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  transition: all 0.15s ease;
  background: var(--color-white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-precision-blue);
  box-shadow: 0 0 0 3px rgba(28, 166, 192, 0.08);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.field-help {
  display: block;
  margin-top: 0.375rem;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--color-text-light);
  font-style: italic;
}

/* Modal Actions (Button Group) */
.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.btn-primary,
.btn-secondary,
.btn-danger {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 100px;
}

.btn-primary {
  background: var(--color-precision-blue);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-miami-blue);
  box-shadow: 0 2px 6px rgba(12, 145, 166, 0.25);
}

.btn-secondary {
  background: var(--color-white);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-off-white);
  border-color: var(--color-text-secondary);
}

.btn-danger {
  background: var(--color-error);
  color: var(--color-white);
}


.btn-danger:hover {
  background: #dc2626;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.25);
}

/* Notifications */
.notification {
  position: fixed;
  top: 2rem;
  right: 2rem;
  padding: 0.875rem 1.25rem;
  border-radius: 6px;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  z-index: 2000;
  animation: notificationSlideIn 0.25s ease;
}

@keyframes notificationSlideIn {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.notification-success {
  background: var(--color-success);
  color: var(--color-white);
}

.notification-error {
  background: var(--color-error);
  color: var(--color-white);
}

/* Responsive Styles for Organization Management */
@media (max-width: 1024px) {
  .org-management-section .container {
    padding: 0 1rem;
  }

  .node-header {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .node-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .modal .modal-content {
    width: 95%;
    margin: 10% auto;
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .org-management-section .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .org-management-section .page-header h1 {
    font-size: 1.5rem;
  }

  .org-tree-node.group-node {
    margin-left: 1rem;
  }

  .org-tree-node.program-node {
    margin-left: 2rem;
  }

  .node-header {
    padding: 0.75rem;
  }

  .node-title {
    font-size: 1rem;
  }

  .node-actions button {
    font-size: 0.75rem;
    padding: 0.4rem 0.75rem;
  }

  .node-stats,
  .node-code {
    font-size: 0.75rem;
  }

  .modal .modal-content {
    margin: 15% auto;
    padding: 1rem;
  }

  .modal h2 {
    font-size: 1.5rem;
  }

  .modal-actions {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary,
  .btn-danger {
    width: 100%;
  }

  .notification {
    left: 1rem;
    right: 1rem;
  }
}

/* Real-Time V-Signal Graph Styles */
.data-source-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.85em;
  font-weight: 600;
  margin-left: 10px;
  background: linear-gradient(135deg, #1ca6c0 0%, #66cad8 100%);
  color: white;
}

.data-source-badge.live {
  background: linear-gradient(135deg, #28a745 0%, #5cb85c 100%);
  animation: pulse-live 2s ease-in-out infinite;
}

.data-source-badge.historical {
  background: linear-gradient(135deg, #1ca6c0 0%, #66cad8 100%);
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.chart-info {
  margin: 1rem 1.5rem;
  padding: 15px;
  background: #f8f9fa;
  border-left: 4px solid #1ca6c0;
  font-size: 0.9em;
  color: #333;
}

.chart-info p {
  margin: 0.5rem 0;
}

.chart-info strong {
  color: #1ca6c0;
  font-weight: 600;
}
