* {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: white;
    box-sizing: border-box;
}

a {
    text-decoration: none;
}

body {
    background: #010101;
}

main {
    padding: 32px 32px 192px;
    display: flex;
    gap: 16px;
    flex-direction: column;
    align-items: center;
}

.single-screen {
    padding: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    height: 100dvh;
}

form {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
}

form > div {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
}

form > div > div {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
}

h1 {
    font-size: 32px;
    margin: 16px 0;
}

.amount {
    opacity: 0.5;
}

.amount.amount--active {
    opacity: 1;
}

.keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 1fr;
    gap: 16px;
    width: min(100dvw - 128px, 3 * ((100dvh - 128px) / 6));
    height: min(100dvh - 128px, 6 * ((100dvw - 128px) / 3));
}

.keypad.keypad--4 {
    grid-template-columns: repeat(4, 1fr);
    width: min(100dvw - 128px, 4 * ((100dvh - 128px) / 9));
    height: min(100dvh - 128px, 9 * ((100dvw - 128px) / 4));
}

.keypad__element {
    aspect-ratio: 1 / 1;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #333333;
    font-size: 32px;
    user-select: none;

    overflow: hidden;
    position: relative;
    transition: transform 0.1s ease, box-shadow 0.1s ease, opacity 0.1s ease;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}

.keypad__element:active,
.button--key:active {
    transform: scale(0.95);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 600ms linear;
    background-color: rgba(255, 255, 255, 0.5);
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.keypad__element.keypad__element--primary {
    background: #fd9500;
}

.keypad__element.keypad__element--secondary {
    background: #a5a5a5;
    color: #333333;
}

.keypad__element.keypad__element--disabled {
    opacity: 0.5;
}

.keypad__element.keypad__element--display {
    aspect-ratio: auto;
    background: transparent;
    grid-column: span 3;
    justify-content: end;
}

.keypad__element.keypad__element--enter {
    aspect-ratio: auto;
    background: #fd9500;
    grid-column: span 3;
}

.keypad__element.keypad__element--empty {
    background: transparent;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    width: 100%;
}

.card-grid .card {
    padding: 16px;
    font-size: 12px;
    width: 100%;
    gap: 8px;
}

.card {
    background: #1e1e1e;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.card__icon {
    font-size: 16px;
}

.card__amount {
    font-size: 16px;
}

.card .card__title {
    font-size: 24px;
    font-weight: bold;
}

.card .card__title.card__title--small {
    font-size: 16px;
    font-weight: normal;
    text-align: left;
    width: 100%;
}

.list {
    list-style: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    text-decoration: none;
}

.list-item__section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.list-item__icon {
    font-size: 16px;
}

.transactions {
    list-style: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.transaction {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    text-decoration: none;
}

.transaction__right,
.transaction__left {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.transaction__icon {
    font-size: 16px;
}

.transaction__time {
    opacity: 0.5;
}

.transaction__currency {
    font-weight: bold;
    opacity: 0.5;
}

.transaction__edit {
    display: flex;
}

.transaction__edit svg {
    width: 16px;
    fill: #fff;
}

input, button, select {
    border-radius: 9999px;
    padding: 16px;
    width: 100%;
    border: 0;
    font-size: 16px;
    display: block;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

input, select, option {
    color: #333;
}

button {
    background: #4f8914;
}

.danger {
    color: #b91c1c;
    border: 1px solid #b91c1c;
    background: transparent;
}

.date {
    font-size: 12px;
    font-weight: bold;
    width: 100%;
    display: flex;
    justify-content: space-between;
}

hr {
    width: 100%;
    opacity: 0.1;
    height: 1px;
    display: block;
    border: 0;
    background: white;
    margin: 8px 0;
}

.button {
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    border: 0;
    user-select: none;
    overflow: hidden;
    position: relative;
    transition: transform 0.1s ease, box-shadow 0.1s ease, opacity 0.1s ease;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
    padding: 16px;
    background: #7c22c5;
}

.button--bucket {
    background: rgba(255, 255, 255, 0.05);
    justify-content: start;
}

.button svg {
    fill: #fff;
}

.button.button--key {
    aspect-ratio: 1 / 1;
    width: 64px;
    font-size: 32px;
    background: #333333;
}

.button--purple {
    background: #522790;
    font-size: 16px;
}

.button--outline {
    color: #6c6c6c;
    border: 1px solid #6c6c6c;
    background: transparent;
}

.button__icon {
    font-size: 16px;
}

.loader {
    width: 1.25rem;
    height: 1.25rem;
    border: 3px solid rgba(255, 255, 255, 0);
    border-top-color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: turbo-spin 0.6s linear infinite;
}

/* Animation */
@keyframes turbo-spin {
    to {
        transform: rotate(360deg);
    }
}

.transaction-edit-header {
    width: 100%;
    display: flex;
    justify-content: center;
}

.ring {
    position: relative;
    width: 200px;
    height: 200px;
}

.ring__time {
    position: absolute;
    top: 0;
    left: 0;
    width: 200px;
    height: 200px;
    border-radius: 50%;
}

.ring__time::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    margin: calc(12px / 2);
    height: calc(100% - 12px);
    width: calc(100% - 12px);
    border-radius: 50%;
    background: #1e1e1e;
}

.ring__budget {
    position: absolute;
    top: 0;
    left: 0;
    margin: 6px;
    width: 188px;
    height: 188px;
    border-radius: 50%;
}

.ring__budget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    margin: calc(24px / 2);
    height: calc(100% - 24px);
    width: calc(100% - 24px);
    border-radius: 50%;
    background: #1e1e1e;
}

.ring__background {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 4px;
}

.ring__header {
    font-size: 18px;
}

.ring__content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
}

.ring__main {
    font-size: 32px;
    font-weight: bold;
}

.ring__footer {
    opacity: 0.5;
    font-size: 18px;
}

.week-table {
    width: 100%;
    font-size: 12px;
    display: flex;
    gap: 8px;
    flex-direction: column;
}

.week-table__row {
    display: flex;
    justify-content: space-between;
}

.week-table__column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 24px;
}

