/* CSS Variables for Theme */
:root {
    --primary-color: #FF6B35;
    --primary-dark: #E55A2B;
    --primary-light: #FF8B5A;
    --white: #FFFFFF;
    --light-gray: #F5F5F5;
    --medium-gray: #E0E0E0;
    --dark-gray: #333333;
    --text-color: #333333;
    --background-overlay: rgba(0, 0, 0, 0.35);
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    --transition: all 0.3s ease;
}

/* SIDEBAR COLLAPSE START - IMPROVED SIDEBAR BEHAVIOR */
/* Sidebar Base Styles */
.sidebar {
    width: 240px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
    z-index: 100;
    position: relative;
    backdrop-filter: blur(5px);
}

/* Collapsed State - Applied to sidebar element */
.sidebar.collapsed {
    width: 70px;
}

/* Navigation Items Layout */
.sidebar .nav-item,
.sidebar .collapsible-header,
.sidebar .nav-subitem {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    width: 100%;
    box-sizing: border-box;
}

.sidebar.collapsed .nav-item,
.sidebar.collapsed .collapsible-header,
.sidebar.collapsed .nav-subitem {
    padding: 0.75rem 0;
    justify-content: center;
}

/* Icon Styles */
.sidebar .nav-item i,
.sidebar .collapsible-header i:first-child,
.sidebar .nav-subitem i {
    min-width: 40px;
    text-align: center;
    font-size: 1.2rem;
    transition: margin 0.3s ease;
}

.sidebar.collapsed .nav-item i,
.sidebar.collapsed .collapsible-header i:first-child,
.sidebar.collapsed .nav-subitem i {
    margin-right: 0;
    min-width: auto;
}

/* Text Label Styles - CRITICAL: Hidden when collapsed */
.sidebar .nav-item span:not(.collapse-icon),
.sidebar .collapsible-header>div>span:not(.collapse-icon),
.sidebar .collapsible-header>div>i+span,
.sidebar .nav-subitem span {
    opacity: 1;
    transition: opacity 0.2s ease, width 0.2s ease, margin 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    display: inline-block;
}

.sidebar.collapsed .nav-item span:not(.collapse-icon),
.sidebar.collapsed .collapsible-header>div>span:not(.collapse-icon),
.sidebar.collapsed .collapsible-header>div>i+span,
.sidebar.collapsed .nav-subitem span {
    opacity: 0;
    width: 0;
    margin-left: 0;
    margin-right: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, width 0.2s ease, margin 0.2s ease;
    display: none;
    /* Force hide to prevent layout issues */
}

/* Hide collapse icons when collapsed */
.sidebar.collapsed .collapse-icon {
    opacity: 0;
    width: 0;
    pointer-events: none;
    display: none;
}

/* Collapsible Content - Hide when collapsed */
.sidebar.collapsed .collapsible-content {
    display: none !important;
}

/* Header - Hide when collapsed */
.sidebar.collapsed .sidebar-header {
    opacity: 0;
    height: 0;
    padding: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    display: none;
}

