/* Account & Settings Modal - Modern Design */

/* Layout & Structure */
#account-modal .modal-content {
    background: #fff;
    width: 95%;
    max-width: 1200px;
    height: 85vh;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

#account-modal .modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    z-index: 20;
}

#account-modal .modal-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 14px;
}

#account-modal .modal-title i {
    color: var(--primary);
    font-size: 1.5rem;
}

#account-modal .modal-close {
    background: #f1f5f9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

#account-modal .modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: rotate(90deg);
}

#account-modal .modal-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    padding: 0 !important;
    background: #f8fafc; /* Light background for the whole body to make cards pop */
}

/* Sidebar */
.settings-sidebar {
    width: 280px;
    background-color: #fff;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 10;
}

.user-profile-summary {
    padding: 40px 24px 32px;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(to bottom, #f8fafc, #fff);
}

.account-avatar-large {
    width: 88px;
    height: 88px;
    font-size: 2.5rem;
    margin: 0 auto 20px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #eff6ff;
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.3);
}

.user-profile-summary h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px;
}

.user-profile-summary p {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
    font-weight: 500;
}

/* Sidebar Navigation */
.modal-nav {
    flex: 1;
    overflow-y: auto;
    padding: 24px 16px;
}

.nav-group-title {
    padding: 16px 12px 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.nav-group-title:first-child {
    padding-top: 0;
}

.modal-nav-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: #475569;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    font-family: inherit;
    margin-bottom: 4px;
}

.modal-nav-btn i {
    width: 22px;
    text-align: center;
    font-size: 1.15rem;
    color: #94a3b8;
    transition: color 0.2s;
}

.modal-nav-btn:hover {
    background-color: #f1f5f9;
    color: #0f172a;
    transform: translateX(4px);
}

.modal-nav-btn:hover i {
    color: var(--primary);
}

.modal-nav-btn.active {
    background-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.modal-nav-btn.active i {
    color: #fff;
}

/* Main Content Area */
.settings-content-wrapper {
    flex: 1;
    background-color: #f8fafc;
    overflow-y: auto;
    padding: 48px 56px;
}

.modal-tab-content {
    max-width: 850px;
    margin: 0 auto;
}

.modal-tab-content h2 {
    display: none; /* Hide the main h2 as it's redundant with the active tab */
}

.modal-tab-content > p {
    display: none; /* Hide the description paragraph */
}

/* Section Cards */
.settings-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.settings-section:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
}

.settings-section h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 0;
    border-bottom: none;
}

.settings-section h3 i {
    color: var(--primary);
    background: #eff6ff;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1rem;
}

/* Forms & Inputs */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive Grid */
    gap: 24px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 10px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #1e293b;
    transition: all 0.2s ease;
    background-color: #fff;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.form-input:hover:not(:focus):not([readonly]) {
    border-color: #94a3b8;
}

.form-input[readonly] {
    background-color: #f1f5f9;
    color: #64748b;
    cursor: not-allowed;
    border-color: #e2e8f0;
}

textarea.form-input {
    resize: vertical;
    min-height: 120px;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    font-family: inherit;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px -1px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background-color: #fff;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.btn-secondary:hover {
    background-color: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

.btn-danger {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.btn-danger:hover {
    background-color: #fee2e2;
    border-color: #fca5a5;
    transform: translateY(-1px);
}

/* Toggle Switches */
.toggle-switch {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #f1f5f9;
}

.toggle-switch:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.toggle-label {
    font-weight: 600;
    color: #1e293b;
    font-size: 1rem;
}

.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider {
    background-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* Tables */
.settings-table-wrapper {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.settings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.settings-table th {
    background-color: #f8fafc;
    padding: 14px 24px;
    text-align: left;
    font-weight: 600;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.settings-table td {
    padding: 18px 24px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}

.settings-table tr:last-child td {
    border-bottom: none;
}

.settings-table tr:hover {
    background-color: #f8fafc;
}

/* Specific Component Styles */
.plan-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px -1px rgba(14, 165, 233, 0.1);
}

.payment-method-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.2s ease;
    background: #fff;
    margin-bottom: 16px;
}

.payment-method-item:hover {
    border-color: #94a3b8;
    background-color: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}


/* Scrollbar for Sidebar */
.modal-nav::-webkit-scrollbar {
    width: 6px;
}
.modal-nav::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 6px;
}
.modal-nav::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8;
}

/* Tables */
.settings-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    font-size: 0.95rem;
}

