* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Variablen */
    --basis: #205BE7;
    --accent: #25ffc9;
    --text: #464555;
    --white: #F9F8FF;
    --success: #008355;
    --error: #E6002C;
}

html,
body {
    overflow: hidden;
    touch-action: none;
    -ms-touch-action: none;

    /* Verhindern des Überscrollens/Ziehens */
    overscroll-behavior: none;
    -webkit-overflow-scrolling: auto;

    height: 100vh;
    width: 100vw;
}

#app {
    height: 100%;
    width: 100%;

    padding-top: max(env(safe-area-inset-top, 0px), 1.5rem);
    padding-bottom: max(env(safe-area-inset-bottom, 0px), 1.5rem);
    color: var(--text);
    font-family: "adelphi-pe-variable", sans-serif;
    font-variation-settings: "slnt" 0, "opsz" 6, "wght" 400;

    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;

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


/* Loader: Beim Start sichtbar. */
.loader {
    display: flex;
    flex-direction: column;
    align-items: center;

    color: var(--basis);
}

.loader h1 {
    font-variation-settings: "slnt" 0, "opsz" 18, "wght" 500;
    font-size: 3rem;
    margin: 0;
}

.loader small {
    font-size: 1rem;
    margin: 0;
}

/* PART STYLES */

.intro {
    background-color: #205ce725;
    width: 90%;
    height: 100%;
    overflow: hidden;
    box-sizing: border-box;

    padding: 1rem;
    border-radius: 1rem;

    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
}

.intro h1 {
    font-variation-settings: "slnt" 0, "opsz" 18, "wght" 600;
    color: var(--basis);
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
}

.intro .text {
    margin-bottom: 2rem;
}

.setsvnr {
    width: 100%;
}

.setsvnr input {
    width: 100%;
}

.setsvnr button {
    width: 100%;
}

.dashboard {
    width: 100%;
    height: 100%;
    padding: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 50px 1fr 1fr 1fr;
    gap: 16px;
    overflow: hidden;
    grid-template-areas:
        "header header"
        "doctor doctor"
        "doctor-info teleconsultation"
        "medications documents";
}

.dashboard>div {
    border-radius: 16px;
    padding: 16px;
    background-color: rgba(32, 91, 231, 0.25);
    min-width: 0;
    overflow: hidden;
}

#dashboard-header {
    grid-area: header;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#dashboard-header h1 {
    margin: 0;
    font-variation-settings: "slnt" 0, "opsz" 18, "wght" 500;
    font-size: 30px;
    color: var(--basis);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

#dashboard-header button {
    width: 35px;
    height: 35px;
    min-width: 35px;
    margin: 0;
    padding: 0;
    border-radius: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#dashboard-header button i {
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

#dashboard-header button i::before {
    display: block;
}


#dashboard-doctor {
    grid-area: doctor;
    border-radius: 1rem 1rem 1rem 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

#dashboard-doctor-image {
    background-color: var(--white);
    border-radius: 100%;
    width: 100%;
    height: 100%;
    aspect-ratio: 1/1;

    background-image: url('../media/images/user_icon.png');
    background-size: cover;
    background-position: center;
}

#dashboard-doctor-data {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: end;
}

#dashboard-doctor-name {
    font-variation-settings: "slnt" 0, "opsz" 18, "wght" 500;
    font-size: 1.125rem;
    text-align: right;
    word-break: break-word;
}

#dashboard-doctor-waiting-time {
    font-variation-settings: "slnt" -8, "opsz" 18, "wght" 400;
    font-size: 1rem;
}

#dashboard-doctor-info {
    grid-area: doctor-info;
    padding-top: 0;
    margin-top: -1rem;
    border-radius: 0 0 1rem 1rem;
    display: flex;
    align-items: end;
}

#dashboard-teleconsultation {
    grid-area: teleconsultation;
}

#dashboard-medications {
    grid-area: medications;
}

#dashboard-documents {
    grid-area: documents;
}

.dashboard-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dashboard-button i {
    color: var(--basis);
    font-size: 4rem;
    margin-bottom: 1rem;

}

