/* Layout */

/* Typography */

/* Tables */

/* Forms */

/* Buttons */

/* Alerts */

/* Cards */

/* Utilities */


:root {
    --primary-color: #2d6cdf;
    --primary-color-hover: #1f57bb;

    --secondary-color: #6c757d;
    --secondary-color-hover: #5b636a;

    --background-color:#ffffff;
/*    --surface-color:
    */
    --border-color: #555555;
    --card-color: #ffffff;

    --text-color:#000000;
/*    --text-muted-color:
*/
    --success-color: #5bc729;
    /*--warning-color:*/
    --error-color: #c62828;
}



.error {
    color: var(--error-color);
    margin-bottom: 1rem;
}

.hint {
    margin-top: 0.5rem;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-right: 4px solid #6c757d;
    border-radius: 4px;
    color: #495057;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.success {
    color: var(--sucess-color);
    margin-bottom: 1rem;
}

.navigation {

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: .75rem .5rem;

    background: #ffffff;

    border-bottom: 1px solid #dddddd;

    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;

}

.navigation-left {

    display: flex;

    align-items: center;

    gap: .5rem;

}

.navigation-menu {

    display: flex;

    gap: .5rem;

    list-style: none;

    margin: 0;

    padding: 0;

}

.navigation-menu a {

    display: block;
    padding: .55rem .25rem;
    border-radius: .4rem;
    text-decoration: none;
    color: inherit;
    transition: .2s;
    min-width: 44px;

}

.navigation-menu a:hover {

    background: #f0f4fa;

}

.navigation-menu a.active {

    text-decoration-line: overline;
}

.navigation-logo {

    font-size: 1.25rem;

    font-weight: 700;

    text-decoration: none;

    color: inherit;

}

.navigation-right {

    display: flex;

    align-items: center;

    gap: 1rem;

}

.navigation-user {

    font-weight: 600;

}

body {
    margin: 0 auto;
    padding: 20px;

    font-family: Arial, Helvetica, sans-serif;
}

.content {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    height: calc(100svh - 290px);
    height: calc(100dvh - 290px);
    overflow-y: auto;
}

.content-half {
    height: calc(70vh - 250px);
    overflow-y: auto;
    min-height: 300px;
}

.content-top {
    max-height: calc(20vh);
    height: auto;
    min-height: 100px;
}

.content-fluid {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    height: calc(100svh - 280px);
    height: calc(100dvh - 280px);
    overflow-y: auto;
}




.receipt-details {
    display: grid;
    grid-template-rows: 1fr auto;
}





.cards, .cards-big {
    display: grid;
    grid-template-columns: repeat(auto-fill, 220px);
    gap: 20px;
    margin: 30px 0;
}
.cards-big {
    grid-template-columns: auto;
}

.card, .card-big, .card-big-navigation{
    max-width: 280px;
    padding: 20px;
    border: 1px solid #dddddd;
    border-radius: 8px;
    background: #fafafa;
}

.card-big, .card-big-navigation{
    max-width: 80svw;
    max-width:80dvw;
}

.card-big-navigation{
    /* position: sticky;
    top:0; */
    background: #e4e4e4;
    border-width: .1em;
    border-color: #666;
}


.card h2, .card-big h2 {
    margin-top: 0;
    font-size: 1rem;
}

.card p, .card-big p {
    font-size: 1.8rem;
    font-weight: bold;
    margin-top: 16px;
}

.card-link {
    text-decoration: none;
    color: inherit;
}

.card-link:hover .card {
    transform: translateY(-2px);
}

.card-link:hover .card-big {
    transform: translateY(-2px);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-align: center;
}

.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-top: 40px;
    margin-left: auto;
    margin-right: auto;
    padding-top: 15px;

    border-top: 1px solid #cccccc;

    font-size: 0.9rem;
    color: #666666;
    max-width: 1100px;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 2px;
    border-bottom: 1px solid #dddddd;
    text-align: left;
}

