body {
    background: #f6f8fb;
    color: #172033;
}

.app-shell {
    max-width: 1180px;
}

.login-wrap {
    min-height: calc(100vh - 3rem);
    display: grid;
    place-items: center;
}

.login-panel {
    width: min(100%, 430px);
    background: #fff;
    border: 1px solid #e3e8ef;
    border-radius: 8px;
    padding: 28px;
    box-shadow: 0 18px 44px rgba(16, 24, 40, .08);
}

.metric,
.chart-box,
.section-block,
.form-panel {
    background: #fff;
    border: 1px solid #e3e8ef;
    border-radius: 8px;
    padding: 18px;
}

.metric span {
    display: block;
    color: #667085;
    font-size: .875rem;
}

.metric strong {
    display: block;
    font-size: clamp(1.4rem, 4vw, 2rem);
    margin-top: 4px;
}

.chart-box h2 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.chart-canvas-wrap {
    position: relative;
    height: 260px;
    min-height: 260px;
}

.chart-canvas-wrap canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.empty-state {
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    color: #667085;
    padding: 22px;
    text-align: center;
}

.record-list {
    display: grid;
    gap: 10px;
}

.record-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 14px;
    align-items: center;
    background: #fff;
    border: 1px solid #e3e8ef;
    border-radius: 8px;
    padding: 14px;
}

.record-amount {
    text-align: right;
    font-weight: 700;
    white-space: nowrap;
}

.record-actions {
    display: flex;
    gap: 8px;
}

.manage-row {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(100px, .45fr) auto minmax(120px, auto) auto auto;
    gap: 10px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e3e8ef;
}

.manage-row:last-child {
    border-bottom: 0;
}

.manage-actions {
    display: flex;
    gap: 8px;
}

.manage-edit {
    display: contents;
}

@media (max-width: 700px) {
    .record-row {
        grid-template-columns: 1fr;
    }

    .record-amount,
    .record-actions {
        text-align: left;
    }

    .record-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .record-actions form,
    .record-actions button,
    .record-actions a {
        width: 100%;
    }

    .manage-row {
        grid-template-columns: 1fr;
    }

    .manage-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .manage-actions form,
    .manage-actions button {
        width: 100%;
    }
}
