/* frontend/app_style.css */
/* Stylesheet for Sidebar Layout */
/* MODIFIED: Styles for revised compact attribute mapping layout. */
/* Last Updated: Friday, July 4, 2025 at 1:25 PM CEST */

/* === Reset/Base === */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    background-color: #f0f2f5;
    color: #333;
    display: flex;
    flex-direction: column;
    margin: 0;
}

.logo-full {
    width: 40%;
    max-width: max-content;
}

/* === Containers === */
#app-container {
    display: none;
    flex-direction: column;
    flex-grow: 1;
    height: 100vh;
    overflow: hidden;
}

#auth-section {
    display: block;
    max-width: 500px;
    margin: 60px auto;
    padding: 30px 35px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

#app-header {
    background-color: #ffffff;
    padding: 0 25px;
    border-bottom: 1px solid #dde1e6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    height: 55px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

#org-name,
#add-member-username {
    margin-bottom: 10px;
}

.header-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo {
    margin-top: 10px;
}

.app-body {
    display: flex;
    flex-grow: 1;
    overflow: hidden;
    height: calc(100vh - 55px);
}

#left-sidebar {
    width: 240px;
    background-color: #ffffff;
    border-right: 1px solid #dde1e6;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow: hidden;
}

#main-content {
    flex-grow: 1;
    padding: 25px 30px;
    overflow-y: auto;
    background-color: #f8f9fa;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* === Sidebar === */
.sidebar-logo-area {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.sidebar-menu {
    list-style: none;
    padding: 10px 0;
    margin: 0;
    flex-grow: 1;
    overflow-y: auto;
}

.menu-header {
    padding: 15px 20px 5px 20px;
    font-size: 0.75em;
    font-weight: 600;
    background: #f5f5f5;
    color: #090056;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 15px;
    cursor: default;
}

.menu-header:first-child {
    margin-top: 0;
}

.menu-item {
    margin-bottom: 2px;
}

.menu-item .menu-button {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px 20px;
    border: none;
    background-color: transparent;
    text-align: left;
    font-size: 0.95em;
    color: #495057;
    cursor: pointer;
    border-radius: 0;
    transition: background-color 0.15s ease, color 0.15s ease;
    border-left: 3px solid transparent;
    position: relative;
}

.menu-icon {
    margin-right: 12px;
    font-size: 1.1em;
    min-width: 20px;
    max-width: 10%;
    display: inline-block;
    text-align: center;
    color: #6c757d;
    transition: color 0.15s ease;
}

.menu-item:hover .menu-button {
    background-color: #e9ecef;
    color: #212529;
}

.menu-item:hover .menu-button .menu-icon {
    color: #495057;
}

.menu-item.active .menu-button {
    background-color: #e7f1ff;
    color: #0d6efd;
    font-weight: 600;
    border-left-color: #0d6efd;
}

.menu-item.active .menu-button .menu-icon {
    color: #0d6efd;
}

.menu-separator hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 10px 20px;
}

.badge-soon {
    font-size: 0.7em;
    font-weight: 500;
    color: #6c757d;
    background-color: #e9ecef;
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: auto;
    vertical-align: middle;
    line-height: 1.2;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid #dde1e6;
    margin-top: auto;
    font-size: 0.9em;
    color: #6c757d;
    flex-shrink: 0;
}

#user-info {
    margin-bottom: 10px;
    font-weight: 500;
    color: #343a40;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#logout-area button {
    width: 100%;
    margin: 0;
    padding: 6px 12px;
}


/* === Main Content & Panes === */
.view-pane {
    display: none;
    background-color: #ffffff;
    padding: 25px 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #dee2e6;
}

.view-pane.active {
    display: block;
}

#logs-provisioning-view-content.view-pane.active,
#applications-assignments-view-content.view-pane.active {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}


.view-pane h3 {
    font-size: 1.6em;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    color: #343a40;
    flex-shrink: 0;
}

#logs-provisioning-view-content>p,
#applications-assignments-view-content>p {
    flex-shrink: 0;
}


.prompt-section h3.prompt-title,
.info-section h3.info-title {
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    font-size: 1.3em;
    font-weight: 600;
}

.prompt-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.content-header h3 {
    margin: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}


/* === Messages === */
.message {
    margin-top: 15px;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 0.95em;
    border: 1px solid transparent;
    line-height: 1.5;
    flex-shrink: 0;
}

.message:empty {
    display: none;
}

.message.error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.message.success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.message.info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

#main-content-error {
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    font-size: 0.95em;
    line-height: 1.5;
    display: none;
}

#main-content-error.show-error {
    display: block;
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}


/* === Forms & Inputs === */
label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 0.9em;
    color: #495057;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