.dashboard-button p {
    font-variation-settings: "slnt" 0, "opsz" 18, "wght" 500;
    font-size: 1rem;
}

.dashboard-button small {
    font-variation-settings: "slnt" -5, "opsz" 18, "wght" 400;
    font-size: .8rem;
}

.part {
    width: 100%;
    height: 100%;
    padding: 1rem;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 50px 1fr 30px;
    gap: 1rem;
    grid-template-areas:
        "header"
        "content"
        "footer";
}

.part>#part-header {
    grid-area: header;
    border-radius: 1rem;
    padding: 1rem;
    background-color: rgba(32, 91, 231, 0.25);
    display: flex;
    align-items: center;
}

.part>#part-header h1 {
    margin: 0;
    font-variation-settings: "slnt" 0, "opsz" 18, "wght" 500;
    font-size: 30px;
    color: var(--basis);
}

.part>#part-content {
    grid-area: content;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.part>#part-content>* {
    margin-bottom: 1rem;
}

.part>#part-footer {
    grid-area: footer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.part>#part-footer button {
    margin-top: 0;
    height: 100%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* Hausarzt-Auswahl */
.chooseDoctor {
    width: 100%;
}

.doctorSearch {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1rem;
}

.doctorSearch input {
    margin: 0;
}

.doctorSearch i {
    font-size: 1.25rem;
    color: var(--basis);
}

#doctorList {
    border-radius: 1rem;
    border: 1.5px solid var(--accent);
    margin: 0;
    padding: 0;
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: var(--white);
    display: block;
    width: 100%;
    margin-bottom: 1rem;
}

#doctorList li {
    padding: .5rem 0.25rem;
    cursor: pointer;
    border-bottom: 2px dotted var(--accent);
}

#doctorList li:last-child {
    border-bottom: none;
}

#doctorList li.checked {
    background-color: var(--accent);
}

/*FilesPart*/
#filesList {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 100%;
}

#filesList .file {
    background-color: rgba(32, 91, 231, 0.25);
    border-radius: 0.5rem;
    padding: .5rem 0.25rem;
    margin-bottom: .5rem;
    cursor: pointer;

    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-direction: column;
}

#filesList .file .file-info-1 {
    border-bottom: 2px solid var(--basis);
    width: 100%;
}

#filesList .file .file-info-1 .file-name {
    font-variation-settings: "slnt" 0, "opsz" 18, "wght" 500;
    font-size: 1.2rem;
    margin-bottom: .25rem;
}

#filesList .file .file-info-1 .file-description {
    font-variation-settings: "slnt" 0, "opsz" 18, "wght" 400;
    font-size: 1rem;
}

#filesList .file .file-info-2 {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

#filesList .file .file-info-2 p {
    font-variation-settings: "slnt" -8, "opsz" 18, "wght" 400;
    font-size: 0.9rem;
}

#filesListContainer {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

#file-view {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 100%;
    border-radius: 1rem;
    border: 2px solid var(--basis);
    box-sizing: border-box;
    overflow: hidden;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.file-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: grab;
    touch-action: none;
}

.file-image:active {
    cursor: grabbing;
}

.file-image.zoomed {
    cursor: move;
}

/* PDF Viewer Styles */
.pdf-viewer-container {
    width: 100%;
    height: 100%;
    max-width: 100%;
    position: relative;
    overflow: hidden;
}

.pdf-navigation {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--basis);
    border-radius: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
    pointer-events: auto;
}

.pdf-navigation button {
    color: white;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.pdf-navigation button:disabled {
    background: grey;
    cursor: not-allowed;
    opacity: 0.5;
}

.pdf-navigation span {
    font-weight: 500;
    color: var(--text);
    min-width: 3rem;
    text-align: center;
    font-size: 0.9rem;
}

.pdf-canvas-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/*OrderPart*/
.scroll-wrapper {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

#ordersList {
    list-style: none;
    margin: 0;
    padding: 0;
}

#ordersList .order {
    background-color: rgba(32, 91, 231, 0.25);
    border-radius: 1rem;
    padding: .5rem 0.25rem;
    margin-bottom: .5rem;
    cursor: pointer;
}

