:root {
    --font-body: Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu,
    Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --font-mono: 'Fira Mono', monospace;
    --color-bg-0: #222222 50%;
    --color-bg-1: rgba(75, 0, 130, 1) 70%;
    --color-bg-2: rgba(139, 0, 0, 1) 100%;
    --color-text: black;
    --column-width: 42rem;
    --column-margin-top: 4rem;
    font-family: var(--font-body);
    color: var(--color-text);
}

body {
    height: calc(100vh - 80px);
    margin: 0;
    padding: 0;
    background-attachment: fixed;
    background-color: var(--color-bg-1);
    background-size: 100vw 100vh;
    background-image:
            linear-gradient(135deg, var(--color-bg-0), var(--color-bg-1), var(--color-bg-2));
}


p {
    font-weight: 400;
    line-height: 1.5;
}

a:hover {
    text-decoration: underline;
}

h3 {
    margin-top: 5px;
}


pre {
    font-size: 16px;
    font-family: var(--font-mono);
    background-color: rgba(255, 255, 255, 0.45);
    border-radius: 3px;
    box-shadow: 2px 2px 6px rgb(255 255 255 / 25%);
    padding: 0.5em;
    overflow-x: auto;
    color: var(--color-text);
}

.text-column {
    display: flex;
    max-width: 48rem;
    flex: 0.6;
    flex-direction: column;
    justify-content: center;
    margin: 0 auto;
}

