/* ====== 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 wie in der Mail, aber breiter & flexibler ====== */

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

/* → breiter gemacht (1040px statt 720px) */
.ph-mail-wrapper {
    width: 100%;
    max-width: 1040px;
    padding: 0 16px;
}

/* → overflow: hidden entfernt, damit nichts abgeschnitten wird */
.ph-mail-card {
    background-color: #ffffff;
    border-radius: 8px;
    /* overflow: hidden;  ENTFERNT */
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    border: 1px solid #e5e7eb;
}

/* ====== Header (aus der Mail übernommen) ====== */

.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;
}

/* kleine Admin-Navigation rechts */
.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;
    text-decoration: none;
    background: #ffffff;
}
.ph-mail-nav a:hover {
    background: #f3f4f6;
}

/* ====== Betreff-/Infoband wie in einer Mail ====== */

.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;
}

/* ====== Hauptinhalt ====== */

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

/* → hier erlauben wir horizontales Scrollen für breite Inhalte (Tabellen, Formulare) */
.ph-main-inner {
    width: 100%;
    overflow-x: auto;
}

/* optional: kleinerer Scrollbalken, rein optisch */
.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;
}

.ph-card {
    background: transparent;
    padding: 0;
}

/* Typografie im Inhalt */

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, Badges etc. ====== */

.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;
    text-decoration: none;
}

.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 / Tracking */

.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-Balken */

.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-radius: 6px;
    padding: 8px 10px;
    font-size: 13px;
    margin-bottom: 10px;
    border-left: 3px solid #b45309;
    color: #92400e;
}

.msg {
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 8px;
}
.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 (Admin) */

/* → geben wir eine minimale Breite, damit sie nicht „zusammenbrechen“ und
   lassen sie bei Bedarf im .ph-main-inner scrollen */
.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 Anpassungen */

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