:root {
    --green: #008d3b;
    --green-dark: #007631;
    --text: #111111;
    --muted: #747474;
    --page: #eeeeee;
    --line: #e8e8e8;
    --danger: #ee1717;
    --success: #009c42;
    --warning: #d9bd00;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: var(--page);
}

body {
    display: grid;
    place-items: start center;
}

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

a {
    color: inherit;
    text-decoration: none;
}

.phone-shell {
    position: relative;
    width: min(100vw, 430px);
    min-height: 100svh;
    overflow: hidden;
    background: #f1f1f1;
}

.status-bar {
    position: absolute;
    z-index: 5;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: max(8px, env(safe-area-inset-top)) 18px 6px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
}

.flash {
    position: fixed;
    z-index: 30;
    left: 50%;
    top: 48px;
    width: min(calc(100vw - 32px), 398px);
    transform: translateX(-50%);
    border-radius: 18px;
    padding: 12px 16px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 18px 35px rgba(0, 0, 0, .16);
}

.flash.success {
    background: var(--success);
}

.flash.error {
    background: var(--danger);
}

.topbar {
    position: relative;
    z-index: 4;
    height: 86px;
    padding: 34px 18px 0;
    display: flex;
    align-items: center;
    gap: 13px;
    background: var(--green);
}

.topbar::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -42px;
    width: 88px;
    height: 88px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: #f1f1f1;
    z-index: -1;
}

.menu {
    width: 36px;
    height: 36px;
    display: grid;
    align-content: center;
    gap: 5px;
    margin-right: auto;
}

.menu span {
    width: 28px;
    height: 3px;
    border-radius: 999px;
    background: #ffffff;
}

.round-icon {
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    border-radius: 50%;
    background: #ffffff;
}

.round-icon img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.crest.small {
    position: absolute;
    left: 50%;
    bottom: -38px;
    width: 78px;
    transform: translateX(-50%);
}

