:root {
    --color-primary: #0c2238;
    --color-primary-hover: #1a3a5c;
    --color-accent: #2D5B89;
    --color-danger: #dc2626;
    --color-danger-hover: #b91c1c;
    --color-surface: #ffffff;
    --color-bg: #f8f9fa;
    --color-border: #e2e8f0;
    --color-text: #1e293b;
    --color-text-muted: #64748b;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--color-text);
    background-color: #f0f4f8;
}

.tabs-container {
    background-color: #0c2238;
    border-bottom: 3px solid #CDE2F4;
    display: flex;
    align-items: center;
}

.ward-title {
    color: white;
    font-size: 20px;
    font-weight: bold;
    padding: 10px 20px;
    margin-right: auto;
}

/* Logout tab styling - inherits from tablinks but with red color */
.logout-tab {
    background-color: #d32f2f !important;
    margin-left: auto; /* Push logout to the right */
    display: flex;
    align-items: center;
    gap: 5px;
}

.logout-tab:hover {
    background-color: #b71c1c !important;
}

.logout-icon {
    font-size: 16px;
}

.logout-text {
    font-weight: 500;
}

/* Mobile logout styling */
.mobile-logout {
    background-color: #d32f2f !important;
    color: white !important;
    display: flex;
    align-items: center;
    gap: 5px;
    justify-content: center;
}

.mobile-logout:hover {
    background-color: #b71c1c !important;
}

/* Hide logout text on smaller screens for desktop tab */
@media (max-width: 768px) {
    .logout-text {
        display: none;
    }
    
    /* Show logout text in mobile dropdown */
    .mobile-logout .logout-text {
        display: inline;
    }
}

.desktop-tabs {
    display: flex;
    justify-content: center;
}

.tabs button, .desktop-tabs button {
    background-color: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    outline: none;
    cursor: pointer;
    padding: 12px 14px;
    margin-bottom: 0;
    transition: background-color 0.2s, border-color 0.2s;
    color: rgba(255,255,255,0.75);
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    white-space: nowrap;
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: relative;
}

.mobile-menu-btn {
    background-color: #0c2238;
    border: none;
    color: white;
    padding: 10px 10px;
    margin-bottom: 0;
    font-size: 16px;
    width: 100%;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hamburger-icon {
    font-size: 18px;
    margin-right: 10px;
}

.current-tab-text {
    flex: 1;
    text-align: center;
}

.mobile-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #0c2238;
    border-top: 1px solid #555;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.mobile-dropdown.show {
    display: block;
}

.mobile-tablink {
    background-color: #0c2238;
    border: none;
    color: white;
    padding: 16px 20px;
    font-size: 16px;
    width: 100%;
    text-align: left;
    cursor: pointer;
    border-bottom: 1px solid #555;
    transition: background-color 0.3s;
}



.mobile-tablink:last-child {
    border-bottom: none;
}

/* Show mobile nav on small screens */
@media (max-width: 768px) {
    .desktop-tabs {
        display: none;
    }
    
    .mobile-nav {
        display: block;
    }
}

.tabs button.active, .desktop-tabs button.active {
    color: white;
    border-bottom-color: #CDE2F4;
    background-color: transparent;
}

.tabs button:hover:not(.active), .desktop-tabs button:hover:not(.active) {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.tabcontent {
    display: none;
    padding: 2px;
}

.sub-bar {
    background-color: #ffffff;
    border-bottom: 1px solid var(--color-border);
    padding: 8px 12px;
    text-align: center;
}

.subcontent {
    display: none;
}

.large-box {
    width: 100%;
    min-height: 400px;
    border: none;
    background-color: #f0f4f8;
    margin: 0;
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 8px;
    gap: 4px;
}

.information-box {
    width: 98%;
    min-height: 500px;
    border: none;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    margin: 12px auto;
    position: relative;
    padding: 12px;
    display: block;
    height: auto;
}



.small-box {
    background-color: #ffffff;
    border: none;
    border-radius: 8px;
    margin: 4px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    width: 280px;
    word-wrap: break-word;
    position: relative;
    box-sizing: border-box;
    padding: 0;
    overflow: hidden;
}

.box-header {
    background-color: #3d8b40;
    color: white;
    text-align: center;
    padding: 7px 10px;
    width: 100%;
    box-sizing: border-box;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin: 0;
}

/* Style for the simple text title inside the small boxes */
.box-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 0;
    cursor: pointer;
}

.box-content {
    font-size: 13px;
    line-height: 1.25;
    padding: 1px 8px 2px;
    margin: 0;
    text-align: left;
    flex-grow: 1;
    border-bottom: 1px solid #eee;
}

.box-content p {
    margin: 1px 0;
    line-height: 1.25;
    padding: 0;
}