#ordersList .order .order-name {
    font-variation-settings: "slnt" 0, "opsz" 18, "wght" 500;
    font-size: 1.2rem;
    margin-bottom: .25rem;
}

#ordersList .order .order-info {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: .25rem;
}

#ordersList .order .order-info p {
    font-variation-settings: "slnt" 0, "opsz" 18, "wght" 400;
    font-size: 1rem;
}

/* Order Details View */
.order-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.order-status {
    text-align: center;
}

.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: white;
}

.status-1 {
    background-color: #3b82f6;
}

/* Neu - Blau */
.status-2 {
    background-color: #f59e0b;
}

/* In Bearbeitung - Orange */
.status-3 {
    background-color: #10b981;
}

/* Bereit zur Abholung - Grün */
.status-4 {
    background-color: #6b7280;
}

/* Abgeschlossen - Grau */
.status-5 {
    background-color: #ef4444;
}

/* Abgelehnt - Rot */

.order-info {
    background: rgba(32, 91, 231, 0.1);
    border-radius: 1rem;
    padding: 1rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    gap: 1rem;
}

.info-row:last-child {
    margin-bottom: 0;
}

.info-row .label {
    font-weight: 500;
    color: var(--text);
    flex-shrink: 0;
}

.info-row .value {
    text-align: right;
    color: var(--text);
    word-break: break-word;
}

.order-items h3 {
    margin-bottom: 1rem;
    color: var(--text);
}

.items-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.items-list .item {
    background: rgba(32, 91, 231, 0.15);
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}

.items-list .item:last-child {
    margin-bottom: 0;
}

.item-name {
    font-weight: 500;
    color: var(--text);
}

.no-items {
    text-align: center;
    color: var(--gray);
    font-style: italic;
}

/* New Order Form */
.form-section {
    background: rgba(32, 91, 231, 0.1);
    border-radius: 1rem;
    padding: .5rem;
    margin-bottom: 1rem;
}

.form-section h3 {
    margin-bottom: .5rem;
    font-variation-settings: "slnt" 0, "opsz" 18, "wght" 500;
}

.medication-input {
    display: flex;
    gap: .5rem;
}

.medication-input input {
    margin: 0;
}

.medication-input button {
    margin: 0;
    width: auto;
}

#orderNotes {
    width: 100%;
    padding: 0.5rem;
    font-family: "adelphi-pe-variable", sans-serif;
    font-variation-settings: "slnt" 0, "opsz" 6, "wght" 400;
    border-radius: 0.5rem;
    border: none;
    background-color: var(--white);
    color: var(--text);
}

#submitOrder {
    margin: 0;
}

.medication-item {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
}

#medicationsList {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.medication-item button {
    margin: 0;
    width: auto;
}

.empty-medications {
    text-align: center;
}

/* ============================================================
   TelePart - Telekonsultation Styles
   ============================================================ */

/* Start View */
.teleSteps {
    list-style: decimal;
    padding-left: 1.5rem;
}

.teleSteps li {
    list-style: decimal;
    margin-bottom: 1rem;
}

/* Device Check View */
.telePart.devicecheck {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    gap: 1.5rem;
}

.telePart.devicecheck h2 {
    font-variation-settings: "slnt" 0, "opsz" 18, "wght" 600;
    color: var(--basis);
}

.telePart.devicecheck .subtitle {
    color: #666;
}

.check-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 300px;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    background: #f8f9fa;
}

.check-icon {
    font-size: 1.25rem;
    width: 1.5rem;
    text-align: center;
}

.check-icon.pending {
    color: #ccc;
}

.check-icon.checking {
    color: var(--basis);
}

.check-icon.success {
    color: #4caf50;
}

.check-icon.error {
    color: var(--error);
}

.check-label {
    font-variation-settings: "slnt" 0, "opsz" 18, "wght" 400;
}

.check-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 0.75rem;
    background: #f0f4ff;
    color: var(--basis);
    font-variation-settings: "slnt" 0, "opsz" 18, "wght" 500;
}

