.rp-rezept-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    border: 1px solid #ddd;
    background: #fff;
}
.rp-row {
    margin-bottom: 15px;
}
.rp-two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.rp-three-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.rp-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 3px;
}
.rp-field input,
.rp-field select,
.rp-field textarea {
    width: 100%;
    padding: 6px 8px;
    box-sizing: border-box;
}
.rp-patient-info-box {
    border: 1px solid #333;
    padding: 10px;
    margin-bottom: 15px;
}
.rp-field-readonly {
    opacity: 0.8;
}
.rp-btn {
    display: inline-block;
    padding: 8px 16px;
    margin: 3px;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #000;
    text-align: center;
}
.rp-btn-green {
    background: #00c853;
    color: #000;
}
.rp-btn-red {
    background: #d50000;
    color: #fff;
}
.rp-btn-blue {
    background: #2962ff;
    color: #fff;
}
.rp-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}
.rp-table th,
.rp-table td {
    border: 1px solid #333;
    padding: 4px 6px;
}
.rp-hint-red {
    background: #ffcdd2;
    padding: 8px;
    border-radius: 4px;
}
.rp-errors {
    background: #ffcdd2;
    padding: 8px;
    margin-bottom: 10px;
}
.rp-success {
    background: #c8e6c9;
    padding: 8px;
    margin-bottom: 10px;
}

.rp-pw-forget-link {
    text-align: center;
}
.rp-row.rp-buttons {
    text-align: center;
}

@media print {
    body * {
        visibility: hidden;
    }

    .rp-rezept-history,
    .rp-rezept-history * {
        visibility: visible;
    }

    .rp-rezept-history .rp-row.rp-buttons {
        display: none !important;
    }

    .rp-rezept-history {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }

    /* Geburtsdatum in der Druckansicht ausblenden, damit nur Name und Bestellungen sichtbar sind */
    .rp-rezept-history .rp-patient-info-box .rp-row:nth-child(2) {
        display: none;
    }
}


/* Patienten-Dashboard */
.rp-dashboard {
    max-width: 800px;
    margin: 30px auto 0;
}

.rp-dash-section {
    margin-bottom: 25px;
    padding: 15px 20px;
    border: 1px solid #ddd;
    background: #fff;
}

.rp-dash-section h2 {
    margin-top: 0;
    margin-bottom: 10px;
}

.rp-dash-medikation-text {
    white-space: pre-wrap;
    background: #f7f7f7;
    border: 1px solid #e1e1e1;
    padding: 10px;
    font-size: 13px;
}

.rp-dash-medikation-note {
    font-size: 12px;
    color: #555;
    margin-top: 8px;
}

.rp-dash-orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.rp-dash-orders-table th,
.rp-dash-orders-table td {
    border: 1px solid #e1e1e1;
    padding: 6px 8px;
}

.rp-dash-orders-table th {
    background: #f5f5f5;
    text-align: left;
}

.rp-dash-reorder-link {
    font-size: 12px;
    text-decoration: underline;
}


/* Icons in der Medikamenten-Verwaltung */
.rp-btn .rp-icon {
    display: inline-block;
    margin-right: 4px;
    font-size: 1.0em;
    line-height: 1;
}
.rp-btn .rp-label {
    vertical-align: middle;
}


/* Medikamenten-Verwaltung: Icon-Buttons in der Favoriten-Tabelle (Meine Medikamente) */
.rp-med-table .rp-med-actions {
    white-space: nowrap;
}

.rp-med-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.8);
    color: #000;
    cursor: pointer;
    padding: 0;
    margin: 0 3px;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.rp-med-icon-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.rp-med-icon-btn:hover,
.rp-med-icon-btn:focus {
    background: rgba(0, 102, 255, 0.15);
    color: #0066ff;
    box-shadow: 0 0 6px rgba(0, 102, 255, 0.4);
    transform: translateY(-1px);
}

.rp-med-icon-form {
    display: inline;
}

.rp-section-med-favorites {
    margin-bottom: 25px;
}


/* RP Rezept – kompaktere Darstellung für Medikamenten-Favoriten */
.rp-rezept-favoriten-form {
    max-width: 900px;
    margin: 10px auto 20px;
}

.rp-fav-main-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1.4fr 1fr;
    gap: 10px;
    align-items: flex-end;
}

.rp-fav-field-small input,
.rp-fav-field-small select {
    max-width: 150px;
}

/* Notizzeile */
.rp-fav-note-row .rp-field input[type="text"] {
    width: 100%;
}

/* Hilfe-Icon bei Einheit */
.rp-fav-unit-label {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rp-help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.4);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    cursor: help;
    background: rgba(255, 255, 255, 0.9);
}

.rp-help-icon:hover,
.rp-help-icon:focus {
    background: #1976d2;
    color: #fff;
}

/* Buttons im Favoriten-Formular angleichen */
.rp-fav-buttons .rp-btn {
    min-width: 180px;
    text-align: center;
}


/* RP Rezept – Willkommen Box abgerundet */
.rp-rezept-welcome .rp-welcome-box {
    border-radius: 20px;
    overflow: hidden;
}



/* Runde Tabelle in der Willkommensbox */
.rp-rezept-welcome table,
.rp-rezept-welcome td,
.rp-rezept-welcome th {
    border-radius: 12px;
    overflow: hidden;
}


