/* Bootstrap variable overrides - Updated: 2024 */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700&display=swap');

:root {
    --bs-primary: #1a237e;
    --bs-primary-rgb: 26,35,126;
    --bs-success: #198754;
    --bs-success-rgb: 25,135,84;
    --bs-border-radius: 0;
    --bs-card-bg: #fff;
    --bs-card-border-color: #e3e6f0;
    --bs-body-bg: #f8f9fa;
    --bs-body-color: #222;
}

body, html {
    font-family: 'Segoe UI', 'Roboto', 'Arial', sans-serif;
    font-size: 1.08rem;
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Page wrapper for proper flex layout */
.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

/* Ensure main content takes available space */
#main-content {
    flex: 1 0 auto;
    min-height: 0; /* Allow content to determine height */
    padding-bottom: 80px; /* Add space for footer */
}

.skip-link {
    position: absolute;
    left: -999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: 1000;
}
.skip-link:focus {
    left: 1rem;
    top: 1rem;
    width: auto;
    height: auto;
    background: #007bff;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    outline: 2px solid #0056b3;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Segoe UI', 'Roboto', 'Arial', sans-serif;
    font-weight: 700;
    margin-top: 1.2rem;
    margin-bottom: 0.7rem;
}

p, ul, ol {
    margin-bottom: 1.1rem;
    line-height: 1.7;
}

.btn {
    font-size: 1.08rem;
    font-weight: 600;
    border-radius: 0;
    padding: 0.5rem 1.5rem;
    transition: background 0.2s, color 0.2s, border 0.2s;
}

.btn-outline-light {
    background: transparent;
    color: #eaeaea;
    border: 2px solid #eaeaea;
}
.btn-outline-light:hover, .btn-outline-light:focus {
    background: #eaeaea;
    color: #222;
}

.btn-primary {
    background: var(--bs-primary);
    border: none;
    color: #fff;
}
.btn-primary:hover, .btn-primary:focus {
    background: #0d133d;
    color: #fff;
}

.btn-success {
    background: var(--bs-success);
    border: none;
    color: #fff;
}
.btn-success:hover, .btn-success:focus {
    background: #145c32;
    color: #fff;
}

.btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html, body {
    height: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background:
        linear-gradient(to bottom, rgba(255,255,255,0) 85%, #f8f9fa 100%),
        url('../Image/background.png') center center / cover no-repeat;
    background-attachment: fixed;
    background-color: transparent;
    display: flex;
    flex-direction: column;
}

body {
    flex: 1 0 auto;
    background: transparent !important;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.tile-container {
    box-shadow: 0 4px 8px rgba(128, 128, 128, 0.5); /* Gray drop shadow */
    border: 1px solid rgba(128, 128, 128, 0.5); /* Gray border */
    border-radius: 10px; /* Rounded corners */
    padding: 20px; /* Add padding inside the container */
    background-color: white; /* Ensure a white background for visibility */
}

.tile {
    width: 200px;
    height: 150px;
    border-radius: 10px;
    background-color: transparent;
    border: 1px solid #ccc;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Adjust shadow as needed */
    transition: box-shadow 0.3s ease; /* Optional: Add hover effect */
}

    .tile:hover {
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); /* Optional: Enhance shadow on hover */
    }

.nav-item {
    transition: transform 0.3s ease, background-color 0.3s ease;
    color: darkgrey !important; /* Ensures the font color is applied */
    font-weight: bold;
}

    .nav-item:hover {
        transform: scale(1.05); /* Slightly enlarges the item */
        background-color: rgba(0, 0, 0, 0.1); /* Adds a subtle background color */
        border-radius: 10px; /* Adds rounded edges */
    }


.navigation-bar .nav-link {
    color: darkslategray !important; /* Override Bootstrap's default color */
    font-weight: bold;
    font-size:larger;
    font-size-adjust: inherit;
}


.button {
    width: 100%;
    padding: 10px;
    background-color: #343a40;
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
}

    .button:hover {
        background-color: #23272b;
    }

/* Enhanced input and button styles for modern look */
.form-container input[type="text"], .form-container input[type="date"] {
    margin: 0 10px 10px 0;
    padding: 12px 16px;
    font-size: 1rem;
    border: 1px solid #bdbdbd;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.07);
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fafbfc;
}
.form-container input[type="text"]:focus, .form-container input[type="date"]:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 2px #007bff33;
    outline: none;
}

