/* ====== Basis – wie in den HTML-Mails ====== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    background-color: #f2f4f7;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    font-size: 14px;
    line-height: 1.5;
    color: #3b4250;
}

a {
    color: #5c8fc5;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* ====== Layout-Karte (angepasst an Webseitenlayout) ====== */

.ph-shell {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background-color: #f2f4f7;
    padding: 16px 0;
}

.ph-mail-wrapper {
    width: 100%;
    max-width: 1040px;
    padding: 0 16px;
}

.ph-mail-card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    border: 1px solid #e5e7eb;
}

/* ====== Header ====== */

.ph-mail-header {
    background: #f9fbff;
    border-bottom: 4px solid #5c8fc5;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.ph-mail-logo-img {
    height: 48px;
    width: auto;
    border-radius: 4px;
    flex-shrink: 0;
}

.ph-mail-header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ph-mail-header-title {
    font-size: 18px;
    font-weight: 600;
    color: #2f3c4f;
    margin: 0;
}

.ph-mail-header-subtitle {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
}

/* Admin-Navigation */

.ph-mail-nav {
    margin-left: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ph-mail-nav a {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    background: #ffffff;
}
.ph-mail-nav a:hover {
    background: #f3f4f6;
}

/* ====== Subheader ====== */

.ph-mail-subject {
    padding: 10px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    font-size: 13px;
    color: #4b5563;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.ph-mail-subject-title {
    font-weight: 500;
}

.ph-mail-subject-meta {
    font-size: 11px;
    color: #9ca3af;
}

/* ====== Inhalt ====== */

.ph-main {
    padding: 20px 24px 18px 24px;
}

.ph-main-inner {
    width: 100%;
    overflow-x: auto;
}

.ph-main-inner::-webkit-scrollbar {
    height: 6px;
}
.ph-main-inner::-webkit-scrollbar-track {
    background: #eceff1;
}
.ph-main-inner::-webkit-scrollbar-thumb {
    background: #cfd8dc;
    border-radius: 999px;
}

h1, h2, h3 {
    margin-top: 0;
    font-weight: 600;
    color: #2f3c4f;
}

h1 { font-size: 18px; margin-bottom: 10px; }
h2 { font-size: 16px; margin-top: 18px; margin-bottom: 6px; }
h3 { font-size: 15px; margin-top: 14px; margin-bottom: 4px; }

p {
    margin: 0 0 8px;
    font-size: 14px;
}

/* ====== Footer ====== */

.ph-footer {
    padding: 10px 24px 14px 24px;
    font-size: 11px;
    color: #9ca3af;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.ph-footer a {
    color: #6b7280;
}

/* ====== Buttons ====== */

.ph-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 999px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: #5c8fc5;
    color: #ffffff;
}
.ph-btn:hover {
    background: #4a78aa;
}

.ph-btn-secondary {
    background: #e5e7eb;
    color: #374151;
}
.ph-btn-secondary:hover {
    background: #d4d4d8;
}

/* Badges */

.ph-badge {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
}
.badge-done {
    background: #c8e6c9;
    color: #2e7d32;
}
.badge-pending {
    background: #eceff1;
    color: #455a64;
}
.badge-needs-file {
    background: #ffe0b2;
    color: #b45309;
}

/* Timeline */

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

.timeline-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    margin-right: 6px;
    margin-top: 4px;
}

.status-done { background: #66bb6a; }
.status-pending { background: #b0bec5; }
.status-needs-file { background: #ffb74d; }

.timeline-content { flex: 1; }

.step-title { font-weight: 600; font-size: 13px; }
.step-meta { font-size: 11px; color: #9ca3af; }
.step-description { font-size: 13px; margin-top: 2px; color: #374151; }

/* Progress */

.progress-label {
    font-size: 12px;
    color: #607d8b;
    margin-bottom: 4px;
}

.progress-bar-wrapper {
    background: #eceff1;
    border-radius: 999px;
    overflow: hidden;
    height: 10px;
    margin-bottom: 10px;
}

.progress-bar {
    height: 10px;
    background: #66bb6a;
    transition: width 0.3s ease;
}

/* Info / Messages */

.info-box {
    background: #fff8e1;
    border-left: 3px solid #b45309;
    border-radius: 6px;
    padding: 8px 10px;
    margin-bottom: 10px;
    font-size: 13px;
    color: #92400e;
}

.msg-success {
    background: #e8f5e9;
    color: #2e7d32;
}
.msg-error {
    background: #ffebee;
    color: #c62828;
}

.muted {
    font-size: 12px;
    color: #9ca3af;
}

/* Formulare */

.ph-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
}

.ph-form input,
.ph-form select,
.ph-form textarea {
    width: 100%;
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid #cfd8dc;
    font-size: 13px;
    font-family: inherit;
}

.ph-form textarea {
    min-height: 80px;
}

/* Tabellen */

.ph-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 720px;
}

.ph-table th,
.ph-table td {
    padding: 6px 6px;
    border-bottom: 1px solid #eceff1;
}

.ph-table th {
    background: #f9fafb;
    text-align: left;
    font-weight: 600;
}

/* Responsive */

@media (max-width: 640px) {
    .ph-mail-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .ph-mail-nav {
        margin-left: 0;
    }
    .ph-main {
        padding: 16px;
    }
    .ph-footer {
        padding: 8px 16px 12px;
    }
}

/* Feintuning für Formulare allgemein */

form.ph-form {
    max-width: 640px;
}

form.ph-form label {
    display: block;
    margin-bottom: 14px;
}

form.ph-form label span {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

form.ph-form input[type="text"],
form.ph-form input[type="email"],
form.ph-form input[type="number"],
form.ph-form select,
form.ph-form textarea {
    width: 100%;
    padding: 8px 9px;
    border-radius: 4px;
    border: 1px solid #cfd8dc;
    font-size: 13px;
    font-family: inherit;
    box-sizing: border-box;
    margin-bottom: 4px;
}

form.ph-form textarea {
    min-height: 100px;
    resize: vertical;
}

/* Inputs in Tabellen schöner darstellen (z.B. in sessions_manage.php) */

table input[type="text"],
table input[type="email"],
table input[type="number"],
table input[type="date"],
table select,
table textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid #cfd8dc;
    font-size: 13px;
    font-family: inherit;
}

/* Textareas in Tabellen etwas höher und nur vertikal vergrößerbar */
table textarea {
    min-height: 80px;
    resize: vertical;
}



/* ===========================================================
   KOMPATIBILITÄT – DEIN LV-SYSTEM (card, btn, tables, messages)
   =========================================================== */

.card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    border: 1px solid #e5e7eb;
    padding: 16px 20px;
    margin-bottom: 16px;
}

.card-header {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e5e7eb;
    color: #2f3c4f;
}

.card-footer {