.box-content div {
    margin: 1px 0;
    line-height: 1.25;
    padding: 0;
}

.Bishopric .box-header {
    background-color: #3d8b40;
}

.EldersQuorum .box-header {
    background-color: #e07b00;
}

.ReliefSociety .box-header {
    background-color: #c2597c;
}

.Primary .box-header {
    background-color: #3a87b0;
}


.SundaySchool .box-header {
    background-color: #c0392b;
}


.AaronicPriesthoodQuorums .box-header {
    background-color: #00796b;
}


.YoungWomen .box-header {
    background-color: #6a1b9a;
}

.Stake .box-header {
    background-color: #795548;
}

.Music .box-header {
    background-color: #d4735a;
}

.FullTimeMissionaries .box-header {
    background-color: #37474f;
}

.TempleandFamilyHistory .box-header {
    background-color: #558b2f;
}

.AdditionalCallings .box-header {
    background-color: #bf6320;
}



/* Org filter pill buttons */
.toggle-btn {
    padding: 5px 14px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    border-radius: 20px;
    border: 2px solid transparent;
    color: white;
    cursor: pointer;
    margin: 3px 2px;
    transition: opacity 0.2s, filter 0.2s, background-color 0.2s, color 0.2s, border-color 0.2s;
    letter-spacing: 0.3px;
}

.toggle-btn:hover:not(.hidden) {
    filter: brightness(0.88);
}

.toggle-btn.selected {
    filter: brightness(0.88);
}

