    body {
             font-family: 'Manrope', sans-serif;
         }
         /* Hide arrows in number inputs */
         input::-webkit-outer-spin-button,
         input::-webkit-inner-spin-button {
             -webkit-appearance: none;
             margin: 0;
         }
         input[type=number] {
             -moz-appearance: textfield;
         }


    
           .glass-effect {
            background: rgba(255, 255, 255, 0.7);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid rgba(255, 255, 255, 0.3);
        }
        .dark .glass-effect {
            background: rgba(16, 34, 34, 0.7);
            border: 1px solid rgba(19, 236, 236, 0.1);
        }
        .bg-blob {
            filter: blur(80px);
            z-index: -1;
        }

    


       
        .signature-wrapper { background: white; border: 2px solid #ccc; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
        canvas { cursor: crosshair; display: block; touch-action: none; } /* touch-action: none prevents scrolling while signing */
        .controls { margin-top: 15px; display: flex; gap: 10px; }
        button { padding: 10px 20px; border: none; border-radius: 4px; cursor: pointer; font-weight: bold; }
        .clear-btn { background-color: #e74c3c; color: white; padding: 5px 15px; }
        .save-btn { background-color: #2ecc71; color: white;padding: 5px 15px; }

       
    a.pdm {
    display: table; width: 100%;
}




/* Scroll only when the component or its flex layout gives it a bounded
   height. A global 100vh here breaks compact dropdowns with max-h-* classes. */
.overflow-y-auto {
  overflow-y: auto;
}

/* 2. Define the width of the scrollbar */
.overflow-y-auto::-webkit-scrollbar {
  width: 8px;
}

/* 3. The Track (the background area) */
.overflow-y-auto::-webkit-scrollbar-track {
  background: transparent; 
}

/* 4. The Thumb (the draggable bar) */
.overflow-y-auto::-webkit-scrollbar-thumb {
  background: #6b7280; /* A muted grey similar to your image */
  border-radius: 10px; /* Rounds the edges */
  border: 2px solid transparent; /* Creates padding effect if needed */
}

/* 5. Hover effect for better UX */
.overflow-y-auto::-webkit-scrollbar-thumb:hover {
  background: #9ca3af; 
}


/* Firefox Support */
.overflow-y-auto {
  scrollbar-width: thin;
  scrollbar-color: #6b7280 transparent;
}

.bg-white-s {
    background-color:#ffff !important
}

.bg-surface-container {
 
    background-color: rgb(241 245 249) !important;
}

.peer:checked ~ .peer-checked\:bg-primary-container {
    --tw-bg-opacity: 1;
    background-color:rgb(17 212 115 / var(--tw-text-opacity, 1))!important;}


    

@media only screen and (max-width: 1300px) and (min-width: 1151px) {
   .reshed {
    width: 40%;
   }
   .resrightt{    
    width: 74%,

   }

   .overflow-x-auto {
    overflow-x: auto;max-width: 1200px;
   }
}


@media only screen and (max-width: 1150px) {
   .reshed {
    width: 40%;
   }
   .resrightt{    
    width: 74%;max-width: 1100px;

   }
}


/* ============================================
   RESPONSIVE SIDEBAR & LAYOUT SYSTEM
   ============================================ */

/* Hamburger button - hidden on desktop */
#hamburger-btn {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 30;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #1e293b;
    color: white;
    border: none;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: background 0.2s, opacity 0.2s, transform 0.2s;
    padding: 0;
    font-size: 24px;
    line-height: 1;
}

#hamburger-btn:hover {
    background: #334155;
}

/* Hide hamburger when sidebar is open */
#hamburger-btn.sidebar-is-open {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-20px);
}

/* Sidebar overlay - hidden by default */
#sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 35;
    opacity: 0;
    transition: opacity 0.3s ease;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

#sidebar-overlay.active {
    opacity: 1;
}

/* ---- Below 1024px: Mobile/Tablet responsive ---- */
/* Keep the drawer behavior limited to tablets and phones. The previous
   3200px breakpoint hid the sidebar on normal desktop screens as well. */