textarea,
select.form-control {
    display: block;
    width: 100%;
    padding: 5px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.95em;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    line-height: 1.4;
    /* Consistent line height for inputs */
    font-family: inherit;
    height: 33px;
    /* Set a consistent height for inputs */
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
textarea:focus,
select.form-control:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

input[type="checkbox"] {
    margin-right: 5px;
    vertical-align: middle;
}

.form-group {
    margin-bottom: 15px;
}

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.form-check-input {
    margin-right: 8px;
    margin-top: 0;
    width: auto;
    margin-bottom: 0;
}

.form-check-label {
    margin-bottom: 0;
    font-weight: normal;
    white-space: nowrap;
}

.form-check small {
    display: block;
    font-size: 0.85em;
    color: #6c757d;
    margin-top: 3px;
    margin-left: 25px;
}

/* Styles for fieldset in modals or forms */
.form-fieldset {
    border: 1px solid #d8dde3; /* Lighter border */
    padding: 15px;
    margin-bottom: 20px; /* Space below fieldset */
    border-radius: 6px;
}

.form-fieldset legend {
    font-weight: 600;
    padding: 0 8px; /* Spacing around legend text */
    font-size: 1.05em; /* Slightly larger than label */
    color: #343a40;
    margin-left: -8px; /* Align with padding of fieldset */
}

/* Styling for checkbox groups */
.checkbox-group {
    display: flex;
    flex-wrap: wrap; /* Allow checkboxes to wrap */
    gap: 15px; /* Horizontal gap */
    padding-top: 5px;
}

.checkbox-group label.form-check-label { /* Re-target form-check-label for consistency */
    display: inline-flex; /* Use inline-flex for better alignment of checkbox and text */
    align-items: center;
    margin-right: 15px; /* Keep existing margin-right for spacing between items */
    margin-bottom: 5px; /* Add some bottom margin if they wrap */
    font-weight: normal; /* Override default label bolding if not desired for checkboxes */
    cursor: pointer;
}

.checkbox-group input[type="checkbox"].form-check-input {
    margin-right: 6px; /* Space between checkbox and its text */
    /* vertical-align: middle; /* Already set */
}

/* === Basic Button Styles === */
.button {
    display: inline-flex;
    /* Use inline-flex for better centering of text/icons */
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 5px;
    font-size: 0.95em;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.15s ease-in-out;
    margin-right: 5px;
    margin-bottom: 5px;
    line-height: 1.5;
    white-space: nowrap;
    /* vertical-align: middle; /* Not needed as much with inline-flex */
}

.button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    background-color: #ccc !important;
    border-color: #bbb !important;
    color: #777 !important;
}

.button-primary {
    background-color: #007bff;
    color: #ffffff;
    border-color: #007bff;
}

.button-primary:hover:not(:disabled) {
    background-color: #0056b3;
    border-color: #0056b3;
}

.button-danger {
    background-color: #dc3545;
    color: #ffffff;
    border-color: #dc3545;
}

.button-danger:hover:not(:disabled) {
    background-color: #c82333;
    border-color: #bd2130;
}

.button-success {
    background-color: #28a745;
    color: #ffffff;
    border-color: #28a745;
}

.button-success:hover:not(:disabled) {
    background-color: #1e7e34;
    border-color: #1c7430;
}

.button-secondary {
    background-color: #6c757d;
    color: #ffffff;
    border-color: #6c757d;
}

.button-secondary:hover:not(:disabled) {
    background-color: #5a6268;
    border-color: #545b62;
}

.button-red-inverted {
    background-color: #fff4f3;
    border-color: #dc3545;
    color: #dc3545;
}

.button-red-inverted:hover:not(:disabled) {
    background-color: #ffd6d5;
    border-color: #dc3545;
    color: #dc3545;
}

.button-small {
    padding: 5px 10px;
    font-size: 0.875em;
}

/* === Log Controls - Added/Refined Styles === */
#log-controls-container {
    display: flex;
    gap: 12px; /* Spacing between control groups */
    align-items: center;
    flex-wrap: wrap; /* Allow controls to wrap on smaller screens */
    padding: 10px 15px; /* Consistent padding */
    background-color: #f8f9fa; /* Light background for the controls bar */
    border-bottom: 1px solid #dee2e6; /* Separator from the log entries */
    margin-bottom: 10px; /* Space before log entries */
    border-radius: 0; /* Remove previous specific rounding if view-pane already has it */
}

.log-control-group {
    display: flex;
    align-items: center;
    gap: 6px; /* Spacing within a group, e.g., label and select */
}

#log-controls-container label {
    font-weight: 500;
    font-size: 0.85em;
    color: #495057; /* Consistent label color */
    margin-bottom: 0; /* Override default label margin */
    white-space: nowrap;
}

/* Targeting select specifically within the log controls */
#log-controls-container select#log-sort-key.form-control {
    min-width: 140px; /* Slightly wider for "Timestamp" */
    /* Use existing .form-control height (33px) and font-size (0.95em) */
    /* Override padding if needed for vertical alignment, but .form-control should handle it */
    padding-top: 0.25rem; /* Adjust for select's specific rendering */
    padding-bottom: 0.25rem;
    line-height: 1.4; /* from .form-control */
    margin-bottom: 0; /* Ensure no extra margin */
    font-size: 0.875em; /* Match button-small font size */
    height: 30px; /* Align with button-small */
}

