﻿/* ===================== Clean Tabs (Light/Dark Modes) ===================== */
/* Usage: add class "tabs-clean" to ul.nav.nav-tabs to apply styles */
.tabs-clean.nav-tabs {
	border-bottom: none !important;
	position: relative !important; /* Needed for baseline positioning */
}

/* Remove any border utility on the tabs container if present */
.tabs-clean.border {
	border: none !important;
}

.tabs-clean.nav-tabs .nav-link {
	border: none !important;
	color: #000 !important; /* Light mode: black text */
	background-color: transparent !important; /* Transparent background */
	position: relative !important; /* Ensure underline sits above baseline */
	z-index: 1 !important;
}

/* Light mode hover: only background a bit lighter than dark blue */
.tabs-clean.nav-tabs .nav-link:hover {
	background-color: #d7e0fe !important; /* Lighter than #004080 */
}

/* Active/Focus state: dark blue text with underline (no fill) */
.tabs-clean.nav-tabs .nav-link.active,
.tabs-clean.nav-tabs .nav-link:focus {
	color: #004080 !important;
	background-color: transparent !important;
	border: none !important;
	border-bottom: 3px solid #004080 !important; /* Underline */
}

/* 1px baseline under all tabs (aligned with active underline) */
.tabs-clean.nav-tabs::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 1px;
	background-color: rgba(0, 64, 128, 0.2) !important; /* Light mode: blue @ 20% */
	pointer-events: none;
	z-index: 0;
}

/* Dark mode overrides */
@media (prefers-color-scheme: dark) {
	.tabs-clean.nav-tabs .nav-link {
		color: #ffffff !important; /* Dark mode: white text */
		background-color: transparent !important;
	}

	/* Dark mode hover: only text color a bit blue, bg still transparent */
	.tabs-clean.nav-tabs .nav-link:hover {
		color: #6aa0ff !important; /* Softer blue for hover */
		background-color: transparent !important;
	}

	/* Active/Focus: keep dark blue underline and text */
	.tabs-clean.nav-tabs .nav-link.active,
	.tabs-clean.nav-tabs .nav-link:focus {
		color: #6aa0ff !important;
		background-color: transparent !important;
		border: none !important;
		border-bottom: 3px solid #004080 !important;
	}

	/* Dark mode baseline color: white @ 50% */
	.tabs-clean.nav-tabs::after {
		background-color: rgba(255, 255, 255, 0.5) !important;
	}
}

/* Support class-based dark themes (app-level toggles) */
.dark .tabs-clean.nav-tabs .nav-link,
.dark .tabs-clean.nav-tabs .nav-link:link,
.dark .tabs-clean.nav-tabs .nav-link:visited,
.dark-mode .tabs-clean.nav-tabs .nav-link,
.dark-mode .tabs-clean.nav-tabs .nav-link:link,
.dark-mode .tabs-clean.nav-tabs .nav-link:visited,
.theme-dark .tabs-clean.nav-tabs .nav-link,
.theme-dark .tabs-clean.nav-tabs .nav-link:link,
.theme-dark .tabs-clean.nav-tabs .nav-link:visited,
[data-theme='dark'] .tabs-clean.nav-tabs .nav-link,
[data-theme='dark'] .tabs-clean.nav-tabs .nav-link:link,
[data-theme='dark'] .tabs-clean.nav-tabs .nav-link:visited {
	color: #ffffff !important;
	background-color: transparent !important;
}

.dark .tabs-clean.nav-tabs .nav-link:hover,
.dark-mode .tabs-clean.nav-tabs .nav-link:hover,
.theme-dark .tabs-clean.nav-tabs .nav-link:hover,
[data-theme='dark'] .tabs-clean.nav-tabs .nav-link:hover {
	color: #6aa0ff !important; /* text only */
	background-color: transparent !important;
}

.dark .tabs-clean.nav-tabs .nav-link.active,
.dark .tabs-clean.nav-tabs .nav-link:focus,
.dark-mode .tabs-clean.nav-tabs .nav-link.active,
.dark-mode .tabs-clean.nav-tabs .nav-link:focus,
.theme-dark .tabs-clean.nav-tabs .nav-link.active,
.theme-dark .tabs-clean.nav-tabs .nav-link:focus,
[data-theme='dark'] .tabs-clean.nav-tabs .nav-link.active,
[data-theme='dark'] .tabs-clean.nav-tabs .nav-link:focus {
	color: #6aa0ff !important;
	background-color: transparent !important;
	border: none !important;
	border-bottom: 3px solid #004080 !important;
}

/* Class-based dark themes baseline override: white @ 50% */
.dark .tabs-clean.nav-tabs::after,
.dark-mode .tabs-clean.nav-tabs::after,
.theme-dark .tabs-clean.nav-tabs::after,
[data-theme='dark'] .tabs-clean.nav-tabs::after {
	background-color: rgba(255, 255, 255, 0.5) !important;
}



