/* =================================================================
   FONTS
   ================================================================= */
@font-face {
    font-family: 'Gotham';
    src: url(233885e97fcb0ee610c7.otf) format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Gotham';
    src: url(fc17dad74d12ae285167.otf) format('opentype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Gotham';
    src: url(566d9400ba4a26987a90.otf) format('opentype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Gotham';
    src: url(e36cb92b46ddc046dd6a.otf) format('opentype');
    font-weight: 500;
    font-style: normal;
}

/* =================================================================
   BASE STYLES
   ================================================================= */
body {
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url(77a7caa758690edf81c4.png) no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    padding: 0;
    margin: 0;
}

h2 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: #034EA2;
    font-weight: 700;
}

/* =================================================================
   HEADER STYLES
   ================================================================= */
.main-header {
    background-color: #034EA2;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 0.75rem 1.5rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: 0 auto;
    position: relative;
    padding: 15px 0;
}

.logo-container {
    display: flex;
    align-items: center;
    margin-left: 15px;
}

.logo {
    height: 36px;
    width: auto;
    margin-right: 0.5rem;
}

.logo-container h1 {
    color: #FFBC05;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0;
    letter-spacing: 1px;
}

.logo-underline {
    height: 4px;
    width: 120px;
    background: #FFBC05;
    border-radius: 4px;
    margin-top: 2px;
    margin-left: 0;
}

/* =================================================================
   MAIN CONTENT & CONTAINERS
   ================================================================= */
.main-content {
    padding: 20px;
}

.container-modal-narrow {
    max-width: 1105px;
    width: 100%;
    margin: 1rem auto;
}

.modal-xxxl {
    max-width: 95%;
    width: 95%;
    margin: 0.5rem auto;
}

.search-container {
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(3, 78, 162, 0.2);
    padding: 40px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* =================================================================
   MODAL STYLES
   ================================================================= */
.modal-xxl {
    max-width: 95%;
    width: 95%;
}

.modal-lg {
    max-width: 800px;
    width: 90%;
}

.modal-dialog-scrollable {
    max-height: 90vh;
}

.modal-content {
    display: flex;
    flex-direction: column;
    border: 2px solid #034EA2;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.modal-header {
    background: #034EA2;
    color: white;
    border-bottom: 2px solid #FFBC05;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header .btn-close {
    margin: 0;
    padding: 0.5rem;
    background: transparent url("data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23fff%27%3e%3cpath d=%27M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 1.414z%27/%3e%3c/svg%3e") center/1em auto no-repeat;
    transition: all 0.2s ease-in-out;
    filter: invert(1) brightness(2);
    opacity: 0.8;
}

.modal-header .btn-close:hover {
    transform: rotate(90deg);
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    opacity: 1;
}

.modal-title {
    font-weight: 700;
    color: #fff;
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.5;
}

.modal-body {
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.modal-footer {
    padding: 1rem;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.charge-input-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.2);
}

.wizard-input-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.2);
}

/* Disabled Next button hint */
#wizardNextBtn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    pointer-events: auto;
}

.wizard-btn-hint {
    display: block;
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.25rem;
    text-align: right;
    font-style: italic;
}

#wizardContainerTags.wizard-input-invalid {
    border: 1px solid #dc3545;
    border-radius: 0.25rem;
    padding: 0.25rem;
}

.modal-footer > * {
    margin: 0.25rem 0;
}

.btn-close {
    filter: invert(1);
}

/* Custom wider modal for wizard */
#newAncillaryRequestWizardModal.modal {
    overflow-y: hidden;
}

#newAncillaryRequestWizardModal .modal-dialog {
    max-width: 1600px;
    width: 95%;
    margin: 1.75rem auto;
}

#newAncillaryRequestWizardModal .modal-content {
    max-height: calc(100vh - 3.5rem);
    display: flex;
    flex-direction: column;
}

#newAncillaryRequestWizardModal .modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
}

#newAncillaryRequestWizardModal .modal-header,
#newAncillaryRequestWizardModal .modal-footer {
    flex-shrink: 0;
}

/* =================================================================
   NAVIGATION & TABS
   ================================================================= */
.nav-tabs {
    margin: 0;
    border: none;
    padding: 0 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 1.5rem;
}

.nav-tabs .nav-link {
    margin: 0;
    font-weight: 600;
    text-align: center;
    border-radius: 0;
    position: relative;
    transition: all 0.3s ease;
    color: #6c757d;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.75rem 1.25rem;
}

.nav-tabs .nav-link:hover {
    background-color: #f8f9fa;
    border-color: transparent;
    color: #FFBC05;
}

.nav-tabs .nav-link.active {
    color: #034EA2;
    background: transparent;
    border-bottom: 2px solid #FFBC05;
    font-weight: 700;
    position: relative;
}

.nav-tabs .nav-link.active:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 4px;
    background: #FFBC05;
    border-radius: 2px 2px 0 0;
}

.nav-tabs .nav-link:not(.active):hover {
    color: #034EA2;
    border-bottom-color: #dee2e6;
}

.nav-tabs .nav-item.show .nav-link,
.nav-tabs .nav-link.active {
    color: #034EA2;
    background-color: transparent;
    border-color: transparent;
    border-bottom: 2px solid #FFBC05;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    margin-left: 1.25rem;
    font-weight: 500;
    transition: opacity 0.2s ease;
    background: transparent;
    border: none;
    padding: 0;
}

.nav-link:hover {
    opacity: 0.8;
    color: #fff;
}

.nav-link:hover .pulse-badge {
    animation: none !important;
}

.tab-icon {
    margin-right: 5px;
}

.tab-content {
    padding: 1.5rem 0 0;
}

.tab-pane {
    height: 100%;
}

/* =================================================================
   FORM ELEMENTS
   ================================================================= */
