.bg-skyblue {
    background-color: #87CEEB !important;
}

.bg-skyblue .text-gray-600,
.bg-skyblue .nav-link > .mdi {
    color: #ffffff !important;
}

.bg-skyblue .dropdown-menu .text-gray-400,
.bg-skyblue .dropdown-menu .mdi {
    color: #858796 !important;
}

.error_msg {
    color: #ff6258;
    font-size: 12px;
}

.datepicker {
    border-radius: 2px;
}

.input-group-append, .input-group-prepend, .asColorPicker-trigger {
    background-color: #eeeeee;
}

.datepicker.input-group.is-invalid, .datepicker.asColorPicker-wrap.is-invalid {
    border-color: #dc3545 !important;
}

.companyTitle a:hover {
    text-decoration: none;
}

table.dataTable#display_table {
    max-width: 100% !important;
    width: 100% !important;
}

.dataTables_wrapper .table-condensed.dataTable thead tr th,
.dataTables_wrapper .table-condensed.dataTable tbody tr td,
.table.table-condensed thead tr th,
.table.table-condensed tbody tr td {
    padding: 8px 12px;
    vertical-align: middle;
}

/* Remove redundant 30px right padding from sorting columns — arrows are hidden globally */
.dataTables_wrapper .dataTable thead th.sorting,
.dataTables_wrapper .dataTable thead th.sorting_asc,
.dataTables_wrapper .dataTable thead th.sorting_desc,
.dataTables_wrapper .dataTable thead th.sorting_asc_disabled,
.dataTables_wrapper .dataTable thead th.sorting_desc_disabled {
    padding-right: 12px !important;
}

/* Fix: non-condensed table body td left padding to match header th (15px) */
.dataTables_wrapper .dataTable:not(.table-condensed) tbody tr td {
    padding-left: 15px;
}

.dataTables_wrapper .table-condensed.dataTable thead:not(.bg-primary):not(.bg-warning) tr:not(.bg-primary):not(.bg-warning) th,
.table.table-condensed thead:not(.bg-primary):not(.bg-warning) tr:not(.bg-primary):not(.bg-warning) th {
    border-bottom-width: 2px;
}

.table thead:not(.bg-primary):not(.bg-warning) tr:not(.bg-primary):not(.bg-warning) th {
    border-bottom: 2px solid #cccccc;
}

.table thead tr th {
    letter-spacing: 1px;
}

.table thead:not(.text-white) tr:not(.text-white) th {
    font-weight: 600;
}

.table td {
    border-top: 1px solid #e3e3e3;
}

label.error {
    color: #ff6258 !important;
    margin-top: .5em;
}

input.error {
    border: 1px solid #ff6258;
}

.form-control:disabled {
    background-color: #e9ecef !important;
}

.swal-text {
    text-align: center;
}


@media screen and (-webkit-min-device-pixel-ratio: 0) and (max-device-width: 1024px) {
    /* Prevent iOS from zooming on select those inputs ... */
    input[type="color"],
    input[type="date"],
    input[type="datetime"],
    input[type="datetime-local"],
    input[type="email"],
    input[type="month"],
    input[type="number"],
    input[type="password"],
    input[type="search"],
    input[type="tel"],
    input[type="text"],
    input[type="time"],
    input[type="url"],
    input[type="week"],
    select:focus,
    textarea {
        font-size: 16px;
    }

}

.form-control, .typeahead {
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.1rem;
}

.required-border {
    border: 2px solid #19d895 !important;
}

.datepicker.datepicker-dropdown .datepicker-days table.table-condensed thead tr th.dow:first-child, .datepicker.datepicker-inline .datepicker-days table.table-condensed thead tr th.dow:first-child, .datepicker.datepicker-dropdown .datepicker-days table.table-condensed tbody td.day:first-child, .datepicker.datepicker-inline .datepicker-days table.table-condensed tbody td.day:first-child, .datepicker.datepicker-dropdown .datepicker-days table.table-condensed thead tr th.dow:last-child, .datepicker.datepicker-inline .datepicker-days table.table-condensed thead tr th.dow:last-child, .datepicker.datepicker-dropdown .datepicker-days table.table-condensed tbody td.day:last-child, .datepicker.datepicker-inline .datepicker-days table.table-condensed tbody td.day:last-child {
    text-align: center;
}

.border-8 {
    border-width: 8px !important;
}

.card.bg-blue-gradient {
    background: linear-gradient(to right, #d4fcfa, #37a7db, #526dcc);
    color: #fff;
}

.card.bg-orange-gradient {
    background: linear-gradient(to right, #fffee2, #ede452, #de9347);
    color: #fff;
}

.card.bg-red-gradient {
    background: linear-gradient(to right, #ffd7d7, #ed8171, #de5453);
    color: #fff;
}

.card.bg-green-gradient {
    background: linear-gradient(to right, #deffed, #72e3d1, #0ac7cb);
    color: #fff;
}

.icon-xl {
    font-size: 4rem;
}

.form-check.form-check-flat label input:checked + .input-helper::before {
    background-color: #2196f3;
}

.form-check.form-check-flat.form-check-radio label input:checked + .input-helper::before {
    background-color: #ffaf00;
}

.form-check .form-check-label input:checked + .input-helper::after {
    top: -9px;
}

.input-group-text {
    border: 1px solid #ccc;
}

.twitter-typeahead {
    display: block !important;
}

select {
    /*height: calc(2.6rem + 2px) !important;*/
    height: 2.4rem !important;
}


/* Do not remove this... it will break certain part of the page.. like in recp_search datepicker popup lol */
.datepicker-dropdown::before, .datepicker-dropdown::after {
    display: none;
}

.fc-scroller { overflow-x: visible !Important; }/*fullcalendar fixed*/

@media (min-width: 992px) {
    .modal-md {
        max-width: 70%;
    }
}

.tt-cursor { background-color: #0068D0; color:#ffffff;} /* typeahead highlight */

.modal {
  overflow-y:auto;
  margin-top: -50px;
}

.tooltip{
  z-index: 10000 !important;
}

.tooltip.show {
  opacity: 1;
}
.tooltip-inner {
  background-color: #19d895;
}

.modal-header2 {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #cccccc;
    border-top-left-radius: 0.3rem;
    border-top-right-radius: 0.3rem;
}

.modal-header2 .close {
    padding: 1rem;
    margin: -1rem -1rem -1rem auto;
}

.modal-header2 {
    padding: 25px 26px;
}

.modal-header2 span {
    font-size: 20px;
    font-weight: 400;
    color: #6a6a6a;
}

.wrap {
  white-space: normal !important;
  word-wrap: break-word;
}
.nowrap {
  white-space: nowrap;
}

.nav-pills > li > a {
    font-weight: bold;
}

.nav-pills > li > a.active {
    color:white !important;
}



.table td, .jsgrid .jsgrid-table td,
.table th, .jsgrid .jsgrid-table th {
    vertical-align: middle;
    /*font-size: 0.875rem; lawrence */
    font-size: 0.750rem;
    /*line-height: 1;*/
    white-space: break-word;
    /*height: 35px;*/
    /*padding: 18px 15px;*/
}


body {font-size: 0.750rem;}

.form-group label {
    font-size: 0.80rem;
}

.bootstrap-select .dropdown-toggle {
    /*height: 44px;*/
    /*height: calc(2.6rem) !important;*/
    height: 2.3rem !important;
    padding-left: 0.7rem;
    font-size: 1rem;
}


.form-control, .asColorPicker-input, .dataTables_wrapper select, .jsgrid .jsgrid-table .jsgrid-filter-row input[type=text],
.jsgrid .jsgrid-table .jsgrid-filter-row select, .jsgrid .jsgrid-table .jsgrid-filter-row input[type=number], .select2-container--default .select2-selection--single, .select2-container--default .select2-selection--single .select2-search__field, .tt-hint,
.tt-query,
.typeahead {
    display: block;
    width: 100%;
    /*height: 2.45rem;*/
    /*padding: 0.56rem 0.575rem;*/

    padding: 0.1rem 0.575rem;


    font-size: 1rem;
    line-height: 1;
    color: #495057;
    background-color: #ffffff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 2px;
    -webkit-transition: border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
    transition: border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
}


.datepicker {
  -webkit-border-radius: 4px;
  -moz-border-radius: 4px;
  border-radius: 4px;
  direction: ltr;
  /*.dow {
        border-top: 1px solid #ddd !important;
    }*/

}

.btn.btn-icons {padding:2px; width:36px;height:36px;}



#display_table_filter label{
    margin-top: 5px;
}

#display_table_length label{
    margin-bottom: 5px;
}

.password { -webkit-text-security: disc; /* Default */ }


.modal-body-long{
    position: relative;
    -webkit-box-flex: 1;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    padding: 25px;
    max-height: calc(100vh - 170px);
    overflow-y: auto;
}

.modal-lg {
    max-width: 90vw;
}

.modal-md {
    max-width: 70vw;
}

.form-group {
    margin-bottom: 6px;
}



.actionselect {
    height: 1.6rem !important;
    padding: 0.2rem 0.575rem !important;
    width:150px;
    font-size:9pt;
}

.actioninput {
    height: 1.6rem !important;
    padding: 0.2rem 0.575rem !important;
    width:50px;
    font-size:9pt;
}

.budgetinput {
    height: 1.6rem !important;
    padding: 0.2rem 0.575rem !important;
    width:150px;
    font-size:9pt;
}

.budgettext {
    height: 2.6rem !important;
    padding: 0.2rem 0.575rem !important;
    width:150px;
    font-size:9pt;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield;
}

.payment-difference-info, .receipt-difference-info {
    position: fixed;
    top: 15px;
    right: 20px;
    text-align: center;
    font-size: 0.9rem;
    border-color: #fff;
    border-radius: 5px;
    padding: 5px;
    opacity: 0.95;
    z-index: 9999;
}


/* SLIDING HELP */
/* The side navigation menu */
.h_sidenav {
  height: 100%; /* 100% Full-height */
  width: 0; /* 0 width - change this with JavaScript */
  position: fixed; /* Stay in place */
  z-index: 1; /* Stay on top */
  top: 0; /* Stay at the top */
  right: 0;
  background-color: #fff; /* Black*/
  overflow-x: scroll; /* Disable horizontal scroll */
  padding-top: 100px; /* Place content px from the top */
  transition: 0.5s; /* 0.5 second transition effect to slide in the sidenav */
}



/* When you mouse over the navigation links, change their color */
.h_sidenav a:hover {
  color: #000;
  text-decoration: none;
}

/* Position and style the close button (top right corner) */
.h_sidenav .closebtn {
  position: absolute;
  top: 50px;
  right: 25px;
  font-size: 36px;
  margin-left: 50px;
}

/* Style page content - use this if you want to push the page content to the right when you open the side navigation */
#main {
  transition: margin-left .5s;
  padding: 0px;
}

.form-control-sm {max-width: 200px}

/* On smaller screens, where height is less than 450px, change the style of the sidenav (less padding and a smaller font size) */
@media screen and (max-height: 450px) {
  .h_sidenav {padding-top: 15px;}
  .h_sidenav a {font-size: 18px;}
}

@media screen and (max-width: 650px) {
  .dropdown-menu {max-width: 150px}
}

div.scrollmenu {
   overflow: auto;
   white-space: nowrap;
}
  
div.scrollmenu a {
   display: inline-block;
   color: #495057 ;
   text-align: center;
   padding: 5px;
   text-decoration: none;
   font-size: 0.8rem;
}
  
div.scrollmenu a:hover {
   color: white !important;
}

.scoll-pane {
    width: 100%;
    height: auto;
    overflow: auto;
    outline: none;
    overflow-y: hidden; 
    -ms-overflow-style: scroll;  
    scrollbar-width: none;  
}

.white-hover:hover {
    color: white !important;
 }

.grey-hover:hover {
    background-color:#eee !important;
 }

.arrows {
    height: 100%; 
    vertical-align: middle;
    border-radius: 3px;

}
.vertical-align {
    display: flex;  
    align-items: center; 
    justify-content: center;
}

.flexbox-wrapper {
    display: flex;
    overflow: auto;
}

.display_flex{
    display: flex;
    flex-direction: column;
}

.flex1{
    align-items: flex-end;
}

.flex2{
    height: 10%; 

    align-items: flex-end;

}

.flex3{
    display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;  
    height: 18%; 
    text-overflow: ellipsis; 
    overflow-y: hidden;
    align-items: flex-end;
}


.flex3::-webkit-scrollbar {
    display: none;
}

.flex3 {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;   /*Firefox */
}

.container-nopadding{
    width: 100%;
    margin-right: auto;
    margin-left: auto;
}

.item_info{
    font-weight: bold; 
    font-size: 13pt;
    padding-bottom: 2em;
}

.white-background{
    background-color: #fff;
}

.text-no-style{
    border: none;
    background: transparent;
    max-width: 4.5em;
    font-weight: bold
}

#scroll {
    position:fixed;
    right:10px;
    bottom:10px;
    cursor:pointer;
    width:57px;
    height:57px;
    background-color:#3498db;
    -webkit-border-radius:60px;
    -moz-border-radius:60px;
    border-radius:60px
}
#scroll span {
    position:absolute;
    top:50%;
    left:50%;
    margin-left:-8px;
    margin-top:-12px;
    height:0;
    width:0;
    /*border:8px solid transparent;*/
    border-bottom-color:#ffffff;
}