/* Buttons within log controls already use .button and .button-small */
/* Ensure they align well if needed, align-items in flex container should handle this */
#log-controls-container button.button-small {
    margin-bottom: 0; /* Override default button margin */
    height: 30px; /* Match select height */
}

.log-controls-separator {
    border-left: 1px solid #ced4da; /* Standard border color */
    height: 24px; /* Adjust height to look nice */
    margin: 0 5px; /* Spacing around separator */
}

#log-filter-placeholder p {
    font-size: 0.85em; /* Match label size */
    color: #6c757d; /* Standard secondary text color */
    margin: 0;
}

/* Styling for Filter Controls */
#log-controls-container input#log-filter-message.form-control,
#log-controls-container select#log-filter-level.form-control {
    min-width: 150px; /* Give enough space for typing/selection */
    height: 30px;
    padding: 4px 8px;
    font-size: 0.875em;
    line-height: 1.5;
    margin-bottom: 0;
    vertical-align: middle;
}

#log-controls-container input#log-filter-message.form-control {
    flex-grow: 1; /* Allow message filter to take more space if available */
    max-width: 300px; /* But not too much */
}

#log-controls-container button#log-apply-filters-button.button-small,
#log-controls-container button#log-clear-filters-button.button-small {
    height: 30px;
    margin-bottom: 0;
    vertical-align: middle;
}

/* Make sure .content-header H3 has no bottom border if used above controls */
#logs-provisioning-view-content > .content-header {
    margin-bottom: 0; /* Remove space if controls are directly below */
    padding-bottom: 10px; /* Reduce padding if too much space */
    border-bottom: none; /* Remove border if controls bar provides separation */
}
#logs-provisioning-view-content > .content-header h3 {
    margin-bottom: 0; /* Remove space below h3 within the header */
}

/* === Specific Component Styles === */
h4 {
    font-size: 1.2em;
    font-weight: 500;
    color: #495057;
    margin-top: 1.5em;
    margin-bottom: 0.75em;
}

#member-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

#member-list li {
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

#member-list li span[style*="flex-grow: 1"] {
    margin-right: 10px;
}

#member-list li div[style*="margin-left: auto"] {
    margin-left: auto;
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

span.role-badge {
    padding: 3px 8px;
    font-size: 0.8em;
    border-radius: 4px;
    background-color: #e9ecef;
    color: #495057;
    margin-right: 5px;
}

#member-list li:last-child {
    border-bottom: none;
}

/* Application List */
#configured-apps-list,
#access-request-apps-list {
    list-style: none;
    padding: 0;
    margin-top: 0;
}

#configured-apps-list li.app-list-item,
#access-request-apps-list li.app-list-item {
    background-color: #ffffff;
    margin-bottom: 10px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 0;
    overflow: hidden;
}

.app-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    cursor: default;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    gap: 10px;
}

#configured-apps-list li.expanded .app-list-header,
#access-request-apps-list li.expanded .app-list-header {
    border-bottom-color: #adb5bd;
}

.app-list-header strong.app-name {
    font-size: 1.2em;
    color: #007bff;
    flex-grow: 1;
}

.app-status-buttons {
    display: flex;
    gap: 5px;
    align-items: center;
}

.status-button {
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    color: #495057;
    padding: 4px 10px;
    font-size: 0.85em;
}

.status-button:hover {
    background-color: #e9ecef;
}

.status-button.active-status {
    font-weight: bold;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.status-button.status-enabled.active-status {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.status-button.status-dry-run.active-status {
    background-color: #fff3cd;
    border-color: #ffeeba;
    color: #856404;
}

.status-button.status-disabled.active-status {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.app-list-header .app-header-buttons {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-shrink: 0;
}

.app-list-header .button-small {
    padding: 4px 12px;
    font-size: 0.9em;
}

.app-list-content {
    padding-left: 20px;
    padding-right: 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    background-color: #ffffff;
    border-top: 1px solid #dee2e6;
    margin-top: -1px;
}

#configured-apps-list li.expanded .app-list-content,
#access-request-apps-list li.expanded .app-list-content {
    max-height: 1500px;
    transition: max-height 0.5s ease-in, padding 0.5s ease-in;
    padding: 20px;
}

.inner-tab-nav {
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 20px;
    padding-bottom: 5px;
}

.inner-tab-button {
    padding: 8px 14px;
    border: none;
    border-bottom: 2px solid transparent;
    background-color: transparent;
    cursor: pointer;
    font-size: 0.95em;
    color: #495057;
    margin-right: 8px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.inner-tab-button:hover {
    color: #0056b3;
}

.inner-tab-button.active {
    color: #007bff;
    font-weight: 600;
    border-bottom-color: #007bff;
}

.inner-tab-pane {
    display: none;
}

.inner-tab-pane.active {
    display: block;
}

.app-details-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 15px;
    margin-top: 10px;
    margin-bottom: 15px;
    font-size: 0.95em;
    align-items: center;
}

.app-details-grid>label {
    font-weight: 600;
    color: #495057;
    text-align: right;
    margin-bottom: 0;
}

.token-container {
    display: flex;
    align-items: center;
}

.token-container input {
    flex-grow: 1;
    margin-bottom: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    min-width: 150px;
}

/* Removed line-height here */
.token-container .button-small {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin-left: -1px;
    /* padding: 10px 10px; */
    height: 33px;
    /* Match input height */
    font-size: 0.8em;
    flex-shrink: 0;
    margin-top: 5px;
}

.toggle-vis-button {
    font-size: 1.1em;
}

/* Attribute Mappings NEW/MODIFIED Styles for Compact Layout */
.mappings-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed #e9ecef;
}

.mappings-section h5 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1em;
    font-weight: 600;
    color: #495057;
}