.table th {
    background: #f5f5f5;
    position: sticky;
  top: 0;
}

.table tr.highlight {
    background-color: #f5f9ff;
}

.month-separator td {
    /* background-color: #f1f3f5; */
    font-weight: 600;
    /* color: #495057; */
    padding: 0.5rem;
    padding-left: 2rem;
    padding-top: 1.3rem;
    border-color: #495057;
}



.form {
    max-width: 500px;
}

.form label {
    display: block;
    margin-bottom: 4px;
    font-weight: bold;
}

.form input,
.form textarea,
.form select {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    margin-bottom: 16px;
}

.form button {
    padding: 10px 20px;
}

.form-actions {

    display: flex;

    justify-content: flex-end;

}

.page-header {

    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    margin-left: auto;
  margin-right: auto;
    max-width: 1100px;

}

.button {

    display: inline-block;
    padding: 0.5rem 0.4rem;
    margin-bottom: 0.1rem;

    background-color: var(--primary-color);
    color: #ffffff;

    text-decoration: none;

    border-radius: 0.4rem;

    font-weight: 600;

    transition: background-color 0.2s;
    min-width: 28px;

}

.button:hover {

    background-color: var(--primary-color-hover);

}

.button:disabled {
    background-color: #bfc5cc;
    color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.7;
}

.button:disabled:hover {
    background-color: #bfc5cc;
}

.button-secondary {

    background: var(--secondary-color);;

}

.button-secondary:hover {

    background: var(--secondary-color-hover);

}

label {

    display: block;

    font-weight: 600;

    margin-bottom: .5rem;

}

input[type="file"] {

    width: 100%;

    padding: .75rem;

    border: 2px dashed #c8d0da;

    border-radius: .5rem;

    background: #fafbfc;

    cursor: pointer;

    transition: .2s;

}

input[type="file"]:hover {

    border-color: #2d6cdf;

    background: #f5f9ff;

}

input[type="file"]::file-selector-button {

    margin-right: 1rem;

    padding: .6rem 1rem;

    border: none;

    border-radius: .4rem;

    background: #2d6cdf;

    color: white;

    cursor: pointer;

    font-weight: 600;

}

input[type="file"]::file-selector-button:hover {

    background: #1f57bb;

}

.receipt-image {
    max-width: 100%;
}

.receipt-pdf {
    width: 100%;
    height: 800px;
}

.button-danger {
    background: #c62828;
    color: #fff;
}

.button-danger:hover {
    background: #b71c1c;
}

.receipt-processing {
    display: grid;
    grid-template-columns: minmax(150px, 60%) minmax(440px, 40%);
    gap: 1rem;
    height: calc(100vh - 280px);
}

.receipt-viewer {
    overflow-y: auto;
    border-style: solid;
}

.receipt-viewer img {
    display: block;

    width: 100%;
    height: auto;
}

.receipt-viewer iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.receipt-editor {
    display: grid;

    grid-template-rows:
        auto
        1fr
        auto;

    overflow: hidden;
}

/* .editor-header {
    display: grid;
    grid-template-columns: auto auto auto;
    gap: 0.5rem 1rem;
    align-items: center;
    padding-bottom: 1rem;
} */


.editor-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dddddd;
    margin-bottom: 10px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.money-input {
    display: flex;
    align-items: center;
    gap: 5px;
}

.money-input input {
    width: 90px;
}










.editor-body {
    overflow-y: auto;
    /*border-style: solid;*/
}





.money-input {
    display: flex;
    align-items: center;
    gap: .4rem;
}

.money-input input {
    flex: 1;
}

.editor-footer {
    /* border-top: 1px solid #dddddd; */
    margin-top: 0.2rem;
    padding-top: 0.0rem;
}

.summary-row {
    display: flex;

    justify-content: space-between;
    margin-top: 0.5rem;
    margin-bottom: .5rem;
}

.footer-actions {
    margin-top: 1rem;
}

.footer-actions .button {
    width: 100%;
}




