#loginForm carousel {
    height: var(--height);
    width: var(--width);
    transition: height .125s linear;
}

#loginForm carousel-items {
    padding: 5px;
    margin: -5px;
}

form- {
    top: 50%;
    left: 50%;
    display: grid;
    position: relative;
    position: absolute;
    translate: -50% -50%;
    width: 400px;
    min-width: fit-content;
    background: white;
    padding: 30px;
    box-sizing: border-box;
    padding-top: 0px;
    row-gap: 20px;
    outline: none;
    z-index: 1;
    opacity: 1;
    filter: blur(0px);
    transition: opacity .25s linear, filter .25s linear;
}

form-[fade] {
    opacity: 0;
    filter: blur(20px);
    pointer-events: none;
}

form-:after {
    content: '';
    position: fixed;
    height: 0px;
    width: 0px;
    display: block;
    outline: 100vmax solid #0c1c47;
    z-index: -2;
    left: 50%;
    top: 50%;
    translate: -50% -50%;
    contain: layout;
}

form-:before {
    content: '';
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0px;
    left: 0px;
    display: block;
    background: white;
    z-index: -1;
    translate: 0% 0%;
    border-radius: 20px;
    box-shadow: 0px 20px 45px 0px #00000060;
}

form-body {
    display: contents;
}

form-foot {
}

form-foot:empty {
    display: none;
}

form-set {
    display: flex;
    flex-direction: column;
    row-gap: 10px;
}

form-[mode="choice"] form-set[role="up"] {
    display: none;
}

form-head {
    display: flex;
    background: url(../src/icon-calabrio-light.png) no-repeat center 20px;
    background-size: auto 45px;
    justify-content: center;
    align-items: end;
    flex-direction: column;
    align-items: center;
    padding-top: 80px;
    row-gap: 20px;
}

form-head:before {
    content: "Sign In";
    content: "AI Refiner Suite";
    display: block;
    font-size: 35px;
    font-weight: 500;
}

form-head:after {
    content: "Sign In";
    display: block;
    font-size: 20px;
    font-weight: 600;
    opacity: .5;
    /* text-transform: uppercase; */
    display: none;
}

form-[context="admin"] form-head:before {
    content: 'Admin Panel';
}

#loginForm form-set :is( input, select, select-wrap ) {
    outline: none;
    border: none;
    height: 40px;
    box-shadow: none;
    display: flex;
    align-items: center;
    font-size: 16px;
    width: 100%;
    padding: 0px !important;
    box-sizing: border-box;
}

#loginForm form-set :is( input, select-wrap ) {
    display: flex;
    border: var(--edge);
    border-radius: 10px;
    text-indent: 20px;
}

form-body select-wrap {
    padding-right: 0px !important;
}

#loginForm select-wrap select {
    background: none;
    width: 100%;
    text-indent: 20px;
    contain: unset;
    font-weight: 600;
    border-radius: 10px;
    padding-right: 0px !important;
    background-repeat: no-repeat;
    background-position: calc(100% - 15px) center;
    background-size: auto 10px;
    background-image: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2272.7409%22%20height%3D%2246.3167%22%3E%3Cpath%20d%3D%22M36.3949%2046.3167C38.9612%2046.2794%2040.968%2045.3665%2043.0807%2043.2681L70.5245%2015.2559C72.0403%2013.7401%2072.7409%2011.9802%2072.7409%209.81264C72.7409%205.42872%2069.1667%201.80573%2064.8574%201.80573C62.7014%201.80573%2060.6573%202.70435%2058.9923%204.43244L35.1817%2029.124L37.7084%2029.124L13.7859%204.43244C12.1209%202.74165%2010.0999%201.80573%207.895%201.80573C3.58569%201.80573%200%205.42872%200%209.81264C0%2011.9429%200.737882%2013.7028%202.21637%2015.2559L29.709%2043.2681C31.8332%2045.4038%2033.8543%2046.3167%2036.3949%2046.3167Z%22%20fill%3D%22%23000000%22%20fill-opacity%3D%220.2%22%2F%3E%3C%2Fsvg%3E);
}

#loginForm buttons button:focus, form-body input:focus, form-body select-wrap:has(select:focus) {
    outline: var(--focus-outline);
}

#loginForm input[type='password']::-webkit-input-placeholder {
    color: rgba(0, 0, 0, .25) !important;
}

button[disabled] {
    opacity: .5 !important;
}

form-body:after {
    color: red;
    height: 0px;
}

form-body[state='rejected']:after {
    content: 'Invalid Sign In';
}

form-body[state='error']:after {
    content: 'Error: See Console';
}

form-body[state='expired']:after {
    content: 'Session Expired — Sign In Again';
}

form-body[state='rejected'] input:is([name="username"],[name="password"]) {
    background: #ff000010;
}

form-body[state='accepted'] input:is([name="username"],[name="password"]) {
    background: #00ff2010;
}

