@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap');


:root {
    --primary-color: #30547e;
    --secondary-color: #d3d2cb;
    --accent-color: #e7e7e2;
    --background-color: #f5f4f2;
    --standard-shadow: .1rem .1rem .4rem rgba(0, 0, 0, 0.1);
    --standard-border-color: #d1d1cd;
    --selected-color: #4884c9;
}

html {
    font-size: 62.5%;
    height: 100%;
}

body {
    font-size: 1.4rem;
    font-family: "Nunito", Helvetica, Arial, sans-serif;
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
    height: 100%;
    max-height: 100%;
    background: #f1f1f0;
}

#app {
    display: flex;
    height: 100%;
    max-height: 100%;
}

#menu {
    width: 16em;
    background-color: #d3d2cb;
    border-right: 1px solid #969487;
    padding-top: 2em;
}

#menu li>a {
    display: block;
    padding: 0 1em;
    line-height: 2;
    text-decoration: none;
    font-weight: 600;
    color: #4e4c3f;
    font-size: 1em;
}

#menu li>a:hover {
    background-color: #e7e7e2;
}

main {
    flex-grow: 1;
    overflow: auto;
}

.side-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    flex-grow: 1;
}

table {
    width: 100%;
}

thead tr th {
    position: sticky;
    background-color: white;
    top: 0;
}

thead tr th::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    border-bottom: .1rem solid var(--standard-border-color);
    pointer-events: none;
}

th {
    font-weight: 600;
    text-align: left;
}

th,
td {
    padding: 0.6em 1em;
}

tbody tr:nth-child(odd) td {
    background-color: var(--background-color);
}

tbody tr:nth-child(odd) td:first-child {
    border-radius: 0.6rem 0 0 0.6rem;
}

tbody tr:nth-child(odd) td:last-child {
    border-radius: 0 0.6rem 0.6rem 0;
}

.property-with-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.property-with-actions span,
.property-with-actions input {
    flex-grow: 1;
    margin-right: 1rem;
}

.property-with-actions .action {
    cursor: pointer;
    flex-grow: 0;
    flex-shrink: 1;
    margin-right: 0;
}

input:not([type]),
input[type=text],
input[type=password] {
    box-sizing: border-box;
    border: none;
    border-bottom: .2rem solid var(--standard-border-color);
    background: white;
    font: inherit;
}

input:not([type]):focus,
input[type=text]:focus,
input[type=password]:focus {
    outline: none;
    border-bottom-color: var(--selected-color);
    font-weight: 600;
}

.placeholder {
    text-align: center;
    align-self: center;
    font-size: 3em;
    font-weight: bold;
    color: #d1d1d0;
}

/* Layout */

.layout-panel {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: stretch;
    align-content: stretch;
}

.layout-panel.root {
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    padding: 1.2rem;
    max-height: 100%;
}

.layout-panel.horizontal {
    flex-direction: row;
}

.layout-panel.vertical {
    flex-direction: column;
}

.layout-panel>.layout-panel {
    flex-grow: 1;
    flex-shrink: 1;
    min-height: 0;
}

.layout-panel>.panel-splitter {
    flex-grow: 0;
    flex-shrink: 0;
    flex-basis: 1.2rem;
}

.layout-panel.horizontal>.panel-splitter {
    cursor: col-resize;
}

.layout-panel.vertical>.panel-splitter {
    cursor: row-resize;
}

.drag-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: transparent;
    cursor: move;
}

.layout-panel.single {
    flex-direction: column;
}

.tabs {
    position: relative;
    flex-shrink: 1;
}

.tabs>ul {
    flex-grow: 0;
    flex-shrink: 1;
    display: flex;
    padding-left: .2rem;
}

.tabs>ul>li {
    border-radius: .3rem .3rem 0 0;
    box-shadow: .1rem .1rem .2rem rgba(0, 0, 0, 0.2);
}

.tabs>ul>li>div {
    border-radius: .3rem .3rem 0 0;
    border-top: .1rem solid #bbb;
    border-left: .1rem solid #bbb;
    border-right: .1rem solid #bbb;
    padding: .8rem 1rem;
    cursor: pointer;
    background: #e1e1e0;
}

