
/* 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;
}
body.dark #healthRecordsList > * {
  background: #2e4d33;
  border-color: #3e5d43;
}

/* 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 */
}



/* =========================================================
   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;
}