.device-error {
    background: #ffebee;
    border: 1px solid #ffcdd2;
    border-radius: 0.75rem;
    padding: 1rem;
    width: 100%;
    max-width: 300px;
}

.device-error .error-message {
    color: #c62828;
    margin-bottom: 1rem;
}

.device-error-actions {
    display: flex;
    gap: 0.5rem;
}

.device-error-actions button {
    flex: 1;
}

/* Waiting View */
.telePart.waiting #part-content {
    justify-content: center;
    align-items: center;
    text-align: center;
}

.telePart.waiting .waiting-animation i {
    color: var(--basis);
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.telePart.waiting .waiting-title {
    font-variation-settings: "slnt" 0, "opsz" 18, "wght" 500;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.queue-position {
    font-variation-settings: "slnt" 0, "opsz" 18, "wght" 600;
    font-size: 1.2rem;
    text-align: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
    padding: 0.75rem 1.5rem;
    border-radius: 1rem;
    background: #f0f4ff;
    color: var(--basis);
}

.queue-position.next {
    background: var(--accent);
    color: var(--text);
    font-variation-settings: "slnt" 0, "opsz" 18, "wght" 700;
}

.queue-position.pulse {
    animation: pulse-update 0.6s ease-out;
}

.queue-wait-time {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.waiting-notice {
    background: #fff3e0;
    border: 1px solid #ffe0b2;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    color: #e65100;
    font-size: 0.9rem;
    margin-top: 1rem;
    animation: fadeIn 0.3s ease;
}

.telePart.waiting .waiting-instruction {
    color: var(--error);
    font-variation-settings: "wght" 500;
    margin-top: 1.5rem;
    font-size: 0.85rem;
}

.telePart button#disconnect {
    background-color: var(--error);
    color: var(--white);
}

@keyframes pulse-update {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Connecting View */
.telePart.connecting #part-content {
    align-items: center;
    justify-content: center;
    text-align: center;
}

.telePart.connecting .connecting-animation i {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--basis);
}

.telePart.connecting .connecting-text {
    font-variation-settings: "slnt" 0, "opsz" 18, "wght" 500;
    font-size: 1.1rem;
}

.telePart.connecting .connecting-hint {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.telePart #teleconsultation-connection-error {
    border-radius: 0.75rem;
    padding: 1rem;
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
    margin-top: 2rem;
    text-align: center;
}

.telePart #teleconsultation-connection-error .error-message {
    margin-bottom: 1rem;
}

.telePart #teleconsultation-connection-error button {
    width: auto;
    padding: 0.75rem 1.5rem;
}

/* Call View */
#teleconsultation {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    position: relative;
    background: var(--white);
    padding: 0.5rem;
    gap: 0.5rem;
    box-sizing: border-box;
}

#teleconsultation .video-container {
    flex: 1;
    width: 100%;
    min-height: 0;
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #f0f0f0;
}

#teleconsultation video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.video-off {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #e8e8e8;
    color: #888;
    z-index: 5;
}

.video-off i {
    font-size: 2.5rem;
}

.video-off span {
    font-size: 0.85rem;
}

/* Pause-Overlay des Browsers unterdrücken */
#teleconsultation video::-webkit-media-controls {
    display: none !important;
    -webkit-appearance: none;
}

#teleconsultation video::-webkit-media-controls-panel {
    display: none !important;
    -webkit-appearance: none;
}

#teleconsultation video::-webkit-media-controls-start-playback-button {
    display: none !important;
    -webkit-appearance: none;
}

#teleconsultation video::-webkit-media-controls-play-button {
    display: none !important;
    -webkit-appearance: none;
}

#teleconsultation video::-webkit-media-controls-overlay-play-button {
    display: none !important;
    -webkit-appearance: none;
}

#teleconsultation #localVideo {
    transform: scaleX(-1);
}

.call-notice {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    text-align: center;
    z-index: 20;
    max-width: 80%;
    animation: fadeIn 0.3s ease;
}

.call-controls {
    display: flex;
    width: 100%;
    padding: 0.5rem 0;
    z-index: 10;
    flex-shrink: 0;
}

.call-controls .btn-danger {
    width: 100%;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    border: none;
    background-color: var(--error);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
}

