/* Shared Accounts Table Styles - Consolidated and Optimized */

/* ===== STATS CARDS ===== */

/* Stats Cards for Account Counters */
.stats-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.stats-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 5px;
    line-height: 1;
}

.stats-label {
    color: #6c757d;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

/* Compact Stats Cards - Space Efficient */
.compact-stats-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    justify-content: center;
}

.compact-stats-card {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
    min-height: 60px;
}

.compact-stats-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.compact-stats-icon {
    font-size: 1.5rem;
    margin-right: 12px;
    color: #667eea;
    min-width: 24px;
    text-align: center;
}

.compact-stats-content {
    flex: 1;
    text-align: left;
}

.compact-stats-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    line-height: 1;
    margin-bottom: 2px;
}

.compact-stats-label {
    color: #6c757d;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Responsive adjustments for stats cards */
@media (max-width: 768px) {
    .stats-card {
        padding: 15px;
        margin-bottom: 15px;
    }

    .stats-number {
        font-size: 2rem;
    }

    .stats-label {
        font-size: 0.8rem;
    }

    .compact-stats-card {
        padding: 10px 12px;
        min-height: 50px;
    }

    .compact-stats-icon {
        font-size: 1.2rem;
        margin-right: 8px;
    }

    .compact-stats-number {
        font-size: 1.3rem;
    }

    .compact-stats-label {
        font-size: 0.7rem;
    }
}

/* ===== TABLE STRUCTURE ===== */

/* Shared Accounts Tables - Base Structure */
#sharedAccountsTable,
#otherAccountsTable {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    margin: 0;
    padding: 0;
    min-width: 800px; /* Ensure minimum width to prevent squishing */
    border: 1px solid #dee2e6;
}

/* Table Headers */
#sharedAccountsTable thead th,
#otherAccountsTable thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    padding: 8px 4px;
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    color: #495057;
}

/* Table Body */
#sharedAccountsTable tbody td,
#otherAccountsTable tbody td {
    padding: 8px 4px;
    vertical-align: middle;
    border-bottom: 1px solid #dee2e6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    color: #495057;
}

/* Hover Effects */
#sharedAccountsTable tbody tr:hover,
#otherAccountsTable tbody tr:hover {
    background-color: #f8f9fa;
}

/* ===== COLUMN SIZING ===== */

/* Column 1: Select/Checkbox */
#sharedAccountsTable th:nth-child(1),
#sharedAccountsTable td:nth-child(1),
#otherAccountsTable th:nth-child(1),
#otherAccountsTable td:nth-child(1) {
    width: 8%;
    min-width: 60px;
    max-width: 80px;
    text-align: center;
}

/* Column 2: Display Name (Shared Accounts Table - Now 4 columns) */
#sharedAccountsTable th:nth-child(2),
#sharedAccountsTable td:nth-child(2) {
    width: 25%;
    min-width: 200px;
    max-width: 300px;
    padding-left: 16px;
    text-align: left;
}

/* Column 2: Display Name (Other Accounts Table - Now 4 columns) */
#otherAccountsTable th:nth-child(2),
#otherAccountsTable td:nth-child(2) {
    width: 25%;
    min-width: 200px;
    max-width: 300px;
    padding-left: 16px;
    text-align: left;
}

/* Column 3: Account Name (Shared Accounts Table - Now 4 columns) */
#sharedAccountsTable th:nth-child(3),
#sharedAccountsTable td:nth-child(3) {
    width: 25%;
    min-width: 200px;
    max-width: 300px;
    text-align: left;
    padding-left: 16px;
}

/* Column 3: Account Name (Other Accounts Table - Now 4 columns) */
#otherAccountsTable th:nth-child(3),
#otherAccountsTable td:nth-child(3) {
    width: 25%;
    min-width: 200px;
    max-width: 300px;
    text-align: left;
    padding-left: 16px;
}

/* Column 4: Account (Shared Accounts Table - Now 4 columns) */
#sharedAccountsTable th:nth-child(4),
#sharedAccountsTable td:nth-child(4) {
    width: 25%;
    min-width: 200px;
    max-width: 300px;
    padding-left: 16px;
    text-align: left;
    word-break: break-all;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Column 4: Account (Other Accounts Table - Now 4 columns) */
#otherAccountsTable th:nth-child(4),
#otherAccountsTable td:nth-child(4) {
    width: 25%;
    min-width: 200px;
    max-width: 300px;
    padding-left: 16px;
    text-align: left;
    word-break: break-all;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Shared Accounts Table Column Alignment (Now 4 columns) */
#sharedAccountsTable th:nth-child(2), /* Display Name column */
#sharedAccountsTable td:nth-child(2) {
    text-align: left;
}

/* Ensure status badges in other accounts table are properly centered */
#otherAccountsTable .status-badge-container {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* ===== TABLE CONTAINER ===== */