#scroll:hover {
    background-color:#3AAF5B;
    opacity:1;filter:"alpha(opacity=100)";
    -ms-filter:"alpha(opacity=100)";
}



.overlay {
    position: fixed;
    display: flex;
    top: 0;
    left: 0;
    width: 10em;
    height: 100%
}

.overlay-right {
    position: fixed;
    display: flex;
    top: 0;
    width: 5em;
    height: 100%
}

.display-none{
    display:none;
}

.margin-bottom {
    margin-bottom: 7px;
    vertical-align: baseline;
}


.condimentModalSaveBtn{
    min-width: 50%;
    text-align: cen
}

.descriptions{
    font-size: 10px; 
    max-height: 15vh; 
    overflow-y: scroll;
}

.descriptions::-webkit-scrollbar {
    display: none;
}

.descriptions {
    -ms-overflow-style: none;  /* IE and Edge 
    scrollbar-width: none;  /* Firefox */
}

/* On smaller screens, where height is less than 450px, change the style of the sidenav (less padding and a smaller font size) */
@media screen and (max-height: 450px) {
    .h_sidenav {padding-top: 15px;}
    .h_sidenav a {font-size: 18px;}
  }

.floating-save-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    border-radius: 50px;
    padding: 10px 22px;
}
  
  @media screen and (max-width: 650px) {
      .dropdown-menu {max-width: 150px}
  
      /* Pagination */
      .pagination .page-item .page-link, .jsgrid .jsgrid-pager .page-item .page-link, .jsgrid .jsgrid-pager .jsgrid-pager-nav-button .page-link, .jsgrid .jsgrid-pager .jsgrid-pager-page .page-link, .jsgrid .jsgrid-pager .jsgrid-pager-nav-button a, .jsgrid .jsgrid-pager .jsgrid-pager-page a {
          font-size: 0.650rem;
      }
  
      .page-link, .jsgrid .jsgrid-pager .jsgrid-pager-nav-button a,
      .jsgrid .jsgrid-pager .jsgrid-pager-page a {
          padding: 0.5rem 0.4rem;
      }
    }


.zcheckbox {
    transform: scale(1.5);
    margin-left:5px;
    margin-right:5px;
}
    
.nform {
    height: 33px !important;
    width:inherit !important;
    display: inherit !important;
    font-size: 0.83rem !important;
}

.nform2 {
    height: 33px !important;
    display: inherit !important;
    font-size: 0.83rem !important;
}

#rpt_loader {
    border: 12px solid #f3f3f3;
    border-radius: 50%;
    border-top: 12px solid #444444;
    width: 70px;
    height: 70px;
    animation: spin 1s linear infinite;
}
  
@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}
  
.rpt_center {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
}

table.report_table thead {
    background: linear-gradient(125deg, #0b1d3a 0%, #1e3a5f 55%, #0f2d50 100%);
}
table.report_table thead tr th {
    font-size: 9pt;
    padding-left: 1px !important;
    margin: 0;
    border-bottom: 1px solid rgba(255,255,255,.15) !important;
    line-height: 1.2 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-align:left !important;
    color: #fff !important;
}

table.report_table tbody td {
    font-size: 9pt;
    padding: 5px 1px 5px 1px;
    margin: 0;
    border-bottom: 0.5px solid #dddddd;
}
table.report_table > tbody > tr:hover {
    background-color: #f5f5f5;
}


@media print {
    table.report_table thead tr th {
       line-height: 1;
    }
}

tfoot td {
    margin:0 !important;
    padding:0 !important;
}

.detBtn {
    cursor:pointer;
    text-decoration-style: dotted;
    text-decoration-line: underline;
    text-decoration-color: #999999;
}
.detBtn:hover {
    text-decoration-style: solid;
    text-decoration-line: underline;
    text-decoration-color: #000000;
    font-weight: bold;
}
@media print
{
    .detBtn {
        text-decoration: none;
    }
}


/* BODY */
.card-title {
    font-size: 1.5em;
}
.card .card-body {
    padding:1.2em;
}

/* SB Admin 2 content area padding */
#content > .container-fluid {
    padding: 0.5rem 1rem;
}

/* SB Admin 2 active collapse item */
#accordionSidebar .collapse-item.active {
    color: #4e73df;
    font-weight: 700;
}

.form-control-sm.custom-select-sm {height: 2rem !important;}