.tabs>ul>li.selected {
    box-shadow: .3rem .1rem .2rem rgba(0, 0, 0, 0.2);
}

.tabs>ul>li.selected>div {
    background: white;
    position: relative;
    z-index: 1;
    margin: -.2rem -.2rem -.1rem -.2rem;
    padding: 1rem 1.2rem .9rem 1.2rem;
}

.tab-panels {
    flex-grow: 1;
    flex-shrink: 1;
    min-height: 0;
    border: .1rem solid #bbb;
    border-radius: .3rem;
    background: white;
    box-shadow: .1rem .1rem .2rem rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: stretch;
}

.tab-panels>ul {
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: 100%;
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: 1fr;
    grid-template-columns: 1fr;
}

.tab-panels>ul>li {
    display: none;
    height: 100%;
    max-height: 100%;
    min-height: 100%;
}

.tab-panels>ul>li.selected {
    display: grid;
    grid-template-rows: 1fr;
    grid-template-columns: 1fr;
}

.tab-panels.first-selected {
    border-top-left-radius: 0;
}

.tab-drag-overlay {
    background: rgba(0, 100, 200, 0.4);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
}

/* Login */

#login-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(.5rem);
    -webkit-backdrop-filter: blur(.5rem);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

#login-dialog {
    background-color: white;
    padding: 2rem;
    border-radius: .8rem;
    box-shadow: var(--standard-shadow);
}

/* Side panel */

.side-panel-content {
    flex-grow: 1;
    display: flex;
}

.side-panel-content>* {
    flex-grow: 1;
}

/* Documents */

.document-preview {
    vertical-align: middle;
}

.document-preview img {
    display: block;
}

.documents-table {
    overflow: auto;
    height: 100%;
}

.documents-view iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.documents-table .row {
    display: grid;
    grid-template-columns: 12rem 3fr 3fr 1fr;
    grid-template-rows: 1fr 1fr 1fr auto;
    gap: 1.6rem;
    margin: 2rem;
    border-radius: .8rem;
    padding: 1.6rem;
    box-shadow: var(--standard-shadow);
    background: white;
}

.documents-table .row.paid {
    background-color: #eeffd3;
    border: .1rem solid #ceddb7;
}

.documents-table .row.dropping {
    background-color: #4884c9;
    transform: rotate(1deg);
}

.documents-table .preview {
    grid-row: span 3 / span 3;
    border-radius: 0.4rem;
    overflow: hidden;
    border: .1rem solid var(--background-color);
}

.documents-table .preview img {
    width: 100%;
    display: block;
}

.documents-table .identifier {
    font-weight: 600;
}

.documents-table .row .paid {
    font-size: 1.5em;
    text-align: right;
    cursor: pointer;
}

.documents-table .total {
    text-align: right;
    font-size: 1.4em;
    font-weight: 600;
    color: #30547e;
}

.documents-table .issuer {
    grid-column: span 2 / span 2;
    grid-column-start: 2;
    font-size: 1.4em;
    font-weight: 600;
}

.documents-table .issue-date {
    grid-column-start: 2;
    grid-row-start: 3;
}

.documents-table .due-date {
    grid-column-start: 3;
    grid-row-start: 3;
}

.documents-table .subordinates {
    grid-column: 1 / span 3;
    border-top: .1rem dotted var(--standard-border-color);
}

.has-errors {
    background-color: #f3bec2;
}

.has-warnings {
    background-color: #ffdeb1;
}

.account-overview {
    background: #d8d8d8;
    padding: .5rem 1rem;
    border-radius: .4rem;
    border: .1rem solid #bbbbbb;
    margin: .5rem 1rem;
}

.account-drop-target {
    background-color: #bee4f3;
    padding: .5rem 1rem;
    border-radius: .4rem;
    border: .1rem solid #8fc1d4;
    margin: .5rem 1rem;
}

.account-placeholder {
    background-color: #ecc84f;
    padding: .5rem 1rem;
    border-radius: .4rem;
    border: .1rem solid #e29127;
    margin: .5rem 1rem;
}

.account-overview+div {
    margin-left: 2rem;
}

/* Suppliers */

.suppliers-table {
    overflow: auto;
    height: 100%;
}