/*
Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
Click nbfs://nbhost/SystemFileSystem/Templates/ClientSide/css.css to edit this template
*/
/* 
    Created on : 9 sept. 2024, 16 h 18 min 09 s
    Author     : maximinocortesalvarez
*/

/* Base button styles */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.btn-checkin {
    background-color: #4CAF50;
    color: white;
}
.btn-checkin:hover {
    background-color: #45A049;
}
.btn-checkout {
    background-color: #F44336;
    color: white;
}
.btn-checkout:hover {
    background-color: #D32F2F;
}

/* Attendance widget */
.attendance-widget-row {
    width: 100%;
    margin: 12px 0 0;
    padding-left: 16px;
    padding-right: 16px;
    display: flex;
    justify-content: flex-start;
}

.attendance-widget {
    z-index: 10;
    position: relative;
    width: 280px;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    transition: transform 0.3s;
}
.attendance-widget.minimized {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

/* Widget header */
.attendance-header {
    background-color: #000000;
    color: #fff;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.attendance-header h4 {
    margin: 0;
    color: #fff;
    font-size: 16px;
}
.attendance-header .toggle-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

/* Widget body */
.attendance-body {
    padding: 15px;
    display: block;
}
.attendance-widget.minimized .attendance-body,
.attendance-widget.minimized .attendance-header h4 {
    display: none;
}
.attendance-widget.minimized .attendance-header {
    width: 30px;
    height: 30px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
}
.attendance-widget.minimized .toggle-btn {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    line-height: 1;
}

/* Reset styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

nav {
    background-color: #000000;

}

body {
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    line-height: 1.5;
    background-color: #f6f6f6;
    color: #242424;
    margin: 0;
    padding: 0;
}

/* Layout */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600; /* SemiBold */
    font-size: 12px;
    color: #242424;
    margin-bottom: 10px;
    text-align: center;
}

p {
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    color: #242424;
    margin-bottom: 10px;
}

a {
    color: #2980b9;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Forms */
form {
    background-color: #f6f6f6;
    padding: 20px;
    border-radius: 8px;
    margin: 20px auto;
    max-width: 700px;
}

input, select, textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    color: #9d9d9c;
}

label {
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

input[type="date"] {
    width: 120px; /* Set the width to your preference */
    padding: 4px;
    font-size: 12px;
    border-radius: 4px;
    max-width: 100%;
}


/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th, td {
    padding: 5px;
    text-align: left;
    font-size: 10px;
    border: 1px solid #ddd;
}

th {
    /*background-color: #146ef4;*/
    background-color: #333333;
    color: #ffffff !Important; 
    font-family: 'Poppins', sans-serif;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Utilities */
.mt-10 {
    margin-top: 10px;
}
.mb-10 {
    margin-bottom: 10px;
}
.p-10 {
    padding: 10px;
}
.text-center {
    text-align: center;
}

/*test*/
/* Autocomplete suggestions */
/* Container for autocomplete input fields */
.autocomplete {
    position: relative; /* Establishes a positioning context */
    /*display: inline-block; /* Adjust as needed */
    display: inline-block;
}

/* Suggestion box styling */
.suggestion-box {
    position: absolute;
    top: 100%; /* Positions the box directly below the input field */
    left: 0;
    width: 100%; /* Matches the width of the input field */
    max-height: 150px;
    overflow-y: auto;
    background-color: #fff;
    border: 1px solid #ccc;
    z-index: 1000;
    box-sizing: border-box;
}

/* Suggestion item styling */
.suggestion-item {
    padding: 8px;
    cursor: pointer;
}

.suggestion-item:hover {
    background-color: #f0f0f0;
}


/* Form styling */
form label {
    display: block;
    margin-top: 10px;
}

form input, form select, form textarea {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
}

.selected-details {
    margin-top: 5px;
    padding: 8px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
}

.selected-details p {
    margin: 0;
    line-height: 1.4;
}

/* Table styling */
#ordersTable {
    width: 100%;
    border-collapse: collapse;
}

#ordersTable th, #ordersTable td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: left;
}