input {
    width: 90%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

button {
    font-size: inherit;
    font-family: inherit;
}


button:focus:not(:focus-visible) {
    outline: none;
}

@media (min-width: 720px) {
    h1 {
        font-size: 2.4rem;
    }
}

section {
    width: 90%;
    padding: 0.5em;
    background-color: rgba(0, 0, 0, 0.3);
    overflow: hidden;
    min-height: 235px;
    margin-bottom: 20px;
}

select {
    width: 90%;
    padding: 10px;
    font-size: 14px;
}

.login-container {
    width: 100%;
    color: white;
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    background: #000000;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.login-form label {
    display: block;
    color: white;
    margin-bottom: 10px;
}

.login-form h2 {
    color: white;
}

.login-form input {
    width: 90%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.login-form select {
    max-width:120px;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.login-button {
    width: 100%;
    max-width: 380px;
    margin-top: 10px;
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.login-button:hover {background-color: #0056b3;
}

.main-container {
    background-color: white;
    width: 90%;
    height: 100%;
    margin-left: auto;
    margin-right: auto;
    margin-top: 80px;
    margin-bottom: 20px;
    border-radius: 10px;
}

.column-container {
    display: flex;
    flex-direction: column;
    margin-left: 20px;
    margin-right: 20px;
    height: 100%;
    overflow: hidden;
}

.autocomplete-dropdown div {
    color: #000000;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.autocomplete-dropdown {
    width: 90%;
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.autocomplete-dropdown text {
    color: black;
}

.autocomplete-dropdown button {
    background-color: white;
    color: black;
    padding: 5px;
    width: 100%;
    border: none;
    text-align: left;
    font-size: 14px;
    margin-right: 0px;
}

.autocomplete-dropdown ul {
    text-align: left;
    list-style: none;
    padding: 0;
    margin: 0;
}

.autocomplete-dropdown li {
    padding: 8px;
    cursor: pointer;
}

.autocomplete-dropdown li:hover {
    background: #f0f0f0;
}

.rank-content {
    display: flex;
    align-items: center;
    gap: 10px;  
}

.rank-content p {
    margin: 0;
    font-weight: bold;
}

.rank-content iframe {
    flex-grow: 1; 
    max-width: 300px; 
}

.rank-content button {
    color: white;
    border: none;
    cursor: pointer;
    margin-left: 10px;
    padding: 5px 10px;
    border-radius: 4px;
}

.rank-element {
    position: relative;
    text-align: left;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.2);
    margin-bottom: 5px;
}

.rank-element button {
    position: absolute;
    right: 10px;
    top: 2px;
    background-color: transparent;
    color: #f0f0f0;
    border: none;
    font-size: 14px;
    padding: 8px;
    margin-right: 0px;
}

.rank-element button:hover {
    cursor: pointer;
}

.other-input {
    margin-top: 20px;
    display: none;
    padding: 8px;
    width: 85%;
    border: 1px solid #ccc;
    border-radius: 5px;
    resize: none;
}

.recommendation-button, 
.disabled-button {
    padding: 10px;
    margin: 10px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
}

.recommendation-button {
    background-color: #000000;
    color: white;
    cursor: pointer;
}

.disabled-button {
    background-color: rgba(0, 0, 0, 0.8);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.6;
}


.checkbox-form {
    display: flex;
    justify-content: space-between;
    width: 90%;
    margin-left: 20px;
}

.checkbox-form div {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.parent {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(11, auto);
    grid-column-gap: 0px;
    grid-row-gap: 0px;
}

.div1 { grid-area: 1 / 1 / 2 / 3; padding: 20px; border-bottom: solid;}
.div2 { grid-area: 2 / 1 / 4 / 2; padding-left: 20px; border-right: solid;}
.div3 { grid-area: 5 / 1 / 6 / 2; border-right: solid; border-bottom: 1px solid gray;}
.div4 { grid-area: 6 / 1 / 7 / 2; border-right: solid; border-bottom: 1px solid gray;}
.div5 { grid-area: 7 / 1 / 8 / 2; border-right: solid; border-bottom: 1px solid gray;}
.div6 { grid-area: 8 / 1 / 9 / 2; border-right: solid; border-bottom: 1px solid gray;}
.div7 { grid-area: 9 / 1 / 10 / 2; border-right: solid; border-bottom: 1px solid gray;}
.div8 { grid-area: 10 / 1 / 11 / 2; border-right: solid;}
.div9 { grid-area: 2 / 2 / 4 / 3; padding-left: 20px;}
.div10 { grid-area: 5 / 2 / 6 / 3; border-bottom: 1px solid gray;}
.div11 { grid-area: 6 / 2 / 7 / 3; border-bottom: 1px solid gray;}
.div12 { grid-area: 7 / 2 / 8 / 3; border-bottom: 1px solid gray;}
.div13 { grid-area: 8 / 2 / 9 / 3; border-bottom: 1px solid gray;}
.div14 { grid-area: 9 / 2 / 10 / 3; border-bottom: 1px solid gray;}
.div15 { grid-area: 10 / 2 / 11 / 3; }
.div16 { grid-area: 4 / 1 / 5 / 3; border-top: solid; border-bottom: solid;}
.div17 { grid-area: 11 / 1 / 12 / 3; border-top: solid;}

.parent2 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(10, auto);
    grid-column-gap: 0px;
    grid-row-gap: 0px;
    }
    
.div18 { grid-area: 1 / 1 / 2 / 4; padding: 20px; border-bottom: solid;}
.div19 { grid-area: 2 / 1 / 4 / 2; padding-left: 20px; border-right: solid;}
.div20 { grid-area: 5 / 1 / 6 / 2; border-right: solid; border-bottom: 1px solid gray;}
.div21 { grid-area: 6 / 1 / 7 / 2; border-right: solid; border-bottom: 1px solid gray;}
.div22 { grid-area: 7 / 1 / 8 / 2; border-right: solid; border-bottom: 1px solid gray;}
.div23 { grid-area: 8 / 1 / 9 / 2; border-right: solid; border-bottom: 1px solid gray;}
.div24 { grid-area: 9 / 1 / 10 / 2; border-right: solid; border-bottom: 1px solid gray;}
.div25 { grid-area: 2 / 2 / 4 / 3; padding-left: 20px; border-right: solid;}
.div26 { grid-area: 5 / 2 / 6 / 3; border-right: solid; border-bottom: 1px solid gray;}
.div27 { grid-area: 6 / 2 / 7 / 3; border-right: solid; border-bottom: 1px solid gray;}
.div28 { grid-area: 7 / 2 / 8 / 3; border-right: solid; border-bottom: 1px solid gray;}
.div29 { grid-area: 8 / 2 / 9 / 3; border-right: solid; border-bottom: 1px solid gray;}
.div30 { grid-area: 9 / 2 / 10 / 3; border-right: solid; border-bottom: 1px solid gray;}
.div31 { grid-area: 2 / 3 / 4 / 4; padding-left: 20px;}
.div32 { grid-area: 5 / 3 / 6 / 4; border-bottom: 1px solid gray;}
.div33 { grid-area: 6 / 3 / 7 / 4; border-bottom: 1px solid gray;}
.div34 { grid-area: 7 / 3 / 8 / 4; border-bottom: 1px solid gray;}
.div35 { grid-area: 8 / 3 / 9 / 4; border-bottom: 1px solid gray;}
.div36 { grid-area: 9 / 3 / 10 / 4; border-bottom: 1px solid gray;}
.div37 { grid-area: 4 / 1 / 5 / 4; border-top: solid; border-bottom: solid;}
.div38 { grid-area: 10 / 1 / 11 / 4; border-top: solid;}

.loading {
    width: 100%;
    min-height: 350px;
    display: flex; 
    align-items: center; 
    justify-content: center; 
}

p:has(input#id_permission) {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

p input#id_permission {
    order: -1;
    width: 100px;
}