.bishopric-btn   { background-color: #3d8b40; border-color: #3d8b40; }
.elders-btn      { background-color: #e07b00; border-color: #e07b00; }
.rs-btn          { background-color: #c2597c; border-color: #c2597c; }
.primary-btn     { background-color: #3a87b0; border-color: #3a87b0; }
.ss-btn          { background-color: #c0392b; border-color: #c0392b; }
.ym-btn          { background-color: #00796b; border-color: #00796b; }
.yw-btn          { background-color: #6a1b9a; border-color: #6a1b9a; }
.stake-btn       { background-color: #795548; border-color: #795548; }
.music-btn       { background-color: #d4735a; border-color: #d4735a; }
.mission-btn     { background-color: #37474f; border-color: #37474f; }
.additional-btn  { background-color: #bf6320; border-color: #bf6320; }
.wos-btn         { background-color: #558b2f; border-color: #558b2f; }

.clear-all-btn,
.show-all-btn,
.callings-btn,
.members-btn {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.clear-all-btn:hover,
.show-all-btn:hover,
.callings-btn:hover,
.members-btn:hover {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    filter: none;
}

/* Hidden state — org toggled off */
.toggle-btn.hidden {
    background-color: transparent;
    color: #64748b;
    border-color: #cbd5e1;
}

.toggle-btn.hidden:hover {
    background-color: #f1f5f9;
    filter: none;
}





#callingDropdown {
    width: 100%;
    padding: 5px;
    font-size: 14px;
    margin-top: 5px;
}

.selected-item {
    margin-top: 5px;
    padding: 5px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
}

.delete-btn {
    color: red;
    font-weight: bold;
    margin-right: 10px;
    cursor: pointer;
}

.delta-symbol {
    font-size: 14px; /* Adjust size as needed */
    color: purple;
    margin-right: 2px;
    vertical-align: middle;
}

.checkmark-symbol {
    font-size: 14px; /* Adjust size as needed */
    color: green;
    margin-right: 2px;
    vertical-align: middle;
}

.release-symbol {
    font-size: 13px;
    vertical-align: middle;
    margin-right: 3px;
}

/* Considering styling */
.calling-name.considering {
    color: orange;
    font-weight: bold;
}


/* Legend Key Styling */
.legend-key {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 4px;
    margin: 2px;
    font-size: 14px;
    color: #495057;
}

.legend-item {
    margin-right: 20px;
    display: inline-flex;
    align-items: center;
}

/* Overview Notes Styling */
.overview-notes-wrapper {
    width: 95%;
    margin: 2px;
    display: flex;
    gap: 10px;
    box-sizing: border-box;
}

.overview-notes-box {
    flex: 1;
    padding: 10px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    box-sizing: border-box;
}

.overview-notes-box label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 14px;
    color: #495057;
}

.overview-notes-textarea {
    width: 100%;
    min-height: 80px;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    resize: vertical;
    box-sizing: border-box;
}

.overview-notes-textarea:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Responsive: Stack on smaller screens */
@media (max-width: 768px) {
    .overview-notes-wrapper {
        flex-direction: column;
    }
}

/* Recent Calling Changes Styling */
.time-period-selector {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.time-period-selector label {
    margin-right: 10px;
    font-weight: bold;
}

.time-period-selector select {
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.change-type {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.change-type.assigned {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.change-type.released {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f1b0b7;
}







/* General form styling */
form {
    width: 700px;
    margin: 10px auto;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    background-color: #f9f9f9;
}

/* Override form styling within information container for better space utilization */
.information-box form {
    width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background-color: transparent;
}

/* Form title styling */
.form-title {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 5px;
    margin-top: 5px;
    color: #333;
}

/* Form labels */
label {
    font-size: 16px;
    color: #333;
    display: block;
    margin-bottom: 8px;
    margin-top: 8px;
    font-weight: bold;
}

/* Form input fields and selects */
input[type="date"],
input[type="text"],
select {
    width: 300px;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    color: #555;
}

/* Override form field widths within information container for better space utilization */
.information-box input[type="date"],
.information-box input[type="text"],
.information-box select,
.information-box textarea {
    width: 100%;
    max-width: none;
}

/* Button styling */
form button {
    display: inline-block;
    background-color: var(--color-primary);
    color: white;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    border: 2px solid var(--color-primary);
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

form button:hover:not(:disabled) {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}



/* Message display for success/error */
#form-response {
    margin-top: 20px;
    font-size: 16px;
    color: #333;
    text-align: center;
}

/* Form input focus effects */
input[type="date"]:focus,
select:focus {
    border-color: #424242;
    outline: none;
    box-shadow: 0 0 5px rgba(66, 66, 66, 0.3);
}

/* Adjust margins and spacing for the form */
input[type="date"],
select,
button {
    margin-bottom: 15px;
}


/* Styling the callings table */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px auto;
}

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

table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

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

table tr:hover {
    background-color: #f1f1f1;
}

table td {
    color: #333;
}

table td input[type="checkbox"] {
    margin: 0;
    transform: scale(1.2); /* Make checkboxes larger */
}


/* Overlay to darken background when modal is active */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none; /* Toggle visibility with JavaScript */
    z-index: 900; /* Ensure overlay is behind modal */
}

/* Popup Modal Styling */
#popup-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 20px;
    z-index: 1000; /* Above overlay */
    display: none; /* Hidden by default */
}

/* Close Button */
.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    color: white;
    background-color: var(--color-danger);
    border: 2px solid var(--color-danger);
    border-radius: 6px;
    padding: 7px 14px;
    transition: background-color 0.2s, border-color 0.2s;
    z-index: 1001;
}

.close-btn:hover {
    background-color: var(--color-danger-hover);
    border-color: var(--color-danger-hover);
}

/* Popup Title */
#popup-title {
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
}

/* Popup Content */
#popup-content {
    font-size: 16px;
}

/* Dropdown in Popup */
#popup-modal select {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    font-size: 16px;
}

#selectionList {
    width: 100%;
}

.custom-textarea {
    width: 100%; /* Full width of the container */
    height: 150px; /* Custom height */
}


/* Style the container to hold filters side by side */
.modal-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.filter-container {
    display: flex;
    gap: 20px; /* Space between filters */
}

.filter-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 10px; /* Space below filters */
}

/* Style each filter dropdown */
#gender-filter,
#age-filter {
    width: 100px; /* Adjust as needed */
    padding: 4px;
    font-size: 14px;
}



/* Modal overlay and content */
#add-member-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 20px;
    z-index: 1000; /* Above overlay */
    display: none; /* Hidden by default */
}    

#add-member-modal .modal-content {
    background-color: #fff;
    padding: 20px;

    width: 300px;
    text-align: center;
    position: relative;
}




/* Modal overlay and content */
#add-calling-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 20px;
    z-index: 1000; /* Above overlay */
    display: none; /* Hidden by default */
}    

#add-calling-modal .modal-content {
    background-color: #fff;
    padding: 20px;

    width: 300px;
    text-align: center;
    position: relative;
}

/* Add Calling Modal input styling */
#add-calling-modal input[type="text"],
#add-calling-modal input[type="number"],
#add-calling-modal select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    color: #555;
    box-sizing: border-box;
}

#add-calling-modal input[type="text"]:focus,
#add-calling-modal input[type="number"]:focus,
#add-calling-modal select:focus {
    border-color: #424242;
    outline: none;
    box-shadow: 0 0 5px rgba(66, 66, 66, 0.3);
}

/* Add Calling History Modal */
#add-calling-history-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

#add-calling-history-modal .modal-content {
    background-color: #fff;
    padding: 20px;
    position: relative;
}

#add-calling-history-modal table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

#add-calling-history-modal th,
#add-calling-history-modal td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

#add-calling-history-modal th {
    background-color: #f2f2f2;
    font-weight: bold;
}

#add-calling-history-modal tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Update Members Modal */
#update-members-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

