html {
    height: 100%;
    font-size: medium;
}

body {
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
    font-feature-settings: normal;
    font-variation-settings: normal;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
    line-height: 1.5;
    height: 100%;
    overflow: hidden;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    color: #000;
    overscroll-behavior: none;
    font-family: ui-sans-serif, system-ui, "Open Sans", Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
    -webkit-font-smoothing: antialiased;
    background-color: #050505;
}

input,
button,
select,
textarea,
form {
    font-size: 1rem;
    font-family: ui-sans-serif, system-ui, "Open Sans", Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
}

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

.short-input {
    width: 150px;
    margin-right: 5px;
}


div.forgot_password_link {
    width: 100%;
    text-align: center;
    margin: 8px 0;
}

a {
    color: #989898;
    text-decoration: none;
}

a:hover {
    color: #eee;
    text-decoration: underline;
}

div.forgotPasswordForm label,
div.registerUserForm label {
    width: 100%;
    text-align: left;
    margin-bottom: 8px;
}

h1 {
    font-size: 1.5rem;
}

input {
    width: 100%;
    padding: 0.5rem;
    margin-left: 8px;
    margin-bottom: 15px;
}


div.forgotPasswordForm input[type="text"],
div.registerUserForm input[type="text"] {
    width: 100%;
    text-align: left;
    margin-left: 8px;
}

.loginOptions,
.registerUserForm,
.forgotPasswordForm {
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
    font-feature-settings: normal;
    font-variation-settings: normal;
    -webkit-tap-highlight-color: transparent;
    line-height: inherit;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    color: #000;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: hidden;
    display: grid;
    background-image: url(/oauth2/static/img-better-global.jpg);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: 50%;
    place-items: center;
    object-fit: contain;
    width: 97rem;
    height: 48rem;
}

.login {
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
    font-feature-settings: normal;
    font-variation-settings: normal;
    -webkit-tap-highlight-color: transparent;
    line-height: inherit;
    text-rendering: optimizeLegibility;
    box-sizing: border-box;
    padding: 1rem;
    width: 32rem;
    min-height: 26rem;
    display: grid;
    place-content: center;
    color: #fff;
    background-color: #121316;
    border: none;
    place-items: center;
    -webkit-font-smoothing: antialiased;
}

main {
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
    font-feature-settings: normal;
    font-variation-settings: normal;
    -webkit-tap-highlight-color: transparent;
    line-height: inherit;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    color: #000;
    box-sizing: border-box;
    height: 100%;
    overflow-x: hidden;
    overflow-y: hidden;
    display: grid;
    place-content: center;
    background-color: #050505;
    max-width: 100vw;
}

.tagline {
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
    font-feature-settings: normal;
    font-variation-settings: normal;
    -webkit-tap-highlight-color: transparent;
    text-rendering: optimizeLegibility;
    color: #fff;
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
    font-weight: inherit;
    margin: 0;
    margin-top: 2rem;
    margin-bottom: 1rem;
    text-align: center;
    line-height: 1.2;
    font-size: 2rem;
}

.outer {
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
    font-feature-settings: normal;
    font-variation-settings: normal;
    -webkit-tap-highlight-color: transparent;
    line-height: inherit;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    color: #000;
    box-sizing: border-box;
    height: 100%;
}

form {
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
    font-feature-settings: normal;
    font-variation-settings: normal;
    -webkit-tap-highlight-color: transparent;
    line-height: inherit;
    text-rendering: optimizeLegibility;
    box-sizing: border-box;
    padding: 1rem;
    width: 32rem;
    min-height: 26rem;
    display: grid;
    place-content: center;
    color: #fff;
    background-color: #121316;
    border: none;
    place-items: center;
    -webkit-font-smoothing: antialiased;
}

.button_primary {
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    font-weight: inherit;
    margin: 0;
    text-transform: none;
    cursor: pointer;
    -webkit-appearance: button;
    background-image: none;
    border: none;
    margin-top: 1rem;
    padding: .5rem 1rem;
    border-radius: .25rem;
    outline-offset: .125rem;
    width: 100%;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    line-height: 1.5rem;
    color: #fff;
    background-color: #050505;
}

