/* Professional Government Theme Colors */
:root {
  --gov-primary: #1a4480;
  --gov-primary-dark: #12305b;
  --gov-primary-light: #1d5fb3;
  --gov-secondary: #636363;
  --gov-accent: #c41e3a;
  --gov-background: #f5f7fa;
  --gov-text: #1b1b1b;
  --gov-border: #dfe1e6;
  --gov-success: #2e8540;
  --gov-table-header: #f8f9fa;
  --gov-hover: #e6f1ff;
}

/* Global Styles */
body {
    background: var(--gov-background);
    color: var(--gov-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    overflow-y: auto !important;
    overflow-x: hidden;
    padding-bottom: 2rem;
}

/* Navbar Styling */
.navbar {
    background-color: var(--gov-primary) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 0;
}

.navbar-brand {
    color: white !important;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.nav-link.btn-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.nav-link.btn-link:hover {
    background: rgba(255,255,255,0.15);
}

.nav-link.btn-link.active {
    background: rgba(255,255,255,0.2);
    color: white !important;
}

/* Container Styling */
.form-container, .beneficiary-list, .login-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin: 2rem auto;
    padding: 2rem;
    border: 1px solid var(--gov-border);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    color: var(--gov-primary);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* Form Controls */
.form-control {
    border: 2px solid var(--gov-border);
    border-radius: 4px;
    padding: 0.75rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--gov-primary);
    box-shadow: 0 0 0 3px rgba(26, 68, 128, 0.15);
}

/* Buttons */
.btn-primary {
    background-color: var(--gov-primary);
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
}

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

.btn-secondary {
    background-color: var(--gov-secondary);
    border: none;
}

.btn-success {
    background-color: var(--gov-success);
    border: none;
}

/* Table Styling */
.table {
    border: 1px solid var(--gov-border);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 2rem;
}

.table thead th {
    background-color: var(--gov-table-header);
    border-bottom: 2px solid var(--gov-border);
    color: var(--gov-primary);
    font-weight: 600;
    padding: 1rem;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: var(--gov-hover);
}

.table td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--gov-border);
}

/* Search Container */
.search-container {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid var(--gov-border);
}

.search-container .input-group {
    border: 2px solid var(--gov-border);
    border-radius: 6px;
    overflow: hidden;
}

.search-container .input-group-text {
    background: white;
    border: none;
    padding-left: 1rem;
}

.search-container .form-control {
    border: none;
    padding: 0.75rem;
}

.search-container .btn {
    border: none;
    padding: 0.75rem 1.5rem;
}

/* Modal Styling */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

.modal-header {
    background-color: var(--gov-primary);
    color: white;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    padding: 1.5rem;
}

.modal-header h5 {
    color: white;
    font-weight: 600;
    margin: 0;
}

.modal-header .btn-close {
    color: white;
    opacity: 0.8;
}

/* Side Panel Styling */
.side-panel {
    background: white;
    box-shadow: -2px 0 20px rgba(0,0,0,0.15);
}

.side-panel-header {
    background-color: var(--gov-primary);
    color: white;
    padding: 1.5rem;
}

.side-panel-header h5 {
    color: white;
    margin: 0;
}

/* Image Display */
.image-grid {
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--gov-background);
    border-radius: 8px;
}

.original-image-preview, .installation-image-preview {
    border: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.original-image-preview::before,
.installation-image-preview::before {
    z-index: 1;
    font-weight: 500;
    padding: 4px 8px;
}

/* Login Form */
.login-container {
    max-width: 400px;
    text-align: center;
}

.login-container h2 {
    color: var(--gov-primary);
    margin-bottom: 2rem;
}

/* Detail Rows */
.detail-row {
    background: white;
    padding: 1rem;
    margin-bottom: 1px;
    transition: all 0.2s ease;
}

.detail-row:hover {
    background: var(--gov-hover);
}

.detail-label {
    color: var(--gov-primary);
    font-weight: 600;
}

/* Form Container */
.form-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border: 1px solid var(--gov-border);
}

/* Beneficiary List */
.beneficiary-list {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border: 1px solid var(--gov-border);
}