/* Table Responsive Container */
.table-responsive {
    overflow-x: hidden !important;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

/* ===== STATUS BADGES ===== */

/* Status Badge Container */
.status-badge-container {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2px 0;
    min-height: 36px;
}

/* Status Badge */
.status-badge {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.status-badge i {
    font-size: 12px;
    line-height: 1;
}

/* ===== INACTIVE ACCOUNT STYLING ===== */

/* Inactive account row styling for Other Accounts Table */
#otherAccountsTable tbody tr.inactive-account {
    opacity: 0.6;
    background-color: #f8f9fa;
}

#otherAccountsTable tbody tr.inactive-account:hover {
    background-color: #f8f9fa !important;
}

#otherAccountsTable tbody tr.inactive-account .other-account-checkbox {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none; /* Prevent checkbox interaction */
}

#otherAccountsTable tbody tr.inactive-account .copy-account-id-btn {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

#otherAccountsTable tbody tr.inactive-account .status-badge {
    opacity: 0.7;
    pointer-events: auto;
}

#otherAccountsTable tbody tr.inactive-account .govern-value {
    opacity: 0.7;
    pointer-events: auto;
}

/* ===== CHECKBOX CONTAINER STYLING ===== */

/* Checkbox container for tooltip functionality */
.checkbox-container {
    display: inline-block;
    position: relative;
    cursor: pointer;
}

.checkbox-container:hover {
    cursor: pointer;
}

/* Ensure disabled checkboxes in inactive accounts show tooltip */
#otherAccountsTable tbody tr.inactive-account .checkbox-container {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: auto; /* Allow tooltip to work */
}

#otherAccountsTable tbody tr.inactive-account .checkbox-container input[type='checkbox'] {
    cursor: not-allowed;
    pointer-events: none; /* Prevent checkbox interaction */
}

/* ===== RESPONSIVE DESIGN ===== */

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    /* Adjust column widths for mobile - now 4 columns */
    /* Column 2: Display Name */
    #sharedAccountsTable th:nth-child(2),
    #sharedAccountsTable td:nth-child(2),
    #otherAccountsTable th:nth-child(2),
    #otherAccountsTable td:nth-child(2) {
        width: 30% !important;
        min-width: 150px !important;
        max-width: 200px !important;
        padding-left: 12px;
    }

    /* Column 3: Account Name */
    #sharedAccountsTable th:nth-child(3),
    #sharedAccountsTable td:nth-child(3),
    #otherAccountsTable th:nth-child(3),
    #otherAccountsTable td:nth-child(3) {
        width: 30% !important;
        min-width: 150px !important;
        max-width: 200px !important;
        padding-left: 12px;
    }

    /* Column 4: Account */
    #sharedAccountsTable th:nth-child(4),
    #sharedAccountsTable td:nth-child(4),
    #otherAccountsTable th:nth-child(4),
    #otherAccountsTable td:nth-child(4) {
        width: 30% !important;
        min-width: 150px !important;
        max-width: 200px !important;
        padding-left: 12px;
    }
}

/* ===== DATA TABLES INTEGRATION ===== */

/* DataTables Wrapper - Ensure proper spacing and alignment */
.dataTables_wrapper {
    margin-top: 0 !important;
}

.dataTables_length select {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    padding: 6px 12px !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 4px !important;
    background: white !important;
    font-size: 14px !important;
    color: #415094 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    margin-left: 8px !important;
}

.dataTables_length select:focus {
    outline: none !important;
    border-color: #884ffb !important;
    box-shadow: 0 0 0 2px rgba(136, 79, 251, 0.1) !important;
}

.dataTables_length label {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 14px !important;
    color: #415094 !important;
    font-weight: 400 !important;
    margin: 0 !important;
    margin-right: 8px !important;
}

/* Reset <li> wrapper — layout only */
.dataTables_paginate .paginate_button {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 2px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    list-style: none !important;
    box-shadow: none !important;
}

/* Style the visible <a> element */
.dataTables_paginate .paginate_button .page-link {
    width: 32px !important;
    height: 32px !important;
    background: #ffffff !important;
    border-radius: 3px !important;
    text-align: center !important;
    line-height: 32px !important;
    padding: 0 !important;
    border: 1px solid #dee2e6 !important;
    color: #415094 !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    min-width: 32px !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
}

.dataTables_paginate .paginate_button.previous .page-link,
.dataTables_paginate .paginate_button.next .page-link {
    width: auto !important;
    min-width: 60px !important;
    padding: 0 8px !important;
    font-size: 14px !important;
}

.dataTables_paginate .paginate_button.active .page-link {
    background: #884ffb !important;
    border: 1px solid #884ffb !important;
    color: #fff !important;
    box-shadow: 0 5px 10px rgba(136, 79, 251, 0.04) !important;
}