/* Dashboard */
body { background-color: #ffffff !important; }
.card { border-color: #b0b7c3 !important; }

/* ================================================================
   DARK MODE  —  toggled by JS adding .dark-mode to <body>
   ================================================================ */

/* Page background */
body.dark-mode                          { background-color: #0f1117 !important; color: #dde1ec !important; }

/* Topbar */
body.dark-mode .topbar.bg-skyblue       { background-color: #1a1d27 !important; box-shadow: 0 2px 8px rgba(0,0,0,.5) !important; }
body.dark-mode .topbar .text-gray-600,
body.dark-mode .topbar .nav-link .mdi,
body.dark-mode .topbar .nav-link > .mdi { color: #8891aa !important; }
body.dark-mode .topbar-divider          { border-right-color: rgba(255,255,255,.1) !important; }
body.dark-mode #darkModeIcon            { color: #dde1ec !important; }

/* Content wrapper */
body.dark-mode #content-wrapper         { background-color: #0f1117 !important; }

/* Cards */
body.dark-mode .card                    { background-color: #1a1d27 !important; border-color: rgba(255,255,255,.08) !important; }
body.dark-mode .card-header             { background-color: #22263a !important; border-bottom-color: rgba(255,255,255,.08) !important; }
body.dark-mode .card-body               { background-color: #1a1d27 !important; }
body.dark-mode .card-footer             { background-color: #1a1d27 !important; border-top-color: rgba(255,255,255,.08) !important; }

/* Text */
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3,
body.dark-mode h4, body.dark-mode h5, body.dark-mode h6  { color: #dde1ec !important; }
body.dark-mode p                        { color: #bbc2d6 !important; }
body.dark-mode label                    { color: #aab2c8 !important; }
body.dark-mode .text-gray-900,
body.dark-mode .text-gray-800,
body.dark-mode .text-gray-700          { color: #bbc2d6 !important; }
body.dark-mode .text-gray-600,
body.dark-mode .text-gray-500          { color: #8891aa !important; }
body.dark-mode .text-dark              { color: #dde1ec !important; }

/* Form controls (important: overrides j.custom.css base rules above) */
body.dark-mode .form-control,
body.dark-mode .asColorPicker-input,
body.dark-mode .dataTables_wrapper select,
body.dark-mode .select2-container--default .select2-selection--single,
body.dark-mode .tt-hint,
body.dark-mode .tt-query,
body.dark-mode .typeahead            { background-color: #252a3c !important; border-color: rgba(255,255,255,.12) !important; color: #dde1ec !important; }
body.dark-mode .form-control::placeholder { color: #5a6178 !important; }
body.dark-mode .form-control:focus   { background-color: #2c3150 !important; border-color: rgba(255,255,255,.22) !important; color: #fff !important; box-shadow: 0 0 0 .2rem rgba(255,255,255,.07) !important; }
body.dark-mode .form-control:disabled { background-color: #1e2130 !important; color: #5a6178 !important; }
body.dark-mode select.form-control option,
body.dark-mode .dataTables_wrapper select option { background-color: #252a3c; color: #dde1ec; }
body.dark-mode .input-group-append,
body.dark-mode .input-group-prepend,
body.dark-mode .asColorPicker-trigger { background-color: #2c3150 !important; }
body.dark-mode .input-group-text     { background-color: #2c3150 !important; border-color: rgba(255,255,255,.12) !important; color: #8891aa !important; }
body.dark-mode .custom-select        { background-color: #252a3c !important; border-color: rgba(255,255,255,.12) !important; color: #dde1ec !important; }

/* Select2 */
body.dark-mode .select2-container--default .select2-selection--single,
body.dark-mode .select2-container--default .select2-selection--multiple { background-color: #252a3c !important; border-color: rgba(255,255,255,.12) !important; }
body.dark-mode .select2-container--default .select2-selection--single .select2-selection__rendered { color: #dde1ec !important; }
body.dark-mode .select2-container--default .select2-selection--single .select2-selection__arrow b { border-top-color: #8891aa !important; }
body.dark-mode .select2-dropdown      { background-color: #1a1d27 !important; border-color: rgba(255,255,255,.08) !important; }
body.dark-mode .select2-results__option { color: #bbc2d6 !important; }
body.dark-mode .select2-results__option--highlighted { background-color: rgba(255,255,255,.08) !important; color: #fff !important; }
body.dark-mode .select2-search--dropdown .select2-search__field { background-color: #252a3c !important; border-color: rgba(255,255,255,.12) !important; color: #dde1ec !important; }
body.dark-mode .select2-container--default .select2-selection--multiple .select2-selection__choice { background-color: #2c3150 !important; border-color: rgba(255,255,255,.12) !important; color: #dde1ec !important; }

/* Tables */
body.dark-mode .table                 { color: #bbc2d6 !important; }
body.dark-mode .table thead:not(.bg-primary):not(.bg-warning):not(.bg-success):not(.bg-danger) tr th { border-bottom-color: rgba(255,255,255,.1) !important; color: #8891aa !important; background-color: #22263a !important; }
body.dark-mode .table td, body.dark-mode .table th { border-top-color: rgba(255,255,255,.06) !important; border-bottom-color: rgba(255,255,255,.06) !important; }
body.dark-mode .table-hover tbody tr:hover td,
body.dark-mode .table-hover tbody tr:hover { background-color: rgba(255,255,255,.04) !important; }
body.dark-mode .table-striped tbody tr:nth-of-type(odd) { background-color: rgba(255,255,255,.03) !important; }
body.dark-mode table.report_table thead { background: linear-gradient(125deg, #0b1d3a 0%, #1e3a5f 55%, #0f2d50 100%) !important; }

/* Tables — td border override */
body.dark-mode .table td             { border-top-color: rgba(255,255,255,.06) !important; }

/* Modals */
body.dark-mode .modal-content        { background-color: #1a1d27 !important; border-color: rgba(255,255,255,.1) !important; }
body.dark-mode .modal-header         { background-color: #22263a !important; border-bottom-color: rgba(255,255,255,.08) !important; }
body.dark-mode .modal-header .modal-title { color: #dde1ec !important; }
body.dark-mode .modal-footer         { background-color: #1a1d27 !important; border-top-color: rgba(255,255,255,.08) !important; }
body.dark-mode .modal-header2        { border-bottom-color: rgba(255,255,255,.08) !important; }
body.dark-mode .modal-header2 span   { color: #aab2c8 !important; }
body.dark-mode .close                { color: #8891aa !important; text-shadow: none !important; }

/* Dropdowns */
body.dark-mode .dropdown-menu        { background-color: #1a1d27 !important; border-color: rgba(255,255,255,.08) !important; }
body.dark-mode .dropdown-item        { color: #bbc2d6 !important; }
body.dark-mode .dropdown-item:hover,
body.dark-mode .dropdown-item:focus  { background-color: rgba(255,255,255,.06) !important; color: #fff !important; }
body.dark-mode .dropdown-item.active { background-color: rgba(255,255,255,.1) !important; color: #fff !important; }
body.dark-mode .dropdown-divider     { border-top-color: rgba(255,255,255,.08) !important; }
body.dark-mode .dropdown-header      { color: #8891aa !important; }

/* Sidebar collapse submenu (white box) */
body.dark-mode .collapse-inner       { background: #22263a !important; }
body.dark-mode .collapse-item        { color: #aab2c8 !important; }
body.dark-mode .collapse-item:hover  { background: rgba(255,255,255,.06) !important; color: #fff !important; }
body.dark-mode #accordionSidebar .collapse-item.active { color: #6c8cff !important; background: rgba(255,255,255,.05) !important; }

/* Footer */
body.dark-mode .sticky-footer        { background-color: #1a1d27 !important; border-top-color: rgba(255,255,255,.08) !important; }
body.dark-mode .sticky-footer .text-gray-900,
body.dark-mode footer .text-gray-900 { color: #bbc2d6 !important; }
body.dark-mode .sticky-footer .text-gray-600,
body.dark-mode footer .text-gray-600 { color: #8891aa !important; }

/* Buttons */
body.dark-mode .btn-light            { background-color: #22263a !important; border-color: rgba(255,255,255,.12) !important; color: #bbc2d6 !important; }
body.dark-mode .btn-outline-secondary { color: #8891aa !important; border-color: rgba(255,255,255,.18) !important; }
body.dark-mode .btn-outline-secondary:hover { background-color: rgba(255,255,255,.08) !important; color: #dde1ec !important; }
body.dark-mode .btn-secondary        { background-color: #2c3150 !important; border-color: rgba(255,255,255,.12) !important; color: #bbc2d6 !important; }

/* Nav tabs */
body.dark-mode .nav-tabs             { border-bottom-color: rgba(255,255,255,.08) !important; }
body.dark-mode .nav-tabs .nav-link   { color: #8891aa !important; }
body.dark-mode .nav-tabs .nav-link.active { background-color: #1a1d27 !important; border-color: rgba(255,255,255,.08) rgba(255,255,255,.08) #1a1d27 !important; color: #dde1ec !important; }
body.dark-mode .tab-content          { background-color: #1a1d27 !important; }

/* Nav pills */
body.dark-mode .nav-pills .nav-link  { color: #8891aa !important; }
body.dark-mode .nav-pills .nav-link.active { color: #fff !important; }

/* DataTables controls */
body.dark-mode .dataTables_wrapper .dataTables_length label,
body.dark-mode .dataTables_wrapper .dataTables_filter label,
body.dark-mode .dataTables_wrapper .dataTables_info,
body.dark-mode .dataTables_wrapper .dataTables_paginate { color: #8891aa !important; }
body.dark-mode .dataTables_wrapper .dataTables_filter input { background-color: #252a3c !important; border-color: rgba(255,255,255,.12) !important; color: #dde1ec !important; }

/* Pagination */
body.dark-mode .page-item .page-link { background-color: #22263a !important; border-color: rgba(255,255,255,.08) !important; color: #8891aa !important; }
body.dark-mode .page-item.active .page-link { background-color: #3d5af1 !important; border-color: #3d5af1 !important; color: #fff !important; }
body.dark-mode .page-item.disabled .page-link { background-color: #1a1d27 !important; color: #5a6178 !important; }

/* Borders / dividers */
body.dark-mode hr                    { border-top-color: rgba(255,255,255,.08) !important; }
body.dark-mode .border               { border-color: rgba(255,255,255,.08) !important; }
body.dark-mode .border-bottom        { border-bottom-color: rgba(255,255,255,.08) !important; }

/* Summernote editor */
body.dark-mode .note-editor.note-frame           { border-color: rgba(255,255,255,.12) !important; }
body.dark-mode .note-toolbar                      { background-color: #22263a !important; border-bottom-color: rgba(255,255,255,.08) !important; }
body.dark-mode .note-toolbar .note-btn           { background-color: #22263a !important; border-color: rgba(255,255,255,.1) !important; color: #aab2c8 !important; }
body.dark-mode .note-editable                     { background-color: #1a1d27 !important; color: #bbc2d6 !important; }
body.dark-mode .note-statusbar                    { background-color: #22263a !important; border-top-color: rgba(255,255,255,.08) !important; }

/* Typeahead */
body.dark-mode .tt-menu              { background-color: #1a1d27 !important; border-color: rgba(255,255,255,.08) !important; }
body.dark-mode .tt-suggestion        { color: #bbc2d6 !important; }
body.dark-mode .tt-cursor            { background-color: #2c3150 !important; color: #fff !important; }

/* Notification toast panel */
body.dark-mode #noti-toast-panel .card       { background-color: #1a1d27 !important; }
body.dark-mode #noti-toast-panel .card-header { background-color: #22263a !important; }
body.dark-mode #noti-toast-list              { background: #252a3c !important; }

/* Misc helpers */
body.dark-mode .white-background     { background-color: #1a1d27 !important; }
body.dark-mode .h_sidenav            { background-color: #1a1d27 !important; }
body.dark-mode .bg-white             { background-color: #1a1d27 !important; }

/* Dashboard Apex dark mode */
body.dark-mode .db-chart-card        { background-color: #1a1d27 !important; border-color: rgba(255,255,255,.08) !important; }
body.dark-mode .db-chart-head        { background-color: #1a1d27 !important; border-bottom-color: rgba(255,255,255,.08) !important; color: #dde1ec !important; }
body.dark-mode .db-chart-filter      { border-bottom-color: rgba(255,255,255,.08) !important; }
body.dark-mode .db-filter-label      { color: #8891aa !important; }
body.dark-mode .db-empl-strip        { border-top-color: rgba(255,255,255,.08) !important; }
body.dark-mode .db-empl-label        { color: #8891aa !important; }
body.dark-mode .db-section .table thead tr { background-color: #0b1d3a !important; }

/* ================================================================
   APEX NAVY NAV THEME
   Sidebar: navy gradient matching dashboard
   Topbar:  dark navy #0b1d3a — unified frame
   ================================================================ */

/* ── Sidebar background ── */
#accordionSidebar {
    background: linear-gradient(180deg, #0b1d3a 0%, #0f2d50 100%) !important;
}
#accordionSidebar .sidebar-brand {
    border-bottom: 1px solid rgba(255,255,255,.1) !important;
    padding-top: 18px !important;
    padding-bottom: 18px !important;
}
#accordionSidebar .sidebar-brand-text {
    color: #fff !important;
    letter-spacing: .03em;
}

/* ── Parent nav links ── */
#accordionSidebar .nav-link {
    color: rgba(255,255,255,.62) !important;
    border-left: 3px solid transparent;
    transition: background .14s, color .14s, border-color .14s;
}
#accordionSidebar .nav-link i,
#accordionSidebar .nav-link .mdi {
    color: rgba(255,255,255,.45) !important;
}
#accordionSidebar .nav-link:hover {
    background: rgba(255,255,255,.06) !important;
    color: #fff !important;
}
#accordionSidebar .nav-link:hover i,
#accordionSidebar .nav-link:hover .mdi {
    color: rgba(255,255,255,.8) !important;
}
/* Active/expanded (aria-expanded="true" or link not collapsed) */
#accordionSidebar .nav-link:not(.collapsed),
#accordionSidebar .nav-item .nav-link[aria-expanded="true"] {
    background: rgba(14,165,233,.14) !important;
    border-left-color: #0ea5e9 !important;
    color: #7dd3fc !important;
}
#accordionSidebar .nav-link:not(.collapsed) i,
#accordionSidebar .nav-link:not(.collapsed) .mdi {
    color: #7dd3fc !important;
}

/* ── Collapse inner (sub-menu container) — override SB Admin white box ── */
#accordionSidebar .collapse-inner {
    background: rgba(5,14,34,.55) !important;
    border-radius: 0 !important;
    padding: 4px 0 !important;
}

/* ── Sub-items ── */
#accordionSidebar .collapse-item {
    color: rgba(255,255,255,.55) !important;
    border-left: 3px solid transparent;
    padding: 8px 16px 8px 28px !important;
    font-size: .78rem !important;
    font-weight: 400 !important;
    transition: background .14s, color .14s;
}
#accordionSidebar .collapse-item:hover {
    background: rgba(14,165,233,.12) !important;
    color: rgba(255,255,255,.9) !important;
    border-left-color: rgba(14,165,233,.4) !important;
}
#accordionSidebar .collapse-item.active {
    color: #bae6fd !important;
    background: rgba(14,165,233,.18) !important;
    border-left-color: #0ea5e9 !important;
    font-weight: 600 !important;
}

/* ── Dividers & toggle button ── */
#accordionSidebar .sidebar-divider {
    border-top-color: rgba(255,255,255,.1) !important;
}
#sidebarToggle {
    background: rgba(255,255,255,.1) !important;
}
#sidebarToggle:hover {
    background: rgba(14,165,233,.25) !important;
}
/* The template draws these arrows with "Font Awesome 5 Free", which is not loaded (only Font Awesome 4.7 is),
   so they showed as empty boxes. Use the same chevrons from Material Design Icons instead. */
#accordionSidebar .nav-item .nav-link[data-toggle=collapse]::after,
#accordionSidebar #sidebarToggle::after {
    font-family: 'Material Design Icons';
    font-weight: normal;
    font-size: 1.1rem;
    line-height: 1;
}
#accordionSidebar .nav-item .nav-link[data-toggle=collapse]::after           { content: '\F0140'; } /* open: down */
#accordionSidebar .nav-item .nav-link[data-toggle=collapse].collapsed::after { content: '\F0142'; } /* closed: right */
#accordionSidebar #sidebarToggle::after         { content: '\F0141'; margin: 0; } /* shrink sidebar: left */
#accordionSidebar.toggled #sidebarToggle::after { content: '\F0142'; margin: 0; } /* expand sidebar: right */

/* ── Topbar ── */
.topbar.bg-skyblue {
    background-color: #0b1d3a !important;
    border-bottom: 1px solid rgba(255,255,255,.08) !important;
    box-shadow: 0 2px 14px rgba(0,0,0,.38) !important;
}
.topbar.bg-skyblue .text-gray-600,
.topbar.bg-skyblue .nav-link .mdi,
.topbar.bg-skyblue .nav-link > .mdi,
.topbar #darkModeIcon {
    color: rgba(255,255,255,.72) !important;
}
.topbar .topbar-divider {
    border-right-color: rgba(255,255,255,.15) !important;
}
/* Dropdown menus (white bg) keep normal dark text */
.topbar.bg-skyblue .dropdown-menu .text-gray-400,
.topbar.bg-skyblue .dropdown-menu .mdi {
    color: #858796 !important;
}

/* ── Dark mode — topbar already navy; keep consistent ── */
body.dark-mode .topbar.bg-skyblue {
    background-color: #0b1d3a !important;
    box-shadow: 0 2px 14px rgba(0,0,0,.55) !important;
}
/* Dark mode sidebar sub-menu — use same navy palette */
body.dark-mode #accordionSidebar .collapse-inner { background: rgba(5,14,34,.75) !important; }
body.dark-mode #accordionSidebar .collapse-item  { color: rgba(255,255,255,.55) !important; }
body.dark-mode #accordionSidebar .collapse-item:hover { background: rgba(14,165,233,.12) !important; color: rgba(255,255,255,.9) !important; }
body.dark-mode #accordionSidebar .collapse-item.active { color: #bae6fd !important; background: rgba(14,165,233,.18) !important; border-left-color: #0ea5e9 !important; }

/* ================================================================
   MODULE TABLE HEADERS — Apex Navy
   Covers: client, policy, empl, expense, user_control (thead.bg-primary)
           org_search (tr.bg-primary inside thead)
   Uses background-color + background-image separately for
   reliable override of Star Admin's background-color: !important
   ================================================================ */
thead.bg-primary,
thead.bg-primary tr,
tr.bg-primary {
    background-color: #0b1d3a !important;
    background-image: linear-gradient(125deg, #0b1d3a 0%, #1e3a5f 55%, #0f2d50 100%) !important;
}
thead.bg-primary th,
thead.bg-primary tr th,
tr.bg-primary th {
    background-color: transparent !important;
    background-image: none !important;
    color: #fff !important;
    border-bottom-color: rgba(255,255,255,.15) !important;
    border-top-color: transparent !important;
}
/* Dark mode — keep navy */
body.dark-mode thead.bg-primary,
body.dark-mode thead.bg-primary tr,
body.dark-mode tr.bg-primary {
    background-color: #0b1d3a !important;
    background-image: linear-gradient(125deg, #0b1d3a 0%, #1e3a5f 55%, #0f2d50 100%) !important;
}

/* ============================================================
   USER CONTROL — ENTERPRISE TOGGLE SWITCHES
   ============================================================ */
.uc-toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    margin: 0;
    cursor: pointer;
    vertical-align: middle;
}

.uc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.uc-toggle-slider {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    border-radius: 22px;
    transition: background-color 0.2s;
}

.uc-toggle-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    top: 3px;
    background-color: #ffffff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.25);
}

.uc-toggle input:checked + .uc-toggle-slider {
    background-color: #0ea5e9;
}

.uc-toggle input:checked + .uc-toggle-slider::before {
    transform: translateX(18px);
}

.uc-toggle-all input:checked + .uc-toggle-slider {
    background: linear-gradient(125deg, #0b1d3a 0%, #1e3a5f 55%, #0f2d50 100%);
}

#form1 .table tbody td {
    text-align: center;
    vertical-align: middle;
}
#form1 .table tbody td:first-child {
    text-align: left;
}

body.dark-mode .uc-toggle-slider {
    background-color: #2c3150;
}

/* ================================================================
   OBSIDIAN FORM THEME
   Header: navy gradient · Body: #f8fafc · Inputs: white card + sky focus
   ================================================================ */

/* ── Modal chrome ── */
.modal-content {
    border: none;
    border-radius: 10px;
    box-shadow: 0 28px 80px rgba(11,29,58,.36), 0 6px 24px rgba(0,0,0,.16);
    overflow: hidden;
}
.modal-header {
    background: linear-gradient(125deg, #0b1d3a 0%, #1e3a5f 55%, #0f2d50 100%) !important;
    border-bottom: none !important;
    padding: 18px 22px;
}
.modal-header .modal-title {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
}
.modal-header .close {
    color: rgba(255,255,255,.55) !important;
    text-shadow: none !important;
    opacity: 1 !important;
}
.modal-header .close:hover { color: #fff !important; }
.modal-body { background: #f8fafc; }
.modal-footer {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0 !important;
}

/* ── Labels ── */
.modal-body .col-form-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: #475569;
}

/* ── Required asterisk: sky-blue ── */
.modal-body .text-danger { color: #0ea5e9 !important; }

/* ── Inputs: white card + sky-blue focus ring ── */
.modal-body .form-control {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 7px;
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
    transition: border-color .15s, box-shadow .15s;
}
.modal-body .form-control:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14,165,233,.2), 0 1px 2px rgba(0,0,0,.05);
}

/* ── Required fields: 3px sky-blue left accent ── */
.modal-body .form-control.required-border {
    border: 1.5px solid #e2e8f0 !important;
    border-left: 3px solid #0ea5e9 !important;
}
.modal-body .form-control.required-border:focus {
    border-color: #0ea5e9 !important;
    box-shadow: 0 0 0 3px rgba(14,165,233,.2), 0 1px 2px rgba(0,0,0,.05) !important;
}

/* ── Save button: sky-blue pill ── */
.modal-footer .btn.btn-primary {
    background: #0ea5e9 !important;
    border-color: #0ea5e9 !important;
    border-radius: 20px;
    padding: 6px 22px;
    font-weight: 600;
}
.modal-footer .btn.btn-primary:hover,
.modal-footer .btn.btn-primary:focus {
    background: #0284c7 !important;
    border-color: #0284c7 !important;
}

/* ── Close button: ghost slate pill ── */
.modal-footer .btn.btn-secondary {
    background: transparent !important;
    border: 1.5px solid #94a3b8 !important;
    color: #64748b !important;
    border-radius: 20px;
    padding: 6px 22px;
}

/* ── Dark mode: keep navy header; darken body ── */
body.dark-mode .modal-header {
    background: linear-gradient(125deg, #0b1d3a 0%, #1e3a5f 55%, #0f2d50 100%) !important;
}
body.dark-mode .modal-body { background: #1a1d27 !important; }
body.dark-mode .modal-footer {
    background: #1a1d27 !important;
    border-top-color: rgba(255,255,255,.08) !important;
}
body.dark-mode .modal-body .col-form-label { color: #8891aa !important; }
body.dark-mode .modal-body .form-control {
    background: #252a3c !important;
    border-color: rgba(255,255,255,.12) !important;
}
body.dark-mode .modal-body .form-control:focus {
    border-color: #0ea5e9 !important;
    box-shadow: 0 0 0 3px rgba(14,165,233,.18), 0 1px 2px rgba(0,0,0,.2) !important;
}
body.dark-mode .modal-body .form-control.required-border {
    border: 1.5px solid rgba(255,255,255,.12) !important;
    border-left: 3px solid #0ea5e9 !important;
}

/* ================================================================
   RESOURCE LIST — teal "contact directory" variant of the res-* page.
   Scoped to .resc-theme so Restaurant List is untouched. Branded
   themes (j.theme.css, #wrapper.theme-*) out-specify these and keep
   their brand colours, as intended.
   ================================================================ */
.res-card-outer.resc-theme .res-header {
    background: linear-gradient(125deg, #0F4C5C 0%, #145E69 55%, #1B6B73 100%);
}
.resc-theme .res-header::before { display: none; }
.res-card-outer.resc-theme .res-header::after {
    background: linear-gradient(90deg, transparent 0%, rgba(127,209,199,.45) 30%, rgba(127,209,199,.85) 55%, rgba(127,209,199,.45) 75%, transparent 100%);
}
.res-card-outer.resc-theme .res-header-icon {
    background: rgba(127,209,199,.16);
    border-color: rgba(127,209,199,.35);
    color: #CFF3EE;
    font-size: 22px;
}
.res-card-outer.resc-theme .res-header-title p { color: rgba(255,255,255,.55); }

.resc-theme .res-header-stats { gap: 8px; }
.resc-theme .res-stat-sep     { display: none; }
.resc-theme .res-stat {
    display: flex; align-items: baseline; gap: 6px;
    padding: 6px 14px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 999px;
}
.resc-theme .res-stat-num   { font-size: 16px; color: #7FD1C7; }
.resc-theme .res-stat-label { margin-top: 0; color: rgba(255,255,255,.6); }

.resc-theme .res-search-input.form-control {
    background: #F4F8F8 !important;
    border-color: #D3E3E2 !important;
}
.resc-theme .res-search-input.form-control:focus {
    border-color: #1B6B73 !important;
    background: #fff !important;
    box-shadow: 0 0 0 2px rgba(27,107,115,.15) !important;
}
#addRescBtn {
    border-radius: 8px !important;
    background: #7FD1C7 !important; color: #0F3A44 !important;
    border: none !important; font-size: 12px !important; font-weight: 700 !important;
}
#addRescBtn:hover { background: #9FDED6 !important; }
.searchRescBtn {
    border-radius: 8px !important;
    background: #145E69 !important; border-color: #0F4C5C !important;
    font-size: 13px !important; font-weight: 600 !important;
    height: 40px !important; padding: 0 20px !important;
}
.searchRescBtn:hover { background: #0F4C5C !important; }

.res-card-outer.resc-theme #display_table thead tr {
    background: linear-gradient(125deg, #0F4C5C 0%, #145E69 55%, #1B6B73 100%) !important;
}
.res-card-outer.resc-theme table.dataTable thead .sorting_asc::after,
.res-card-outer.resc-theme table.dataTable thead .sorting_desc::after { color: #7FD1C7 !important; }
.res-card-outer.resc-theme #display_table tbody tr:hover td { background-color: #EEF6F5 !important; }
.resc-theme .badge-category { background: #E0F2F0; color: #0F5A5F; border-color: #BFE4DF; }
.resc-theme a.resc-category-filter { cursor: pointer; text-decoration: none; transition: background-color .15s; }
.resc-theme a.resc-category-filter:hover { background: #C9EAE6; color: #0B474B; }
.resc-theme .res-avatar     { background: #145E69; border-color: rgba(127,209,199,.5); }

.resc_edit_btn.btn         { border-radius: 7px !important; background: #FFF7ED !important; border: none !important; color: #D97706 !important; }
.resc_edit_btn.btn:hover   { background: #FED7AA !important; }
.resc_delete_btn.btn       { border-radius: 7px !important; background: #FEF2F2 !important; border: none !important; color: #EF4444 !important; }
.resc_delete_btn.btn:hover { background: #FECACA !important; }

body.dark-mode .res-card-outer.resc-theme .res-header,
body.dark-mode .res-card-outer.resc-theme #display_table thead tr {
    background: linear-gradient(125deg, #0A3540 0%, #0E464F 55%, #12525A 100%) !important;
}
body.dark-mode .res-card-outer.resc-theme #display_table tbody tr:hover td { background-color: rgba(127,209,199,.07) !important; }
body.dark-mode .resc-theme .res-search-input.form-control {
    background: #22263a !important; border-color: rgba(255,255,255,.12) !important; color: #dde1ec !important;
}
body.dark-mode .resc-theme .badge-category { background: rgba(127,209,199,.12); color: #9FDED6; border-color: rgba(127,209,199,.25); }
body.dark-mode .resc-theme a.resc-category-filter:hover { background: rgba(127,209,199,.22); color: #C4EEE8; }

/* ================================================================
   GIFT LIST — plum "gift ideas" variant of the res-* page (gift_group).
   Same structure as .resc-theme; branded themes (#wrapper.theme-*)
   still out-specify the header colours.
   ================================================================ */
.res-card-outer.gift-theme .res-header {
    background: linear-gradient(125deg, #4A1D3F 0%, #5E2550 55%, #74305F 100%);
}
.gift-theme .res-header::before { display: none; }
.res-card-outer.gift-theme .res-header::after {
    background: linear-gradient(90deg, transparent 0%, rgba(240,178,206,.45) 30%, rgba(240,178,206,.85) 55%, rgba(240,178,206,.45) 75%, transparent 100%);
}
.res-card-outer.gift-theme .res-header-icon {
    background: rgba(240,178,206,.16);
    border-color: rgba(240,178,206,.35);
    color: #FBE1EC;
    font-size: 22px;
}
.res-card-outer.gift-theme .res-header-title p { color: rgba(255,255,255,.55); }

.gift-theme .res-header-stats { gap: 8px; }
.gift-theme .res-stat {
    display: flex; align-items: baseline; gap: 6px;
    padding: 6px 14px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 999px;
}
.gift-theme .res-stat-num   { font-size: 16px; color: #F0B2CE; }
.gift-theme .res-stat-label { margin-top: 0; color: rgba(255,255,255,.6); }

.gift-theme .res-search-input.form-control,
.gift-theme .gift-budget-range .form-control {
    background: #FAF5F8 !important;
    border-color: #E8D6E0 !important;
}
.gift-theme .res-search-input.form-control:focus,
.gift-theme .gift-budget-range .form-control:focus {
    border-color: #74305F !important;
    background: #fff !important;
    box-shadow: 0 0 0 2px rgba(116,48,95,.15) !important;
}
/* Budget range and Brand filter match the search box (13px, 40px high) */
.gift-theme .gift-budget-range .form-control { height: 40px !important; font-size: 13px !important; color: #3d3d3d !important; box-shadow: none !important; }
.gift-theme .gift-budget-range .form-control::placeholder { color: #9CA3AF !important; }
.gift-theme .gift-budget-range .form-control:first-child { border-radius: 8px 0 0 8px !important; }
.gift-theme .gift-budget-range .form-control:last-child  { border-radius: 0 8px 8px 0 !important; }
.gift-theme .gift-budget-range .input-group-text { background: #F3E8EE; border-color: #E8D6E0; color: #8A5A78; font-size: 13px; }
.gift-theme .res-controls-pad .bootstrap-select > .dropdown-toggle { height: 40px; font-size: 13px; border-radius: 8px; }
@media (max-width: 767.98px) {
    .gift-theme .res-controls-pad [class*="col-"] + [class*="col-"] { margin-top: 8px; }
}
#addGiftBtn {
    border-radius: 8px !important;
    background: #F0B2CE !important; color: #3E1534 !important;
    border: none !important; font-size: 12px !important; font-weight: 700 !important;
}
#addGiftBtn:hover { background: #F5C8DC !important; }
.searchGiftBtn {
    border-radius: 8px !important;
    background: #5E2550 !important; border-color: #4A1D3F !important;
    font-size: 13px !important; font-weight: 600 !important;
    height: 40px !important; padding: 0 20px !important;
}
.searchGiftBtn:hover { background: #4A1D3F !important; }

.res-card-outer.gift-theme #display_table thead tr {
    background: linear-gradient(125deg, #4A1D3F 0%, #5E2550 55%, #74305F 100%) !important;
}
.res-card-outer.gift-theme table.dataTable thead .sorting_asc::after,
.res-card-outer.gift-theme table.dataTable thead .sorting_desc::after { color: #F0B2CE !important; }
.res-card-outer.gift-theme #display_table tbody tr:hover td { background-color: #FBF3F7 !important; }
.gift-theme .badge-category { background: #F7E4EE; color: #6B2858; border-color: #EBCADB; }
.gift-theme a.gift-brand-filter { cursor: pointer; text-decoration: none; transition: background-color .15s; }
.gift-theme a.gift-brand-filter:hover { background: #F0CFE0; color: #521C44; }
.gift-theme .gift-budget { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.gift-theme .res-avatar  { background: #5E2550; border-color: rgba(240,178,206,.5); }

.gift_edit_btn.btn         { border-radius: 7px !important; background: #FFF7ED !important; border: none !important; color: #D97706 !important; }
.gift_edit_btn.btn:hover   { background: #FED7AA !important; }
.gift_delete_btn.btn       { border-radius: 7px !important; background: #FEF2F2 !important; border: none !important; color: #EF4444 !important; }
.gift_delete_btn.btn:hover { background: #FECACA !important; }

body.dark-mode .res-card-outer.gift-theme .res-header,
body.dark-mode .res-card-outer.gift-theme #display_table thead tr {
    background: linear-gradient(125deg, #331329 0%, #421A39 55%, #521F45 100%) !important;
}
body.dark-mode .res-card-outer.gift-theme #display_table tbody tr:hover td { background-color: rgba(240,178,206,.07) !important; }
body.dark-mode .gift-theme .res-search-input.form-control,
body.dark-mode .gift-theme .gift-budget-range .form-control {
    background: #22263a !important; border-color: rgba(255,255,255,.12) !important; color: #dde1ec !important;
}
body.dark-mode .gift-theme .gift-budget-range .input-group-text { background: #2a2f45; border-color: rgba(255,255,255,.12); color: #b9a3b3; }
body.dark-mode .gift-theme .badge-category { background: rgba(240,178,206,.12); color: #F2C3D8; border-color: rgba(240,178,206,.25); }
body.dark-mode .gift-theme a.gift-brand-filter:hover { background: rgba(240,178,206,.22); color: #F8DCE8; }

/* =====================================================================
   MDRT CALCULATOR — QVB colours (mdrt_group)
   RP = teal, SP = deep orange, total = green. Kept apart from the MDRT (blue)
   and COT (purple) level colours so a QVB figure never reads as a level.
   ===================================================================== */
.mdrt-qvb {
    --mdrt-rp: #00838F;      --mdrt-rp-soft: rgba(0, 131, 143, .07);   --mdrt-rp-line: rgba(0, 131, 143, .35);
    --mdrt-sp: #E65100;      --mdrt-sp-soft: rgba(230, 81, 0, .07);    --mdrt-sp-line: rgba(230, 81, 0, .35);
    --mdrt-total: #2E7D32;   --mdrt-total-soft: rgba(67, 160, 71, .08);
}
body.dark-mode .mdrt-qvb {
    --mdrt-rp: #4DD0E1;      --mdrt-rp-soft: rgba(77, 208, 225, .10);  --mdrt-rp-line: rgba(77, 208, 225, .40);
    --mdrt-sp: #FFB74D;      --mdrt-sp-soft: rgba(255, 183, 77, .10);  --mdrt-sp-line: rgba(255, 183, 77, .40);
    --mdrt-total: #81C784;   --mdrt-total-soft: rgba(129, 199, 132, .10);
}

/* Year tiles */
.mdrt-qvb .mdrt-tile-rp    { border-left: 4px solid var(--mdrt-rp); }
.mdrt-qvb .mdrt-tile-sp    { border-left: 4px solid var(--mdrt-sp); }
.mdrt-qvb .mdrt-tile-total { border-left: 4px solid var(--mdrt-total); }
.mdrt-qvb .mdrt-tile-rp .mdrt-tile-value    { color: var(--mdrt-rp); }
.mdrt-qvb .mdrt-tile-sp .mdrt-tile-value    { color: var(--mdrt-sp); }
.mdrt-qvb .mdrt-tile-total .mdrt-tile-value { color: var(--mdrt-total); }

/* Quarterly table: solid headers per group, tinted columns, coloured rate / QVB figures.
   The #wrapper #mdrt_qvb_table selectors outrank the branded themes, which make thead th transparent. */
.mdrt-qvb thead th.mdrt-head-rp,
#wrapper #mdrt_qvb_table thead tr th.mdrt-head-rp       { background-color: #00838F !important; background-image: none !important; color: #fff !important; }
.mdrt-qvb thead th.mdrt-head-sp,
#wrapper #mdrt_qvb_table thead tr th.mdrt-head-sp       { background-color: #E65100 !important; background-image: none !important; color: #fff !important; }
.mdrt-qvb thead th.mdrt-head-total,
#wrapper #mdrt_qvb_table thead tr th.mdrt-head-total    { background-color: #2E7D32 !important; background-image: none !important; color: #fff !important; }
.mdrt-qvb td.mdrt-rp    { background-color: var(--mdrt-rp-soft); }
.mdrt-qvb td.mdrt-sp    { background-color: var(--mdrt-sp-soft); }
.mdrt-qvb td.mdrt-total { background-color: var(--mdrt-total-soft); }
.mdrt-qvb .mdrt-rp-text    { color: var(--mdrt-rp); font-weight: 600; }
.mdrt-qvb .mdrt-sp-text    { color: var(--mdrt-sp); font-weight: 600; }
.mdrt-qvb .mdrt-total-text { color: var(--mdrt-total); }
.mdrt-qvb .mdrt-group-start { border-left: 2px solid rgba(255, 255, 255, .55); }
.mdrt-qvb td.mdrt-rp.mdrt-group-start    { border-left-color: var(--mdrt-rp); }
.mdrt-qvb td.mdrt-sp.mdrt-group-start    { border-left-color: var(--mdrt-sp); }
.mdrt-qvb td.mdrt-total.mdrt-group-start { border-left-color: var(--mdrt-total); }
.mdrt-qvb td.mdrt-rp .form-control { border-color: var(--mdrt-rp-line); }
.mdrt-qvb td.mdrt-sp .form-control { border-color: var(--mdrt-sp-line); }

/* QVB Tiers popup: coloured heading dot and a top rule on each scale */
.mdrt-qvb .mdrt-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: baseline; }
.mdrt-qvb .mdrt-dot-rp { background: var(--mdrt-rp); }
.mdrt-qvb .mdrt-dot-sp { background: var(--mdrt-sp); }
.mdrt-qvb .mdrt-scale-rp { border-top: 3px solid var(--mdrt-rp); }
.mdrt-qvb .mdrt-scale-sp { border-top: 3px solid var(--mdrt-sp); }

/* MDRT CALCULATOR — ISC card: indigo accent, kept apart from the level and QVB colours */
.mdrt-isc { --isc: #3949AB; --isc-soft: rgba(57, 73, 171, .07); }
body.dark-mode .mdrt-isc { --isc: #9FA8DA; --isc-soft: rgba(159, 168, 218, .10); }
.mdrt-isc .mdrt-isc-tile { border-left: 4px solid var(--isc); }
.mdrt-isc #isc_reached, .mdrt-isc #isc_next { color: var(--isc); }
.mdrt-isc .isc-bar { background-color: var(--isc); }
.mdrt-isc tr.isc-row-met td { background-color: var(--isc-soft); }

/* =====================================================================
   100 GOALS — touch drag (iPad / phones) and small-screen controls
   ===================================================================== */
/* The handle starts a touch drag (goal.js initGoalTouchDrag); stop the browser scrolling / zooming / long-press menu on it. */
.goal-drag-handle { touch-action: none; -webkit-touch-callout: none; -webkit-user-select: none; }
@media (pointer: coarse) {
    .goal-drag-handle { font-size: 28px; padding: 6px 4px; margin: -6px -4px; color: #9ca3af; }
}
/* Floating copy of the card that follows the finger */
.goal-touch-ghost {
    position: fixed; z-index: 2000; margin: 0; pointer-events: none;
    opacity: .95; transform: scale(1.02);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .22);
}
body.goal-touch-dragging { -webkit-user-select: none; user-select: none; }

/* Phones: stack the controls full width so the search box's 220px minimum can't push Add Goal off screen */
@media (max-width: 575.98px) {
    .goal-controls > * { flex: 1 1 100%; }
    .goal-controls .goal-search-wrap input,
    .goal-controls .goal-adviser-sel { min-width: 0; width: 100%; }
    #addGoalBtn { width: 100%; }
}

/* =====================================================================
   INSPIRATION (inspiration_group) — gallery of quote cards and a mind map
   ===================================================================== */
.insp-page {
    --insp-ink: #1f2937; --insp-muted: #6b7280; --insp-node-bg: #ffffff; --insp-center: #1e3a5f; --insp-soft: .08;
    --insp-a0: #D97706; --insp-a1: #E11D48; --insp-a2: #0D9488; --insp-a3: #4F46E5; --insp-a4: #059669; --insp-a5: #0284C7;
}
body.dark-mode .insp-page {
    --insp-ink: #e5e7eb; --insp-muted: #9ca3af; --insp-node-bg: #1f2937; --insp-center: #93c5fd; --insp-soft: .14;
    --insp-a0: #FBBF24; --insp-a1: #FB7185; --insp-a2: #2DD4BF; --insp-a3: #A5B4FC; --insp-a4: #34D399; --insp-a5: #7DD3FC;
}
.insp-page .insp-accent-0 { --insp-accent: var(--insp-a0); }
.insp-page .insp-accent-1 { --insp-accent: var(--insp-a1); }
.insp-page .insp-accent-2 { --insp-accent: var(--insp-a2); }
.insp-page .insp-accent-3 { --insp-accent: var(--insp-a3); }
.insp-page .insp-accent-4 { --insp-accent: var(--insp-a4); }
.insp-page .insp-accent-5 { --insp-accent: var(--insp-a5); }

.insp-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.insp-show { font-size: 13px; color: var(--insp-muted); }
.insp-count { font-size: 13px; margin-left: auto; }

/* Gallery — CSS columns give a masonry flow for quotes of different lengths */
.insp-gallery { column-count: 4; column-gap: 16px; }
@media (max-width: 1399.98px) { .insp-gallery { column-count: 3; } }
@media (max-width: 991.98px)  { .insp-gallery { column-count: 2; } }
@media (max-width: 575.98px)  { .insp-gallery { column-count: 1; } }
.insp-card {
    position: relative; break-inside: avoid; margin-bottom: 16px; padding: 22px 18px 14px 20px; cursor: pointer;
    border-radius: 12px; border-left: 4px solid var(--insp-accent);
    background: color-mix(in srgb, var(--insp-accent) calc(var(--insp-soft) * 100%), var(--insp-node-bg));
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06); transition: transform .15s, box-shadow .15s;
}
.insp-card:hover, .insp-card:focus-visible { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, .10); outline: none; }
.insp-card:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--insp-accent) 45%, transparent); }
.insp-card::before {
    content: "\201C"; position: absolute; top: -6px; left: 12px;
    font: 700 54px/1 Georgia, "Times New Roman", serif; color: var(--insp-accent); opacity: .35;
}
.insp-quote { position: relative; font-family: Georgia, "Times New Roman", serif; color: var(--insp-ink); line-height: 1.45; white-space: pre-line; word-wrap: break-word; }
.insp-size-l .insp-quote { font-size: 22px; font-weight: 600; }
.insp-size-m .insp-quote { font-size: 17px; }
.insp-size-s .insp-quote { font-size: 14px; }
.insp-by { margin-top: 10px; font-size: 11px; letter-spacing: .03em; color: var(--insp-muted); }

/* Mind map — positioned at natural size, scaled down to the card width by inspiration.js */
.insp-mindmap-wrap { position: relative; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
.insp-mindmap-sizer { position: relative; margin: 0 auto; }
.insp-mindmap { position: absolute; top: 0; left: 0; transform-origin: top left; }
.insp-links { position: absolute; top: 0; left: 0; overflow: visible; }
.insp-link { stroke: var(--insp-accent); stroke-width: 1.5; opacity: .35; }
.insp-center {
    position: absolute; transform: translate(-50%, -50%); width: 120px; height: 120px; border-radius: 50%;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    background: var(--insp-center); color: #fff; font-weight: 700; font-size: 14px; box-shadow: 0 6px 18px rgba(30, 58, 95, .35);
}
body.dark-mode .insp-center { color: #0f172a; }
.insp-center .mdi { font-size: 34px; line-height: 1; }
.insp-node {
    position: absolute; transform: translate(-50%, -50%); padding: 7px 9px; border-radius: 12px; cursor: pointer;
    background: var(--insp-node-bg); color: var(--insp-ink); border: 2px solid var(--insp-accent);
    font-size: 12px; line-height: 1.3; text-align: center; word-wrap: break-word;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .08); transition: box-shadow .15s, z-index 0s;
}
.insp-node:hover, .insp-node:focus-visible { z-index: 2; box-shadow: 0 6px 16px rgba(0, 0, 0, .18); outline: none; background: color-mix(in srgb, var(--insp-accent) 12%, var(--insp-node-bg)); }

.insp-empty { text-align: center; padding: 48px 16px; color: var(--insp-muted); }
.insp-empty .mdi { font-size: 48px; opacity: .5; }
.insp-textarea { font-family: Georgia, "Times New Roman", serif; font-size: 16px; }
@media (prefers-reduced-motion: reduce) { .insp-card, .insp-node { transition: none; } .insp-card:hover { transform: none; } }

/* =====================================================================
   CASE STUDY (case_group) — reuses the Inspiration gallery / mind map (.insp-*) with a calculation line
   ===================================================================== */
.case-page .case-card { padding: 16px 18px 12px 18px; }
.case-page .case-card::before { content: none; }     /* no opening quote mark on case studies */
.case-page .case-name { font-size: 17px; font-weight: 700; color: var(--insp-ink); line-height: 1.3; word-wrap: break-word; }
.case-page .case-desc { margin-top: 6px; font-size: 13px; color: var(--insp-muted); line-height: 1.45; white-space: pre-line; word-wrap: break-word; }
.case-calc {
    margin-top: 12px; padding: 8px 10px; border-radius: 8px; font-size: 13px; line-height: 1.6;
    font-variant-numeric: tabular-nums; color: var(--insp-ink, #1f2937);
    background: color-mix(in srgb, var(--insp-accent, #4F46E5) 10%, transparent);
}
.case-calc .case-op { color: var(--insp-muted, #6b7280); margin: 0 1px; }
.case-calc .case-result { color: var(--insp-accent, #4F46E5); font-size: 15px; white-space: nowrap; }
.case-calc-term { white-space: nowrap; }
/* Live preview in the form (outside .insp-page, so give it its own accent) */
.case-calc-preview { --insp-accent: #4F46E5; margin-top: 4px; }
body.dark-mode .case-calc-preview { --insp-accent: #A5B4FC; --insp-ink: #e5e7eb; --insp-muted: #9ca3af; }

/* Mind map nodes: name (2 lines max) over the result */
.case-page #case_mindmap .insp-node { display: flex; flex-direction: column; align-items: center; gap: 2px; -webkit-line-clamp: unset; }
.case-page .case-node-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; }
.case-page .case-node-result { font-weight: 700; color: var(--insp-accent); font-variant-numeric: tabular-nums; }
/* Case Study year-by-year working (case.js caseCalcHtml) */
.case-calc-head { font-size: 12px; color: var(--insp-muted, #6b7280); margin-bottom: 4px; }
.case-calc-years { font-size: 12px; line-height: 1.55; }
.case-calc-year { white-space: nowrap; overflow-x: auto; }
.case-calc-yr { display: inline-block; min-width: 38px; font-weight: 600; color: var(--insp-muted, #6b7280); }
.case-calc-more { color: var(--insp-muted, #6b7280); font-style: italic; }
.case-calc-total { margin-top: 6px; padding-top: 6px; border-top: 1px dashed color-mix(in srgb, var(--insp-accent, #4F46E5) 35%, transparent); }
.case-calc-preview .case-calc-years { max-height: 220px; overflow-y: auto; }
/* Case Study disclaimer (page notice + form preview) */
.case-disclaimer {
    display: flex; align-items: flex-start; gap: 6px; padding: 8px 12px; border-radius: 8px;
    font-size: 13px; line-height: 1.45; color: #78350f; background: #fffbeb; border: 1px solid #fde68a;
}
.case-disclaimer .mdi { font-size: 16px; line-height: 1.2; }
.case-disclaimer-sm { font-size: 12px; padding: 6px 10px; }
body.dark-mode .case-disclaimer { color: #fde68a; background: rgba(251, 191, 36, .10); border-color: rgba(251, 191, 36, .35); }

/* Client view — Goals tab status filter, sized like the other small controls */
#cgoal_filter_flag { font-size: 13px; height: 34px; padding-top: 4px; padding-bottom: 4px; }

/* =====================================================================
   PRODUCT ILLUSTRATION (illus_group)
   ===================================================================== */
.illus-page { --illus-accent: #1B6B73; --illus-soft: #EEF6F5; --illus-line: #D3E3E2; --illus-hol: #FFF4E0; }
.illus-holiday { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.illus-holiday-year {
    min-width: 38px; height: 32px; padding: 0 8px;
    border: 1px solid var(--illus-line); border-radius: 6px; background: #fff;
    font-size: 13px; font-variant-numeric: tabular-nums; color: #3d3d3d; cursor: pointer;
}
.illus-holiday-year:hover { border-color: var(--illus-accent); }
.illus-holiday-year:focus-visible { outline: 2px solid var(--illus-accent); outline-offset: 1px; }
.illus-holiday-year.active { background: #D97706; border-color: #D97706; color: #fff; }

.illus-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.illus-tile { padding: 12px 14px; border: 1px solid var(--illus-line); border-radius: 8px; background: #fff; }
.illus-tile-label { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: #6b7280; }
.illus-tile-value { margin-top: 4px; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; color: #1f2937; }
.illus-tile-main { background: var(--illus-soft); border-color: var(--illus-accent); }
.illus-tile-main .illus-tile-value { color: var(--illus-accent); }
.illus-tile-neg .illus-tile-value { color: #DC2626; }

.illus-current { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--illus-soft); color: var(--illus-accent); font-size: 12px; font-weight: 600; }
.illus-params { padding: 8px 12px; margin-bottom: 12px; border-radius: 6px; background: var(--illus-soft); font-size: 13px; }
.illus-chart-wrap { position: relative; }
.illus-table-wrap { max-height: 520px; overflow: auto; }
.illus-table { font-size: 13px; font-variant-numeric: tabular-nums; }
.illus-table thead th { position: sticky; top: 0; z-index: 1; background: var(--illus-accent); color: #fff; white-space: nowrap; }
.illus-table td { white-space: nowrap; }
.illus-table tr.illus-holiday-row td { background: var(--illus-hol); }
.illus-table tr.illus-month-row td { color: #6b7280; }
.illus-num { font-variant-numeric: tabular-nums; }
.illus-rates-table td { min-width: 110px; vertical-align: middle; }
.illus-rates-table td:first-child { min-width: 190px; }

body.dark-mode .illus-page { --illus-soft: rgba(127,209,199,.08); --illus-line: rgba(255,255,255,.12); --illus-hol: rgba(217,119,6,.15); }
body.dark-mode .illus-holiday-year,
body.dark-mode .illus-tile { background: #22263a; color: #dde1ec; }
body.dark-mode .illus-tile-value { color: #dde1ec; }
body.dark-mode .illus-tile-main .illus-tile-value { color: #7FD1C7; }
body.dark-mode .illus-table thead th { background: #12525A; }

/* Product Illustration — partial withdrawal comparison */
.illus-page { --illus-pw: #7C3AED; --illus-pw-soft: #F5F3FF; }
.illus-holiday-year:disabled { opacity: .4; cursor: not-allowed; }
.illus-wd-table { max-width: 560px; }
.illus-wd-table th { font-size: 12px; font-weight: 600; color: #6b7280; border-top: 0; }
.illus-wd-table td { vertical-align: middle; }
.illus-warnings { margin-bottom: 12px; padding: 8px 12px; border-radius: 6px; background: #FFF7ED; color: #9A3412; font-size: 13px; }
.illus-compare-table { font-size: 14px; font-variant-numeric: tabular-nums; }
.illus-compare-table thead th { border-top: 0; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: #6b7280; }
.illus-compare-table th[scope="row"] { font-weight: 500; }
.illus-compare-table .illus-compare-main td,
.illus-compare-table .illus-compare-main th { font-weight: 700; background: var(--illus-soft); }
.illus-page .illus-col-pw { background: var(--illus-pw-soft); }
.illus-compare-table thead .illus-col-pw { color: var(--illus-pw); }
.illus-up   { color: #15803D; }
.illus-down { color: #DC2626; }
.illus-table tr.illus-wd-row td { box-shadow: inset 0 1px 0 var(--illus-pw); }
.illus-table tr.illus-lapsed-row td { color: #9ca3af; }
body.dark-mode .illus-page { --illus-pw-soft: rgba(124,58,237,.12); }
body.dark-mode .illus-warnings { background: rgba(217,119,6,.15); color: #FDBA74; }
.illus-table thead th.illus-col-pw { background: var(--illus-pw); color: #fff; }
body.dark-mode .illus-table thead th.illus-col-pw { background: #5B21B6; }

/* Topbar language toggle — full name everywhere, "EN" / "中" only when the bar is too narrow */
#langDropdown { white-space: nowrap; }
#langDropdown .lang-full,
#langDropdown .lang-short { font-weight: 600; }
#langDropdown .lang-short { display: none; }
@media (max-width: 359.98px) {
    #langDropdown .lang-full  { display: none; }
    #langDropdown .lang-short { display: inline; }
    .topbar .navbar-nav > .nav-item > .nav-link { padding-left: .25rem !important; padding-right: .25rem !important; }
}
/* Phones: tighter topbar so every icon fits beside the collapsed sidebar */
@media (max-width: 575.98px) {
    .topbar.navbar { padding-left: .5rem; padding-right: .5rem; }
    .topbar #sidebarToggleTop { margin-right: .25rem !important; }
    .topbar .navbar-nav > .nav-item.mx-1 { margin-left: 0 !important; margin-right: 0 !important; }
    .topbar .navbar-nav > .nav-item > .nav-link { padding-left: .4rem; padding-right: .4rem; }
}

/* Product Illustration — early encashment (shown when "Show early encashment" is ticked) */
.illus-page { --illus-eec: #DC2626; --illus-eec-soft: #FEF2F2; }
.illus-eec { margin-top: 16px; padding: 12px 14px; border: 1px solid #FECACA; border-radius: 8px; }
.illus-eec h6 { font-weight: 700; color: var(--illus-eec); }
.illus-page td.illus-col-eec { background: var(--illus-eec-soft); }
.illus-table thead th.illus-col-eec { background: var(--illus-eec); color: #fff; }
body.dark-mode .illus-page { --illus-eec-soft: rgba(220,38,38,.12); }
body.dark-mode .illus-eec { border-color: rgba(220,38,38,.35); }
body.dark-mode .illus-table thead th.illus-col-eec { background: #991B1B; }

/* Product Illustration — Calculator / Illustration view buttons */
.illus-view-btns .illus-view-btn {
    flex: 1 1 auto; height: 38px; padding: 0 16px;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border: 1px solid var(--illus-line); background: #fff; color: #4b5563;
    font-size: 14px; font-weight: 600; white-space: nowrap;
}
.illus-view-btns .illus-view-btn .mdi { font-size: 18px; line-height: 1; }
.illus-view-btns .illus-view-btn:hover { border-color: var(--illus-accent); color: var(--illus-accent); }
.illus-view-btns .illus-view-btn:focus-visible { outline: 2px solid var(--illus-accent); outline-offset: 1px; z-index: 2; }
.illus-view-btns .illus-view-btn.active { background: var(--illus-accent); border-color: var(--illus-accent); color: #fff; z-index: 1; }
body.dark-mode .illus-view-btns .illus-view-btn { background: #22263a; color: #dde1ec; }
body.dark-mode .illus-view-btns .illus-view-btn.active { background: #1B6B73; border-color: #1B6B73; color: #fff; }
/* Calculator / Illustration buttons: full width when the row stacks on phones */
@media (max-width: 767.98px) { .illus-view-btns { width: 100%; } }
@media (max-width: 575.98px) {
    .illus-view-btns .illus-view-btn { flex: 1 1 0; min-width: 0; padding: 0 6px; gap: 4px; font-size: 13px; }
    .illus-view-btns .illus-view-btn .mdi { font-size: 16px; }
}

/* ================================================================
   DASHBOARD VIEW TOGGLE + FUNCTIONS LAUNCHPAD
   Statistics / Functions segmented toggle; Functions shows a grid
   of module tiles, each with its own accent hue (--fn)
   ================================================================ */
.db-view-bar { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.db-view-toggle {
  --db-accent: #1e3a5f;
  display: inline-flex; gap: 4px; padding: 4px;
  background: #eef2f7; border: 1px solid #dde4ee; border-radius: 999px;
}
#wrapper.theme-hsbc    .db-view-toggle { --db-accent: #DB0011; }
#wrapper.theme-allianz .db-view-toggle { --db-accent: #003781; }
#wrapper.theme-ac      .db-view-toggle { --db-accent: #1E4620; }
.db-view-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: transparent; color: #5b6578;
  border-radius: 999px; padding: 6px 16px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.db-view-btn .mdi { font-size: 17px; line-height: 1; }
.db-view-btn:hover { color: var(--db-accent); }
.db-view-btn.active { background: var(--db-accent); color: #fff; box-shadow: 0 3px 10px rgba(11,29,58,.25); }
.db-view-btn:focus-visible { outline: 2px solid var(--db-accent); outline-offset: 2px; }
.db-view-count {
  min-width: 20px; padding: 0 6px; border-radius: 999px;
  font-size: 11px; line-height: 18px; text-align: center;
  background: rgba(0,0,0,.08); font-variant-numeric: tabular-nums;
}
.db-view-btn.active .db-view-count { background: rgba(255,255,255,.22); }

.db-fn-grid {
  display: grid; gap: 14px; padding: 18px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.db-fn-empty { grid-column: 1 / -1; text-align: center; color: #8a93a6; padding: 24px 0; }
.db-fn-tile {
  --fn: #475569;
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 14px;
  padding: 16px; min-height: 84px;
  background: #fff; border: 1px solid #e3e8ef; border-radius: 14px;
  color: #1f2937; text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
/* soft glow of the tile's hue in the top-right corner */
.db-fn-tile::after {
  content: ''; position: absolute; right: -40px; top: -40px;
  width: 120px; height: 120px; border-radius: 50%;
  background: var(--fn); opacity: .07; pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.db-fn-tile:hover, .db-fn-tile:focus-visible {
  transform: translateY(-3px); text-decoration: none; color: #1f2937;
  border-color: var(--fn); box-shadow: 0 10px 24px -10px var(--fn);
}
.db-fn-tile:hover::after, .db-fn-tile:focus-visible::after { opacity: .14; transform: scale(1.15); }
.db-fn-tile:focus-visible { outline: 2px solid var(--fn); outline-offset: 2px; }
.db-fn-icon {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: #fff;
  background: var(--fn);
  background: linear-gradient(140deg, var(--fn), color-mix(in srgb, var(--fn) 65%, #000));
  box-shadow: 0 6px 14px -6px var(--fn);
}
.db-fn-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; position: relative; z-index: 1; }
.db-fn-name { font-size: 14px; font-weight: 700; line-height: 1.25; }
.db-fn-desc { font-size: 12px; color: #6b7280; line-height: 1.35; }
.db-fn-go {
  font-size: 18px; color: var(--fn); opacity: 0; transform: translateX(-6px);
  transition: opacity .18s ease, transform .18s ease; position: relative; z-index: 1;
}
.db-fn-tile:hover .db-fn-go, .db-fn-tile:focus-visible .db-fn-go { opacity: 1; transform: none; }
@media (hover: none) { .db-fn-go { opacity: .6; transform: none; } }

.db-fn-teal   { --fn: #0d9488; }
.db-fn-sky    { --fn: #0284c7; }
.db-fn-amber  { --fn: #d97706; }
.db-fn-coral  { --fn: #e11d48; }
.db-fn-indigo { --fn: #4f46e5; }
.db-fn-gold   { --fn: #ca8a04; }
.db-fn-lime   { --fn: #65a30d; }
.db-fn-slate  { --fn: #475569; }
.db-fn-plum   { --fn: #9d4b8f; }
.db-fn-blue   { --fn: #2563eb; }
.db-fn-green  { --fn: #059669; }

@media (prefers-reduced-motion: reduce) {
  .db-fn-tile, .db-fn-tile::after, .db-fn-go, .db-view-btn { transition: none; }
  .db-fn-tile:hover, .db-fn-tile:focus-visible { transform: none; }
}
@media (max-width: 575.98px) {
  .db-view-bar { justify-content: stretch; }
  .db-view-toggle { width: 100%; }
  .db-view-btn { flex: 1 1 0; justify-content: center; padding: 7px 10px; }
  .db-fn-grid { grid-template-columns: 1fr; padding: 12px; gap: 10px; }
  .db-fn-tile { min-height: 72px; padding: 12px 14px; }
}

body.dark-mode .db-view-toggle { --db-accent: #3b82f6; background: #22263a; border-color: rgba(255,255,255,.08); }
body.dark-mode .db-view-btn { color: #a3abc0; }
body.dark-mode .db-view-btn.active { color: #fff; }
body.dark-mode .db-view-count { background: rgba(255,255,255,.1); }
body.dark-mode .db-fn-tile { background: #1f2333; border-color: rgba(255,255,255,.08); color: #dde1ec; }
body.dark-mode .db-fn-tile:hover, body.dark-mode .db-fn-tile:focus-visible { color: #fff; border-color: var(--fn); box-shadow: 0 10px 26px -12px var(--fn); }
body.dark-mode .db-fn-tile::after { opacity: .12; }
body.dark-mode .db-fn-desc { color: #8891aa; }

/* Product Illustration — comparison table: plan name under the column heading */
#illus_table thead th { vertical-align: bottom; }
#illus_table .illus-th-sub { font-size: 10px; font-weight: 600; opacity: .75; text-transform: none; letter-spacing: 0; white-space: nowrap; }

/* Product Illustration — ⓘ column info buttons and popup */
#illus_table .illus-col-info {
  border: 0; background: transparent; color: inherit; opacity: .7;
  padding: 0 0 0 2px; line-height: 1; font-size: 13px; cursor: pointer; vertical-align: baseline;
}
#illus_table .illus-col-info:hover { opacity: 1; }
#illus_table .illus-col-info:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; border-radius: 3px; opacity: 1; }
.illus-ci-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #64748b; margin-bottom: 4px; }
.illus-ci-formula {
  background: #f1f5f9; border-left: 3px solid #1e3a5f; border-radius: 6px;
  padding: 8px 12px; font-family: SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.6; color: #1f2937;
}
.illus-ci-rates { font-size: 12.5px; font-variant-numeric: tabular-nums; }
body.dark-mode .illus-ci-label { color: #8891aa; }
body.dark-mode .illus-ci-formula { background: #22263a; border-left-color: #3b82f6; color: #dde1ec; }

/* Product Illustration — withdrawal rows: Withdrawal Amount / Payout Wanted, and the worked-out line under the amount */
#illus_wd_table .illus-wd-type { min-width: 165px; }
#illus_wd_table .illus-wd-hint { display: block; margin-top: 2px; font-size: 11px; color: #6b7280; white-space: nowrap; }
body.dark-mode #illus_wd_table .illus-wd-hint { color: #8891aa; }