/* Error Message */
.error-message {
    color: red;
    margin: 10px 0;
}

/* Select */
select[multiple] {
    height: auto;
    min-height: 100px;
}

select.form-control {
    height: auto;
    min-height: 38px;
    padding: 6px 12px;
    border: 2px solid var(--gov-border);
    border-radius: 4px;
    transition: all 0.2s ease;
    width: 100%;
    white-space: normal;
    word-wrap: break-word;
}

select[multiple].form-control {
    min-height: 120px;
    padding: 8px;
}

select.form-control option {
    padding: 8px 12px;
    white-space: normal;
    word-wrap: break-word;
    min-height: 24px;
    line-height: 1.4;
}

/* Form Check */
.form-check {
    margin: 10px 0;
}

.form-check-input {
    width: 20px !important;
    height: 20px !important;
    margin-top: 3px;
}

.form-check-label {
    margin-left: 10px;
}

/* Input Group */
.input-group {
    display: flex;
    gap: 0.5rem;
}

.input-group .form-control {
    flex: 1;
}

.input-group .btn {
    white-space: nowrap;
}

/* Form Row */
@media (min-width: 768px) {
    .form-row {
        display: flex;
        gap: 20px;
        margin-bottom: 1rem;
    }
    
    .form-group {
        min-width: 0;
        flex: 1;
    }
    
    .form-group.full-width {
        flex: 0 0 100%;
    }
}

/* Navbar Nav */
.navbar-nav {
    display: flex;
    gap: 0.5rem;
}

/* View Details Icon */
.view-details-icon {
    cursor: pointer;
    color: #007bff;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.view-details-icon:hover {
    background: #e9ecef;
    color: #0d6efd;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal.show {
    display: block;
}

/* Modal Content */
.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    border: none;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
    max-height: 90vh;
    position: relative;
    overflow: hidden;
}

/* Modal Close */
.modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 3;
}

.modal-close:hover {
    color: #333;
    background: #e9ecef;
    border-radius: 50%;
}

/* Modal Header */
.modal-header {
    margin-bottom: 20px;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    position: sticky;
    top: 0;
    z-index: 2;
}

/* Modal Body */
.modal-body {
    padding: 0 20px;
    max-height: calc(90vh - 140px);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Modal Body Scrollbar */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Button Group */
.btn-group {
    display: flex;
    gap: 0.5rem;
}

/* Signature Pad Container */
.signature-pad-container {
    border: 1px solid var(--gov-border);
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 60px;
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Signature Pad */
.signature-pad {
    border: 1px solid var(--gov-border);
    border-radius: 4px;
    background-color: white;
    touch-action: none;
    border-radius: 4px;
    box-shadow: inset 0 0 0 1px var(--gov-border);
}

/* Signature Pad Buttons */
.signature-pad-buttons {
    display: flex;
    gap: 10px;
    margin-top: 1rem;
    justify-content: flex-end;
}

/* Signature Preview */
.signature-preview {
    margin: 10px 0;
}

.signature-preview img {
    max-width: 400px;
    border: 1px solid var(--gov-border);
    border-radius: 4px;
    margin-bottom: 10px;
}

/* Detail Row */
.detail-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid var(--gov-border);
    align-items: flex-start;
}

/* Detail Label */
.detail-label {
    font-weight: 600;
    width: 200px;
    flex-shrink: 0;
    color: var(--gov-primary);
    padding-right: 15px;
}

/* Detail Value */
.detail-value {
    flex-grow: 1;
    color: var(--gov-text);
}

/* Detail Section Title */
.detail-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gov-text);
    margin: 20px 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gov-border);
}

/* Installation Images */
.installation-images {
    border: 1px solid var(--gov-border);
    padding: 15px;
    border-radius: 8px;
    background: var(--gov-background);
    margin-top: 10px;
}

/* Image Grid */
.modal-body .image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin: 15px 0;
    padding: 10px 0;
}

/* Image Preview */
.modal-body .image-preview {
    position: relative;
    border: 1px solid var(--gov-border);
    border-radius: 8px;
    padding: 8px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.modal-body .image-preview img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
}

