body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: #f5f5f5;
}

.nav {
    background: #1f2937;
    padding: 12px 20px;
}

.nav a {
    color: white;
    text-decoration: none;
    margin-right: 16px;
}

.main-content {
    padding: 24px;
}

.container {
    background: white;
    padding: 24px;
    border-radius: 8px;
    max-width: 900px;
    margin: 0 auto;
}

form div {
    margin-bottom: 12px;
}

input {
    width: 100%;
    max-width: 320px;
    padding: 8px;
}

button {
    padding: 10px 16px;
    cursor: pointer;
}

.admin-tabs-wrap {
    margin-top: 18px;
}

.admin-tabs-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.admin-tab-link {
    border: 1px solid #d9deea;
    background: #f8fafc;
    color: #334155;
    padding: 8px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s ease-in-out;
    text-decoration: none;
    min-height: 38px;
}

.admin-tab-link:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.admin-tab-link.active {
    background: #eaf2ff;
    border-color: #7aa2f7;
    color: #163b7a;
    font-weight: 700;
    box-shadow: 0 0 0 2px rgba(122, 162, 247, 0.12);
}

.admin-tab-icon,
.settings-subnav-icon {
    width: 1.25em;
    min-width: 1.25em;
    text-align: center;
    font-size: 15px;
    line-height: 1;
}

.admin-page-note {
    color: #667085;
    margin: -6px 0 14px 0;
    line-height: 1.5;
}

.sub-nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* WordPress-/iframe-freundliche Kapselung und zentrierte Einstiegsseiten */
.dpp-app-root {
    box-sizing: border-box;
}

.dpp-app-root *,
.dpp-app-root *::before,
.dpp-app-root *::after {
    box-sizing: border-box;
}

.dpp-page-card {
    width: min(900px, 100%);
    margin: 0 auto;
}

.dpp-start-card,
.dpp-login-card {
    max-width: 760px;
    text-align: center;
}

.dpp-login-card form {
    max-width: 420px;
    margin: 18px auto 0 auto;
    text-align: left;
}

.dpp-login-card input[type="checkbox"] {
    width: auto;
    max-width: none;
}

.dpp-login-card button,
.dpp-primary-link {
    display: inline-block;
}

.dpp-embedded {
    background: transparent;
}

.dpp-embedded .main-content {
    padding: 0;
}

.dpp-embedded .container {
    box-shadow: none;
    border-radius: 0;
}

@media (max-width: 768px) {
    .main-content {
        padding: 12px;
    }

    .container {
        padding: 16px;
    }
}

/* Robuste Zentrierung der DPP-Startseite ohne Abhängigkeit von generischen .container-Styles.
   Wichtig für spätere WordPress-/iframe-Einbindung, weil WordPress-Themes oft eigene .container-Regeln setzen. */
.dpp-entry-shell {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0;
}

.dpp-entry-card {
    width: min(760px, 100%);
    margin: 0 auto;
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    text-align: center;
}


/* Einstiegseiten ohne Hauptmenü: Home und Admin-Login werden identisch mittig dargestellt. */
.dpp-entry-main {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 48px;
}

.dpp-entry-main .dpp-page-card {
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .dpp-entry-main {
        padding-top: 20px;
    }
}