body {
    padding-top: 50px;
    padding-bottom: 20px;
    background-image: url(./Image/Background.jpg);
    background-repeat: repeat-y;
    background-size: 13.5%;
}

/* Set padding to keep content from hitting the edges */
.body-content {
    padding-left: 15px;
    padding-right: 15px;
}

/* Override the default bootstrap behavior where horizontal description lists 
   will truncate terms that are too long to fit in the left column 
*/
.dl-horizontal dt {
    white-space: normal;
}

/* Set width on the form input elements since they're 100% wide by default */
input,
select,
textarea {
    max-width: 280px;
}

/* WebGrid Styles */

.gridtable {
    width: 100%;
    border: 1px double #575555;
}

    .gridtable thead,
    .gridtable thead a:link,
    .gridtable thead a:hover,
    .gridtable thead a:visited,
    .gridtable header {
        color: #94b454;
        text-align: center;
    }

    .gridtable tfoot,
    .gridtable tfoot a:link,
    .gridtable tfoot a:hover,
    .gridtable tfoot a:visited {
        text-align: center;
        background-color: #94b454;
        /*background: url('/Content/images/toolbar.jpg');*/
        color: Black;
    }

.gridtable-header {
    /* background: url('/Content/images/toolbar.jpg');*/
    border: 1px double #575555;
}

.gridtable-alt {
    background-color: #7bcfb3;
    border: 1px double #575555;
}

.gridtable th {
    border: 2px double #575555;
    padding: 5px;
    /*background: url('/Content/images/toolbar.jpg');*/
}

.gridtable td {
    border: 1px double #575555;
}

.side {
    background-color: #609733;
    width: 250px;
    padding: 1px;
    color: #e4e0e0;
    text-align: left;
    font-size: 14px;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    /*border: 5px dotted #2f7e7e;*/
    background: rgb(72, 173, 62);
    background: linear-gradient(90deg, rgb(37, 124, 71) 0%, rgb(13, 134, 124) 50%, rgb(90, 207, 153) 100%);
    transition: width 5s;
}

.pointer {
    cursor: pointer;
}

.menu ul {
    /*list-style-type:armenian;*/
    margin: auto;
    padding: 0;
}

/* --------------------------Make style for list--------------------------------------- */
.menu li {
    text-align: left;
    border-radius: 14px;
    padding: 8px;
    margin-bottom: 7px;
    background-color: #9ec059;
    color: #0b301fcb;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}

    /* --------------------------Make style for hover of list--------------------------------------- */
    .menu li:hover {
        background-color: #609733;
    }

#listshadow {
    border: 0px solid;
    padding: 10px;
    box-shadow: 2px 2px 2px 2px #819163;
}

/* --------------------------Col-1 to 12 does not work on iOs devices, -------------------------- */
/* --------------------------Define Bootstrap Col-1 to 12 in percent format to fix Ios side------ */

.ucol-1 {
    width: 8.3333% !important;
}
.ucol-2 {
    width: 16.6666% !important;
}
.ucol-3 {
    width: 24.9999% !important;
}
.ucol-4 {
    width: 33.3332% !important;
}
.ucol-5 {
    width: 41.6665% !important;
}
.ucol-6 {
    width: 49.9998% !important;
}
.ucol-7 {
    width: 58.3331% !important;
}
.ucol-8 {
    width: 66.6664% !important;
}
.ucol-9 {
    width: 74.9997% !important;
}
.ucol-10 {
    width: 83.3335% !important;
}
.ucol-11 {
    width: 91.6663% !important;
}
.ucol-12 {
    width: 100% !important;
}

/*@*Start- DevOps Code : #101 - step 3.a CSS for the Green btn and text to add new Member *@*/ 
.add-member-container {
    display: flex;
    align-items: center; /* Align circle and text in the center vertically */
   /* margin-bottom: 5px;*/
    
    padding-right:5px;
    cursor: pointer;
}

    .Hover_gray:hover {
        background-color: lightgray;
  
    }

.circle-green {
    width: 45px; /* Width of the circle */
    height: 45px; /* Height of the circle */
    background: radial-gradient(circle, #90ee90 0%, green 100%); /* Radial gradient from light green to green */
    border-radius: 50%; /* Make it a circle */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2); /* Add a subtle shadow */
    margin-right: 10px; /* Space between the circle and the text */
    cursor: pointer;
}

.plus-sign {
    color: white; /* White plus sign */
    font-size: 35px; /* Size of the plus sign */
    font-weight: bold; /* Bold for a thicker plus sign */
}

.plus-sign-green {
    color: limegreen; /* green plus sign */
    font-size: 35px; /* Size of the plus sign */
    font-weight: bold; /* Bold for a thicker plus sign */
    margin-left:5px;
    margin-right:5px;
}

