/**
 * CSS RESET
 * Source: https://piccalil.li/blog/a-modern-css-reset/
 */


/* Box sizing rules */

*,
*::before,
*::after {
    box-sizing: border-box;
}


/* Remove default margin */

body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
    margin: 0;
}


/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */

ul[role='list'],
ol[role='list'] {
    list-style: none;
}


/* Set core root defaults */

html:focus-within {
    scroll-behavior: smooth;
}


/* Set core body defaults */

body {
    min-height: 100vh;
    text-rendering: optimizeSpeed;
    line-height: 1.5;
}


/* A elements that don't have a class get default styles */

a:not([class]) {
    text-decoration-skip-ink: auto;
}


/* Make images easier to work with */

img,
picture {
    max-width: 100%;
    display: block;
}


/* Inherit fonts for inputs and buttons */

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


/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */

@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}


/**
 * VARIABLES
 */

 :root {
    --primary-color: #88AADD;
    --secondary-color: #DDAA88;
    --text-color: #000000;
    --text-color-error: #DD8888;
    --text-color-header: #FFFFFF;
    --text-color-body: #000000;
    --background-color: #FFFFFF;
    --background-color-header: #88AADD;
    --background-color-body: #F0F0F0;
    --shadow-color: #808080;
    --corner-radius: 10px;
}

body {
    background-color: var(--background-color-body);
    font-size: medium;
    font-family: Helvetica, sans-serif;
}

h1 {
    font-size: 4rem;
    line-height: 4rem;
}

h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

div.header-wrapper {
    background-color: var(--background-color-header);
    color: var(--text-color-header);
    min-width: 360px;
    padding: 2rem;
}

div.header {
    display: grid;
    grid-template-columns: 3fr 26fr 1fr;
    align-items: center;
    column-gap: 2rem;
}

div.content-wrapper {
    max-width: 1400px;
    min-width: 360px;
    margin: 0rem auto;
    padding: 2rem;
}

div.login-wrapper {
    max-width: 600px;
    margin: 0rem auto;
}

div.login {
    background-color: var(--background-color);
    border-radius: var(--corner-radius);
    padding: 2rem;
}

form.login {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: flex-end;
    column-gap: 1rem;
    row-gap: 1rem;
}

form.login fieldset {
    border: none;
    padding: 0rem;
    margin: 0rem;
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 0rem;
}

form.login label {
    margin-top: 1rem;
    font-weight: bold;
    color: var(--primary-color);
}

form.login input {
    height: 2.5rem;
    padding: 0.5rem;
}

div.info-wrapper {
    margin-bottom: 2rem;
}

div.info {
    background-color: var(--background-color);
    border-radius: var(--corner-radius);
    padding: 2rem;
}

div.widget-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    column-gap: 2rem;
    row-gap: 1rem;
}

div.widget {
    background-color: var(--background-color);
    border-radius: var(--corner-radius);
    font-size: 0.8rem;
    padding: 2rem;
}

div.widget .amount {
    font-size: 5rem;
    font-weight: bold;
    text-align: center;
}

div.widget .amount-next {
    font-weight: bold;
    text-align: center;
}

table.last-transactions {
    margin-bottom: 1rem;
    width: 100%;
}

table.last-transactions tr {
    box-shadow: 1px 1px 0px var(--shadow-color);
}

table.last-transactions th {
    text-align: left;
}

table.last-transactions th:last-child,
table.last-transactions td:last-child {
    text-align: right;
}

div.widget .profile-image {
    height: 10rem;
    width: 10rem;
    float: right;
}

div.widget ul.profile-contact {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    padding: 0;
}

div.widget ul.profile-contact>li {
    list-style: none;
    font-weight: bold;
}

div.widget ul.profile-contact>li a {
    display: block;
    font-weight: normal;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
}

.btn {
    border: 1px solid var(--primary-color);
    display: block;
    height: 2.5rem;
    padding: 0.5rem;
    text-align: center;
}

.primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-color-header);
}

.secondary {
    background-color: var(--background-color-body);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.more-link {
    text-align: right;
}

.error {
    font-weight: bold;
    color: var(--text-color-error);
}

@media screen and (max-width:1175px) {
    h1 {
        font-size: 3rem;
        line-height: 3rem;
    }
    div.header-wrapper,
    div.content-wrapper {
        padding: 1rem;
    }
    div.header {
        column-gap: 1em;
    }
    div.info-wrapper {
        margin-bottom: 1rem;
    }
    div.widget-wrapper {
        grid-template-columns: 1fr 1fr;
    }
    div.widget {
        padding: 1rem;
    }
}

@media screen and (max-width:880px) {
    table.last-transactions thead {
        border: none;
        clip: rect(0 0 0 0);
        height: 1px;
        margin: -1px;
        overflow: hidden;
        padding: 0;
        position: absolute;
        width: 1px;
    }
    table.last-transactions tbody tr {
        border-bottom: 3px solid #ddd;
        display: block;
        margin-bottom: .625em;
    }
    table.last-transactions tbody td {
        border-bottom: 1px solid #ddd;
        display: block;
        font-size: .8em;
        text-align: right;
    }
    table.last-transactions tbody td::before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
    }
    table.last-transactions tbody td:last-child {
        border-bottom: 0;
    }
}

@media screen and (max-width:765px) {
    h1 {
        font-size: 1.5rem;
        line-height: 1.5rem;
    }
    form.login {
        grid-template-columns: 1fr;
    }
    div.widget-wrapper {
        grid-template-columns: 1fr;
    }
}