.button_secondary {
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    font-weight: inherit;
    margin: 0;
    text-transform: none;
    cursor: pointer;
    -webkit-appearance: button;
    background-image: none;
    border: none;
    margin-top: 1rem;
    padding: .5rem 1rem;
    outline-offset: .125rem;
    width: 100%;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    color: #fff;
    background-color: #121316;
}

.button_primary:hover,
.button_secondary:hover {
    background-color: #333;
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #121316;
    color: #fff;
    padding: 2rem;
    border-radius: 0.5rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-message {
    margin: 0 0 1.5rem 0;
    line-height: 1.5;
    font-size: 1rem;
}

.modal-close-button {
    background-color: #050505;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 1rem;
    min-width: 80px;
}

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

/* CSV Upload Area Styles */
.csv-upload-area {
    margin: 1rem 0;
    width: 100%;
}

.csv-dropzone {
    border: 2px dashed #666;
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    background-color: #1a1a1a;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.csv-dropzone:hover {
    border-color: #888;
    background-color: #222;
}

.csv-dropzone.dragover {
    border-color: #0066cc;
    background-color: rgba(0, 102, 204, 0.1);
    transform: scale(1.02);
}

.csv-dropzone-content {
    color: #ccc;
}

.csv-upload-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.csv-upload-text {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.csv-browse-btn {
    background: none;
    border: none;
    color: #0066cc;
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
    padding: 0;
    margin: 0;
}

.csv-browse-btn:hover {
    color: #0088ff;
}

.csv-upload-hint {
    font-size: 0.85rem;
    color: #888;
    margin-top: 0.5rem;
}

/* Ensure the table actions area has proper spacing */
.table-actions {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
}

.csv-upload-note {
    color: #888;
    font-size: 0.85rem;
}

/* Group pills and related styles */
.group-pill {
    display: inline-flex;
    align-items: center;
    background-color: #0066cc;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    margin: 0.25rem;
    font-size: 0.85rem;
}

.group-pill .group-name {
    margin-right: 0.5rem;
}

.group-pill .remove-group {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    margin: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.group-pill .remove-group:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.groups-pills {
    display: flex;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.no-groups-message {
    color: #888;
    font-style: italic;
}

.groups-count {
    color: #888;
    font-size: 0.9rem;
}

/* Individual groups display */
.individual-groups-display {
    margin-top: 0.25rem;
}

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

.modal .modal-content {
    background-color: #121316;
    margin: 5% auto;
    padding: 0;
    border-radius: 0.5rem;
    width: 80%;
    max-width: 600px;
    color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #fff;
}

.modal-close {
    background: none;
    border: none;
    color: #ccc;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #fff;
}

.modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-note {
    background-color: #2a2a2a;
    padding: 0.75rem;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
    color: #ccc;
    font-size: 0.9rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #333;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.groups-scrollable {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #333;
    border-radius: 0.25rem;
    padding: 0.5rem;
    background-color: #1a1a1a;
}

.group-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    margin-bottom: 0.25rem;
}

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

.group-item input[type="checkbox"] {
    margin-right: 0.5rem;
    margin-left: 0;
    margin-bottom: 0;
    width: auto;
}

.group-item label {
    margin: 0;
    color: #ccc;
    cursor: pointer;
    user-select: none;
}

.group-item:hover {
    background-color: #2a2a2a;
    border-radius: 0.25rem;
}

.selected-groups-summary h4 {
    margin: 1rem 0 0.5rem 0;
    color: #fff;
}

/* Button styles for manage groups and delete */
.btn-manage-groups {
    background-color: #0066cc;
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.8rem;
}

.btn-manage-groups:hover {
    background-color: #0088ff;
}

.btn-delete {
    background-color: #cc0000;
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.8rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-delete:hover {
    background-color: #ff0000;
}

.btn-secondary {
    background-color: #666;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    background-color: #777;
}