.form-label {
    font-weight: 600;
    color: #034EA2;
    margin-bottom: 8px;
    display: block;
}

.form-select,
.form-control {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-select:focus,
.form-control:focus {
    border-color: #FFBC05;
    box-shadow: 0 0 0 0.25rem rgba(255, 188, 5, 0.25);
}

.input-group {
    margin-bottom: 1rem;
}

/* =================================================================
   BUTTONS
   ================================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-size: 14px;
    line-height: 1.5;
}

.btn-primary {
    background: #034EA2;
    color: #fff;
    border: 2px solid #034EA2;
    transition: all 0.2s ease-in-out;
}

.btn-primary:hover {
    background: #023b7a;
    border-color: #023b7a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(3, 78, 162, 0.2);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
    background: transparent;
    border: 2px solid #6c757d;
}

.btn-outline-secondary:hover {
    background: #f8f9fa;
    color: #034EA2;
    border-color: #034EA2;
    box-shadow: 0 4px 12px rgba(3, 78, 162, 0.1);
}

.btn-outline-secondary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-tertiary {
    background: #FFBC05;
    color: #1a1a1a;
    border: 2px solid #FFBC05;
    transition: all 0.2s ease-in-out;
}

.btn-tertiary:hover {
    background: #e8ab00;
    border-color: #e8ab00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 188, 5, 0.3);
}

.btn-tertiary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-lg {
    padding: 12px 30px;
    font-size: 16px;
    background: #FFBC05;
    color: #000;
    border: none;
}

.btn-lg:hover {
    background: #e6a904;
}

.btn-login {
    background-color: #FFBC05;
    color: #034EA2;
    border: none;
    border-radius: 0.3rem;
    padding: 0.4rem 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
    margin-left: 2rem;
}

.btn-login:hover {
    background-color: #e0a700;
    color: #012d61;
}

.btn-login-container {
    margin-right: 15px;
}

/* Button Spinner Styles */
.btn-spinner {
    position: relative;
    pointer-events: none;
}

.btn-spinner .spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.btn-spinner .btn-text {
    opacity: 0.6;
}

.btn-loading-gif {
    position: relative;
}

.btn-loading-gif::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: url(809bb18cb3c74d697477.gif) no-repeat center center;
    background-size: contain;
}

.btn-loading-gif .btn-text {
    margin-left: 30px;
}

/* =================================================================
   CONTAINER TAGS
   ================================================================= */
.container-tag {
    display: inline-flex;
    align-items: center;
    background: #034EA2;
    color: #fff;
    border-radius: 999px;
    padding: 4px 16px;
    margin: 0 4px 4px 0;
    font-size: 12px;
    font-weight: 600;
    box-shadow: none;
    border: none;
    min-width: 0;
    transition: background-color 0.15s ease-in-out;
}

.container-tag .remove-btn {
    background: none;
    border: none;
    margin-left: 8px;
    color: #fff;
    opacity: 0.7;
    font-size: 1.1em;
    padding: 0;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, opacity 0.15s;
}

.container-tag .remove-btn:hover {
    color: #fff;
    opacity: 1;
    background: rgba(0, 0, 0, 0.07);
}

.container-input-group {
    background: transparent;
    border-radius: 0;
    padding: 10px 0 8px;
    margin-top: 5px;
    border: none;
}

.container-count {
    font-weight: 600;
    font-size: 0.8rem;
    color: #6c757d;
}

.highlight-error {
    background-color: #dc3545 !important;
    color: white !important;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.5) !important;
    border: 2px solid #dc3545 !important;
}

/* Do not paint entire table rows red; rely on per-field invalid styling instead. */
#containerTable tbody tr.highlight-error,
#stackRunsTable tbody tr.highlight-error {
    background-color: transparent !important;
    color: inherit !important;
    box-shadow: none !important;
    border: none !important;
}

#containerTable tbody tr.highlight-error > td,
#stackRunsTable tbody tr.highlight-error > td {
    background-color: inherit !important;
    color: inherit !important;
    border-top-color: inherit !important;
    border-bottom-color: inherit !important;
}

#containerTable tbody tr.highlight-error > td.wizard-input-invalid,
#stackRunsTable tbody tr.highlight-error > td.wizard-input-invalid {
    background-color: rgba(220, 53, 69, 0.2) !important;
    border-left: 3px solid #dc3545 !important;
}

/* =================================================================
   DATATABLE STYLES
   ================================================================= */
.datatable-wrapper {
    padding: 1.5rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(3, 78, 162, 0.1);
}

.dataTables_wrapper .dataTables_filter input {
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 6px 12px;
    margin-left: 8px;
}

.dataTables_wrapper .dataTables_length select {
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 4px 8px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    color: #034EA2 !important;
    border: 1px solid #dee2e6;
    margin: 0 2px;
    border-radius: 4px;
    padding: 4px 10px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: #034EA2;
    color: #fff !important;
    border-color: #034EA2;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #e9ecef;
    color: #034EA2 !important;
}

table.dataTable td {
    font-size: 14px;
    font-weight: 400;
    padding: 2px;
}

#containerTable thead {
    background-color: #034EA2;
    color: white;
}

#containerTable thead th {
    padding: 0.25rem 0.4rem !important;
    font-size: 0.82rem;
}

#containerTable_wrapper .dataTables_length,
#containerTable_wrapper .dataTables_filter {
    margin-bottom: 4px;
}

#containerTable_wrapper .dataTables_info,
#containerTable_wrapper .dataTables_paginate {
    margin-top: 4px;
}

.dataTables_info {
    margin-top: 15px;
}

#recordedTempsTable_wrapper {
    padding: 0;
}

#recordedTempsTable thead th {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

/* CARS Admin Modal - Shipping Lines and Product Codes Tables */
#shippingLinesTable,
#productCodesTable {
    min-width: 1000px;
    width: 100% !important;
}