#update-members-modal .modal-content {
    background-color: #fff;
    padding: 20px;
    position: relative;
}

/* Finalize Calling Modal */
#finalize-calling-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}

#finalize-calling-modal .modal-content {
    background-color: #fff;
    padding: 20px;
    position: relative;
}

/* Add Process Modal */
#add-process-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 20px;
    z-index: 1000;
    display: none;
}

#pending-releases-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    padding: 20px;
    z-index: 1000;
    width: 700px;
    max-height: 80vh;
    overflow-y: auto;
}

#add-release-only-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    padding: 20px;
    z-index: 1000;
    width: 640px;
    display: none;
    /* No overflow-y here — dropdown must not be clipped */
}

#add-release-only-callings-scroll {
    max-height: 45vh;
    overflow-y: auto;
}

#add-release-only-modal h2 {
    padding-right: 80px;
}

#add-process-modal .modal-content {
    background-color: #fff;
    padding: 20px;
    width: 400px;
    position: relative;
}

#add-process-modal h2 {
    padding-right: 80px; /* Space for close button */
}

.last-update-info {
    margin-top: 8px;
    padding: 8px 12px;
    background-color: #e9ecef;
    border-radius: 4px;
    font-size: 13px;
    color: #495057;
}

.last-update-info.no-update {
    background-color: #fff3cd;
    color: #856404;
}

.last-update-info.recent-update {
    background-color: #d4edda;
    color: #155724;
}

.upload-section {
    margin-bottom: 20px;
}

.file-upload-container {
    margin: 15px 0;
    text-align: center;
}

.upload-label {
    display: inline-block;
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    padding: 9px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    transition: background-color 0.2s, color 0.2s;
}

.upload-label:hover {
    background-color: var(--color-primary);
    color: white;
}

#member-pdf-upload {
    display: none;
}

.upload-status {
    margin-top: 10px;
    font-weight: bold;
}

.progress-container {
    margin: 15px 0;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-fill {
    height: 100%;
    background-color: #28a745;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    font-size: 14px;
    color: #666;
}

.reconciliation-section {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.results-summary {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

#update-members-modal .stat-item {
    text-align: center;
}

#update-members-modal .stat-label {
    display: block;
    font-weight: bold;
    color: #495057;
    margin-bottom: 5px;
}

#update-members-modal .stat-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #007bff;
}

.changes-review {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.changes-category {
    margin-bottom: 20px;
}

.changes-category:last-child {
    margin-bottom: 0;
}

.changes-category h4 {
    margin: 0 0 10px 0;
    color: #495057;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

#update-members-modal .changes-category ul {
    margin: 0;
    padding-left: 20px;
}

#update-members-modal .changes-category li {
    margin-bottom: 5px;
    color: #212529;
}

/* Review Changes Modal */
#review-changes-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    width: 900px;
    max-height: 85vh;
    overflow-y: auto;
}

#review-changes-modal .modal-content {
    background-color: #fff;
    padding: 20px;
    position: relative;
}

.review-summary {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.summary-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.review-section {
    margin-bottom: 25px;
}

.review-section h3 {
    margin: 0 0 15px 0;
    color: #495057;
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
}

.review-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.review-item {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.review-item.approved {
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.review-item.rejected {
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.review-checkbox {
    margin-right: 12px;
    margin-top: 2px;
}

.review-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.review-details {
    flex: 1;
}

.review-details strong {
    display: block;
    font-size: 16px;
    color: #212529;
    margin-bottom: 4px;
}

.review-date,
.review-confidence {
    display: inline-block;
    font-size: 14px;
    color: #6c757d;
    margin-right: 15px;
}

.review-confidence {
    font-weight: bold;
}

.review-changes {
    margin-top: 8px;
}

.change-detail {
    font-size: 14px;
    margin-bottom: 3px;
    color: #495057;
}

.old-value {
    background-color: #f8d7da;
    padding: 2px 4px;
    border-radius: 2px;
    text-decoration: line-through;
}

.new-value {
    background-color: #d4edda;
    padding: 2px 4px;
    border-radius: 2px;
    font-weight: bold;
}

.review-note {
    font-size: 13px;
    color: #6c757d;
    font-style: italic;
    margin-top: 4px;
}





/* Save button styling in the modal */
.toggle-btn.save-btn {
    background-color: var(--color-primary);
    color: white;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    border: 2px solid var(--color-primary);
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    margin-top: 10px;
    border-radius: 20px;
}

.toggle-btn.save-btn:hover {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

/* Authentication message styling */
#auth-message {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    font-weight: bold;
    text-align: center;
    min-height: 20px;
}

#auth-message.error-message {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

#auth-message.warning-message {
    background-color: #fff3e0;
    color: #ef6c00;
    border: 1px solid #ffcc02;
}

#auth-message.error-message.locked {
    background-color: #ffcdd2;
    color: #b71c1c;
    border: 1px solid #f44336;
    animation: shake 0.5s ease-in-out;
}

#auth-message.error-message.warning {
    background-color: #ffcdd2;
    color: #d32f2f;
    border: 1px solid #f44336;
}

/* Shake animation for lockout message */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Auth form submit button states */
#auth-form button[type="submit"]:disabled {
    background-color: #ccc;
    color: #0c2238;
    cursor: not-allowed;
}