@media (max-width: 1023px) {

    /* Show hamburger */
    #hamburger-btn {
        display: flex;
    }

    /* Show overlay element */
    #sidebar-overlay {
        display: block;
        pointer-events: none;
    }

    #sidebar-overlay.active {
        pointer-events: auto;
    }

    /* Sidebar: off-screen by default, slides in */
    #sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: fixed !important;
        top: 0;
        left: 0;
        height: 100vh !important;
        width: 280px !important;
        z-index: 40 !important;
    }

    #sidebar.sidebar-open {
        transform: translateX(0);
    }

    /* Main content: remove sidebar margin, full width */
    #main-content,
    main.ml-64,
    main[class*="ml-64"] {
        margin-left: 0 !important;
        width: 100% !important;
        padding-top: 72px !important;
    }

    /* Reduce large padding on mobile */
    .p-8 {
        padding: 16px !important;
    }

    main .p-8,
    #main-content .p-8,
    #main-content > header.p-8,
    header .p-8 {
        padding: 16px !important;
    }

    .px-8 {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .pb-8 {
        padding-bottom: 16px !important;
    }

    /* Header flex: stack on mobile */
    main > header > .flex,
    #main-content > header > .flex,
    header .flex.justify-between {
        flex-wrap: wrap;
        gap: 12px;
    }

    /* Tables: horizontal scroll */
    .overflow-x-auto,
    table {
        max-width: 100%;
    }

    .overflow-x-auto {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

   

  

    .lg\:col-span-2 {
        grid-column: span 1 !important;
    }

    /* Search inputs and button groups */
    .relative.w-72 {
        width: 100% !important;
    }

    /* Metric cards: smaller padding on mobile */
    .metric-card {
        padding: 16px !important;
    }

    /* Filter selects: stack nicely */
    .filter-select {
        min-width: 0;
        font-size: 12px;
    }
}







/* ---- Below 1024px: Mobile/Tablet responsive ---- */
@media (max-width: 1023px) {

    /* Show hamburger */
    #hamburger-btn {
        display: flex;
    }

    /* Show overlay element */
    #sidebar-overlay {
        display: block;
        pointer-events: none;
    }

    #sidebar-overlay.active {
        pointer-events: auto;
    }

    /* Sidebar: off-screen by default, slides in */
    #sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: fixed !important;
        top: 0;
        left: 0;
        height: 100vh !important;
        width: 280px !important;
        z-index: 40 !important;
    }

    #sidebar.sidebar-open {
        transform: translateX(0);
    }

    /* Main content: remove sidebar margin, full width */
    #main-content,
    main.ml-64,
    main[class*="ml-64"] {
        margin-left: 0 !important;
        width: 100% !important;
        padding-top: 72px !important;
    }

    /* Reduce large padding on mobile */
    .p-8 {
        padding: 16px !important;
    }

    main .p-8,
    #main-content .p-8,
    #main-content > header.p-8,
    header .p-8 {
        padding: 16px !important;
    }

    .px-8 {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .pb-8 {
        padding-bottom: 16px !important;
    }

    /* Header flex: stack on mobile */
    main > header > .flex,
    #main-content > header > .flex,
    header .flex.justify-between {
        flex-wrap: wrap;
        gap: 12px;
    }

    /* Tables: horizontal scroll */
    .overflow-x-auto,
    table {
        max-width: 100%;
    }

    .overflow-x-auto {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Grid overrides for mobile */
    .grid.grid-cols-1.md\:grid-cols-2.lg\:grid-cols-4 {
        grid-template-columns: 1fr 1fr !important;
    }

    .grid.grid-cols-1.lg\:grid-cols-3 {
        grid-template-columns: 1fr !important;
    }

    .lg\:col-span-2 {
        grid-column: span 1 !important;
    }

    /* Search inputs and button groups */
    .relative.w-72 {
        width: 100% !important;
    }

    /* Metric cards: smaller padding on mobile */
    .metric-card {
        padding: 16px !important;
    }

    /* Filter selects: stack nicely */
    .filter-select {
        min-width: 0;
        font-size: 12px;
    }
}

/* ---- Below 640px: Small phones ---- */
@media (max-width: 639px) {

    /* Single column grids */
    .grid.grid-cols-1.md\:grid-cols-2.lg\:grid-cols-4,
    .grid.grid-cols-1.md\:grid-cols-3,
    .grid.grid-cols-1.md\:grid-cols-2 {
        grid-template-columns: 1fr !important;
    }

    /* Smaller text */
    h1 {
        font-size: 1.25rem !important;
    }

    /* Stack header actions */
    header .flex.items-center.gap-2,
    header .flex.items-center.gap-3,
    header .flex.items-center.gap-4 {
        flex-wrap: wrap;
    }

    /* Full-width buttons on very small screens */
    header button,
    header a > button {
        width: 100%;
        justify-content: center;
    }

    /* Pagination: compact */
    .p-6.flex.items-center.justify-between {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }

    /* Notification dropdown: fit screen */
    .absolute.right-0.mt-2.w-80 {
        width: calc(100vw - 32px) !important;
        right: -60px !important;
    }

    /* Filter row: wrap */
    .flex.items-center.gap-3 {
        flex-wrap: wrap;
    }
}

/* ==========================================================
   MEDLINK CLINIC SYSTEM THEME
   Shared visual language for operational pages
   ========================================================== */
:root {
    --medlink-navy: #0d1b35;
    --medlink-navy-2: #173d5a;
    --medlink-teal: #145667;
    --medlink-green: #10d477;
    --medlink-green-dark: #08aa62;
    --medlink-canvas: #f3f7fb;
    --medlink-border: #dbe7f1;
    --medlink-ink: #10213d;
}

/* Keep the mobile drawer crisp: the dimmer must sit behind the sidebar. */
#sidebar-overlay {
    z-index: 100 !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}
