
/* Smaller, tighter nav links so they fit on one line on md+ */
.hb-nav-link {
    font-size: 0.95rem;
    padding: 0.5rem 0.9rem;
    min-width: auto;
    font-weight: 700;
    border-radius: 0.5rem;
  }
  
  /* Hover / active still look nice in both modes */
  .hb-nav-link:hover {
    background-color: #d0e8d5;
    color: #2e7d32;
  }
  
  body.dark .hb-nav-link:hover {
    background-color: #3e5d43;
    color: #a5d6a7;
  }
  
  
  /* ==========================================================================
     1. RESET & GLOBAL STYLES
     ========================================================================== */
     * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
  }
  
  html {
      font-size: 16px; /* Base font size for rem units */
  }
  
  body {
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', sans-serif;
      line-height: 1.6;
      color: #1a1a1a;
      background-color: #e8f5e9; /* Soft light green */
      min-height: 100vh;
      transition: background-color 0.3s ease, color 0.3s ease;
  }
  
  .container {
      max-width: 1200px;
      margin: 0 auto;
      padding: 20px;
  }
  
  
  
  @keyframes fadeIn {
      from {
          opacity: 0;
          transform: translateY(10px);
      }
  
      to {
          opacity: 1;
          transform: translateY(0);
      }
  }
  
  /* ==========================================================================
     2. TYPOGRAPHY & BRANDING
     ========================================================================== */
  .font-brand {
      font-family: 'Montserrat', sans-serif !important;
      font-weight: 800 !important;
  }
  
  h1, h2, h3 {
      transition: color 0.3s ease;
  }
  
  small {
      color: #6b7280;
      font-size: 0.85rem;
      display: block;
      margin-top: 4px;
      transition: color 0.3s ease;
  }
  
  /* ==========================================================================
     3. LAYOUT COMPONENTS (Navbar, Header, Tabs, Sections)
     ========================================================================== */
  /* Navbar Base */
  .navbar {
      background-color: #a1bfa8; /* Muted sage green */
      min-height: 100px !important;
      padding: 16px 0 !important;
      display: flex;
      align-items: center;
      transition: background-color 0.3s ease;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      z-index: 50;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  
      .navbar .menu-horizontal {
          gap: 0.75rem;
          padding: 0 0.25rem;
      }
  
          .navbar .menu-horizontal li {
              list-style: none;
          }
  
          .navbar .menu-horizontal a {
              color: #1a1a1a;
              font-size: 1.125rem;
              font-weight: 700;
              padding: 0.875rem 1.75rem;
              border-radius: 0.5rem;
              transition: all 0.3s ease;
              text-decoration: none;
              display: flex;
              align-items: center;
              justify-content: center;
              min-width: 100px;
          }
  
              .navbar .menu-horizontal a:hover {
                  background-color: #d0e8d5;
                  color: #2e7d32;
              }
  
              .navbar .menu-horizontal a.active {
                  background-color: #a1bfa8;
                  color: #2e7d32;
                  font-weight: 700;
              }
  
      .navbar a.text-base-content {
          color: #000000;
          transition: color 0.3s ease;
      }
  
          .navbar a.text-base-content:hover {
              color: #4caf50;
          }
  
  /* Header */
  .header {
      background: #a1bfa8;
      -webkit-backdrop-filter: blur(10px);
      backdrop-filter: blur(10px);
      color: #1a1a1a;
      padding: 15px;
      border-radius: 12px;
      margin-bottom: 30px;
      text-align: center;
      border: 1px solid rgba(255, 255, 255, 0.2);
      transition: background 0.3s ease, color 0.3s ease;
  }
  
      .header h1 {
          font-size: 2.5rem;
          font-weight: 400;
          margin-bottom: 10px;
          background: linear-gradient(135deg, #2e7d32, #4caf50);
          -webkit-background-clip: text;
          -webkit-text-fill-color: transparent;
          background-clip: text;
      }
  
      .header p {
          font-size: 1.1rem;
          color: #4b5563;
          font-weight: 400;
          transition: color 0.3s ease;
      }
  
  /* Tabs */
  .tabs {
      display: flex;
      margin-bottom: 30px;
      background: rgba(255, 255, 255, 0.1);
      -webkit-backdrop-filter: blur(10px);
      backdrop-filter: blur(10px);
      border-radius: 12px;
      padding: 4px;
      border: 1px solid rgba(255, 255, 255, 0.2);
      transition: background 0.3s ease;
  }
  
  .tab {
      background: transparent;
      padding: 12px 24px;
      cursor: pointer;
      border-radius: 8px;
      color: rgba(0, 0, 0, 0.8);
      font-weight: 500;
      transition: all 0.3s ease;
      border: none;
      flex: 1;
      text-align: center;
      box-shadow: 0 8px 32px rgba(208, 232, 213, 0.25);
  }
  
      .tab:hover {
          background: #d0e8d5;
          color: #2e7d32;
      }
  
      .tab.active {
          background: #d0e8d5;
          color: #2e7d32;
          box-shadow: 0 8px 32px rgba(208, 232, 213, 0.25);
      }
  
  .tab-content {
      display: none;
  }
  
      .tab-content.active {
          display: grid;
          grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
          gap: 24px;
          animation: fadeIn 0.3s ease-in-out;
      }
  
  /* Sections & Cards */
  .section,
  .card {
      background: rgba(232, 245, 233, 0.95);
      -webkit-backdrop-filter: blur(10px);
      backdrop-filter: blur(10px);
      padding: 32px;
      border-radius: 16px;
      box-shadow: 0 8px 32px rgba(208, 232, 213, 0.25);
      border: 1px solid rgba(255, 255, 255, 0.2);
      transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  }
  
      .section:hover,
      .card:hover {
          transform: translateY(-2px);
          box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
      }
  
      .section h2,
      .card h2 {
          color: #1a1a1a;
          margin-bottom: 24px;
          font-size: 1.5rem;
          font-weight: 600;
          display: flex;
          align-items: center;
          gap: 8px;
          transition: color 0.3s ease;
      }
  
  /* ==========================================================================
     4. FORM ELEMENTS & INPUTS
     ========================================================================== */
  .form-group {
      margin-bottom: 20px;
  }
  
  label {
      display: block;
      margin-bottom: 8px;
      font-weight: 500;
      color: #374151;
      font-size: 0.9rem;
      transition: color 0.3s ease;
  }
  
  input,
  select,
  textarea,
  .input {
      width: 100%;
      padding: 12px 16px;
      border: 2px solid #d0e8d5;
      border-radius: 8px;
      font-size: 16px;
      background: white;
      color: #1a1a1a;
      transition: all 0.3s ease;
  }
  
      input:focus,
      select:focus,
      textarea:focus,
      .input:focus {
          outline: none;
          border-color: #4caf50;
          box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
      }
  
      input[type="checkbox"] {
          width: auto;
          margin-right: 8px;
      }
  
  /* ==========================================================================
     5. BUTTONS & INTERACTIONS
     ========================================================================== */
  button,
  .btn-primary {
      background: linear-gradient(135deg, #4caf50, #2e7d32);
      color: white;
      padding: 12px 24px;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      font-size: 16px;
      font-weight: 500;
      margin-right: 12px;
      margin-bottom: 12px;
      transition: all 0.3s ease;
      box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
  }
  
      button:hover,
      .btn-primary:hover {
          transform: translateY(-1px);
          box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
      }
  
      button:active {
          transform: translateY(0);
      }
  
      button:disabled {
          background: #9ca3af;
          cursor: not-allowed;
          transform: none;
          box-shadow: none;
      }
  
  /* Variant Buttons */
  .btn-success {
      background: linear-gradient(135deg, #10b981, #059669) !important;
      box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
  }
  
      .btn-success:hover {
          box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4) !important;
      }
  
  .btn-danger {
      background: linear-gradient(135deg, #ef4444, #dc2626) !important;
      box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
  }
  
      .btn-danger:hover {
          box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4) !important;
      }
  
  .btn-warning {
      background: linear-gradient(135deg, #f59e0b, #d97706) !important;
      box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3) !important;
  }
  
      .btn-warning:hover {
          box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4) !important;
      }
  
  /* Accessibility */
  a:hover,
  button:hover {
      opacity: 0.9;
  }
  
  button:focus,
  input:focus,
  a:focus {
      outline: 2px solid #4caf50;
      outline-offset: 2px;
  }
  
  /* ==========================================================================
     6. RESPONSE & STATUS MESSAGES
     ========================================================================== */
  .response,
  .status {
      padding: 16px;
      border-radius: 8px;
      margin-top: 20px;
      font-size: 14px;
      border: 2px solid;
      transition: all 0.3s ease;
      white-space: pre-wrap;
      font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
      max-height: 300px;
      overflow-y: auto;
      line-height: 1.5;
  }
  
  .response {
      background: #f8fafc;
      border-color: #d0e8d5;
      color: #1a1a1a;
      font-size: 13px;
  }
  
  .success {
      background: #ecfdf5;
      border-color: #10b981;
      color: #065f46;
  }
  
  .error {
      background: #fef2f2;
      border-color: #ef4444;
      color: #991b1b;
  }
  
  .status.info {
      background: #eff6ff;
      border-color: #3b82f6;
      color: #1e40af;
  }
  
  /* Scrollbar for Responses */
  .response::-webkit-scrollbar {
      width: 6px;
  }
  
  .response::-webkit-scrollbar-track {
      background: #f1f5f9;
      border-radius: 3px;
      transition: background 0.3s ease;
  }
  
  .response::-webkit-scrollbar-thumb {
      background: #a5d6a7;
      border-radius: 3px;
  }
  
      .response::-webkit-scrollbar-thumb:hover {
          background: #81c784;
      }
  
  /* ==========================================================================
     7. RESPONSIVE DESIGN (Media Queries)
     ========================================================================== */
  @media (max-width: 768px) {
      .container {
          padding: 16px;
      }
  
      .tab-content.active {
          grid-template-columns: 1fr;
      }
  
      .tabs {
          flex-direction: column;
      }
  
      .tab {
          margin-bottom: 4px;
      }
  
      .header h1 {
          font-size: 2rem;
      }
  
      .section,
      .card {
          padding: 24px;
      }
  
      .navbar .menu-horizontal {
          flex-wrap: wrap;
          justify-content: center;
          gap: 0.5rem;
      }
  
          .navbar .menu-horizontal a {
              padding: 0.75rem 1.25rem;
              font-size: 1rem;
              min-width: 80px;
          }
  
      .text-3xl {
          font-size: 1.75rem !important;
      }
  
      .text-4xl {
          font-size: 2.5rem !important;
      }
  
      .text-5xl {
          font-size: 2.5rem !important;
      }
  }
  
  /* ==========================================================================
     8. DARK MODE OVERRIDES
     ========================================================================== */
  body.dark {
      background-color: #1a2b1e;
      color: #e0e0e0;
  }
  
      body.dark .navbar {
          background-color: #2e4d33;
      }
  
          body.dark .navbar .menu-horizontal a {
              color: #e0e0e0;
          }
  
              body.dark .navbar .menu-horizontal a:hover {
                  background-color: #3e5d43;
                  color: #a5d6a7;
              }
  
              body.dark .navbar .menu-horizontal a.active {
                  background-color: #2e4d33;
                  color: #81c784;
              }
  
          body.dark .navbar a.text-base-content {
              color: #f8f8f8;
          }
  
              body.dark .navbar a.text-base-content:hover {
                  color: #81c784;
              }
  
      body.dark .header {
          background: #2e4d33;
          color: #e0e0e0;
      }
  
          body.dark .header p {
              color: #a0a0a0;
          }
  
      body.dark .tabs {
          background: rgba(0, 0, 0, 0.2);
      }
  
      body.dark .tab {
          color: #e0e0e0;
          box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
      }
  
          body.dark .tab:hover {
              background: #3e5d43;
              color: #a5d6a7;
          }
  
          body.dark .tab.active {
              background: #3e5d43;
              color: #a5d6a7;
              box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
          }
  
      body.dark .section,
      body.dark .card {
          background: rgba(30, 50, 35, 0.95);
          box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
          border: 1px solid rgba(255, 255, 255, 0.1);
      }
  
          body.dark .section h2,
          body.dark .card h2 {
              color: #e0e0e0;
          }
  
      body.dark label {
          color: #d0d0d0;
      }
  
      body.dark input,
      body.dark select,
      body.dark textarea,
      body.dark .input {
          background: #2e4d33;
          border-color: #3e5d43;
          color: #e0e0e0;
      }
  
          body.dark input:focus,
          body.dark select:focus,
          body.dark textarea:focus,
          body.dark .input:focus {
              border-color: #81c784;
              box-shadow: 0 0 0 3px rgba(129, 199, 132, 0.1);
          }
  
          body.dark button:focus,
          body.dark input:focus,
          body.dark a:focus {
              outline-color: #81c784;
          }
  
      body.dark .btn-primary {
          background: linear-gradient(135deg, #81c784, #4caf50);
          box-shadow: 0 4px 12px rgba(129, 199, 132, 0.3);
      }
  
          body.dark .btn-primary:hover {
              box-shadow: 0 6px 16px rgba(129, 199, 132, 0.4);
          }
  
      body.dark .response {
          background: #1a2b1e;
          border-color: #3e5d43;
          color: #e0e0e0;
      }
  
          body.dark .response::-webkit-scrollbar-track {
              background: #2e4d33;
          }
  
          body.dark .response::-webkit-scrollbar-thumb {
              background: #3e5d43;
          }
  
              body.dark .response::-webkit-scrollbar-thumb:hover {
                  background: #81c784;
              }
  
      body.dark small {
          color: #a0a0a0;
      }
  
      body.dark .status.success {
          background: #022b1a;
          border-color: #4caf50;
          color: #81c784;
      }
  
      body.dark .status.error {
          background: #2e0b0b;
          border-color: #ef4444;
          color: #fca5a5;
      }
  
      body.dark .status.info {
          background: #1e3a8a;
          border-color: #60a5fa;
          color: #93c5fd;
      }
  
      body.dark .success {
          background: #022b1a;
          border-color: #4caf50;
          color: #81c784;
      }
  
      body.dark .error {
          background: #2e0b0b;
          border-color: #ef4444;
          color: #fca5a5;
      }
  
  
  
  /* Quick Book Page Enhancements */
  #quickBookForm {
      transition: all 0.3s ease;
  }
  
      #quickBookForm select,
      #quickBookForm input,
      #quickBookForm textarea {
          transition: border-color 0.3s ease;
      }
  
      /* Focus Styles (already in global, but reinforce) */
      #quickBookForm:focus-within {
          border-color: #4caf50;
          box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
      }
  
  body.dark #quickBookForm:focus-within {
      box-shadow: 0 0 0 3px rgba(129, 199, 132, 0.1);
  }
  
  /* Response Alignment */
  #bookResponse {
      text-align: center;
  }
  
  
  /* ==========================================================================
     9. FORCE DARK MODE ON bg-white CARDS (FIX FOR STAT CARDS)
     ========================================================================== */
  body.dark .bg-white {
      background-color: #2e4d33 !important;
      border: 1px solid #3e5d43 !important;
      box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3) !important;
  }
  
      body.dark .bg-white * {
          color: #e0e0e0 !important;
      }
  
      body.dark .bg-white i {
          color: #81c784 !important;
      }
  
      body.dark .bg-white h3 {
          color: #a5d6a7 !important;
      }
  
      body.dark .bg-white p {
          color: #a0a0a0 !important;
      }
  
  
  /* ==========================================================================
     USER DROPDOWN � DARK MODE ONLY 
     ========================================================================== */
  body.dark .dropdown-content {
      background-color: #2e4d33 !important;
      border-color: #3e5d33 !important;
      color: #e0e0e0 !important;
  }
  
      body.dark .dropdown-content a {
          color: #e0e0e0 !important;
      }
  
          body.dark .dropdown-content a:hover {
              background-color: #3e5d43 !important;
          }
  
  
          /* Upcoming Appointments: default row styling for any direct child */
  #upcomingAppointments > * {
    background: #ffffff;
    border: 1px solid #d0e8d5;
    border-radius: 0.5rem;      /* 8px */
    padding: 0.75rem 1rem;      /* 12px 16px */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }
  
  /* Dark mode for those rows */
  body.dark #upcomingAppointments > * {
    background: #2e4d33;
    border-color: #3e5d43;
    color: #e0e0e0;
  }
  
  /* Optional: muted subtext inside rows */
  #upcomingAppointments > * .muted {
    color: #6b7280;
  }
  body.dark #upcomingAppointments > * .muted {
    color: #a0a0a0;
  }
  
  /* pill/badge inside rows */
  #upcomingAppointments > * .badge {
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    line-height: 1rem;
    background: #ecfdf5;     /* light green */
    color: #065f46;
  }
  body.dark #upcomingAppointments > * .badge {
    background: #1a2b1e;
    color: #81c784;
    border: 1px solid #3e5d43;
  }
  
  
  #upcomingAppointments > * {
    background: #ffffff;
    border: 1px solid #d0e8d5;
    border-radius: 0.5rem;
    padding: 1rem;
  }
  body.dark #upcomingAppointments > * {
    background: #2e4d33;
    border-color: #3e5d43;
    color: #e0e0e0;
  }
  
  /* student dashboard js */
  .btn-sm { padding: 8px 12px; font-size: 14px; border-radius: 8px; }
  
  
  
  /* Staff: Recent Records card should match theme */
  #records .bg-white.dark\:bg-\[\#2e4d33\] {
    border: 1px solid #d0e8d5;
  }
  body.dark #records .bg-white.dark\:bg-\[\#2e4d33\] {
    border-color: #3e5d43;
  }
  
  /* Make all text inside health records readable in dark mode */
  body.dark #healthRecordsList {
    color: #e0e0e0;
  }
  body.dark #healthRecordsList .text-gray-900,
  body.dark #healthRecordsList .text-gray-800,
  body.dark #healthRecordsList .text-gray-700 {
    color: #e0e0e0 !important;
  }
  body.dark #healthRecordsList .text-gray-600,
  body.dark #healthRecordsList .text-gray-500 {
    color: #a0a0a0 !important;
  }
  