.btn-round {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn-round:hover {
    transform: scale(1.1);
}

.btn-danger {
    background-color: var(--error);
    color: var(--white);
}

/* Ended View */
.telePart.ended {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    gap: 1.5rem;
}

.telePart.ended .ended-icon i {
    font-size: 4rem;
    color: #4caf50;
}

.telePart.ended h2 {
    font-variation-settings: "slnt" 0, "opsz" 18, "wght" 600;
}

.telePart.ended .ended-message {
    color: #666;
}

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

/* Error View */
.telePart.error-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    gap: 1.5rem;
}

.telePart.error-view .error-icon i {
    font-size: 4rem;
    color: var(--error);
}

.telePart.error-view h2 {
    font-variation-settings: "slnt" 0, "opsz" 18, "wght" 600;
}

.telePart.error-view .error-message {
    color: #666;
}

.error-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* General Button Styles for TelePart */
.telePart .btn {
    border: none;
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-family: "adelphi-pe-variable", sans-serif;
    font-variation-settings: "slnt" 0, "opsz" 18, "wght" 500;
    font-size: 1rem;
    transition: opacity 0.2s ease;
}

.telePart .btn:hover {
    opacity: 0.9;
}

.telePart .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.telePart .btn-primary {
    background-color: var(--basis);
    color: var(--white);
}

.telePart .btn-secondary {
    background-color: #e0e0e0;
    color: var(--text);
}


/* Generelle Styles */
p {
    font-variation-settings: "slnt" 0, "opsz" 18, "wght" 400;
    font-size: 1.2rem;
}

button {
    width: 100%;
    padding: .5rem;
    margin-top: 1rem;

    border-radius: 1rem;
    border: none;
    background-color: var(--basis);
    color: var(--white);
    font-family: "adelphi-pe-variable", sans-serif;
    font-variation-settings: "slnt" 0, "opsz" 6, "wght" 500;
}

button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

input,
select {
    margin-top: 0.5rem;
    width: 100%;
    padding: .5rem;
    border-radius: 1rem;
    border: none;
    background-color: var(--white);
    color: var(--text);
    font-family: "adelphi-pe-variable", sans-serif;
    font-variation-settings: "slnt" 0, "opsz" 6, "wght" 400;
}

.form-group {
    margin-bottom: 1rem;
}

input:focus,
select:focus {
    outline: var(--basis) solid 2px;
}

hr {
    border: none;
    height: 2px;
    background-color: var(--basis);
}

ul {
    margin-left: 1rem;
}

.spaceleft {
    margin-left: .5rem;
}

/*Modal*/
#modal {
    border: 2px solid var(--accent);
    position: fixed;
    top: 3rem;
    left: 1rem;
    right: 1rem;
    max-height: calc(100% - 2rem);
    border-radius: 1rem;
    background-color: var(--white);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
    justify-content: flex-start;
    overflow-y: auto;

    display: none;
}

.modal-content {
    overflow-y: auto;
    max-height: 70vh;
}

.modal-header h2 {
    margin: 0;
    color: var(--basis);
    font-family: "adelphi-pe-variable", sans-serif;
    font-variation-settings: "slnt" 0, "opsz" 18, "wght" 500;
    font-size: 1.5rem;
}

.modal-content p {
    margin: 0;
    color: var(--text);
    font-family: "adelphi-pe-variable", sans-serif;
    font-variation-settings: "slnt" 0, "opsz" 6, "wght" 400;
    font-size: 1rem;
}

/* DESKTOP VIEW */
/* Phone-Frame Layout (nur wenn .phone-mode aktiv ist) */
html.phone-mode,
body.phone-mode {
    /* overrides für die globalen html/body Regeln oben (position: fixed, overflow: hidden, etc.) */
    position: static !important;
    width: auto !important;
    height: auto !important;
    overflow: auto !important;
    touch-action: auto !important;
}

body.phone-mode {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f6f9;
    padding: 24px;
}

/* App nicht mehr in Viewport-Größe erzwingen, sondern in Shell-Größe */
body.phone-mode #app {
    width: 100% !important;
    height: 100% !important;
}