.settings-table th {
    text-align: left;
    padding: 16px 20px;
    background-color: #f8fafc;
    color: #64748b;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e2e8f0;
}

.settings-table td {
    padding: 20px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}

.settings-table tr:last-child td {
    border-bottom: none;
}

.settings-table tr:hover td {
    background-color: #f8fafc;
}

.user-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.025em;
}

.status-active {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.status-pending {
    background-color: #fef9c3;
    color: #854d0e;
    border: 1px solid #fef08a;
}

.table-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    color: #94a3b8;
    transition: all 0.2s;
}

.table-action-btn:hover {
    background-color: #f1f5f9;
    color: var(--primary);
}


/* ===================================================
   Team-Bereich mit echten Daten (js/konto-maske.js)
   Ersetzt die frueher fest eingebaute Beispieltabelle.
   =================================================== */

.status-off {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.hw-maske-laedt {
    color: #94a3b8;
    font-size: 0.9rem;
    padding: 24px 0;
}

.hw-maske-kopf {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.hw-maske-kachel {
    background: #f1f5f9;
    padding: 12px 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.hw-maske-kachel-titel {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.hw-maske-kachel-zahl {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}

.hw-maske-kachel-zahl span {
    font-size: 0.9rem;
    color: #94a3b8;
    font-weight: 400;
}

.hw-maske-kachel-symbol {
    width: 48px;
    height: 48px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Ein Satz darueber, wie der Betrieb eingestellt ist - statt einer
   Lizenzzahl, die es im Backend nicht gibt. */
.hw-maske-hinweis {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    color: #1e3a5f;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 24px;
}

.hw-maske-hinweis.warn {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.hw-maske-hinweis i {
    margin-top: 2px;
    flex: 0 0 auto;
}

.hw-maske-klein {
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.5;
    margin: -4px 0 16px;
}

.hw-maske-tabellenkopf {
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}

.hw-maske-tabellenkopf h3 {
    margin: 0;
    padding: 0;
    border: none;
    font-size: 1rem;
}

.hw-maske-person {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hw-maske-person em {
    font-style: normal;
    color: #94a3b8;
    font-size: 0.85em;
}

.hw-maske-kuerzel {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.hw-maske-kuerzel.admin {
    background: #eff6ff;
    color: var(--primary);
    border-color: #dbeafe;
}

.hw-maske-mail {
    color: #64748b;
}

.hw-maske-rolle {
    background: #f1f5f9;
    color: #475569;
    padding: 2px 10px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.hw-maske-rolle.admin {
    background: #e0f2fe;
    color: #0369a1;
}

.hw-maske-2fa {
    font-size: 0.78rem;
    color: #94a3b8;
    white-space: nowrap;
}

.hw-maske-2fa.gut {
    color: #166534;
}

.hw-maske-knoepfe {
    text-align: right;
    white-space: nowrap;
}

/* Abgeschaltete Konten bleiben sichtbar, treten aber zurueck. */
.hw-maske-inaktiv td {
    opacity: 0.55;
}

.hw-maske-hinweis code {
    background: rgba(15, 23, 42, 0.06);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}


/* ===================================================
   Rechnung und Plattformzugang (js/abrechnung.js)
   Ersetzt das frueher fest eingebaute Beispiel-Abo. Die Karte
   uebernimmt dessen Aussehen, jetzt als Klassen statt inline.
   =================================================== */

.hw-abo-karte {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: #fff;
    padding: 32px;
    border-radius: 16px;
    margin-bottom: 24px;
}

/* Zahlung ueberfaellig: dieselbe Karte, aber nicht zu uebersehen. */
.hw-abo-karte.warn {
    background: linear-gradient(135deg, #7c2d12 0%, #ea580c 100%);
}

.hw-abo-karte-inhalt {
    position: relative;
    z-index: 2;
}

.hw-abo-karte-kopf {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.hw-abo-karte-titel {
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    opacity: 0.85;
    margin-bottom: 6px;
}

.hw-abo-karte-name {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 8px;
}

.hw-abo-karte-preis {
    font-size: 1.1rem;
    opacity: 0.95;
}

.hw-abo-karte-preis span {
    font-size: 0.9rem;
}

.hw-abo-karte-status {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    padding: 6px 16px;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.hw-abo-karte-fakten {
    margin-top: 32px;
    display: flex;
    gap: 16px 40px;
    flex-wrap: wrap;
}

.hw-abo-karte-wert {
    font-weight: 600;
}

.hw-abo-karte-symbol {
    position: absolute;
    right: -20px;
    bottom: -40px;
    font-size: 10rem;
    opacity: 0.1;
}

.hw-abo-knoepfe {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-danger.hw-abo-kuendigen {
    background: transparent;
    border: 1px solid #fee2e2;
}

#hw-abrechnung button:disabled,
#hw-abo-profil button:disabled {
    opacity: 0.6;
    cursor: progress;
    transform: none;
}

.hw-abo-tarife {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.hw-abo-tarif {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}

.hw-abo-tarif-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}

.hw-abo-tarif-preis {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e3a8a;
}

.hw-abo-tarif-preis span {
    font-size: 0.9rem;
    font-weight: 500;
    color: #64748b;
}

.hw-abo-tarif-text {
    margin: 0;
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.5;
}

.hw-abo-tarif-merkmale {
    list-style: none;
    padding: 0;
    margin: 4px 0;
    display: grid;
    gap: 6px;
    font-size: 0.88rem;
    color: #334155;
}

.hw-abo-tarif-merkmale i {
    color: #16a34a;
    margin-right: 6px;
}

.hw-abo-tarif .btn-primary {
    margin-top: auto;
}

.hw-abo-klein {
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.5;
    margin: 16px 0 0;
}

.hw-abo-test {
    background: #fef9c3;
    color: #854d0e;
    border: 1px solid #fef08a;
    border-radius: 99px;
    padding: 2px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.hw-abo-mittel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}

.hw-abo-mittel-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.hw-abo-mittel-symbol {
    width: 60px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 28px;
    color: #1a1f71;
}

.hw-abo-mittel-name {
    font-weight: 600;
    color: #334155;
    margin-bottom: 4px;
}

.hw-abo-mittel-klein {
    font-size: 0.9rem;
    color: #64748b;
}

.hw-abo-mittel-klein.warn {
    color: #b91c1c;
    font-weight: 600;
}

.settings-section.hw-abo-tabelle {
    padding: 0;
    overflow: hidden;
}

.hw-abo-nummer {
    color: #64748b;
    font-family: monospace;
}

.hw-abo-betrag {
    font-weight: 600;
    white-space: nowrap;
}

.hw-abo-download {
    text-align: right;
    white-space: nowrap;
}

.hw-abo-download a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.hw-abo-bezahlen {
    color: var(--primary);
    font-weight: 600;
}

.hw-abo-leer {
    margin: 0;
    padding: 24px;
    font-size: 0.9rem;
    color: #64748b;
}

.hw-abo-fuss {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: -12px 0 0;
    font-size: 0.8rem;
    color: #94a3b8;
}

/* Die kleine Karte im Reiter "Mein Profil". */
.plan-card.hw-abo-profil {
    gap: 20px;
    flex-wrap: wrap;
}

.hw-abo-profil-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.hw-abo-profil-symbol {
    width: 56px;
    height: 56px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 12px;
    color: var(--primary);
    font-size: 1.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.hw-abo-profil strong {
    display: block;
    margin-bottom: 4px;
    font-size: 1.2rem;
    color: #0f172a;
}

.hw-abo-profil-links p {
    margin: 0;
    font-size: 0.95rem;
    color: #475569;
}

.hw-abo-profil-rechts {
    text-align: right;
}

.hw-abo-profil-rechts p {
    margin: 0 0 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
}

.hw-abo-profil-status {
    display: inline-block;
    margin-bottom: 8px;
    padding: 6px 16px;
    border-radius: 20px;
    background: var(--primary);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hw-abo-profil-status.aus {
    background: #e2e8f0;
    color: #475569;
}

.hw-abo-profil-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: none;
    background: none;
    color: var(--primary);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

@media (max-width: 640px) {
    .hw-abo-karte {
        padding: 24px;
    }

    .hw-abo-karte-name {
        font-size: 1.6rem;
    }

    .hw-abo-karte-kopf {
        flex-direction: column;
    }

    .hw-abo-profil-rechts {
        text-align: left;
    }
}

/* Handy: Menue oben als waagerechte Leiste, Inhalt darunter in voller
   Breite. Galt bisher nur fuer den Reiter Integrationen (mail.css) - bei
   allen anderen Reitern blieb die Menuespalte stehen und quetschte den
   Inhalt auf einen schmalen Streifen. */
@media (max-width: 760px) {
    #account-modal { padding: 0; }
    #account-modal .modal-content { width: 100%; height: 100dvh; max-height: none; border-radius: 0; }
    #account-modal .modal-header { padding: 18px; }
    #account-modal .modal-title { font-size: 1.05rem; gap: 10px; }
    #account-modal .modal-close { flex-shrink: 0; }
    #account-modal .modal-body { flex-direction: column; }
    #account-modal .settings-sidebar { width: 100%; border-right: 0; border-bottom: 1px solid #e2e8f0; }
    #account-modal .nav-group-title { display: none; }
    /* Profilbild bleibt erreichbar: Avatar links, Name und Upload rechts. */
    #account-modal .user-profile-summary { display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 14px; align-items: center; text-align: left; padding: 14px 18px; }
    #account-modal .user-profile-summary .account-avatar-large { grid-column: 1; grid-row: 1 / span 3; width: 56px; height: 56px; margin: 0; font-size: 1.4rem; border-width: 3px; }
    #account-modal .user-profile-summary h3 { grid-column: 2; grid-row: 1; font-size: 1rem; margin: 0; }
    #account-modal .user-profile-summary p[data-hw-feld] { grid-column: 2; grid-row: 2; font-size: 0.8rem; }
    #account-modal .hw-profilbild-aktionen { grid-column: 2; grid-row: 3; margin: 8px 0 0; max-width: none; }
    #account-modal .modal-nav { display: flex; overflow-x: auto; padding: 10px; gap: 5px; }
    #account-modal .modal-nav-btn { width: auto; flex-shrink: 0; white-space: nowrap; margin: 0; padding: 9px 11px; font-size: 12px; gap: 7px; }
    #account-modal .settings-content-wrapper { padding: 26px 18px; min-width: 0; }
}

/* Einstellungen: Anzeige von Konto und Firmendaten, Wege zu den echten Fenstern.
   Präfix hw-einst- (frei, siehe Speicher-Notiz zu CSS-Präfixen). */
#account-modal .hw-einst-liste { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; margin: 0; }
#account-modal .hw-einst-liste > div { min-width: 0; }
#account-modal .hw-einst-liste dt { font-size: 0.78rem; font-weight: 600; color: #64748b; margin-bottom: 3px; }
#account-modal .hw-einst-liste dd { margin: 0; font-size: 0.95rem; color: #0f172a; overflow-wrap: anywhere; }
#account-modal .hw-einst-fehlt { color: #b45309; font-style: italic; }
#account-modal .hw-einst-hinweis { font-size: 0.85rem; color: #64748b; margin: 14px 0 0; }
#account-modal .hw-einst-knoepfe { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; margin-top: 8px; }
#account-modal .hw-einst-knoepfe.hw-einst-links { justify-content: flex-start; margin-top: 18px; }
#account-modal .hw-einst-wege { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
#account-modal .hw-einst-weg { display: flex; align-items: flex-start; gap: 12px; text-align: left; padding: 14px 16px; border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc; cursor: pointer; font: inherit; color: #0f172a; }
#account-modal .hw-einst-weg:hover { border-color: var(--primary); background: #fff; }
#account-modal .hw-einst-weg:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
#account-modal .hw-einst-weg i { color: var(--primary); margin-top: 3px; width: 18px; text-align: center; }
#account-modal .hw-einst-weg strong { display: block; font-size: 0.92rem; }
#account-modal .hw-einst-weg small { display: block; font-size: 0.8rem; color: #64748b; margin-top: 2px; }
@media (max-width: 640px) {
    #account-modal .hw-einst-liste { grid-template-columns: 1fr; }
    #account-modal .hw-einst-knoepfe { justify-content: stretch; }
    #account-modal .hw-einst-knoepfe > button { flex: 1 1 100%; }
}
#account-modal [data-hw-darf][hidden], #account-modal [data-hw-darf-nicht][hidden] { display: none; }
