* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    font-family: "Open Sans", sans-serif;
    font-size: 16px;

    --bg: #0f172a;
    --bg-accent: #111c36;
    --surface: #15213f;
    --surface-strong: #1b2747;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --border: #2b3a63;
    --primary: #fbbf24;
    --primary-hover: #f59e0b;
    --secondary: #f43f5e;
    --secondary-soft: #fb7185;
    --scrollbar: #263452;
}

::-webkit-scrollbar {
    width: 0.5rem;
}

::-webkit-scrollbar-track {
    background-color: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar);
}

body {
    width: 100%;
    height: 100vh;

    background: radial-gradient(circle at top, var(--bg-accent), var(--bg));

    display: flex;
    flex-direction: column;
    align-items: center;

    color: var(--text);
}

.logo {
    margin: 3rem 0 2rem;
}

main section {
    display: flex;
    flex: 1;
    gap: 1.25rem;
    padding-bottom: 2rem;
}

form {
    background: linear-gradient(180deg, var(--surface-strong), var(--surface));
    border-radius: 1rem;
    padding: 2.5rem;
    max-width: 462px;

    display: flex;
    flex-direction: column;
}

form h1 {
    font-size: 1.25rem;
}

form p {
    font-size: 0.87rem;
    color: var(--text-muted);
    margin: 0.75rem 0 2.5rem;
}

fieldset {
    border: none;
    display: flex;
}

fieldset legend {
    text-transform: uppercase;
    font-size: 0.62rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

fieldset:focus-within legend {
    color: var(--primary);
    font-weight: 700;
}

input,
select {
    flex: 1;
    height: 3rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    padding: 0 1rem;
    font-size: 0.87rem;
    color: #000000;
    background-color: #f8fafc;
    outline: none;
}

select {
    appearance: none;
    background-image: url(img/chevron-down.svg);
    background-repeat: no-repeat;
    background-position: right 0.7rem top 50%;
    background-size: 1.25rem auto;
}

select option {
    color: #000000;
}

input::placeholder,
select:invalid {
    color: var(--text-muted);
}

input:focus,
select:focus {
    border: 1.5px solid var(--primary);
}

.inputs-row {
    display: flex;
    flex: 1;

    gap: 1rem;
    margin-top: 1rem;
}

.inputs-row fieldset:first-child {
    flex: 1;
}

.inputs-row fieldset:last-child input {
    max-width: 154px;
}

form button {
    height: 3rem;
    border-radius: 0.5rem;
    border: none;
    font-size: 0.87rem;
    color: #0f172a;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    font-weight: 700;
    padding: 1rem 1.25rem;
    cursor: pointer;

    transition: background-color 0.2s;
}

button:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--secondary-soft));
}

form button:last-child {
    margin-top: 2rem;
}

aside {
    background: linear-gradient(180deg, var(--surface-strong), var(--surface));
    border-radius: 1rem;
    padding: 2.5rem;
    max-width: 462px;

    min-width: 600px;
}

aside header {
    display: flex;
    justify-content: space-between;

    border-bottom-width: 1px;
    border-bottom-style: solid;
    border-bottom-color: var(--border);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

aside header p {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 1rem;
}

aside header p span {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.87rem;
}

aside header p i {
    color: var(--primary);
    margin: 0 0.5rem;
    font-style: normal;
}

aside header h2 {
    font-size: 1rem;
    color: var(--text);
}

aside header small {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.75rem;
    margin-right: 0.25rem;
}

aside ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;

    max-height: 310px;
    min-height: 310px;

    overflow-y: scroll;
}

.expense {
    display: flex;
    align-items: center;
    height: 38px;
}

.expense img:first-child {
    width: 2rem;
    height: 2rem;

    margin-right: 0.75rem;
}

.expense>div {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.expense-info strong {
    font-size: 0.87rem;
    color: var(--text);
}

.expense-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.expense-amount {
    font-size: 0.87rem;
    color: var(--text);
    font-weight: 600;
}

.expense-amount small {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-right: 0.25rem;
}

.remove-icon {
    height: 1rem;
    margin-left: 0.5rem;

    cursor: pointer;
    transition: opacity 0.2s;
}

.remove-icon:hover {
    opacity: 0.7;
}

@media (min-width: 1100px) {
    form {
        max-height: 428px;
    }
}

@media (max-width: 1100px) {
    :root {
        font-size: 14px;
    }

    main,
    aside {
        min-width: 100%;
    }

    main section {
        flex-direction: column;
        width: 100%;

        padding: 1.5rem;
    }

    main section form {
        min-width: 100%;
    }

    main section aside ul {
        width: 100%;
        height: auto;
        overflow: auto;
    }
}

@media (max-width: 620px) {
    .inputs-row {
        flex-direction: column;
    }

    .inputs-row fieldset:last-child input {
        max-width: auto;
        min-width: 100%;
    }

    aside header {
        flex-direction: column;
        align-items: center;
    }
}