#sidebar {
    z-index: 110 !important;
    filter: none !important;
    opacity: 1 !important;
}
#hamburger-btn { z-index: 120 !important; }

/* Desktop navigation: keep the workspace clear and reveal the drawer when
   the pointer reaches the left edge or keyboard focus enters a menu item.
   Touch layouts keep the existing hamburger/overlay drawer below 1024px. */
@media (min-width: 1024px) {
    #sidebar.medlink-sidebar {
        transform: translateX(calc(-100% + 18px)) !important;
        transition: transform .24s cubic-bezier(.4, 0, .2, 1), box-shadow .24s ease !important;
        box-shadow: 8px 0 24px rgba(2, 19, 41, .08);
    }

    #sidebar.medlink-sidebar:hover,
    #sidebar.medlink-sidebar:focus-within,
    #sidebar.medlink-sidebar.sidebar-open {
        transform: translateX(0) !important;
        box-shadow: 14px 0 32px rgba(2, 19, 41, .22);
    }

    /* Keep a slim, high-contrast grab edge visible while the drawer is hidden. */
    #sidebar.medlink-sidebar::after {
        position: absolute;
        top: 50%;
        right: 0;
        width: 3px;
        height: 64px;
        border-radius: 999px 0 0 999px;
        background: #39e39a;
        box-shadow: 0 0 0 4px rgba(57, 227, 154, .12);
        content: '';
        transform: translateY(-50%);
        opacity: .9;
    }

    #sidebar.medlink-sidebar:hover::after,
    #sidebar.medlink-sidebar:focus-within::after,
    #sidebar.medlink-sidebar.sidebar-open::after { opacity: 0; }

    /* The page uses several legacy Tailwind margin variants. Once the drawer
       auto-hides, all desktop content should use the full available width. */
    #main-content,
    main.ml-64,
    main.ml-72,
    main[class*="ml-64"],
    main[class*="ml-72"],
    .terms-main,
    .outstanding-main { margin-left: 0 !important; }
}