.form-container button, .button, .blue-button, .green-button {
    margin: 0 10px 10px 0;
    padding: 12px 28px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
    cursor: pointer;
    letter-spacing: 0.5px;
}

.blue-button, .form-container .blue-button {
    background: linear-gradient(90deg, #007bff 60%, #0056b3 100%);
    color: #fff;
    width: 140px;
    min-width: 140px;
    max-width: 140px;
    text-align: center;
}
.blue-button:hover, .form-container .blue-button:hover {
    background: linear-gradient(90deg, #0056b3 60%, #007bff 100%);
    box-shadow: 0 4px 16px rgba(0,123,255,0.15);
    transform: translateY(-2px) scale(1.03);
}

.green-button, .form-container .green-button {
    background: linear-gradient(90deg, #28a745 60%, #218838 100%);
    color: #fff;
    width: 140px;
    min-width: 140px;
    max-width: 140px;
    text-align: center;
}
.green-button:hover, .form-container .green-button:hover {
    background: linear-gradient(90deg, #218838 60%, #28a745 100%);
    box-shadow: 0 4px 16px rgba(40,167,69,0.15);
    transform: translateY(-2px) scale(1.03);
}

.button, .form-container .button {
    background: linear-gradient(90deg, #343a40 60%, #23272b 100%);
    color: #fff;
}
.button:hover, .form-container .button:hover {
    background: linear-gradient(90deg, #23272b 60%, #343a40 100%);
    box-shadow: 0 4px 16px rgba(52,58,64,0.15);
    transform: translateY(-2px) scale(1.03);
}

/* Add spacing between form rows */
.form-container .form-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    margin-bottom: 12px;
    overflow-x: auto;
    align-items: center;
}
.form-container .form-row input {
    width: 140px !important;
    min-width: 140px !important;
    max-width: 140px !important;
    flex: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-container .form-row {
        flex-direction: column;
        gap: 8px;
    }
    .form-container input, .form-container button {
        width: 100%;
        margin-right: 0;
    }
}

.date-group {
    display: inline-flex;
    gap: 10px;
    align-items: center;
}

.form-container .form-row .blue-button,
.form-container .form-row .green-button {
    width: 140px !important;
    min-width: 140px !important;
    max-width: 140px !important;
    flex: none !important;
    text-align: center;
}

.content-wrapper {
    flex: 1;
    padding: 20px 40px; /* Reduced left/right padding from default */
    margin-bottom: 50px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.form-container .form-row input[name="paternalLastName"] {
    width: 170px !important;
    min-width: 170px !important;
    max-width: 170px !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    flex: none !important;
}

.form-container .form-row input[name="maternalLastName"] {
    width: 170px !important;
    min-width: 170px !important;
    max-width: 170px !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    flex: none !important;
}

.form-container .form-row input[name="amount"],
.form-container .form-row input[name="destination"] {
    width: 120px !important;
    min-width: 120px !important;
    max-width: 120px !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    flex: none !important;
}

.clear-button {
    background: linear-gradient(90deg, #ff8800 60%, #cc7000 100%);
    color: #fff;
    width: 130px !important;
    min-width: 130px !important;
    max-width: 130px !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(204, 112, 0, 0.10);
    font-weight: 600;
    font-size: 1.1rem;
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
    cursor: pointer;
    letter-spacing: 0.5px;
}
.clear-button:hover {
    background: linear-gradient(90deg, #cc7000 60%, #ff8800 100%);
    box-shadow: 0 4px 16px rgba(204, 112, 0, 0.15);
    transform: translateY(-2px) scale(1.03);
    color: #fff;
}

.add-note-align,
.add-note-align button,
.add-note-align input {
    width: 140px !important;
    min-width: 140px !important;
    max-width: 140px !important;
    display: block;
    margin-left: 0;
}

.add-note-align {
    margin-left: 0;
}

.below-insert-btns {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
    margin-left: 0;
    margin-top: 8px;
}

.button-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 140px;
    min-width: 140px;
    max-width: 140px;
}

.form-container .form-row input[name="firstName"] {
    width: 120px !important;
    min-width: 120px !important;
    max-width: 120px !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    flex: none !important;
}

.blue-button,
.green-button,
.clear-button,
#toggleNotesButton {
    width: 130px !important;
    min-width: 130px !important;
    max-width: 130px !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

#remittanceTable th {
    background: #f4f7fb !important;
    color: #1976d2 !important;
    font-weight: 700;
    font-size: 1.08rem;
    border-bottom: 3px solid #1976d2;
    letter-spacing: 0.5px;
}

#remittanceTable td, #remittanceTable th {
    padding: 8px 8px;
    vertical-align: middle;
}

.card {
    border-radius: var(--bs-border-radius);
    box-shadow: 0 4px 24px rgba(26,35,126,0.07), 0 1.5px 4px rgba(0,0,0,0.03);
    border: 1px solid var(--bs-card-border-color);
    background: var(--bs-card-bg);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid #e3e6f0;
    font-weight: 600;
    font-size: 1.3rem;
    color: var(--bs-primary);
}

.alert {
    border-radius: var(--bs-border-radius);
    box-shadow: 0 2px 8px rgba(26,35,126,0.06);
    font-size: 1.05rem;
}

input, select, textarea {
    border-radius: 5px;
    border: 1px solid #ced4da;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    margin-bottom: 1rem;
    width: 100%;
    box-sizing: border-box;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--bs-primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(26,35,126,0.15);
}

label {
    font-weight: 500;
    margin-bottom: 0.3rem;
    display: block;
}

.footer {
    background: #181a1b;
    color: #fff;
    text-align: center;
    padding: 1.2rem 0;
    font-size: 1rem;
    width: 100%;
    margin-top: auto;
}

@media (max-width: 991px) {
    .navbar-brand {
        font-size: 1.3rem;
    }
    .btn {
        font-size: 1rem;
        padding: 0.45rem 1.1rem;
    }
}

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

/* Remittance Table Professional Theme */
#remittanceTable {
    background: #f8fafc;
    border-radius: 0.7rem;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(26,35,126,0.08);
}
#remittanceTable th {
    background: linear-gradient(90deg, #1a237e 80%, #1976d2 100%);
    color: #fff;
    font-weight: 700;
    font-size: 1.08rem;
    border-bottom: 2px solid #1976d2;
    letter-spacing: 0.5px;
}
#remittanceTable td {
    background: #fff;
    border-bottom: 1px solid #e3e6f0;
    vertical-align: middle;
    font-size: 1.05rem;
    transition: background 0.2s;
}
#remittanceTable tbody tr:nth-child(even) td {
    background: #f0f4ff;
}
#remittanceTable tbody tr:hover td {
    background: #e3f2fd;
    color: #1a237e;
}

/* Selected row styling - maintains focus */
#remittanceTable tbody tr.selected td {
    background: #bbdefb !important;
    color: #1a237e !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

#remittanceTable tbody tr.selected:hover td {
    background: #bbdefb !important;
    color: #1a237e !important;
}

