/* ═══════════════════════════════════════════
   APPS STYLE SHEET - Mobile Portal Premium
   ═══════════════════════════════════════════ */

:root {
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --primary: #0f2963; /* OneLab Royal Blue */
  --primary-hover: #1e3a8a;
  --teal: #14b8a6;
  --teal-hover: #0d9488;
  --border: #e2e8f0;
  --shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --radius-lg: 12px;
  --radius-md: 8px;
  --success: #16a34a;
  --error: #dc2626;
  --warning: #ea580c;
}

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

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
  overflow: hidden;
  font-size: 13px;
}

/* Professional Typography Scale Resets */
h1, h2, h3, h4, h5, h6 {
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--text-main);
}
h1 { font-size: 20px; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }
h4 { font-size: 14px; }
h5 { font-size: 12px; }
h6 { font-size: 11px; }

/* Table Resets for Compact Professional Look */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px !important;
}
th, td {
  padding: 8px 10px !important;
  line-height: 1.4;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
th {
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.01);
}

/* App container takes full screen dimensions */
.app-container {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Screens */
.screen {
  display: none !important;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.screen.active {
  display: flex !important;
}

#login-screen:not(.active),
#dashboard-screen:not(.active) {
  display: none !important;
}

#login-screen.active {
  display: flex !important;
}

#dashboard-screen.active {
  display: flex !important;
}

#login-screen {
  max-width: 100vw;
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* Brand Header */
.brand-header {
  text-align: center;
  margin: 30px 0 20px 0;
}

.brand-logo {
  display: inline-flex;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  color: white;
  font-weight: 800;
  font-size: 18px;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
}

.brand-header h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.brand-header p {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 4px;
}

/* Glassmorphism Card */
.glass-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow);
}

.input-group {
  margin-bottom: 14px;
}

.input-group label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.input-group input,
.input-group select {
  width: 100%;
  background-color: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  color: var(--text-main);
  font-size: 12.5px;
  transition: all 0.2s;
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

/* Role Selector */
.role-selector {
  margin-bottom: 20px;
}

.role-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.role-options {
  display: flex;
  gap: 8px;
}

.role-btn {
  flex: 1;
  position: relative;
  cursor: pointer;
}

.role-btn input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.role-btn span {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background-color: rgba(15, 23, 42, 0.4);
  font-weight: 600;
  font-size: 11px;
  color: var(--text-muted);
  transition: all 0.2s;
  min-height: 48px;
}

.role-btn input:checked + span {
  border-color: #0f2963 !important;
  background-color: rgba(15, 41, 99, 0.08) !important;
  color: #0f2963 !important;
}

/* Timeline Navigation Bar */
.timeline-tabs-container {
  overflow-x: auto;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
}

.timeline-tabs-container::-webkit-scrollbar {
  display: none;
}

.timeline-tabs {
  display: flex;
  gap: 12px;
  min-width: 380px;
}

.t-tab {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-muted);
  padding: 8px 6px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  text-align: center;
  position: relative;
}

.t-tab:focus {
  outline: none;
}

.t-tab small {
  font-size: 9px;
  font-weight: 500;
  opacity: 0.7;
}

.t-tab.active {
  color: #0f2963;
}

.t-tab.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2.5px;
  background-color: #ff7c5c;
  border-radius: 4px;
}

/* Phase Panels */
.phase-panel {
  display: none;
  flex-direction: column;
}

.phase-panel.active {
  display: flex;
}

/* Buttons */
.btn {
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #1e3a8a);
  color: white;
  box-shadow: 0 4px 12px rgba(15, 41, 99, 0.2);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
  width: auto;
}

.btn-teal {
  background-color: var(--teal);
  color: white;
}

.btn-close {
  background-color: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border);
}

/* Dashboard App Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  color: white;
  font-weight: 800;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-info h3 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.user-info span {
  font-size: 11px;
  color: var(--teal);
  font-weight: 600;
  text-transform: uppercase;
}

.logout-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
}

/* Premium Gold Member Card */
.member-card {
  background: linear-gradient(135deg, #1e1b18, #3b2f1e 50%, #1e1b18);
  border: 1px solid rgba(229, 184, 88, 0.25);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4), inset 0 1px 1px rgba(255,255,255,0.1);
  position: relative;
  overflow: hidden;
}

.member-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(229, 184, 88, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

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

.member-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, #e5b858, #b58928);
  color: #0f172a;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(229, 184, 88, 0.3);
}