/* Map Section */
.map-section {
    margin: 20px 0;
    padding: 20px;
    background: var(--gov-background);
    border-radius: 8px;
    border: 1px solid var(--gov-border);
}

.map-section h4 {
    margin-bottom: 15px;
    color: var(--gov-primary);
    font-weight: 600;
}

/* Body */
.body {
    background: var(--gov-background);
    min-height: 100vh;
    overflow-y: auto !important;
    overflow-x: hidden;
    padding-bottom: 2rem;
}

/* Login Container H2 */
.login-container h2 {
    margin-bottom: 1.5rem;
    color: var(--gov-primary);
}

/* Table */
.table {
    margin-top: 2rem;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.table th {
    background: var(--gov-table-header);
    font-weight: 600;
    padding: 1rem;
}

.table td {
    padding: 1rem;
    vertical-align: middle;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background: var(--gov-hover);
}

/* Image Grid */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

/* Image Preview */
.image-preview {
    position: relative;
    border: 1px solid var(--gov-border);
    border-radius: 4px;
    padding: 5px;
    text-align: center;
}

.image-preview img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 4px;
}

.image-preview button {
    position: absolute;
    top: 5px;
    right: 5px;
    padding: 2px 5px;
    font-size: 12px;
    opacity: 0.8;
}

.image-preview button:hover {
    opacity: 1;
}

/* Installation Image Preview */
.installation-image-preview {
    position: relative;
    border: 1px solid var(--gov-border);
    border-radius: 4px;
    padding: 5px;
    text-align: center;
    background-color: rgba(40, 167, 69, 0.1);
}

.installation-image-preview::before {
    content: "Installation";
    position: absolute;
    top: 0;
    left: 0;
    font-size: 10px;
    background-color: #28a745;
    color: white;
    padding: 2px 4px;
    border-radius: 0 0 4px 0;
}

.installation-image-preview img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
}

/* Detail Value Installation Images */
.detail-value .installation-images {
    margin-top: 15px;
}

.detail-value .installation-images img {
    border: 2px solid #28a745;
}

/* Original Images */
.original-images {
    border: 1px solid var(--gov-border);
    padding: 15px;
    border-radius: 8px;
    background: rgba(13, 110, 253, 0.1);
    margin-top: 10px;
}

/* Original Image Preview */
.original-image-preview {
    position: relative;
    border: 1px solid var(--gov-border);
    border-radius: 4px;
    padding: 5px;
    text-align: center;
    background-color: rgba(13, 110, 253, 0.1);
}

.original-image-preview::before {
    content: "Original";
    position: absolute;
    top: 0;
    left: 0;
    font-size: 10px;
    background-color: #0d6efd;
    color: white;
    padding: 2px 4px;
    border-radius: 0 0 4px 0;
}

.original-image-preview img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
}

/* Side Panel */
.side-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 600px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease-in-out;
    z-index: 1050;
    display: flex;
    overflow: hidden;
}

.side-panel.show {
    right: 0;
}

/* Side Panel Content */
.side-panel-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

/* Side Panel Header */
.side-panel-header {
    padding: 1rem;
    border-bottom: 1px solid var(--gov-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    flex-shrink: 0;
}

/* Side Panel Body */
.side-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.2) transparent;
}

.side-panel-body::-webkit-scrollbar {
    width: 8px;
}

.side-panel-body::-webkit-scrollbar-track {
    background: transparent;
}

.side-panel-body::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.2);
    border-radius: 4px;
}

/* Side Panel Footer */
.side-panel-footer {
    padding: 1rem;
    border-top: 1px solid var(--gov-border);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    background: white;
    flex-shrink: 0;
}

/* Side Panel Overlay */
.side-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out;
}