/* Ensure icons stay centered in collapsed state */
.sidebar.collapsed .nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.sidebar.collapsed .collapsible-header>div {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Main content adjustment - auto handled by flexbox */
.main-content {
    flex-grow: 1;
    transition: width 0.3s ease;
    width: calc(100% - 240px);
}

.sidebar.collapsed+.main-content {
    width: calc(100% - 70px);
}

/* Keep active state styling */
.sidebar.collapsed .nav-item.active,
.sidebar.collapsed .collapsible:has(.nav-subitem.active) .collapsible-header {
    background-color: rgba(255, 107, 53, 0.1);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
}

/* Ensure non-active collapsibles don't get highlighted when collapsed, overriding line 1165 */
.sidebar.collapsed .collapsible:not(:has(.nav-subitem.active)) .collapsible-header:not(:hover) {
    background-color: transparent;
    color: var(--dark-gray);
    border-left-color: transparent;
}

/* Hamburger button styling */
.hamburger-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    margin-right: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.hamburger-btn:hover {
    transform: scale(1.1);
}

/* SIDEBAR COLLAPSE END */

/* PART 3: Calendar past dates styling */
.calendar-day.past-date {
    background-color: rgba(240, 240, 240, 0.7) !important;
    color: #888 !important;
}

.calendar-day.past-date .day-number {
    color: #888 !important;
}

.calendar-day.past-date .calendar-event {
    background-color: rgba(200, 200, 200, 0.7) !important;
    color: #666 !important;
}

.calendar-day.past-date:hover {
    background-color: rgba(220, 220, 220, 0.7) !important;
}

/* Calendar view styles */
.calendar-week-view {
    display: none;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: var(--medium-gray);
    border: 1px solid var(--medium-gray);
}

.calendar-week-day {
    background-color: rgba(255, 255, 255, 0.9);
    min-height: 120px;
    padding: 0.5rem;
    position: relative;
}

.calendar-day-view {
    display: none;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 1rem;
    border-radius: 5px;
    border: 1px solid var(--medium-gray);
}

.calendar-agenda-view {
    display: none;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 1rem;
    border-radius: 5px;
    border: 1px solid var(--medium-gray);
}

.calendar-view-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.view-btn {
    padding: 0.5rem 1rem;
    background-color: var(--light-gray);
    border: 1px solid var(--medium-gray);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.view-btn:hover {
    background-color: var(--medium-gray);
}

.view-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.agenda-item {
    padding: 0.75rem;
    border-bottom: 1px solid var(--medium-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.agenda-item:last-child {
    border-bottom: none;
}

.agenda-date {
    font-weight: bold;
    color: var(--primary-color);
    min-width: 120px;
}

.agenda-time {
    color: var(--dark-gray);
    min-width: 80px;
}

.agenda-title {
    flex-grow: 1;
    margin: 0 1rem;
}

.day-view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--medium-gray);
}

.day-view-events {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.day-view-event {
    padding: 0.75rem;
    background-color: var(--light-gray);
    border-radius: 4px;
    border-left: 4px solid var(--primary-color);
}

/* UPDATED: Improved global background with better sizing and subtle tint */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    background-image: url('https://centralbearden.org/wp-content/uploads/2021/07/philippa-rose-tite-XLlBh-SQZCA-unsplash-crop.jpg');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    position: relative;
}

/* ADD-ONLY: Dark overlay for better readability */
/* This overlay sits on top of background image but behind all content */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.45);
    /* Dark overlay with moderate opacity */
    z-index: -1;
    /* Keep behind all content */
    pointer-events: none;
    /* Allow interactions through overlay */
}

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* TASK 1: Top Header Layout - UPDATED to remove logo container spacing */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    min-height: 80px;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.dashboard-header-center {
    text-align: center;
    flex: 0 0 auto;
}

.dashboard-header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
}

/* TASK 1: Section heading color - KEEP THIS ORANGE HEADING */
.section-heading {
    color: var(--primary-color) !important;
    font-size: 1.8rem;
    margin: 0;
    white-space: nowrap;
}

/* NEW: Profile icon styling - REMOVE THE TOP-LEFT ONE */
.profile-icon-container {
    display: none;
    /* Hide the original top-left icon */
}

/* Keep only the header profile icon */
#headerProfileIcon {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.profile-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
    border: 3px solid var(--white);
}

.profile-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.profile-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-icon .default-avatar {
    color: var(--white);
    font-size: 1.5rem;
}

.profile-upload-input {
    display: none;
}

/* LAYOUT ADJUSTMENT: Page-specific buttons container */
.page-action-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* TASK 1: IMPROVED Login Page Neatness */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: relative;
    padding: 1rem;
}

.login-card {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 380px;
    z-index: 1;
    position: relative;
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-header {
    text-align: center;
    margin-bottom: 1.5rem;
    width: 100%;
}

.login-header h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--dark-gray);
    font-size: 0.9rem;
}

#loginForm {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.form-group {
    margin-bottom: 1.25rem;
    width: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-gray);
}

/* TASK 1: Centered and neat login inputs */
.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--medium-gray);
    border-radius: 5px;
    font-size: 1rem;
    transition: var(--transition);
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
}

/* TASK 1: Neat and compact login button */
#loginForm .btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    width: auto;
    min-width: 120px;
    margin-top: 0.5rem;
}

#loginForm .btn:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--medium-gray);
    color: var(--dark-gray);
}

.btn-secondary:hover {
    background-color: #c9c9c9;
}

/* TASK 5: All headings changed to white */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--white) !important;
}