.mappings-list {}

.mapping-item.compact-mapping-item {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    align-items: center;
    /* Vertically align children relative to each other */
    flex-wrap: nowrap;
}

.mapping-item .mapping-input-group {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-width: 150px;
}

.mapping-item .mapping-input-group.source-group {
    flex-basis: 35%;
}

.mapping-item .mapping-input-group.target-group {
    flex-basis: 45%;
}

/* Increased for label + checkbox */

.mapping-item .mapping-label {
    font-size: 0.8em;
    color: #444;
    margin-bottom: 3px;
    font-weight: 500;
    width: 100%;
    display: block;
}

.mapping-item .mapping-target-label-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 3px;
}

.mapping-item .mapping-target-label-header .mapping-label {
    /* The "Target Attribute/Path:" text */
    margin-bottom: 0;
    width: auto;
    display: inline;
    white-space: nowrap;
    flex-shrink: 1;
    /* Allow it to shrink if necessary */
}

.mapping-item .mapping-target-display-label-inline {
    /* Friendly SCIM name next to "Target Attribute/Path:" */
    font-size: 0.9em;
    color: #0056b3;
    margin-left: 6px;
    font-weight: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* max-width: 150px; /* Adjust if needed */
}

.mapping-item .mapping-multivalue-label.compact-multivalue {
    font-size: 0.8em;
    font-weight: normal;
    white-space: nowrap;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding-left: 5px;
    /* Add some space from the display label inline */
}

.mapping-item .mapping-multivalue-label.compact-multivalue input[type="checkbox"] {
    margin-right: 3px;
    vertical-align: middle;
}

.mapping-item .mapping-multivalue-label.compact-multivalue.disabled-label,
.mapping-item .mapping-multivalue-label.compact-multivalue input[type="checkbox"]:disabled {
    color: #999;
    cursor: not-allowed;
}

.mapping-item .mapping-multivalue-label.compact-multivalue input[type="checkbox"]:disabled+* {
    /* Style text next to disabled checkbox */
    color: #999;
    cursor: not-allowed;
}


.mapping-item input[type="text"].form-control {
    font-size: 0.9em;
    /* padding: 7px 9px; /* Handled by general input */
    margin-bottom: 0;
    width: 100%;
    /* height: 33px; /* Handled by general input */
}

.mapping-item input[type="text"].form-control.readonly-visual {
    background-color: #e9ecef;
    color: rgb(153, 153, 153);
    cursor: default;
    /* Not not-allowed, as it's just for display */
}

.mapping-item .mapping-arrow-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    /* height is implicitly set by align-items on parent .mapping-item */
    /* The input fields define the primary height reference */
    padding: 0 5px;
    margin-top: 20px;
}

.mapping-item .mapping-arrow {
    font-weight: bold;
    color: #555;
}

.mapping-item .mapping-controls.compact-controls {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto;
    height: 33px;
    /* Match input field height */
    margin-top: 26px;
}

.mapping-item .button.remove-mapping-button {
    padding: 0;
    width: 75px;
    height: 100%;
    font-size: 0.8em;
    line-height: 33px;
    text-align: center;
}

/* :disabled styles are handled by the general .button:disabled rule */

.mapping-item .remove-mapping-placeholder {
    width: 75px;
    height: 33px;
    display: inline-block;
}

.app-endpoint-input.endpoint-needs-input,
.mapping-item-mandatory.mapping-item-needs-input .mapping-source-key {
    border: 1px solid red !important;
    background-color: #fff0f0;
}

.app-endpoint-value-container input.form-control {
    height: 33px;
    width: 100%;
}

.mandatory-star {
    color: red;
    font-weight: bold;
    margin-right: 2px;
}

.add-mapping-button {
    margin-top: 15px;
}

.push-group-checkbox {
    margin-bottom: 5px;
}

.group-assignment-filter {
    flex-grow: 1;
}

