
:root {
    --kh-container-max: 1200px;
    --kh-container-pad: 92%;
    --kh-gap: 1.25rem;

    --kh-sidebar-w: 260px;
    --kh-sidebar-left: 2rem;


    --kh-content-left-space: calc(var(--kh-sidebar-left) + var(--kh-sidebar-w) + var(--kh-gap));
}


.kh-page {
    margin: 10rem 0 2rem;
    padding: 1.25rem 0 2rem;
}

.kh-container {
    width: min(var(--kh-container-max), var(--kh-container-pad));
    margin: 0 auto;
}


.kh-account {
    position: relative;
}


.kh-sidebar {
    position: fixed;
    top: 10rem;
    left: var(--kh-sidebar-left);
    width: var(--kh-sidebar-w);

    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding-top: 1rem;
    z-index: 2;
}

.kh-content {
    margin-left: var(--kh-content-left-space);
    min-width: 0;
}


.kh-nav {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    padding: 0.75rem;
}

.kh-nav__link {
    display: block;
    padding: 0.7rem 0.75rem;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: transform 120ms ease, background 120ms ease;
}

.kh-nav__link:hover {
    background: rgba(0, 0, 0, 0.04);
    transform: translateY(-1px);
}

.kh-nav__link.is-active {
    background: rgba(0, 0, 0, 0.06);
    font-weight: 600;
}


.kh-pagehead {
    margin-bottom: 1rem;
}

.kh-title {
    margin: 0;
    font-size: 1.6rem;
    line-height: 1.2;
}

.kh-subtitle {
    margin: 0.35rem 0 0;
    opacity: 0.75;
}


.kh-sectionhead {
    margin: 1.25rem 0 0.75rem;
}

.kh-h2 {
    margin: 0;
    font-size: 1.2rem;
}


.kh-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.kh-grid-2 > * {
    min-width: 0;
}


.kh-field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.kh-field label {
    color: var(--accent);
    font-size: 0.95rem;
    font-weight: 700;
}

.kh-field input,
.kh-field select {
    width: 100%;
    min-height: 48px;
    padding: 0.78rem 0.95rem;
    border: 1px solid rgba(14, 122, 79, 0.22);
    border-radius: 8px;
    background-color: #fff;
    color: var(--accent);
    font: inherit;
    line-height: 1.25;
    box-sizing: border-box;
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

.kh-field select {
    padding-right: 2.7rem;
    cursor: pointer;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%),
    linear-gradient(135deg, var(--accent) 50%, transparent 50%);
    background-position: calc(100% - 21px) 50%,
    calc(100% - 14px) 50%;
    background-size: 7px 7px, 7px 7px;
    background-repeat: no-repeat;
}

.kh-field input:focus,
.kh-field select:focus {
    outline: none;
    border-color: rgba(14, 122, 79, 0.72);
    box-shadow: 0 0 0 3px rgba(14, 122, 79, 0.12);
}

.kh-field select:invalid {
    color: rgba(14, 122, 79, 0.58);
}


.kh-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 1rem;
}

.kh-card__head {
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}


.kh-transactions {
    display: flex;
    flex-direction: column;
}

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

    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(14, 122, 79, 0.08);
}

.kh-transaction:last-child {
    border-bottom: none;
}

.kh-transaction__left,
.kh-transaction__right {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.kh-transaction__right {
    text-align: right;
}

.kh-transaction__right strong {
    white-space: nowrap;
}


.kh-h3 {
    margin: 0;
    font-size: 1rem;
}


.kh-address {
    font-style: normal;
    margin: 0;
    display: grid;
    gap: 0.25rem;
}


.kh-contact {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0;
    display: grid;
    gap: 0.35rem;
}

.kh-label {
    font-weight: 600;
    margin-right: 0.4rem;
}


.kh-actions {
    margin-top: 0.9rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.kh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 0.85rem;
    border-radius: 12px;
    text-decoration: none;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #fff;
    color: inherit;
    font-weight: 600;
}

.kh-btn--ghost:hover {
    background: rgba(0, 0, 0, 0.04);
}


.kh-note {
    margin: 0.75rem 0 0;
    opacity: 0.75;
    font-size: 0.92rem;
}


.email-field {
    display: flex;
    flex-direction: column;

}

.email-label {
    font-size: 1rem;
    margin-top: 1.5rem;
}

.form-control {
    width: 45%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border-radius: 0.5rem;
    box-sizing: border-box;

}

.kh-card--table {
    padding: 1.25rem 1.5rem;
    overflow-x: auto;
}

.kh-table--gutschriften {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}


.kh-table--gutschriften thead th {
    text-align: left;
    font-size: 1rem;
    font-weight: 800;
    color: var(--accent);
    padding: 0 0 0.9rem 0;
    border-bottom: 1px solid rgba(14, 122, 79, 0.12);
}

.kh-table--gutschriften tbody td {
    padding: 1rem 0;
    vertical-align: middle;
    border-bottom: 1px solid rgba(14, 122, 79, 0.08);
    color: var(--accent);
    font-size: 1.05rem;
}

.kh-table--gutschriften tbody tr:last-child td {
    border-bottom: none;
}

.kh-table--gutschriften th:nth-child(1),
.kh-table--gutschriften td:nth-child(1) {
    width: 25%;
}

.kh-table--gutschriften th:nth-child(2),
.kh-table--gutschriften td:nth-child(2) {
    width: 35%;
}

.kh-table--gutschriften th:nth-child(3),
.kh-table--gutschriften td:nth-child(3) {
    width: 25%;
}

.kh-table--gutschriften th:nth-child(4),
.kh-table--gutschriften td:nth-child(4) {
    width: 15%;
    text-align: right;
}

.kh-table--gutschriften td strong {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--accent);
    white-space: nowrap;
}

.kh-actions--table {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    justify-content: flex-start;

    flex-wrap: nowrap;
}

.kh-btn--icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.05rem;
    line-height: 1;
}


.is-hidden {
    display: none;
}

@media (max-width: 480px) {
    .kh-transaction {
        padding: 0.75rem 0;
    }

    .kh-transaction__left strong,
    .kh-transaction__right strong {
        font-size: 0.95rem;
    }

    @media (max-width: 640px) {
        .kh-card--table {
            padding: 1rem;
        }

        .kh-table--gutschriften thead th,
        .kh-table--gutschriften tbody td {
            font-size: 0.95rem;
        }

        .kh-table--gutschriften td strong {
            font-size: 1rem;
        }

        .kh-btn--icon {
            width: 40px;
            height: 40px;
            min-width: 40px;
        }
    }

}


@media (max-width: 1200px) {
    html {
        overflow-y: auto !important;
        overflow-x: hidden;
    }

    body {
        overflow-y: auto !important;
    }

    .kh-sidebar {
        display: none;
    }

    .kh-content {
        margin-left: 0;
    }


    .form-control {
        width: 95%;
    }
}

@media (max-width: 900px) {
    html.nav-open {
        overflow: hidden;
    }


    .kh-sidebar {
        display: none;
    }


    .kh-content {
        margin-left: 0;
    }

    .kh-grid-2 {
        grid-template-columns: 1fr;
    }

    .form-control {
        width: 95%;
    }
}