.Minus-sign-Red {
    color: red; /* green plus sign */
    font-size: 35px; /* Size of the plus sign */
    font-weight: bold; /* Bold for a thicker plus sign */
    margin-left: 5px;
    margin-right: 5px;
}
.Dollar-sign-green {
    color: limegreen; /* green plus sign */
    font-size: 25px; /* Size of the plus sign */
    font-weight: bold; /* Bold for a thicker plus sign */
    margin-left: 5px;
    margin-right: 5px;
}
.add-member-text {
    font-size: 14px; /* Size of the text */
    color: black; /* Text color */
}

#Tran_recordTable td, #Tran_recordTable th {
    padding-left: 2px;
}

/*@*End- DevOps Code : #101 - step 3.a CSS for the Green btn and text to add new Member *@*/

/*Centrelised CSS from cshtml into Shared file = Site.css to shre CSS between all Shared layouts*/ 
/*@* make a div to disapear/ invis *@*/ 
.div-hide {
    display: none;
}



/*@* to make any item centre. we should define Dive and put this class for that div and set othe items inside div*@*/ 
.item-centre {
    display: flex;
    justify-content: center;
    text-align: center;
    vertical-align: central;
}
/* Add hyphenation for longer words */
.break-word {
    /*    word-break: break-all;
    hyphens: auto;*/
    word-break: break-word !important;
    word-wrap: break-word !important;
}
/*------------------------------Language Fa En toggle css------------------------------*/
#language-toggle {
    display: inline-block;
    cursor: pointer;
}

    #language-toggle span {
        padding: 5px;
        /*border: 1px solid #ccc;*/
        border-radius: 5px;
        margin: 0 3px;
    }

.item_hide {
    display: none;
}

/*------------------------------Rotating item 90 degrees Clockwise---------------------------------*/
.smooth_rotate {
    transition: transform 0.5s ease; /* Smooth rotation */
}

.rotate-down {
    transform: rotate(90deg); /* Rotates the icon 90 degrees */
}


/*class to make item's pointer as a hand and color as general color for the website*/
.blue_hand {
    cursor: pointer;
    color: #004080 ; /* Force override */
}

/*make a gap on top of the tab-content under tabs and pills*/
.tab-content {
    padding-top:20px;
}

/*make labels to the right , remove gaps from label and text boxes*/
/* Only apply flex properties when not using Bootstrap grid system */
.col-form-label:not(.col-4):not(.col-3):not(.col-2):not(.col-1) {
    justify-content: end;
    display: flex;
}
/*Dark Blue color for text as site Theme*/
.text_darkBlue {
    color: #004080;
}
/*-----------------------------badg/circle of count----------------------------------*/

/* Free spot number style in the top left corner */
.Badg-Location {
    position: relative; /* Enable absolute positioning within this container */
}


/*Free Spot in Calendar_Mobile / reservation*/
.Badg-style {
    font-family: "Shabnam-Light-FD" !important;
    display: flex; /*Use flexbox for centering */
    align-items: center; /* Center vertically */
    justify-content: center; /* Center horizontally */
    width: 15px;
    height: 15px;
    font-size: 10px !important;
    color: White;
    background-color: #b464bb !important;
    margin: 0px 10px 0px 0px !important; /* Add right margin for spacing */
    border-radius: 50%; /* Ensure the shape stays circular */
    text-align: center !important;
    padding: 0px !important;
    position: absolute;
    top: -5px; /* Adjust as needed */
    left: -14px; /* Adjust as needed */
}

/* English font for calendar badges when language is not Persian */
.Badg-style-en {
    font-family: "Arial, sans-serif" !important;
    display: flex; /*Use flexbox for centering */
    align-items: center; /* Center vertically */
    justify-content: center; /* Center horizontally */
    width: 15px;
    height: 15px;
    font-size: 10px !important;
    color: White;
    background-color: #b464bb !important;
    margin: 0px 5px 0px 0px !important; /* Add right margin for spacing */
    border-radius: 50%; /* Ensure the shape stays circular */
    text-align: center !important;
    padding: 0px !important;
    position: absolute;
    top: -5px; /* Adjust as needed */
    left: -14px; /* Adjust as needed */
}

/*-----------------------------Unified Back Button Styles----------------------------------*/

/* Unified back button style for consistent appearance across all pages */
.back-btn {
    border: 2px solid #d3d3d3 !important;
    background-color: white !important;
    color: black !important;
    text-decoration: none !important;
    padding: 8px 16px !important;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: inline-block;
    margin-bottom: 40px !important; /* Add space under back button to prevent footer overlap */
}

.back-btn:hover {
    background-color: #f8f9fa !important;
    border-color: #6c757d !important;
    color: #495057 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    text-decoration: none !important;
}