/* Authentication container styling */
#auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f5f5f5;
}

#auth-form {
    background-color: white;
    padding: 30px;
    border-radius: 0 8px 0 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 100%;
}

#auth-form h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

#auth-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

#auth-form input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    margin-bottom: 15px;
    box-sizing: border-box;
}

#auth-form button[type="submit"] {
    width: 100%;
    background-color: var(--color-primary);
    color: white;
    padding: 12px;
    border: 2px solid var(--color-primary);
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

#auth-form button[type="submit"]:hover:not(:disabled) {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

/* Input validation styling */
.validation-error {
    border: 2px solid #f44336 !important;
    background-color: #ffebee !important;
}

.validation-success {
    border: 2px solid #4CAF50 !important;
    background-color: #e8f5e8 !important;
}

.validation-message {
    margin-top: 5px;
    padding: 5px;
    border-radius: 3px;
    font-size: 14px;
    font-weight: bold;
}

.validation-message.error {
    background-color: #ffcdd2;
    color: #c62828;
    border: 1px solid #f44336;
}

.validation-message.success {
    background-color: #c8e6c9;
    color: #2e7d32;
    border: 1px solid #4CAF50;
}

/* Form field styling improvements */
input[type="text"], 
input[type="password"], 
input[type="email"], 
input[type="date"], 
input[type="number"],
select, 
textarea {
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

input[type="text"]:focus, 
input[type="password"]:focus, 
input[type="email"]:focus, 
input[type="date"]:focus, 
input[type="number"]:focus,
select:focus, 
textarea:focus {
    outline: none;
    border-color: #424242;
    box-shadow: 0 0 5px rgba(66, 66, 66, 0.3);
}

/* Validation summary styling */
.validation-summary {
    background-color: #ffcdd2;
    border: 1px solid #f44336;
    color: #c62828;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.validation-summary h4 {
    margin: 0 0 10px 0;
    color: #b71c1c;
}

.validation-summary ul {
    margin: 0;
    padding-left: 20px;
}

.validation-summary.success {
    background-color: #c8e6c9;
    border-color: #4CAF50;
    color: #2e7d32;
}

.validation-summary.success h4 {
    color: #1b5e20;
}

/* Member status styling */
.status-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 5px;
}

.status-active {
    background-color: #4CAF50;
    color: white;
}

.status-inactive {
    background-color: #ff9800;
    color: white;
}

.status-moved {
    background-color: #9e9e9e;
    color: white;
}

.status-no_calling {
    background-color: #2196f3;
    color: white;
}

.status-deceased {
    background-color: #424242;
    color: white;
}

.status-unknown {
    background-color: #f44336;
    color: white;
}

/* Status filter styling */
#status-filter-select {
    margin-bottom: 15px;
}

/* Search input styling */
#member-search-input,
#candidate-search,
#member-search-tab2,
#calling-search-tab2 {
    width: 300px;
    padding: 8px;
    margin-bottom: 15px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

#member-search-input:focus, 
#candidate-search:focus,
#member-search-tab2:focus,
#calling-search-tab2:focus {
    outline: none;
    border-color: #424242;
    box-shadow: 0 0 5px rgba(66, 66, 66, 0.3);
}

/* Member autocomplete dropdown */
.member-autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid #424242;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 260px;
    overflow-y: auto;
    z-index: 1100;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.member-autocomplete-item {
    padding: 9px 12px;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
}

.member-autocomplete-item:last-child {
    border-bottom: none;
}

.member-autocomplete-item:hover {
    background-color: #e8e8e8;
}

.member-autocomplete-item.no-results {
    color: #888;
    cursor: default;
    font-style: italic;
}

/* Popup modal search styling */
#popup-modal #candidate-search {
    width: 100%;
    margin-bottom: 10px;
}

/* Filter container improvements */
.filter-container {
    margin-bottom: 15px;
}

.filter-container label {
    margin-right: 5px;
}

.filter-container select {
    margin-right: 15px;
}

/* Enhanced Information Page Layout */
.section-header {
    margin: 16px 0 8px 0;
    padding: 6px 12px;
    background: #eef3f8;
    border-left: 3px solid var(--color-primary);
    border-radius: 0 4px 4px 0;
}