/* Exception for login card headings */
.login-card h1,
.login-card h2,
.login-card h3,
.login-card h4,
.login-card h5,
.login-card h6 {
    color: var(--primary-color) !important;
}

/* Exception for modal headings */
.modal-content h1,
.modal-content h2,
.modal-content h3,
.modal-content h4,
.modal-content h5,
.modal-content h6 {
    color: var(--primary-color) !important;
}

/* Exception for content card headings */
.content-card h1,
.content-card h2,
.content-card h3,
.content-card h4,
.content-card h5,
.content-card h6 {
    color: var(--text-color) !important;
}

/* Exception for clipboard container */
.clipboard-container h1,
.clipboard-container h2,
.clipboard-container h3,
.clipboard-container h4,
.clipboard-container h5,
.clipboard-container h6 {
    color: var(--text-color) !important;
}

/* Exception for sidebar headings */
.sidebar h1,
.sidebar h2,
.sidebar h3,
.sidebar h4,
.sidebar h5,
.sidebar h6 {
    color: var(--primary-color) !important;
}

/* TASK 2: Form button alignment */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    width: 100%;
    justify-content: flex-end;
}

.form-actions .btn {
    flex: 0 1 auto;
    width: auto;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--medium-gray);
}

.form-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

/* TASK 3: Improved form row and column layouts for perfect alignment */
.form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
    align-items: flex-start;
}

.form-col {
    flex: 1;
    min-width: 250px;
    padding: 0 0.75rem;
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
}

/* TASK 3: Ensure province dropdown and adjacent fields align perfectly */
.form-row .form-col {
    align-items: flex-start;
}

.form-row .form-col label {
    margin-bottom: 0.5rem;
    width: 100%;
}

.form-row .form-col select,
.form-row .form-col input {
    height: 45px;
    box-sizing: border-box;
    width: 100%;
}

.input-short {
    max-width: 150px;
}

.input-medium {
    max-width: 300px;
}

.input-full {
    width: 100%;
}

select.form-control {
    min-height: 45px;
    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='currentColor' 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 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

/* TASK 2: Booking page input icons */
.icon-input-wrapper {
    position: relative;
    width: 100%;
}

.icon-input-wrapper .form-control {
    padding-left: 2.5rem !important;
    width: 100%;
}

.input-icon-left {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    pointer-events: none;
    z-index: 2;
}

#policyNumber {
    max-width: 200px;
    background-color: var(--light-gray);
    font-weight: 600;
    letter-spacing: 1px;
}

#dob {
    max-width: 200px;
    background-color: var(--light-gray);
}

#idNumber {
    max-width: 250px;
}

#personalNumber,
#workNumber {
    max-width: 250px;
}

#postalCode {
    max-width: 150px;
}

#province,
#memorialParkPlan,
#planType,
#bookingProvince,
#memorialPark {
    max-width: 300px;
}

#address,
#city,
#contactName,
#contactNotes,
#bookingTitle,
#clientName {
    width: 100%;
}

/* TASK 4: New Booking Modal */
.booking-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(2px);
    padding: 1rem;
}

.booking-modal-content {
    background-color: rgba(255, 255, 255, 0.98);
    border-radius: 10px;
    width: 100%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
    position: relative;
}

.booking-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--medium-gray);
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.98);
    z-index: 1;
}

.booking-modal-header h2 {
    color: var(--primary-color);
    margin: 0;
}

.booking-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-gray);
    line-height: 1;
}

.booking-modal-body {
    padding: 1.5rem;
}

/* FEATURE 1: Calendar date click enhancement */
.calendar-day {
    background-color: rgba(255, 255, 255, 0.9);
    min-height: 100px;
    padding: 0.5rem;
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.calendar-day:hover {
    background-color: rgba(255, 107, 53, 0.1);
}

.calendar-day.today {
    background-color: rgba(255, 107, 53, 0.1);
}

/* FEATURE 2: Past records modal styling */
.past-records-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2001;
    backdrop-filter: blur(2px);
    padding: 1rem;
}

.past-records-content {
    background-color: rgba(255, 255, 255, 0.98);
    border-radius: 10px;
    width: 100%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
    position: relative;
}

.past-records-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--medium-gray);
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.98);
    z-index: 1;
}

.past-records-header h2 {
    color: var(--primary-color);
    margin: 0;
}

.past-records-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-gray);
    line-height: 1;
}