.member-tier {
  font-size: 9px;
  font-weight: 800;
  color: #e5b858;
  letter-spacing: 2px;
  background: rgba(229, 184, 88, 0.1);
  border: 1px solid rgba(229, 184, 88, 0.2);
  padding: 3px 8px;
  border-radius: 20px;
  text-shadow: 0 0 8px rgba(229, 184, 88, 0.4);
}

.member-card-body h4 {
  font-size: 15px;
  font-weight: 700;
  color: white;
  margin-bottom: 2px;
  letter-spacing: -0.3px;
}

.member-id {
  font-size: 10px;
  color: var(--text-muted);
  font-family: monospace;
}

.member-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 10px;
}

.member-points span {
  display: block;
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.member-points strong {
  font-size: 18px;
  font-weight: 800;
  color: #e5b858;
}

.member-barcode {
  display: flex;
  height: 28px;
  gap: 2px;
  background: rgba(255, 255, 255, 0.9);
  padding: 3px 6px;
  border-radius: 4px;
  align-items: stretch;
}

.barcode-line {
  background-color: black;
}

.w-1 { width: 1px; }
.w-2 { width: 2px; }
.w-3 { width: 3px; }
.w-4 { width: 4px; }

/* Wellness Tracker Grid */
.wellness-container {
  padding: 16px;
}

.wellness-grid {
  display: flex;
  gap: 12px;
}

.wellness-metric {
  flex: 1;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.well-icon {
  font-size: 16px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 41, 99, 0.06);
  color: #0f2963;
}

.beating-heart-icon {
  display: inline-block;
  animation: heartBeat 1.2s infinite;
}

@keyframes heartBeat {
  0% { transform: scale(1); }
  14% { transform: scale(1.15); }
  28% { transform: scale(1); }
  42% { transform: scale(1.15); }
  70% { transform: scale(1); }
}

.well-info h5 {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.well-info strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
}

.well-info strong small {
  font-size: 9px;
  font-weight: 500;
  color: var(--text-muted);
}

.well-info span {
  display: block;
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 2px;
}

.mini-progress {
  width: 100%;
  height: 4px;
  margin-top: 6px;
}

/* Quick Stats */
.quick-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  flex: 1;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  background-color: rgba(255,255,255,0.02);
}

.stat-icon {
  font-size: 20px;
  margin-bottom: 8px;
}

.stat-card h4 {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 4px;
}

.stat-card p {
  font-size: 18px;
  font-weight: 700;
}

/* Active Ticket Widget */
.ticket-widget {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.1);
  position: relative;
  overflow: hidden;
}

.ticket-widget::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: var(--primary);
}

.ticket-widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--teal);
  box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.7);
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(20, 184, 166, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(20, 184, 166, 0); }
}

.ticket-widget-body {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 12px;
}

.ticket-widget-num {
  font-size: 38px;
  font-weight: 800;
  color: white;
  letter-spacing: -0.5px;
}

.ticket-widget-info p {
  font-size: 13px;
  color: var(--text-main);
  margin-bottom: 2px;
}

.ticket-widget-info span {
  color: var(--teal);
  font-weight: 700;
}

.ticket-widget-footer {
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px dashed rgba(255,255,255,0.08);
  padding-top: 10px;
}

/* Menu list elements */
.menu-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.menu-item {
  display: flex;
  align-items: center;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
  transition: all 0.2s;
  gap: 14px;
}

.menu-item:hover {
  background-color: rgba(255,255,255,0.02);
  border-color: var(--primary);
  transform: translateX(2px);
}

.menu-ico {
  font-size: 24px;
}

.menu-text {
  flex: 1;
}

.menu-text h5 {
  font-size: 14.5px;
  font-weight: 700;
  color: white;
  margin-bottom: 2px;
}

.menu-text p {
  font-size: 12px;
  color: var(--text-muted);
}

.menu-arrow {
  font-size: 12px;
  color: var(--text-muted);
}

/* SVG Chart styling */
.chart-card {
  padding: 20px;
}

.chart-header h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
}

.chart-content {
  display: flex;
  align-items: center;
  gap: 24px;
}

.donut-chart {
  transform: rotate(-90deg);
}

.donut-segment {
  transform-origin: center;
}

.donut-text {
  transform: rotate(90deg);
  transform-origin: center;
}

