:root {
    --primary: #2563eb;         
    --primary-hover: #1d4ed8;
    --bg-body: #f3f4f6;         
    --bg-panel: #ffffff;       
    --text-main: #111827;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --danger: #ef4444;
    --holiday: #d97706; 
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    height: 100vh;
    width: 100vw;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-body);
    color: var(--text-main);
}

/* --- TOP TOOLBAR --- */
.top-bar {
    height: 70px;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px; 
    flex-shrink: 0;
    z-index: 100;
    position: relative;
}

.brand { display: flex; align-items: center; } 
.brand h1 { font-size: 20px; font-weight: 600; margin: 0; }

.user-profile {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0; 
}
.user-profile span { font-size: 14px; color: var(--text-muted); }

/* --- NAVIGATION & DATE CONTROLS --- */
.date-controls { display: flex; align-items: center; gap: 8px; }

/* BASE BUTTON STYLE (Desktop) */
.nav-btn { 
    background: white; 
    border: 1px solid var(--border); 
    border-radius: 6px; 
    color: var(--text-main); 
    cursor: pointer; 
    transition: background 0.2s;
    
    font-family: inherit;
    font-size: 14px;       
    font-weight: 600;      
    
    display: inline-flex;
    align-items: center;
    justify-content: center;
    
    height: 36px;          
    width: auto;           
    min-width: 36px;       
    padding: 0 12px;       
    line-height: 1;        
}

.nav-btn:hover { background: #f3f4f6; border-color: #d1d5db; }

/* Force Hamburger and Arrows to remain perfect squares */
#sidebar-toggle, #prev-day, #next-day {
    width: 36px;
    padding: 0;
    font-size: 20px; 
}

/* Custom Date Selector Button */
.custom-date-wrapper { position: relative; }
.date-trigger-btn {
    padding: 8px 4px; 
    background: white;
    border: 1px solid var(--border); 
    border-radius: 6px; 
    font-family: inherit; 
    font-size: 16px; 
    color: var(--text-main);
    cursor: pointer;
    min-width: 115px; 
    text-align: center;
	
	height: 36px; /* Matches your other nav buttons */
    display: inline-flex;
    align-items: center; 
    justify-content: center;
    box-sizing: border-box;
}
.date-trigger-btn:hover { background: #f9fafb; border-color: #d1d5db; }

/* --- BUTTON SPECIFICS --- */

/* 1. BLUE GROUP (Today & Help) */
#today-btn, #help-btn {
    color: #1e40af !important;  /* Deep Blue */
    gap: 6px;        
    margin: 0;
}
#today-btn span, #help-btn span {
    color: #1e40af !important; 
}

/* 2. RED GROUP (Logout Only) */
#logout-btn {
    background-color: #fee2e2 !important;  /* Soft Red Background */
    border-color: #fecaca !important;      /* Soft Red Border */
    color: #b91c1c !important;             /* Dark Red Text */
    gap: 6px;
    margin: 0;
}
#logout-btn:hover {
    background-color: #fecaca !important;  /* Slightly darker on hover */
    border-color: #fca5a5 !important;
}

/* Force the Icon and Text inside Logout to be Red */
#logout-btn span, 
#logout-btn svg {
    color: #b91c1c !important;
    stroke: #b91c1c !important;
}

/* --- PENDING REVIEW BUTTON --- */
#pending-review-btn {
    color: #e67e22 !important;       /* Dark Orange Text */
    border-color: #fdba74 !important; /* Soft Orange Border */
    background-color: white;
    gap: 6px;
    margin: 0;
}

#pending-review-btn:hover {
    background-color: #fff7ed !important; /* Very pale orange on hover */
    border-color: #fb923c !important;
}

/* Ensure the icon inside is also orange */
#pending-review-btn span {
    color: #e67e22 !important;
}

/* --- CALENDAR POPUP --- */
.calendar-popup {
    position: fixed; 
    top: 0; left: 0; transform: none; 
    width: 280px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15); 
    padding: 15px;
    z-index: 3001; 
}