/* Override Bootstrap table-hover for selected rows */
#remittanceTable tbody tr.selected:hover td,
#remittanceTable tbody tr.selected td {
    background: #bbdefb !important;
    color: #1a237e !important;
}

/* Row selection animation */
@keyframes rowSelect {
    0% {
        transform: scale(1);
        background: #bbdefb;
    }
    50% {
        transform: scale(1.01);
        background: #e3f2fd;
    }
    100% {
        transform: scale(1);
        background: #bbdefb;
    }
}

#remittanceTable tfoot tr {
    background: #e8f5e9;
}
#remittanceTable tfoot td {
    font-weight: 700;
    color: #198754;
    border-top: 2px solid #1976d2;
    background: #e8f5e9;
}

/* Summary table total amount - prevent wrapping */
#summaryTable td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#summaryTable td:nth-child(4) {
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    font-weight: bold;
    font-size: 1.2rem;
    color: #1a237e;
    text-align: left;
}

/* Standard column widths for most columns */
#remittanceTable th:nth-child(5), /* Destination */
#remittanceTable td:nth-child(5),
#remittanceTable th:nth-child(9), /* Added By */
#remittanceTable td:nth-child(9),
#remittanceTable th:nth-child(10), /* Date Created */
#remittanceTable td:nth-child(10) {
    width: 130px;
    min-width: 130px;
    max-width: 130px;
}

