:root {
    --color-text: #333333;
    --color-text-highlight: #838ea8;
    --color-text-logo: #838ea8;
    --color-text-hover: white;
    --scroll-bar-color: #909aad;
    --scroll-bar-bg-color: transparent;
    --color-control-bg: #b5c0da;
    --color-control-dark: #838ea8;
    --color-highlight: #9449d1;

    --panel-width: 16rem;
}

/* Layout */
html,
body {
    margin: 0;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

html {
    background-color: #e9edf1;
    font-size: 16px;
}

body {
    display: flex;
    flex-direction: row;
}

html,
body,
td,
input,
select {
    font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
    color: var(--color-text);
}

#panel {
    background-color: #fafaff;
    color: var(--color-text);
    overflow-x: hidden;
    overflow-y: auto;
    width: var(--panel-width);
    box-shadow: 0 0 7px #00000055;
    padding: 0.5rem;
    z-index: 10;
    display: flex;
    flex-direction: column;
}

#panel>#panel-title {
    text-align: center;
}

#panel>#panel-title>img {
    width: 100%;
    display: block;
    padding: 1rem;
}

#panel>#panel-user {
    text-align: right;
    padding-bottom: 4rem;
}

#workarea {
    position: relative;
    background-color: #dbe3e6;
    background-image: linear-gradient(#c3cfd3, #dbe3e6);
    background-repeat: no-repeat;
    background-size: 100% 130px;
    overflow-y: auto;
    overflow-x: hidden;
}

#content-header {
    background-color: #dbe3e6aa;
    background-image: linear-gradient(#c3cfd3aa, #dbe3e6aa);
    background-repeat: no-repeat;
    background-size: 100% 200px;

    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4rem;
    z-index: 9;
    padding: 0 1rem 0 calc(var(--panel-width) + 1rem);
    backdrop-filter: blur(5px);
    line-height: 4rem;
}

#content-body {
    padding: 4.5rem 1rem 0 1rem;
}

#footer {
    position: relative;
    bottom: 0;
    left: 0;
    text-align: right;
    font-size: 0.7rem;
    width: 100%;
    height: 2rem;
    ;
    line-height: 2rem;
}

a,
a:visited {
    color: var(--color-text);
    text-decoration: none;
}

a:hover {
    color: var(--color-text-highlight);
}

/* Admin-Panel */

#panel-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-panel-button {
    color: var(--color-text);
}

.admin-panel-button:hover {
    color: var(--color-text-logo);
}

.admin-panel-button a {
    color: var(--color-text);
}

.admin-panel-button:hover a {
    color: var(--color-text-logo);
}

.admin-panel-button-icon {
    padding: 0 1rem 0 2rem;
}

/* Debug info */
#debug-info {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    z-index: 100;
    cursor: pointer;
    font-size: 0.6em;
}

#debug-info:hover {
    color: #3232ff;
}

#debug-info-panel {
    position: fixed;
    z-index: 101;
    top: 2rem;
    left: 2rem;
    bottom: 2rem;
    right: 2rem;
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 0 1rem black;
    padding: 1rem;
}

#debug-info-panel #full-scroll {
    overflow-x: hidden;
    overflow-y: scroll;
    width:100%;
    height: 100%;
}

#debug-info-panel pre{
    background-color: #333333;
    color:white;
    font-size: 0.8em;
    padding:0.5rem;
}

/* Admin common*/

.btn-ico {
    padding: 0.3rem;
    color: var(--color-text);
    cursor: pointer;
    border-radius: 3px;
}

.btn-ico:hover {
    color: var(--color-text-hover);
    background-color: var(--color-control-bg);
}

input{
    border:1px solid #9c9c9c;
    border-radius: 0.5rem;
    padding: 0.3rem 1rem;
    border-bottom: 2px  solid #9c9c9c;;
}

input:focus{
    outline: 3px solid #792cb6;
    outline-offset: 1px;
}

/* Admin title*/

.admin-title {
    float: left;
}

.admin-title-right {
    float: right;
}

/* control::builder */
.page-builder .caption{
    text-decoration: underline;
}

.page-builder .info{
    font-size: 0.7em;
    /*background-color: #fefff0;*/
    margin:0.2rem 0;
    padding:0.3rem;
    border-radius: 0.2rem;
    color:#333333;
}

/* Admin tile*/

.admin-tile {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 0 7px #00000033;
    overflow: hidden;
}

.admin-tile.small {
    display: inline-block;
}

.admin-tile-header {
    font-size: 0.9rem;
    padding: 0.5rem 1.5rem;
    background: #f1f1f1;
}

.admin-tile-body {
    padding: 0.5rem 1.5rem 1.5rem 1.5rem;
}

/* control::list */

ul.list {
    margin: 0;
    padding-inline-start: 0;
}

ul.list li {
    display: block;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 3px;
}

ul.list li:hover {
    background-color: var(--color-control-bg);
    background-image: linear-gradient(130deg, var(--color-control-bg) 80%, var(--color-highlight) 100%);
    color: var(--color-text-hover);
}


/* Sections */

div.section {
    padding: 4px 32px;
}

div.section>h2 {
    text-align: center;
    text-decoration: underline;
    padding-top: 16px;
    padding-bottom: 5px;
    font-size: 24px;
    margin: 0;
}

div.section>div {
    margin: 0 auto;
}

table.form {
    margin: 0 auto;
    border-collapse: collapse;
}

table.form td {
    padding: 2px 5px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 16px;
}

::-webkit-scrollbar-corner {
    background: rgba(0, 0, 0, 0.5);
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--scroll-bar-color) var(--scroll-bar-bg-color);
}

/* Works on Chrome, Edge, and Safari */
*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
    z-index: 20;
}

*::-webkit-scrollbar-track {
    background: var(--scroll-bar-bg-color);
}

*::-webkit-scrollbar-thumb {
    background-color: var(--scroll-bar-color);
    border-radius: 20px;
    border: 3px solid var(--scroll-bar-bg-color);
}

.layout {
    display: flex;
}

.layout.vertical {
    flex-direction: column;
}

.layout.horizontal {
    flex-direction: row;
}

.layout.gap {
    gap: 0.7rem;
}

.layout.big-gap {
    gap: 1rem;
}

.layout.horizontal.reverse {
    flex-direction: row-reverse;
}

.layout.vertical.reverse {
    flex-direction: column-reverse;
}

.main {
    flex: 1;
}

.layout.horizontal.left {
    justify-content: flex-start;
}

.layout.horizontal.center {
    justify-content: center;
}

.layout.horizontal.right {
    justify-content: flex-end;
}

.layout.horizontal.top {
    align-items: flex-start;
}

.layout.horizontal.middle {
    align-items: center;
}

.layout.horizontal.bottom {
    align-items: flex-end;
}

.layout.vertical.left {
    align-items: flex-start;
}

.layout.vertical.center {
    align-items: center;
}

.layout.vertical.right {
    align-items: flex-end;
}

.layout.vertical.top {
    justify-content: flex-start;
}

.layout.vertical.middle {
    justify-content: center;
}

.layout.vertical.bottom {
    justify-content: flex-end;
}