form-body select-wrap:before {
    content: attr(label);
    white-space: nowrap;
    opacity: .25;
    font-size: 16px;
    letter-spacing: .75px;
    width: 0px;
    display: inline-block;
    overflow: visible;
    padding: 0px;
    line-height: initial;
}

form-body select-wrap:has( option:checked ):before {
    content: "";
}

form-body select:before {
    content: "x";
}

form-body > buttons {
    display: flex;
    column-gap: 20px;
    margin-top: 10px;
}

form-body buttons button {
    flex: 1 1;
    /* min-height: 40px; */
}

form-body-items[error]:after {
    content: attr(error);
}

#formSubmit {
    min-height: 40px;
    font-size: 17px;
    padding: 0px;
    background: #0c1c47;
    color: white;
}

#formSubmit:focus {
    outline: var(--focus-outline);
}

#adminPortalLink {
    order: 1;
    text-align: center;
    color: gray;
    font-size: 14px;
    border-bottom: 1px solid;
    width: fit-content;
    justify-self: center;
    padding: 0px 1px;
    display: flex;
    cursor: pointer;
    border-radius: 0.5px;
}

#adminPortalLink:focus {
    outline: var(--focus-outline);
    outline-offset: 3px;
}

#adminPortalLink[open]:before {
    content: '􀯶';
    font-family: 'SF-Pro';
    display: inline-block;
    scale: .75;
    font-weight: bold;
}

#adminPanel {
    display: grid;
    grid-template-rows: 1fr auto;
    row-gap: 10px;
    text-rendering: geometricPrecision;
    position: relative;
}

#adminPanel .header .slim {
    width2: 150px;
}

#adminPanel buttons {
}

#adminPanel form-panel-head {
    translate: 0px -100%;
    position: absolute;
    top: -25px;
}

#adminPanel form-panel-body {
    position: relative;
    display: grid;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: row;
    max-height: 60vh;
    gap: 10px;
}

#adminPanel form-panel-foot buttons {
    display: flex;
    justify-content: space-between;
    column-gap: 10px;
}

#adminPanel form-panel-foot buttons button {
    flex: 0 0;
    padding-left: 20px;
    padding-right: 20px;
}

#adminPanel tr:has(code-editor) {
    display: flex;
    flex-direction: column;
}

#adminPanel tr code-editor {
    margin: 10px;
    width: calc(100% - 20px);
    box-shadow: var(--menu_shadow);
}

form-[mode="admin"] form-body:before {
    content: "Admin Panel";
}

form-[mode="admin"] form-body {
    width: 50vw;
    min-width: 800px;
    /* height: calc(100% - 40px); */
    margin-top: 0px;
}

form-panel-body > table.mac {
    /* position: absolute; */
    /* height: 100%; */
}

#adminPortal list- {
    display: block;
    overflow: auto;
    outline: .5px solid rgba(0,0,0,.15);
    border-radius: 6px;
    /* max-height: 100px; */
}

#adminPortal list-item {
    display: block;
    padding: 3px 8px;
    box-sizing: border-box;
    letter-spacing: .5px;
    cursor: default;
    font-size: 14px;
    max-height: 300px;
    overflow: auto;
}

#adminPortal list-item:nth-child(2n) {
    background: var(--tint-gray);
}

#adminPortal list-item[selected] {
    color: white;
    background: rgb(0 100 225);
}

carousel[message="admin"] {
    width: 80vw;
}

carousel[message="admin-select"] buttons {
    display: flex;
    flex-direction: column;
    row-gap: 10px;
    align-content: center;
    height: 100%;
    justify-content: center;
}

carousel[message="admin-select"] buttons > button {
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
}

#adminPanelUsers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr auto;
    gap: 10px;
    height: 100%;
}

#adminPanelUsers code-editor {
}

#adminPanelUsers buttons {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
}

#adminPanelUsers #userDelete {
    color: red;
    margin-right: auto;
}

#adminPanelUsers button {
    flex: 0 0;
}

#adminPanelUsers :is(#userUpdate,#userDelete,code-editor) {
    opacity: .5;
    pointer-events: none;
}

#adminPanelUsers:has(list-item[selected]) :is(#userUpdate,#userDelete,code-editor) {
    opacity: 1;
    pointer-events: all;
}

#loginForm :is(select, input):focus {
    outline: var(--focus-outline);
}

#adminPanelClients {
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    height: 100%;
    row-gap: 10px;
}

#adminPanelClients:before {
    content: attr(mode-message);
    font-size: 12px;
    color: rgba(0,0,0,.33);
    text-align: center;
    letter-spacing: 0.2px;
    background: #eee;
    padding: 5px 8px;
    border-radius: 5px;
    width: fit-content;
    /* text-transform: uppercase; */
    justify-self: center;
    font-weight: 600;
}

#adminPanelClients buttons {
    display: grid;
}

#adminClientNew {
    margin-left: auto;
}

form-body code-editor-message {
    white-space: pre-wrap;
}