/* === Provisioning Log Display === */
.log-display-area {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    max-height: 60vh; /* Or whatever height you prefer */
    overflow-y: auto;
    padding: 0; /* Remove padding if log-entry has its own */
}

.log-entry {
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
    font-family: 'Menlo', 'Consolas', 'Liberation Mono', monospace;
    font-size: 0.875em;
    line-height: 1.5;
}

.log-entry:last-child {
    border-bottom: none;
}

.log-entry-header {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.log-timestamp {
    color: #666;
    margin-right: 10px;
    font-size: 0.9em;
}

.log-level-badge {
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: bold;
    font-size: 0.8em;
    text-transform: uppercase;
    color: #fff;
}

.log-level-info {}
.log-entry.log-level-info .log-level-badge {
    background-color: #007bff; /* Blue */
}
.log-entry.log-level-info { border-left: 3px solid #007bff; }

.log-level-error {}

.log-entry.log-level-error .log-level-badge {
    background-color: #dc3545; /* Red */
}
.log-entry.log-level-error { border-left: 3px solid #dc3545; color: #721c24; background-color: #f8d7da20; }
.log-entry.log-level-error .log-message { color: #721c24; }


.log-level-warn, .log-entry.log-level-warn .log-level-badge {
    background-color: #ffc107; /* Yellow */
    color: #333;
}
.log-entry.log-level-warn { border-left: 3px solid #ffc107; color: #856404; background-color: #fff3cd20;}
.log-entry.log-level-warn .log-message { color: #856404; }


.log-level-debug, .log-entry.log-level-debug .log-level-badge {
    background-color: #6c757d; /* Gray */
}
.log-entry.log-level-debug { border-left: 3px solid #6c757d; color: #383d41; background-color: #e2e3e520;}
.log-entry.log-level-debug .log-message { color: #383d41; }


.log-level-trace, .log-entry.log-level-trace .log-level-badge {
    background-color: #adb5bd; /* Lighter Gray */
}
.log-entry.log-level-trace { border-left: 3px solid #adb5bd; color: #495057; background-color: #f0f1f220;}


.log-level-fatal, .log-entry.log-level-fatal .log-level-badge {
    background-color: #343a40; /* Dark */
}
.log-entry.log-level-fatal { border-left: 3px solid #343a40; background-color: #d6d8db20; }

.log-level-parse_error, .log-entry.log-level-parse_error .log-level-badge {
    background-color: #fd7e14; /* Orange */
}
.log-entry.log-level-parse_error { border-left: 3px solid #fd7e14; color: #823e00; background-color: #ffe8d620;}


.log-message {
    white-space: pre-wrap; /* Allow wrapping but preserve whitespace like newlines */
    word-break: break-word;
    margin-bottom: 5px;
}

.log-context {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 5px;
    padding-left: 10px;
    border-left: 2px solid #eee;
}
.log-context strong {
    color: #333;
}

.log-details-wrapper {
    margin-top: 5px;
}

.log-details-toggle {
    font-size: 0.9em;
    color: #007bff;
    text-decoration: none;
    cursor: pointer;
}
.log-details-toggle:hover {
    text-decoration: underline;
}

.log-details-content {
    margin-top: 5px;
    padding: 8px;
    background-color: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 3px;
    font-size: 0.9em;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 200px;
    overflow-y: auto;
}

/* === Deprovisioning, App Actions, Modals, Provisioning Log, Assignment Matrix (Unchanged) === */
.deprovisioning-options {
    margin-top: 10px;
}

.depro-option-group {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    background-color: #fdfdfd;
}

.depro-group-label {
    font-weight: 600;
    color: #343a40;
    margin-bottom: 10px;
    display: block;
    font-size: 1em;
}

.depro-radio-options label {
    display: block;
    margin-bottom: 8px;
    font-weight: normal;
    cursor: pointer;
}

.depro-radio-options input[type="radio"] {
    margin-right: 8px;
    vertical-align: middle;
}

.app-actions {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.app-actions .message {
    margin-top: 0;
    padding: 5px 10px;
    order: -1;
    flex-grow: 1;
    text-align: left;
}

.modal-overlay {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.visible {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: #fff;
    padding: 25px 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 550px;
    position: relative;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.visible .modal-content {
    transform: scale(1);
}

#create-org-prompt .modal-content,
#request-membership-prompt .modal-content,
#pending-request-info .modal-content {
    max-width: 500px;
}

#create-org-prompt .prompt-title,
#request-membership-prompt .prompt-title,
#pending-request-info .info-title {
    font-size: 1.4em;
    text-align: center;
    margin-bottom: 15px;
}

#create-org-prompt #create-org-prompt-message,
#request-membership-prompt #request-membership-prompt-message,
#pending-request-info .modal-content p {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1em;
    line-height: 1.6;
    color: #333;
}

#pending-request-info .modal-content p:last-of-type {
    margin-bottom: 15px;
}

#create-org-prompt .prompt-actions,
#request-membership-prompt .prompt-actions,
#pending-request-info .prompt-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.4em;
}

.modal-close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.8em;
    line-height: 1;
    color: #aaa;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
}

.modal-close-button:hover {
    color: #333;
}

#available-apps-modal-list {
    list-style: none;
    padding: 0;
    max-height: 45vh;
    overflow-y: auto;
    margin-top: 15px;
    margin-bottom: 15px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
}

#available-apps-modal-list li {
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    gap: 10px;
}

#available-apps-modal-list li .app-details {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    margin-right: 10px;
}

#available-apps-modal-list li .app-details strong {
    font-size: 1.1em;
}

#available-apps-modal-list li .app-details .app-description {
    font-size: 0.85em;
    color: #6c757d;
    margin: 2px 0;
}

#available-apps-modal-list li .app-details .app-endpoint {
    font-family: monospace;
    font-size: 0.8em;
    color: #888;
    word-break: break-all;
    margin-top: 3px;
}

#available-apps-modal-list li:last-child {
    border-bottom: none;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

#logs-provisioning-view-content .log-output-container {
    margin-top: 15px;
    margin-bottom: 15px;
    flex-grow: 1;
    min-height: 200px;
    max-height: 75vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#provisioning-log-output {
    background-color: #282c34;
    color: #abb2bf;
    font-family: 'Menlo', 'Consolas', 'Liberation Mono', monospace;
    font-size: 0.85em;
    line-height: 1.6;
    padding: 15px;
    border-radius: 6px;
    height: 100%;
    overflow-y: auto;
    white-space: pre-wrap;
    border: 1px solid #3e4451;
    box-sizing: border-box;
}

.assignment-matrix-container {
    margin-top: 15px;
    overflow-x: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.assignment-matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.assignment-matrix-table th {
    border: 1px solid #dee2e6;
    padding: 8px 10px;
    text-align: center;
    vertical-align: middle;
}

.assignment-matrix-table td {
    border: 1px solid #dee2e6;
    padding: 8px 10px;
    text-align: left;
    vertical-align: middle;
}

.assignment-matrix-table thead th {
    background-color: #f8f9fa;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
}

.assignment-matrix-table tbody tr:nth-child(even) {
    background-color: #fdfdfd;
}

.assignment-matrix-table tbody tr:hover {
    background-color: #f1f3f5;
}

.assignment-matrix-table td.user-name-cell {
    font-weight: 500;
    min-width: 180px;
}

.assignment-matrix-table td.assignment-cell {
    text-align: center;
    font-size: 1.2em;
    min-width: 80px;
}

.assignment-icon-assigned {
    color: #28a745;
}

.assignment-icon-not-assigned {
    color: #6c757d;
}

/* === Global Notification Overlay === */
.global-notification {
    position: fixed;
    top: 20px;
    /* Start position for animation */
    left: 50%;
    transform: translateX(-50%);
    min-width: 320px;
    max-width: 600px;
    /* Adjusted max-width */
    width: auto;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out, top 0.3s ease-in-out;
    background-color: #f8f9fa;
    color: #212529;
    border: 1px solid #dee2e6;
    font-size: 0.95em;
}

.global-notification.visible {
    display: flex;
    opacity: 1;
    top: 30px;
}

.global-notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.global-notification .notification-text {
    flex-grow: 1;
    margin-right: 15px;
    line-height: 1.4;
}

.global-notification .notification-close-button {
    background: transparent;
    border: none;
    font-size: 1.6em;
    font-weight: bold;
    color: inherit;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.7;
    margin-left: 10px;
}

.global-notification .notification-close-button:hover {
    opacity: 1;
}

.global-notification.success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.global-notification.error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.global-notification.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

.header-content > div:last-child:not(.header-logo) { /* Target the last div in header-content if it's not the logo */
    margin-left: auto; /* Pushes the button/actions to the right */
}

#admin-header-actions .button,
#portal-header-actions .button {
 /* margin-right: 0; /* Remove default right margin if only one button in this container */
    margin-bottom: 0; /* Remove default bottom margin */
    margin-left: 10px; /* Add some space if there are other items to its left, like user info */
}

/* My Requests Table Styling */
.my-requests-section h4 {
    font-size: 1.3em;
    color: #333;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.table-responsive-container {
    overflow-x: auto; /* Allow horizontal scrolling on small screens */
}

.my-requests-table { /* Can inherit from .assignment-matrix-table if desired */
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
    margin-top: 10px;
}

.my-requests-table th,
.my-requests-table td {
    border: 1px solid #dee2e6;
    padding: 8px 12px;
    text-align: left;
    vertical-align: top; /* Align content to top for notes */
}

.my-requests-table thead th {
    background-color: #f8f9fa;
    font-weight: 600;
    white-space: nowrap;
}

.my-requests-table tbody tr:nth-child(even) {
    background-color: #fdfdfd;
}

.my-requests-table tbody tr:hover {
    background-color: #f1f3f5;
}

.status-badge {
    padding: 3px 7px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
    text-transform: capitalize;
    display: inline-block;
    color: #fff;
    white-space: nowrap; 
}

.status-pending { background-color: #ffc107; color: #333; }
.status-approved { background-color: #28a745; }
.status-added_to_group { background-color: #20c997; } /* Teal for provisioned */
.status-rejected { background-color: #dc3545; }
.status-cancelled { background-color: #6c757d; }
.status-failed_group_addition { background-color: #bd2130; } /* Darker red for failure */
.status-expired { background-color: #adb5bd; color: #333; }

/* Styling for the requestable app cards in the portal */
.requestable-apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); /* Adjust minmax for card size */
    gap: 20px;
    padding: 10px 0;
}

@media (min-width: 1200px) { /* For larger screens, aim for 5 columns */
    .requestable-apps-grid {
        grid-template-columns: repeat(5, 1fr);
    }
} 
@media (max-width: 1199px) and (min-width: 992px) { /* 4 columns */
    .requestable-apps-grid {
        grid-template-columns: repeat(4, 1fr);
    }
} 
@media (max-width: 991px) and (min-width: 768px) { /* 3 columns */
    .requestable-apps-grid {
        grid-template-columns: repeat(3, 1fr);
    }
} 
@media (max-width: 767px) and (min-width: 576px) { /* 2 columns */
    .requestable-apps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* On very small screens, it will be 1 column due to minmax(220px, 1fr) */

.requestable-app-card {
    background-color: #ffffff;
    border: 1px solid #e0e4e7;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 180px; /* Give cards a decent height */
}

.requestable-app-card:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

.requestable-app-card h4.requestable-app-name,
.requestable-app-card .requestable-app-name { /* Support both h4 or div */
    font-size: 1.2em;
    font-weight: 600;
    color: #007bff; /* Consistent with admin app names */
    margin-bottom: 8px;
}

.requestable-app-card .app-description-text {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 15px;
    flex-grow: 1;
    line-height: 1.5;
}

.requestable-app-actions {
    margin-top: auto; /* Push button to the bottom */
    text-align: right; /* Align button to the right */
}
.requestable-app-actions .button {
    width: auto; /* Don't make button full width unless desired */
    padding: 6px 12px;
}

/* Approval Card specific styles (if any, can extend .requestable-app-card) */
.approval-card .requestable-app-name {
    font-size: 1.1em; /* Slightly smaller if needed */
    color: #333;
}
.approval-card .request-details p {
    margin-bottom: 4px;
}
.approval-card .approval-actions {
    display: flex;
    justify-content: flex-end; /* Align buttons to the right */
    gap: 10px;
    margin-top: 15px;
}

/* === Notification Settings Refactor === */
h4.notification-section-header {
    margin-top: 25px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}
h4.notification-section-header:first-of-type {
    margin-top: 0;
}
hr.config-separator {
    display: none; /* No longer needed as we use headers */
}

.notification-provider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 0;
}

.provider-card {
    border: 2px solid #ced4da;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
}

.provider-card:hover:not(.active):not(.disabled) {
    border-color: #80bdff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.1);
    transform: translateY(-2px);
}

.provider-card.active {
    border-color: #28a745; /* Green border for active */
    background-color: #f0fff4; /* Light green background */
    box-shadow: 0 0 0 2px #28a745; /* Green ring */
}
.provider-card[data-provider="disabled"].active {
    border-color: #6c757d;
    background-color: #f8f9fa;
    box-shadow: 0 0 0 2px #6c757d;
}

.provider-card#email-provider-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #f8f9fa;
}
.provider-card#email-provider-card.disabled:hover {
    transform: none;
    box-shadow: none;
}


.provider-card .provider-icon {
    font-size: 2.5em;
    margin-bottom: 12px;
}

.provider-card h4 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.2em;
    color: #333;
}

.provider-card p {
    font-size: 0.9em;
    color: #6c757d;
    flex-grow: 1;
}

#email-provider-card {
    cursor: default; /* Email card itself isn't clickable */
}
#email-provider-card:hover {
     transform: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

#email-config-state {
    margin-top: auto;
    padding-top: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

#email-config-state .toggle-switch-container {
    display: flex;
    align-items: center;
    gap: 10px;
}
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}
.toggle-switch input { display:none; }
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 28px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}
input:checked + .slider { background-color: #28a745; }
input:checked + .slider:before { transform: translateX(22px); }

/* === Responsive === */
@media (max-width: 768px) {
    .app-body {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }

    #left-sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #dde1e6;
        overflow-y: hidden;
        flex-direction: row;
        align-items: stretch;
        flex-shrink: 0;
    }

    .sidebar-menu {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        flex-grow: 1;
        padding: 0;
        margin: 0;
        white-space: nowrap;
        align-items: stretch;
        border-bottom: none;
    }

    .menu-header {
        display: none;
    }

    .menu-item {
        margin-bottom: 0;
        margin-right: 0;
        display: flex;
    }

    .menu-button {
        border-left: none;
        border-bottom: 3px solid transparent;
        padding: 10px 15px;
        height: 100%;
    }

    .menu-item.active .menu-button {
        border-bottom-color: #0d6efd;
        border-left-color: transparent;
        background-color: transparent;
    }

    .menu-icon {
        margin-right: 8px;
        font-size: 1em;
    }

    .sidebar-footer {
        display: none;
    }

    #main-content {
        padding: 15px;
        height: auto;
        overflow-y: visible;
    }

    .app-details-grid {
        grid-template-columns: 1fr;
        gap: 5px 0;
    }

    .app-details-grid>label {
        text-align: left;
        margin-bottom: 2px;
        font-size: 0.85em;
    }

    .app-list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .app-status-buttons {
        order: 1;
        width: 100%;
        justify-content: space-around;
    }

    .app-list-header .app-header-buttons {
        order: 2;
        width: 100%;
        justify-content: flex-end;
    }

    .mapping-item.compact-mapping-item {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        border-bottom: 1px dashed #eee;
        padding-bottom: 10px;
    }

    .mapping-item.compact-mapping-item:last-child {
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 0;
    }

    .mapping-item.compact-mapping-item .mapping-input-group {
        width: 100%;
        min-width: unset;
        flex-basis: auto;
    }

    .mapping-item.compact-mapping-item .mapping-arrow-container {
        text-align: center;
        padding: 5px 0;
        align-self: center;
        height: auto;
    }

    .mapping-item.compact-mapping-item .mapping-arrow {
        transform: rotate(90deg);
        display: inline-block;
    }

    .mapping-item.compact-mapping-item .mapping-controls.compact-controls {
        width: 100%;
        justify-content: flex-end;
        margin-left: 0;
        padding-top: 5px;
        height: auto;
    }

    .mapping-item.compact-mapping-item .mapping-controls.compact-controls .mapping-multivalue-label {
        margin-right: auto;
    }

    .mapping-item.compact-mapping-item .mapping-controls.compact-controls .button.remove-mapping-button {
        width: auto;
        height: auto;
        line-height: 1.5;
        padding: 5px 10px;
    }

    .mapping-item.compact-mapping-item .remove-mapping-placeholder {
        display: none;
    }

    .mapping-item.compact-mapping-item .mapping-target-label-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .mapping-item.compact-mapping-item .mapping-target-label-header .mapping-multivalue-label.compact-multivalue {
        margin-left: 0;
        padding-left: 0;
        margin-top: 5px;
    }

    .depro-option-group {
        padding: 10px;
    }

    .depro-group-label {
        font-size: 0.95em;
    }

    .depro-radio-options label {
        font-size: 0.9em;
    }

    #logs-provisioning-view-content .log-output-container {
        min-height: 150px;
        max-height: 75vh;
    }

    #provisioning-log-output {
        font-size: 0.8em;
    }

    .assignment-matrix-table th,
    .assignment-matrix-table td {
        padding: 6px 8px;
        font-size: 0.85em;
    }

    .assignment-matrix-table td.user-name-cell {
        min-width: 120px;
    }

    .assignment-matrix-table td.assignment-cell {
        min-width: 60px;
        font-size: 1.1em;
    }
}