@media screen {
    body {
        background: var(--medlink-canvas) !important;
        color: var(--medlink-ink);
        font-family: 'Plus Jakarta Sans', 'Manrope', Arial, sans-serif;
    }

    #main-content {
        background: transparent !important;
    }

    #sidebar {
        background: linear-gradient(180deg, #0b1730 0%, #102541 56%, #102f4a 100%) !important;
        border-right-color: rgba(153, 191, 221, .16) !important;
    }

    #sidebar nav a {
        border-radius: 14px !important;
        color: #b6c6d9 !important;
    }

    #sidebar nav a:hover,
    #sidebar nav a.active {
        color: #ffffff !important;
        background: rgba(16, 212, 119, .15) !important;
        box-shadow: inset 3px 0 0 var(--medlink-green);
    }

    #sidebar nav a.active .material-icons,
    #sidebar nav a.active .material-symbols-outlined,
    #sidebar nav a:hover .material-icons,
    #sidebar nav a:hover .material-symbols-outlined {
        color: #72f2ae !important;
    }

    #sidebar [class~="bg-primary"] {
        background: var(--medlink-green) !important;
    }

    #hamburger-btn {
        width: 64px;
        height: 64px;
        border-radius: 18px;
        background: var(--medlink-navy) !important;
        box-shadow: 0 12px 26px rgba(13, 27, 53, .22);
    }

    /* Consistent dark hero treatment for standard page headers. */
    main > header:not(.dashboard-hero):not(.appointment-hero):not(.staff-hero) {
        position: relative;
        overflow: hidden;
        padding: 28px 32px !important;
        border: 1px solid rgba(149, 201, 214, .16) !important;
        border-radius: 28px !important;
        background: linear-gradient(112deg, var(--medlink-navy) 0%, #163457 56%, var(--medlink-teal) 100%) !important;
        box-shadow: 0 22px 45px rgba(13, 27, 53, .18) !important;
    }

    main > header:not(.dashboard-hero):not(.appointment-hero):not(.staff-hero)::after {
        content: "";
        position: absolute;
        width: 220px;
        height: 220px;
        right: -80px;
        top: -112px;
        border: 26px solid rgba(107, 235, 198, .10);
        border-radius: 50%;
        pointer-events: none;
    }

    main > header:not(.dashboard-hero):not(.appointment-hero):not(.staff-hero) > * {
        position: relative;
        z-index: 1;
    }

    main > header:not(.dashboard-hero):not(.appointment-hero):not(.staff-hero) h1,
    main > header:not(.dashboard-hero):not(.appointment-hero):not(.staff-hero) h2,
    main > header:not(.dashboard-hero):not(.appointment-hero):not(.staff-hero) .text-slate-900,
    main > header:not(.dashboard-hero):not(.appointment-hero):not(.staff-hero) .dark\:text-white {
        color: #ffffff !important;
    }

    main > header:not(.dashboard-hero):not(.appointment-hero):not(.staff-hero) p,
    main > header:not(.dashboard-hero):not(.appointment-hero):not(.staff-hero) .text-slate-400,
    main > header:not(.dashboard-hero):not(.appointment-hero):not(.staff-hero) .text-slate-500 {
        color: #c6d7e8 !important;
    }

    main .bg-surface-light,
    main .bg-white,
    main [class~="bg-white"] {
        border-color: var(--medlink-border) !important;
        box-shadow: 0 16px 38px rgba(32, 72, 104, .06);
    }

    main input,
    main select,
    main textarea {
        border-color: var(--medlink-border) !important;
        border-radius: 14px !important;
    }

    main [class~="bg-primary"],
    main [class~="bg-emerald-500"],
    main [class~="bg-green-500"] {
        background: var(--medlink-green) !important;
        color: #062c25 !important;
    }

    main [class~="text-primary"] {
        color: var(--medlink-green-dark) !important;
    }

    main table thead tr {
        background: #f1f6fb !important;
        color: #8295ad !important;
    }

    main table tbody tr:hover {
        background: #f2fbf7 !important;
    }

    main .rounded-3xl,
    main .rounded-\[2rem\] {
        border-radius: 26px;
    }
}
