body {
    font-family: system-ui, sans-serif;
    max-width: 640px;
    margin: 3rem auto;
    padding: 0 1rem;
    color: #1a1a1a;
}

h1 {
    margin-bottom: 1.5rem;
}

form label {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

form input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 0.25rem;
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button {
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #f5f5f5;
    cursor: pointer;
}

button[type='submit'] {
    background: #2a6f4b;
    color: white;
    border-color: #2a6f4b;
}

[role='alert'] {
    color: #b3261e;
    font-size: 0.9rem;
    min-height: 1.2em;
}

#child-picker {
    display: flex;
    gap: 0.5rem;
    margin: 1.5rem 0 0.5rem;
}

#child-picker button {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.child-balance {
    font-size: 0.85rem;
    color: #555;
    font-variant-numeric: tabular-nums;
}

#logout-button {
    float: right;
    background: transparent;
    border-color: transparent;
    color: #666;
}

#child-detail {
    clear: both;
    margin-top: 1.5rem;
}

#child-balance {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0.25rem 0 1.5rem;
}

#add-transaction-form {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

#add-transaction-form label {
    flex: 1;
    margin-bottom: 0;
}

#add-transaction-form #add-error {
    flex-basis: 100%;
    order: 3;
}

#transaction-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.transaction-row,
.edit-form {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #eee;
}

.tx-description {
    flex: 1;
}

.tx-amount {
    font-variant-numeric: tabular-nums;
}

.edit-form {
    flex-wrap: wrap;
}

.edit-form input {
    width: auto;
    flex: 1;
}

.edit-form .edit-error {
    flex-basis: 100%;
    margin: 0;
}