.section-header h3 {
    margin: 0;
    color: var(--color-primary);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

/* Primary Action Section */
.action-section {
    margin-bottom: 20px;
    text-align: center;
}

.primary-action-btn {
    background-color: var(--color-primary);
    color: white;
    border: 2px solid var(--color-primary);
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, transform 0.15s;
    letter-spacing: 0.5px;
}

.primary-action-btn:hover {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    transform: translateY(-1px);
}

/* Search Section */
.search-section {
    margin-bottom: 20px;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 0 8px 0 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-row {
    display: flex;
    gap: 20px;
    align-items: end;
}

.search-field, .filter-field {
    flex: 1;
}

.search-field input, .filter-field select {
    width: 100%;
    margin-bottom: 0;
}

/* Selection Section */
.selection-section {
    margin-bottom: 20px;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 0 8px 0 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.selection-section select {
    width: 100%;
    font-size: 16px;
    padding: 12px;
}

/* Details Section */
.details-section {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 0 8px 0 8px;
    border: 1px solid #dee2e6;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

/* Action buttons in left column should stack vertically */
.left-column .action-buttons {
    flex-direction: column;
    align-items: stretch;
}

.action-btn {
    padding: 9px 20px;
    border: 2px solid transparent;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, transform 0.15s;
    letter-spacing: 0.3px;
}

.action-btn.edit-btn {
    background-color: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.action-btn.edit-btn:hover {
    background-color: var(--color-primary);
    color: white;
    transform: translateY(-1px);
}

.action-btn.save-btn {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.action-btn.save-btn:hover {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    transform: translateY(-1px);
}

.action-btn.cancel-btn {
    background-color: transparent;
    color: var(--color-text-muted);
    border-color: #cbd5e1;
}

.action-btn.cancel-btn:hover {
    background-color: #f1f5f9;
    transform: translateY(-1px);
}

.action-btn.remove-btn {
    background-color: var(--color-danger);
    color: white;
    border-color: var(--color-danger);
}

.action-btn.remove-btn:hover {
    background-color: var(--color-danger-hover);
    border-color: var(--color-danger-hover);
    transform: translateY(-1px);
}

/* Two Column Layout */
.two-column-layout {
    display: flex;
    gap: 40px;
    margin-top: 0;
}

.left-column {
    flex: 0 0 380px;
    min-width: 380px;
}

.right-column {
    flex: 1; /* Takes remaining space */
    min-width: 0; /* Allows flex item to shrink */
}

/* Adjust search layout for column */
.search-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.search-field, .filter-field {
    flex: none;
}

.search-field input, .filter-field select {
    width: 100%;
    margin-bottom: 0;
}

/* Responsive design for search row and two-column layout */
@media (max-width: 1024px) {
    .two-column-layout {
        flex-direction: column;
        gap: 20px;
    }
    
    .left-column {
        flex: none;
        min-width: auto;
    }
    
    .search-column {
        flex-direction: row;
        gap: 20px;
    }
    
    .search-field, .filter-field {
        flex: 1;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    .information-box {
        width: 98%;
        padding: 15px;
        margin: 2px auto;
    }
    
    .search-column {
        flex-direction: column;
        gap: 15px;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .action-btn {
        width: 100%;
        max-width: 250px;
        padding: 14px 20px;
        font-size: 16px;
    }
    
    .section-header h3 {
        font-size: 12px;
    }
    
    /* Make form inputs more touch-friendly */
    input[type="text"], 
    input[type="date"], 
    select, 
    textarea {
        padding: 12px;
        font-size: 16px;
        min-height: 44px;
        box-sizing: border-box;
    }
    
    /* Table improvements for mobile */
    table {
        font-size: 14px;
        width: 100%;
        overflow-x: auto;
        display: block;
        white-space: nowrap;
    }
    
    table thead,
    table tbody,
    table tr {
        display: table;
        width: 100%;
        table-layout: fixed;
    }
    
    table th,
    table td {
        padding: 8px 4px;
        text-overflow: ellipsis;
        overflow: hidden;
    }
}

@media (max-width: 480px) {
    .information-box {
        padding: 10px;
    }
    
    .action-btn {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    input[type="text"], 
    input[type="date"], 
    select, 
    textarea {
        padding: 10px;
        font-size: 14px;
    }
    
    .section-header h3 {
        font-size: 11px;
    }
    
    table {
        font-size: 12px;
    }
    
    table th,
    table td {
        padding: 6px 2px;
        font-size: 12px;
    }
    
    /* Calling process ultra-small screen optimizations */
    #calling-process-table-container {
        margin: 0 -10px;
        border-radius: 0;
    }
    
    #calling-process-table {
        min-width: 600px;
        font-size: 11px;
    }
    
    #calling-process-table th,
    #calling-process-table td {
        padding: 6px 4px;
        font-size: 11px;
    }
    
    #calling-process-table th {
        font-size: 10px;
        padding: 8px 4px;
    }
    
    .progress-indicator {
        padding: 10px 2px;
        gap: 5px;
    }
    
    .step-icon {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }
    
    .step-label {
        font-size: 8px;
    }
    
    .stat-item {
        padding: 4px 0;
        font-size: 13px;
    }
    
    .stat-value {
        font-size: 11px;
        padding: 2px 4px;
    }
    
    .process-actions .action-btn {
        padding: 10px 12px;
        font-size: 12px;
    }
}

/* Dashboard Styles */
.dashboard-content {
    padding: 20px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.dashboard-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dashboard-card h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
}

.dashboard-card p {
    margin: 0;
    color: #666;
}

/* Mobile dashboard adjustments */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .dashboard-card {
        padding: 15px;
    }
}

/* Dashboard clickable stats */
.clickable-stat {
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-radius: 0px;
    padding: 5px;
    margin: 2px 0;
}

.clickable-stat:hover {
    background-color: #CDE2F4;
}

.clickable-stat.active-stat {
    background-color: #CDE2F4;
    border-left: 3px solid #0c2238;
}

/* Dashboard clickable process stats */
.clickable-process-stat {
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-radius: 0px;
    padding: 5px;
    margin: 2px 0;
}

.clickable-process-stat:hover {
    background-color: #CDE2F4;
}

.clickable-process-stat.active-stat {
    background-color: #CDE2F4;
    border-left: 3px solid #0c2238;
}

/* Dashboard detail table */
.detail-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

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

.detail-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

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

.detail-table tr:hover {
    background-color: #f0f0f0;
}

.detail-table .clickable-row {
    cursor: pointer;
}

.detail-table .clickable-row:hover {
    background-color: #e3f2fd !important;
}

/* Mobile adjustments for detail table */
@media (max-width: 768px) {
    .detail-table {
        font-size: 14px;
    }
    
    .detail-table th,
    .detail-table td {
        padding: 6px;
    }
}

/* Calling Process Styles */

/* Table container styling */
#calling-process-table-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background-color: white;
}

#calling-process-table {
    width: 100%;
    min-width: 800px; /* Minimum width to ensure readability */
    border-collapse: collapse;
    margin: 0;
    background-color: white;
}

#calling-process-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    padding: 12px 8px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

#calling-process-table td {
    padding: 12px 8px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

#calling-process-table tbody tr:hover {
    background-color: #f8f9fa;
}

.progress-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 5px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 60px;
}