.week-table__header {
    font-weight: bold;
}

.month-table {
    display: flex;
    flex-direction: column;
    width: 100%;
    font-size: 12px;
    gap: 16px;
}

.month-table__row {
    display: flex;
    justify-content: space-between;
}

.month-table__row.month-table__row--header {
    font-weight: bold;
}

.month-table__column {
    width: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: column;
    position: relative;
    gap: 4px;
}

.month-table__column.month-table__column--disabled {
    opacity: 0.5;
}

.month-table__day {
    font-size: 8px;
    font-weight: bold;
    width: 100%;
    text-align: left;
    opacity: 0.5;
}

.title.title--mini {
    text-align: left;
    width: 100%;
}

.title.title--micro {
    font-size: 12px;
    font-weight: bold;
}

nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 20px;
    background: black;
}

footer::before {
    /*content: '';*/
    display: block;
    height: 32px;
    width: 100%;
    position: absolute;
    top: -32px;
    left: 0;
    background-image: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 100%);
}

.footer-nav {
    flex-direction: row;
}

.footer-nav__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1/1;
}

.footer-nav__icon--active {
    background: #1e1e1e;
    border-radius: 9999px;
}

.period__statistics,
.period__transactions,
.period__categories,
.period__spent-daily {
    width: 100%;
}

.tooltip {
    padding: 4px 8px;
    border-radius: 4px;
    background: #3451bf;
    color: #fff;
    position: relative
}

.tooltip::before {
    content: '';
    position: absolute;
    top: 0;
    transform: translate(-50%, -50%) rotate(45deg);
    left: 50%;
    height: 8px;
    width: 8px;
    background: #3451bf;
}

turbo-frame {
    width: 100%;
}

.flex {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}