/* Card-Style für Tabelle wie untere Buttons */
.rp-rezept-welcome .rp-welcome-box table {
    background: rgba(255,255,255,0.5);
    border-radius: 22px;
    padding: 20px;
    margin-top: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    backdrop-filter: blur(4px);
}

/* Tabellenzellen weicher gestalten */
.rp-rezept-welcome .rp-welcome-box table td,
.rp-rezept-welcome .rp-welcome-box table th {
    background: transparent;
    border: none;
    padding: 12px 8px;
}


/* RP Rezept – Übersicht Button-Leiste */
.rp-bar-overview {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin: 20px auto 0;
    max-width: 900px;
}

.rp-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 120px;
    border-radius: 22px;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.7);
    box-shadow: 0 8px 18px rgba(0,0,0,0.08);
    backdrop-filter: blur(6px);
    background: linear-gradient(180deg, rgba(255,255,255,0.8), rgba(200,220,255,0.9));
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    text-align: center;
    padding: 10px;
}

.rp-bar-item:hover,
.rp-bar-item:focus {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
    background: linear-gradient(180deg, #ffffff, rgba(180,210,255,0.95));
}

.rp-bar-item .rp-bar-icon {
    font-size: 26px;
    margin-bottom: 8px;
}

.rp-bar-item .rp-bar-label {
    font-size: 14px;
    font-weight: 600;
    color: #000;
}

.rp-bar-item-logout .rp-bar-label {
    color: #b00020;
}


/* Tabellen – Glass-Design mit Hell/Dunkel-Theme */
.rp-table.rp-table--glass {
    border-collapse: collapse;
    border-radius: 16px;
    overflow: hidden;
    background-clip: padding-box;
    margin-bottom: 1.5rem;
}

/* Grundlayout für Glass-Tabellen */
.rp-table.rp-table--glass th,
.rp-table.rp-table--glass td {
    border: none;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

.rp-table.rp-table--glass th {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.75rem;
}

/* Hell: Glass auf hellem Hintergrund */
.rp-table.rp-table--light {
    background: rgba(255, 255, 255, 0.7);
    color: #1f2933;
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow:
        0 18px 45px rgba(15, 23, 42, 0.18),
        0 0 0 1px rgba(255, 255, 255, 0.7);
}

.rp-table.rp-table--light th {
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.85),
        rgba(255, 255, 255, 0.65)
    );
    color: #0f172a;
}

.rp-table.rp-table--light tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.55);
}

.rp-table.rp-table--light tr:hover td {
    background: rgba(255, 255, 255, 0.9);
}

/* Dunkel: Glass auf dunklem Hintergrund */
.rp-table.rp-table--dark {
    background: rgba(15, 23, 42, 0.75);
    color: #e5e7eb;
    border: 1px solid rgba(148, 163, 184, 0.6);
    box-shadow:
        0 18px 45px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(148, 163, 184, 0.4);
}

.rp-table.rp-table--dark th {
    background: linear-gradient(
        to bottom,
        rgba(30, 64, 175, 0.8),
        rgba(15, 23, 42, 0.9)
    );
    color: #f9fafb;
}

.rp-table.rp-table--dark tr:nth-child(even) td {
    background: rgba(15, 23, 42, 0.55);
}

.rp-table.rp-table--dark tr:hover td {
    background: rgba(30, 64, 175, 0.5);
}

/* Links in Tabellen */
.rp-table.rp-table--glass a {
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px dashed transparent;
}

.rp-table.rp-table--light a {
    color: #2563eb;
}

.rp-table.rp-table--dark a {
    color: #bfdbfe;
}

.rp-table.rp-table--glass a:hover {
    border-bottom-color: currentColor;
}


/* Override: Formular-Container ohne sichtbaren Außenrand / Hintergrund */
.rp-rezept-form {
    border: none;
    background: transparent;
}

/* Login-Tabellenlayout – Feinanpassung */
.rp-table.rp-login-table {
    border: 1px solid transparent;
}

/* Zeile "Passwort & Registrierung" mittig ausrichten */
.rp-table.rp-login-table .rp-login-legend-split {
    text-align: center;
    vertical-align: middle;
}

.rp-table.rp-login-table .rp-login-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}

/* Anmelde-Button im Kachel-Design unterhalb der Tabelle */
.rp-login-submit-outer {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.rp-login-submit-button {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 26px;
    border-radius: 24px;
    border: none;
    background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(235,242,255,0.95) 100%);
    box-shadow:
        0 10px 24px rgba(15, 23, 42, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
}

.rp-table.rp-table--dark + .rp-login-submit-outer .rp-login-submit-button {
    background: linear-gradient(180deg, rgba(30,64,175,0.9) 0%, rgba(15,23,42,0.95) 100%);
    color: #e5e7eb;
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(148, 163, 184, 0.5);
}

.rp-login-submit-button .rp-login-submit-icon {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 4px;
}

.rp-login-submit-button .rp-login-submit-label {
    font-size: 0.95rem;
}

/* Button etwas flacher wirken lassen auf Hover */
.rp-login-submit-button:hover {
    transform: translateY(-1px);
    box-shadow:
        0 12px 28px rgba(15, 23, 42, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.7);
}

.rp-table.rp-table--dark + .rp-login-submit-outer .rp-login-submit-button:hover {
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(148, 163, 184, 0.7);
}