.dataTables_paginate .paginate_button .page-link:hover {
    background: #884ffb !important;
    border: 1px solid #884ffb !important;
    color: #fff !important;
    box-shadow: 0 5px 10px rgba(136, 79, 251, 0.04) !important;
}

.dataTables_paginate .paginate_button.disabled .page-link {
    background: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
    color: #6c757d !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

.dataTables_paginate .paginate_button.disabled .page-link:hover {
    background: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
    color: #6c757d !important;
    box-shadow: none !important;
}

/* Mobile responsive adjustments for DataTables */
@media (max-width: 768px) {
    .dataTables_wrapper .dataTables_info,
    .dataTables_info {
        text-align: center !important;
        padding-bottom: 6px !important;
    }

    .dataTables_wrapper .dataTables_paginate,
    .dataTables_paginate {
        justify-content: center !important;
        padding-top: 6px !important;
    }

    .dataTables_paginate .paginate_button .page-link {
        width: 28px !important;
        height: 28px !important;
        line-height: 28px !important;
        font-size: 12px !important;
        min-width: 28px !important;
    }

    .dataTables_paginate .paginate_button.previous .page-link,
    .dataTables_paginate .paginate_button.next .page-link {
        width: auto !important;
        min-width: 50px !important;
        font-size: 12px !important;
    }
}

/* Filter Controls Styling */
.filter-controls {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.filter-controls .input-group {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-controls .input-group-text {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

.filter-controls .form-control {
    border-left: none;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.filter-controls .form-control:focus {
    border-color: #6c757d;
    box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.25);
}

.filter-controls .btn-outline-secondary {
    border-left: none;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.filter-controls .btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
}

/* Restore border for Clear Selection button */
.filter-controls #clearSelectionBtn {
    border-left: 1px solid #6c757d;
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
}

/* Filter Status Styling */
.filter-controls .text-muted {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .filter-controls .row {
        flex-direction: column;
    }

    .filter-controls .col-md-6 {
        margin-bottom: 10px;
    }

    .filter-controls .text-end {
        text-align: left !important;
    }
}

/* Shared Tag Styling - Base styles */
.shared-tag {
    display: inline-block;
    padding: 2px 8px;
    margin-left: 10px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

/* Shared variant (green) */
.shared-tag {
    background-color: #e6ffe6;
    border: 1px solid #339933;
    color: #339933;
}

.shared-tag:hover {
    background-color: #d4f5d4;
    border-color: #2d862d;
    color: #2d862d;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Not Shared variant (red) */
.shared-tag.not-shared {
    background-color: #ffe6e6;
    border: 1px solid #cc3333;
    color: #cc3333;
}

.shared-tag.not-shared:hover {
    background-color: #ffd4d4;
    border-color: #b32d2d;
    color: #b32d2d;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Responsive adjustments for shared tags */
@media (max-width: 768px) {
    .shared-tag {
        font-size: 10px;
        padding: 1px 6px;
        margin-left: 8px;
    }
}

@media (max-width: 576px) {
    .shared-tag {
        font-size: 9px;
        padding: 1px 5px;
        margin-left: 6px;
    }
}

/* Panel Description Styling */
.panel-description {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 15px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.panel-description p {
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
    color: #6c757d;
}

.panel-description i {
    color: #007bff;
    font-size: 13px;
}

/* Responsive adjustments for panel description */
@media (max-width: 768px) {
    .panel-description {
        padding: 10px 12px;
        margin: 12px 0;
    }

    .panel-description p {
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .panel-description {
        padding: 8px 10px;
        margin: 10px 0;
    }

    .panel-description p {
        font-size: 12px;
    }
}

/* Panel Header Description Styling */
.panel-header-description {
    font-size: 13px !important;
    line-height: 1.3 !important;
    margin-top: 5px !important;
    color: rgba(255, 255, 255, 0.8) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    font-weight: 400 !important;
}

.panel-header-description i {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 12px !important;
}

/* Responsive adjustments for panel header description */
@media (max-width: 768px) {
    .panel-header-description {
        font-size: 12px !important;
        margin-top: 4px !important;
    }

    .panel-header-description i {
        font-size: 11px !important;
    }
}

@media (max-width: 576px) {
    .panel-header-description {
        font-size: 11px !important;
        margin-top: 3px !important;
    }

    .panel-header-description i {
        font-size: 10px !important;
    }
}

/* ===== TAB NAVIGATION STYLING ===== */

/* Tab Navigation Styling */
#accountsTabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 8px 8px 0 0;
    padding: 15px 25px;
    font-weight: 600;
    color: #6c757d;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transition: all 0.3s ease;
    position: relative;
    margin-right: 5px;
}

#accountsTabs .nav-link:hover {
    color: #495057;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-bottom-color: #adb5bd;
    transform: translateY(-1px);
}

#accountsTabs .nav-link.active,
#accountsTabs .nav-link[aria-selected='true'] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom-color: #667eea;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

#accountsTabs .nav-link.active i,
#accountsTabs .nav-link[aria-selected='true'] i {
    color: rgba(255, 255, 255, 0.9) !important;
}

#accountsTabs .nav-link.active .badge,
#accountsTabs .nav-link[aria-selected='true'] .badge {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

/* Tab Content Styling */
#accountsTabContent {
    border: 1px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 15px 15px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tab-pane {
    padding: 25px;
}

.tab-pane.fade {
    transition: opacity 0.3s ease;
}

.tab-pane.fade.show {
    opacity: 1;
}

/* Enhanced Compact Stats Styling for Tabbed Interface */
.compact-stats-container {
    display: flex;
    justify-content: flex-start;
}

.compact-stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 200px;
}

.compact-stats-icon {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.compact-stats-content {
    flex: 1;
}

.compact-stats-number {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
    color: white;
}

.compact-stats-label {
    font-size: 12px;
    opacity: 0.9;
    line-height: 1.2;
    color: white;
}

/* Validation Messages */
.validation-messages-container {
    margin-top: 15px;
}

.validation-messages-container .alert {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2);
}

/* Enhanced Table Styling for Tabbed Interface */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.lms_table_active {
    margin-bottom: 0;
}

.lms_table_active thead th {
    background: #f8f9fa;
    color: #495057;
    border: none;
    padding: 15px;
    font-weight: 600;
}

.lms_table_active thead th.sortable-column {
    background: #f8f9fa;
    color: #495057;
}

.lms_table_active tbody td {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.lms_table_active tbody tr:hover {
    background-color: #f8f9fa;
}

/* Button Styling */
.btn-add-account:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2) !important;
}

/* Alert Styling */
.alert-warning {
    border-left: 4px solid #ffc107;
    background-color: #fff3cd;
    border-color: #ffeeba;
    color: #856404;
}

/* Responsive Design for Tabs */
@media (max-width: 768px) {
    .compact-stats-card {
        min-width: 150px;
        padding: 15px;
    }

    .compact-stats-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .compact-stats-number {
        font-size: 20px;
    }

    .compact-stats-label {
        font-size: 11px;
    }

    #accountsTabs .nav-link {
        padding: 10px 15px;
        font-size: 14px;
    }

    .tab-pane {
        padding: 15px;
    }
}

/* ===== LOOKUP MODE RADIO BUTTONS ===== */

/* Lookup Mode Selection Styling */
.lookup-mode-selection {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 30px;
}

.lookup-mode-selection h5 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    margin-top: 13px;
    gap: 8px;
}

.lookup-mode-selection h5 i {
    color: #667eea;
    font-size: 18px;
}

/* Radio Button Styling */
.lookup-mode-selection .form-check-inline {
    margin-right: 25px;
    margin-bottom: 0;
}

.lookup-mode-selection .form-check-input {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    border: 2px solid #6c757d;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lookup-mode-selection .form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.25);
}

.lookup-mode-selection .form-check-input:focus {
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.25);
    border-color: #667eea;
}

