:root {
    --blue: #307C8E;
    --yellow: #FDD32F;
    --green: #308e38;
    --red: #d64947;
    --top-margin: 20px;
}

* {
    font-family: Public Sans, Public Sans-fallback, sans-serif;
    font-weight: 400;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

body, ul, li, a {
    margin: 0;
    padding: 0;
    list-style: none;
    text-decoration: none;
}

button {
    border: 3px solid var(--blue);
    border-radius: 8px;
}

button:hover {
    filter: grayscale(50%);
    cursor: pointer;
}

input, select, textarea {
    outline: none;
}

input:focus, select:focus, textarea:focus {
    border: 1px solid var(--blue);
}

#main-container {
    display: flex;
    flex-direction: column;

    text-align: center;
    justify-content: center;
    align-items: center;

    width: 1024px;
    border-radius: 8px;

    padding-top: 20px;
    padding-bottom: 20px;
}

#error-container {
    width: 100%;
    height: 80px;
    display: none;
    align-items: center;
    justify-content: center;
    background-color: var(--red);
    color: white;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 10px;
}

body {
    padding-bottom: calc(88px + env(safe-area-inset-bottom));
}

.app-footer {
    position: fixed;
    inset: auto 0 0;
    z-index: 1000;
    box-sizing: border-box;

    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid #e2e8eb;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));

    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

.app-footer-inner {
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    gap: 2px;

    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.app-nav-item {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;

    min-width: 0;
    min-height: 58px;
    padding: 6px 2px;
    box-sizing: border-box;
    border-radius: 12px;

    color: #667085;
    font-family: inherit;
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;

    -webkit-tap-highlight-color: transparent;
}

.app-nav-item svg {
    width: 25px;
    height: 25px;
    flex-shrink: 0;
}

.app-nav-item span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-nav-item.active {
    color: #307c8e;
    background: #eaf4f6;
    font-weight: 700;
}

.app-nav-item:active {
    background: #eaf4f6;
}

/* Admin page quick links */
.admin-quick-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.admin-quick-links a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;

    min-height: 100px;
    padding: 16px 8px;
    box-sizing: border-box;

    color: #307c8e;
    background: #fff;
    border: 1px solid #dce7e9;
    border-radius: 14px;

    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}

.admin-quick-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #eaf4f6;

    font-size: 28px;
}

@media (max-width: 500px) {
    .app-nav-item {
        font-size: 9px;
    }

    .app-nav-item svg {
        width: 22px;
        height: 22px;
    }

    .admin-quick-links {
        gap: 8px;
    }

    .admin-quick-links a {
        font-size: 12px;
    }
}