.dataTable thead th {
    width: auto !important;
}

.dataTables_length select.form-select {
    min-width: 70px;
    text-align: left;
    padding-right: 28px;
}

/* Editable cell styling */
#containerTable td.editable {
    position: relative;
    background-color: rgba(3, 78, 162, 0.05) !important;
    border-left: 3px solid rgba(3, 78, 162, 0.5) !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

#containerTable td.wizard-input-invalid {
    background-color: rgba(220, 53, 69, 0.2) !important;
    border-left: 3px solid #dc3545 !important;
}

/* Optional editable fields shouldn't carry the mandatory-field blue highlight at rest */
#containerTable td.editable.editable-optional {
    background-color: transparent !important;
    border-left: none !important;
}

#containerTable td.editable:hover {
    background-color: rgba(3, 78, 162, 0.1) !important;
}

#containerTable td.editable.editing {
    background-color: inherit !important;
    border-left: none !important;
    cursor: auto;
}

#containerTable td.editable.editing::after,
#containerTable td.editable.editing::before {
    display: none !important;
}

#containerTable td.editable::after {
    content: 'Click to edit';
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #034EA2;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 1000;
}

#containerTable td.editable:hover::after {
    opacity: 1;
    visibility: visible;
    top: -30px;
}

#containerTable td.editable::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 4px 4px 0 4px;
    border-style: solid;
    border-color: #034EA2 transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

#containerTable td.editable:hover::before {
    opacity: 1;
    visibility: visible;
    top: -10px;
}

/* Stack Runs Table styling */
#stackRunsTable thead {
    background-color: #034EA2;
    color: white;
}
#stackRunsTable_wrapper .dataTables_length,
#stackRunsTable_wrapper .dataTables_filter {
    margin-bottom: 15px;
}
#stackRunsTable tbody tr {
    cursor: pointer;
    transition: background-color 0.2s ease;
}
#stackRunsTable tbody tr:hover {
    background-color: rgba(3, 78, 162, 0.08) !important;
}
/* Row selection styling */
#stackRunsTable tbody tr.selected > * {
    background-color: rgba(3, 78, 162, 0.12) !important;
}
#stackRunsTable tbody tr.selected {
    box-shadow: inset 0 0 0 2px #FFBC05;
}
/* Add Row and Remove buttons styling in DataTable controls */
#stackRunsTable_wrapper .dataTables_length {
    display: inline-block;
}
#stackRunsTable_wrapper #addStackRunBtn {
    background-color: #034EA2;
    border-color: #034EA2;
    color: white;
    margin-left: 15px;
    border-radius: 0.25rem;
}
#stackRunsTable_wrapper #addStackRunBtn:hover {
    background-color: #023a7a;
    border-color: #023a7a;
}
#stackRunsTable_wrapper #removeStackRunBtn {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
    margin-left: 8px;
    border-radius: 0.25rem;
}
#stackRunsTable_wrapper #removeStackRunBtn:hover {
    background-color: #bb2d3b;
    border-color: #bb2d3b;
}
#stackRunsTable_wrapper #removeStackRunBtn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

#stackRunConfirmationModal .modal-body {
    min-height: auto !important;
    max-height: none !important;
}
#stackRunConfirmationModal .modal-content {
    overflow: visible !important;
}

/* Table row hover effects */
.table-row-hover {
    background-color: rgba(3, 78, 162, 0.1) !important;
}

#ancillaryRequestsTable th,
#ancillaryRequestsTable td {
    padding: 10px 14px !important;
}

#ancillaryRequestsTable tbody tr {
    transition: background-color 0.2s ease;
}

.user-row {
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.user-row:hover {
    background-color: rgba(3, 78, 162, 0.05) !important;
}

/* =================================================================
   CARS KANBAN STYLES
   ================================================================= */
.kanban-board-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.kanban-board-container::-webkit-scrollbar {
    display: none;
}

.kanban-column .card-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.5rem;
    min-height: 48px;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
    font-size: 0.8rem;
}

.kanban-column .card-header h6 {
    font-size: 0.8rem;
    letter-spacing: 0.01em;
}

.kanban-column .kanban-count {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 2.5rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-weight: 600;
    text-align: center;
}