#ordersTable th {
    background-color: #146ef4;
}

/* Modal styling */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Enable scrolling for the modal if needed */
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    width: 50%;
    max-height: 80vh; /* Set maximum height to 80% of viewport height */
    overflow-y: auto; /* Enable vertical scrolling within the modal content */
    position: relative;
    box-sizing: border-box; /* Ensure padding and border are included in the width and height */
}

/* Optional: Adjust the close button position */
.close-button {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 10px;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.selected-shipping-order {
    border: 1px solid #ccc;
    padding: 10px;
    margin-bottom: 10px;
}

#shippingOrdersTable {
    width: 100%;
    border-collapse: collapse;
}

#shippingOrdersTable th, #shippingOrdersTable td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: left;
}

#shippingOrdersTable th {
    background-color: #146ef4;
}

/* Menu Styling */
.menu {
    background-color: #333;
    padding: 10px;
}

.menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

.menu li {
    margin-right: 20px;
}

.menu a {
    color: white;
    text-decoration: none;
    padding: 10px;
    display: block;
}

.menu .user-menu {
    position: relative;
}

.user-icon {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 5px;
}

.user-profile {
    display: flex;
    align-items: center;
    vertical-align: middle;
}

.user-profile:hover .dropdown-menu {
    display: block;
}

.dropdown-menu {
    /*display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    overflow: hidden;
    z-index: 100;*/
    min-width: 460px;

}

/* Prevent text from wrapping incorrectly */
.dropdown-item {
    white-space: nowrap; /* Keeps text on one line */
    overflow: hidden;
    text-overflow: ellipsis; /* Adds "..." if text overflows */
    padding: 10px 15px; /* Adjust padding to make items bigger */
    font-size: 14px; /* Slightly increase font size */
}

.dropdown-menu li {
    margin: 0;
    padding: 0;
}

.dropdown-menu li a {
    padding: 10px;
    color: black;
    display: block;
    white-space: nowrap;
}

.dropdown-menu li a:hover {
    background-color: #ddd;
}

/* Bootstrap 4 multi-level dropdown support */
.dropdown-submenu {
  position: relative;
}

.dropdown-submenu > .dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: -0.25rem;
}

.dropdown-submenu > a::after {
  content: "›";
  float: right;
  margin-left: .5rem;
}

/* Override Bootstrap's caret */
.dropdown-submenu > a.dropdown-toggle::after {
  border: none;
}

/* Keep submenu visible on hover (desktop) */
@media (min-width: 992px) {
  .dropdown-submenu:hover > .dropdown-menu {
    display: block;
  }
}

.arrow-down {
    margin-left: 5px;
    font-size: 10px;
}

input[type="checkbox"] {
    -webkit-appearance: checkbox; /* Force checkbox appearance in Safari */
    appearance: checkbox;
    cursor: pointer;
}

#editUserModal {
    display: none;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background-color: #fff;
    padding: 20px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

/* Dark overlay behind the modal */
#modalOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* Add background image to the container */
#reports-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive grid */
    gap: 20px;  /* Space between charts */
    /*background-image: url('/TMK_trailer_image_transparent.png'); /* Path to your background image 
    background-size: cover;  Ensures the image covers the entire container 
    background-position: center;  Center the image 
    background-repeat: no-repeat;  Prevent repeating the image */
    padding: 20px; /* Optional: Add padding to the container */
    position: relative; /* Ensures child elements are positioned correctly */
}

/* Ensure all canvas elements have a consistent size */
canvas {
    width: 100% !important;
    height: 400px !important; /* Set a consistent height */
    transition: height 0.3s ease, width 0.3s ease; /* Smooth transition for resizing */
    background-color: rgba(255, 255, 255, 0.8); /* Add a background color to make the charts stand out */
    border-radius: 8px; /* Optional: Round the corners of the chart backgrounds */
}

/* Add a frame (border) to each chart container */
.draggable {
    border: 2px solid #ccc; /* Gray border */
    border-radius: 8px;     /* Rounded corners */
    padding: 20px;          /* Space between the chart and the border */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Optional: Adds a subtle shadow */
    background-color: rgba(255, 255, 255, 0.9); /* Background color for the frame (slightly transparent) */
    position: relative;     /* Allows us to position the button inside */
}