.back-btn:active {
    transform: translateY(0px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.back-btn:focus {
    color: #495057 !important;
    text-decoration: none !important;
    outline: none;
}

.back-icon {
    transition: transform 0.3s ease;
}

.back-btn:hover .back-icon {
    transform: translateX(-3px);
}

/*-----------------------------Action Buttons Container (SM_Client/Index)----------------------------------*/

/* Action buttons container for right-aligned buttons */
.action-buttons-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Base action button styles - MOVED TO UNIFIED HEIGHT SYSTEM BELOW */

/* Add New button specific styles - Override Bootstrap outline hover behavior */
.add-btn.btn-outline-primary:hover {
    background-color: transparent !important;
    color: #007bff !important;
    border-color: #007bff !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.add-btn.btn-outline-primary:focus {
    background-color: transparent !important;
    color: #007bff !important;
    border-color: #007bff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Save button specific styles - Same as Add New button */
.save-btn.btn-outline-primary:hover {
    background-color: transparent !important;
    color: #007bff !important;
    border-color: #007bff !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.save-btn.btn-outline-primary:focus {
    background-color: transparent !important;
    color: #007bff !important;
    border-color: #007bff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Print button specific styles - Match save button hover effect */
.print-btn.btn-outline-primary:hover {
    background-color: transparent !important;
    color: #007bff !important;
    border-color: #007bff !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.print-btn.btn-outline-primary:focus {
    background-color: transparent !important;
    color: #007bff !important;
    border-color: #007bff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Cancel button specific styles - Override Bootstrap outline-secondary hover behavior */
.cancel-btn.btn-outline-secondary:hover {
    background-color: transparent !important;
    color: #6c757d !important;
    border-color: #6c757d !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

.cancel-btn.btn-outline-secondary:focus {
    background-color: transparent !important;
    color: #6c757d !important;
    border-color: #6c757d !important;
    box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.25);
}

/* Actions button specific styles */
.settings-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

/* OLD RESPONSIVE SECTION - REPLACED BY UNIFIED SYSTEM BELOW */

/* ========= UNIFIED HEIGHT SYSTEM FOR ALL CONTROLS ========= */

/* Base height for all controls - Desktop */
.action-btn,
select[id$="-pagesize"],
.search-container input[type="text"],
.search-container .btn {
    height: 38px !important;
    line-height: 1.5 !important;
    border-radius: 6px !important;
}

/* Action buttons - consistent sizing */
.action-btn {
    border: 2px solid #d3d3d3 !important;
    padding: 8px 16px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    min-width: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
    gap: 6px !important;
}



/* Tiny + button for address dropdowns */
.tiny-plus-btn {
    height: 28px !important;
    width: 28px !important;
    padding: 0 !important;
    font-size: 20px !important;
    font-weight: bold !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 4px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    text-decoration: none !important;
    border: 2px solid #d3d3d3 !important;
    transition: all 0.3s ease !important;
}

.tiny-plus-btn:hover {
    background-color: #007bff !important;
    border-color: #007bff !important;
    color: white !important;
}

/* Per page dropdown - consistent sizing */
select[id$="-pagesize"] {
    max-width: 120px !important;
    min-width: 120px !important;
    margin-left: 8px !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
}

/* Search controls - consistent sizing */
.search-container input[type="text"] {
    padding: 8px 12px !important;
    font-size: 14px !important;
}

.search-container .btn {
    padding: 8px 12px !important;
    font-size: 14px !important;
}

/* Action buttons container spacing */
.action-buttons-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

/*-----------------------------Custom Actions Dropdown Menu (SM_Client/Index)----------------------------------*/

/* Custom dropdown container */
.custom-dropdown {
    position: relative !important;
    display: inline-block !important;
}

/* Custom dropdown menu styling */
.custom-dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    min-width: 200px !important;
    background-color: #ffffff !important;
    border: 1px solid #e9ecef !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    border-radius: 8px !important;
    padding: 8px 0 !important;
    z-index: 1050 !important;
    display: none !important; /* Hidden by default */
    margin-top: 2px !important;
    opacity: 0 !important;
    transform: translateY(-10px) !important;
    transition: all 0.3s ease !important;
}

/* Show dropdown when visible */
.custom-dropdown-menu.show,
.custom-dropdown-menu[style*="display: block"] {
    display: block !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* DEBUG: Temporary class to force visibility for testing */
.custom-dropdown-menu.debug-show {
    display: block !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
    border: 3px solid red !important; /* Visual indicator */
}

/* ========= EDIT COLUMN ONLY - FIXED 50PX WIDTH ========= */
/* ONLY target the last column (Edit) in SM_Client table */
#clients-table-container-table th:last-child,
#clients-table-container-table td:last-child {
    width: 50px !important;
    min-width: 50px !important;
    max-width: 50px !important;
    text-align: center !important;
    vertical-align: middle !important;
}

/* Center the edit icon in the Edit column */
#clients-table-container-table td:last-child a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    margin: 0 auto !important;
}

#clients-table-container-table td:last-child a i.fas.fa-edit {
    margin: 0 !important;
    padding: 0 !important;
}

/* Dropdown arrow styling */
.dropdown-arrow {
    margin-left: 6px !important;
    font-size: 10px !important;
    transition: transform 0.2s ease !important;
}

.custom-dropdown-toggle[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg) !important;
}

/* Dropdown headers */
.custom-dropdown-menu .dropdown-header {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #6c757d !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 8px 16px 4px !important;
    margin-bottom: 4px !important;
    border: none !important;
    background: none !important;
}

/* Dropdown items */
.custom-dropdown-menu .dropdown-item {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 16px !important;
    font-size: 14px !important;
    color: #212529 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    border: none !important;
    background: none !important;
    width: 100% !important;
    text-align: left !important;
    cursor: pointer !important;
}

.custom-dropdown-menu .dropdown-item:hover {
    background-color: #f8f9fa !important;
    color: #495057 !important;
    text-decoration: none !important;
}

.custom-dropdown-menu .dropdown-item:focus {
    outline: none !important;
    background-color: #f8f9fa !important;
}

/* Dropdown item icons */
.custom-dropdown-menu .dropdown-item i {
    width: 16px !important;
    text-align: center !important;
    flex-shrink: 0 !important;
}

/* Dropdown divider */
.custom-dropdown-menu .dropdown-divider {
    height: 0 !important;
    margin: 8px 0 !important;
    overflow: hidden !important;
    border-top: 1px solid #e9ecef !important;
    border-bottom: none !important;
}

/* Mobile adjustments for custom dropdown */
@media (max-width: 767.98px) {
    .custom-dropdown-menu {
        min-width: 180px !important;
        font-size: 13px !important;
    }
    
    .custom-dropdown-menu .dropdown-item {
        padding: 10px 16px !important;
        font-size: 13px !important;
    }
    
    .dropdown-arrow {
        margin-left: 4px !important;
    }
}

/*-----------------------------Bottom Layout Row (SM_Client/Index)----------------------------------*/

/* Bottom layout container */
.bottom-layout-row {
    margin-top: 20px !important;
    padding: 15px 0;
    border-top: 1px solid #e9ecef;
    background-color: transparent !important;
    background: none !important;
}

.bottom-left, .bottom-center, .bottom-right {
    display: flex;
    align-items: center;
    background-color: transparent !important;
    background: none !important;
}

.bottom-left {
    justify-content: flex-start;
    flex: 0 0 auto;
}

.bottom-center {
    justify-content: center;
    flex: 1;
    text-align: center;
}

.bottom-right {
    justify-content: flex-end;
    flex: 0 0 auto;
}

/* Responsive layout for mobile */
@media (max-width: 767.98px) {
    .bottom-layout-row {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .bottom-left, .bottom-center, .bottom-right {
        justify-content: center;
        width: 100%;
    }
    
    /* Stack order: Pagination, Table info, Back button */
    .bottom-left {
        order: 3; /* Back button goes to bottom */
    }
    
    .bottom-center {
        order: 2; /* Table info stays in middle */
    }
    
    .bottom-right {
        order: 1; /* Pagination goes to top */
    }
    
    /* Add extra spacing under back button on mobile to prevent footer overlap */
    .bottom-left {
        margin-bottom: 60px !important; /* Extra space under back button */
        padding-bottom: 20px !important;
    }
}

/* Form buttons container - match form field width exactly */
.form-group .offset-3 {
    display: flex;
    gap: 6px; /* Reduced gap */
    max-width: 100%; /* Don't exceed the container */
    width: auto; /* Let it size naturally */
    flex-wrap: nowrap; /* Keep in one line */
}

.form-group .offset-3 .action-btn {
    flex: 0 1 auto; /* Don't grow, can shrink */
    min-width: 0; /* Allow shrinking */
    text-align: center;
    white-space: nowrap;
}

/* Desktop - ensure buttons fit within form field width (optimized for 3 buttons) */
@media (min-width: 992px) {
    .form-group .offset-3 .action-btn {
        padding: 8px 12px !important; /* More comfortable padding for 3 buttons */
        font-size: 13px !important; /* Slightly larger text */
        max-width: none; /* Remove max-width constraint */
    }
}

/* ========= MEDIUM SCREENS (md and smaller) ========= */
@media (max-width: 991.98px) {
    /* Hide button text but maintain consistent height */
    .action-btn .btn-text {
        display: none;
    }
    
    .action-btn {
        padding: 8px 12px !important; /* Slightly wider for better proportion */
        min-width: 44px !important; /* Ensure minimum touch target */
        height: 38px !important; /* Keep same height */
    }
    
    /* Override desktop button sizing for medium screens - equal distribution (3 buttons) */
    .form-group .offset-3 {
        width: 100% !important; /* Take available space */
    }
    
    .form-group .offset-3 .action-btn {
        flex: 1 !important; /* Equal width distribution for 3 buttons */
        min-width: auto !important;
        max-width: none !important; /* Remove desktop max-width constraint */
        justify-content: center !important;
        margin-left: 0 !important; /* Remove ms-2 spacing */
        padding: 8px 10px !important; /* Medium screen padding */
        font-size: 14px !important; /* Medium screen font size */
    }
    
    /* Responsive column layout */
    .search-container .col-md-6:first-child {
        flex: 0 0 55% !important;
        max-width: 55% !important;
    }
    
    .search-container .col-md-6:last-child {
        flex: 0 0 45% !important;
        max-width: 45% !important;
    }
    
    /* Reduce per page dropdown width but keep height */
    select[id$="-pagesize"] {
        max-width: 90px !important;
        min-width: 90px !important;
        height: 38px !important; /* Same height as buttons */
    }
}

/* ========= SMALL SCREENS (sm and smaller) ========= */
@media (max-width: 767.98px) {
    /* ALL CONTROLS SAME HEIGHT - 36px for mobile */
    .action-btn,
    select[id$="-pagesize"],
    .search-container input[type="text"],
    .search-container .btn {
        height: 36px !important;
    }
    
    /* Hide button text but maintain proper proportions */
    .action-btn .btn-text {
        display: none;
    }
    
    .action-btn {
        padding: 8px 10px !important;
        min-width: 42px !important; /* Proper touch target */
        font-size: 14px !important;
    }
    
    /* Override desktop and medium button sizing for small screens - equal distribution (3 buttons) */
    .form-group .offset-3 {
        width: 100% !important; /* Take available space */
    }
    
    .form-group .offset-3 .action-btn {
        flex: 1 !important; /* Equal width distribution for 3 buttons */
        min-width: auto !important;
        max-width: none !important; /* Remove desktop max-width constraint */
        justify-content: center !important;
        margin-left: 0 !important; /* Remove ms-2 spacing */
        padding: 8px 8px !important; /* Small screen padding */
        font-size: 13px !important; /* Small screen font size */
    }
    
    /* Responsive column layout for mobile */
    .search-container .col-md-6:first-child {
        flex: 0 0 45% !important;
        max-width: 45% !important;
    }
    
    .search-container .col-md-6:last-child {
        flex: 0 0 55% !important;
        max-width: 55% !important;
    }
    
    /* Per page dropdown - same height as buttons */
    select[id$="-pagesize"] {
        max-width: 110px !important;
        min-width: 110px !important;
        height: 36px !important; /* Same as buttons */
        padding: 7px 6px !important;
        font-size: 12px !important;
        margin-left: 4px !important;
    }
    
    /* Search controls - same height */
    .search-container input[type="text"] {
        padding: 7px 10px !important;
        font-size: 14px !important;
        height: 36px !important;
    }
    
    .search-container .btn {
        padding: 7px 10px !important;
        font-size: 14px !important;
        height: 36px !important;
    }
    
    /* Reduce gaps for mobile */
    .action-buttons-container {
        gap: 6px !important;
    }
}

/* ========= DYNAMIC TABLE ENHANCED FEATURES CSS ========= */

/* Fixed edit column for dynamic tables with fixedEditColumn config */
.dynamic-table-fixed th:last-child,
.dynamic-table-fixed td:last-child {
    text-align: center !important;
    vertical-align: middle !important;
}

.dynamic-table-fixed td:last-child a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    margin: 0 auto !important;
}

.dynamic-table-fixed td:last-child a i.fas.fa-edit {
    margin: 0 !important;
    padding: 0 !important;
}

/* Table info styling for consistent appearance */
.table-info {
    color: #6c757d !important;
    font-size: 14px !important;
    margin: 0 !important;
}

.table-info span {
    background-color: transparent !important;
    background: none !important;
    padding: 0 !important;
}

/* Pagination styling enhancements - SPECIFIC TARGETING ONLY */
.bottom-right nav[aria-label="Table pagination"] {
    background-color: transparent !important;
    background: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.bottom-right .pagination {
    background-color: transparent !important;
    background: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.pagination .page-link {
    border-radius: 6px !important;
    margin: 0 2px !important;
    border: 1px solid #dee2e6 !important;
    background-color: #fff !important;
    color: #007bff !important;
}

.pagination .page-link:hover {
    background-color: #e9ecef !important;
    border-color: #dee2e6 !important;
    color: #0056b3 !important;
}

.pagination .page-item.active .page-link {
    background-color: #007bff !important;
    border-color: #007bff !important;
    color: #fff !important;
}

.pagination .page-item.disabled .page-link {
    background-color: #fff !important;
    border-color: #dee2e6 !important;
    color: #6c757d !important;
}

/* Search input group styling */
.search-container .input-group {
    border-radius: 6px !important;
    overflow: hidden;
}

.search-container .input-group-append .btn {
    border-left: 0 !important;
    border-radius: 0 6px 6px 0 !important;
}

/* Loading spinner styling */
.loading-spinner {
    padding: 40px 0 !important;
}

.spinner-border {
    width: 3rem !important;
    height: 3rem !important;
}

/* Enhanced table styling */
.dynamic-table-fixed {
    border-radius: 8px !important;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.dynamic-table-fixed thead th {
    background-color: #f8f9fa !important;
    border-bottom: 2px solid #dee2e6 !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    font-size: 12px !important;
    letter-spacing: 0.5px !important;
    padding: 12px 8px !important;
}

.dynamic-table-fixed tbody tr:hover {
    background-color: #f8f9fa !important;
    transition: background-color 0.2s ease !important;
}

/* Sort indicators styling */
.sort-indicator {
    margin-left: 5px !important;
    opacity: 0.5 !important;
    transition: opacity 0.2s ease !important;
}

.sortable:hover .sort-indicator {
    opacity: 1 !important;
}

.sortable {
    -webkit-user-select: none !important;
    user-select: none !important;
    transition: background-color 0.2s ease !important;
}

.sortable:hover {
    background-color: #e9ecef !important;
}

/* No data message styling */
.dynamic-table-fixed tbody td {
    padding: 12px 8px !important;
}

.dynamic-table-fixed tbody td[colspan] {
    text-align: center !important;
    color: #6c757d !important;
    font-style: italic !important;
    padding: 40px 20px !important;
}

/* Table responsive wrapper enhancements */
.table-responsive {
    border-radius: 8px !important;
    border: 1px solid #dee2e6 !important;
}

/* Text overflow enhancements */
.dt-ellipsis {
    position: relative !important;
}

.dt-ellipsis:hover::after {
    content: attr(title) !important;
    position: absolute !important;
    bottom: 100% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background-color: #000 !important;
    color: #fff !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
    z-index: 1000 !important;
    opacity: 0.9 !important;
}

/* ==========================================================================
   FULL-PAGE ERROR STYLES
   ========================================================================== */
.error-full-page {
    min-height: 100vh;
    width: 100%;
    background: linear-gradient(135deg, #004080 0%, #1a5ba3 50%, #004080 100%)!important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.error-content-wrapper {
    width: 100%;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.error-main-content {
    padding: 60px 40px;
    text-align: center;
}

.error-logo-container {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.error-logo-container img {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.error-logo-container img:hover {
    transform: scale(1.05);
}

.error-icon-container {
    margin-bottom: 30px;
}

.error-icon-container i {
    font-size: 5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.error-code {
    font-size: 6rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    background: #ffffff00 !important;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.error-main-title {
    font-size: 2.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 30px 0;
    line-height: 1.2;
}

.error-message-container {
    margin-bottom: 40px;
}

.error-description {
    font-size: 1.2rem;
    color: #6c757d;
    line-height: 1.6;
    margin: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.error-details {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    margin: 30px 0;
    text-align: left;
}

.error-details h3 {
    color: #495057;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.error-details-content p {
    margin: 10px 0;
    color: #6c757d;
    font-size: 1rem;
}

.error-causes {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 15px;
    padding: 30px;
    margin: 30px 0;
    text-align: left;
}

.error-causes ul {
    margin: 0;
    padding-left: 20px;
}

.error-causes li {
    margin: 10px 0;
    color: #856404;
    font-size: 1.1rem;
    line-height: 1.5;
}

.error-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.error-actions .btn {
    height: 38px !important;
    line-height: 1.5 !important;
    border-radius: 6px !important;
    border: 2px solid #d3d3d3 !important;
    padding: 8px 16px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    min-width: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
    gap: 6px !important;
}

.error-actions .btn:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

/* Error page save button (Go to Home) - Same as SM_Client/Create save button */
.error-actions .save-btn.btn-outline-primary:hover {
    background-color: transparent !important;
    color: #007bff !important;
    border-color: #007bff !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.error-actions .save-btn.btn-outline-primary:focus {
    background-color: transparent !important;
    color: #007bff !important;
    border-color: #007bff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Error page cancel button (Go Back) - Same as SM_Client/Create cancel button */
.error-actions .cancel-btn.btn-outline-secondary:hover {
    background-color: transparent !important;
    color: #6c757d !important;
    border-color: #6c757d !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

.error-actions .cancel-btn.btn-outline-secondary:focus {
    background-color: transparent !important;
    color: #6c757d !important;
    border-color: #6c757d !important;
    box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.25);
}

.error-support {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e9ecef;
}

.error-support p {
    color: #6c757d;
    font-size: 1rem;
    margin: 0;
}

.error-helpful-links {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e9ecef;
}

.error-helpful-links h3 {
    color: #495057;
    margin-bottom: 25px;
    font-size: 1.3rem;
}

.helpful-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    max-width: 500px;
    margin: 0 auto;
}

.helpful-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    text-decoration: none;
    color: #495057;
    transition: all 0.3s ease;
    font-weight: 500;
    min-height: 100px;
    justify-content: center;
}

.helpful-link:hover {
    background: #e9ecef;
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
    text-decoration: none;
}

.helpful-link i {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.helpful-link span {
    font-size: 0.9rem;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .error-full-page {
        padding: 15px;
        min-height: calc(100vh - 60px);
    }
    
    .error-content-wrapper {
        border-radius: 15px;
    }
    
    .error-main-content {
        padding: 40px 25px;
    }
    
    .error-code {
        font-size: 4rem;
    }
    
    .error-main-title {
        font-size: 2rem;
    }
    
    .error-description {
        font-size: 1.1rem;
    }
    
    .error-actions {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .error-actions .btn {
        width: 100%;
        max-width: 280px;
        height: 38px !important;
        font-size: 14px !important;
    }
    
    .helpful-links-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .helpful-link {
        min-height: 80px;
        padding: 15px 10px;
    }
    
    .error-details,
    .error-causes {
        padding: 20px;
        margin: 20px 0;
    }
}

@media (max-width: 480px) {
    .error-main-content {
        padding: 30px 20px;
    }
    
    .error-code {
        font-size: 3.5rem;
    }
    
    .error-main-title {
        font-size: 1.8rem;
    }
    
    .error-description {
        font-size: 1rem;
    }
    
    .error-icon-container i {
        font-size: 4rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .error-content-wrapper {
        background: rgba(30, 30, 30, 0.95);
        color: #ffffff;
    }
    
    .error-main-title {
        color: #ffffff;
    }
    
    .error-description {
        color: #b0b0b0;
    }
    
    .error-details {
        background: rgba(40, 40, 40, 0.8);
    }
    
    .error-details h3 {
        color: #ffffff;
    }
    
    .error-details-content p {
        color: #b0b0b0;
    }
    
    .helpful-link {
        background: rgba(40, 40, 40, 0.8);
        border-color: #555;
        color: #ffffff;
    }
    
    .helpful-link:hover {
        background: rgba(60, 60, 60, 0.8);
        border-color: #667eea;
        color: #667eea;
    }
}

/* ==========================================================================
   ERROR PAGE LAYOUT OVERRIDES
   Override SideBarLayout constraints for full-page error display
   ========================================================================== */
.error-full-page {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 9999 !important;
    min-height: 100vh !important;
    width: 100vw !important;
    background: linear-gradient(135deg, #004080 0%, #000000 100%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    overflow: auto !important;
}

/* Override any container constraints */
.error-full-page .container {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Ensure the error content takes full advantage of the space */
.error-content-wrapper {
    width: 100% !important;
    max-width: 900px !important;
    margin: 0 auto !important;
    background: rgba(255, 255, 255, 0.95) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    backdrop-filter: blur(20px) !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15) !important;
    overflow: hidden !important;
    animation: slideInUp 0.6s ease-out !important;
}

/* Mobile-specific overrides for error pages */
@media (max-width: 768px) {
    .error-full-page {
        padding: 10px !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        z-index: 9999 !important;
    }
    
    .error-content-wrapper {
        max-width: 100% !important;
        border-radius: 15px !important;
        margin: 0 !important;
    }
    
    .error-main-content {
        padding: 30px 20px !important;
    }
}

@media (max-width: 480px) {
    .error-full-page {
        padding: 5px !important;
    }
    
    .error-main-content {
        padding: 25px 15px !important;
    }
}

/* No data row styling - make it clear it's not clickable */
.no-data-row {
    cursor: default !important;
    background-color: #f8f9fa !important;
    pointer-events: none !important; /* Prevent any interactions */
}

.no-data-row:hover {
    background-color: #f8f9fa !important;
    cursor: default !important;
    transform: none !important;
    box-shadow: none !important;
}

.no-data-row td {
    color: #6c757d !important;
    font-style: italic !important;
    background-color: #f8f9fa !important;
    pointer-events: none !important; /* Prevent any interactions */
}

/* Override any existing hover effects for no-data rows */
.no-data-row:hover td {
    background-color: #f8f9fa !important;
}

/* ==========================================================================
   * on Mandatory Fields
   ========================================================================== */

/* put this once (layout or page) */
.required::after {
    content: " *";
    color: #dc3545; /* bootstrap danger red */
    font-size: 120%; /* bigger star */
}