.past-records-body {
    padding: 1.5rem;
}

.past-records-tabs {
    display: flex;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--medium-gray);
}

.past-tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 600;
    color: var(--dark-gray);
    transition: var(--transition);
}

.past-tab-btn:hover {
    color: var(--primary-color);
}

.past-tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.past-tab-content {
    display: none;
}

.past-tab-content.active {
    display: block;
}

.past-record-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.past-record-table th,
.past-record-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--medium-gray);
    vertical-align: middle;
}

.past-record-table th {
    background-color: rgba(245, 245, 245, 0.7);
    font-weight: 600;
    color: var(--dark-gray);
}

.past-record-table tr.past-record {
    opacity: 0.8;
    background-color: rgba(245, 245, 245, 0.5);
}

.past-record-table tr:hover {
    background-color: rgba(255, 107, 53, 0.05);
}

.no-records-message {
    text-align: center;
    padding: 2rem;
    color: var(--dark-gray);
    font-style: italic;
}

/* NEW: Certificate button styling */
.certificate-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background-color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: 0.5rem;
}

.certificate-btn:hover {
    background-color: #45a049;
    transform: translateY(-1px);
}

.certificate-btn i {
    font-size: 0.9rem;
}

/* NEW: Payment button styling */
.payment-btn {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background-color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: 0.5rem;
}

.payment-btn:hover {
    background-color: #1976D2;
    transform: translateY(-1px);
}

.payment-btn i {
    font-size: 0.9rem;
}

.certificate-btn.disabled,
.payment-btn.disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.certificate-btn.disabled:hover,
.payment-btn.disabled:hover {
    background-color: #cccccc;
    transform: none;
}

.message {
    padding: 0.75rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
    text-align: center;
    display: none;
}

.error {
    background-color: #FFEBEE;
    color: #C62828;
    border: 1px solid #FFCDD2;
}

.success {
    background-color: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #C8E6C9;
}

.password-validation {
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: block;
}

.password-validation.valid {
    color: #2E7D32;
}

.password-validation.invalid {
    color: #C62828;
}

.create-account-link {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--medium-gray);
    width: 100%;
}

.create-account-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.create-account-link a:hover {
    text-decoration: underline;
}

.create-account-form {
    display: none;
    width: 100%;
}

/* Main Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles - Duplicate kept for compatibility */
.sidebar {
    width: 250px;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    z-index: 100;
    position: relative;
    backdrop-filter: blur(5px);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--medium-gray);
    text-align: center;
}

.sidebar-header h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.nav-links {
    flex-grow: 1;
    padding: 1rem 0;
}

.nav-item {
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    color: var(--dark-gray);
    text-decoration: none;
    transition: var(--transition);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent; /* Optical centering for collapsed state */
}

.nav-item:hover {
    background-color: rgba(245, 245, 245, 0.7);
    color: var(--primary-color);
}

