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

    body {
      font-family: "Poppins", sans-serif;
      background: radial-gradient(circle at 20% 50%, #10294d 0%, #08111f 50%, #02060c 100%);
      color: #fff;
      text-align: center;
      overflow: hidden;
      position: relative;
      height: 100vh;
      width: 100vw;
    }

    /* Splash */
    #splash {
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      background: radial-gradient(circle at center, #10294d 0%, #08111f 40%, #02060c 100%);
      display: flex; align-items: center; justify-content: center;
      z-index: 1000;
      transition: opacity 1s ease;
      overflow: hidden;
    }
    #splash.splash-fade-out { opacity: 0; pointer-events: none; }
    #splashCanvas { position: absolute; inset: 0; }
    .splash-glow {
      position: absolute; width: 500px; height: 500px; border-radius: 50%;
      background: #00c8ff; filter: blur(150px); opacity: .15;
      animation: splashPulseGlow 6s ease-in-out infinite;
    }
    @keyframes splashPulseGlow { 50% { transform: scale(1.3); opacity: .25; } }
    .splash-content {
      position: relative; z-index: 10;
      display: flex; flex-direction: column; align-items: center; text-align: center;
      animation: splashShowContent 2s ease;
    }
    @keyframes splashShowContent {
      from { opacity: 0; transform: translateY(40px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    .splash-brain {
      font-size: 110px; margin-bottom: 10px;
      filter: drop-shadow(0 0 30px #00d9ff);
      animation: splashBrainPulse 3s infinite ease-in-out;
    }
    @keyframes splashBrainPulse { 50% { transform: scale(1.08); } }
    @keyframes slideUpToast { from { opacity:0; transform:translateX(-50%) translateY(20px); } to { opacity:1; transform:translateX(-50%) translateY(0); } }
    #splash h1 {
      font-size: 80px; font-weight: 800; color: white;
      letter-spacing: 4px; text-shadow: 0 0 15px #00d9ff, 0 0 35px #00d9ff;
      display: flex; align-items: baseline;
    }
    #splash .nuro { color: white; }
    #splash .x    { color: #00d9ff; margin-left: 10px; }
    .splash-tagline { margin-top: 12px; color: #cbd5e1; font-size: 18px; letter-spacing: 2px; }
    .splash-footer-fixed {
      position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
      text-align: center; color: #94a3b8; font-size: 14px; z-index: 10; white-space: nowrap;
    }
    .splash-company { color: #00d9ff; font-weight: 600; }

    /* NEW: Support Chat Button (Fixed at bottom right) */
    #supportChatBtn {
      position: fixed;
      bottom: 20px;
      left: 20px;
      width: 60px;
      height: 60px;
      background: linear-gradient(135deg, #0066aa, #00d9ff);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      font-size: 24px;
      cursor: pointer;
      z-index: 999;
      box-shadow: 0 4px 15px rgba(0,217,255,0.5);
      transition: all 0.3s ease;
      border: none;
    }

    #supportChatBtn:hover {
      transform: scale(1.1);
      box-shadow: 0 6px 20px rgba(0,217,255,0.7);
    }

    /* Login Container */
    #loginContainer {
      display: none;
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      overflow-y: auto;
      z-index: 10;
    }

    /* Header */
    .header {
      position: absolute;
      top: 10px;
      left: 15px;
      right: 15px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      width: calc(100% - 30px);
      z-index: 100;
    }
    .logo { height: 40px; }

    /* Login Forms */
    .login-form {
      background: rgba(6,16,32,0.95);
      padding: 30px;
      border-radius: 15px;
      width: 90%;
      max-width: 400px;
      box-shadow: 0 0 25px rgba(0,217,255,0.2), inset 0 0 40px rgba(0,40,80,0.3);
      margin: 0 auto;
    }
    .login-form h2 { margin-bottom: 20px; color: #00d9ff; font-size: 1.5rem; }
    .login-form input {
      width: 100%; padding: 12px; margin: 10px 0;
      border-radius: 8px; border: 1px solid rgba(0,217,255,0.15);
      background: rgba(16,35,60,0.8); color: #fff;
      font-size: 16px;
    }
    .login-btn {
      margin-top: 15px;
      padding: 12px 20px;
      border: none; border-radius: 25px;
      background: linear-gradient(135deg, #0066aa, #00d9ff);
      color: #fff; font-weight: bold; cursor: pointer;
      width: 100%;
      transition: 0.3s;
    }
    .login-btn:hover { transform: scale(1.05); }
    .user-login-link {
      margin-top: 15px;
      text-align: right;
      font-size: 14px;
      color: #00d9ff;
      cursor: pointer;
    }
    .user-login-link:hover { text-decoration: underline; }

    /* Hospital Dashboard */
    #hospitalDashboard {
      display: none;
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      flex-direction: column;
      align-items: center;
      overflow-y: auto;
      z-index: 10;
      background: radial-gradient(ellipse at 15% 20%, #0d2240 0%, #08111f 55%, #02060c 100%);
    }
    .hdb-notworkable-btn:hover { transform: translateY(-3px); }
    .hdb-card {
      background: rgba(8,20,42,0.92);
      border: 1px solid rgba(0,217,255,0.12);
      border-radius: 14px;
      padding: 20px;
      box-shadow: 0 4px 24px rgba(0,0,0,0.35);
      transition: border-color 0.2s;
    }
    .hdb-card:hover { border-color: rgba(0,217,255,0.22); }
    .hdb-card-header {
      display: flex; align-items: flex-start;
      justify-content: space-between; gap: 12px;
      margin-bottom: 14px; flex-wrap: wrap;
    }
    .hdb-card-title {
      font-size: 0.95rem; font-weight: 700;
      color: #d0eeff; margin-bottom: 2px;
    }
    .hdb-card-sub { font-size: 0.72rem; color: #5b7a94; }
    .hdb-select {
      background: rgba(0,20,45,0.9);
      border: 1px solid rgba(0,217,255,0.2);
      color: #00d9ff; border-radius: 8px;
      padding: 5px 10px; font-size: 0.75rem; cursor: pointer;
    }
    .hdb-kpi {
      background: rgba(8,20,42,0.92);
      border: 1px solid rgba(0,217,255,0.12);
      border-radius: 14px; padding: 18px 16px;
      display: flex; flex-direction: column; gap: 6px;
    }
    .hdb-kpi-icon { font-size: 1.4rem; }
    .hdb-kpi-val { font-size: 1.8rem; font-weight: 800; color: #e0f4ff; line-height: 1; }
    .hdb-kpi-label { font-size: 0.7rem; color: #5b7a94; letter-spacing: 0.5px; text-transform: uppercase; }
    .hdb-patient-row {
      display: grid;
      grid-template-columns: 1fr 1.5fr 80px 80px 80px 110px 120px;
      align-items: center; gap: 8px;
      padding: 10px 12px; border-radius: 8px;
      font-size: 0.8rem; color: #c0d8ec;
      border-bottom: 1px solid rgba(0,217,255,0.06);
      transition: background 0.15s;
    }
    .hdb-patient-row:hover { background: rgba(0,217,255,0.04); }
    .hdb-patient-row.header-row {
      font-size: 0.7rem; font-weight: 700;
      color: #5b7a94; text-transform: uppercase;
      letter-spacing: 0.5px; border-bottom: 1px solid rgba(0,217,255,0.15);
    }
    .hdb-risk-badge {
      display: inline-block; padding: 2px 10px;
      border-radius: 10px; font-size: 0.72rem; font-weight: 700;
    }
    .risk-low { background: rgba(0,210,120,0.15); color: #00d278; }
    .risk-medium { background: rgba(255,180,0,0.15); color: #ffb400; }
    .risk-high { background: rgba(255,60,60,0.15); color: #ff4d4d; }
    .dashboard-options {
      display: flex;
      gap: 20px;
      margin-top: 30px;
      flex-wrap: wrap;
      justify-content: center;
    }
    .dashboard-btn {
      padding: 15px 25px;
      border: none; border-radius: 25px;
      background: linear-gradient(135deg, #0066aa, #00d9ff);
      color: #fff; font-weight: bold; cursor: pointer;
      transition: 0.3s;
      min-width: 150px;
    }
    .dashboard-btn:hover { transform: scale(1.05); }

    /* Patient Form */
    #patientForm {
      display: none;
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      overflow-y: auto;
      z-index: 10;
      background: radial-gradient(circle at 20% 50%, #10294d 0%, #08111f 50%, #02060c 100%);
      padding: 20px;
    }
    #patientForm .form-inner {
      background: rgba(6,16,32,0.95);
      padding: 20px;
      border-radius: 15px;
      width: 90%;
      max-width: 500px;
      box-shadow: 0 0 25px rgba(0,217,255,0.2), inset 0 0 40px rgba(0,40,80,0.3);
      margin: 20px auto;
    }
    #patientForm h2, #patientForm .form-inner h2 { margin-bottom: 15px; color: #00d9ff; font-size: 1.5rem; }
    #patientForm input, #patientForm select, #patientForm .form-inner input, #patientForm .form-inner select {
      margin: 8px 0; padding: 12px;
      border-radius: 8px; border: 1px solid rgba(0,217,255,0.15);
      background: rgba(16,35,60,0.8); color: #fff;
      font-size: 16px;
      width: 100%;
    }
    #patientIdDisplay {
      background: rgba(16,35,60,0.9);
      padding: 10px;
      border-radius: 8px;
      margin: 10px 0;
      font-weight: bold;
      color: #00d9ff;
    }
    #patientPasswordDisplay {
      background: rgba(16,35,60,0.9);
      padding: 10px;
      border-radius: 8px;
      margin: 10px 0;
      font-weight: bold;
      color: #00d9ff;
    }
    #continuePatientBtn {
      margin-top: 15px;
      padding: 12px 20px;
      border: none; border-radius: 25px;
      background: linear-gradient(135deg, #0066aa, #00d9ff);
      color: #fff; font-weight: bold; cursor: pointer;
      width: 100%;
      transition: 0.3s;
    }
    #continuePatientBtn:hover { transform: scale(1.05); }

    /* Specialist Select */
    #specialistSelect {
      display: none;
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      overflow-y: auto;
      z-index: 10;
      background: radial-gradient(circle at 20% 50%, #10294d 0%, #08111f 50%, #02060c 100%);
      padding: 20px;
    }
    #specialistSelect .form-inner {
      background: rgba(6,16,32,0.95);
      padding: 20px;
      border-radius: 15px;
      width: 92%;
      max-width: 560px;
      box-shadow: 0 0 25px rgba(0,217,255,0.2), inset 0 0 40px rgba(0,40,80,0.3);
      margin: 20px auto;
    }
    #specialistSelect h2 { margin-bottom: 6px; color: #00d9ff; font-size: 1.5rem; }
    #specialistSelect .specialist-sub { color: #7ab8d4; font-size: 0.85rem; margin-bottom: 16px; }
    .specialist-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 10px;
    }
    .specialist-btn {
      display: flex; align-items: center; gap: 8px;
      padding: 12px 10px;
      border-radius: 12px;
      border: 1px solid rgba(0,217,255,0.15);
      background: rgba(16,35,60,0.8);
      color: #dff4ff;
      font-size: 0.85rem;
      font-weight: 600;
      cursor: pointer;
      transition: 0.2s;
      text-align: left;
    }
    .specialist-btn .emoji { font-size: 1.15rem; flex-shrink: 0; }
    .specialist-btn:hover { transform: scale(1.03); border-color: rgba(0,217,255,0.4); }
    .specialist-btn.active-specialist {
      background: linear-gradient(135deg, #0066aa, #00d9ff);
      border-color: transparent;
      color: #06121f;
    }
    .specialist-btn.disabled-specialist { opacity: 0.45; cursor: not-allowed; }
    .specialist-btn.disabled-specialist:hover { transform: none; border-color: rgba(0,217,255,0.15); }

    /* Specialist: Describe Problem */
    #specialistProblemScreen {
      display: none;
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      overflow-y: auto;
      z-index: 10;
      background: radial-gradient(circle at 20% 50%, #10294d 0%, #08111f 50%, #02060c 100%);
      padding: 20px;
    }
    #specialistProblemScreen .form-inner {
      background: rgba(6,16,32,0.95);
      padding: 20px;
      border-radius: 15px;
      width: 90%;
      max-width: 500px;
      box-shadow: 0 0 25px rgba(0,217,255,0.2), inset 0 0 40px rgba(0,40,80,0.3);
      margin: 20px auto;
    }
    #specialistProblemScreen h2 { margin-bottom: 6px; color: #00d9ff; font-size: 1.5rem; }
    #specialistProblemInput {
      width: 100%; margin: 10px 0; padding: 12px;
      border-radius: 8px; border: 1px solid rgba(0,217,255,0.15);
      background: rgba(16,35,60,0.8); color: #fff;
      font-size: 15px; font-family: inherit; resize: vertical;
    }
    #startSpecialistAssessmentBtn {
      margin-top: 6px;
      padding: 12px 20px;
      border: none; border-radius: 25px;
      background: linear-gradient(135deg, #0066aa, #00d9ff);
      color: #fff; font-weight: bold; cursor: pointer;
      width: 100%;
      transition: 0.3s;
    }
    #startSpecialistAssessmentBtn:hover { transform: scale(1.05); }

    /* Specialist: 15-Question Assessment */
    #specialistQuiz {
      display: none;
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      overflow-y: auto;
      z-index: 10;
      background: radial-gradient(circle at 20% 50%, #10294d 0%, #08111f 50%, #02060c 100%);
      padding: 20px;
    }
    #specialistQuiz .spq-inner, #specialistResults .spq-inner {
      background: rgba(6,16,32,0.95);
      padding: 20px;
      border-radius: 15px;
      width: 92%;
      max-width: 640px;
      box-shadow: 0 0 25px rgba(0,217,255,0.2), inset 0 0 40px rgba(0,40,80,0.3);
      margin: 20px auto;
    }
    #specialistQuizTitle { color: #00d9ff; font-size: 1.3rem; margin-bottom: 14px; }
    .spq-question {
      background: rgba(16,35,60,0.6);
      border: 1px solid rgba(0,217,255,0.12);
      border-radius: 12px;
      padding: 12px;
      margin-bottom: 10px;
    }
    .spq-qtext { color: #dff4ff; font-size: 0.92rem; margin-bottom: 10px; font-weight: 600; }
    .spq-scale { display: flex; gap: 6px; flex-wrap: wrap; }
    .spq-opt {
      flex: 1 1 auto;
      min-width: 62px;
      padding: 8px 6px;
      border-radius: 8px;
      border: 1px solid rgba(0,217,255,0.2);
      background: rgba(6,16,32,0.7);
      color: #9fd3e8;
      font-size: 0.75rem;
      font-weight: 600;
      cursor: pointer;
      transition: 0.2s;
      text-align: center;
    }
    .spq-opt:hover { border-color: rgba(0,217,255,0.5); }
    .spq-opt.spq-opt-selected {
      background: linear-gradient(135deg, #0066aa, #00d9ff);
      color: #06121f;
      border-color: transparent;
    }
    .spq-error { color: #ff6b6b; font-size: 0.85rem; margin: 8px 0; min-height: 18px; }
    #submitSpecialistAssessmentBtn {
      margin-top: 6px;
      padding: 12px 20px;
      border: none; border-radius: 25px;
      background: linear-gradient(135deg, #0066aa, #00d9ff);
      color: #fff; font-weight: bold; cursor: pointer;
      width: 100%;
      transition: 0.3s;
    }
    #submitSpecialistAssessmentBtn:hover { transform: scale(1.05); }

    /* X-ray Diagnosis (Orthopedic only) */
    #xrayDiagnosisBtn {
      display: none;
      margin-top: 16px;
      padding: 12px 20px;
      border: none; border-radius: 25px;
      background: linear-gradient(135deg, #7c3aed, #00d9ff);
      color: #fff; font-weight: bold; cursor: pointer;
      width: 100%;
      align-items: center; justify-content: center; gap: 8px;
      transition: 0.3s;
      font-size: 0.95rem;
    }
    #xrayDiagnosisBtn:hover { transform: scale(1.03); }
    #downloadPrescriptionBtn {
      display: none;
      margin-top: 10px;
      padding: 12px 20px;
      border: none; border-radius: 25px;
      background: linear-gradient(135deg, #0066aa, #00d9ff);
      color: #fff; font-weight: bold; cursor: pointer;
      width: 100%;
      align-items: center; justify-content: center; gap: 8px;
      transition: 0.3s;
      font-size: 0.95rem;
    }
    #downloadPrescriptionBtn:hover { transform: scale(1.03); }
    /* Dermatologist-only result buttons */
    #skinDetectionBtn, #hairReportBtn {
      display: none;
      margin-top: 10px;
      padding: 12px 20px;
      border: none; border-radius: 25px;
      color: #fff; font-weight: bold; cursor: pointer;
      width: 100%;
      align-items: center; justify-content: center; gap: 8px;
      transition: 0.3s;
      font-size: 0.95rem;
    }
    #skinDetectionBtn { background: linear-gradient(135deg, #ff8a00, #e52e71); }
    #hairReportBtn { background: linear-gradient(135deg, #11998e, #38ef7d); }
    #skinDetectionBtn:hover, #hairReportBtn:hover { transform: scale(1.03); }
    /* Gynecologist / General Medicine / ENT-only result buttons */
    #babyPositionBtn, #woundCheckBtn, #mriScanBtn, #hearingTestBtn, #eegTrackerBtn {
      display: none;
      margin-top: 10px;
      padding: 12px 20px;
      border: none; border-radius: 25px;
      color: #fff; font-weight: bold; cursor: pointer;
      width: 100%;
      align-items: center; justify-content: center; gap: 8px;
      transition: 0.3s;
      font-size: 0.95rem;
    }
    #babyPositionBtn { background: linear-gradient(135deg, #f78ca0, #fe9a8b); }
    #woundCheckBtn { background: linear-gradient(135deg, #eb3349, #f45c43); }
    #mriScanBtn { background: linear-gradient(135deg, #5eead4, #22d3ee); color: #06222a; }
    #hearingTestBtn { background: linear-gradient(135deg, #00d4b4, #0099cc); }
    #eegTrackerBtn { background: linear-gradient(135deg, #7f5aff, #00d9ff); }
    #babyPositionBtn:hover, #woundCheckBtn:hover, #mriScanBtn:hover, #hearingTestBtn:hover, #eegTrackerBtn:hover { transform: scale(1.03); }
    #xrayModal {
      display: none;
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      z-index: 50;
      background: rgba(2,6,12,0.85);
      padding: 20px;
    }
    #xrayModal .xray-modal-inner {
      background: #08111f;
      width: 100%; height: 100%;
      max-width: 1200px;
      margin: 0 auto;
      border-radius: 15px;
      box-shadow: 0 0 30px rgba(124,58,237,0.35);
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }
    #xrayModal .xray-modal-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 12px 18px;
      background: rgba(6,16,32,0.95);
      border-bottom: 1px solid rgba(0,217,255,0.15);
    }
    #xrayModal .xray-modal-header h3 { margin: 0; color: #00d9ff; font-size: 1.05rem; }
    #closeXrayModal {
      background: rgba(255,255,255,0.08);
      border: none; color: #dff4ff; width: 32px; height: 32px;
      border-radius: 50%; cursor: pointer; font-size: 1.1rem; line-height: 1;
    }
    #closeXrayModal:hover { background: rgba(255,255,255,0.18); }
    #xrayModal iframe {
      flex: 1; width: 100%; border: none; background: #08111f;
    }
    #dermToolModal {
      display: none;
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      z-index: 50;
      background: #08111f;
      padding: 0;
    }
    #dermToolModal .xray-modal-inner {
      width: 100%; height: 100%;
      max-width: none;
      margin: 0;
      border-radius: 0;
      box-shadow: none;
    }
    #dermToolModal .xray-modal-header { justify-content: flex-start; gap: 14px; flex-shrink: 0; }
    #dermToolModal .xray-modal-header h3 { margin: 0; flex: 1; text-align: center; }
    #dermToolModal iframe {
      flex: 1; width: 100%; height: 100%; border: none; background: #fff;
    }
    .derm-tool-back {
      background: rgba(255,255,255,0.08);
      border: none; color: #dff4ff;
      border-radius: 20px; cursor: pointer;
      font-size: 0.9rem; padding: 6px 14px;
      white-space: nowrap;
    }
    .derm-tool-back:hover { background: rgba(255,255,255,0.18); }

    /* Specialist: Result Gauge */
    #specialistResults {
      display: none;
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      overflow-y: auto;
      z-index: 10;
      background: radial-gradient(circle at 20% 50%, #10294d 0%, #08111f 50%, #02060c 100%);
      padding: 20px;
    }
    .spq-specialist-name { text-align: center; color: #00d9ff; font-weight: 700; font-size: 1.05rem; margin-bottom: 18px; }
    .gauge-wrap { padding: 6px 4px 0; }
    .gauge-track {
      position: relative;
      display: flex;
      width: 100%;
      height: 22px;
      border-radius: 12px;
      overflow: visible;
    }
    .gauge-zone { flex: 1; height: 100%; }
    .gauge-zone.gauge-normal { background: #2ecc71; border-radius: 12px 0 0 12px; }
    .gauge-zone.gauge-normalmed { background: #a4e061; }
    .gauge-zone.gauge-medmod { background: #f4c430; }
    .gauge-zone.gauge-veryhigh { background: #e74c3c; border-radius: 0 12px 12px 0; }
    .gauge-marker {
      position: absolute;
      top: -20px;
      left: 0%;
      transform: translateX(-50%);
      color: #fff;
      font-size: 1.1rem;
      transition: left 0.6s ease;
      text-shadow: 0 0 6px rgba(0,0,0,0.6);
    }
    .gauge-labels {
      display: flex;
      justify-content: space-between;
      font-size: 0.65rem;
      color: #7ab8d4;
      margin-top: 6px;
    }
    .spq-pct { text-align: center; font-size: 2.2rem; font-weight: 800; color: #00d9ff; margin-top: 20px; }
    .spq-severity { text-align: center; font-size: 1rem; font-weight: 700; margin-top: 4px; }
    .spq-count { text-align: center; font-size: 0.8rem; color: #7ab8d4; margin-top: 8px; }

    /* Show Patients */
    #showPatients {
      display: none;
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      overflow-y: auto;
      z-index: 10;
      background: radial-gradient(circle at 20% 50%, #10294d 0%, #08111f 50%, #02060c 100%);
      padding: 20px;
    }
    #showPatients .list-inner {
      background: rgba(6,16,32,0.95);
      padding: 20px;
      border-radius: 15px;
      width: 95%;
      max-width: 800px;
      box-shadow: 0 0 25px rgba(0,217,255,0.2), inset 0 0 40px rgba(0,40,80,0.3);
      margin: 20px auto;
    }
    #showPatients h2 { margin-bottom: 15px; color: #00d9ff; font-size: 1.5rem; }
    #patientSearch {
      width: 100%; padding: 12px; margin: 10px 0;
      border-radius: 8px; border: 1px solid rgba(0,217,255,0.15);
      background: rgba(16,35,60,0.8); color: #fff;
      font-size: 16px;
    }
    .patients-list {
      margin-top: 15px;
      max-height: 400px;
      overflow-y: auto;
    }
    .patient-item {
      background: rgba(16,35,60,0.8);
      padding: 15px;
      border-radius: 10px;
      margin: 10px 0;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .patient-info {
      text-align: left;
    }
    .patient-actions {
      display: flex;
      gap: 10px;
    }
    .edit-btn, .back-btn {
      padding: 8px 15px;
      border: none; border-radius: 20px;
      background: linear-gradient(135deg, #0066aa, #00d9ff);
      color: #fff; cursor: pointer;
      font-size: 14px;
    }

    /* Patient Details Modal */
    #patientDetailsModal {
      display: none;
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      background: rgba(0,0,0,0.8);
      z-index: 2000;
      justify-content: center;
      align-items: center;
    }
    .patient-details-content {
      background: rgba(6,16,32,0.95);
      padding: 20px;
      border-radius: 15px;
      width: 90%;
      max-width: 600px;
      max-height: 80vh;
      overflow-y: auto;
    }
    .patient-details-content h2 { margin-bottom: 15px; color: #00d9ff; }
    .patient-details-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      text-align: left;
      margin-bottom: 20px;
    }
    .patient-details-grid p { margin: 5px 0; }
    .patient-results {
      margin-top: 20px;
      text-align: left;
    }
    .result-item {
      background: rgba(16,35,60,0.8);
      padding: 10px;
      border-radius: 8px;
      margin: 10px 0;
    }
    .pd-recent-card {
      background: rgba(0,150,200,0.1);
      border: 1px solid rgba(0,217,255,0.25);
      border-radius: 10px;
      padding: 12px;
      margin: 14px 0;
      text-align: left;
    }
    .pd-recent-card .pd-recent-pct { color: #00d9ff; font-weight: 800; font-size: 1.3rem; }
    .pd-specialist-history {
      margin-top: 18px;
      text-align: left;
    }
    .pd-specialist-btns {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin: 10px 0;
    }
    .pd-spec-btn {
      padding: 8px 14px;
      border-radius: 18px;
      border: 1px solid rgba(0,217,255,0.25);
      background: rgba(16,35,60,0.8);
      color: #9fd3e8;
      font-size: 0.78rem;
      font-weight: 600;
      cursor: pointer;
      transition: 0.2s;
    }
    .pd-spec-btn:hover, .pd-spec-btn.pd-spec-btn-active {
      background: linear-gradient(135deg, #0066aa, #00d9ff);
      color: #06121f;
      border-color: transparent;
    }
    .pd-history-chart-wrap {
      background: rgba(16,35,60,0.6);
      border-radius: 10px;
      padding: 10px;
      display: none;
    }
    .pd-gauge-history-list {
      display: none;
      max-height: 340px;
      overflow-y: auto;
    }
    .pd-gauge-entry {
      background: rgba(6,16,32,0.7);
      border: 1px solid rgba(0,217,255,0.12);
      border-radius: 10px;
      padding: 12px;
      margin-bottom: 12px;
    }
    .pd-gauge-entry:last-child { margin-bottom: 0; }
    .pd-gauge-entry-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 14px;
      font-size: 0.78rem;
    }
    .pd-gauge-entry-time { color: #7ab8d4; }
    .pd-gauge-entry-pct { font-weight: 800; }

    /* User Dashboard */
    #userDashboard {
      display: none;
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      overflow-y: auto;
      z-index: 10;
    }
    .user-options {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 15px;
      margin-top: 30px;
      width: 90%;
      max-width: 500px;
    }
    .user-btn {
      padding: 15px;
      border: none; border-radius: 25px;
      background: linear-gradient(135deg, #0066aa, #00d9ff);
      color: #fff; font-weight: bold; cursor: pointer;
      transition: 0.3s;
    }
    .user-btn:hover { transform: scale(1.05); }

    /* NEW: GITA Bot Modal - UPDATED WITH HEADER AND TIMER */
    #gitaBotModal {
      display: none;
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      background: radial-gradient(circle at 20% 50%, #10294d 0%, #08111f 50%, #02060c 100%);
      z-index: 3000;
      justify-content: center;
      align-items: center;
      padding: 0;
      overflow: hidden;
    }

    .gita-bot-content {
      width: 100%;
      height: 100%;
      padding: 0;
      display: flex;
      flex-direction: column;
      position: relative;
    }

    /* NEW: GITA Bot Header */
    .gita-bot-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 15px 20px;
      background: rgba(6,16,32,0.95);
      border-bottom: 1px solid rgba(0,217,255,0.15);
      position: relative;
      z-index: 10;
    }

    .gita-back-btn {
      padding: 8px 20px;
      border: none;
      border-radius: 20px;
      background: linear-gradient(135deg, #b30000, #ff3b3b);
      color: white;
      cursor: pointer;
      font-size: 14px;
      font-weight: bold;
    }

    .gita-timer-modal {
      background: linear-gradient(135deg, #b30000, #ff3b3b);
      color: white;
      padding: 8px 15px;
      border-radius: 20px;
      font-size: 14px;
      font-weight: bold;
      box-shadow: 0 4px 15px rgba(255, 0, 102, 0.7);
      border: 2px solid white;
      animation: pulse 2s infinite;
    }

    @keyframes pulse {
      0% { transform: scale(1); }
      50% { transform: scale(1.05); }
      100% { transform: scale(1); }
    }

    #gitaBotIframe {
      flex-grow: 1;
      width: 100%;
      height: calc(100% - 70px);
      border: none;
      border-radius: 0;
    }

    /* NEW: Support Chat Modal */
    #supportChatModal {
      display: none;
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      background: radial-gradient(circle at 20% 50%, #10294d 0%, #08111f 50%, #02060c 100%);
      z-index: 3000;
      justify-content: center;
      align-items: center;
      padding: 0;
      overflow: hidden;
    }

    .support-chat-content {
      width: 100%;
      height: 100%;
      padding: 0;
      display: flex;
      flex-direction: column;
      position: relative;
    }

    .support-chat-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 15px 20px;
      background: rgba(6,16,32,0.95);
      border-bottom: 1px solid rgba(0,217,255,0.15);
    }

    .support-chat-header h2 {
      color: #00d9ff;
      margin: 0;
      font-size: 1.5rem;
    }

    #closeSupportChatModal {
      padding: 8px 20px;
      border: none;
      border-radius: 20px;
      background: linear-gradient(135deg, #b30000, #ff3b3b);
      color: white;
      cursor: pointer;
      font-size: 14px;
      font-weight: bold;
    }

    #supportChatIframe {
      flex-grow: 1;
      width: 100%;
      height: calc(100% - 70px);
      border: none;
      border-radius: 0;
    }

    /* Quiz */
    #quiz {
      display: none;
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      overflow-y: auto;
      z-index: 10;
      background: radial-gradient(circle at 20% 50%, #10294d 0%, #08111f 50%, #02060c 100%);
      padding: 20px;
    }
    #quiz .quiz-inner {
      background: rgba(6,16,32,0.95);
      padding: 20px;
      border-radius: 15px;
      width: 90%;
      max-width: 500px;
      box-shadow: 0 0 25px rgba(0,217,255,0.2), inset 0 0 40px rgba(0,40,80,0.3);
      margin: 20px auto;
    }
    #progressText { margin-bottom: 10px; font-size: 14px; }
    .progress { width: 100%; height: 10px; background: rgba(16,35,60,0.9); border-radius: 5px; overflow: hidden; margin-bottom: 15px; }
    .progress-bar { height: 100%; background: linear-gradient(90deg, #0066aa, #00d9ff); width: 0; transition: width 0.5s; }
    #questionText { font-size: 1.2rem; margin-bottom: 15px; }
    #options { display: flex; flex-direction: column; gap: 10px; }
    .option-btn {
      padding: 12px;
      border-radius: 10px;
      border: none;
      background: rgba(16,35,60,0.8);
      color: #fff;
      cursor: pointer;
      transition: 0.3s;
      font-size: 16px;
    }
    .option-btn:hover { background: linear-gradient(135deg, #0066aa, #00d9ff); }

    /* Results */
    #results {
      display: none;
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      overflow-y: auto;
      z-index: 10;
      background: radial-gradient(circle at 20% 50%, #10294d 0%, #08111f 50%, #02060c 100%);
      padding: 20px;
    }
    #results .results-inner {
      background: rgba(6,16,32,0.95);
      padding: 20px;
      border-radius: 15px;
      width: 90%;
      max-width: 500px;
      box-shadow: 0 0 25px rgba(0,217,255,0.2), inset 0 0 40px rgba(0,40,80,0.3);
      margin: 20px auto;
    }
    #results h2 { margin-bottom: 20px; font-size: 1.5rem; }
    .result { margin: 15px 0; }
    .result p { margin-bottom: 6px; text-align: left; font-size: 14px; }
    .result-bar { width: 100%; height: 20px; background: rgba(16,35,60,0.9); border-radius: 10px; overflow: hidden; }
    .result-bar div {
      height: 100%; width: 0;
      text-align: right; padding-right: 8px;
      font-size: 12px; color: #fff; line-height: 20px;
      border-radius: 10px;
      transition: width 1s ease;
    }
    #anxietyBar { background: linear-gradient(45deg,#ff9f43,#ff6b6b); }
    #stressBar { background: linear-gradient(45deg,#1dd1a1,#10ac84); }
    #cognitionBar { background: linear-gradient(45deg,#54a0ff,#2e86de); }
    #overallBar { background: linear-gradient(45deg,#f368e0,#ff9ff3); }

    #resultButtons { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
    #restartBtn { background: linear-gradient(135deg, #0066aa, #00d9ff); }
    #chatBtn { background: linear-gradient(45deg,#1dd1a1,#10ac84); }
    #dietBtn { background: linear-gradient(45deg,#ff9f43,#ff6b6b); }
    #mindMapBtn { background: linear-gradient(45deg,#9b59b6,#8e44ad); }
    #downloadPdfBtn { background: linear-gradient(45deg, #ff9f43, #f368e0); }
    #viewGraphBtn { background: linear-gradient(135deg, #0066aa, #00d9ff); }
    #speechDetectBtn { background: linear-gradient(45deg, #ff9f43, #ff6b6b); }
    #eegTrackerBtn2 { background: linear-gradient(135deg, #7f5aff, #00d9ff); }
    #backToDashboardResults { background: linear-gradient(45deg, #1dd1a1, #10ac84); }
    #resultButtons button {
      padding: 10px 15px; border-radius: 20px; border: none;
      color: #fff; cursor: pointer; transition: 0.3s;
      font-size: 14px;
      flex: 1;
      min-width: 140px;
    }
    #resultButtons button:hover { transform: scale(1.05); }

    /* Modal (Diet + MindMap + Profile + Chatbot) */
    .modal {
      display: none; position: fixed; z-index: 2000;
      left: 0; top: 0; width: 100%; height: 100%;
      background: rgba(0,0,0,0.7);
      justify-content: center; align-items: center;
      padding: 15px;
      overflow-y: auto;
    }
    .modal-content {
      background: rgba(6,16,32,0.95);
      padding: 20px;
      border-radius: 15px;
      width: 95%;
      max-width: 500px;
      text-align: center;
      position: relative;
      margin: auto;
    }
    .modal-content h2 { margin-bottom: 15px; font-size: 1.5rem; }
    .modal-content table { width: 100%; border-collapse: collapse; color: #fff; }
    .modal-content th, .modal-content td { border: 1px solid rgba(0,217,255,0.15); padding: 10px; font-size: 14px; }
    .closeDiet {
      position: absolute; top: 10px; right: 15px;
      color: #ff3b3b; font-size: 28px; cursor: pointer;
      text-shadow: 0 0 8px rgba(255,59,59,0.6);
      transition: color 0.2s, text-shadow 0.2s;
    }
    .closeDiet:hover { color: #ff6b6b; text-shadow: 0 0 14px rgba(255,59,59,0.9); }

    /* Graph Modal */
    #graphModal .modal-content {
      width: 95%;
      max-width: 95%;
      max-height: 80vh;
    }
    .closeGraph {
      position: absolute; top: 15px; right: 20px;
      color: #ff3b3b; font-size: 28px; cursor: pointer;
      text-shadow: 0 0 8px rgba(255,59,59,0.6);
      transition: color 0.2s, text-shadow 0.2s;
    }
    .closeGraph:hover { color: #ff6b6b; text-shadow: 0 0 14px rgba(255,59,59,0.9); }

    /* Mind Map Modal */
    #mindMapModal .modal {
      padding: 0;
    }
    #mindMapModal .modal-content {
      width: 100%; height: 100%;
      border-radius: 0; padding: 0;
      display: flex; flex-direction: column;
      max-width: 100%;
    }
    #mindMapModal iframe { width: 100%; height: 100%; border: none; flex-grow: 1; }
    #closeMindMap {
      position: absolute; top: 15px; right: 20px;
      padding: 10px 20px;
      border: none; border-radius: 25px;
      background: linear-gradient(135deg, #cc0000, #ff3b3b);
      color: #fff; font-size: 16px;
      cursor: pointer; z-index: 10;
      box-shadow: 0 4px 12px rgba(255,59,59,0.4);
    }
    #closeMindMap:hover { background: linear-gradient(135deg, #ff3b3b, #ff6b6b); box-shadow: 0 6px 16px rgba(255,59,59,0.6); }

    /* Chatbot Modal */
    #chatbotModal .modal {
      padding: 0;
    }
    #chatbotModal .modal-content {
      width: 100%; height: 100%;
      border-radius: 0; padding: 0;
      display: flex; flex-direction: column;
      max-width: 100%;
    }
    #chatbotModal iframe { width: 100%; height: 100%; border: none; flex-grow: 1; }
    #closeChatbot {
      position: absolute; top: 15px; right: 20px;
      padding: 10px 20px;
      border: none; border-radius: 25px;
      background: linear-gradient(135deg, #cc0000, #ff3b3b);
      color: #fff; font-size: 16px;
      cursor: pointer; z-index: 10;
      box-shadow: 0 4px 12px rgba(255,59,59,0.4);
    }
    #closeChatbot:hover { background: linear-gradient(135deg, #ff3b3b, #ff6b6b); box-shadow: 0 6px 16px rgba(255,59,59,0.6); }

    /* Admin Dashboard */
    #adminDashboard {
      display: none;
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      overflow-y: auto;
      z-index: 10;
    }
    .admin-options {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 15px;
      margin-top: 30px;
      width: 90%;
      max-width: 600px;
    }
    .admin-btn {
      padding: 15px;
      border: none;
      border-radius: 25px;
      background: linear-gradient(135deg, #0066aa, #00d9ff);
      color: #fff;
      font-weight: bold;
      cursor: pointer;
      transition: 0.3s;
    }
    .admin-btn:hover {
      transform: scale(1.05);
    }

    /* NEW: Hacker Dashboard */
    #hackerDashboard {
      display: none;
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      overflow-y: auto;
      z-index: 10;
    }
    .hacker-options {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 15px;
      margin-top: 30px;
      width: 90%;
      max-width: 600px;
    }
    .hacker-btn {
      padding: 15px;
      border: none;
      border-radius: 25px;
      background: linear-gradient(135deg, #b30000, #ff3b3b);
      color: #fff;
      font-weight: bold;
      cursor: pointer;
      transition: 0.3s;
    }
    .hacker-btn:hover {
      transform: scale(1.05);
    }

    /* Admin Hospital Management */
    #adminHospitalManagement {
      display: none;
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      overflow-y: auto;
      z-index: 10;
      background: radial-gradient(circle at 20% 50%, #10294d 0%, #08111f 50%, #02060c 100%);
      padding: 20px;
    }
    #adminHospitalManagement .section-inner {
      background: rgba(6,16,32,0.95);
      padding: 20px;
      border-radius: 15px;
      width: 95%;
      max-width: 800px;
      box-shadow: 0 0 25px rgba(0,217,255,0.2), inset 0 0 40px rgba(0,40,80,0.3);
      margin: 20px auto;
    }
    #adminHospitalManagement h2 {
      margin-bottom: 15px;
      color: #00d9ff;
      font-size: 1.5rem;
    }
    .add-hospital-form {
      background: rgba(16,35,60,0.8);
      padding: 15px;
      border-radius: 10px;
      margin-bottom: 20px;
    }
    .add-hospital-form input {
      width: 100%;
      padding: 10px;
      margin: 5px 0;
      border-radius: 8px;
      border: 1px solid rgba(0,217,255,0.15);
      background: rgba(16,35,60,0.9);
      color: #fff;
    }
    .hospital-list {
      margin-top: 15px;
    }
    .hospital-item {
      background: rgba(16,35,60,0.8);
      padding: 15px;
      border-radius: 10px;
      margin: 10px 0;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .hospital-info {
      text-align: left;
    }
    .hospital-actions {
      display: flex;
      gap: 10px;
    }
    .terminate-btn {
      background: linear-gradient(135deg, #b30000, #ff3b3b);
      color: white;
      border: none;
      padding: 8px 15px;
      border-radius: 20px;
      cursor: pointer;
    }

    /* Admin Patient View */
    #adminPatientView {
      display: none;
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      overflow-y: auto;
      z-index: 10;
      background: radial-gradient(circle at 20% 50%, #10294d 0%, #08111f 50%, #02060c 100%);
      padding: 20px;
    }
    #adminPatientView .section-inner {
      background: rgba(6,16,32,0.95);
      padding: 20px;
      border-radius: 15px;
      width: 95%;
      max-width: 1000px;
      box-shadow: 0 0 25px rgba(0,217,255,0.2), inset 0 0 40px rgba(0,40,80,0.3);
      margin: 20px auto;
    }
    #adminPatientView h2 {
      margin-bottom: 15px;
      color: #00d9ff;
      font-size: 1.5rem;
    }
    .admin-patient-filters {
      display: flex;
      gap: 10px;
      margin-bottom: 15px;
      flex-wrap: wrap;
    }
    .admin-patient-filters select,
    .admin-patient-filters input {
      padding: 10px;
      border-radius: 8px;
      border: 1px solid rgba(0,217,255,0.15);
      background: rgba(16,35,60,0.8);
      color: #fff;
    }
    .admin-patients-list {
      max-height: 500px;
      overflow-y: auto;
    }
    .admin-patient-item {
      background: rgba(16,35,60,0.8);
      padding: 15px;
      border-radius: 10px;
      margin: 10px 0;
    }
    .admin-patient-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 10px;
    }
    .admin-patient-details {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin-bottom: 10px;
    }
    .admin-patient-results {
      background: rgba(16,35,60,0.9);
      padding: 10px;
      border-radius: 8px;
      margin-top: 10px;
    }
    .delete-patient-btn {
      background: linear-gradient(135deg, #b30000, #ff3b3b);
      color: white;
      border: none;
      padding: 5px 10px;
      border-radius: 5px;
      cursor: pointer;
    }

    /* Admin Statistics */
    #adminStatistics {
      display: none;
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      overflow-y: auto;
      z-index: 10;
      background: radial-gradient(circle at 20% 50%, #10294d 0%, #08111f 50%, #02060c 100%);
      padding: 20px;
    }
    #adminStatistics .section-inner {
      background: rgba(6,16,32,0.95);
      padding: 20px;
      border-radius: 15px;
      width: 95%;
      max-width: 1000px;
      box-shadow: 0 0 25px rgba(0,217,255,0.2), inset 0 0 40px rgba(0,40,80,0.3);
      margin: 20px auto;
    }
    #adminStatistics h2 {
      margin-bottom: 15px;
      color: #00d9ff;
      font-size: 1.5rem;
    }
    .stats-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 20px;
      margin-bottom: 20px;
    }
    .stat-card {
      background: rgba(16,35,60,0.8);
      padding: 15px;
      border-radius: 10px;
      text-align: center;
    }
    .stat-value {
      font-size: 2rem;
      font-weight: bold;
      color: #00d9ff;
    }
    .stat-label {
      font-size: 0.9rem;
      color: #bbb;
    }
    .charts-container {
      display: grid;
      grid-template-columns: 1fr;
      gap: 20px;
    }
    .chart-wrapper {
      background: rgba(16,35,60,0.8);
      padding: 15px;
      border-radius: 10px;
    }

    /* Admin Patient Login Management */
    #adminPatientLoginManagement {
      display: none;
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      overflow-y: auto;
      z-index: 10;
      background: radial-gradient(circle at 20% 50%, #10294d 0%, #08111f 50%, #02060c 100%);
      padding: 20px;
    }
    #adminPatientLoginManagement .section-inner {
      background: rgba(6,16,32,0.95);
      padding: 20px;
      border-radius: 15px;
      width: 95%;
      max-width: 1000px;
      box-shadow: 0 0 25px rgba(0,217,255,0.2), inset 0 0 40px rgba(0,40,80,0.3);
      margin: 20px auto;
    }
    #adminPatientLoginManagement h2 {
      margin-bottom: 15px;
      color: #00d9ff;
      font-size: 1.5rem;
    }
    .patient-login-filters {
      display: flex;
      gap: 10px;
      margin-bottom: 15px;
      flex-wrap: wrap;
    }
    .patient-login-filters input {
      padding: 10px;
      border-radius: 8px;
      border: 1px solid rgba(0,217,255,0.15);
      background: rgba(16,35,60,0.8);
      color: #fff;
      flex-grow: 1;
    }
    .patient-login-list {
      max-height: 500px;
      overflow-y: auto;
    }
    .patient-login-item {
      background: rgba(16,35,60,0.8);
      padding: 15px;
      border-radius: 10px;
      margin: 10px 0;
    }
    .patient-login-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 10px;
    }
    .patient-login-details {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin-bottom: 10px;
    }
    .patient-login-actions {
      display: flex;
      gap: 10px;
      margin-top: 10px;
      align-items: center;
    }
    .change-password-btn {
      background: linear-gradient(135deg, #0055aa, #00d9ff);
      color: white;
      border: none;
      padding: 5px 10px;
      border-radius: 5px;
      cursor: pointer;
    }
    .password-timer {
      background: rgba(16,35,60,0.9);
      padding: 5px 10px;
      border-radius: 5px;
      font-size: 14px;
      color: #ff9f43;
    }
    .expired-timer {
      color: #ff6b6b;
    }

    /* Password Change Modal */
    #passwordChangeModal {
      display: none;
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      background: rgba(0,0,0,0.8);
      z-index: 2000;
      justify-content: center;
      align-items: center;
    }
    .password-change-content {
      background: rgba(6,16,32,0.95);
      padding: 20px;
      border-radius: 15px;
      width: 90%;
      max-width: 400px;
    }
    .password-change-content h2 {
      margin-bottom: 15px;
      color: #00d9ff;
    }
    .password-change-content input {
      width: 100%;
      padding: 10px;
      margin: 10px 0;
      border-radius: 8px;
      border: 1px solid rgba(0,217,255,0.15);
      background: rgba(16,35,60,0.8);
      color: #fff;
    }
    .password-change-buttons {
      display: flex;
      gap: 10px;
      margin-top: 15px;
    }
    .password-change-buttons button {
      flex: 1;
      padding: 10px;
      border-radius: 25px;
      border: none;
      cursor: pointer;
    }
    #confirmPasswordChange {
      background: linear-gradient(135deg, #0066aa, #00d9ff);
      color: white;
    }
    #cancelPasswordChange {
      background: rgba(16,35,60,0.9);
      color: white;
    }

    /* Custom Button Management */
    #customButtonManagement {
      display: none;
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      overflow-y: auto;
      z-index: 10;
      background: radial-gradient(circle at 20% 50%, #10294d 0%, #08111f 50%, #02060c 100%);
      padding: 20px;
    }
    #customButtonManagement .section-inner {
      background: rgba(6,16,32,0.95);
      padding: 20px;
      border-radius: 15px;
      width: 95%;
      max-width: 800px;
      box-shadow: 0 0 25px rgba(0,217,255,0.2), inset 0 0 40px rgba(0,40,80,0.3);
      margin: 20px auto;
    }
    #customButtonManagement h2 {
      margin-bottom: 15px;
      color: #00d9ff;
      font-size: 1.5rem;
    }
    .add-button-form {
      background: rgba(16,35,60,0.8);
      padding: 15px;
      border-radius: 10px;
      margin-bottom: 20px;
    }
    .add-button-form input, .add-button-form select {
      width: 100%;
      padding: 10px;
      margin: 5px 0;
      border-radius: 8px;
      border: 1px solid rgba(0,217,255,0.15);
      background: rgba(16,35,60,0.9);
      color: #fff;
    }
    .custom-buttons-list {
      margin-top: 15px;
    }
    .custom-button-item {
      background: rgba(16,35,60,0.8);
      padding: 15px;
      border-radius: 10px;
      margin: 10px 0;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .custom-button-info {
      text-align: left;
    }
    .custom-button-actions {
      display: flex;
      gap: 10px;
    }
    .delete-custom-button {
      background: linear-gradient(135deg, #b30000, #ff3b3b);
      color: white;
      border: none;
      padding: 8px 15px;
      border-radius: 20px;
      cursor: pointer;
    }

    /* System Settings */
    #systemSettings {
      display: none;
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      overflow-y: auto;
      z-index: 10;
      background: radial-gradient(circle at 20% 50%, #10294d 0%, #08111f 50%, #02060c 100%);
      padding: 20px;
    }
    #systemSettings .section-inner {
      background: rgba(6,16,32,0.95);
      padding: 20px;
      border-radius: 15px;
      width: 95%;
      max-width: 1000px;
      box-shadow: 0 0 25px rgba(0,217,255,0.2), inset 0 0 40px rgba(0,40,80,0.3);
      margin: 20px auto;
    }
    #systemSettings h2 {
      margin-bottom: 15px;
      color: #00d9ff;
      font-size: 1.5rem;
    }
    .system-settings-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 20px;
      margin-bottom: 20px;
    }
    .system-setting-card {
      background: rgba(16,35,60,0.8);
      padding: 20px;
      border-radius: 10px;
      text-align: left;
    }
    .system-setting-card h3 {
      color: #00d9ff;
      margin-bottom: 15px;
      font-size: 1.2rem;
    }
    .system-setting-card p {
      margin-bottom: 15px;
      color: #bbb;
      font-size: 0.9rem;
    }
    .setting-control {
      margin-bottom: 15px;
    }
    .setting-control label {
      display: block;
      margin-bottom: 5px;
      color: #fff;
    }
    .setting-control input, .setting-control select {
      width: 100%;
      padding: 10px;
      border-radius: 8px;
      border: 1px solid rgba(0,217,255,0.15);
      background: rgba(16,35,60,0.9);
      color: #fff;
    }
    .setting-actions {
      display: flex;
      gap: 10px;
      margin-top: 10px;
    }
    .setting-btn {
      padding: 8px 15px;
      border: none;
      border-radius: 20px;
      cursor: pointer;
      font-size: 14px;
    }
    .save-btn {
      background: linear-gradient(135deg, #0055aa, #00d9ff);
      color: white;
    }
    .reset-btn {
      background: linear-gradient(45deg, #ff9f43, #ff6b6b);
      color: white;
    }
    .danger-btn {
      background: linear-gradient(135deg, #b30000, #ff3b3b);
      color: white;
    }

    /* Maintenance Page */
    #maintenancePage {
      display: none;
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      background: radial-gradient(circle at 20% 50%, #10294d 0%, #08111f 50%, #02060c 100%);
      z-index: 3000;
      justify-content: center;
      align-items: center;
      flex-direction: column;
      text-align: center;
    }
    .maintenance-content {
      background: rgba(6,16,32,0.95);
      padding: 40px;
      border-radius: 15px;
      max-width: 500px;
      box-shadow: 0 0 25px rgba(0,217,255,0.2);
    }
    .maintenance-content h1 {
      color: #00d9ff;
      font-size: 2rem;
      margin-bottom: 20px;
    }
    .maintenance-content p {
      color: #fff;
      font-size: 1.2rem;
      margin-bottom: 30px;
    }

    /* NEW: Speech Detection Modal */
    #speechDetectModal {
      align-items: flex-end;
    }
    #speechDetectModal .modal-content {
      width: 96%;
      max-width: 950px;
      max-height: 94vh;
      overflow-y: auto;
    }
    @media (max-width: 600px) {
      #speechDetectModal {
        align-items: stretch !important;
        padding: 0 !important;
      }
      #speechDetectModal .modal-content {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 100vh !important;
        height: 100dvh !important;
        border-radius: 0 !important;
        margin: 0 !important;
        display: flex;
        flex-direction: column;
      }
      /* Top bar stays fixed */
      #speechDetectModal .sv-topbar {
        flex-shrink: 0;
      }
      /* Tabs shrink nicely */
      #speechDetectModal .sv-tabs {
        flex-shrink: 0;
        padding: 10px 10px 0 !important;
        gap: 4px !important;
      }
      #speechDetectModal .sv-tab {
        font-size: 0.72rem !important;
        padding: 8px 4px !important;
      }
      /* Content area scrolls */
      #speechDetectModal .sv-body {
        flex: 1;
        overflow-y: auto;
        margin: 0 10px !important;
        border-radius: 0 0 10px 10px !important;
        padding: 16px !important;
      }
      /* Step 2 video: stack vertically on mobile */
      #sv-step-2 .sv-vid-grid {
        grid-template-columns: 1fr !important;
      }
      /* Metric cards 2x2 stays but bigger text */
      #sv-step-2 .sv-metric-val {
        font-size: 1.6rem !important;
      }
      /* Buttons full-width, bigger tap targets */
      #sv-step-2 .sv-btn-row {
        flex-direction: column !important;
      }
      #sv-step-2 .sv-btn-row button {
        width: 100% !important;
        padding: 13px !important;
        font-size: 0.92rem !important;
      }
      /* Step 1 record buttons */
      #sv-step-1 .sv-record-row {
        flex-direction: column !important;
      }
      #sv-step-1 .sv-record-row button {
        width: 100% !important;
        padding: 13px !important;
        font-size: 0.92rem !important;
      }
      /* Step 3 summary cards stack */
      #sv-step-3 .sv-summary-row {
        flex-direction: column !important;
      }
    }

    /* NEW: Motivator Bot Modal */
    #motivatorBotModal .modal-content {
      width: 95%;
      max-width: 900px;
      max-height: 90vh;
      overflow-y: auto;
    }

    /* NEW: Ads Management Section */
    #adsManagement {
      display: none;
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      overflow-y: auto;
      z-index: 10;
      background: radial-gradient(circle at 20% 50%, #10294d 0%, #08111f 50%, #02060c 100%);
      padding: 20px;
    }
    #adsManagement .section-inner {
      background: rgba(6,16,32,0.95);
      padding: 20px;
      border-radius: 15px;
      width: 95%;
      max-width: 1000px;
      box-shadow: 0 0 25px rgba(0,217,255,0.2), inset 0 0 40px rgba(0,40,80,0.3);
      margin: 20px auto;
    }
    
    #adsManagement h2 {
      margin-bottom: 15px;
      color: #00d9ff;
      font-size: 1.5rem;
    }
    
    .add-ad-form {
      background: rgba(16,35,60,0.8);
      padding: 15px;
      border-radius: 10px;
      margin-bottom: 20px;
    }
    
    .add-ad-form h3 {
      color: #00d9ff;
      margin-bottom: 15px;
    }
    
    .add-ad-form input, .add-ad-form select, .add-ad-form textarea {
      width: 100%;
      padding: 10px;
      margin: 5px 0;
      border-radius: 8px;
      border: 1px solid rgba(0,217,255,0.15);
      background: rgba(16,35,60,0.9);
      color: #fff;
    }
    
    .add-ad-form textarea {
      height: 80px;
      resize: vertical;
    }
    
    .file-input-wrapper {
      position: relative;
      overflow: hidden;
      display: inline-block;
      width: 100%;
    }
    
    .file-input-wrapper input[type=file] {
      position: absolute;
      left: 0;
      top: 0;
      opacity: 0;
      width: 100%;
      height: 100%;
      cursor: pointer;
    }
    
    .file-input-label {
      display: block;
      padding: 10px;
      background: rgba(20,45,75,0.9);
      border-radius: 8px;
      text-align: center;
      cursor: pointer;
      border: 1px dashed rgba(0,217,255,0.25);
    }
    
    .file-input-label:hover {
      background: #555;
    }
    
    .file-preview {
      margin-top: 10px;
      text-align: center;
    }
    
    .file-preview img, .file-preview video {
      max-width: 100%;
      max-height: 200px;
      border-radius: 8px;
    }
    
    .ads-list {
      margin-top: 20px;
    }
    
    .ad-item {
      background: rgba(16,35,60,0.8);
      padding: 15px;
      border-radius: 10px;
      margin: 10px 0;
    }
    
    .ad-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 10px;
    }
    
    .ad-preview {
      margin: 10px 0;
      text-align: center;
    }
    
    .ad-preview img, .ad-preview video {
      max-width: 100%;
      max-height: 150px;
      border-radius: 8px;
    }
    
    .ad-details {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin-bottom: 10px;
    }
    
    .ad-actions {
      display: flex;
      gap: 10px;
      margin-top: 10px;
    }
    
    .delete-ad-btn {
      background: linear-gradient(135deg, #b30000, #ff3b3b);
      color: white;
      border: none;
      padding: 8px 15px;
      border-radius: 20px;
      cursor: pointer;
    }
    
    /* NEW: Ad Display Modal */
    #adModal {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0,0,0,0.9);
      z-index: 3000;
      justify-content: center;
      align-items: center;
    }
    
    .ad-content {
      position: relative;
      max-width: 90%;
      max-height: 90%;
      text-align: center;
    }
    
    .ad-content img, .ad-content video {
      max-width: 100%;
      max-height: 80vh;
      border-radius: 10px;
    }
    
    .skip-ad-btn, .close-ad-btn {
      position: absolute;
      top: 10px;
      right: 10px;
      background: rgba(0,0,0,0.7);
      color: white;
      border: none;
      padding: 8px 15px;
      border-radius: 20px;
      cursor: pointer;
      font-size: 14px;
    }
    
    .skip-ad-btn:hover, .close-ad-btn:hover {
      background: rgba(0,100,170,0.7);
    }
    
    .ad-timer {
      position: absolute;
      top: 10px;
      left: 10px;
      background: rgba(0,0,0,0.7);
      color: white;
      padding: 5px 10px;
      border-radius: 20px;
      font-size: 14px;
    }

    /* Animations */
    @keyframes fadeIn { to { opacity: 1; } }

    /* Mobile-specific styles */
    @media (max-width: 768px) {
      #hospitalAnalyticsGrid { grid-template-columns: 1fr !important; }
      #hospitalDashBody { padding: 14px 12px 30px; }
      .hdb-card { padding: 14px; }
      #hospitalPerfChart { height: 240px !important; min-height: 240px; }
      #hospitalPerfChart canvas { height: 240px !important; }
    }
    @media (max-width: 768px) {
      .header {
        top: 5px;
        left: 10px;
        right: 10px;
        width: calc(100% - 20px);
      }
      
      .logo { height: 35px; }
      
      .login-form, #patientForm .form-inner, #showPatients .list-inner, #quiz .quiz-inner, #results .results-inner {
        width: 95%;
        padding: 15px;
      }
      
      #splash h1 { font-size: 52px; letter-spacing: 2px; }
      .splash-brain { font-size: 80px; }
      .splash-tagline { font-size: 14px; padding: 0 20px; }
      
      .modal-content {
        padding: 15px;
      }
      
      #resultButtons button {
        min-width: 120px;
        font-size: 12px;
        padding: 8px 12px;
      }
      
      .user-options {
        grid-template-columns: 1fr;
      }
      
      .patient-details-grid {
        grid-template-columns: 1fr;
      }
      
      .admin-options {
        grid-template-columns: 1fr;
      }
      
      .hacker-options {
        grid-template-columns: 1fr;
      }
      
      .stats-grid {
        grid-template-columns: 1fr;
      }
      
      .admin-patient-details {
        grid-template-columns: 1fr;
      }
      
      .admin-patient-filters {
        flex-direction: column;
      }
      
      .patient-login-details {
        grid-template-columns: 1fr;
      }
      
      .patient-login-filters {
        flex-direction: column;
      }
      
      .system-settings-grid {
        grid-template-columns: 1fr;
      }
      
      .patient-login-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
      }
      
      .ad-details {
        grid-template-columns: 1fr;
      }
      
      .ad-actions {
        flex-direction: column;
      }
      
      /* NEW: Mobile adjustments for support chat button */
      #supportChatBtn {
        width: 50px;
        height: 50px;
        bottom: 15px;
        left: 15px;
        font-size: 20px;
      }
    }

    @media (max-width: 480px) {
      #splash h1 { font-size: 36px; }
      .splash-brain { font-size: 64px; }
      .splash-tagline { font-size: 12px; }
      
      .logo { height: 30px; }
      
      .login-form h2, #patientForm h2, #showPatients h2, #results h2, #quiz h2, .modal-content h2 {
        font-size: 1.3rem;
      }
      
      #questionText {
        font-size: 1.1rem;
      }
      
      .option-btn {
        padding: 10px;
        font-size: 14px;
      }
      
      #resultButtons {
        gap: 8px;
      }
      
      #resultButtons button {
        min-width: 100px;
        font-size: 11px;
        padding: 6px 10px;
      }
      
      /* NEW: Smaller mobile adjustments */
      #supportChatBtn {
        width: 45px;
        height: 45px;
        bottom: 10px;
        left: 10px;
        font-size: 18px;
      }
    }