.side-panel-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Installation Form */
.installation-form {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    /* Navigation */
    .navbar-nav {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
        padding: 0.5rem 0;
    }

    .navbar .nav-link {
        width: 100%;
        text-align: left;
        padding: 0.5rem 1rem;
    }

    .navbar-brand {
        font-size: 1.2rem;
    }

    /* Form Controls */
    .form-row {
        flex-direction: column;
        gap: 1rem;
    }

    .form-group {
        width: 100%;
    }

    /* Table Responsiveness */
    .table-responsive {
        margin: 0 -1rem;
        padding: 0 1rem;
        width: calc(100% + 2rem);
    }

    /* Search Container */
    .search-container .input-group {
        flex-wrap: nowrap;
    }

    .search-container .form-control {
        min-width: 0;
    }

    /* Action Buttons */
    .btn-group {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    .btn-group .btn {
        width: 100%;
    }

    /* Modal Adjustments */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    .modal-content {
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }

    /* Side Panel */
    .side-panel {
        width: 100%;
        max-width: 100%;
    }

    /* Image Grid */
    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.5rem;
    }

    /* Map Container */
    #map {
        height: 250px !important;
    }

    /* Detail Rows */
    .detail-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .detail-label {
        width: 100%;
        padding-right: 0;
    }

    /* Installation Form */
    .installation-form .side-panel-body {
        padding: 1rem;
    }

    /* Maintenance Form */
    .maintenance-form .side-panel-body {
        padding: 1rem;
    }

    /* Header Actions */
    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 1rem;
    }

    .d-flex.gap-2 {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    .d-flex.gap-2 .btn {
        width: 100%;
    }

    /* View Details Icons */
    .view-details-icon {
        padding: 8px;
    }

    /* Table Actions */
    td .d-flex.gap-2 {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    /* Signature Pad */
    .signature-pad {
        width: 100% !important;
        height: 150px !important;
    }

    /* Form Container */
    .form-container, .beneficiary-list {
        margin: 1rem;
        padding: 1rem;
    }

    /* Input Groups */
    .input-group {
        flex-wrap: wrap;
    }

    .input-group > * {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .input-group > :last-child {
        margin-bottom: 0;
    }

    /* Installation Details Panel */
    .installation-form .form-row {
        margin-bottom: 1rem;
    }

    /* Maintenance Form Panel */
    .maintenance-form .form-row {
        margin-bottom: 1rem;
    }

    /* Panel Headers */
    .side-panel-header h5 {
        font-size: 1.1rem;
    }

    /* Panel Footer */
    .side-panel-footer {
        padding: 0.75rem;
    }

    .side-panel-footer .btn {
        padding: 0.5rem 1rem;
    }
}

/* Tablet Responsive Styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .form-row {
        flex-wrap: wrap;
    }

    .form-group {
        flex: 0 0 calc(50% - 1rem);
    }

    .side-panel {
        max-width: 80%;
    }

    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* Base Height for Modals */
.modal-dialog {
    max-height: 90vh;
    margin: 5vh auto;
}

/* Ensure buttons don't overflow on mobile */
.btn {
    white-space: normal;
    word-wrap: break-word;
}

/* Fix navigation on small screens */
@media (max-width: 576px) {
    .navbar .container {
        padding: 0.5rem;
    }

    .navbar-brand {
        max-width: 60%;
        white-space: normal;
        word-wrap: break-word;
    }

    .btn-group-vertical {
        width: 100%;
    }

    /* Make table cells more readable on mobile */
    .table td, .table th {
        min-width: 120px;
        white-space: normal;
        word-wrap: break-word;
    }

    /* Ensure form inputs are easily tappable */
    input, select, textarea {
        font-size: 16px !important; /* Prevents iOS zoom */
        padding: 0.5rem !important;
    }
}

/* Fix modal scrolling on mobile */
.modal {
    -webkit-overflow-scrolling: touch;
}

.modal-body {
    max-height: calc(90vh - 200px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Mobile Card Views */
.mobile-view {
    display: none;
}

.desktop-view {
    display: block;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .mobile-view {
        display: block;
    }
    
    .desktop-view {
        display: none;
    }

    /* Beneficiary Cards */
    .beneficiary-cards {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
    }

    .beneficiary-card {
        background: white;
        border: 1px solid var(--gov-border);
        border-radius: 8px;
        padding: 1rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }

    .beneficiary-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0.5rem;
    }

    .beneficiary-card-header h5 {
        margin: 0;
        font-size: 1.1rem;
        color: var(--gov-primary);
    }

    .status-indicator {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
        border-radius: 12px;
    }

    .status-indicator.completed {
        background-color: #28a7451a;
        color: #28a745;
    }

    .status-indicator.pending {
        background-color: #ffc1071a;
        color: #ffc107;
    }

    .beneficiary-card-body {
        padding: 0.5rem 0;
        border-bottom: 1px solid var(--gov-border);
    }

    .beneficiary-card-body p {
        margin: 0.25rem 0;
        font-size: 0.9rem;
    }

    .beneficiary-card-actions {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        padding-top: 0.75rem;
    }

    .beneficiary-card-actions .btn {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    /* Staff Cards */
    .staff-cards {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
    }

    .staff-card {
        background: white;
        border: 1px solid var(--gov-border);
        border-radius: 8px;
        padding: 1rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }

    .staff-card-header {
        margin-bottom: 0.5rem;
    }

    .staff-card-header h5 {
        margin: 0;
        font-size: 1.1rem;
        color: var(--gov-primary);
    }

    .staff-title {
        font-size: 0.9rem;
        color: var(--gov-secondary);
        margin-top: 0.25rem;
        display: block;
    }

    .staff-card-body {
        padding: 0.5rem 0;
        border-bottom: 1px solid var(--gov-border);
    }

    .staff-card-body p {
        margin: 0.25rem 0;
        font-size: 0.9rem;
    }

    .staff-card-actions {
        padding-top: 0.75rem;
        display: flex;
        justify-content: flex-end;
    }

    /* Action Button Icons */
    .btn svg {
        width: 16px;
        height: 16px;
    }

    .action-text {
        display: inline-block;
        margin-left: 0.25rem;
    }
}

/* Additional mobile optimizations */
@media (max-width: 480px) {
    .beneficiary-card-actions {
        grid-template-columns: 1fr;
    }

    .search-container .input-group {
        flex-wrap: wrap;
    }

    .search-container .input-group > * {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .beneficiary-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .status-indicator {
        align-self: flex-start;
    }
}

/* Pagination Styles */
.pagination-container {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.pagination {
    gap: 0.25rem;
}

.page-link {
    border: 1px solid var(--gov-border);
    color: var(--gov-primary);
    background-color: white;
    padding: 0.5rem 1rem;
    min-width: 40px;
    text-align: center;
    transition: all 0.2s ease;
}

.page-link:hover {
    background-color: var(--gov-hover);
    color: var(--gov-primary);
    border-color: var(--gov-primary);
}

.page-item.active .page-link {
    background-color: var(--gov-primary);
    border-color: var(--gov-primary);
    color: white;
}

.page-item.disabled .page-link {
    background-color: #f8f9fa;
    border-color: var(--gov-border);
    color: var(--gov-secondary);
    cursor: not-allowed;
}

/* Mobile Responsive Pagination */
@media (max-width: 768px) {
    .pagination-container {
        overflow-x: auto;
        padding: 0.5rem 0;
    }

    .pagination {
        flex-wrap: nowrap;
        justify-content: flex-start;
        min-width: max-content;
    }

    .page-link {
        padding: 0.375rem 0.75rem;
        min-width: 35px;
        font-size: 0.9rem;
    }

    .page-item:not(.active):not(:first-child):not(:last-child) .page-link {
        display: none;
    }

    .page-item:first-child .page-link,
    .page-item:last-child .page-link,
    .page-item.active .page-link {
        display: block;
    }
}

/* Results per page container */
.results-per-page {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.results-per-page select {
    width: auto;
    padding: 0.375rem 1.75rem 0.375rem 0.75rem;
}

/* Pagination info text */
.pagination-info {
    text-align: center;
    color: var(--gov-secondary);
    margin: 1rem 0;
    font-size: 0.9rem;
}

@media (max-width: 576px) {
    .pagination-info {
        font-size: 0.8rem;
    }
}