.donut-subtext {
  transform: rotate(90deg);
  transform-origin: center;
}

.chart-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-main);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-fit { background-color: var(--teal); }
.dot-unfit { background-color: var(--error); }
.dot-pending { background-color: var(--warning); }

/* Billing Invoice Widget */
.invoice-widget {
  padding: 16px 20px;
  border: 1px solid rgba(239, 68, 68, 0.15);
}

.invoice-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.invoice-info h5 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}

.invoice-info p {
  font-size: 11px;
  color: var(--text-muted);
}

.invoice-amount {
  font-size: 15px;
  font-weight: 700;
  color: white;
}

/* Peer-to-Peer Chat Widget */
.chat-widget {
  display: flex;
  flex-direction: column;
  height: 280px;
  padding: 0;
  overflow: hidden;
}

.chat-header-widget {
  background-color: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-avatar-pic {
  width: 32px;
  height: 32px;
  background-color: rgba(20, 184, 166, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.chat-header-widget h6 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.chat-header-widget p {
  font-size: 10px;
  color: var(--text-muted);
}

.chat-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--success);
  margin-left: auto;
}

.chat-body-widget {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-msg {
  max-width: 80%;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  position: relative;
  font-size: 12.5px;
  line-height: 1.4;
}

.msg-received {
  background-color: #f1f5f9;
  color: var(--text-main);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.msg-sent {
  background-color: rgba(15, 41, 99, 0.08);
  color: #0f2963;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.msg-time {
  display: block;
  font-size: 9px;
  color: var(--text-muted);
  text-align: right;
  margin-top: 4px;
}

.chat-input-form {
  border-top: 1px solid var(--border);
  padding: 10px 12px;
  display: flex;
  gap: 8px;
}

.chat-input-form input {
  flex: 1;
  background-color: rgba(15,23,42,0.4);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  color: white;
  font-family: inherit;
  font-size: 13px;
}

.chat-input-form input:focus {
  outline: none;
  border-color: var(--teal);
}

.chat-send-btn {
  background-color: var(--teal);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Lab Values & AI Assessor Modal layout */
.lab-values-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lab-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.lab-label {
  font-size: 13.5px;
  color: var(--text-main);
}

.lab-val {
  font-size: 13.5px;
  font-weight: 700;
}

.val-normal {
  color: var(--success);
}

.val-high {
  color: var(--error);
}

.ai-assessor-box {
  background: rgba(14, 165, 233, 0.04);
  border: 1px solid rgba(14, 165, 233, 0.15);
  border-radius: 12px;
  padding: 16px;
  margin-top: 20px;
}

.ai-assessor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.ai-assessor-header span {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary-hover);
}

.ai-badge {
  font-size: 10px;
  font-weight: 700;
  background-color: var(--primary);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
}

.ai-assessor-body {
  font-size: 12.5px;
  color: var(--text-main);
  line-height: 1.5;
}

/* Corporate & Referral Custom Lists */
.corporate-list, .referral-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list-row {
  display: flex;
  align-items: center;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  gap: 12px;
}

.list-row-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  border: 1px solid rgba(255,255,255,0.05);
}

.list-row-details {
  flex: 1;
  min-width: 0;
}

.list-row-details h5 {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.list-row-details p {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Section Title */
.section-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 12px;
  margin-top: 10px;
}

/* Status Badges */
.badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.badge-fit {
  background-color: rgba(34, 197, 94, 0.1);
  color: var(--success);
}

.badge-unfit {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--error);
}

.badge-pending {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.badge-finished {
  background-color: rgba(20, 184, 166, 0.1);
  color: var(--teal);
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 100;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background-color: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 32px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  box-shadow: var(--shadow);
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.open .modal-box {
  transform: translateY(0);
}

.modal-box h3 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
}

/* ════════════════════════ FUTURISTIC ADDITIONS ════════════════════════ */

/* Glowing Sci-Fi Neon Text shadows */
.glow-cyan {
  color: #22d3ee;
  text-shadow: 0 0 8px rgba(34, 211, 238, 0.5);
}

.glow-teal {
  color: #2dd4bf;
  text-shadow: 0 0 8px rgba(45, 212, 191, 0.5);
}

.glow-gold {
  color: #fbbf24;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}

/* Simple CSS DNA Helix representation styling */
.dna-card {
  padding: 16px 20px;
  display: flex;
  gap: 20px;
  align-items: center;
}

.dna-helix-container {
  width: 40px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.dna-bar {
  width: 32px;
  height: 4px;
  background: linear-gradient(90deg, var(--teal), var(--primary));
  border-radius: 2px;
  position: relative;
  animation: dnaRotate 2s infinite linear;
}

@keyframes dnaRotate {
  0% { transform: scaleX(1); opacity: 1; }
  50% { transform: scaleX(-0.1); opacity: 0.5; }
  100% { transform: scaleX(1); opacity: 1; }
}

.dna-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dna-risk-row {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  padding-bottom: 4px;
}

/* Continuous Biosensor Row */
.biosensor-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.biosensor-row h5 {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.biosensor-row strong {
  font-size: 16px;
  color: white;
}

/* Nanobots Grid */
.nanobots-stats {
  display: flex;
  gap: 16px;
}

.nb-stat {
  flex: 1;
}

.nb-stat h5 {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
}

.nb-stat strong {
  font-size: 15px;
}

/* Quantum scanner LED indicator */
.quantum-card {
  padding: 16px 20px;
}

.q-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.q-led {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

.led-green {
  background-color: var(--success);
  box-shadow: 0 0 10px var(--success);
  animation: ledPulse 1.8s infinite;
}

@keyframes ledPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.q-row h5 {
  font-size: 13.5px;
  font-weight: 700;
  color: white;
}

.q-row p {
  font-size: 11px;
  color: var(--text-muted);
}

/* Longevity card details */
.longevity-card {
  padding: 20px;
}

.longevity-stats {
  display: flex;
  gap: 20px;
}

.l-stat {
  flex: 1;
}

.l-stat h5 {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
}

.l-stat strong {
  font-size: 20px;
}

.longevity-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

/* ════════════════════════ MEMBER & AFFILIATE WIDGETS ════════════════════════ */

.saldo-card {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
  margin-bottom: 12px;
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.25);
}

.saldo-card-left span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.85;
}

.saldo-card-left h2 {
  font-size: 24px;
  font-weight: 800;
  margin-top: 4px;
}

.btn-pencairan {
  background-color: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 8px 12px;
  font-size: 11px;
  border-radius: 8px;
  cursor: not-allowed;
  font-weight: 600;
  transition: all 0.2s;
  width: auto;
}

.btn-pencairan:disabled {
  opacity: 0.6;
}

.member-stats-bar {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.m-stat-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  padding: 8px;
  border-radius: 8px;
}

.m-stat-icon-circle {
  width: 28px;
  height: 28px;
  background-color: rgba(14, 165, 233, 0.12);
  color: var(--primary-hover);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.m-stat-item span {
  display: block;
  font-size: 8.5px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.m-stat-item strong {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: white;
}

.qr-workflow-container {
  display: flex;
  gap: 16px;
  align-items: stretch;
}

.qr-box-col {
  width: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  justify-content: center;
}

.qr-code-img {
  display: flex;
  justify-content: center;
}

.referral-code-label {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: rgba(0,0,0,0.3);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  width: 100%;
  justify-content: center;
}

.referral-code-label strong {
  font-size: 10px;
  font-family: monospace;
  color: white;
}

.btn-copy-code {
  background: transparent;
  border: none;
  color: var(--primary-hover);
  cursor: pointer;
  font-size: 10px;
}

.workflow-steps {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}

.w-step-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.step-num {
  width: 18px;
  height: 18px;
  background-color: rgba(14, 165, 233, 0.15);
  border: 1px solid var(--primary);
  color: var(--primary-hover);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 2px;
}

.w-step-item p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

.w-step-item p strong {
  color: white;
}

.empty-activity-card {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
  background-color: rgba(255,255,255,0.01);
}

.empty-icon {
  font-size: 32px;
  color: var(--text-muted);
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-activity-card h6 {
  font-size: 13px;
  font-weight: 700;
  color: white;
  margin-bottom: 6px;
}

.empty-activity-card p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  max-width: 280px;
  margin: 0 auto;
}

/* Verified Badge Blue */
.verified-badge-blue {
  width: 15px;
  height: 15px;
  background-color: #0ea5e9;
  color: white;
  font-size: 9px;
  font-weight: 800;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 5px rgba(14, 165, 233, 0.4);
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* FPP Form & B2B Styles */
.fpp-container::-webkit-scrollbar {
  width: 4px;
}
.fpp-container::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
.fpp-grid label {
  transition: all 0.2s ease;
  padding: 6px;
  border-radius: 6px;
  border: 1px solid transparent;
}
.fpp-grid label:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.05);
}
.fpp-grid input[type="checkbox"] {
  accent-color: var(--teal);
  width: 14px;
  height: 14px;
}

/* Invoice Cards & Lists */
.invoice-list-mini {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.invoice-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.4);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.2s ease;
}
.invoice-card:hover {
  border-color: rgba(255, 255, 255, 0.08);
}
.invoice-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.invoice-card-body {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-top: 1px solid rgba(255,255,255,0.03);
  padding-top: 8px;
}

/* Medical Record Parameters */
.medrec-param-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.02);
  font-size: 12px;
}
.medrec-param-label {
  color: var(--text-muted);
}
.medrec-param-value {
  font-weight: 700;
  color: white;
}
.medrec-param-value.normal {
  color: var(--teal);
}
.medrec-param-value.abnormal {
  color: var(--error);
}

/* Dashboard Web App Sidebar & Content Area */
.full-layout {
  display: flex !important;
  flex-direction: row !important;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

.app-sidebar {
  width: 240px;
  background: #0f2963;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-shrink: 0;
  transition: transform 0.3s ease;
  z-index: 100;
}

.sidebar-brand {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}

.sidebar-brand .logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: white;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
}

.sidebar-brand span {
  font-weight: 800;
  font-size: 15px;
  color: white;
  letter-spacing: -0.5px;
}

.sidebar-user-card {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.01);
}

.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  color: white;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.sidebar-user-details {
  overflow: hidden;
}

.sidebar-user-details h5 {
  font-size: 12.5px;
  font-weight: 700;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.sidebar-user-details span {
  font-size: 10px;
  color: var(--text-muted);
  display: block;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  color: #cbd5e1;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
}

.sidebar-link.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-left: 3px solid #ff7c5c;
}

.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}

.btn-logout {
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(239, 68, 68, 0.05);
  color: var(--error);
  padding: 10px;
  font-size: 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* Main Area Layout */
.app-main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: #090d16;
}

.app-content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  flex-shrink: 0;
}