/* Each record row gets the same shell as other cards */
#healthRecordsList > * {
  background: #ffffff;
  border: 1px solid #d0e8d5;
  border-radius: 0.5rem;
  padding: 1rem;
  overflow: hidden;
}
body.dark #healthRecordsList > * {
  background: #2e4d33;
  border-color: #3e5d43;
}

/* Fix text overflow in health records */
#healthRecordsList p,
#healthRecordsList span,
#healthRecordsList div {
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}

#healthRecordsList .flex-1 {
  min-width: 0; /* Allows flex child to shrink below content size */
  overflow: hidden;
}

/* Global fix for long text in modals and tables */
.modal-notes-text,
table td {
  word-break: break-all;
  overflow-wrap: break-word;
}

/* Table layout for patient details */
.table-fixed {
  table-layout: fixed;
}

.table-fixed td {
  overflow: hidden;
  text-overflow: ellipsis;
}
  
  /* Vitals grid labels in dark mode (you use <span class="font-medium">BP:</span>) */
  body.dark #healthRecordsList .font-medium {
    color: #e0e0e0;
  }
  
  /* Make light-gray surfaces dark in dark mode (fixes vitals row) */
  body.dark .bg-gray-50,
  body.dark .bg-slate-50,
  body.dark .bg-neutral-50 {
    background-color: #2e4d33 !important;
    border: 1px solid #3e5d43 !important; /* optional but looks consistent */
  }
  
  /* X Close Button – works in both light & dark mode */
  .close-x {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 1.5rem;
    line-height: 1;
    background: none;
    border: none;
    color: #374151;           /* dark gray for light mode */
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
  }
  
  .close-x:hover {
    color: #2e7d32;           /* HeartByte green hover */
    transform: scale(1.1);
  }
  
  /* Dark mode */
  body.dark .close-x {
    color: #e0e0e0;
  }
  body.dark .close-x:hover {
    color: #81c784;           /* soft mint green hover */
  }
  
  
  /* Profile completeness pill – light mode */
  .profile-pill {
    font-weight: 600;
  }
  
  .profile-pill-complete {
    background-color: #dcfce7; /* light green */
    color: #166534;           /* dark green */
  }
  
  .profile-pill-incomplete {
    background-color: #ffedd5; /* light orange */
    color: #9a3412;            /* dark orange */
  }
  
  /* Dark mode overrides (use !important to beat bg-white * rule) */
  body.dark .profile-pill-complete {
    background-color: #064e3b !important; /* deep green */
    color: #bbf7d0 !important;            /* mint text */
  }
  
  body.dark .profile-pill-incomplete {
    background-color: #7c2d12 !important; /* deep amber */
    color: #fed7aa !important;            /* soft amber text */
  }
  
  /* =========================================================
     Patient name hover preview
     ========================================================= */
  
  /* Make the names look a bit interactive */
  .patient-name-hover {
    cursor: pointer;
    text-decoration: underline dotted;
    text-underline-offset: 2px;
  }
  
  .patient-name-hover:hover {
    color: #2e7d32; /* HeartByte green */
  }
  
  body.dark .patient-name-hover:hover {
    color: #a5d6a7; /* minty green in dark mode */
  }
  
  /* The floating hover card that JS positions with top/left */
  #patientHoverCard {
    position: absolute;
    z-index: 60;
    min-width: 13rem;
    max-width: 18rem;
    padding: 0.75rem 0.9rem;
  
    background-color: #ffffff;
    border-radius: 0.5rem;
    border: 1px solid #d0e8d5;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  
    font-size: 0.75rem;
    line-height: 1.4;
    pointer-events: none; /* so it doesn't trap the mouse */
  }
  
  /* Dark mode styling for the hover card */
  body.dark #patientHoverCard {
    background-color: #1a2b1e;
    border-color: #3e5d43;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
    color: #e0e0e0;
  }
  
  /* =========================================================
     Staff Dashboard – Appointment hover tooltip
     ========================================================= */
  
  .appt-card {
    position: relative;
  }
  
  .appt-tooltip {
    position: absolute;
    top: 0.75rem;
    left: 100%;
    margin-left: 0.75rem;
    width: 15rem;
    padding: 0.75rem 0.9rem;
  
    background-color: #ffffff;
    border-radius: 0.5rem;
    border: 1px solid #d0e8d5;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  
    font-size: 0.75rem;
    line-height: 1.3;
    z-index: 40;
  
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
    transition:
      opacity 0.2s ease,
      transform 0.2s ease;
  }
  
  .appt-card:hover .appt-tooltip,
  .appt-card:focus-within .appt-tooltip {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  
  /* Dark mode */
  body.dark .appt-tooltip {
    background-color: #1a2b1e;
    border-color: #3e5d43;
    color: #e0e0e0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  }
  
  .appt-tooltip-title {
    font-weight: 700;
    color: #2e7d32;
    margin-bottom: 0.25rem;
  }
  
  body.dark .appt-tooltip-title {
    color: #a5d6a7;
  }
  
  .appt-tooltip-label {
    font-weight: 600;
    color: #374151;
  }
  
body.dark .appt-tooltip-label {
  color: #e0e0e0;
}

/* ==========================================================================
   ONBOARDING GUIDE STYLES
   ========================================================================== */

/* Overlay backdrop */
.onboarding-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 9998;
  transition: opacity 0.3s ease;
}

/* Highlighted element styling */
.onboarding-highlight {
  position: relative;
  z-index: 9999 !important;
  box-shadow: 0 0 0 4px #4caf50, 0 0 20px 8px rgba(76, 175, 80, 0.5) !important;
  border-radius: 8px !important;
  animation: onboarding-pulse 2s infinite;
}

@keyframes onboarding-pulse {
  0%, 100% {
    box-shadow: 0 0 0 4px #4caf50, 0 0 20px 8px rgba(76, 175, 80, 0.5);
  }
  50% {
    box-shadow: 0 0 0 6px #81c784, 0 0 30px 12px rgba(129, 199, 132, 0.6);
  }
}

/* Tooltip/Guide box */
.onboarding-tooltip {
  position: fixed;
  z-index: 10000;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  max-width: 360px;
  min-width: 280px;
  padding: 20px;
  animation: onboarding-tooltip-appear 0.3s ease;
}

body.dark .onboarding-tooltip {
  background: #2e4d33;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

@keyframes onboarding-tooltip-appear {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Tooltip arrow */
.onboarding-tooltip::before {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border: 10px solid transparent;
}

.onboarding-tooltip.arrow-top::before {
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-color: white;
}

body.dark .onboarding-tooltip.arrow-top::before {
  border-bottom-color: #2e4d33;
}

.onboarding-tooltip.arrow-bottom::before {
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  border-top-color: white;
}

body.dark .onboarding-tooltip.arrow-bottom::before {
  border-top-color: #2e4d33;
}

.onboarding-tooltip.arrow-left::before {
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  border-right-color: white;
}

body.dark .onboarding-tooltip.arrow-left::before {
  border-right-color: #2e4d33;
}

.onboarding-tooltip.arrow-right::before {
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  border-left-color: white;
}

body.dark .onboarding-tooltip.arrow-right::before {
  border-left-color: #2e4d33;
}

/* Tooltip header */
.onboarding-tooltip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.onboarding-tooltip-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2e7d32;
  margin: 0;
}

body.dark .onboarding-tooltip-title {
  color: #a5d6a7;
}

.onboarding-tooltip-step {
  font-size: 0.75rem;
  color: #6b7280;
  background: #f3f4f6;
  padding: 4px 10px;
  border-radius: 12px;
}

body.dark .onboarding-tooltip-step {
  color: #a0a0a0;
  background: #1a2b1e;
}

/* Tooltip content */
.onboarding-tooltip-content {
  font-size: 0.9rem;
  color: #4b5563;
  line-height: 1.5;
  margin-bottom: 16px;
}

body.dark .onboarding-tooltip-content {
  color: #d0d0d0;
}

/* Tooltip buttons */
.onboarding-tooltip-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.onboarding-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.onboarding-btn-skip {
  background: transparent;
  color: #6b7280;
}

.onboarding-btn-skip:hover {
  color: #374151;
  background: #f3f4f6;
}

body.dark .onboarding-btn-skip {
  color: #a0a0a0;
}

body.dark .onboarding-btn-skip:hover {
  color: #e0e0e0;
  background: #1a2b1e;
}

.onboarding-btn-prev {
  background: #e5e7eb;
  color: #374151;
}

.onboarding-btn-prev:hover {
  background: #d1d5db;
}

body.dark .onboarding-btn-prev {
  background: #3e5d43;
  color: #e0e0e0;
}

body.dark .onboarding-btn-prev:hover {
  background: #4a6b50;
}

.onboarding-btn-next,
.onboarding-btn-finish {
  background: linear-gradient(135deg, #4caf50, #2e7d32);
  color: white;
}

.onboarding-btn-next:hover,
.onboarding-btn-finish:hover {
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
  transform: translateY(-1px);
}

/* Progress dots */
.onboarding-progress {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

body.dark .onboarding-progress {
  border-top-color: #3e5d43;
}

.onboarding-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d1d5db;
  transition: all 0.3s ease;
}

body.dark .onboarding-dot {
  background: #3e5d43;
}

.onboarding-dot.active {
  background: #4caf50;
  transform: scale(1.25);
}

.onboarding-dot.completed {
  background: #81c784;
}

/* Welcome modal */
.onboarding-welcome {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000;
  background: white;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
  max-width: 450px;
  width: 90%;
  padding: 32px;
  text-align: center;
  animation: onboarding-welcome-appear 0.4s ease;
}

body.dark .onboarding-welcome {
  background: #2e4d33;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

@keyframes onboarding-welcome-appear {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.onboarding-welcome-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #4caf50, #2e7d32);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.onboarding-welcome-icon i {
  font-size: 36px;
  color: white;
}

.onboarding-welcome h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2e7d32;
  margin-bottom: 12px;
}

body.dark .onboarding-welcome h2 {
  color: #a5d6a7;
}

.onboarding-welcome p {
  font-size: 1rem;
  color: #4b5563;
  margin-bottom: 24px;
  line-height: 1.5;
}

body.dark .onboarding-welcome p {
  color: #d0d0d0;
}

.onboarding-welcome-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.onboarding-welcome-buttons .onboarding-btn {
  width: 100%;
  padding: 12px 20px;
}

/* Settings link for reopening guide */
.onboarding-reopen-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #f3f4f6;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 12px;
}

.onboarding-reopen-link:hover {
  background: #e5e7eb;
}

body.dark .onboarding-reopen-link {
  background: #1a2b1e;
}

body.dark .onboarding-reopen-link:hover {
  background: #2e4d33;
}

.onboarding-reopen-link i {
  color: #4caf50;
}

.onboarding-reopen-link span {
  color: #374151;
  font-size: 0.875rem;
}

body.dark .onboarding-reopen-link span {
  color: #e0e0e0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .onboarding-tooltip {
    max-width: 90%;
    min-width: 260px;
    padding: 16px;
    left: 50% !important;
    transform: translateX(-50%);
  }

  .onboarding-welcome {
    padding: 24px;
  }

  .onboarding-tooltip-buttons {
    flex-wrap: wrap;
  }

  .onboarding-btn {
    flex: 1;
    min-width: 80px;
  }
}