.step-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 4px;
}

.progress-step.completed .step-icon {
    background-color: #2D5B89;
    color: white;
}

.progress-step.clickable-step {
    cursor: pointer;
}

.progress-step.clickable-step .step-icon {
    background-color: #e0e0e0;
    border: 2px dashed #2D5B89;
    color: #2D5B89;
}

.progress-step.clickable-step:hover .step-icon {
    background-color: #2D5B89;
    color: white;
}

.progress-step.clickable-step .step-label {
    color: #2D5B89;
}

.progress-step.pending .step-icon {
    background-color: #e0e0e0;
    color: #666;
}

.step-label {
    font-size: 12px;
    font-weight: bold;
    color: #333;
}

.step-date {
    font-size: 12px;
    color: #333;
    font-weight: bold;
    margin-top: 2px;
    line-height: 1.2;
}

.editable-date {
    cursor: pointer;
    transition: color 0.2s ease;
}

.editable-date:hover {
    color: #0c2238;
    text-decoration: underline;
}

.step-connector {
    width: 20px;
    height: 2px;
    background-color: #e0e0e0;
    margin: 0 2px;
    align-self: center;
    margin-top: -10px;
}

.progress-step.completed + .step-connector {
    background-color: #2D5B89;
}

/* Process Stats */
.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 2px 2px 2px;
    border-bottom: 1px solid #e0e0e0;
}

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

.stat-label {
    font-weight: bold;
    color: #333;
}

.stat-value {
    background-color: #f0f0f0;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: bold;
    min-width: 24px;
    text-align: center;
}

/* Table styles for no data / error states */
.no-data, .error {
    text-align: center;
    font-style: italic;
    color: #666;
    padding: 20px;
}

.error {
    color: #f44336;
}

/* Process action buttons */
.process-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.process-actions .action-btn {
    padding: 6px 12px;
    font-size: 12px;
    min-width: auto;
}