.header-left-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-toggle-btn {
  display: none;
  background: none;
  border: none;
  color: #0f2963;
  font-size: 20px;
  cursor: pointer;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.breadcrumb .bc-parent {
  color: var(--text-muted);
}

.breadcrumb .bc-sep {
  color: var(--text-muted);
}

#breadcrumb-active-view {
  font-weight: 700;
  color: #0f2963;
}

.view-panels-wrapper {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* View panel visibility */
.view-panel {
  display: none;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.view-panel.active {
  display: flex;
}

/* Tab button medrec */
.tab-btn-medrec {
  padding: 8px 16px;
  font-size: 12px;
  border-radius: 6px;
}

.medrec-sub-panel {
  display: none;
}

.medrec-sub-panel.active {
  display: block;
}

/* Two Column Layout for Desktop Dashboard */
.dashboard-grid-two-col {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 992px) {
  .dashboard-grid-two-col {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Mobile responsive sidebar styles */
@media (max-width: 768px) {
  .menu-toggle-btn {
    display: block;
  }
  .app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-100%);
    width: 250px;
  }
  .app-sidebar.open {
    transform: translateX(0);
  }
  .timeline-tabs-container {
    width: 100%;
    margin-top: 10px !important;
  }
  .app-content-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
  }
  .view-panels-wrapper {
    padding: 16px;
  }
}

/* Profile & Catalog Styles */
.profile-sub-panel {
  display: none;
}
.profile-sub-panel.active {
  display: block;
}

.test-catalog-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.4);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.2s ease;
}
.test-catalog-card:hover {
  border-color: rgba(14, 165, 233, 0.2);
  transform: translateY(-2px);
}

/* Split Login Screen Responsive Styles */
@media (max-width: 900px) {
  #login-screen {
    flex-direction: column !important;
    overflow-y: auto !important;
  }
  .login-left-panel {
    display: none !important;
  }
  .login-right-panel {
    width: 100% !important;
    height: 100vh !important;
    background: radial-gradient(circle at center, rgba(11, 15, 25, 0.9) 0%, #05070f 100%), 
                url('https://images.unsplash.com/photo-1579154261294-a101a55f016d?auto=format&fit=crop&w=1920&q=80') no-repeat center center !important;
    background-size: cover !important;
  }
}