.phone-shell {
    width: 390px;
    /* iPhone-ish */
    max-width: 92vw;
    height: 844px;
    /* iPhone-ish */
    max-height: 92vh;
    background: #fff;
    border-radius: 28px;
    box-shadow: 0 14px 50px rgba(0, 0, 0, .18);
    overflow: hidden;
    position: relative;
}

.phone-shell::before {
    content: "Telmiko PAT – Desktop Version";
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    text-align: center;
    font: 600 12px/1.2 system-ui, sans-serif;
    opacity: .55;
    pointer-events: none;
    z-index: 2;
}

.phone-content {
    height: 100%;
    padding-top: 34px;
    /* Platz fürs Label */
    overflow: hidden;
    /* App managed selbst ihre Scrollbereiche */
}

button,
input,
select,
textarea {
    font-size: 16px;
}

button {
    -webkit-text-size-adjust: 100%;
}

/* Legal Stuff (AuthPart) */
.legalStuff {
    width: 100%;
}

.legalStuff fieldset {
    border: 1.5px solid var(--accent);
    border-radius: 1rem;
    padding: 1rem;
    background-color: var(--white);
}

.legalStuff fieldset legend {
    font-variation-settings: "slnt" 0, "opsz" 18, "wght" 500;
    color: var(--basis);
    padding: 0 0.5rem;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.legalStuff fieldset>div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 2px dotted var(--accent);
}

.legalStuff fieldset>div:last-of-type {
    border-bottom: none;
}

.legalStuff fieldset input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    accent-color: var(--basis);
    cursor: pointer;
}

.legalStuff fieldset label {
    font-variation-settings: "slnt" 0, "opsz" 18, "wght" 400;
    font-size: 1rem;
    cursor: pointer;
}

.legalStuff fieldset label a {
    color: var(--basis);
    text-decoration: underline;
}

.legalStuff fieldset label a:hover {
    color: var(--accent);
}

.legalStuff #legalStuffButton {
    margin-top: 1rem;
}

.legalStuff #legalStuffButton:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* Large Font Mode - bei sehr großer Systemschrift */
.large-font #dashboard-header button {
    width: 40px;
    height: 40px;
    min-width: 40px;
}

.large-font #dashboard-header button i {
    font-size: 16px;
}

.large-font ol {
    padding-left: 2rem;
}

.large-font .dashboard-button p,
.large-font .dashboard-button small {
    display: none;
}

.large-font .dashboard-button {
    justify-content: center;
    align-items: center;
}

.large-font .dashboard-button i {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.large-font .dashboard-button i::before {
    display: block;
}

.large-font .part {
    padding: 16px;
    gap: 16px;
    grid-template-rows: auto 1fr auto;
    overflow: hidden;
}

.large-font .part>#part-header {
    min-height: 50px;
}

.large-font .part>#part-footer {
    min-height: 40px;
    align-items: stretch;
}

.large-font .part>#part-footer button {
    padding: 8px 16px;
    flex: 1;
}

/* Update Banner */
#update-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: var(--basis);
    color: #fff;
    padding: 12px 20px;
    padding-top: calc(env(safe-area-inset-top, 0px) + 12px);
    font-family: "adelphi-pe-variable", sans-serif;
    font-variation-settings: "slnt" 0, "opsz" 6, "wght" 400;
    font-size: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s ease-out;
}

#update-banner .update-banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 800px;
    margin: 0 auto;
}

#update-banner button {
    width: auto;
    margin: 0;
    margin-top: 0;
    border-radius: 0.5rem;
    font-family: "adelphi-pe-variable", sans-serif;
}

#update-banner-btn {
    background: var(--accent);
    color: var(--text);
    border: none;
    padding: 8px 20px;
    cursor: pointer;
    font-variation-settings: "slnt" 0, "opsz" 6, "wght" 500;
    font-size: 14px;
}

#update-banner-btn:hover {
    background: #fff;
    color: var(--basis);
}

#update-banner-close {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    opacity: 0.8;
}

#update-banner-close:hover {
    opacity: 1;
    background: none;
    color: #fff;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}