/* Amount column - prevent awkward breaks */
#remittanceTable th:nth-child(4), /* Amount */
#remittanceTable td:nth-child(4) {
    width: 140px;
    min-width: 140px;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-right: none !important;
}

/* Remove any unwanted borders between columns */
#remittanceTable th,
#remittanceTable td {
    border-right: none !important;
    border-left: none !important;
}

#remittanceTable th:last-child,
#remittanceTable td:last-child {
    border-right: none !important;
}

/* Notes column - narrower */
#remittanceTable th:nth-child(11), /* Notes */
#remittanceTable td:nth-child(11) {
    width: 70px;
    min-width: 70px;
    max-width: 70px;
}

/* Sender name columns - individual widths */
#remittanceTable th:nth-child(1), /* First Name */
#remittanceTable td:nth-child(1) {
    width: 100px;
    min-width: 100px;
    max-width: 100px;
}

#remittanceTable th:nth-child(2), /* Paternal Last Name */
#remittanceTable td:nth-child(2) {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
}

#remittanceTable th:nth-child(3), /* Maternal Last Name */
#remittanceTable td:nth-child(3) {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
}

/* Individual recipient column widths */
#remittanceTable th:nth-child(6), /* Recipient First Name */
#remittanceTable td:nth-child(6) {
    width: 100px;
    min-width: 100px;
    max-width: 100px;
}

#remittanceTable th:nth-child(7), /* Recipient Paternal Last Name */
#remittanceTable td:nth-child(7) {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
}

#remittanceTable th:nth-child(8), /* Recipient Maternal Last Name */
#remittanceTable td:nth-child(8) {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
}

/* Improve header text readability - cleaner layout */
#remittanceTable th {
    padding: 12px 8px;
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    vertical-align: middle;
    height: auto;
    min-height: 50px;
    text-align: center;
}



/* Ensure table doesn't overflow horizontally */
#remittanceTable {
    table-layout: fixed;
    width: 100%;
    min-width: 800px;
    max-width: 95vw;
}

/* Table container with resize handle */
.table-container {
    position: relative;
    display: block;
    width: 100%;
    border: 2px solid #e3e6f0;
    border-radius: 8px;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    min-width: 800px;
    max-width: 100%;
    height: auto;
    min-height: auto;
    max-height: none;
    overflow-x: auto; /* Allow horizontal scroll if needed */
}

/* Ensure table takes full width of container */
.table-container .table-responsive {
    width: 100%;
    min-width: 100%;
}

.table-container table {
    width: 100%;
    min-width: 100%;
    table-layout: auto; /* Allow table to expand naturally */
}

/* Resize handle styling */
.resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    background: linear-gradient(-45deg, transparent 30%, #1a237e 30%, #1a237e 40%, transparent 40%, transparent 60%, #1a237e 60%, #1a237e 70%, transparent 70%);
    cursor: se-resize;
    border-radius: 0 0 8px 0;
    z-index: 1000;
}

/* Hover effect for resize handle */
.resize-handle:hover {
    background: linear-gradient(-45deg, transparent 30%, #1976d2 30%, #1976d2 40%, transparent 40%, transparent 60%, #1976d2 60%, #1976d2 70%, transparent 70%);
}

/* Resizing state */
.table-container.resizing {
    user-select: none;
    cursor: se-resize;
}

.table-container.resizing .table-responsive {
    overflow: hidden;
}

/* Add spacing between header columns */
#remittanceTable th {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

#remittanceTable th:last-child {
    border-right: none;
}

/* Improve header text spacing */
#remittanceTable th {
    word-spacing: 0.5px;
}

/* Smaller placeholder font size to prevent text cutoff */
.form-control::placeholder {
    font-size: 0.85rem;
    color: #ced4da;
    font-style: italic;
    opacity: 0.8;
}

/* Ensure consistent placeholder styling across all form inputs */
input::placeholder,
textarea::placeholder,
select::placeholder {
    font-size: 0.85rem;
    color: #ced4da;
    font-style: italic;
    opacity: 0.8;
}


.card.shadow-lg {
    background: #f4f7fb;
    border: 1px solid #e3e6f0;
    box-shadow: 0 6px 24px rgba(26,35,126,0.10);
}

