/* DevWorld-Plattform – gemeinsame Grundstile für Portal und App-Host.
   Schrift selbst gehostet (keine externen Requests, DSGVO). */
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('fonts/roboto.woff2') format('woff2');
}

html, body {
    font-family: 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Aktiver Menüpunkt wie im Netcom-Backoffice: hellgrau hinterlegt, Text blau */
.dw-shell .mud-nav-link.active:not(.mud-nav-link-disabled) {
    background-color: #eceff3;
    color: var(--mud-palette-primary);
    font-weight: 500;
}
.dw-shell .mud-nav-link.active:not(.mud-nav-link-disabled) .mud-nav-link-icon {
    color: var(--mud-palette-primary);
}
.dw-shell .mud-nav-link { padding-top: 10px; padding-bottom: 10px; }
.dw-shell .mud-drawer { border-right: 1px solid var(--mud-palette-lines-default); }

/* Seitenkopf: Titel links, Aktionen rechts */
.dw-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

/* Tabellen mit Spaltenlinien wie im Vorbild */
.dw-grid .mud-table-cell + .mud-table-cell { border-left: 1px solid var(--mud-palette-table-lines); }
.dw-grid .mud-table-head .mud-table-cell { font-weight: 500; }

/* Kontoseiten: zentrierte Karte */
.dw-auth { display: flex; justify-content: center; padding: 32px 16px 48px; }
.dw-auth > .mud-paper { width: min(100%, 440px); }

/* Statische Formulare (ohne Blazor-Interaktivität) im MudBlazor-"Outlined"-Look */
.dw-field { position: relative; }
.dw-field .dw-label {
    position: absolute; top: 0; left: 10px; transform: translateY(-50%); z-index: 1;
    padding: 0 4px; background: #fff; font-size: .75rem; line-height: 1.2; color: rgba(0,0,0,.6);
}
.dw-field:focus-within .dw-label { color: var(--mud-palette-primary, #1976d2); }
.dw-input {
    width: 100%; box-sizing: border-box; min-height: 44px; padding: 10px 14px;
    font: inherit; font-size: 1rem; color: rgba(0,0,0,.87); background: #fff;
    border: 1px solid rgba(0,0,0,.23); border-radius: 4px; outline: none;
}
.dw-input:hover { border-color: rgba(0,0,0,.87); }
.dw-input:focus { border-color: var(--mud-palette-primary, #1976d2); box-shadow: inset 0 0 0 1px var(--mud-palette-primary, #1976d2); }
.dw-error { display: block; margin: 3px 14px 0; font-size: .75rem; color: #d32f2f; }
.dw-check { display: flex; align-items: center; gap: 8px; font-size: .875rem; color: rgba(0,0,0,.87); }
.dw-check input { width: 18px; height: 18px; accent-color: var(--mud-palette-primary, #1976d2); }
.dw-btn {
    display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 6px 16px;
    font: inherit; font-size: .875rem; font-weight: 500; letter-spacing: .02857em; text-transform: uppercase;
    border-radius: 4px; border: 1px solid rgba(25,118,210,.5); background: transparent; color: #1976d2; cursor: pointer;
}
.dw-btn--primary {
    border-color: transparent; background: var(--mud-palette-primary, #1976d2); color: #fff;
    box-shadow: 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12);
}
.dw-btn--primary:hover { background: #1565c0; }
.dw-btn--block { width: 100%; }

/* --- Statische Kontoseiten (Identity im Portal): Ergänzungen --- */
.dw-auth--wide > .mud-paper { width: min(100%, 600px); }
@media (max-width: 599.98px) { .dw-auth { padding: 8px 0 32px; } }
.dw-auth-head { margin-bottom: 20px; }
.dw-form { max-width: 560px; }
.dw-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 0 16px; }
.dw-input:disabled { color: rgba(0,0,0,.6); background: #fff; border-color: rgba(0,0,0,.12); cursor: default; }
.dw-input.invalid { border-color: #d32f2f; }
.dw-input.invalid:focus { box-shadow: inset 0 0 0 1px #d32f2f; }
.dw-field--adorned .dw-input { padding-right: 44px; }
.dw-adorn {
    position: absolute; right: 12px; top: 22px; transform: translateY(-50%);
    font-weight: 700; color: var(--mud-palette-success, #43a047);
}
.dw-btn:hover { background: rgba(25,118,210,.04); border-color: #1976d2; }
.dw-btn:focus-visible { outline: 2px solid var(--mud-palette-primary, #1976d2); outline-offset: 2px; }
.dw-btn--primary:hover { background: #1565c0; border-color: transparent; }
.dw-btn--danger {
    border-color: transparent; background: var(--mud-palette-error, #e53935); color: #fff;
    box-shadow: 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12);
}
.dw-btn--danger:hover { background: #c62828; border-color: transparent; }
.dw-btn--text { border-color: transparent; padding-left: 8px; padding-right: 8px; }
.dw-btn--text:hover { border-color: transparent; }
.dw-actions { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.dw-actions > form { display: inline-flex; margin: 0; }
/* ValidationSummary als Fehlerhinweis im MudAlert-Look */
.dw-summary { margin: 0 0 16px; padding: 10px 16px 10px 36px; border-radius: 4px; background: #fdecea; color: #611a15; font-size: .875rem; }
.dw-summary:empty { display: none; }
.dw-summary li { margin: 2px 0; }
.dw-or { display: flex; align-items: center; gap: 12px; margin: 20px 0 12px; color: rgba(0,0,0,.6); font-size: .75rem; letter-spacing: .08em; }
.dw-or::before, .dw-or::after { content: ""; flex: 1; border-top: 1px solid var(--mud-palette-lines-default, #e0e0e0); }
.dw-links { display: flex; flex-direction: column; gap: 6px; }
.dw-kbd { padding: 2px 6px; border-radius: 4px; background: #eceff3; font-family: Consolas, 'Courier New', monospace; font-size: .9em; word-break: break-all; }
.dw-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.dw-codes code { display: block; padding: 8px 10px; border-radius: 4px; background: #f5f5f5; border: 1px solid #e0e0e0; font-family: Consolas, 'Courier New', monospace; font-size: .95rem; text-align: center; }
.dw-steps { margin: 0; padding-left: 20px; }
.dw-steps > li { margin-bottom: 16px; }
.dw-steps > li::marker { font-weight: 500; color: var(--mud-palette-primary, #1976d2); }
.dw-prose p { margin: 0 0 8px; }
.dw-prose p:last-child { margin-bottom: 0; }

/* QR-Code der Authenticator-Einrichtung (SVG aus QRCoder) */
.dw-qr { display: inline-block; margin: 12px 0 4px; padding: 10px; background: #fff; border: 1px solid #e0e0e0; border-radius: 4px; line-height: 0; }
.dw-qr svg { width: 180px; height: 180px; }