/* Optional: Add hover effect */
.draggable:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); /* Darker shadow on hover */
}

/* View Data button */
.view-data-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    background-color: #146ef4;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Table for displaying data (initially hidden) */
.table-report {
    width: 100%;
    border-collapse: collapse;
    display: none; /* Hidden by default */
}

table th, table td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: left;
}


/* Add some margin and make the icon more prominent */
.toggle-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    width: 30px; /* Adjust size as needed */
    height: 30px;
    transition: opacity 0.3s ease;
}

/* Hover effect */
.toggle-icon:hover {
    color: #0b53b5; /* Darker shade on hover */
}

.export-icon {
    position: absolute;
    top: 10px;
    right: 50px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.export-icon:hover {
    opacity: 0.7;
}

.export-icon-relative {
    position: relative;
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

/* Commented out old button styles */
/* 
button, .btn {
    background-color: #146ef4;
    color: #ffffff;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    font-size: 10px;
    transition: background-color 0.3s;
}

button:hover, .btn:hover {
    background-color: #0f56c4; /* Slightly darker shade for hover effect 
}
*/

/* Buttons */
button, .btn {
    background-color: #e0e0e0 !important; /* Light grey background */
    color: #000000 !important; /* Black text */
    border: 1px solid #000000 !important; /* Black border */
    padding: 5px 8px;
    cursor: pointer;
    border-radius: 20px !important; /* More rounded corners */
    font-family: 'Poppins', sans-serif !important;
    font-size: 9px !important; /* Slightly smaller font */
    transition: background-color 0.3s, transform 0.2s;
}

button:hover, .btn:hover {
    background-color: #bcbcbc !important; /* Darker grey for hover */
    transform: scale(1.05);
}

.navbar-toggler {
    background-color: inherit !important;
    border: none !important;
    padding: .25rem .75rem !important;
    font-size: 1.25rem !important;
    line-height: 1 !important;
}

fieldset {
    border: 2px solid #ccc !important; /* Ajustar el grosor y color del borde */
    padding: 15px !important;
    margin-bottom: 20px !important;
    display: flex;
    flex-wrap: wrap; /* Allow wrapping for responsiveness */
    gap: 20px; /* Space between elements */
    border: 2px solid #ccc; /* Optional: Customize border */
    padding: 20px; /* Space inside the fieldset */
}

legend {
    font-weight: bold !important; /* Hacer el título más visible */
    font-size: 12px !important; /* Slightly smaller font */
    padding: 0 10px !important;    /* Añadir algo de espaciado alrededor del título */
}

.form-item-fieldset {
    flex: 1 1 calc(50% - 20px); /* Each item takes 50% width, minus gap */
    min-width: 200px; /* Optional: Ensure items don't get too small */
}

.parent-row {
    font-weight: bold;
    cursor: pointer;
    background-color: #f1f1f1;
}

.child-row {
    background-color: #fafafa;
    padding-left: 30px;
    display: none;
}

.child-row.visible {
    display: table-row;
}

/* Modal Styling */
.modal-taxes {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content-taxes {
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 30%;
}

.close-button-taxes {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover {
    color: #000;
}

.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
}

.modal.open {
  display: flex;
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto; /* 10% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.form-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two equal columns */
    grid-template-rows: auto auto auto; /* Rows adjust to content */
    gap: 20px; /* Space between grid items */
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 16px;
}

.form-item {
    display: flex;
    flex-direction: column;
}

.form-item label {
    margin-bottom: 5px;
    font-weight: bold;
}

.form-item input,
.form-item textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.full-width {
    grid-column: span 2; /* Span both columns */
}

/* Style for the button container */
.button-container {
    display: flex;
    justify-content: flex-end; /* Align button to the right */
    margin-top: 10px; /* Add some spacing above the button */
}

/* Specific styling for the two-column fieldset */
.two-column-fieldset {
    font-size:11px;
    display: grid; /* Use grid layout */
    grid-template-columns: 1fr 1fr 1fr; /* Two equal-width columns */
    gap: 20px; /* Space between rows and columns */
}

.two-column-fieldset .form-item {
    display: flex; /* Flexbox for label and input alignment */
    flex-direction: column; /* Keep label above the input */
}

/* Grid layout for the leg fieldset */
.leg-fieldset .form-grid {
    font-size:11px;
    display: grid; /* Use grid for layout */
    grid-template-columns: repeat(4, 1fr); /* Four equal-width columns */
    gap: 20px; /* Space between items */
}

/* Form item styles */
.leg-fieldset .form-item {
    font-size:11px;
    display: flex;
    flex-direction: column; /* Stack label and input */
}

/* Make the "Instructions" span the entire row */
.leg-fieldset .form-item.full-row {
    font-size:11px;
    grid-column: span 4; /* Span all 4 columns */
}

/* Container simply stacks each .item block vertically */
.leg-fieldset .itemsContainer {
  display: flex;
  flex-direction: column;
  grid-column: span 4;
  gap: 16px;            /* space between item rows */
  font-size: 11px;
}

/* Keep all item attributes, including Tarp and Stackable, on one row. */
.leg-fieldset .itemsContainer .item {
  display: grid;
  grid-column: span 4;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 20px;
  align-items: start;    /* if you want inputs/textareas top-aligned */
}

/* make the + / − buttons small and right-aligned */
.itemsContainer .item .actions {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  gap: 4px;
}
.itemsContainer .item .actions button {
  width: 24px;
  height: 24px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
  text-align: center;
  background: none;
  border: 1px solid #888;
  border-radius: 4px;
  cursor: pointer;
}
.itemsContainer .item .actions button:hover {
  background: #eee;
}


/* Grid layout for the leg fieldset 3 columns */
.leg-fieldset-3 .form-grid {
    font-size:11px;
    display: grid; /* Use grid for layout */
    grid-template-columns: repeat(3, 1fr); /* Four equal-width columns */
    gap: 20px; /* Space between items */
}

/* Form item styles */
.leg-fieldset-3 .form-item {
    font-size:11px;
    display: flex;
    flex-direction: column; /* Stack label and input */
}

/* Make the "Instructions" span the entire row */
.leg-fieldset-3 .form-item.full-row {
    font-size:11px;
    grid-column: span 3; /* Span all 4 columns */
}

.container-taxes {
    background-color: #fff;
    margin-top: 5%;
    margin-right: auto;
    margin-left: auto;
    margin-bottom: 15%;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
}

/* nested legs panel */
.nested-legs-row td {
  padding: 0;
  background: #f9f9f9;
}
.nested-legs-table {
  width: 100%;
  border-collapse: collapse;
  margin: .5em 0;
}
.nested-legs-table th,
.nested-legs-table td {
  border: 1px solid #ddd;
  padding: 4px 8px;
  font-size: .9em;
}
.nested-legs-table select {
  width: 100%;
}
/* pending: light grey */
.nested-legs-table tr[data-status="pending"] {
  background-color: #f0f0f0 !important;
}
/* pickup: light cyan */
.nested-legs-table tr[data-status="pickup"] {
  background-color: #e0f7fa !important;
}
/* in transit: light yellow */
.nested-legs-table tr[data-status="in_transit"] {
  background-color: #fff9c4 !important;
}
/* drop complete: light green */
.nested-legs-table tr[data-status="drop_complete"] {
  background-color: #c8e6c9 !important;
}
.nested-legs-table tr.status-pending    td { background-color: #f8d7da !important; }
.nested-legs-table tr.status-pickup     td { background-color: #e0f7fa !important; }
.nested-legs-table tr.status-in_transit td { background-color: #fff9c4 !important; }
.nested-legs-table tr.status-drop_complete td { background-color: #c8e6c9 !important; }

/* default row style */
.dashboard-card tbody tr {
  transition: background-color 0.3s;
}

/* pending: light yellow */
.status-pending {
  background-color: #f8d7da;
}

/* pickup: light cyan */
.status-pickup {
  background-color: #e0f7fa;
}

/* in_transit: light orange */
.status-in_transit {
  background-color: #fff9c4;
}

/* drop_complete: light green */
.status-drop_complete {
  background-color: #c8e6c9;
}

.date-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.date-filter input[type="date"] {
  padding: 0.4rem;
  font-family: 'Poppins', sans-serif;
}

/* in your main stylesheet (or a <style> block) */
#ratingModal .modal-content {
  width: 300px !important;
  max-width: 20% !important;
  padding: 1rem !important;
  border-radius: 8px !important;
}
#ratingModal .modal {
  align-items: center !important;
  justify-content: center !important;
}

/* place AFTER any zebra-striping rules */
.dashboard-card table tbody tr.status-unassigned > td { background-color: #fff9c4 !important; }
.dashboard-card table tbody tr.status-pickup > td     { background-color: #e0f7fa !important; }
.dashboard-card table tbody tr.status-in_transit > td { background-color: #fff3e0 !important; }
.dashboard-card table tbody tr.status-drop_complete > td { background-color: #e8f5e9 !important; }
.dashboard-card table tbody tr.status-pending > td    { background-color: #f3e5f5 !important; }

.report-header .filters { display:flex; flex-wrap:wrap; gap:.5rem; align-items:end; }
.cards { display:flex; gap:.5rem; margin:.5rem 0 1rem; }
.card { background:#f6f7fb; border-radius:8px; padding:.5rem .75rem; }
.modal-pendingInvoices { display:none; position:fixed; inset:0; background:rgba(0,0,0,.45); align-items:center; justify-content:center; }
.modal-pendingInvoices.open { display:flex; }
.modal-pendingInvoices .modal-pendingInvoices-content { background:#fff; border-radius:10px; padding:16px 20px; min-width:300px; position:relative; }
.modal-pendingInvoices-close { position:absolute; top:8px; right:12px; cursor:pointer; font-size:1.3rem; }

.btn.btn-save-dt, .btn.btn-cancel-dt {
  padding: 2px 8px;
  font-size: 0.75rem;
  border-radius: 4px;
}

  /* Backdrop */
  #pay-modal-backdrop {
    position: fixed !important;
    inset: 0;
    background: rgba(0,0,0,.35);
    display: none;                 /* JS toggles to flex */
    align-items: center !important;         /* center modal vertically */
    justify-content: center;       /* center modal horizontally */
    z-index: 9999;
  }
  
  #pay-modal-backdrop.open{
  display: flex;
}

  /* Modal card */
  #pay-modal-backdrop .modal {
    display: flex !important;     /* avoid any global .modal { display:none } */
    flex-direction: column; 
    position: relative !important; /* stop inheriting fixed/left/top from global */
  left: auto !important;
  top: auto !important;
    width: 820px;
    max-width: 95vw;
    max-height: 90vh;   
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,.25);
  }

  /* Sections to match TMK style */
  #pay-modal-backdrop header {
    background: #f5f8ff;
    padding: 12px 16px;
    border-bottom: 1px solid #e3eafc;
  }
  #pay-modal-backdrop .content {
    padding: 16px;
    background: #fff;
    overflow-y: auto !important;                /* ✅ key */
    flex: 1;  
  }
  #pay-modal-backdrop footer {
    padding: 12px 16px;
    background: #fafafa;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
  }
  
  /* Utilities reused here (if not already present globally) */
  #pay-modal-backdrop .table-wrap { 
      overflow: auto; 
      border-radius: 10px; 
      border: 1px solid #e9eefb; 
      max-height: 480px;   /* adjust */
      overflow-y: auto;
  }
  #pay-modal-backdrop table { width: 100%; border-collapse: collapse; }
  #pay-modal-backdrop thead { background: #146ef4; color: #fff; }
  #pay-modal-backdrop th, #pay-modal-backdrop td { padding: 10px 12px; font-size: 13px; text-align: left; }
  #pay-modal-backdrop .right { text-align: right; }
  #pay-modal-backdrop .muted { color: #9d9d9c; }

  /* Simple grids (if the page doesn’t already define them) */
  #pay-modal-backdrop .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  #pay-modal-backdrop .grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

  
  
   #payhist-modal-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,.35);
    display: none; align-items: center; justify-content: center; z-index: 9999;
  }
  #payhist-modal-backdrop .modal {
    width: 900px; max-width: 95vw; background:#fff; border-radius:12px;
    overflow:hidden; box-shadow:0 10px 40px rgba(0,0,0,.25);
  }
  #payhist-modal-backdrop header {
    background:#f5f8ff; padding:12px 16px; border-bottom:1px solid #e3eafc;
  }
  #payhist-modal-backdrop .content { padding:16px; }
  #payhist-modal-backdrop footer {
    padding:12px 16px; background:#fafafa; border-top:1px solid #eee; display:flex; justify-content:flex-end; gap:8px;
  }
  #payhist-modal-backdrop .table-wrap { overflow:auto; border-radius:10px; border:1px solid #e9eefb; }
  #payhist-modal-backdrop table { width:100%; border-collapse:collapse; }
  #payhist-modal-backdrop thead { background:#146ef4; color:#fff; }
  #payhist-modal-backdrop th, #payhist-modal-backdrop td { padding:10px 12px; font-size:13px; text-align:left; }
  #payhist-modal-backdrop .right { text-align:right; }
  
  /* Payment History: make the INNER modal a white card (not the overlay) */