.kanban-column {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.kanban-column > .card {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.kanban-column .kanban-cards-container {
    min-height: 1.5rem;
    flex: 1;
    overflow-y: auto;
    background-color: #f8f9fa;
    padding-bottom: 0.75rem;
    scrollbar-width: none;
}

.kanban-column .kanban-cards-container::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.kanban-card {
    cursor: grab;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.kanban-card.dragging {
    opacity: 0.6;
    transform: scale(0.98);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.kanban-card.kanban-card--recent {
    animation: kanbanCardPulse 0.45s ease;
}

.kanban-column.drop-target .kanban-cards-container {
    background: rgba(3, 78, 162, 0.08);
    border: 1px dashed rgba(3, 78, 162, 0.4);
}

.kanban-card-meta {
    font-size: 0.75rem;
    color: #6c757d;
}

.kanban-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #FFBC05;
    color: #1F2A37;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    isolation: isolate;
}

.kanban-avatar:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.kanban-avatar-tooltip {
    position: fixed;
    background: #034EA2;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -6px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 1200;
    left: -9999px;
    top: -9999px;
    visibility: hidden;
}

.kanban-avatar-tooltip.show {
    opacity: 1;
    transform: translate(-50%, 0);
    visibility: visible;
}

@keyframes kanbanCardPulse {
    0% { box-shadow: 0 0 0 0 rgba(3, 78, 162, 0.35); }
    100% { box-shadow: 0 0 0 12px rgba(3, 78, 162, 0); }
}   

/* =================================================================
   BADGES
   ================================================================= */
.badge {
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35em 0.65em;
}

.bg-purple {
    background-color: #7A2682;
    color: white;
}

.bg-success {
    background-color: #007934 !important;
}

.bg-info {
    background-color: #e9ecef !important;
}

.pulse-badge {
    animation: pulse 2s infinite;
}

.dropdown-item:hover .pulse-badge {
    animation: none !important;
}

/* =================================================================
   CARDS
   ================================================================= */
.card {
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

.card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1) !important;
}

.card-title {
    color: #034EA2;
    font-weight: 600;
    font-size: 1.1rem;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
}

.card-body {
    padding: 1rem;
}

.bg-light {
    background-color: #f8f9fa !important;
}

/* =================================================================
   CARD STYLES
   ================================================================= */
.card {
    border-radius: 12px;
    overflow: hidden;
}

.card-header {
    border-top-left-radius: 11px !important;
    border-top-right-radius: 11px !important;
}

/* =================================================================
   ALERTS
   ================================================================= */
.alert {
    border: none;
    border-radius: 10px;
}

.alert-success {
    background-color: #FFBC05;
    color: #212529;
    border-color: #FFBC05;
    border-radius: 8px;
    font-size: 1.1rem;
    padding: 12px 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.alert-dismissible .btn-close {
    padding: 0.5rem;
    background: transparent url("data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23000%27%3e%3cpath d=%27M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 1.414z%27/%3e%3c/svg%3e") center/1em auto no-repeat;
    opacity: 0.85;
    transition: all 0.2s ease-in-out;
}

.alert-dismissible .btn-close:hover {
    opacity: 0.75;
    transform: rotate(90deg);
}

/* =================================================================
   DETAIL LISTS
   ================================================================= */
.container-details-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 5px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    margin-bottom: 2px;
    border-bottom: 1px solid #f0f0f0;
}

.detail-label {
    font-weight: 500;
    color: #6c757d;
    font-size: 0.9rem;
}

.detail-value {
    font-weight: 600;
    color: #212529;
    text-align: right;
}

.vessel-details-list .detail-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.vessel-details-list .detail-item:last-child {
    border-bottom: 0;
}

.vessel-details-list .detail-label {
    color: #6c757d;
    font-weight: 500;
    flex: 1;
}

.vessel-details-list .detail-value {
    color: #212529;
    font-weight: 400;
    text-align: right;
    flex: 1;
}

.movement-times .detail-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.movement-times .detail-label {
    color: #6c757d;
    font-weight: 500;
    flex: 1;
}

.movement-times .detail-values {
    display: flex;
    justify-content: space-between;
    flex: 2;
    margin-left: 20px;
}

.movement-times .detail-value {
    color: #212529;
    font-weight: 400;
    text-align: right;
    width: 45%;
}

.vessel-additional-info .detail-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.vessel-additional-info .detail-label {
    color: #6c757d;
    font-weight: 500;
    flex: 1;
}

.vessel-additional-info .detail-value {
    color: #212529;
    font-weight: 400;
    text-align: right;
    flex: 1;
}

/* =================================================================
   NOTES STYLES
   ================================================================= */
.notes-timeline {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 15px;
    background-color: #f8f9fa;
}

.note-item {
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 0.25rem;
    background-color: white;
    border-left: 4px solid #034EA2;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.note-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.85rem;
}

.note-user {
    font-weight: 600;
    color: #034EA2;
}

.note-timestamp {
    color: #6c757d;
}

.note-content {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.875rem;
}

/* =================================================================
   DATE DISPLAY
   ================================================================= */
.date-display {
    line-height: 1.3;
}

.date-primary {
    font-weight: 500;
    color: #034EA2;
}

.date-secondary {
    font-size: 0.85rem;
}

/* =================================================================
   SUMMERNOTE EDITOR
   ================================================================= */
.message-cell {
    max-width: 300px;
    min-width: 200px;
}

.summernote-container {
    position: relative;
    min-height: 40px;
    cursor: pointer;
}

.summernote-preview {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    max-height: 4.5em;
}

.summernote-preview :first-child {
    margin-top: 0;
}

.summernote-preview :last-child {
    margin-bottom: 0;
}

.note-editor.note-frame {
    margin-bottom: 0;
    border: 1px solid #dee2e6;
    box-shadow: none;
}

/* =================================================================
   CHECKBOXES
   ================================================================= */
.vessel-approval-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    opacity: 1 !important;
    accent-color: #034EA2;
}

.vessel-approval-checkbox:checked {
    background-color: #034EA2;
    border-color: #034EA2;
}

.editable-checkbox input[type="checkbox"] {
    cursor: pointer;
}

/* =================================================================
   UTILITY CLASSES
   ================================================================= */
.rounded-circle.bg-primary {
    background-color: rgba(3, 78, 162, 0.1) !important;
}

.text-primary {
    color: #034EA2 !important;
}

.mb-3 {
    margin-bottom: 1.5rem !important;
}

.text-nowrap {
    white-space: nowrap !important;
}

/* Honeypot field - completely hidden from view */
.registration-website-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* =================================================================
   SEARCH & PREVIOUS SEARCHES
   ================================================================= */
#searchContainersBtn {
    background: #034EA2;
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
}

#searchContainersBtn:hover {
    background: #023b7a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#clearAllContainers,
#importContainersBtn {
    background: #fff;
    color: #6c757d;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

#clearAllContainers:hover,
#importContainersBtn:hover {
    color: #034EA2;
    border-color: #034EA2;
    background: #f8f9fa;
}

#addContainerBtn {
    background: #FFBC05;
    color: #000;
    border: none;
    transition: all 0.3s ease;
}

#addContainerBtn:hover {
    background: #e6a904;
    transform: translateY(-1px);
}

#previousSearchesCollapse {
    max-height: 400px;
    overflow-y: auto;
}

#previousVesselSearchesCollapse {
    max-height: 400px;
    overflow-y: auto;
}