.lookup-mode-selection .form-check-label {
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.lookup-mode-selection .form-check-label:hover {
    color: #667eea;
}

.lookup-mode-selection .form-check-label i {
    font-size: 14px;
    color: #6c757d;
    transition: color 0.2s ease;
}

.lookup-mode-selection .form-check-input:checked + .form-check-label i {
    color: #667eea;
}

/* ===== LOOKUP UI SECTION STYLING ===== */
.lookup-ui-section {
    transition: all 0.3s ease;
}

.lookup-ui-section.hidden {
    display: none !important;
}

/* Cross-Organization Grant Access Button */
#crossOrgGrantAccessBtn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

#crossOrgGrantAccessBtn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

#crossOrgGrantAccessBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

/* Cross-Organization Account Hash Input Validation */
#crossOrgAccountHash.is-valid {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

#crossOrgAccountHash.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.cross-org-account-form .form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 12px 16px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.cross-org-account-form .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* ===== RESPONSIVE DESIGN FOR LOOKUP MODE ===== */

@media (max-width: 768px) {
    .lookup-mode-selection {
        padding: 15px;
        margin-bottom: 20px;
    }

    .lookup-mode-selection h5 {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .lookup-mode-selection .form-check-inline {
        margin-right: 15px;
        margin-bottom: 8px;
    }
}

@media (max-width: 576px) {
    .lookup-mode-selection {
        padding: 12px;
    }

    .lookup-mode-selection .form-check-inline {
        display: block;
        margin-right: 0;
        margin-bottom: 10px;
    }
}