.cal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cal-title { font-weight: 600; font-size: 14px; }
.cal-nav { background: none; border: 1px solid var(--border); border-radius: 4px; cursor: pointer; padding: 2px 8px; }
.cal-nav:hover { background: #f3f4f6; }

.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 11px; color: var(--text-muted); margin-bottom: 5px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 5px; }

.cal-day {
    height: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    border-radius: 4px;
    position: relative;
}
.cal-day:hover { background-color: #f3f4f6; }
.cal-day.selected { background-color: var(--primary); color: white; }
.cal-day.empty { cursor: default; pointer-events: none; }
/* --- CALENDAR DOTS --- */

/* 1. CONFIRMED DOT (Blue) - Uses ::after */
.cal-day.has-booking::after {
    content: ''; 
    width: 6px; height: 6px; /* Slightly larger for visibility */
    background-color: var(--primary);
    border-radius: 50%; 
    position: absolute; 
    bottom: 3px;
    
    /* Default: Centered */
    left: 50%;
    transform: translateX(-50%);
}

/* 2. PENDING DOT (Orange) - Uses ::before */
.cal-day.has-pending::before {
    content: ''; 
    width: 6px; height: 6px; 
    background-color: #e67e22; /* Matches Pending Border Color */
    border-radius: 50%; 
    position: absolute; 
    bottom: 3px;
    
    /* Default: Centered */
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

/* 3. SCENARIO: BOTH DOTS (Side by Side) */
/* If a day has BOTH classes, shift them apart */
.cal-day.has-booking.has-pending::after {
    left: calc(50% + 4px); /* Shift Blue Right */
}
.cal-day.has-booking.has-pending::before {
    left: calc(50% - 4px); /* Shift Orange Left */
}

/* Selected State: Turn dots white if the day is selected (Blue Background) */
.cal-day.selected.has-booking::after,
.cal-day.selected.has-pending::before { 
    background-color: white; 
}

.cal-day.selected.has-booking::after { background-color: white; }

/* Buttons General */
.text-btn { 
    background-color: #dbeafe; 
    color: #1e40af;            
    padding: 6px 14px; 
    border-radius: 6px; 
    border: none; 
    font-weight: 600; 
    font-size: 13px;
    font-family: inherit;
    cursor: pointer; 
    margin-left: 10px;
    transition: background-color 0.2s;
}
.text-btn:hover { background-color: #bfdbfe; text-decoration: none; }

/* --- MAIN LAYOUT --- */
.main-layout { display: flex; flex: 1; overflow: hidden; position: relative; }

/* Left Sidebar */
.editor-panel {
    width: 340px; 
    background: var(--bg-panel);
    border-right: 1px solid var(--border);
    padding: 30px;
    display: flex;
    flex-direction: column;
    height: 100%;             
    overflow-y: auto;         
    position: relative; 
    box-shadow: 2px 0 5px rgba(0,0,0,0.02);
    z-index: 10;
    transition: transform 0.3s ease; 
}

.editor-panel.collapsed { display: none; }
.editor-panel h2 { margin-top: 0; margin-bottom: 5px; font-size: 20px; }
.subtitle { color: var(--text-muted); font-size: 13px; margin-bottom: 25px; margin-top: 0; }

/* --- FORM STYLES --- */
.form-group { margin-bottom: 20px; position: relative; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-main); }

.form-group input, .form-group textarea, .form-group select {
    width: 100%; 
    padding: 10px 12px; 
    border: 1px solid var(--border);
    border-radius: 6px; 
    font-family: inherit; 
    font-size: 14px;
    transition: border-color 0.2s; 
    background: #f9fafb;
    color: var(--text-main);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { 
    outline: none; 
    border-color: var(--primary); 
    background: white; 
}
.form-group textarea { resize: none; height: 100px; }

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    cursor: pointer;
}

.form-group input[type="date"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 35px; 
    width: 100%;
    display: block;
    box-sizing: border-box;
    border-radius: 6px;
    background-color: #f9fafb;
    color: var(--text-main);
    min-height: 42px; 
}
.form-group input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0; cursor: pointer; position: absolute; right: 0; top: 0; width: 40px; height: 100%;
}

/* --- ACTION BUTTONS --- */
.action-buttons { margin-top: 10px; }
#edit-controls { display: flex; gap: 10px; margin-top: 10px; }

.success-btn {
    width: auto;
    flex: 1; /* Shares space equally with Delete/Cancel */
    height: 42px;
    padding: 0 15px;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    transition: background 0.2s;
    
    background: #10b981; /* Emerald Green */
    color: white;
    margin-right: 5px; /* Tiny gap */
}

.success-btn:hover {
    background: #059669; /* Darker Green */
}

.primary-btn, .secondary-btn, .danger-btn {
    width: 100%;
    height: 42px;            
    padding: 0 15px;        
    border-radius: 6px;
    cursor: pointer;
    border: none;
    flex-shrink: 0;    
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;        
    font-weight: 600;        
    font-family: inherit;    
    text-align: center;
    transition: background 0.2s;
}

.primary-btn { background: var(--primary); color: white; }
.primary-btn:hover { background: var(--primary-hover); }
.secondary-btn { background: #e5e7eb; color: #374151; }
.secondary-btn:hover { background: #d1d5db; }
.danger-btn { background: var(--danger); color: white; }
.danger-btn:hover { background: #dc2626; } 

#edit-controls .danger-btn, #edit-controls .secondary-btn {
    width: auto; flex: 1;      
}

.hidden { display: none !important; }

/* --- SCHEDULE VIEW --- */
.schedule-view { flex: 1; padding: 30px 40px; overflow-y: auto; }
.schedule-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.schedule-header h2 { font-size: 26px; margin: 0; font-weight: 600; color: #111827; }

/* FIX: Booking Count Badge Style */
.booking-count-badge {
    background-color: #e9ecef;
    color: #495057;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    margin-left: 15px; /* Space it away from the date */
}

.holiday-text {
    color: var(--holiday);
    font-size: 14px;
    font-weight: 500;
    margin-top: 4px;
    display: flex;
    align-items: center;
}

.badge {
    background-color: #dbeafe;
    color: #1e40af;
    height: 36px;
    padding: 0 15px;  
    border-radius: 6px;
    font-size: 14px; /* MATCHED TO BUTTONS */
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0; 
}

.list-container { display: flex; flex-direction: column; gap: 12px; }

.appt-card { background: white; padding: 18px 25px; border-radius: 8px; border: 1px solid var(--border); display: flex; align-items: center; cursor: pointer; transition: all 0.2s; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.appt-card:hover { border-color: var(--primary); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); transform: translateY(-1px); }
.appt-card.active-editing { border-left: 4px solid var(--primary); background-color: #f8fafc; }

.time-column { font-weight: 600; color: var(--text-main); width: 100px; font-size: 17px; display: flex; flex-direction: column; justify-content: center; }
.operator-tag { font-size: 11px; color: #9ca3af; font-weight: 400; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.details-column { flex: 1; }
.details-column strong { display: block; font-size: 16px; margin-bottom: 4px; color: #1f2937; }
.details-column span { font-size: 14px; color: var(--text-muted); white-space: pre-wrap; }
.empty-state { text-align: center; padding: 60px; color: var(--text-muted); font-style: italic; border: 2px dashed var(--border); border-radius: 8px; background: #fafafa; }

/* --- ADMIN SAFE (Vault) --- */
.vault-wrapper { border-top: 1px solid var(--border); padding-top: 20px; background-color: var(--bg-panel); position: static; }

/* FIX: Ensure Admin Vault Text fits */
.vault-door {
    background: linear-gradient(135deg, #374151, #1f2937);
    color: #e5e7eb;
    height: 42px;            
    padding: 0 15px;        
    flex-shrink: 0; 
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center; 
    gap: 12px;                
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border: 1px solid #4b5563;
    transition: transform 0.1s;
    position: relative;
    z-index: 2100; 
    white-space: nowrap; /* FIX: Prevent Wrapping */
    width: 100%; /* FIX: Full width */
}
.vault-door:active { transform: scale(0.98); }
.vault-label { font-size: 13px; font-weight: 600; font-family: inherit; }

.safe-dial { width: 18px; height: 18px; border: 2px solid #9ca3af; border-radius: 50%; position: relative; transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
.dial-grip { width: 2px; height: 6px; background-color: #9ca3af; position: absolute; top: -1px; left: 50%; transform: translateX(-50%); }

.vault-interior {
    position: fixed; top: 0; left: 0;
    width: 340px; height: 0;    
    background-color: #ffffff; 
    border-right: 1px solid var(--border);
    overflow: hidden; overflow-y: auto; 
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000; 
    display: flex; flex-direction: column; justify-content: center;
    padding: 0 30px; 
}
.vault-buttons-container { display: flex; flex-direction: column; gap: 15px; opacity: 0; transition: opacity 0.3s; transition-delay: 0.1s; }

.vault-open .safe-dial { transform: rotate(180deg); border-color: #10b981; }
.vault-open .dial-grip { background-color: #10b981; }
.vault-open .vault-interior { height: 100%; border-right: 1px solid var(--border); }
.vault-open .vault-buttons-container { opacity: 1; }

.admin-info { margin-bottom: 15px; text-align: center; }
.admin-info h3 { font-size: 14px; margin: 0 0 10px 0; color: #111827; }
.admin-info p { font-size: 12px; color: #6b7280; margin: 4px 0; }
.admin-info hr { border: 0; border-top: 1px solid var(--border); margin: 15px 0; }
#print-btn { margin-top: 20px; flex-shrink: 0; }

/* --- MODAL --- */
.modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.5); backdrop-filter: blur(2px);
    z-index: 2000; display: flex; align-items: center; justify-content: center;
    opacity: 1; transition: opacity 0.3s;
}
.modal-content {
    background: white; width: 90%; max-width: 500px;
    border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    overflow: hidden; animation: slideUpFade 0.3s ease-out;
}
@keyframes slideUpFade { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header { background: #f9fafb; padding: 15px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-header h2 { margin: 0; font-size: 16px; }
.close-btn { background: none; border: none; font-size: 24px; cursor: pointer; color: #6b7280; }
.modal-body { padding: 20px; max-height: 70vh; overflow-y: auto; }
.help-item { margin-bottom: 15px; border-bottom: 1px solid #f3f4f6; padding-bottom: 10px; }
.help-item:last-child { border-bottom: none; margin-bottom: 0; }
.help-title { display: block; color: var(--primary); font-weight: 700; margin-bottom: 4px; font-size: 14px; }
.help-item p { margin: 0; font-size: 13px; color: #4b5563; line-height: 1.5; }

/* --- SEARCH --- */
.search-container { width: 100%; position: relative; }
#search-input {
    width: 100%; padding: 10px 12px; background-color: white;
    border: 1px solid var(--border); border-radius: 6px; 
    font-size: 14px; font-family: inherit; color: var(--text-main);
    transition: all 0.2s; outline: none;
}
#search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
.search-results-list {
    margin-top: 5px; background: white; border: 1px solid var(--border);
    border-radius: 6px; max-height: 250px; overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* --- SEARCH RESULT STYLING (FIXED) --- */
.search-result-item {

    padding: 10px 12px 10px 14px !important;
    
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    font-size: 13px;
    
    /* Ensure background is white so the hover change is visible */
    background-color: white; 
    transition: background-color 0.1s;
}

.search-result-item:hover {
    /* Changed to a Light Blue so you can clearly see the highlight */
    background-color: #eff6ff !important; 
}

.result-name { font-weight: 600; display: block; color: #111827; font-size: 14px;}
.result-date { color: #6b7280; font-size: 12px; }
.result-match { color: var(--primary); font-weight: 700; }

/* Scrollbar */
.editor-panel::-webkit-scrollbar { width: 6px; }
.editor-panel::-webkit-scrollbar-track { background: transparent; }
.editor-panel::-webkit-scrollbar-thumb { background-color: #d1d5db; border-radius: 20px; }

/* Animations & Toast */
@keyframes flashYellow {
    0% { background-color: #fff9c4; border-color: #f59e0b; transform: scale(1.02); }
    100% { background-color: white; border-color: var(--border); transform: scale(1); }
}
.new-booking-highlight { animation: flashYellow 2.5s ease-out forwards; }

.toast {
    visibility: hidden; min-width: 250px; background-color: #059669; color: white;
    text-align: center; border-radius: 8px; padding: 16px; position: fixed; z-index: 1000;
    left: 50%; bottom: 30px; transform: translateX(-50%); font-size: 15px; font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); opacity: 0; transition: opacity 0.5s, bottom 0.5s;
}
.toast.show { visibility: visible; opacity: 1; bottom: 50px; }


/* --- TABLET/MOBILE RESPONSIVE (IPAD) --- */
@media (max-width: 768px) {
    .brand h1 { font-size: 16px; } 
    .top-bar { padding: 0 10px; }
    .text-btn { display: none; } 
    .date-trigger-btn {
        min-width: auto;       
        width: 105px;         
        padding: 8px 8px;     
        font-size: 14px;       
        text-overflow: ellipsis; 
        overflow: hidden;
    }
    .editor-panel {
        position: absolute; top: 0; left: 0;
        width: 100%; height: 100%;
        border-right: none; z-index: 1000; 
    }
    .schedule-view { padding: 15px; }
    .schedule-header h2 { font-size: 20px; }
    .nav-btn { font-size: 16px; padding: 6px 10px; }
    .vault-interior { width: 100%; top: 70px; height: 0; }
    .vault-open .vault-interior { height: calc(100% - 70px); }
}

@media (max-width: 480px) {
    .brand h1 { display: none; } 
}

@media print {
    .top-bar, .editor-panel, #print-btn, .hidden { display: none !important; }
    body, .main-layout, .schedule-view { background: white; height: auto; overflow: visible; display: block; padding: 0; margin: 0; }
    .schedule-view { padding: 20px; }
    .list-container { gap: 0; }
    .appt-card { border: none; border-bottom: 1px solid #ddd; box-shadow: none; border-radius: 0; padding: 15px 0; page-break-inside: avoid; }
}

#count-display { white-space: nowrap; }

/* --- MOBILE TOOLBAR OPTIMIZATION --- */
@media (max-width: 700px) {
    
    /* 1. Main Spacing */
    .top-bar { gap: 10px; }

    /* 2. Right Side Spacing */
    .right-controls {
        display: flex;
        gap: 10px;        
        align-items: center;
    }

    /* 3. Left Side Spacing */
    .header-controls { gap: 2px; }
    .date-controls { gap: 2px; }

    /* 4. Hide Text Labels */
    .btn-text { display: none !important; }

    /* 5. Force Square Icons + INCREASE ICON SIZE */
    #today-btn, #logout-btn, #help-btn {
        width: 36px !important;  
        padding: 0 !important;   
        
        /* Icon Size for Emoji and SVG */
        font-size: 18px !important; 
    }
    
    /* Reset margins */
    #logout-btn span, #today-btn span, #help-btn span { margin: 0 !important; }

    /* 6. Date Button Sizing */
    #date-btn {
        height: 36px;            
        display: inline-flex;    
        align-items: center;
        justify-content: center;
        font-size: 13px; 
        padding: 0 4px;          
        min-width: auto;         
    }
    
    header { padding: 0 5px; }
}

/* --- PENDING BOOKING STYLE --- */
.appt-card.pending-appt {
    background-color: #fff4e6; /* Pale Orange Background */
    border-left: 5px solid #e67e22; /* Dark Orange Border */
}


/* --- 1. ADMIN ANIMATION (Yellow -> White) --- */
.new-booking-highlight {
    animation: flashYellow 3s ease-out forwards;
}

@keyframes flashYellow {
    0% { background-color: #fff9c4; } /* Bright Yellow */
    100% { background-color: transparent; } /* Fades to White/Transparent */
}

/* --- 2. REQUESTER ANIMATION (Bright Orange -> Pale Orange) --- */
.pending-booking-highlight {
    animation: flashOrange 3s ease-out forwards;
}

@keyframes flashOrange {
    0% { background-color: #ffcc80; border-left-color: #e67e22; } /* Start Bright */
    100% { background-color: #fff4e6; border-left-color: #e67e22; } /* End on Pale Orange */
}

/* --- FORCE ADMIN BUTTON LAYOUT --- */
/* Targeting the ID ensures this overrides everything else */
#vault-trigger {
    display: flex;
    flex-direction: row !important;  /* Force side-by-side */
    align-items: center !important;  /* Center vertically */
    justify-content: center !important; /* Center horizontally */
    white-space: nowrap !important;  /* Prevent wrapping */
    gap: 12px !important;            /* Space between dial and text */
    width: 100% !important;          /* Full width */
    padding: 0 15px !important;
    height: 42px !important;
    box-sizing: border-box !important;
}

/* Ensure the text label specifically behaves */
#vault-trigger .vault-label {
    display: inline-block;
    margin: 0;
}

/* Ensure the dial doesn't force a line break */
#vault-trigger .safe-dial {
    flex-shrink: 0; /* Stop it from squashing */
}

/* --- STICKY BOOKING FOOTER --- */
#sticky-footer {
    position: fixed;
    bottom: -150px; /* Start hidden */
    
    /* ALIGNMENT: Anchor to the right side area */
    /* IMPORTANT: Check your sidebar width. If it's 280px, change this to 280px. */
    left: 350px; 
    right: 0; 
    width: auto; 
    
    /* TRANSPARENT CONTAINER */
    background-color: transparent;
    border: none;
    box-shadow: none;
    
    z-index: 8000; 
    padding: 0 15px 15px 15px; /* Padding only at bottom and sides */
    
    /* Stack items vertically at the bottom */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    
    /* Let clicks pass through the invisible container */
    pointer-events: none;
    
    /* Smooth slide animation */
    transition: bottom 0.3s ease-in-out, left 0.3s ease-in-out;
}

#sticky-footer.visible {
    bottom: 0;
}

/* --- RESPONSIVE ADJUSTMENTS --- */

/* When Sidebar is Collapsed */
body.sidebar-collapsed #sticky-footer {
    left: 0 !important;
}

/* On Mobile Screens */
@media (max-width: 900px) {
    #sticky-footer {
        left: 0 !important;
    }
}

/* Ghost Card Container */
#sticky-card-container {
    width: 100%;
    max-width: 600px;
    /* Re-enable events for the card itself */
    pointer-events: auto;
}

#sticky-card-container .appt-card {
    margin: 0;
    border: 2px solid #f59e0b;
    background-color: #fffbeb;
    cursor: default;
    /* Add shadow to the card for floating effect */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* FLOATING LABEL STYLING */
.sticky-label {
    /* Removed absolute position, it now stacks above the card */
    background: #f59e0b;
    color: white;
    padding: 5px 14px;
    border-radius: 20px; /* Make it look like a badge */
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
    margin-bottom: 8px; /* Space between label and card */
    
    /* Give the label its own shadow to float */
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    
    /* Re-enable events for the label */
    pointer-events: auto;
}