#previousVesselSearchesAccordion .accordion-button:not(.collapsed) {
    background-color: #fff;
    color: #034EA2;
    box-shadow: none;
    border-bottom: 2px solid #FFBC05;
    position: sticky;
    top: 0;
    z-index: 10;
}

#previousVesselSearchesAccordion .accordion-button:focus {
    box-shadow: none;
    border-color: rgba(3, 78, 162, 0.1);
}

#previousVesselSearchesAccordion .accordion-item {
    border: 1px solid rgba(3, 78, 162, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

#previousVesselSearchesAccordion .accordion-body {
    padding: 0.5rem 1.25rem;
}

#previousVesselSearchesCollapse::-webkit-scrollbar {
    width: 6px;
}

#previousVesselSearchesCollapse::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#previousVesselSearchesCollapse::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

#previousVesselSearchesCollapse::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

#previousSearchesAccordion .accordion-button:not(.collapsed) {
    background-color: #fff;
    color: #034EA2;
    box-shadow: none;
    border-bottom: 2px solid #FFBC05;
    position: sticky;
    top: 0;
    z-index: 10;
}

#previousSearchesAccordion .accordion-button:focus {
    box-shadow: none;
    border-color: rgba(3, 78, 162, 0.1);
}

#previousSearchesAccordion .accordion-item {
    border: 1px solid rgba(3, 78, 162, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

#previousSearchesAccordion .accordion-body {
    padding: 0.5rem 1.25rem;
}

#previousSearchesCollapse::-webkit-scrollbar {
    width: 6px;
}

#previousSearchesCollapse::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#previousSearchesCollapse::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

#previousSearchesCollapse::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.previous-search-container {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin: 0.5rem 0;
    background: #f8f9fa;
    transition: all 0.2s ease;
}

.previous-search-container:hover {
    border-color: #034EA2;
    box-shadow: 0 2px 8px rgba(3, 78, 162, 0.1);
}

.previous-search-title {
    font-weight: 600;
    color: #034EA2;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.previous-search-datetime {
    font-size: 0.75rem;
    color: #7A2682;
    font-weight: normal;
}

.previous-search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}

.previous-search-tag {
    background: #FFBC05;
    color: #034EA2;
    border: none;
    border-radius: 20px;
    padding: 6px 15px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s;
    display: inline-block;
    text-decoration: underline;
}

.previous-search-tag:hover {
    background: #034EA2;
    color: #fff;
}

.previous-search-more {
    color: #7A2682;
    cursor: pointer;
    font-weight: 600;
    margin-left: 8px;
    display: inline-block;
}

.previous-search-more:hover {
    text-decoration: underline;
    color: #E87200;
}

.vessel-search-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.vessel-search-item:hover {
    border-color: #034EA2;
    background-color: #e9ecef;
}

.vessel-search-icon {
    color: #034EA2;
    font-size: 1.2rem;
    margin-right: 12px;
}

.vessel-search-details {
    flex-grow: 1;
}

.vessel-name {
    font-weight: 600;
    color: #034EA2;
    margin-bottom: 2px;
}

.vessel-terminal {
    font-size: 0.85rem;
    color: #6c757d;
}

.vessel-search-date {
    font-size: 0.8rem;
    color: #6c757d;
    text-align: right;
    white-space: nowrap;
    margin-left: 10px;
    line-height: 1.3;
}

.vessel-search-time {
    font-size: 0.75rem;
    color: #7A2682;
}

/* Ensure vessel details modal appears above vessel schedule modal */
#vesselModal {
  z-index: 1060 !important;
}

#vesselModal + .modal-backdrop {
  z-index: 1059 !important;
}

.sr-container {
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =================================================================
   STORAGE REQUEST STYLES
   ================================================================= */
.sr-card-title {
    font-size: 1.44rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sr-card-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.sr-vessel-icon {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
}

.sr-storage-icon {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    color: white;
}

.sr-info-grid {
    display: grid;
    gap: 16px;
}

.sr-info-label {
    font-weight: 600;
    color: #555;
    font-size: 0.95rem;
}

.sr-info-value {
    font-weight: 700;
    color: #333;
    font-size: 1rem;
}

.sr-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 40px;
    font-size: 0.65rem;
    font-weight: 600;
    color: white;
}

.sr-category-import {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
}

.sr-status-fcl {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    color: white;
}

.sr-financial-summary {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    border-radius: 16px;
    padding: 20px 24px 16px 24px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.sr-financial-title {
    font-size: 1.44rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.sr-financial-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 4px;
}

.sr-financial-item {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    padding: 12px 16px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.sr-financial-amount {
    font-size: 1.44rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.sr-amount-zero {
    color: #28a745;
}

.sr-financial-equation {
    font-size: 0.85rem;
    color: #333;
}

.sr-financial-label {
    font-size: 0.75rem;
    color: #666;
}

.sr-storage-days {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 3px solid #28a745;
}

.sr-highlight-zero {
    background: #28a745;
    color: white;
}

/* =================================================================
   VESSEL AUTOCOMPLETE
   ================================================================= */
.autocomplete-list {
    position: absolute;
    z-index: 1000;
    background: #fff;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    margin-top: 2px;
}

.autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.15s;
}

.autocomplete-item:hover {
    background: #f0f0f0;
}

/* =================================================================
   Announcements STYLES
   ================================================================= */

/* Make modal take up ~80% of viewport */
.modal-dialog-large {
    max-width: 80vw;
    width: 80vw;
    max-height: 80vh;
    margin: 10vh auto;
}

.modal-content-large {
    height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-body-scrollable {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
}

/* Ensure carousel container uses available space */
.carousel-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

#announcementsCarousel {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.carousel-inner {
    flex: 1;
    overflow-y: auto;
}

.carousel-item {
    height: 100%;
}

/* Ensure message content is scrollable if needed */
.message-content {
    max-height: 100%;
    overflow-y: auto;
    overflow-x: auto;
}

/* Make carousel controls fixed relative to viewport */
.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    position: fixed; /* Changed from default positioning */
    top: 50vh; /* Center vertically in viewport */
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    z-index: 1060; /* Higher z-index to stay above modal content */
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.7);
}

.carousel-control-prev {
    left: calc((100vw - 80vw) / 2 + 10px); /* Position relative to modal width */
}

.carousel-control-next {
    right: calc((100vw - 80vw) / 2 + 10px); /* Position relative to modal width */
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 24px;
    height: 24px;
    background-size: 100% 100%;
    filter: brightness(0) invert(1);
}

/* Alternative: Use Bootstrap icons instead of default arrows */
.carousel-control-prev-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23fff%27%3e%3cpath d=%27M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z%27/%3e%3c/svg%3e");
}

