:root {
    --font-size-rem: 16px;
    --color-monty-dark: #044136;
    --color-monty-light: #eee7d6;
    --color-monty-accent: #e36449;
    --color-grey: #ababab;
    --color-grey-light: #efefef;
    --color-grey-xlight: #efe7d744;

    --color-link: brown;

    --size-s: 640px;
}

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

*:focus {
    outline: none;
}

html { font-size: 16px; } 

body {background-color: var(--color-monty-light);}

.topbar {    
    margin: 0 auto;
    padding: 0 1rem;
    height: 70px;
    background-color:var(--color-monty-dark);
    box-shadow: 0 2px 2px rgba(56, 65, 74, .15);
}
.topbar-container {
    max-width: var(--size-s);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}


.user {
    display: flex;
    flex-direction: column;
    text-align: right;
    gap: 2px;
}
.user-name {
    font-weight: 700;
    color: var(--color-monty-light);
}
.user-logout {
    color:var(--color-monty-light);
    text-decoration: none;
    font-size:0.85rem;
}


.content-wrapper {
    
    padding:1rem;
}



h1 {
    text-align: center;
}
.website {
    text-align: center;
}
.website a {
    text-decoration: none;
    color: var(--color-link);
}
.logo img {
    height: 70px;
}

.card {
    box-shadow: 0 1px 2px rgba(56, 65, 74, .15);
    background-color: #fff;
    display:flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
    min-width: 280px;
    border-radius: 5px;
}
.card-header {
    padding:1rem;
    border-bottom: 1px solid #e9ebec;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-header h3 {
    font-size: 1rem;
    margin:0;
    padding: 0;
}
.card-header p {
    font-size:0.75rem;
    color:var(--color-grey);
}
.card-body {
    padding:1rem;
}





input, textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid var(--color-grey-light);
    outline: 0;
    box-shadow: none;
    border-radius: 3px;
    margin-bottom: 0.5rem;
}

textarea {
  resize: none;
}


input[type="file"] {
    padding: 0;
}

input[type="file"]::file-selector-button {
    padding: 0.75rem;
    border: none;
    background-color: var(--color-grey-light);
    font-size: 0.9rem;
    margin-inline-end: 1rem;
    cursor: pointer;
}

button {
    box-sizing: border-box;
    padding: 0.5rem;
    border: 0;
    background-color:transparent;
    cursor: pointer;
}




.message {
    display: flex;
    margin: 0;
    cursor: pointer;
    padding: 1rem;
    font-weight: bold;
}
.message:hover, .res:hover, .upl:hover, .upl-item:hover {
    background-color: var(--color-grey-xlight);
}
.msg-title, .res-title, .upl-title {
    flex-grow: 1;
}
.msg-body, .upl-body {
    display:none;
}
.message.isread {
    font-weight: normal;
    color: var(--color-grey);
}
.res {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 1rem;
}
.res a {
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    background-color: var(--color-monty-light);
    color: var(--color-monty-dark);
    text-decoration: none;
    font-size: 0.9em;
    border-radius: 3px;
}
.upl {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 1rem;
    cursor: pointer;
}
.upl-item {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 0.5rem;
}
.upl-link {
    display: block;
    flex-grow: 1;
    text-decoration: none;
    color:var(--color-link);
}
.upl-delete {
    display: none;
}
#newupload {
    padding:3px;
    background-color: transparent;
}
#uploadform button {
    width: 100%;
    background-color: var(--color-monty-light);
}










.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);

    align-items: center;
    justify-content: center;
}

.modal {
    position: relative;
    background: white;
    padding: 0;
    width: min(440px, 90%);
    border-radius: 4px;
}
.modal-header {
    padding:1rem;
    border-bottom: 1px solid #e9ebec;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-title {
    font-size: 1rem;
    font-weight: bold;
    margin:0;
    padding: 0;
}
.modal-close {
    background-color: transparent;
    border: 0;
    outline: 0;
    padding: 4px;
    font-size: 18px;
    cursor: pointer;
}
.modal-body {
    padding: 1rem;
}



/* HELPERS */
.mt-l {
    margin-top: 3rem !important;
}
.p0 {
    padding: 0 !important;
}


.container-l {
    max-width: 1024px;
    margin:0 auto;
}
.container-s {
    max-width: var(--size-s);
    margin:0 auto;
}

.row2 {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.row2 > div {
    flex: 1 1 auto;
}

@media (min-width: 641px) {
    .row2 > div {
        width: calc(50% - (0.5 * 1rem));
    }
}