/* === Custom Dropdown Styles === */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown .dropbtn, .dropdown .dropdown-button {
    background-color: #f8f9fa; 
/*	background-color: #abf7b1;*/
    color: #495057;
/*    border: 1px solid #ced4da;*/
    border: 1px solid #28a745;
    cursor: pointer;
    text-align: left;
    width: 400px;
    min-width: 180px; /* Ensure a decent default width */
}

.dropdown .dropbtn:hover, .dropdown .dropdown-button:hover {
    border-color: #80bdff;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #ffffff;
    min-width: 100%; /* Match the button width */
    max-width: 150%;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.15);
    z-index: 1001;
    border: 1px solid #ced4da;
    border-radius: 4px;
    margin-top: 2px;
    max-height: 250px; /* Approx height for search input + 5 items */
    overflow-y: auto;
}

.dropdown-content input[type="text"] {
    padding: 10px 15px;
    border: none;
    border-bottom: 1px solid #e9ecef;
    width: 100%;
    box-sizing: border-box;
    font-size: 0.9em;
    height: auto;
}
.dropdown-content input[type="text"]:focus {
    outline: none;
    border-bottom-color: #80bdff;
}


.dropdown-content a {
    color: black;
    padding: 10px 15px;
    text-decoration: none;
    display: block;
    font-size: 0.9em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-content a:hover {
    background-color: #e9ecef;
}

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

.dropdown-content.show-up {
    top: auto;
    bottom: 100%;
    margin-top: 0;
    margin-bottom: 2px;
}