.nav-item.active {
    background-color: rgba(255, 107, 53, 0.1);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.nav-item i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

.nav-subitem {
    padding: 0.75rem 1.5rem 0.75rem 3rem;
    display: flex;
    align-items: center;
    color: var(--dark-gray);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

.nav-subitem:hover {
    background-color: rgba(245, 245, 245, 0.7);
    color: var(--primary-color);
}

.nav-subitem.active {
    background-color: rgba(255, 107, 53, 0.1);
    color: var(--primary-color);
}

.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent; /* Optical centering for collapsed state */
}

.collapsible-header:hover {
    background-color: rgba(245, 245, 245, 0.7);
    color: var(--primary-color);
}

.collapsible.active .collapsible-header {
    background-color: rgba(255, 107, 53, 0.1);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.collapse-icon {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.collapsible.active .collapse-icon {
    transform: rotate(90deg);
}

.collapsible-content {
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    max-height: 0;
}

.collapsible.active .collapsible-content {
    max-height: 200px;
}

/* Main Content Styles */
.main-content {
    flex-grow: 1;
    background-color: transparent;
    padding: 0;
    overflow-y: auto;
}

/* Welcome Page Styles */
.welcome-container {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.welcome-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.welcome-container h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.welcome-container p {
    font-size: 1.2rem;
    color: var(--dark-gray);
    margin-bottom: 2rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.data-table th,
.data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--medium-gray);
    vertical-align: middle;
}

.data-table th {
    background-color: rgba(245, 245, 245, 0.7);
    font-weight: 600;
    color: var(--dark-gray);
}

.data-table tr:hover {
    background-color: rgba(255, 107, 53, 0.05);
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.btn:hover {
    background-color: var(--primary-dark);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    width: auto;
}

/* NEW: Edit and Delete button styling */
.edit-btn {
    background-color: #FFC107;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background-color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: 0.5rem;
}

.edit-btn:hover {
    background-color: #FFA000;
    transform: translateY(-1px);
}

.delete-btn {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background-color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: 0.5rem;
}

.delete-btn:hover {
    background-color: #d32f2f;
    transform: translateY(-1px);
}

/* Original icon input styling (keeping for compatibility) */
.icon-input-container {
    position: relative;
}

.icon-input {
    width: 100%;
    padding-right: 2.5rem !important;
}

.input-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    pointer-events: none;
    z-index: 1;
}

/* Make date/time inputs fully clickable */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: 100%;
    z-index: 2;
}

/* Calendar View Styles */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.calendar-nav button {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--primary-color);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: var(--medium-gray);
    border: 1px solid var(--medium-gray);
}

.calendar-day-header {
    background-color: rgba(245, 245, 245, 0.7);
    padding: 0.75rem;
    text-align: center;
    font-weight: 600;
}

.day-number {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.calendar-event {
    background-color: var(--primary-light);
    color: var(--dark-gray);
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Clipboard style for Burial Plans */
.clipboard-container {
    background-color: rgba(249, 247, 241, 0.95);
    border-radius: 10px;
    padding: 2rem;
    border: 1px solid #e0d8c5;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: relative;
}

.clipboard-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 40px;
    right: 40px;
    height: 20px;
    background-color: rgba(249, 247, 241, 0.95);
    border-bottom: 2px dashed #e0d8c5;
}

/* NEW: Modal styles for Add Contact */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
}

.modal-content {
    background-color: rgba(255, 255, 255, 0.98);
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--medium-gray);
}

.modal-header h3 {
    color: var(--primary-color);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-gray);
    line-height: 1;
}

.modal-body {
    padding: 1.5rem;
}

/* Page header styling - REMOVE THE BLUE SECONDARY HEADINGS */
.page-header {
    display: none;
    /* Hide the blue secondary page headers */
}

.content-card {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(5px);
}

/* NEW: Delete button for contacts */
.delete-contact-btn {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 0.25rem 0.75rem;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background-color 0.3s ease;
}

.delete-contact-btn:hover {
    background-color: #d32f2f;
}

.actions-cell {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* NEW: History heading styling */
.history-heading {
    color: var(--primary-color) !important;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

/* NEW: Sort dropdown styling */
.sort-controls {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
    gap: 1rem;
    align-items: center;
}

.sort-select {
    min-width: 200px;
    padding: 0.5rem;
    border-radius: 5px;
    border: 1px solid var(--medium-gray);
    background-color: white;
}

/* NEW: Simplified booking form styling */
.simplified-form {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 1rem;
    border: 1px solid var(--medium-gray);
}

/* NEW: Payment status badge */
.payment-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.payment-badge.paid {
    background-color: #E8F5E9;
    color: #2E7D32;
}

.payment-badge.unpaid {
    background-color: #FFF3E0;
    color: #EF6C00;
}

.payment-badge.booked {
    background-color: #E3F2FD;
    color: #1565C0;
}

/* Responsive design */
@media (max-width: 992px) {
    .dashboard-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
    }

    .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-item,
    .nav-subitem,
    .collapsible-header {
        padding: 0.5rem 1rem;
    }

    .input-short,
    .input-medium,
    #policyNumber,
    #dob,
    #idNumber,
    #personalNumber,
    #workNumber,
    #postalCode,
    #province,
    #memorialParkPlan,
    #planType,
    #bookingProvince,
    #memorialPark {
        max-width: 100%;
    }

    .form-row {
        margin: 0 -0.5rem;
    }

    .form-col {
        padding: 0 0.5rem;
    }

    /* SIDEBAR COLLAPSE START - Mobile adjustments */
    .sidebar-collapsed .sidebar {
        width: 100%;
    }

    .sidebar-collapsed .sidebar-header {
        opacity: 1;
        height: auto;
        padding: 1.5rem;
        display: block;
    }

    .sidebar-collapsed .nav-item span:not(.collapse-icon),
    .sidebar-collapsed .collapsible-header>div>span:not(.collapse-icon),
    .sidebar-collapsed .nav-subitem span {
        opacity: 1;
        width: auto;
        pointer-events: auto;
        display: inline-block;
    }

    .sidebar-collapsed .nav-item,
    .sidebar-collapsed .collapsible-header,
    .sidebar-collapsed .nav-subitem {
        justify-content: flex-start;
        padding: 0.5rem 1rem !important;
    }

    .sidebar-collapsed .nav-item i,
    .sidebar-collapsed .collapsible-header i:first-child,
    .sidebar-collapsed .nav-subitem i {
        margin-right: 0.75rem !important;
        min-width: 40px;
    }

    .sidebar-collapsed .collapse-icon {
        opacity: 1;
        width: auto;
        pointer-events: auto;
        display: inline-block;
    }

    .sidebar-collapsed .collapsible-content {
        display: block !important;
    }

    /* SIDEBAR COLLAPSE END */
}