.carousel-control-next-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23fff%27%3e%3cpath d=%27M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z%27/%3e%3c/svg%3e");
}

/* Carousel indicators styling */
.carousel-indicators {
    margin-bottom: 1rem;
}

.carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.3);
    border: none;
}

.carousel-indicators .active {
    background-color: rgba(0, 0, 0, 0.7);
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .carousel-control-prev {
        left: 10px;
    }
    
    .carousel-control-next {
        right: 10px;
    }
}

/* =================================================================
   DASHBOARD STYLES
   ================================================================= */
.dashboard-terminal-row {
    border: 1px solid #e3e6f0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.dashboard-terminal-row:last-child {
    margin-bottom: 0;
}

.dashboard-terminal-header {
    background: #034EA2;
    color: white;
    padding: 6px 15px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.dashboard-terminal-content {
    display: flex;
    padding: 8px;
    gap: 12px;
    background: #f8f9fc;
}

.dashboard-vessels-container {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.dashboard-vessel-card {
    background: white;
    border: 1px solid #e3e6f0;
    border-radius: 6px;
    padding: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.dashboard-vessel-header {
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-vessel-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dashboard-vessel-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #212529;
    margin-bottom: 0;
}

.dashboard-vessel-berth {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(3, 78, 162, 0.5);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.dashboard-vessel-etc {
    font-size: 0.75rem;
    color: #6c757d;
}

.dashboard-vessel-progress {
    display: flex;
    justify-content: space-around;
    gap: 10px;
}

.dashboard-progress-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.dashboard-progress-circle {
    position: relative;
}

.dashboard-progress-label {
    font-size: 0.8rem;
    color: #495057;
    font-weight: 500;
}

.dashboard-turnaround-times {
    display: flex;
    flex-direction: column;
    min-width: 140px;
    background: white;
    border: 1px solid #e3e6f0;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.dashboard-turnaround-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    padding: 8px;
}

.dashboard-turnaround-item i {
    font-size: 1.2rem;
    color: #034EA2;
}

.dashboard-turnaround-label {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
    min-width: 35px;
}

.dashboard-turnaround-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.dashboard-unit {
    font-size: 0.7rem;
    font-weight: 400;
    color: #6c757d;
}

/* =================================================================
   ANIMATIONS
   ================================================================= */
@keyframes celebrate {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.1) rotate(-5deg);
    }
    75% {
        transform: scale(1.1) rotate(5deg);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}



/* =================================================================
   STORAGE ENQUIRY LAYOUT
   ================================================================= */
.sr-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.sr-header-left {
    flex: 1;
}

.sr-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sr-enquiry-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sr-pickup-date {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: pulse 2s infinite;
}

.sr-main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.sr-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.sr-right-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sr-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.sr-info-item:last-child {
    border-bottom: none;
}

/* =================================================================
   CONTACT US MODAL STYLES
   ================================================================= */
#contactUsModal a:hover {
    background: #e3f2fd !important;
    text-decoration: underline;
}

/* =================================================================
   VESSEL SCHEDULE MODAL STYLES
   ================================================================= */
vessel-schedule-modal .date-display {
    line-height: 1.3;
}

vessel-schedule-modal .date-primary {
    font-weight: 500;
    color: #034EA2;
}

vessel-schedule-modal .date-secondary {
    font-size: 0.85rem;
}

vessel-schedule-modal .timeline-container {
    border: 1px solid #e3e6f0;
    border-radius: 0.35rem;
    background: white;
}

vessel-schedule-modal .timeline-header {
    display: flex;
    border-bottom: 1px solid #e3e6f0;
    background-color: #f8f9fc;
    font-weight: 600;
}

vessel-schedule-modal .terminal-header,
vessel-schedule-modal .berth-name {
    width: 110px;
    padding: 0.28rem 0.6rem;
    font-size: 0.73rem;
    border-bottom: 1px solid #eaecf4;
    display: flex;
    align-items: center;
}

vessel-schedule-modal .time-slots {
    display: flex;
    flex: 1;
}

vessel-schedule-modal .time-slot {
    flex: 1;
    min-width: 75px;
    padding: 0.28rem 0.15rem;
    text-align: center;
    border-right: 1px solid #e3e6f0;
    font-size: 0.7rem;
    color: #5a5c69;
}

vessel-schedule-modal .terminal-group {
    border-bottom: 1px solid #e3e6f0;
}

vessel-schedule-modal .terminal-group:last-child {
    border-bottom: none;
}

vessel-schedule-modal .terminal-name {
    padding: 0.32rem 0.6rem;
    background-color: #f1f3f9;
    font-weight: 600;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
}

vessel-schedule-modal .berth-row {
    display: flex;
    border-top: 1px solid #e3e6f0;
}

vessel-schedule-modal .berth-row:first-child {
    border-top: none;
}

vessel-schedule-modal .time-line {
    flex: 1;
    position: relative;
    height: 38px;
    background: repeating-linear-gradient(
        90deg,
        #fff,
        #fff 74px,
        #f8f9fc 74px,
        #f8f9fc 75px
    );
}

vessel-schedule-modal .time-line-inner {
    position: relative;
    height: 100%;
    display: flex;
}

vessel-schedule-modal .day-cell {
    flex: 1;
    min-width: 75px;
    border-right: 1px solid #eaecf4;
}

vessel-schedule-modal .vessel-slot {
    position: absolute;
    top: 4px;
    bottom: 4px;
    border-radius: 2.5px;
    color: white;
    padding: 0.13rem 0.32rem;
    overflow: hidden;
    cursor: pointer;
    font-size: 0.68rem;
    transition: all 0.2s;
}

vessel-schedule-modal .vessel-slot:hover {
    box-shadow: 0 0.15rem 0.5rem rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

vessel-schedule-modal .vessel-name {
    font-weight: 600;
    font-size: 0.68rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

vessel-schedule-modal .vessel-time {
    font-size: 0.58rem;
    opacity: 0.9;
    white-space: nowrap;
}

/* Vessel popover custom styling */
vessel-schedule-modal .popover-vessel-details {
    font-size: 0.92rem;
    min-width: 220px;
    color: #222;
}

vessel-schedule-modal .popover {
    border: 2px solid #034EA2;
}

/* wider popover for vessel details */
vessel-schedule-modal .vessel-popover {
    max-width: 380px;
}

vessel-schedule-modal .popover-header {
    background: #FFBC05;
    color: #034EA2;
    font-weight: 600;
    font-size: 1rem;
}

vessel-schedule-modal .popover-body {
    padding: 0.75rem 1rem 0.75rem 1rem;
}

/* =================================================================
   CONTAINER DETAILS MODAL STYLES
   ================================================================= */

.container-details-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: start;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.detail-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-label {
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 500;
    flex-shrink: 0;
    margin-right: 12px;
}

.detail-value {
    color: #212529;
    font-size: 0.875rem;
    text-align: right;
    word-break: break-word;
}

#containerDetailsModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

#containerDetailsModal .card {
    transition: box-shadow 0.2s;
}

#containerDetailsModal .card:hover {
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.1) !important;
}

/* =================================================================
   MESSAGE MANAGEMENT MODAL STYLES
   ================================================================= */
/*
   message-management-modal #messagesTable {
    min-width: 1400px;
    width: 100% !important;
}
*/

/* Ensure header cells match content cells */
message-management-modal .dataTable thead th {
    width: auto !important;
}

/* Fix for dropdown arrow overlapping with text */
message-management-modal .dataTables_length select.form-select {
    min-width: 70px;
    text-align: left;
    padding-right: 28px;
}

/* =================================================================
   REPORTS MODAL STYLES
   ================================================================= */
reports-modal .date-inline {
    display: flex;
    align-items: center;
}

reports-modal .date-inline .date-primary {
    color: #034EA2;
    font-weight: 500;
}

reports-modal .date-inline .date-secondary {
    color: #6c757d;
    margin-left: 0.5rem;
}

/* =================================================================
   REPORT SCHEDULE WIZARD MODAL STYLES
   ================================================================= */
report-schedule-wizard-modal .modal-dialog {
    max-width: 1100px;
    width: 95%;
    margin: 1.75rem auto;
}

/* Fixed height for modal content */
report-schedule-wizard-modal .report-schedule-wizard-modal-content {
    height: 750px;
    min-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Calendar styling */
report-schedule-wizard-modal .calendar-grid {
    max-width: 400px;
}

report-schedule-wizard-modal .calendar-day {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    margin: 2px;
    cursor: pointer;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    font-weight: 500;
}

report-schedule-wizard-modal .calendar-day.selected {
    background-color: #034EA2 !important;
    color: white !important;
    border-color: #034EA2 !important;
    z-index: 1;
    position: relative;
}

report-schedule-wizard-modal .btn-group .btn-outline-secondary {
    transition: none !important;
    transform: none !important;
    box-shadow: none !important;
}

report-schedule-wizard-modal .btn-group .btn-outline-secondary:hover {
    background-color: transparent;
    border-color: #6c757d;
    color: #6c757d;
}

report-schedule-wizard-modal .calendar-day:hover:not(.selected):not(.invisible) {
    background-color: #e9ecef;
    border-color: #ced4da;
}

/* Wizard styling */
report-schedule-wizard-modal .wizard-nav {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

report-schedule-wizard-modal .wizard-nav .nav-link {
    border: none;
    border-radius: 0;
    padding: 1rem 1.5rem;
    color: #6c757d;
    position: relative;
}

report-schedule-wizard-modal .wizard-nav .nav-link.active {
    color: #034EA2;
    font-weight: 600;
    background-color: transparent;
}

report-schedule-wizard-modal .wizard-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background-color: #034EA2;
}

report-schedule-wizard-modal .wizard-step {
    display: none;
    padding: 1.5rem;
}

report-schedule-wizard-modal .wizard-step.active {
    display: block;
}

report-schedule-wizard-modal .wizard-footer {
    border-top: 1px solid #dee2e6;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
}

report-schedule-wizard-modal .wizard-footer .btn-group {
    display: flex;
    gap: 0.5rem;
}

report-schedule-wizard-modal .wizard-footer .btn {
    border-radius: 0.375rem;
}

report-schedule-wizard-modal #wizardFinishBtn {
    display: none;
}

/* =================================================================
   NEW MESSAGE MODAL STYLES
   ================================================================= */
new-message-modal .note-editor .note-toolbar {
    background-color: #f8f9fa;
}

new-message-modal .note-editor .note-editing-area {
    background-color: white;
}

new-message-modal .note-editor.note-frame {
    width: 100% !important;
}

/* =================================================================
   NEW USER MODAL STYLES
   ================================================================= */
new-user-modal .form-check-input {
    width: 1.25em;
    height: 1.25em;
    margin-top: 0.15em;
}

new-user-modal .form-check-label {
    margin-left: 0.35em;
}

new-user-modal .text-danger {
    color: #dc3545;
}

new-user-modal .d-none {
    display: none !important;
}

/* =================================================================
   EMPTY RECEIVALS PROGRESS BAR STYLES
   ================================================================= */

.progress-cell {
    position: relative;
    padding: 8px !important;
    min-height: 45px;
}

.progress-bar-container {
    position: relative;
    width: 100%;
    height: calc(100% - 16px);
    min-height: 29px;
    background: #d0d4d9;
    border-radius: 4px;
    overflow: hidden;
}

.progress-background {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #034EA2 0%, #0562c7 100%);
    transition: width 0.3s ease;
}

.received-number {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.95rem;
    z-index: 2;
    pointer-events: none;
}

.received-number-dark {
    color: #333;
}

.received-number-light {
    color: #fff;
    clip-path: inset(0 0 0 0);
}

/* =================================================================
   RESPONSIVE STYLES
   ================================================================= */
@media (max-width: 768px) {
    .search-container {
        padding: 25px 20px;
    }
    
    .nav-tabs .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .sr-main-content {
        grid-template-columns: 1fr;
    }
    
    .sr-right-column {
        flex-direction: column;
    }
    
    .sr-header {
        flex-direction: column;
        text-align: center;
    }
    
    .sr-header-right {
        margin-top: 20px;
    }
    
    .sr-pickup-date {
        animation: none;
    }
}


/* =================================================================
   SELECTION STYLES
   ================================================================= */
/* Normalise copied text colour for Word paste */
::selection {
    color: #000000;
    background-color: #b3d9ff;
}

::-moz-selection {
    color: #000000;
    background-color: #b3d9ff;
}

.badge::selection,
.badge *::selection {
    color: #000000;
    background-color: #b3d9ff;
}

#containerHistoryDropdown, #vesselHistoryDropdown {
    border-color: #e9ecef !important;
}