/* Enhanced form styling for better contrast and futuristic look */
.card.shadow-sm {
    background: linear-gradient(135deg, #ffffff 2%, #f1f5f9 100%);
    border: 2px solid #cbd5e1;
    box-shadow: 
        0 8px 25px -5px rgba(0, 0, 0, 0.15),
        0 4px 10px -3px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card.shadow-sm:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 35px -8px rgba(0, 0, 0, 0.2),
        0 6px 15px -4px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.15);
}

/* Loading States and Animations */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
}

/* Button Enhancements */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:active {
    transform: scale(0.98);
}

/* Form Field Enhancements */
.form-control {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #e2e8f0;
}

.form-control:focus {
    border-color: #1a237e;
    box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1);
    transform: translateY(-1px);
}

.form-control.is-valid {
    border-color: #198754;
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.1);
}

.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

/* Modal Enhancements */
.modal.fade .modal-dialog {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(0.8);
}

.modal.show .modal-dialog {
    transform: scale(1);
}

.modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

/* Table Enhancements */
.table tbody tr {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.table tbody tr:hover {
    background-color: rgba(26, 35, 126, 0.05);
    transform: scale(1.01);
}

/* Success/Error Message Animations */
.alert {
    animation: slideInDown 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Shimmer Loading Effect */
.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Futuristic border glow effect */
.card.shadow-sm::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.1) 0%, 
        rgba(147, 51, 234, 0.1) 50%, 
        rgba(236, 72, 153, 0.1) 100%);
    border-radius: 16px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card.shadow-sm:hover::before {
    opacity: 1;
}