.hero-screen,
.login-screen {
    min-height: calc(100svh - 86px);
    padding: 58px 32px 120px;
    text-align: center;
    color: #ffffff;
    background:
        radial-gradient(circle at 50% calc(100% - 68px), #0a9c45 0 23px, transparent 24px),
        url("assets/asset-11.png") center bottom / 100% auto no-repeat,
        var(--green-dark);
}

.brand-copy {
    margin: 14px 0 24px;
    font-size: 14px;
    font-weight: 700;
}

.crest.hero {
    width: min(64vw, 245px);
    max-width: 100%;
}

.partners {
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

.partners img {
    max-width: 86px;
    max-height: 50px;
    object-fit: contain;
}

.login-screen {
    padding-top: 38px;
}

.crest.login {
    width: 190px;
    margin: 0 auto 18px;
}

.login-screen h1 {
    margin: 0 0 16px;
    font-size: 18px;
}

.auth-form,
.register-card form,
.message-form,
.inline-form,
.filter-card {
    display: grid;
    gap: 13px;
}

input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 0 17px;
    background: #ffffff;
    color: #222222;
    outline: none;
}

textarea {
    min-height: 92px;
    padding-top: 13px;
    resize: vertical;
}

.auth-form input {
    color: #ffffff;
    border-color: #ffffff;
    background: transparent;
}

.auth-form input::placeholder {
    color: #ffffff;
}

.password-field {
    position: relative;
}

.password-field img {
    position: absolute;
    right: 14px;
    top: 50%;
    width: 20px;
    transform: translateY(-50%);
}

.auth-form a {
    justify-self: end;
    color: #ffffff;
    font-size: 10px;
}

.auth-switch {
    display: inline-block;
    margin-top: 18px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.card-switch {
    display: block;
    margin-top: 18px;
    color: var(--green);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.logged-box {
    display: grid;
    gap: 5px;
    margin-bottom: 14px;
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 18px;
    padding: 12px;
    color: #ffffff;
    font-size: 12px;
    text-align: left;
}

.logged-box span {
    opacity: .82;
}

.logged-box a {
    justify-self: start;
    border-bottom: 1px solid rgba(255, 255, 255, .8);
    font-size: 11px;
    font-weight: 700;
}

button {
    justify-self: center;
    min-width: 76px;
    min-height: 32px;
    border: 0;
    border-radius: 999px;
    padding: 0 18px;
    color: #ffffff;
    background: var(--green);
    font-weight: 700;
    cursor: pointer;
}

.content {
    min-height: calc(100svh - 86px);
    padding: 72px 22px 112px;
    background:
        radial-gradient(circle at 50% calc(100% - 74px), #0a9c45 0 29px, transparent 30px),
        url("assets/asset-18.png") center bottom / 100% auto no-repeat,
        #efefef;
}

.white-card,
.filter-card,
.mini-card {
    border-radius: 28px;
    padding: 26px 22px;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(0, 0, 0, .04);
}

.white-card h1 {
    margin: 0 0 24px;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
}

.register-card input {
    border-radius: 17px;
}

.child-row {
    display: grid;
    grid-template-columns: 1fr 28px;
    gap: 7px;
    align-items: center;
}

.plus-toggle {
    display: grid;
    place-items: center;
    height: 28px;
    color: var(--green);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
}

.hidden-check {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.extra-child {
    display: none;
    gap: 13px;
}

.hidden-check:checked + .extra-child {
    display: grid;
}

.history-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 700;
}

.history-head a {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    color: #ffffff;
    background: var(--green);
}

.payments-card p {
    margin: 15px 0;
    font-size: 13px;
}

.danger {
    color: var(--danger);
}

.success {
    color: var(--success);
}

.warning {
    color: var(--warning);
}

.neutral {
    color: #222222;
}

.status-pill {
    display: inline-grid;
    place-items: center;
    min-height: 20px;
    margin-left: 6px;
    border-radius: 999px;
    padding: 2px 9px;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
}

.status-pill.success {
    background: var(--success);
}

.status-pill.danger {
    background: var(--danger);
}

.status-pill.warning {
    color: #111111;
    background: #ffe33a;
}

.pay-box {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 26px;
}

.pay-box input {
    width: 94px;
    min-height: 34px;
    border-radius: 999px;
}

.state-switch {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 24px 0 18px;
}

.state-switch a {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 11px;
    font-size: 11px;
}

.history-list {
    display: grid;
    gap: 8px;
    padding-top: 6px;
}

.history-list article,
.message,
.payment-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px;
    font-size: 12px;
}

.message {
    display: grid;
    justify-content: stretch;
    margin-top: 10px;
}

.message span,
.payment-row span {
    color: var(--muted);
}

.message.unread {
    border-color: rgba(0, 141, 59, .35);
    background: #f4fff8;
}

.bottom-nav {
    position: fixed;
    z-index: 10;
    left: 50%;
    bottom: 0;
    width: min(100vw, 430px);
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 16px 10px max(12px, env(safe-area-inset-bottom));
    background: #ffffff;
}

.bottom-nav a {
    display: grid;
    place-items: center;
    gap: 4px;
    color: #050505;
    font-size: 10px;
}

.bottom-nav img {
    width: 25px;
    height: 25px;
    object-fit: contain;
}

.bottom-nav .active {
    color: var(--green);
}

.bottom-nav .active img {
    filter: invert(38%) sepia(76%) saturate(1996%) hue-rotate(132deg) brightness(91%) contrast(101%);
}

.admin-body .phone-shell {
    max-width: 430px;
}

.admin-panel {
    padding-bottom: 28px;
}

.section-title {
    margin: 0 0 16px;
    text-align: center;
}

.section-title p {
    margin: 0 0 6px;
    color: var(--green);
    font-size: 12px;
    font-weight: 700;
}

.section-title h1 {
    margin: 0;
    font-size: 21px;
}

.filter-card {
    margin-bottom: 14px;
}

.filter-card label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 11px;
}

.admin-list {
    display: grid;
    gap: 9px;
    margin-bottom: 14px;
}

.payment-row {
    background: #ffffff;
}

.payment-row div {
    display: grid;
    gap: 3px;
}

.payment-row .amount {
    text-align: right;
}

.payment-row em {
    font-style: normal;
    font-size: 10px;
    font-weight: 700;
}

.split {
    display: grid;
    gap: 14px;
}

.mini-card h2 {
    margin: 0 0 12px;
    font-size: 16px;
}

.mini-card p {
    margin: 8px 0;
    color: var(--muted);
    font-size: 13px;
}

.inline-form {
    margin-top: 16px;
}

@media (min-width: 560px) {
    body {
        padding: 24px 0;
    }

    .phone-shell {
        min-height: 860px;
        border-radius: 30px;
        box-shadow: 0 24px 80px rgba(0, 0, 0, .18);
    }
}