#containerHistoryDropdown:hover, #vesselHistoryDropdown:hover {
    border-color: #e9ecef !important;
}

/* =================================================================
   CARS REQUEST ROW HOVER TOOLTIP
   ================================================================= */
#carsRequestTooltip {
    position: fixed;
    z-index: 99999;
    pointer-events: none;
    background: #ffffff;
    border: 2px solid #034EA2;
    border-radius: 12px;
    padding: 14px 16px 14px 24px;
    min-width: 340px;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(3, 78, 162, 0.18), 0 2px 8px rgba(0, 0, 0, 0.10);
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: none;
    overflow: hidden;
}

#carsRequestTooltip .cars-tooltip-accent {
    position: absolute;
    left: 6px;
    top: 12px;
    bottom: 12px;
    width: 5px;
    background-color: #034EA2;
    border-radius: 3px;
}

#carsRequestTooltip .cars-tooltip-title {
    font-size: 14px;
    font-weight: 700;
    color: #034EA2;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.01em;
}

#carsRequestTooltip .cars-tooltip-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3px 14px;
    align-items: baseline;
}

#carsRequestTooltip .cars-tooltip-label {
    font-size: 10px;
    font-weight: 400;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    padding-top: 1px;
}

#carsRequestTooltip .cars-tooltip-value {
    font-size: 12px;
    font-weight: 600;
    color: #034EA2;
    word-break: break-word;
    line-height: 1.4;
}