.process-receipt-items {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.process-receipt-items th {
    text-align: left;
    position: sticky;
    top: 0;
    background-color: white;
    padding-bottom: .5rem;
}

.process-receipt-items td {
    padding: .25rem 0;
}

.process-receipt-items a {
    color: #33bf4f;
    background-color: gray;
    border-radius: 0.2em;
    padding: 0.2em;
    padding-top: 0px;
    padding-bottom: 0px;
    margin-left: 5px;
}

.process-receipt-items input, select{
    max-width: calc(100% - 10px);
    width: calc(100% - 10px);
}

.process-receipt-items .col-article {
    width: auto;
}

.process-receipt-items .col-quantity {
    width: 70px;
}

.process-receipt-items .col-category {
    width: 130px;
}

.process-receipt-items .col-amount {
    width: 110px;
}

.process-receipt-items .col-action {
    width: 40px;
    text-align: center;
}

.article_input th {
    padding-bottom: 0.0rem;
}

.receipt-items td:last-child,
.receipt-items th:last-child {
    text-align: center;
    padding-left: .25rem;
    padding-right: .25rem;
}


.amount-group {
    display: flex;
    align-items: center;
    gap:5px;
}

.amount-group label {
    margin-bottom: 0;
}

.amount-group input {
    width: 80px;
}

.balanced {
    color: #2e7d32;
}

.unbalanced {
    color: #ef6c00;
}

.action-right {
    width:150px;
}

.button_84 {
    width: 84px;
    text-align: center;
}

/* Login View */
.login {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: calc(100svh - 200px);
    min-height: calc(100dvh - 200px);
    padding: 1rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: .5rem;
    padding: 2rem;
    box-shadow: 0 .25rem .75rem rgba(0,0,0,.08);
    margin-top: 20px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-form input,
.login-form button {
    width: 100%;
    font-size: larger;
    min-height: 28pt;
}

.login-subtitle {
    text-align: center;
    color: #666;
    font-size: large;
}

.stat-row {
    margin-bottom: 1rem;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: .3rem;
}

.stat-bar {
    height: 8px;

    border-radius: 999px;

    overflow: hidden;

    background: #e5e7eb;
}

.stat-bar-fill {
    height: 100%;

    border-radius: inherit;

    background: var(--primary-color);
}


.period-selector {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;

    margin: 1rem 0 2rem;
}

.tab {
    flex: 1;

    padding: .75rem 1rem;

    border: 1px solid var(--border-color);
    border-radius: .5rem;

    background: var(--card-color);

    color: var(--text-color);
    text-align: center;
    text-decoration: none;

    transition: background-color .2s, border-color .2s;
}

.tab:hover {
    background: var(--background-color);
}

.tab.active {
    border-color: var(--primary-color);

    background: var(--primary-color);

    color: #fff;
}

.period-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;

    max-width: 320px;

    margin: 0 auto;
}

.period-navigation span {
    flex: 1;

    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

.period-navigation .button {
    display: flex;
    justify-content: center;
    align-items: center;

    width: 42px;
    height: 42px;

    padding: 0;
}

.custom-period-form {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: .75rem;
}

.custom-period-form input[type="date"] {
    min-width: 150px;
}

.custom-period-form .button {
    margin: 0.1rem;
    height: 42px;
    width: 120px;
}























/* Responsive */

@media (min-width: 1100px) {
    .content-fluid {
        width: 80vw; /* 80% der Viewport-Breite */
        min-width: 1100px; /* Aber mindestens 1100px */
    }
}


@media (max-width: 499px) {

    .action-right {
        width:auto;
    }

    .editor-header {
        flex-wrap: wrap;
        gap: 15px;
    }

    .form-group {
        flex: 1 1 140px;
    }

    .amount-group {
        flex-basis: 100%;
    }

    .cards{
        grid-template-columns: none;
    }

    .card {
        max-width: none;
    }

    .card-big {
        max-width: none;
    }
}