:root {
    --color-background: #ffffff;
    --color-on-background: black;
    --color-background-hover: #eee;
    --color-on-background-hover: black;
    --color-primary: #1a488f;
    --color-on-primary: white;
    --color-error: #de0000;
    --color-on-error: white;

    /* Header colors */
    --color-header-foreground: var(--color-background);
}

:root.dark,
html.dark,
body.dark,
.dark {
    color-scheme: dark;
    --color-background: #1c1b1f;
    --color-on-background: white;
    --color-background-hover: #27262c;
    --color-on-background-hover: white;
    --color-primary: #f2bf59;
    --color-primary-disabled: #1f213c;
    --color-on-primary: white;
    --color-error: #de0000;
    --color-on-error: white;

    /* Header colors */
    --color-header-foreground: var(--color-background);
}

html,
body,
input,
select,
button,
textarea {
    font-family: "Lexend Deca", sans-serif;
}

html,
body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    margin: 0;
    background-color: var(--color-background);
    color: var(--color-on-background);
}

header {
    height: 4rem;
    background-color: var(--color-primary);
    color: var(--color-header-foreground);
    display: flex;
    justify-content: center;
    width: 100%;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

header .header-inner {
    width: 100%;
    padding-inline: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

header .header-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

header .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    white-space: nowrap;
    flex-shrink: 0;
}

header .logo-icon {
    color: var(--color-header-foreground);
}

header .logo-icon path {
    fill: currentColor;
    stroke: currentColor;
}

header .logo h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
}

header .logo .version-tag {
    font-size: 0.75rem;
    opacity: 0.75;
    align-self: center;
    font-weight: 500;
}

header .nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

header .header-top .nav__actions {
    display: none;
}

header .nav .desktop-actions {
    display: flex;
}

main {
    flex: 1;
    min-height: 0;
    width: 100%;
    margin: 0;
    padding-inline: 2rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.spinner-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    padding: 3rem 1rem;
}

.spinner-circle {
    width: 48px;
    height: 48px;
    border: 4px solid var(--color-background-hover);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner-label {
    opacity: 0.7;
    font-size: 0.95rem;
}

input[type="checkbox"] {
    height: 1.25rem;
    width: 1.25rem;
    cursor: pointer;
    margin: 0;
}

@media screen and (max-width: 640px) {
    header {
        height: auto;
    }

    header .header-inner {
        padding: 0.75rem 1rem 0 1rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
    }

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

    header .header-top .nav__actions {
        display: flex;
    }

    header .nav .desktop-actions {
        display: none;
    }

    header .logo {
        gap: 0.6rem;
    }

    header .logo h2 {
        font-size: 1.25rem;
    }

    header .logo .version-tag {
        display: inline-block;
        font-size: 0.8rem;
    }

    header .logo img {
        width: 32px;
        height: 32px;
    }

    header .nav {
        display: flex;
        justify-content: space-around;
        width: 100%;
        gap: 0;
        border-top: none;
    }

    header .nav .nav__tab {
        padding-block: 0.65rem;
        flex: 1;
        justify-content: center;
        border-bottom: 3px solid transparent;
    }

    header .nav .nav__tab.router-link-active {
        border-bottom-color: var(--color-on-primary);
    }

    main {
        padding-inline: 0.75rem;
        overflow-y: auto;
    }
}