#carsRequestTooltip .cars-tooltip-divider {
    grid-column: 1 / -1;
    border: none;
    border-top: 1px solid rgba(3, 78, 162, 0.12);
    margin: 5px 0;
}

#carsRequestTooltip .cars-tooltip-status-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 1px 8px;
    border-radius: 10px;
    line-height: 1.6;
}



/* Empty Receivals - Audit Changes column */
.ers-change-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.ers-change-row {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.55rem;
    border-radius: 10px;
    background: rgba(3, 78, 162, 0.08);
    border: 1px solid rgba(3, 78, 162, 0.12);
    width: auto;
}
.ers-change-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #034EA2;
    flex: 0 0 auto;
}
.ers-change-value {
    font-family: 'Gotham', 'Segoe UI', sans-serif;
    font-size: 0.82rem;
    word-break: break-word;
}
.ers-change-value.from {
    color: #7A2682;
}
.ers-change-value.to {
    color: #007934;
    font-weight: 600;
}
.ers-change-arrow {
    color: #E87200;
    font-size: 1rem;
}


/* Empty Receivals - Audit & Events table row padding */
#auditEventsTable td,
#emptyReceivalsEventsTable td {
    padding: 10px 8px;
}


/* Empty Receivals - Audit Changes column */
.ers-change-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.ers-change-row {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.55rem;
    border-radius: 10px;
    background: rgba(3, 78, 162, 0.08);
    border: 1px solid rgba(3, 78, 162, 0.12);
    width: auto;
}
.ers-change-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #034EA2;
    flex: 0 0 auto;
}
.ers-change-value {
    font-family: 'Gotham', 'Segoe UI', sans-serif;
    font-size: 0.82rem;
    word-break: break-word;
}
.ers-change-value.from {
    color: #7A2682;
}
.ers-change-value.to {
    color: #007934;
    font-weight: 600;
}
.ers-change-arrow {
    color: #E87200;
    font-size: 1rem;
}

/* Empty Receivals - Audit & Events table row padding */
#auditEventsTable td,
#emptyReceivalsEventsTable td {
    padding: 10px 8px;
}


/* Empty Receivals - Keep pagination visible without scrolling */
#emptyReceivalsSummaryModal .dataTables_wrapper {
    display: flex;
    flex-direction: column;
    max-height: 65vh;
}
#emptyReceivalsSummaryModal .dataTables_wrapper > .row:nth-child(2) {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