/* Enhanced form inputs for better contrast */
.form-control {
    background: #ffffff;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    box-shadow: 
        0 2px 8px 0 rgba(0, 0, 0, 0.12),
        0 1px 3px 0 rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.form-control:focus {
    background: #ffffff;
    border-color: #3b82f6;
    box-shadow: 
        0 0 0 3px rgba(59, 130, 246, 0.1),
        0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* High-specificity override for remittance table header - Deep Blue, White Text, No Rounded Corners */
table#remittanceTable > thead > tr > th {
    background: #1a237e !important;
    color: #fff !important;
    font-weight: 700;
    font-size: 1.08rem;
    border-bottom: none !important;
    letter-spacing: 0.5px;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    height: auto !important;
    min-height: 50px !important;
    padding: 12px 8px !important;
    line-height: 1.4 !important;
    text-align: center !important;
}

/* Sortable Headers Styling */
.sortable-header {
    position: relative;
    transition: all 0.2s ease;
    user-select: none;
}

.sortable-header:hover {
    background: #283593 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.sortable-header:active {
    transform: translateY(0);
}

.sort-indicator {
    display: inline-block;
    margin-left: 5px;
    font-size: 0.8rem;
    opacity: 0.7;
    transition: all 0.2s ease;
    position: relative;
}

/* Sort arrows */
.sortable-header.sort-asc .sort-indicator::after {
    content: "↑";
    color: #4caf50;
    font-weight: bold;
}

.sortable-header.sort-desc .sort-indicator::after {
    content: "↓";
    color: #f44336;
    font-weight: bold;
}

.sortable-header.sort-none .sort-indicator::after {
    content: "↕";
    color: rgba(255,255,255,0.5);
}

/* Tooltip styles for sort indicators - DISABLED */
/* .sort-indicator::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    z-index: 1000;
    pointer-events: none;
    margin-bottom: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.sort-indicator:hover::before {
    opacity: 1;
    visibility: visible;
} */

/* Active sort header styling */
.sortable-header.sort-asc,
.sortable-header.sort-desc {
    background: #283593 !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

/* Modern SaaS Navbar */
.custom-navbar {
    background: #000000 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border-bottom: 1.5px solid #111;
    min-height: 72px;
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
    border-radius: 0;
}
.custom-navbar .navbar-brand span {
    color: #fff !important;
    font-family: 'Segoe UI', 'Roboto', 'Arial', sans-serif;
    font-weight: 700;
    font-size: 2rem;
    letter-spacing: 1px;
}
.custom-navbar .nav-link {
    font-family: 'Montserrat', 'Segoe UI', 'Roboto', 'Arial', sans-serif !important;
    color: #e0e6ed !important;
    font-weight: 600;
    font-size: 1.18rem;
    letter-spacing: 0.04em;
    transition: color 0.2s;
    text-shadow: 0 1px 2px rgba(0,0,0,0.08);
    padding-left: 18px;
    padding-right: 18px;
    position: relative;
    text-decoration: none !important;
}

.custom-navbar .nav-link::after {
    content: '';
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 3px;
    background: linear-gradient(90deg, #4fc3f7 0%, #1976d2 100%);
    border-radius: 2px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.22s cubic-bezier(.4,0,.2,1), transform 0.22s cubic-bezier(.4,0,.2,1);
}

.custom-navbar .nav-link:hover::after,
.custom-navbar .nav-link.active::after {
    opacity: 1;
    transform: translateY(0);
}

.custom-navbar .nav-link:hover, .custom-navbar .nav-link.active {
    color: #4fc3f7 !important;
    text-shadow: none;
    text-decoration: none !important;
}

.custom-navbar .btn-outline-light {
    border: 2px solid #e0e6ed;
    color: #e0e6ed;
    background: transparent;
    transition: background 0.2s, color 0.2s;
}
.custom-navbar .btn-outline-light:hover {
    background: #e0e6ed;
    color: #23272b;
}
.custom-navbar .btn-primary {
    background: #1a237e;
    border: none;
    color: #fff;
    font-weight: 600;
}
.custom-navbar .btn-primary:hover {
    background: #1976d2;
    color: #fff;
}

/* Force remove all border-radius from navbar buttons */
.custom-navbar .btn,
.custom-navbar .btn-outline-light,
.custom-navbar .btn-primary,
.custom-navbar .btn:hover,
.custom-navbar .btn:focus,
.custom-navbar .btn:active,
.custom-navbar .btn-outline-light:hover,
.custom-navbar .btn-outline-light:focus,
.custom-navbar .btn-outline-light:active,
.custom-navbar .btn-primary:hover,
.custom-navbar .btn-primary:focus,
.custom-navbar .btn-primary:active {
    border-radius: 0 !important;
}

/* Force remove border-radius from navbar container */
.custom-navbar,
.custom-navbar .navbar,
.custom-navbar .navbar-nav,
.custom-navbar .navbar-brand {
    border-radius: 0 !important;
}

/* Override any inline styles that might be setting border-radius */
.custom-navbar *,
.custom-navbar .btn,
.custom-navbar .btn-outline-light,
.custom-navbar .btn-primary,
.custom-navbar .navbar-brand,
.custom-navbar .nav-link {
    border-radius: 0 !important;
}

/* Additional specificity to override Bootstrap and inline styles */
.navbar.custom-navbar .btn,
.navbar.custom-navbar .btn-outline-light,
.navbar.custom-navbar .btn-primary {
    border-radius: 0 !important;
}

/* Modern Footer */
.modern-footer {
    position: static !important;
    width: 100%;
    margin-top: auto;
    margin-bottom: 0 !important;
    padding-bottom: 0.5rem !important;
}
.footer-copyright {
    font-size: 1.08rem;
    font-weight: 500;
    color: #e0e6ed;
}
.footer-powered {
    color: #b0b8c1;
    font-size: 0.98rem;
    font-weight: 400;
    letter-spacing: 0.2px;
}

main#main-content {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
}

footer.footer {
    flex-shrink: 0;
    background: #222;
    color: #fff;
    width: 100%;
    margin-top: auto;
}



.btn-insert-blue {
    color: #fff !important;
    background-color: #0034f0 !important;
    border-color: #0034f0 !important;
}
.btn-insert-blue:hover, .btn-insert-blue:focus {
    background-color: #0029c2 !important;
    border-color: #0029c2 !important;
    color: #fff !important;
}
.card .btn-insert-blue, .form-container .btn-insert-blue {
    background-color: #0034f0 !important;
    border-color: #0034f0 !important;
    color: #fff !important;
}
.card .btn-insert-blue:hover, .form-container .btn-insert-blue:hover, .card .btn-insert-blue:focus, .form-container .btn-insert-blue:focus {
    background-color: #0029c2 !important;
    border-color: #0029c2 !important;
    color: #fff !important;
}

/* Modern Money Green Button */
.btn-money-green {
    background-color: #16c784 !important;
    color: #fff !important;
    border: none !important;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(22,199,132,0.08);
    transition: background 0.2s, box-shadow 0.2s;
}
.btn-money-green:hover, .btn-money-green:focus {
    background-color: #119e67 !important;
    color: #fff !important;
    box-shadow: 0 4px 16px rgba(22,199,132,0.16);
}

/* Modern Netflix Red Button */
.btn-danger-modern {
    background-color: #e50914 !important;
    color: #fff !important;
    border: none !important;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(229,9,20,0.08);
    transition: background 0.2s, box-shadow 0.2s;
}
.btn-danger-modern:hover, .btn-danger-modern:focus {
    background-color: #b00610 !important;
    color: #fff !important;
    box-shadow: 0 4px 16px rgba(229,9,20,0.16);
}

/* Dodger Blue Outline Button */
.btn-outline-insert-blue {
    background: #fff !important;
    color: #0034f0 !important;
    border: 2px solid #0034f0 !important;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,52,240,0.08);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.btn-outline-insert-blue:hover, .btn-outline-insert-blue:focus {
    background: #0034f0 !important;
    color: #fff !important;
    box-shadow: 0 4px 16px rgba(0,52,240,0.16);
}

/* Modern Black Button */
.btn-modern-black {
    background-color: #18191a !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(24,25,26,0.08);
    transition: background 0.2s, box-shadow 0.2s;
}
.btn-modern-black:hover, .btn-modern-black:focus {
    background-color: #232526 !important;
    color: #fff !important;
    box-shadow: 0 4px 16px rgba(24,25,26,0.16);
}

/* Modern Dodger Blue Button */
.btn-modern-blue {
    background-color: #0034f0 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,52,240,0.08);
    transition: background 0.2s, box-shadow 0.2s;
}
.btn-modern-blue:hover, .btn-modern-blue:focus {
    background-color: #0029c2 !important;
    color: #fff !important;
    box-shadow: 0 4px 16px rgba(0,52,240,0.16);
}

/* Modern Outline Button */
.btn-modern-outline {
    background: #fff !important;
    color: #18191a !important;
    border: 2px solid #18191a !important;
    border-radius: 8px !important;
    font-weight: 600;
    transition: background 0.2s, color 0.2s, border 0.2s;
}
.btn-modern-outline:hover, .btn-modern-outline:focus {
    background: #18191a !important;
    color: #fff !important;
    border: 2px solid #18191a !important;
    }


/* Action Buttons Tab (Mobile Only) */
.action-buttons-tab {
    position: absolute;
    top: -30px;
    left: 20px;
    display: flex;
    gap: 0.1rem;
    z-index: 10;
    animation: slideUp 0.3s ease-out;
}

.btn-action {
    padding: 0.4rem 0.6rem;
    border: none;
    border-radius: 5px 5px 0 0;
    font-weight: 600;
    font-size: 0.7rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.08);
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: 0.025em;
    border-bottom: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.btn-action::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-action:hover::before {
    left: 100%;
}

.btn-update {
    background: linear-gradient(135deg, #1a237e 0%, #1976d2 100%);
    color: #fff;
}

.btn-update:hover {
    background: linear-gradient(135deg, #0d47a1 0%, #1565c0 100%);
    transform: translateY(-1px);
    box-shadow: 0 -2px 6px rgba(26, 35, 126, 0.15);
}

.btn-delete {
    background: linear-gradient(135deg, #8b0000 0%, #b22222 100%);
    color: #fff;
}

.btn-delete:hover {
    background: linear-gradient(135deg, #6b0000 0%, #8b0000 100%);
    transform: translateY(-1px);
    box-shadow: 0 -2px 6px rgba(139, 0, 0, 0.15);
}

/* Slide up animation for action buttons tab */
@keyframes slideUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Table push-down animation when action buttons appear (Mobile Only) */
.card.shadow-lg.mb-4.w-100 {
    transition: margin-top 0.3s ease-out;
}

.card.shadow-lg.mb-4.w-100.with-action-buttons {
    margin-top: 40px;
}

/* Responsive Design - Show horizontal buttons on mobile, vertical tab on desktop */
@media (max-width: 768px) {
    /* Show horizontal action buttons on mobile */
    .action-buttons-tab {
        display: flex !important;
        left: 10px;
        gap: 0.05rem;
    }
    
    .btn-action {
        padding: 0.35rem 0.5rem;
        font-size: 0.65rem;
    }
    
    /* Hide vertical action tab on mobile */
    .vertical-action-tab {
        display: none !important;
    }
}

@media (min-width: 769px) {
    /* Hide horizontal action buttons on desktop */
    .action-buttons-tab {
        display: none !important;
    }
    
    /* Show vertical action tab on desktop */
    .vertical-action-tab {
        display: flex !important;
    }
}

/* Vertical Action Tab (Desktop Only) */
.vertical-action-tab {
    position: fixed; /* Use fixed positioning for better reliability */
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    z-index: 99999;
    animation: slideInRight 0.3s ease-out;
    pointer-events: auto;
    transform: translateZ(0); /* Force hardware acceleration */
}

/* Hide vertical action tab when needed */
.vertical-action-tab.hidden {
    display: none !important;
}

/* Ensure delete confirmation modal appears on top */
#deleteConfirmModal {
    z-index: 1060 !important;
}

#deleteConfirmModal .modal-backdrop {
    z-index: 1055 !important;
}

.btn-vertical {
    padding: 0.4rem 0.3rem;
    border: none;
    border-radius: 0 4px 4px 0;
    font-weight: 600;
    font-size: 0.65rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.08);
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: 0.025em;
    border-right: 2px solid transparent;
    position: relative;
    overflow: hidden;
    min-width: 40px;
    height: 67px;
}

.btn-vertical i {
    font-size: 1.2rem;
}



.btn-vertical::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-vertical:hover::before {
    left: 100%;
}

.btn-vertical.btn-update {
    background: linear-gradient(135deg, #1a237e 0%, #1976d2 100%);
    color: #fff;
}

.btn-vertical.btn-update:hover {
    background: linear-gradient(135deg, #0d47a1 0%, #1565c0 100%);
    transform: translateX(-1px);
    box-shadow: 0 -2px 6px rgba(26, 35, 126, 0.15);
}



/* Slide in from right animation */
@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    animation: fadeIn 0.3s ease-out;
    backdrop-filter: blur(2px);
}

.modal-content {
    background: #f4f7fb;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease-out;
    border: 1px solid #e9ecef;
}

.modal-header {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f4f7fb;
    border-radius: 12px 12px 0 0;
}

.modal-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #343a40;
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.btn-close:hover {
    background: #f8f9fa;
    color: #343a40;
}

.modal-body {
    padding: 1.5rem;
    background: #f4f7fb;
}

.modal-footer {
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    background: #f4f7fb;
    border-radius: 0 0 12px 12px;
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: transparent;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #ffffff;
    color: #495057;
}

.form-control:focus {
    border-color: #1a237e;
    box-shadow: 0 0 0 0.2rem rgba(26, 35, 126, 0.25);
    outline: none;
    background: #ffffff;
}

.form-control.is-invalid {
    border-color: #dc3545;
}

.invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Validation error styling */
.validation-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Edit modal validation error styling */
#editModal .validation-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Success message styling - elegant toaster */
.success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(40, 167, 69, 0.3);
    font-weight: 600;
    font-size: 0.95rem;
    z-index: 10000;
    transform: translateX(400px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    max-width: 350px;
    word-wrap: break-word;
}

.success-message.show {
    transform: translateX(0);
}

.success-message::before {
    content: '✓';
    margin-right: 0.5rem;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Animation for success message */
@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Modal Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive design for vertical action tab */
@media (max-width: 768px) {
    .btn-vertical {
        padding: 0.3rem 0.2rem;
        min-width: 35px;
        height: 52px;
    }
    
    .btn-vertical i {
        font-size: 1rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}

/* Legal Footer Styling */
.legal-footer {
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    font-size: 0.875rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000; /* Ensure footer appears above other content */
    backdrop-filter: blur(10px);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.legal-footer a:hover {
    color: #1e90ff !important;
    text-decoration: underline !important;
}

.legal-footer .text-muted {
    color: #6c757d !important;
}

/* Responsive footer adjustments */
@media (max-width: 768px) {
    .legal-footer {
        padding: 0.75rem 0;
        font-size: 0.8rem;
    }
    
    .legal-footer .row {
        text-align: center;
    }
    
    .legal-footer .col-md-4 {
        margin-bottom: 0.5rem;
    }
    
    .legal-footer .text-end {
        text-align: center !important;
    }
    
    #main-content {
        padding-bottom: 100px; /* More space on mobile */
    }
}