/* Home-Startseite: eigene, gekapselte Klassen ohne Bootstrap-/WordPress-Container-Konflikt. */
.dpp-home-shell {
    width: 100%;
    min-height: calc(100vh - 96px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 48px;
}

.dpp-home-card {
    width: min(760px, 100%);
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    text-align: center;
}

.dpp-home-link {
    display: inline-block;
}

@media (max-width: 768px) {
    .dpp-home-shell {
        min-height: auto;
        padding-top: 20px;
    }
}

/* V7: Home wird über _Layout.cshtml gerendert; kein eigener HTML-/Body-Wrap nötig. */
.dpp-entry-main .dpp-home-card {
    max-width: 760px;
    text-align: center;
}


/* V9: zentraler WordPress-/iframe-Modus.
   Keine zusätzliche Menüleiste im Layout; embed=1 entfernt nur Außenabstände und hält Links/Formulare im Embed-Modus. */
body.dpp-embedded {
    background: transparent;
}

body.dpp-embedded .main-content {
    padding: 0;
}

.dpp-entry-main {
    width: 100%;
}

.dpp-home-shell {
    width: 100%;
    min-height: calc(100vh - 96px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 48px;
}

body.dpp-embedded .dpp-home-shell {
    min-height: auto;
    padding: 24px 0 0 0;
}

.dpp-home-card {
    width: min(760px, 100%);
    margin: 0 auto;
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    text-align: center;
}

@media (max-width: 768px) {
    body.dpp-embedded .dpp-home-shell,
    .dpp-home-shell {
        padding-top: 20px;
    }
}


/* V11: Benutzerverwaltung als Teil der Einstellungsseite.
   Kein verschachtelter .container mehr, damit die Ansicht nicht nach innen/rechts versetzt wird. */
.dpp-users-page {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    background: transparent;
}

.dpp-users-title {
    margin: 0 0 16px 0;
}

.dpp-users-layout {
    display: grid;
    grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.dpp-users-side {
    display: grid;
    gap: 18px;
}

.dpp-users-table-section {
    min-width: 0;
}

.dpp-table-scroll {
    width: 100%;
    overflow-x: auto;
}

.dpp-users-page table {
    min-width: 760px;
}

.dpp-users-page input,
.dpp-users-page select {
    max-width: 100%;
}

@media (max-width: 980px) {
    .dpp-users-layout {
        grid-template-columns: 1fr;
    }
}

/* Public/customer DPP surfaces. Kept under dpp-passport-* to avoid WordPress theme collisions. */
.dpp-passport-shell {
    width: min(1180px, 100%);
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #dde3ea;
    border-radius: 8px;
    overflow: hidden;
}

.dpp-passport-hero {
    background: #f7f9fc;
    border-bottom: 1px solid #dde3ea;
    padding: 24px;
}

.dpp-passport-kicker {
    color: #526070;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.dpp-passport-title {
    margin: 8px 0 0 0;
    color: #172033;
    font-size: 30px;
    line-height: 1.15;
}

.dpp-passport-subtitle {
    max-width: 820px;
    margin: 10px 0 0 0;
    color: #4f5f70;
    line-height: 1.55;
}

.dpp-passport-status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.dpp-passport-badge {
    display: inline-flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #26364d;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 700;
}

.dpp-passport-badge.ok {
    border-color: #b7d7be;
    background: #f1fbf4;
    color: #1f6a36;
}

.dpp-passport-badge.warn {
    border-color: #e3c36c;
    background: #fff8df;
    color: #7a5200;
}

.dpp-passport-main {
    padding: 22px 24px 26px 24px;
}

.dpp-passport-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 12px;
}

.dpp-passport-card {
    border: 1px solid #e1e7ef;
    background: #ffffff;
    border-radius: 8px;
    padding: 14px;
    min-width: 0;
}

.dpp-passport-card.soft {
    background: #fafbfd;
}

.dpp-passport-label {
    color: #667085;
    font-size: 13px;
    line-height: 1.35;
}

.dpp-passport-value {
    margin-top: 5px;
    color: #172033;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.dpp-passport-section {
    margin-top: 22px;
}

.dpp-passport-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.dpp-passport-section-title {
    margin: 0;
    color: #172033;
    font-size: 20px;
    line-height: 1.25;
}

.dpp-passport-section-note {
    color: #667085;
    line-height: 1.45;
    margin: 4px 0 0 0;
}

.dpp-passport-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e1e7ef;
    border-radius: 8px;
}

.dpp-passport-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    background: #ffffff;
}

.dpp-passport-table th,
.dpp-passport-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #edf1f5;
    text-align: left;
    vertical-align: top;
}

.dpp-passport-table th {
    color: #526070;
    font-size: 13px;
    background: #f8fafc;
}

.dpp-passport-table tr:last-child td {
    border-bottom: 0;
}

.dpp-passport-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.dpp-passport-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 9px 13px;
    border-radius: 8px;
    border: 1px solid #2759b8;
    background: #2759b8;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
}

.dpp-passport-button.secondary {
    background: #ffffff;
    color: #2759b8;
}

.dpp-passport-button.muted {
    border-color: #cbd5e1;
    color: #334155;
    background: #ffffff;
}

.dpp-passport-timeline {
    display: grid;
    gap: 12px;
}

.dpp-passport-timeline-item {
    border: 1px solid #e1e7ef;
    border-radius: 8px;
    padding: 14px;
    background: #ffffff;
}

.dpp-passport-meta {
    color: #667085;
    font-size: 13px;
    line-height: 1.45;
}

.dpp-passport-qr {
    width: 180px;
    max-width: 100%;
    height: auto;
    border: 1px solid #dde3ea;
    padding: 8px;
    background: #ffffff;
}

.dpp-customer-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.dpp-customer-tab-button {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #253247;
    border-radius: 8px;
    padding: 9px 13px;
    cursor: pointer;
    font-weight: 700;
}

.dpp-customer-tab-button.active {
    border-color: #2759b8;
    background: #edf4ff;
    color: #183f87;
}

.dpp-customer-panel {
    display: none;
    margin-top: 14px;
}

.dpp-customer-panel.active {
    display: block;
}

body.dpp-embedded .dpp-passport-shell {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
}

@media (max-width: 760px) {
    .dpp-passport-hero,
    .dpp-passport-main {
        padding: 18px;
    }

    .dpp-passport-title {
        font-size: 24px;
    }
}