#payhist-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: none;                 /* JS sets to flex */
  align-items: center;
  justify-content: center;
  z-index: 10000;                /* above the attendance widget (9999) */
}
#payhist-modal-backdrop .modal {
  display: block !important;     /* override global `.modal { display:none }` */
  position: relative !important; /* stop inheriting fixed/left/top from global */
  left: auto !important;
  top: auto !important;
  width: 900px;
  max-width: 95vw;
  height: auto;
  margin: 0;
  background: #fff !important;   /* ensure opaque card */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,.25);
}
#payhist-modal-backdrop header {
  background:#f5f8ff; padding:12px 16px; border-bottom:1px solid #e3eafc;
}
#payhist-modal-backdrop .content { padding:16px; }
#payhist-modal-backdrop footer {
  padding:12px 16px; background:#fafafa; border-top:1px solid #eee; display:flex; justify-content:flex-end; gap:8px;
}
tr[data-pid].is-voided td { color: #999; }
tr.is-voided td { color: #999; }

.totals-row td { background: #f2f2f2; font-weight: 700; }

.carrier-insurance-status {
  margin-top: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #92400e;
  display: none;
}

.carrier-insurance-status.is-warning {
  color: #b45309;
}

.carrier-insurance-status.is-critical {
  color: #b91c1c;
}

.carrier-blocked-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 3px;
  background: #b91c1c;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}

.repo-dialog-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 11000;
}

.repo-dialog {
  background: #fff;
  border-radius: 10px;
  padding: 24px;
  width: min(360px, 90vw);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}

.repo-dialog h3 {
  margin-top: 0;
  font-size: 1.1rem;
}

.repo-dialog p {
  margin-bottom: 1.2rem;
  color: #374151;
}

.repo-dialog-buttons {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.repo-btn {
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 600;
}

.repo-btn.primary {
  background: #2563eb;
  color: #fff;
}

.repo-btn.secondary {
  background: #dbeafe;
  color: #1d4ed8;
}

.repo-btn.ghost {
  background: transparent;
  color: #374151;
}

.compliance-reminder-menu-item {
  position: relative;
}

.compliance-reminder-toggle {
  display: block;
  margin: 0;
  padding: .5rem 1rem !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: rgba(255, 255, 255, .5) !important;
  cursor: pointer;
  font-family: inherit !important;
  font-size: 1rem !important;
  line-height: 1.5;
  text-align: left;
  transform: none !important;
}

.compliance-reminder-toggle:hover,
.compliance-reminder-toggle:focus {
  background: transparent !important;
  color: rgba(255, 255, 255, .75) !important;
  transform: none !important;
}

.compliance-reminder-bell {
  margin-right: 4px;
}

.compliance-reminder-toggle.has-overdue {
  color: #fff !important;
  background: #b91c1c !important;
  font-weight: 600;
  animation: compliance-reminder-pulse 1.8s ease-in-out infinite;
}

.compliance-reminder-toggle.has-due-soon {
  color: #fff !important;
  background: #b45309 !important;
  font-weight: 600;
}

.compliance-reminder-toggle.has-overdue:hover,
.compliance-reminder-toggle.has-overdue:focus,
.compliance-reminder-toggle.has-due-soon:hover,
.compliance-reminder-toggle.has-due-soon:focus {
  color: #fff !important;
}

.compliance-reminder-toggle.has-overdue .badge,
.compliance-reminder-toggle.has-due-soon .badge {
  color: #b91c1c;
  background: #fff;
}

@keyframes compliance-reminder-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
  50% { box-shadow: 0 0 0 5px rgba(220, 38, 38, .35); }
}

.compliance-reminder-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 12000;
  display: none;
  width: min(420px, calc(100vw - 24px));
  max-height: min(520px, calc(100vh - 120px));
  overflow-y: auto;
  color: #1f2937;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.25);
}

.compliance-reminder-panel.is-open {
  display: block;
}

.compliance-reminder-panel-header,
.compliance-reminder-panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
}

