* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: #eef1f4;
}

body {
    min-width: 320px;
    margin: 0;
    color: #555;
    font: 14px/1.5 Arial, Helvetica, sans-serif;
}

button,
input,
textarea,
select {
    font: inherit;
}

.page-shell {
    width: min(1100px, calc(100% - 24px));
    min-height: calc(100vh - 10px);
    margin: 5px auto;
    background: #fff;
    box-shadow: 0 0 5px #434546;
}

.site-header {
    min-height: 110px;
    border-top: 3px solid #efefef;
    border-bottom: 1px solid #efefef;
}

.brand {
    display: flex;
    min-height: 109px;
    align-items: center;
    color: #555;
    text-decoration: none;
}

.brand img {
    width: 221px;
    height: 109px;
    object-fit: contain;
}

.brand span {
    padding: 0 24px;
    font-size: 30px;
}

.site-nav {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin: 20px -8px 0;
    padding: 0 12px;
    color: #fff;
    background: #8196ab;
    border: 1px solid #8ea1b3;
    outline: 1px solid #5c7187;
}

.site-nav a,
.site-nav button {
    display: block;
    padding: 12px;
    border: 0;
    color: #fff;
    background: transparent;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.site-nav a:hover,
.site-nav a.active,
.site-nav button:hover {
    background: #97a8b9;
}

.site-nav form {
    margin: 0;
}

.site-nav-spacer {
    flex: 1;
}

.site-content {
    min-height: 360px;
    padding: 28px;
}

.site-content h1 {
    margin-top: 0;
    color: #555;
    font-size: 24px;
    font-weight: 400;
}

.site-footer {
    padding: 20px;
    border-top: 1px solid #efefef;
    color: #555;
    font-size: 12px;
    text-align: center;
}

.auth-card,
.form-card,
.message-card,
.portal-card {
    max-width: 620px;
    padding: 24px 30px;
    border: 1px solid #efefef;
    border-radius: 4px;
    background: #fff;
}

.auth-card {
    max-width: 500px;
    margin: 0 auto;
}

.form-row {
    margin: 0 0 16px;
}

.form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 700;
}

.form-row input,
.form-row textarea,
.form-row select {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #aaa;
    border-radius: 3px;
    background: #fff;
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
    border-color: #5c7187;
    outline: 2px solid rgb(92 113 135 / 18%);
}

.primary-button,
.portal-action {
    display: inline-block;
    padding: 10px 22px;
    border: 1px solid #5c7187;
    border-radius: 4px;
    color: #fff;
    background: #8196ab;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.primary-button:hover,
.portal-action:hover {
    background: #97a8b9;
}

.field-error {
    margin-top: 4px;
    color: #c00;
    font-size: 13px;
}

.flash-error,
.flash-success {
    padding: 12px 14px;
    margin-bottom: 18px;
    border: 2px solid;
}

.flash-error {
    color: #8a1f11;
    background: #fbe3e4;
    border-color: #fbc2c4;
}

.flash-success {
    color: #264409;
    background: #e6efc2;
    border-color: #c6d880;
}

.error-card {
    border-color: #fbc2c4;
    background: #fffafa;
}

@media (max-width: 720px) {
    .page-shell {
        width: 100%;
        margin: 0;
        box-shadow: none;
    }

    .site-header {
        min-height: auto;
    }

    .brand {
        min-height: auto;
    }

    .brand img {
        width: 130px;
        height: auto;
    }

    .brand span {
        padding: 12px;
        font-size: 21px;
    }

    .site-nav {
        flex-wrap: wrap;
        margin: 0;
        padding: 0;
        outline: 0;
    }

    .site-nav-spacer {
        display: none;
    }

    .site-content {
        padding: 18px;
    }

    .auth-card,
    .form-card,
    .message-card,
    .portal-card {
        padding: 20px;
    }
}
