/* Basis */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    color: #000;
    background: #fff;
}

/* Grundgerüst */
.app {
    display: grid;
    grid-template-columns: 240px 1fr;
    grid-template-rows: 60px 1fr;
    grid-template-areas:
        "header header"
        "sidebar content";
    height: 100vh;
}

/* Header */
.header {
    grid-area: header;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid #000;
}

.header .left {
    display: flex;
    align-items: center;
    margin-right: auto;
}

.header .right {
    display: flex;
    align-items: center;
    margin-left: auto;
}

/* Sidebar */
.sidebar {
    grid-area: sidebar;
    padding: 20px;
    border-right: 1px solid #000;
    overflow-y: auto;
}

/* Content */
.content {
    grid-area: content;
    padding: 20px;
    overflow-y: auto;
}

/* Links */
a {
    color: blue;
    text-decoration: none;
    border-bottom: 2px solid transparent;
}

a:hover {
    color: blue;
    text-decoration: none;
    border-bottom: 2px solid blue;
}

a:active {
    color: black;
    text-decoration: none;
    border-bottom: 2px solid blue;
}

/* Buttons */
button {
    color: blue;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    background: 0;
    border: 0;
}

button:hover {
    color: blue;
    text-decoration: none;
    border-bottom: 2px solid blue;
}

button:active {
    color: black;
    text-decoration: none;
    border-bottom: 2px solid blue;
}

/* Hilfsklassen */
.selected {
    border: 1px solid #333;
    padding: 2px;
    border-radius: 4px;
}

code {
    user-select: all;
    background: #edf;
    color: #333;
    padding: 5px;
    border-radius: 5px;
}

.cr {
    color: red;
}

.tal {
    text-align: left;
}

/* Tabellen */
table {
    border-collapse: collapse;
    width: 100%;
}

th, td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: left;
}

th {
    color: #333;
    background: #ccc;
}

/* Tablet */
@media (max-width: 900px) {
    .app {
        grid-template-columns: 200px 1fr;
    }

    .header,
    .sidebar,
    .content {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Handy */
@media (max-width: 700px) {
    html, body {
        height: auto;
        -webkit-text-size-adjust: 100%;
    }

    .app {
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .header {
        flex-wrap: wrap;
        gap: 8px;
        min-height: 60px;
        padding: 10px 15px;
    }

    .header .left,
    .header .right {
        margin: 0;
        flex-wrap: wrap;
        gap: 8px;
    }

    .sidebar {
        padding: 12px 15px;
        border-right: 0;
        border-bottom: 1px solid #000;
        overflow-y: visible;
    }

    .content {
        flex: 1;
        padding: 15px;
        overflow-y: visible;
    }

    a,
    button {
        display: inline-block;
        padding: 6px 0;
    }

    input,
    select,
    textarea {
        width: 100%;
        max-width: 100%;
        font-size: 16px;
        padding: 10px;
        margin-bottom: 10px;
    }

    button {
        font-size: 16px;
    }

    table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    th, td {
        padding: 6px;
        white-space: nowrap;
    }

    code {
        word-break: break-all;
    }
}