.compliance-reminder-panel-header {
  border-bottom: 1px solid #e2e8f0;
}

.compliance-reminder-panel-header button {
  border: 0;
  background: transparent;
  color: #475569;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.compliance-reminder-panel-footer {
  justify-content: flex-end;
  border-top: 1px solid #e2e8f0;
  font-size: 0.9rem;
}

.compliance-reminder-panel-body {
  padding: 8px 14px;
}

.compliance-reminder-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #edf2f7;
}

.compliance-reminder-item:last-child {
  border-bottom: 0;
}

.compliance-reminder-item strong,
.compliance-reminder-item span {
  display: block;
}

.compliance-reminder-item span,
.compliance-reminder-empty {
  margin: 3px 0 0;
  color: #64748b;
  font-size: 0.83rem;
}

.compliance-reminder-item.overdue strong,
.compliance-reminder-overdue {
  color: #b91c1c;
}

.compliance-reminder-item.overdue {
  margin: 0 -8px;
  padding: 10px 8px;
  background: #fef2f2;
}

.compliance-reminder-item.due_soon {
  margin: 0 -8px;
  padding: 10px 8px;
  background: #fffbeb;
}

.compliance-reminder-overdue {
  margin: 4px 0;
  font-size: 0.85rem;
  font-weight: 600;
}