@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }

    .dashboard-header {
        padding: 1rem;
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .dashboard-header-left,
    .dashboard-header-center,
    .dashboard-header-right {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .page-action-buttons {
        justify-content: center;
    }

    .form-row {
        flex-direction: column;
    }

    .form-col {
        min-width: 100%;
        margin-bottom: 1rem;
    }

    .calendar-grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .calendar-day-header {
        display: none;
    }

    .calendar-week-view {
        grid-template-columns: repeat(1, 1fr);
    }

    .modal-content {
        width: 95%;
        margin: 1rem;
        max-height: 90vh;
    }

    .booking-modal-content {
        width: 95%;
        margin: 1rem;
        max-height: 90vh;
    }

    .past-records-content {
        width: 95%;
        margin: 1rem;
        max-height: 90vh;
    }

    .form-control,
    select.form-control {
        width: 100%;
        max-width: 100%;
    }

    .login-card {
        padding: 1.5rem;
        margin: 0 1rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    .past-records-tabs {
        flex-wrap: wrap;
    }

    .past-tab-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .sort-controls {
        flex-direction: column;
        align-items: flex-start;
    }

    .actions-cell {
        flex-direction: column;
        align-items: flex-start;
    }

    .certificate-btn,
    .payment-btn,
    .edit-btn,
    .delete-btn {
        margin-left: 0;
        margin-top: 0.25rem;
        width: 100%;
    }

    .calendar-view-controls {
        flex-wrap: wrap;
    }

    .view-btn {
        flex: 1;
        min-width: 80px;
        text-align: center;
    }

    .agenda-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .agenda-date,
    .agenda-time {
        min-width: auto;
    }

    /* Profile icon responsive adjustments */
    .profile-icon {
        width: 40px;
        height: 40px;
    }

    .profile-icon .default-avatar {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .content-card {
        padding: 1.5rem;
    }

    .btn-small {
        width: 100%;
        margin-top: 0.5rem;
    }

    .form-section h3 {
        font-size: 1.2rem;
    }

    .sort-select {
        min-width: 100%;
    }

    /* Profile icon mobile adjustments */
    .profile-icon {
        width: 35px;
        height: 35px;
        border-width: 2px;
    }

    .profile-icon .default-avatar {
        font-size: 1rem;
    }

    /* Header mobile adjustments */
    .dashboard-header {
        padding: 0.75rem;
        min-height: 60px;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

/* === LANGUAGE TOGGLE & HELP CHATBOT CSS START === */

/* Language Toggle Styles */
#appLangToggle_container {
    display: inline-block;
}

#appLangToggle_btn {
    transition: all 0.3s ease;
    background-color: #4a5568 !important;
    border: 1px solid #718096;
}

#appLangToggle_btn:hover {
    background-color: #2d3748 !important;
    transform: translateY(-1px);
}

/* Help Chatbot Widget Styles - UPGRADED PREMIUM DESIGN */
#appHelpBot_container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 10000;
    font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
}

#appHelpBot_toggleBtn {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

#appHelpBot_toggleBtn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    opacity: 0;
    transition: opacity 0.3s;
}

#appHelpBot_toggleBtn:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

#appHelpBot_toggleBtn:hover::after {
    opacity: 1;
}