/* Mobile responsiveness for progress indicator and calling process */
@media (max-width: 768px) {
    .progress-indicator {
        flex-direction: column;
        gap: 10px;
    }
    
    .step-connector {
        width: 2px;
        height: 20px;
        margin: 2px 0;
        align-self: center;
        margin-top: 0;
    }
    
    .progress-step {
        min-width: auto;
    }
    
    .step-label {
        font-size: 9px;
    }
    
    .step-date {
        font-size: 9px;
    }
    
    .process-actions {
        flex-direction: column;
    }
    
    .process-actions .action-btn {
        width: 100%;
    }
    
    /* Calling process specific mobile improvements */
    #calling-process-table-container {
        border-radius: 4px;
        margin: 0 -10px; /* Extend to container edges on small screens */
    }
    
    #calling-process-table {
        min-width: 700px;
        font-size: 13px;
    }
    
    #calling-process-table th,
    #calling-process-table td {
        padding: 8px 6px;
        white-space: nowrap;
    }
    
    #calling-process-table th {
        font-size: 12px;
    }
    
    /* Process stats mobile layout */
    .stat-item {
        padding: 6px 0;
        font-size: 14px;
    }
    
    .stat-value {
        font-size: 12px;
        padding: 3px 6px;
    }
    
    /* Search and filter sections on mobile */
    .search-section input,
    .search-section select {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 12px;
        margin-bottom: 10px;
    }
    
    /* Process progress mobile improvements */
    .progress-indicator {
        padding: 15px 5px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .step-icon {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }
    
    /* Modal mobile improvements */
    #popup-modal,
    #add-member-modal,
    #add-calling-modal,
    #add-calling-history-modal,
    #update-members-modal,
    #review-changes-modal,
    #finalize-calling-modal,
    #add-process-modal,
    #pending-releases-modal,
    #add-release-only-modal {
        width: 95vw !important;
        max-width: 500px;
        max-height: 90vh;
        top: 5vh;
        left: 50%;
        transform: translateX(-50%);
        overflow-y: auto;
        padding: 15px;
    }
    
    .modal-content {
        max-height: none;
        padding: 0;
    }
    
    /* Filter container mobile layout */
    .filter-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .filter-item {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    
    .filter-container label {
        margin-bottom: 5px;
        margin-right: 0;
        font-weight: 500;
    }
    
    .filter-container select {
        margin-right: 0;
        margin-bottom: 0;
        padding: 12px;
        font-size: 16px;
    }
    
    /* Modal inputs mobile styling */
    #popup-modal input,
    #popup-modal select,
    #popup-modal textarea,
    #add-member-modal input,
    #add-member-modal select,
    #add-member-modal textarea,
    #add-calling-modal input,
    #add-calling-modal select,
    #add-calling-modal textarea,
    #add-calling-history-modal input,
    #add-calling-history-modal select,
    #add-calling-history-modal textarea,
    #finalize-calling-modal input,
    #finalize-calling-modal select,
    #finalize-calling-modal textarea,
    #add-process-modal input,
    #add-process-modal select,
    #add-process-modal textarea {
        font-size: 16px !important;
        padding: 12px !important;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 4px;
    }
    
    /* Modal titles mobile */
    #popup-title {
        font-size: 18px;
        margin-bottom: 15px;
        padding-right: 60px; /* Space for close button */
    }
    
    /* Close button mobile */
    .close-btn {
        padding: 10px 15px;
        font-size: 14px;
        top: 10px;
        right: 10px;
    }
    
    /* Custom textarea mobile */
    .custom-textarea {
        min-height: 120px;
        resize: vertical;
    }
}

/* Additional mobile improvements for very small screens */
@media (max-width: 480px) {
    #popup-modal,
    #add-member-modal,
    #add-calling-modal,
    #add-calling-history-modal,
    #update-members-modal,
    #review-changes-modal,
    #finalize-calling-modal,
    #add-process-modal {
        width: 98vw !important;
        padding: 10px;
        top: 2vh;
        max-height: 96vh;
    }
    
    .summary-actions {
        flex-direction: column;
    }
    
    .review-items {
        grid-template-columns: 1fr;
    }
    
    .review-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .review-checkbox {
        margin-bottom: 8px;
    }
    
    .close-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    #popup-title {
        font-size: 16px;
        padding-right: 50px;
    }
}

/* Drag and Drop Styles for SortableJS */
.sortable-ghost {
    opacity: 0.4;
}

.sortable-chosen {
    background-color: #f0f0f0;
}

.sortable-drag {
    opacity: 0.8;
    transform: rotate(5deg);
}

.dragging {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    transform: scale(1.05);
    z-index: 1000;
}

/* Make box headers look draggable */
.box-header {
    cursor: grab;
    user-select: none;
    transition: background-color 0.2s ease;
}

.box-header:hover {
    background-color: rgba(0, 0, 0, 0.15);
}

.box-header:active {
    cursor: grabbing;
}

/* Visual feedback for entire small-box during drag */
.small-box {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.small-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