.compliance-reminder-item-actions {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  white-space: nowrap;
  font-size: 0.85rem;
}

.compliance-reminder-dismiss {
  padding: 0;
  border: 0;
  color: #475569;
  background: transparent;
  cursor: pointer;
}

.compliance-reminder-toast {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 13000;
  display: none;
  width: min(380px, calc(100vw - 32px));
  padding: 16px;
  color: #7f1d1d;
  background: #fef2f2;
  border: 2px solid #dc2626;
  border-radius: 10px;
  box-shadow: 0 14px 30px rgba(127, 29, 29, .25);
}

.compliance-reminder-toast.is-visible {
  display: block;
}

.compliance-reminder-toast p {
  margin: 5px 0 12px;
  color: #991b1b;
  font-size: .9rem;
}

.compliance-reminder-toast-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  align-items: center;
}

.compliance-reminder-toast-actions a {
  color: #991b1b;
  font-weight: 700;
}

.compliance-reminder-toast-actions button {
  padding: 4px 8px;
  color: #7f1d1d !important;
  background: #fff !important;
  border: 1px solid #b91c1c !important;
  border-radius: 4px !important;
  font-size: .78rem !important;
  transform: none !important;
}

@media (max-width: 991px) {
  .compliance-reminder-panel {
    position: fixed;
    top: 74px;
    left: 12px;
  }
}