#appHelpBot_widget {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: 360px;
    height: 550px;
    max-height: calc(100vh - 120px);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
}

#appHelpBot_widget.open {
    display: flex;
    animation: appHelpBot_popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes appHelpBot_popIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(40px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

#appHelpBot_header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.appHelpBot_headerMain {
    display: flex;
    align-items: center;
    gap: 12px;
}

.appHelpBot_avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

#appHelpBot_header h3 {
    margin: 0;
    color: white !important;
    font-size: 1.2rem;
    font-weight: 700;
}

.appHelpBot_status {
    font-size: 0.75rem;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 5px;
}

.appHelpBot_status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 10px #4ade80;
}

#appHelpBot_closeBtn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

#appHelpBot_closeBtn:hover {
    background: rgba(255, 255, 255, 0.25);
}

#appHelpBot_body {
    padding: 20px;
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scroll-behavior: smooth;
}

/* Custom Scrollbar for Bot Body */
#appHelpBot_body::-webkit-scrollbar {
    width: 6px;
}

#appHelpBot_body::-webkit-scrollbar-track {
    background: transparent;
}

#appHelpBot_body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

#appHelpBot_messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 10px;
}

.appHelpBot_message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    animation: appHelpBot_msgSlide 0.4s ease-out forwards;
}

@keyframes appHelpBot_msgSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.appHelpBot_message.bot {
    align-self: flex-start;
    background: #ffffff;
    color: #0f172a;
    border-bottom-left-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); /* Increased shadow for depth */
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-weight: 500; /* Slightly bolder text */
}

.appHelpBot_message.user {
    align-self: flex-end;
    background: #f1f5f9;
    color: #334155;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.appHelpBot_timestamp {
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 6px;
    text-align: right;
    font-weight: 400;
}

#appHelpBot_inputArea {
    padding: 15px 20px 20px;
    background: rgba(255, 255, 255, 0.7);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

#appHelpBot_quickQuestions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.appHelpBot_quickBtn {
    background: #ffffff;
    border: 1.5px solid var(--primary-color); /* Thicker border */
    border-radius: 20px;
    padding: 10px 18px; /* Slightly larger */
    font-size: 0.9rem;
    font-weight: 600; /* Bolder button text */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(var(--primary-color-rgb), 0.1);
}

.appHelpBot_quickBtn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(var(--primary-color-rgb), 0.3);
}

/* NEW: Prominent styling for tour/action buttons inside messages */
.appHelpBot_actionBtn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) !important;
    color: white !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 12px !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(var(--primary-color-rgb), 0.4) !important;
}

.appHelpBot_actionBtn:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--primary-color-rgb), 0.5) !important;
}

#appHelpBot_inputContainer {
    display: flex;
    gap: 10px;
    background: #ffffff;
    padding: 6px 6px 6px 18px;
    border-radius: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

#appHelpBot_userInput {
    flex-grow: 1;
    border: none;
    outline: none;
    font-size: 0.95rem;
    color: #1e293b;
    padding: 10px 0;
    background: transparent;
}

#appHelpBot_sendBtn {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

#appHelpBot_sendBtn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

#appHelpBot_footer {
    padding: 10px;
    font-size: 0.75rem;
    color: #94a3b8;
    text-align: center;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.3);
}

/* Spotlight Effect for Guided Tour */
.bot-tour-highlight {
    position: relative !important;
    z-index: 11000 !important;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 255, 255, 0.8) !important;
    pointer-events: auto !important;
    transition: all 0.5s ease !important;
}

.bot-tour-label {
    position: absolute;
    background: var(--primary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    z-index: 11001;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: appHelpBot_msgSlide 0.3s ease-out;
}

/* Typing Indicator Animation */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #94a3b8;
    border-radius: 50%;
    animation: typingBounce 1s infinite alternate;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    from { transform: translateY(0); opacity: 0.4; }
    to { transform: translateY(-4px); opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #appHelpBot_widget {
        width: 320px;
        right: -10px;
        bottom: 80px;
    }
}

@media (max-width: 480px) {
    #appHelpBot_widget {
        width: calc(100vw - 40px);
        right: -5px;
        height: 80vh;
    }

    #appHelpBot_toggleBtn {
        width: 55px;
        height: 55px;
        font-size: 1.5rem;
    }
}

/* === LANGUAGE TOGGLE & HELP CHATBOT CSS END === */