 admin_style.css - FINAL CORRECTED CODE - Final Layout Fixes */
*, *::before, *::after {
    box-sizing: border-box;
}


/* --- Login Page Styles --- */
.login-container {
    width: 360px; margin: 100px auto; padding: 40px; background-color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); border-radius: 8px; border: 1px solid #dee2e6;
}
.login-container h2 { text-align: center; color: #333; margin-bottom: 20px; }
.login-container input[type="text"], .login-container input[type="password"] {
    width: 100%; padding: 12px; margin-bottom: 15px; border: 1px solid #ced4da;
    border-radius: 5px; box-sizing: border-box; font-size: 16px;
}
.login-container button {
    width: 100%; padding: 12px; background-color: #007bff; color: white;
    border: none; border-radius: 5px; cursor: pointer; font-size: 16px; transition: background-color 0.2s;
}
.login-container button:hover { background-color: #0056b3; }
.error-message { color: #721c24; background-color: #f8d7da; border: 1px solid #f5c6cb;
    padding: 10px; border-radius: 5px; text-align: center; margin-bottom: 15px;
}

/* --- Main Admin Layout --- */
.top-header {
    background-color: #ffffff;
    border-bottom: 1px solid #dee2e6;
    padding: 0 30px;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 280px; /* Matches new sidebar width */
    right: 0;
    z-index: 1000; /* Ensure header is above content */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* Add subtle shadow */
}
.top-header .header-title { font-size: 20px; font-weight: 600; }
.user-profile { display: flex; align-items: center; cursor: pointer; }
.user-profile img { width: 40px; height: 40px; border-radius: 50%; margin-right: 10px; object-fit: cover; }
/* .admin-wrapper { display: flex; } -- This is not directly used in the provided HTML structure */

.admin-sidebar {
    flex: 0 0 280px; /* Increased width */
    background-color: #343a40; 
    color: #adb5bd;
    position: fixed; 
    top: 0; 
    left: 0; 
    height: 100vh; /* Set to viewport height */
    display: flex; 
    flex-direction: column;
    z-index: 1001; /* Ensure sidebar is above header if needed */
    box-shadow: 2px 0 5px rgba(0,0,0,0.1); /* Add subtle shadow */
}
.admin-sidebar .logo { 
    padding: 9px 15px; 
    text-align: center; 
    background-color: rgba(255,255,255,0.05); 
    border-bottom: 1px solid #495057; 
    flex-shrink: 0; /* Prevent logo from shrinking */
}
.admin-sidebar .logo img { max-height: 45px; /* Increased logo size */ }

/* This is the key change for scrolling: */
.admin-sidebar .menu-scroll-area {
    flex-grow: 1; /* Allows it to take all available space between logo and support info */
    overflow-y: auto; /* Enable vertical scrolling for ONLY the menu links */
    padding-bottom: 20px; /* Add some padding at the bottom for scrolling content */
    /* Ensure no top padding here, as nav-links has its own margin-top */
}

.admin-sidebar .nav-links { 
    list-style: none; 
    padding: 0; 
    margin: 20px 0 0 0; /* Adjusted margin to prevent gap at top of scroll area */ 
}
.admin-sidebar .nav-links a { display: block; color: #ced4da; text-decoration: none; padding: 12px 25px; border-left: 3px solid transparent; transition: all 0.3s ease; }
.admin-sidebar .nav-links a:hover, .admin-sidebar .nav-links a.active { background-color: rgba(255,255,255,0.08); color: #ffffff; border-left: 3px solid #007bff; }
.support-info { 
    font-size: 12px; 
    text-align: center; 
    padding: 20px; 
    border-top: 1px solid #495057; 
    flex-shrink: 0; /* Prevent support info from shrinking */
    margin-top: auto; /* Push to bottom if menu is short */
}
.support-info strong { display: block; margin-bottom: 5px; color: #ffffff; }

.admin-main-content {
    margin-top: 0; /* මෙය ඔබගේ මුල් කේතයේ තිබූ පරිදිම තබා ගන්න. */
    padding: 100px 20px 30px 20px; /* මෙය ඔබගේ මුල් කේතයේ තිබූ පරිදිම තබා ගන්න. */
    margin-left: 280px; /* <-- මෙහි 320px වෙනුවට 280px යොදන්න. මෙය sidebar පළලට ගැලපිය යුතුයි. */
    width: calc(100% - 280px); /* <-- මෙහි 320px වෙනුවට 280px යොදන්න. */
    min-height: calc(100vh - 70px); /* මෙය ඔබගේ මුල් කේතයේ තිබූ පරිදිම තබා ගන්න. */
    position: relative; /* මෙය ඔබගේ මුල් කේතයේ තිබූ පරිදිම තබා ගන්න. */
    z-index: 1; /* මෙය ඔබගේ මුල් කේතයේ තිබූ පරිදිම තබා ගන්න. */
    /* මෙම රීති අලුතින් එක් කරන්න, ඔබගේ මුල් admin-main-content එකේ නොතිබුනේ නම් */
    box-sizing: border-box; /* අතිශය වැදගත් */
    flex-grow: 1;
    overflow-y: auto;
}

/* --- General Content Styles --- */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.page-header h1 { margin: 0; font-size: 28px; }
.btn-add, .btn-back { background-color: #007bff; color: white; padding: 10px 20px; text-decoration: none; border-radius: 5px; }
.btn-back { background-color: #6c757d; }
.data-table { 
    width: 100%; 
    border-collapse: collapse; 
    background-color: #fff; 
    border: 1px solid #dee2e6; 
    border-radius: 5px; 
    font-size: 14px; 
    table-layout: fixed; /* NEW: Forces table to respect width and fixed column sizes */
    word-wrap: break-word; /* NEW: Breaks long words/emails to fit within cells */
}

/* --- CORRECTED: Removed text-hiding properties from general td/th --- */
.data-table th, .data-table td { 
    border-bottom: 1px solid #dee2e6; 
    padding: 12px 15px; 
    text-align: left; 
    /* The following properties are now moved to specific columns if needed */
    /* overflow: hidden; */
    /* text-overflow: ellipsis; */
    /* white-space: nowrap; */ 
}

/* --- CORRECTED: Specific styles for the Actions column to show buttons neatly --- */
.data-table td.actions {
    white-space: normal; /* Allow content to wrap */
    overflow: visible; /* Ensure content is not hidden */
    min-width: 280px; /* Provide enough space for buttons to show, adjust as needed */
    
    /* Crucial for arranging buttons horizontally and wrapping */
    display: flex;         /* Enable flexbox for the cell */
    flex-direction: row;   /* Arrange items in a row (horizontally) */
    flex-wrap: wrap;       /* Allow items to wrap to the next line if space is insufficient */
    
    gap: 8px;              /* Space between buttons */
    align-items: center;   /* Vertically align buttons in the center of the row */
    justify-content: flex-start; /* Align buttons to the start of the cell */
}

.data-table thead { background-color: #f8f9fa; }
/* .actions a { text-decoration: none; padding: 5px 10px; border-radius: 3px; color: white; margin-right: 5px; font-size: 13px; } */
/* The above .actions a is mostly overridden by later, more specific button styles. */

/* Button styles that were below, ensuring they apply */
.btn-edit { background-color: #ffc107; }
.btn-delete { background-color: #dc3545; }
.data-form { background-color: #fff; padding: 30px; border-radius: 8px; border: 1px solid #dee2e6; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: bold; color: #333; }
.form-group input[type="text"], .form-group input[type="email"], .form-group input[type="password"], .form-group textarea, .form-group select { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 5px; box-sizing: border-box; font-size: 16px; }
.form-group small { font-size: 12px; color: #6c757d; }
.form-actions { margin-top: 30px; text-align: right; }
.table-wrapper { width: 100%; overflow-x: auto; /* Keep this for very narrow screens or extremely wide content */ }

/* --- Schedule Styles --- */
.schedule-grid { display: grid; grid-template-columns: 1fr; gap: 15px; }
.schedule-day { display: flex; align-items: center; background-color: #f8f9fa; padding: 15px; border-radius: 5px; border: 1px solid #dee2e6; }
.form-group-checkbox { flex: 0 0 150px; font-weight: bold; }
.form-group-checkbox label { margin-left: 10px; }
.form-group-time { display: flex; align-items: center; gap: 10px; }
.form-group-time input[type="time"] { padding: 8px; border: 1px solid #ced4da; border-radius: 4px; }

/* --- Styles for Dashboard Tiles --- */
.dashboard-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 25px; /* Space between tiles */
}
.tile {
    background-color: #007bff;
    color: white;
    padding: 20px;
    border-radius: 8px;
    flex-basis: calc(33.33% - 17px); /* Aim for 3 tiles per row, accounting for gap */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}
.tile:hover {
    transform: translateY(-5px);
}
.tile-icon {
    font-size: 40px;
    opacity: 0.7;
}
.tile-content {
    margin-top: 15px;
    flex-grow: 1;
}
.tile-number {
    font-size: 32px;
    font-weight: bold;
}
.tile-label {
    font-size: 16px;
    opacity: 0.9;
}
.tile-footer {
    border-top: 1px solid rgba(255,255,255,0.3);
    margin-top: 15px;
    padding-top: 10px;
    text-decoration: none;
    color: white;
    font-weight: 500;
}
.tile-footer span {
    float: right;
}

/* Different tile colors */
.tile.tile-blue { background-color: #17a2b8; }
.tile.tile-gray { background-color: #6c757d; }

/* Styles for Manage Bookings page */
.data-section {
    margin-bottom: 40px;
}
.data-section h2 {
    font-size: 22px;
    margin-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 10px;
}
.btn-accept { background-color: #28a745; }
.btn-reject { background-color: #dc3545; }
.status-confirmed {
    background-color: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}
/* Style for the Manage Case button */
.btn-view { background-color: #17a2b8; }

/* Styles for Client Case View page */
.data-form .form-group pre {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    white-space: pre-wrap; /* Allows text to wrap */
}
.data-form hr {
    border: none;
    border-top: 1px solid #dee2e6;
    margin: 25px 0;
}
.session-list {
    margin-top: 20px;
}
.session-item {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-left: 4px solid #007bff;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 5px;
}
.session-item strong {
    font-size: 1.1em;
}
.session-item p {
    margin: 10px 0 0 0;
}
.session-item em {
    color: #555;
    background-color: #f8f9fa;
    display: block;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
}
/* --- ACCESSIBILITY & AESTHETIC STYLES for client_case_view.php --- */

/* Make the main sections distinct */
.data-form .form-section {
    background-color: #ffffff; /* White background for forms */
    border: 1px solid #dee2e6;
    border-top: 4px solid #007bff; /* Blue top border */
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 8px;
}

/* Make the second form section have a different color */
.data-form:last-of-type .form-section {
    border-top-color: #28a745; /* Green top border for the "Add Session" form */
}

/* Style the legends (titles) to be more prominent */
.form-section legend {
    font-size: 20px;
    font-weight: 600;
    padding: 0 15px;
    margin-left: 15px;
    color: #343a40;
}

/* Make form labels larger, bolder, and add space */
.data-form .form-group label {
    font-size: 16px; /* Larger font size */
    font-weight: 600; /* Bolder text */
    margin-bottom: 10px; /* More space below the label */
    color: #495057;
}

/* Improve look of textareas and inputs when focused */
.data-form textarea:focus, .data-form input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
    outline: none;
}

/* Style for the non-editable contact details box */
.data-form .form-group pre {
    background-color: #e9ecef; /* Light grey background */
    font-family: inherit; /* Use the same font as the rest of the page */
    font-size: 16px;
    padding: 15px;
    border-radius: 5px;
    white-space: pre-wrap;
}

/* Style for the Session History section */
.data-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
    }
.session-list .session-item {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-left: 5px solid #6c757d; /* Grey left border */
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
}
.session-list .session-item strong {
    font-size: 1.1em;
}
.session-list .session-item p {
    margin: 10px 0 0 0;
}
.session-list .session-item em {
    color: #555;
    background-color: #f8f9fa;
    display: block;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
}

/* --- STYLES FOR TABS in client_case_view.php --- */
.tab-nav {
    display: flex;
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 25px;
}
.tab-nav-item {
    padding: 15px 25px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    color: #495057;
    border-bottom: 4px solid transparent;
    transition: all 0.2s ease;
}
.tab-nav-item:hover {
    color: #007bff;
}
.tab-nav-item.active {
    color: #007bff;
    border-bottom-color: #007bff;
}
.tab-content {
    display: none; /* All tabs are hidden by default */
}
.tab-content.active {
    display: block; /* The active tab is shown */
}

/* --- AESTHETIC UPGRADE for client_case_view.php form inputs and layout --- */

/* Ensures all input types in a form group look consistent */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 16px;
    font-family: inherit; /* Use the main body font */
}

/* Read-only view styles for the 'Case Summary' tab */
.summary-view {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}
.summary-view .summary-group {
    margin-bottom: 25px;
}
.summary-view .summary-label {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    display: block;
    margin-bottom: 8px;
}
.summary-view .summary-text {
    font-size: 16px;
    color: #212529;
    background-color: #f8f9fa;
    padding: 10px 15px;
    border-radius: 5px;
    white-space: pre-wrap; /* To respect line breaks */
}

/* --- STYLES FOR FINAL REPORT TAB --- */
.printable-area { padding: 20px; border: 1px solid #ccc; background: #fff; }
.report-header { text-align: center; border-bottom: 2px solid #333; padding-bottom: 10px; margin-bottom: 20px; }
.report-section { margin-bottom: 20px; }
.report-section h4 { border-bottom: 1px solid #eee; padding-bottom: 5px; margin-bottom: 10px; }
.report-footer { margin-top: 40px; padding-top: 20px; border-top: 2px solid #333; text-align: center; font-size: 14px; }
.report-actions { margin-top: 30px; text-align: center; }
.report-actions button, .report-actions a { margin: 0 10px; }

/* --- FINAL AESTHETIC POLISH for client_case_view.php --- */

/* Make form inputs look even cleaner */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
    background-color: #f8f9fa; /* A very light background for inputs */
    border: 1px solid #ced4da;
}

/* Report View Specific Styles */
.report-view {
    border: 1px solid #dee2e6;
    padding: 30px;
    background-color: #fff;
}

.report-view-header {
    text-align: center;
    border-bottom: 2px solid #343a40;
    padding-bottom: 15px;
    margin-bottom: 30px;
}
.report-view-header h2 {
    margin: 0;
    font-size: 24px;
}
.report-view-header h3 {
    margin: 5px 0 0 0;
    font-size: 18px;
    font-weight: 400;
    color: #6c757d;
}

.report-view-section {
    margin-bottom: 25px;
}
.report-view-section h4 {
    font-size: 16px;
    font-weight: 700;
    color: #007bff;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 8px;
    margin-bottom: 10px;
}
.report-view-section p {
    margin: 0;
    line-height: 1.8;
}
.report-view-footer {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 2px solid #343a40;
    font-size: 14px;
    color: #6c757d;
}
.report-actions {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 5px;
    text-align: center;
}
/* --- FINAL POLISH for Buttons in Report Tab --- */
.report-actions {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 5px;
    text-align: center;
    border: 1px solid #dee2e6;
}

.report-actions .btn-primary, 
.report-actions .btn-secondary {
    text-decoration: none;
    display: inline-block;
    padding: 12px 25px;
    margin: 0 10px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.2s ease-in-out;
}

.report-actions .btn-primary:hover,
.report-actions .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
/* Styles for status messages */
.status-message { padding: 15px; margin-bottom: 20px; border-radius: 5px; border: 1px solid; }
.success { color: #155724; background-color: #d4edda; border-color: #c3e6cb; }
.error { color: #721c24; background-color: #f8d7da; border-color: #f5c6cb; }

/* Add to the end of admin_style.css */

/* Styles for news thumbnail images in the table */
.data-table img.news-thumbnail-table-img {
    width: 80px;
    height: 50px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid #eee;
}

/* Styles for the current image preview in the form (manage_news.php) */
.form-section .current-image img {
    max-width: 200px;
    height: auto;
    border-radius: 5px;
    border: 1px solid #ddd;
    padding: 5px;
    display: block; /* Ensure it takes its own line */
    margin-bottom: 5px; /* Space below the image */
}

/* Add to the end of admin_style.css */

/* Styles for video thumbnail images in the table */
.data-table img.video-thumbnail-table-img {
    width: 80px;
    height: 50px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid #eee;
}
/* Add to the end of admin_style.css */

/* Styles for testimonial author photos in the table */
.data-table img.testimonial-author-table-img {
    width: 50px; /* Small size for table */
    height: 50px;
    object-fit: cover;
    border-radius: 50%; /* Circular */
    border: 1px solid #eee;
}

/* Styles for the current author photo preview in the form (manage_testimonials.php) */
.form-section .current-image img {
    width: 100px; /* Larger preview in form */
    height: 100px;
    object-fit: cover;
    border-radius: 50%; /* Circular */
    border: 2px solid #007bff; /* Highlight current photo */
    display: block;
    margin-bottom: 5px;
}
/* Add to the end of admin_style.css */

/* Styles for Suggestions Page */
.filter-controls {
    text-align: center;
    margin-bottom: 25px;
}

.btn-filter {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 5px;
    border: 1px solid #007bff;
    border-radius: 5px;
    text-decoration: none;
    color: #007bff;
    background-color: #fff;
    transition: all 0.2s ease;
}

.btn-filter:hover {
    background-color: #e7f5ff;
}

.btn-filter.active {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

/* Table row styles for read/unread status */
.data-table .suggestion-read {
    background-color: #f8f9fa; /* Lighter background for read suggestions */
    color: #6c757d; /* Slightly muted text */
}

.data-table .suggestion-unread {
    background-color: #fff3cd; /* Yellowish background for unread */
    font-weight: 600; /* Bolder text for unread */
    color: #333;
}

/* Action buttons for suggestions */
.btn-action {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.8em;
    font-weight: 500;
    margin-right: 5px;
}

.btn-mark-read {
    background-color: #28a745; /* Green */
    color: #fff;
}
.btn-mark-read:hover {
    background-color: #218838;
}

.btn-mark-unread {
    background-color: #ffc107; /* Yellow */
    color: #333;
}
.btn-mark-unread:hover {
    background-color: #e0a800;
}

/* Full message row (initially hidden) */
.full-message-row {
    background-color: #f0f8ff; /* Light blue background */
    border-top: 1px solid #cce5ff;
}
.full-message-row .full-message-content {
    padding: 15px 20px;
    font-size: 0.95em;
    line-height: 1.6;
    color: #333;
}
.full-message-row .full-message-content strong {
    color: #0056b3;
}
/* Add to the end of admin_style.css */

/* Styles for sidebar banner images in the table */
.data-table img.sidebar-banner-table-img {
    width: 80px; /* Small size for table */
    height: 50px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid #eee;
}

/* Styles for the current image preview in the form (manage_sidebar_elements.php) */
.form-section .current-image img {
    max-width: 150px; /* Larger preview in form */
    height: auto;
    border-radius: 5px;
    border: 1px solid #ddd;
    padding: 5px;
    display: block;
    margin-bottom: 5px;
}
/* Add to the end of admin_style.css */

/* --- General Form and Table Styles Enhancements --- */

/* Form Section Enhancements */
.form-section {
    background-color: #ffffff; /* Clean white background */
    border: 1px solid #e0e0e0; /* Lighter border */
    border-top: 5px solid #007bff; /* Thicker, prominent blue top border */
    padding: 35px; /* Slightly more padding */
    border-radius: 10px; /* More rounded corners */
    box-shadow: 0 6px 15px rgba(0,0,0,0.08); /* Stronger, softer shadow */
    margin-bottom: 35px;
}

.form-section legend {
    font-size: 1.6em; /* Larger font for legend */
    font-weight: 700; /* Bolder */
    color: #333; /* Darker text */
    padding: 0 15px;
    margin-left: 10px; /* Slightly adjusted margin */
    border-bottom: none; /* Ensure no unwanted border from previous styles */
}

/* Input and Textarea Enhancements */
.form-group label {
    font-weight: 600; /* Bolder labels */
    color: #444; /* Slightly darker grey */
    margin-bottom: 10px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group input[type="file"], /* Added file input for consistency */
.form-group textarea,
.form-group select {
    padding: 12px 15px; /* More padding */
    border: 1px solid #c0c0c0; /* Slightly darker border */
    border-radius: 8px; /* More rounded corners */
    font-size: 1.05em; /* Slightly larger font */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fcfcfc; /* Very light background */
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="url"]:focus,
.form-group input[type="number"]:focus,
.form-group input[type="password"]:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #007bff; /* Blue border on focus */
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25); /* Blue glow on focus */
    outline: none;
}

/* Checkbox specific styling */
.form-group-checkbox input[type="checkbox"] {
    width: 20px; /* Standardize checkbox size */
    height: 20px;
    vertical-align: middle; /* Align with label text */
    margin-right: 10px;
    border-radius: 4px; /* Slightly rounded checkbox */
}
.form-group-checkbox label {
    font-weight: 500; /* Lighter weight for checkbox labels */
    margin-bottom: 0; /* No bottom margin */
    color: #333;
}

/* --- Button Enhancements (Primary, Secondary, Edit, Delete) --- */

.btn-primary, .btn-secondary, .btn-edit, .btn-delete, .btn-add, .btn-back {
    padding: 12px 28px; /* More generous padding */
    border-radius: 8px; /* More rounded buttons */
    font-size: 1.05em; /* Slightly larger text */
    font-weight: 600; /* Bolder text */
    text-transform: uppercase; /* Uppercase text */
    letter-spacing: 0.5px; /* Slight letter spacing */
    transition: all 0.3s ease; /* Smooth transitions */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* Subtle shadow */
    border: none; /* Remove default border */
    cursor: pointer;
}

/* Primary Button (Add/Update) */
.btn-primary, .btn-add {
    background-color: #007bff; /* Vibrant blue */
    color: #fff;
}
.btn-primary:hover, .btn-add:hover {
    background-color: #0056b3; /* Darker blue on hover */
    transform: translateY(-2px); /* Slight lift effect */
    box-shadow: 0 6px 12px rgba(0, 123, 255, 0.25); /* Enhanced shadow on hover */
}

/* Secondary Button (Cancel/Back) */
.btn-secondary, .btn-back {
    background-color: #6c757d; /* Muted grey */
    color: #fff;
}
.btn-secondary:hover, .btn-back:hover {
    background-color: #5a6268; /* Darker grey on hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(108, 117, 125, 0.25);
}

/* Edit Button (Table Actions) */
.btn-edit {
    background-color: #ffc107; /* Amber yellow */
    color: #333; /* Dark text for contrast */
    box-shadow: none; /* No shadow for smaller buttons */
    padding: 8px 15px; /* Smaller padding */
    font-size: 0.9em;
    text-transform: none; /* No uppercase */
}
.btn-edit:hover {
    background-color: #e0a800; /* Darker yellow on hover */
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(255, 193, 7, 0.3);
}

/* Delete Button (Table Actions) */
.btn-delete {
    background-color: #dc3545; /* Red */
    color: #fff;
    box-shadow: none;
    padding: 8px 15px;
    font-size: 0.9em;
    text-transform: none;
}
.btn-delete:hover {
    background-color: #c82333; /* Darker red on hover */
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(220, 53, 69, 0.3);
}

/* Table Enhancements */
.data-table {
    border-collapse: separate; /* Allows border-radius on cells */
    border-spacing: 0; /* Remove space between cells */
    border-radius: 10px; /* Rounded corners for the entire table */
    overflow: hidden; /* Ensures rounded corners are visible */
    box-shadow: 0 6px 15px rgba(0,0,0,0.08); /* Consistent shadow */
}

.data-table th {
    background-color: #e9ecef; /* Lighter header background */
    color: #333; /* Darker text */
    font-weight: 700; /* Bolder headers */
    font-size: 1em;
    padding: 15px; /* More padding */
}

.data-table td {
    padding: 12px 15px; /* Consistent padding */
    border-top: 1px solid #f0f0f0; /* Lighter top border for rows */
}

.data-table tbody tr:nth-child(even) {
    background-color: #f8f8f8; /* Slightly darker even rows */
}

.data-table tbody tr:hover {
    background-color: #f0f5f8; /* Light blue on hover for rows */
}

/* Image previews in forms (existing styles, just ensure they are here) */
.current-image img {
    border: 1px solid #ddd;
    padding: 5px;
    border-radius: 5px;
    display: block;
    margin-bottom: 5px;
}
/* Specific styles for different image types in tables */
.data-table img.news-thumbnail-table-img,
.data-table img.video-thumbnail-table-img,
.data-table img.banner-thumbnail-table-img {
    width: 80px;
    height: 50px;
    object-fit: cover;
    border-radius: 5px; /* Slightly more rounded for table images */
    border: 1px solid #eee;
}

.data-table img.testimonial-author-table-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%; /* Circular */
    border: 2px solid #007bff; /* Blue border */
}

/* Alert Messages (ensure they are prominent) */
.alert-message {
    padding: 18px; /* More padding */
    margin-bottom: 25px; /* More margin */
    border-radius: 8px; /* More rounded */
    font-weight: 600;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Subtle shadow */
}

.alert-message.success {
    background-color: #d4edda; /* Light green */
    color: #155724; /* Dark green text */
    border: 1px solid #c3e6cb;
}

.alert-message.error {
    background-color: #f8d7da; /* Light red */
    color: #721c24; /* Dark red text */
    border: 1px solid #f5c6cb;
}

/* --- Improved Layout for Data Tables with Horizontal Scroll --- */

/* This ensures the table container handles the scrolling */
.table-wrapper {
    overflow-x: auto;
    width: 100%;
}

/* We give the table a minimum width. If the screen is smaller, the scrollbar will appear. */
.data-table {
    min-width: 1200px; /* ඔබට අවශ්‍ය නම් මෙම අගය වෙනස් කළ හැක */
    width: 100%;
    table-layout: fixed; /* Keep fixed layout for predictable columns */
}

/* --- REVISED: Removed the text-hiding styles from general td/th as they are now handled by td.actions or specific columns --- */
/* The general .data-table th, .data-table td rule above has these properties removed already.
   This section here can be removed or kept commented out as it's redundant.
.data-table th, .data-table td {
    white-space: nowrap; // This is now removed or handled by specific cells
    overflow: hidden;
    text-overflow: ellipsis;
}
*/
/* Optional: You can still suggest widths, they will apply within the 1200px min-width */
/* --- CORRECTED: Column widths, ensuring Actions column has enough space and is correctly targeted (8th child) --- */
.data-table th:nth-child(1), .data-table td:nth-child(1) { width: 4%; }  /* ID */
.data-table th:nth-child(2), .data-table td:nth-child(2) { width: 11%; } /* First Name */
.data-table th:nth-child(3), .data-table td:nth-child(3) { width: 11%; } /* Last Name */
.data-table th:nth-child(4), .data-table td:nth-child(4) { width: 14%; } /* Email - slightly reduced */
.data-table th:nth-child(5), .data-table td:nth-child(5) { width: 14%; } /* City / District - slightly reduced */
.data-table th:nth-child(6), .data-table td:nth-child(6) { width: 8%; }  /* Status */
.data-table th:nth-child(7), .data-table td:nth-child(7) { width: 8%; } /* Featured? */
.data-table th:nth-child(8), .data-table td:nth-child(8) { width: 30%; } /* Actions - Increased to 22% for better spacing */


/* === STYLES FOR CONSULTING AREAS CHECKBOX GRID === */
.consulting-areas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #dee2e6;
    margin-bottom: 20px;
    max-height: 250px; /* Limit height and make it scrollable */
    overflow-y: auto; /* Enable vertical scroll if content overflows */
}

.checkbox-group {
    display: flex;
    align-items: center;
    background-color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ced4da;
    transition: border-color 0.2s;
}
.checkbox-group:hover {
    border-color: #007bff;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.checkbox-group label {
    font-weight: 500;
    color: #495057;
    cursor: pointer;
}

.add-new-area-container {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed #ced4da;
}
.add-new-area-container > label { /* Direct child label */
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}
.add-new-area-input-group {
    display: flex;
    gap: 10px;
}
.add-new-area-input-group input {
    flex-grow: 1;
}
/* Widen the grid for longer text */
.consulting-areas-grid {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
}

/* Style for the Sinhala translation text */
.sinhala-translation {
    color: #5a6268;
    font-size: 0.9em;
    margin-left: 5px;
}

/* === STYLES FOR INTEGRATED STRESS TEST === */
.question-group { background-color: #ffffff; border: 1px solid #e0e0e0; border-radius: 10px; padding: 20px; margin-bottom: 25px; }
.question-group p { font-weight: bold; margin-bottom: 18px; color: #333; line-height: 1.6; font-size: 1.1em; text-align: left; }
.question-group .options { display: flex; flex-direction: column; gap: 12px; }
.question-group .options label { display: flex; align-items: center; padding: 12px 15px; background-color: #f7f7f7; border: 1px solid #ddd; border-radius: 8px; cursor: pointer; transition: all 0.2s ease; font-size: 1em; color: #555; text-align: left; }
.question-group .options label:hover { background-color: #eef; border-color: #cceeff; }
.question-group .options input[type="radio"] { margin-right: 12px; }
#stress-result { display: none; background-color: #fff; padding: 30px; border-radius: 8px; margin-top: 30px; border: 1px solid #ddd; }
#stress-result h3 { text-align: center; font-size: 1.8em; color: #007bff; margin-top: 0; border-bottom: 2px solid #eee; padding-bottom: 15px; }
.result-details p { font-size: 1.1em; line-height: 1.7; }
.stress-level-text { text-align: center; font-size: 1.2em; font-weight: bold; margin-top: 15px; }
.result-actions { margin-top: 25px; display: flex; gap: 15px; justify-content: center; }

/* === NEW STYLES FOR DETAILED STRESS BAR === */

.stress-bar-wrapper {
    margin: 25px 0;
    text-align: center;
}
.stress-bar-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}
.stress-bar-labels-top {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
    font-weight: bold;
    color: #555;
    padding: 0 5px;
    box-sizing: border-box;
}
.stress-bar-labels-top .none { width: 20%; text-align: left; }
.stress-bar-labels-top .low { width: 15%; }
.stress-bar-labels-top .moderate { width: 32.5%; }
.stress-bar-labels-top .high { width: 32.5%; text-align: right; }

.stress-bar {
    display: flex;
    position: relative;
    width: 100%;
    height: 30px;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid #ccc;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.1);
}
.stress-level-range { height: 100%; }
.none-range { background-color: #28a745; width: 20%; } /* 0-7 (8 points) */
.low-range { background-color: #4CAF50; width: 15%; } /* 8-13 (6 points) */
.moderate-range { background-color: #FFC107; width: 32.5%; } /* 14-26 (13 points) */
.high-range { background-color: #F44336; width: 32.5%; } /* 27-40 (14 points) */

.stress-level-indicator {
    position: absolute;
    top: -5px;
    height: calc(100% + 10px);
    width: 12px;
    background-color: #6A0DAD; /* Purple indicator */
    border: 2px solid #fff;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(0,0,0,0.7);
    transition: left 1s ease-in-out;
    z-index: 10;
    transform: translateX(-50%);
}
@keyframes pulse-indicator {
    0% { box-shadow: 0 0 0 0 rgba(106, 0, 173, 0.7); }
    70% { box-shadow: 0 0 0 12px rgba(106, 0, 173, 0); }
    100% { box-shadow: 0 0 0 0 rgba(106, 0, 173, 0); }
}
.stress-level-indicator.blinking {
    animation: pulse-indicator 1.5s infinite;
}

.stress-bar-labels-bottom {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 0.85em;
    position: relative;
    color: #666;
    width: 100%;
}
.stress-bar-labels-bottom span { position: absolute; transform: translateX(-50%); }
.label-0 { left: 0%; transform: translateX(0%); }
.label-7 { left: 20%; }
.label-13 { left: 35%; }
.label-26 { left: 67.5%; }
.label-40 { left: 100%; transform: translateX(-100%); }

/* === NEW STYLES FOR CLIENT CASE VIEW PAGE === */

.case-view-container {
    max-width: 1200px;
    margin: 20px auto;
}

/* Tab Navigation */
.tab-nav {
    display: flex;
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 25px;
}
.tab-nav-item {
    padding: 15px 25px;
    cursor: pointer;
    font-weight: 600;
    color: #495057;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}
.tab-nav-item:hover {
    background-color: #f8f9fa;
    color: #007bff;
}
.tab-nav-item.active {
    color: #007bff;
    border-bottom-color: #007bff;
}

/* Tab Content Panes */
.tab-content {
    display: none;
    animation: fadeIn 0.5s;
}
.tab-content.active {
    display: block;
}

/* Keyframe for fade-in animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Case Summary Redesign */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}
.summary-card {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.summary-card h4 {
    margin-top: 0;
    font-size: 1.3em;
    color: #007bff;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}
.summary-card p {
    margin: 0 0 10px 0;
    line-height: 1.6;
    color: #495057;
}
.summary-card strong {
    color: #343a40;
}

/* Session History Redesign */
.session-list {
    display: grid;
    gap: 20px;
}
.session-card {
    background: #fff;
    border-left: 5px solid #17a2b8; /* Teal accent */
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.session-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}
.session-card-header h4 {
    margin: 0;
    color: #17a2b8;
}
.session-card-header strong {
    font-weight: 600;
    color: #495057;
}
.session-notes-content p {
    margin: 0 0 15px 0;
    line-height: 1.7;
}
.session-notes-content strong {
    color: #343a40;
}
.private-notes {
    background-color: #fffbe6;
    border: 1px solid #ffe58f;
    border-radius: 5px;
    padding: 15px;
    font-style: italic;
    color: #856404;
}

/* Stress Report Tab Styles */
.stress-report-list {
    display: grid;
    gap: 20px;
}
.stress-result-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 20px;
}
.stress-result-card .date-info {
    font-weight: bold;
    color: #495057;
    flex-basis: 150px;
}
.stress-result-card .score-info {
    flex-grow: 1;
}
.mini-stress-bar {
    height: 25px;
    border-radius: 15px;
    background-color: #e9ecef;
    overflow: hidden;
    position: relative;
}
.mini-stress-bar-indicator {
    height: 100%;
    transition: width 0.5s ease, background-color 0.5s ease;
}
/* === STYLES FOR INTEGRATED AI SOLUTIONS === */
#ai-counseling-section .form-section { padding: 0; border: none; box-shadow: none; }
#ai-query-form { padding: 25px; background-color: #fcfcfc; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
#ai-query-form label { font-weight: bold; color: #444; text-align: left; }
#ai-query-form textarea { width: 100%; padding: 12px; box-sizing: border-box; border: 1px solid #ccc; border-radius: 6px; min-height: 150px; resize: vertical; font-size: 1em; margin-bottom: 15px; }
.language-selector-wrapper { display: flex; flex-direction: column; align-items: flex-start; }
.voice-button-wrapper button { width: 50px; height: 50px; border-radius: 50%; padding: 0; font-size: 1.5em; cursor: pointer; border: 2px solid #ccc; }
#ai-response { background-color: #f8f9fa; border-left: 5px solid #007bff; color: #333; padding: 25px; border-radius: 10px; margin-top: 20px; }
#ai-response h3 { color: #007bff; margin-top:0; }
#user-question-display { font-weight: bold; margin-bottom: 15px; color: #0056b3; line-height: 1.5; }
.ask-another-button { margin-top: 20px; }

/* === STYLES FOR EDITABLE SESSION NOTES === */
.session-card-header .session-actions {
    flex-shrink: 0;
    margin-left: 15px;
}
.session-edit {
    margin-top: 15px;
}
.session-edit .form-group {
    margin-bottom: 15px;
}
.session-edit textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    min-height: 120px;
    resize: vertical;
}
.session-edit .edit-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* === STYLES FOR CLIENT SEARCH AUTOCOMPLETE === */
.client-search-container {
    position: relative;
}
#client-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 5px 5px;
    z-index: 100;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.search-result-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}
.search-result-item:last-child {
    border-bottom: none;
}
.search-result-item:hover {
    background-color: #f0f0f0;
}
.search-result-item .client-name {
    font-weight: bold;
    color: #333;
}
.search-result-item .client-details {
    font-size: 0.9em;
    color: #666;
}
/* === STYLES FOR VIEW APPLICATION PAGE === */
.application-view-grid {
    display: grid;
    grid-template-columns: 2fr 1fr; /* 2/3 for details, 1/3 for actions */
    gap: 30px;
}
.detail-card {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
}
.detail-card h3 {
    margin-top: 0;
    font-size: 1.5em;
    color: #007bff;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}
.detail-item {
    margin-bottom: 15px;
}
.detail-item strong {
    display: block;
    color: #495057;
    margin-bottom: 5px;
}
.detail-item span, .detail-item ul {
    font-size: 1.1em;
    color: #343a40;
    padding-left: 0;
    list-style-position: inside;
}
.document-link {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px;
    background-color: #28a745;
    color: white;
    font-weight: bold;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.2s;
}
.document-link:hover {
    background-color: #218838;
}
.action-buttons {
    margin-top: 20px;
    display: grid;
    gap: 10px;
}
/* Styles for Status Badges */
.status-pending {
    background-color: #fff3cd;
    color: #856404;
    padding: 5px 10px;
    border-radius: 15px;
    font-weight: bold;
    font-size: 0.9em;
}
.status-approved {
    background-color: #d4edda;
    color: #155724;
    padding: 5px 10px;
    border-radius: 15px;
    font-weight: bold;
    font-size: 0.9em;
}
.status-rejected, .status-suspended {
    background-color: #f8d7da;
    color: #721c24;
    padding: 5px 10px;
    border-radius: 15px;
    font-weight: bold;
    font-size: 0.9em;
}
/* === ENHANCED STYLES FOR VIEW APPLICATION PAGE === */

/* Main layout grid */
.application-view-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: flex-start;
}

/* Card styling for both columns */
.detail-card {
    background-color: #fff;
    padding: 25px 30px; /* Increased padding */
    border-radius: 12px; /* Softer corners */
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
    border: 1px solid #e9ecef;
}

.detail-card h3 {
    margin-top: 0;
    font-size: 1.6em; /* Larger heading */
    color: #0056b3; /* Darker blue */
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

/* Styling for each piece of information */
.detail-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #e0e0e0;
}
.detail-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.detail-item strong {
    display: block;
    color: #6c757d; /* Grey label color */
    font-weight: 600;
    font-size: 0.9em;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item span, .detail-item ul, .detail-item div {
    font-size: 1.1em;
    color: #212529; /* Darker text for readability */
    padding-left: 0;
    line-height: 1.7;
}

.detail-item ul {
    list-style-type: none; /* Remove default bullets */
}
.detail-item ul li {
    padding: 5px 0;
}
.detail-item ul li::before {
    content: "\\f00c"; /* Font Awesome check icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #28a745;
    margin-right: 10px;
}

/* Action Buttons Styling */
.action-buttons {
    margin-top: 20px;
    display: grid;
    gap: 15px;
}

/* General style for all action links in this card */
.action-buttons a {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px;
    color: white !important; /* Override any other link color */
    font-weight: bold;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    font-size: 1em;
}
.action-buttons a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Specific button colors (reusing existing classes) */
.action-buttons .btn-accept { background-color: #28a745; }
.action-buttons .btn-reject { background-color: #dc3545; }
.action-buttons .btn-secondary { background-color: #6c757d; }

/* Responsive adjustments */
@media (max-width: 992px) {
    .application-view-grid {
        grid-template-columns: 1fr;
    }
}
/* Styles for Financial Reports Page */
.search-form-container {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #ddd;
}

.search-form-container form div {
    display: flex;
    gap: 20px;
    align-items: flex-end;
}

.search-form-container label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 14px;
    color: #555;
}

.search-form-container input[type="text"],
.search-form-container input[type="date"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.search-form-container .btn-primary,
.search-form-container .btn-secondary {
    padding: 10px 20px;
    height: 42px; /* To align with input fields */
}

.summary-section {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.summary-card {
    flex: 1;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
    text-align: center;
}

.summary-card h3 {
    margin-top: 0;
    font-size: 16px;
    color: #555;
}

.summary-card p {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 0;
}
/* --- Styles for Expense Management Page --- */

/* Makes the search form responsive and aligned */
.search-form-container fieldset div {
    display: flex;
    flex-wrap: wrap; /* Allows items to wrap on smaller screens */
    gap: 15px;
    align-items: flex-end;
}
.search-form-container .form-control {
    width: 100%;
}

/* Styles for the buttons in the search form */
.search-form-container .btn-primary,
.search-form-container .btn-secondary {
    padding: 10px 22px;
    height: 42px; /* Align height with input fields */
    line-height: 1.5;
}

/* Prevents the date in the expense list from wrapping to a new line */
.data-table .expense-date-cell {
    white-space: nowrap;
}
/* --- Styles SPECIFICALLY for Financial Dashboard Page (New & Corrected) --- */

/* No global body/sidebar/main-body-wrapper styles here anymore. They are handled by the main layout. */

/* Page Header styling (If specific to dashboard, otherwise use global one if it exists) */
.page-header h1 {
    font-size: 2rem;
    color: #343a40;
    margin-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 10px;
}

/* Filter form container */
.search-form-container {
    margin-bottom: 25px;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.filter-controls {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-item {
    flex: 1;
    min-width: 150px;
}

.filter-item label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.filter-buttons {
    display: flex;
    gap: 10px;
}

.quick-reports {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.quick-reports label {
    align-self: center;
    font-weight: 500;
    color: #555;
}

/* Summary Cards */
.summary-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.summary-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    text-align: center;
}

.summary-card .summary-title {
    margin-top: 0;
    font-size: 1rem;
    color: #6c757d;
    font-weight: 600;
}

.summary-card .summary-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0;
}

/* Specific colors for summary cards */
.summary-card.income-card {
    background-color: #e7f5ff;
}
.summary-card.income-card .summary-title,
.summary-card.income-card .summary-value {
    color: #007bff;
}

.summary-card.expense-card {
    background-color: #fff0f1;
}
.summary-card.expense-card .summary-title,
.summary-card.expense-card .summary-value {
    color: #dc3545;
}

.summary-card.net-income-card {
    background-color: #eafaf1;
    border: 1px solid #28a745;
}
.summary-card.net-income-card .summary-title,
.summary-card.net-income-card .summary-value {
    color: #28a745;
    font-weight: bold;
}
/* --- Styles SPECIFICALLY for Financial Dashboard Page --- */

/* ... අනෙකුත් styles ඉහතින් ඇති පරිදිම තබා ගන්න ... */

/* Main grid container for the dashboard layout (chart and category tables) */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr; /* Default to a single column for mobile */
    gap: 30px;
    margin-top: 30px;
}

/* On larger screens (laptops, desktops > 992px), switch to a two-column layout */
@media (min-width: 992px) {
    .dashboard-grid {
        /* Chart takes 1 unit, categories take 2 units */
        grid-template-columns: 1fr 2fr;
    }
}

/* Container for the chart */
.chart-container {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: relative;

    /* --- CHART HEIGHT CONTROL --- */
    /* Ensure it has a defined height or max-height */
    height: 400px; /* <--- Fix: Set a specific height for the container */
    max-height: 400px; /* <--- Fix: Set a max-height to prevent it from growing too much */
    overflow: hidden; /* <--- Ensure content outside this height is clipped */
    /* --- END CHART HEIGHT CONTROL --- */

    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertically center content if there's extra space */
    align-items: center;     /* Horizontally center content */
}

.chart-container .chart-title {
    margin-top: 0;
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

/* Ensure the canvas itself is responsive within its container */
.chart-container canvas {
    max-width: 100% !important; /* Force max-width to 100% */
    max-height: 100% !important; /* <--- Fix: Force max-height to 100% of its parent */
    width: auto !important; /* Allow width to adjust automatically */
    height: auto !important; /* Allow height to adjust automatically */
    display: block; /* Ensure canvas behaves as a block element */
    box-sizing: border-box; /* Include padding and border in the element's total width */
    /* background-color: #eee; /* For debugging if chart is still not visible */
}

/* ... අනෙකුත් styles පහලින් ඇති පරිදිම තබා ගන්න ... */

/* Container for the category tables (Income and Expenses) */
.category-breakdown {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.category-breakdown .table-title {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

/* Wrapper for individual tables to control overflow and styling */
.table-wrapper {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow-x: auto; /* Allows horizontal scrolling ONLY for the table if content overflows */
}

/* Specific styling for data tables within the category breakdown */
.category-breakdown .data-table {
    width: 100%;
    table-layout: fixed; /* Ensures columns respect defined widths or distribute evenly */
    border-collapse: collapse;
    min-width: 300px; /* Added a minimum width for tables to prevent squishing */
}

.category-breakdown .data-table th,
.category-breakdown .data-table td {
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    text-align: left;
    word-wrap: break-word; /* Prevents long text from overflowing cells */
}

.category-breakdown .data-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.category-breakdown .data-table tbody tr:nth-child(even) {
    background-color: #f2f2f2;
}

.category-breakdown .data-table tbody tr:hover {
    background-color: #e9ecef;
}

.category-breakdown .data-table .amount {
    text-align: right;
    font-weight: bold;
}

.category-breakdown .data-table .income-amount {
    color: #007bff;
}

.category-breakdown .data-table .expense-amount {
    color: #dc3545;
}

.category-breakdown .data-table .no-data-message {
    text-align: center;
    font-style: italic;
    color: #6c757d;
}

/* Form controls */
.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    box-sizing: border-box;
}

/* Buttons */
.btn-primary {
    background-color: #007bff;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}
.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.2s ease;
}
.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.8rem;
}
/* ================================================= */
/* === Attractive Redesign for Case Summary Tab === */
/* ================================================= */

/* The main grid container for the summary cards */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); /* Responsive columns for different screen sizes */
    gap: 25px; /* Space between cards */
}

/* Styling for each card (Client Details, Case Status, etc.) */
.summary-card {
    background: linear-gradient(145deg, #ffffff, #f9f9f9); /* A very subtle background gradient */
    border-radius: 12px; /* Softer, more modern corners */
    padding: 25px 30px; /* More comfortable padding */
    border: 1px solid #e9ecef;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06); /* A softer, deeper shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth hover effect */
}
.summary-card:hover {
    transform: translateY(-5px); /* Lifts the card on hover */
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

/* Card Title (h4) - with icon support */
.summary-card h4 {
    display: flex; /* To align icon and text */
    align-items: center;
    gap: 12px; /* Space between icon and text */
    font-size: 1.4em;
    font-weight: 600;
    color: #0056b3; /* A professional dark blue */
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}
.summary-card h4 .fa-icon { /* A class for the icon */
    font-size: 1.2em; /* Make icon slightly larger */
    color: #007bff; /* Brighter blue for the icon */
    width: 30px; /* Fixed width for alignment */
    text-align: center;
}

/* Data pairs within the card (e.g., Name: John Doe) */
.data-point {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 5px; /* Vertical padding */
    border-bottom: 1px solid #f2f2f2;
    font-size: 1rem;
    transition: background-color 0.2s ease;
}
.data-point:hover {
    background-color: #f8f9fa; /* Highlight row on hover */
}
.data-point:last-child {
    border-bottom: none;
}
.data-point strong { /* The label (Name, Reg No) */
    color: #5a6268; /* Muted gray for label */
    font-weight: 600;
    flex-shrink: 0; /* Prevents the label from shrinking */
    margin-right: 15px;
}
.data-point span { /* The value (John Doe, 0458) */
    color: #212529; /* Dark text for value */
    text-align: right;
    font-weight: 500;
    word-break: break-all; /* Breaks long text like emails */
}

/* Styling for multi-line content like Address or Problem Description */
.data-block {
    padding-top: 15px;
}
.data-block strong {
    display: block;
    margin-bottom: 8px;
    color: #0056b3; /* Blue label for block titles */
    font-weight: 600;
    font-size: 1.1em;
}
.data-block p {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin: 0;
    line-height: 1.7;
    color: #212529;
}

/* Nested grid for the "Initial Assessment" section */
.assessment-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2x2 grid */
    gap: 25px;
}

@media (max-width: 768px) {
    .assessment-grid {
        grid-template-columns: 1fr; /* Stack on smaller screens */
    }
}
/* ======================================================== */
/* === Justified Paragraph Style for Assessment/Problem === */
/* ======================================================== */

/* This rule targets the paragraphs in the "Nature of Problem" and "Initial Assessment" cards. */
.data-block p {
    background-color: #f8f9fa;    /* A subtle background color */
    padding: 15px 20px;           /* Comfortable padding around the text */
    border-radius: 8px;           /* Soft rounded corners */
    border: 1px solid #e9ecef;    /* A light border */
    margin: 0;                    /* Remove default margins */

    /* --- ADJUSTED STYLES AS PER YOUR REQUEST --- */
    font-size: 16px;              /* Standard, readable font size */
    line-height: 1.8;             /* Comfortable spacing between lines for paragraphs */
    text-align: justify;          /* Aligns text to both left and right edges (Justify) */
    color: #333;                  /* Dark grey for good readability */
}

/* --- Style for the View/Manage Case Button --- */
.btn-manage-case {
    display: inline-block;
    padding: 8px 15px;
    background-color: #007bff; /* Primary Blue Color */
    color: white !important;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
	    /* --- අලුතින් මෙම පේළි 3 එකතු කරන්න --- */
    position: relative;
    z-index: 10;
    cursor: pointer;
}

.btn-manage-case:hover {
    background-color: #0056b3; /* Darker Blue on Hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
/* --- Styles for Accept/Reject Buttons --- */
.btn-accept, .btn-reject {
    display: inline-block;
    padding: 6px 12px;
    margin-right: 5px;
    color: white !important;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-accept {
    background-color: #28a745; /* Green */
}
.btn-accept:hover {
    background-color: #218838; /* Darker Green */
}

.btn-reject {
    background-color: #dc3545; /* Red */
}
.btn-reject:hover {
    background-color: #c82333; /* Darker Red */
}
 /* Specific styles for the summary table to override general data-table styles */
    .summary-table {
        border-collapse: collapse;
        width: 100%;
        max-width: 600px; /* Adjust this width as needed */
        margin: 0 auto;
        font-family: Arial, sans-serif;
        border: 1px solid #ddd;
    }
    .summary-table th, .summary-table td {
        padding: 8px;
        text-align: left;
        border-bottom: 1px solid #ddd;
    }
    .summary-table th {
        background-color: #f2f2f2;
        text-align: left;
    }
    .summary-table tfoot th {
        background-color: #e0e0e0;
        font-weight: bold;
    }
    .summary-table .amount {
        text-align: right;
    }
    
    /* මෙම කේතය admin_style.css ගොනුවේ අවසානයටම එකතු කරන්න */

/* Today's Sessions Section */
.today-sessions {
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.today-sessions ul {
    list-style-type: none;
    padding: 0;
}

.today-sessions li {
    background-color: #fff;
    padding: 10px;
    border-left: 5px solid #007bff;
    margin-bottom: 8px;
    border-radius: 4px;
}

/* Calendar Styling */
.calendar-container {
    max-width: 900px;
    margin: 20px auto;
    font-family: Arial, sans-serif;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 20px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-header h2 {
    font-size: 1.5em;
    color: #333;
    margin: 0;
}

.calendar-header button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
}

.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.day-of-week {
    text-align: center;
    font-weight: bold;
    color: #555;
    padding: 5px;
    border-bottom: 2px solid #ddd;
}

.day {
    position: relative;
    padding: 15px 5px;
    text-align: right;
    border-radius: 8px;
    background-color: #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.day:hover {
    background-color: #e0e0e0;
}

.day.empty {
    background-color: transparent;
    cursor: default;
}

.day.today {
    background-color: #d1e7ff;
    border: 2px solid #007bff;
}

.day.has-session {
    background-color: #aed581; /* සැසියක් ඇති දින සඳහා වර්ණය */
    font-weight: bold;
    color: #333;
}

.day.has-session::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background-color: #4CAF50;
    border-radius: 50%;
}

.tooltip {
    visibility: hidden;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
}

.day.has-session:hover .tooltip {
    visibility: visible;
    opacity: 1;
}


/* Accepted Bookings Section */
.booking-search-container {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 300px;
}

.search-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
}

.accepted-bookings table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.accepted-bookings th, .accepted-bookings td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.accepted-bookings th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.accepted-row {
    background-color: #fff7e6; /* කහ පැහැයෙන් පෙන්වීම */
}

/* Session Management in client_case_view */
.session-management {
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.session-management h4, .session-management h5 {
    color: #007bff;
    border-bottom: 2px solid #eee;
    padding-bottom: 5px;
}

.session-management label {
    font-weight: bold;
    display: inline-block;
    width: 120px;
    margin-bottom: 10px;
}

.session-management input[type="date"],
.session-management input[type="time"] {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.schedule-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
}

.status-message {
    padding: 10px;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 5px;
    margin-bottom: 15px;
}

/* ======================================================= */
/* --- Assessment Guide Modal (Complete & Corrected Styles) --- */
/* ======================================================= */

/* The clickable icon (i) next to the label */
.guide-icon {
    margin-left: 8px;
    color: #007bff;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    display: inline-block;
    border: 1px solid #c0c0c0;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    text-align: center;
    line-height: 20px; /* Vertically centers the icon text */
    transition: all 0.2s ease-in-out;
    user-select: none; /* Prevents text selection on double click */
}

.guide-icon:hover {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

/* The Modal (background) - This part was missing in the previous instruction */
.modal { 
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.6); 
}

/* Modal Content/Box - This part was missing in the previous instruction */
.modal-content { 
    background-color: #fefefe; 
    margin: 15% auto; 
    padding: 25px; 
    border: 1px solid #888; 
    width: 90%; 
    max-width: 550px; 
    border-radius: 8px; 
    position: relative; 
    animation-name: animatetop; 
    animation-duration: 0.4s; 
}

/* Modal Animation - This part was missing in the previous instruction */
@keyframes animatetop { 
    from {top: -300px; opacity: 0} 
    to {top: 0; opacity: 1} 
}

/* The Close Button (x) - This part was missing in the previous instruction */
.close-button { 
    color: #aaa; 
    float: right; 
    font-size: 28px; 
    font-weight: bold; 
}

.close-button:hover, 
.close-button:focus { 
    color: black; 
    text-decoration: none; 
    cursor: pointer; 
}

/* Modal Title and Body styles for Table-like look */
#modal-title {
    margin-top: 0;
    padding-bottom: 10px;
    color: #333;
    border-bottom: 2px solid #eee; /* Adds a subtle line below the title */
}

#modal-body ul {
    list-style-type: none;
    padding-left: 0;
    margin-top: 20px;
    border: 1px solid #ddd; /* Adds a border around the entire list */
    border-radius: 5px;
    overflow: hidden; /* Ensures the border radius is applied correctly to child elements */
}

#modal-body li {
    padding: 15px 12px; /* Increased padding for more space */
    font-size: 15px;
    line-height: 1.6; /* Increased line spacing within the text */
    border-bottom: 1px solid #ddd; /* A line between each item, like a table row */
    background-color: #ffffff; /* Default background color for rows */
}

/* Zebra striping for rows (like a table) */
#modal-body li:nth-child(even) {
    background-color: #f8f9fa; /* A very light grey for alternate rows */
}

/* To remove the bottom border from the very last item */
#modal-body li:last-child {
    border-bottom: none;
}

/* ============================================= */
/* --- Manage Bookings Table Styles --- */
/* ============================================= */

/* The main container for the table */
.table-container {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    overflow-x: auto; /* Ensures table is responsive on small screens */
}

/* General styles for the table */
.table-container table {
    width: 100%;
    border-collapse: collapse; /* Removes double borders */
    margin-top: 15px;
}

/* Styling for table header (th) and cells (td) */
.table-container th,
.table-container td {
    padding: 12px 15px; /* Adds space inside each cell */
    text-align: left;
    border-bottom: 1px solid #e3e6f0; /* Adds a subtle line between rows */
    vertical-align: middle;
}

/* Header-specific styles */
.table-container th {
    background-color: #f8f9fc;
    color: #5a5c69;
    font-weight: 600; /* Bolder font for headers */
    font-size: 14px;
}

/* Zebra-striping for table body rows */
.table-container tbody tr:nth-child(even) {
    background-color: #f8f9fc; /* A very light grey for alternate rows */
}

.table-container tbody tr:hover {
    background-color: #e9ecef; /* Highlight row on hover */
}

/* Styling for the action buttons */
.table-container .actions a {
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    display: inline-block;
    margin-right: 5px;
    transition: background-color 0.2s ease-in-out;
    text-align: center;
}

.table-container .btn-accept {
    background-color: #1cc88a; /* Green */
    border: 1px solid #1cc88a;
}
.table-container .btn-accept:hover {
    background-color: #17a673;
}

.table-container .btn-reject {
    background-color: #e74a3b; /* Red */
    border: 1px solid #e74a3b;
}
.table-container .btn-reject:hover {
    background-color: #d33a2c;
}