:root {
    --dark: #ffffff;
    --dark2: #ffffff;
    --sidebar-width: 240px;
}
* { margin: 0; padding: 0; box-sizing: border-box; scroll-behavior: smooth; }
body {
    font-family: 'Inter', sans-serif;
    background: #f0f2f7;
    color: #333344;
    height: 100vh;
    overflow: hidden;
}

/* ── TOP NAV ── */
.kb-topnav {
    background: #ffffff;
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    border-bottom: 1px solid #e2e5f0;
}
.kb-topnav .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333344;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
}
.kb-topnav .brand img {
    height: 32px;
    width: auto;
}
.kb-topnav .badge-area {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.kb-topnav .user-badge {
    color: #666677;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}
.kb-topnav .logout-btn {
    color: #888899;
    font-size: 0.85rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}
.kb-topnav .logout-btn:hover { color: var(--primary); }

/* ── SIDEBAR ── */
.kb-sidebar {
    position: fixed;
    top: 60px; left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - 60px);
    background: #ffffff;
    overflow-y: auto;
    padding: 1.5rem 0;
    z-index: 900;
    border-right: 1px solid #e2e5f0;
    box-shadow: 1px 0 3px rgba(0,0,0,0.03);
}
.kb-sidebar .nav-section {
    padding: 0.4rem 1.2rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #999aab;
    margin-top: 0.5rem;
}
.kb-sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.65rem 1.5rem;
    color: #555566;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}
.kb-sidebar .nav-link:hover {
    color: #333344;
    background: #f0f2f7;
}
.kb-sidebar .nav-link.active {
    color: var(--primary);
    border-left-color: var(--primary);
    background: var(--primary-bg-subtle);
}
.kb-sidebar .nav-link i {
    width: 18px;
    text-align: center;
    font-size: 0.9rem;
}

/* ── MAIN CONTENT ── */
.kb-main {
    margin-left: var(--sidebar-width);
    margin-top: 60px;
    padding: 2rem;
    height: calc(100vh - 60px);
    overflow-y: auto;
}

/* ── CARDS ── */
.kb-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.kb-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e5f0;
}
.kb-card-icon {
    width: 42px; height: 42px;
    background: var(--primary-bg-active);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.1rem;
    flex-shrink: 0;
}
.kb-card-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #333344;
}

/* ── PAGE HEADER ── */
.kb-page-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333344;
    margin-bottom: 0.25rem;
}
.kb-page-subtitle {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* ── TABLE ── */
.kb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.kb-table thead th {
    background: #f8f9fc;
    color: #6c757d;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e5f0;
}
.kb-table tbody td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e2e5f0;
    vertical-align: middle;
}
.kb-table tbody tr:last-child td { border-bottom: none; }
.kb-table tbody tr:hover { background: #f8f9fc; }

/* ── BADGES ── */
.badge-offen {
    background: rgba(255,193,7,0.12);
    color: #b08000;
    border: 1px solid rgba(255,193,7,0.3);
    border-radius: 50px;
    padding: 0.2rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-bezahlt {
    background: rgba(25,135,84,0.1);
    color: #157347;
    border: 1px solid rgba(25,135,84,0.25);
    border-radius: 50px;
    padding: 0.2rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-storniert {
    background: rgba(108,117,125,0.1);
    color: #6c757d;
    border: 1px solid rgba(108,117,125,0.25);
    border-radius: 50px;
    padding: 0.2rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ── BUTTONS ── */
.btn-primary-sm {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.35rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.2s;
}
.btn-primary-sm:hover { background: var(--primary-dark); color: #fff; }
.btn-outline-sm {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 8px;
    padding: 0.35rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}
.btn-outline-sm:hover { background: var(--primary); color: #fff; }

/* ── ALERT ── */
.kb-alert {
    border-radius: 10px;
    padding: 0.9rem 1.2rem;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.kb-alert-error { background: rgba(220,53,69,0.08); color: #dc3545; border: 1px solid rgba(220,53,69,0.2); }
.kb-alert-success { background: rgba(25,135,84,0.08); color: #157347; border: 1px solid rgba(25,135,84,0.2); }

/* ── INFO GRID ── */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}
.info-item label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #999aab;
    margin-bottom: 0.2rem;
    font-weight: 600;
}
.info-item .value {
    font-size: 0.95rem;
    color: #333344;
    font-weight: 500;
}
.info-item .value.empty { color: #999aab; font-style: italic; }

/* ── EMPTY STATE ── */
.hoc-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #999aab;
}
.hoc-empty i { font-size: 2.5rem; margin-bottom: 0.75rem; display: block; }
.hoc-empty p { margin: 0; font-size: 0.9rem; }

/* ── MOBILE TOGGLE ── */
.kb-sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: #555566;
    font-size: 1.3rem;
    margin-right: 0.75rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

/* ── MOBILE OVERLAY ── */
.kb-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 850;
}
.kb-overlay.active { display: block; }

@media (max-width: 991px) {
    .kb-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
        z-index: 901;
    }
    .kb-sidebar.open { transform: translateX(0); }
    .kb-main { margin-left: 0; }
    .kb-sidebar-toggle { display: flex; }
    .kb-topnav .user-badge {
        max-width: 130px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (max-width: 575px) {
    .kb-main { padding: 1rem 0.75rem; }
    .kb-page-title { font-size: 1.2rem; }
    .kb-search-input { width: 100% !important; min-width: 0; }
    .kb-table thead th,
    .kb-table tbody td { padding: 0.65rem 0.75rem; font-size: 0.82rem; }
    .inv-page-btn { min-width: 36px; height: 36px; }
    .kb-topnav .brand { display: none; }
}

/* ── TOOLBAR: FILTER-PILLS ── */
.inv-pill {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.25rem 0.8rem;
    border-radius: 50px;
    border: 1px solid #e2e5f0;
    background: #fff;
    color: #6c757d;
    text-decoration: none;
    transition: all 0.15s;
    line-height: 1.6;
    display: inline-block;
}
.inv-pill:hover  { border-color: var(--primary); color: var(--primary); }
.inv-pill.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── TOOLBAR: LIMIT-BUTTONS ── */
.inv-limit-btn {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    border: 1px solid #e2e5f0;
    background: #fff;
    color: #6c757d;
    text-decoration: none;
    transition: all 0.15s;
    line-height: 1.6;
    display: inline-block;
}
.inv-limit-btn:hover  { border-color: var(--primary); color: var(--primary); }
.inv-limit-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── TOOLBAR: SUCHE ── */
.inv-clear-btn {
    font-size: 0.78rem;
    color: #999aab;
    text-decoration: none;
    padding: 0 0.2rem;
    transition: color 0.15s;
}
.inv-clear-btn:hover { color: #dc3545; }
.kb-search-input:focus { border-color: var(--primary) !important; outline: none; }

/* ── TABELLE: SORTIER-LINKS ── */
.inv-sort-link {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.15s;
    white-space: nowrap;
}
.inv-sort-link:hover  { color: var(--primary); }
.inv-sort-link.active { color: var(--primary); }
.inv-sort-neutral { color: #bbc; }

/* ── FOOTER: SEITENNAVIGATION ── */
.inv-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 0.4rem;
    border-radius: 6px;
    border: 1px solid #e2e5f0;
    background: #fff;
    color: #495057;
    font-size: 0.83rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s;
}
.inv-page-btn:hover    { border-color: var(--primary); color: var(--primary); }
.inv-page-btn.active   { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.inv-page-btn.disabled { color: #bbc; border-color: #e2e5f0; background: #f8f9fc; cursor: default; pointer-events: none; }

/* ── FORMULAR: KUNDENDATEN / PASSWORT ── */
.kd-label { display:block;font-size:0.78rem;font-weight:600;color:#6c757d;margin-bottom:0.3rem;text-transform:uppercase;letter-spacing:0.04em }
.kd-req   { color:var(--primary) }
.kd-input {
    width:100%;border:1px solid #e2e5f0;border-radius:8px;
    padding:0.45rem 0.75rem;font-size:0.9rem;font-family:inherit;
    transition:border-color 0.15s;background:#fff;color:#1a1a1a;
}
.kd-input:focus { border-color:var(--primary);outline:none }
.kd-field { margin-bottom: 1rem; }
.kd-field-last { margin-bottom: 1.5rem; }
.kd-section { padding: 1.2rem 1.5rem; border-bottom: 1px solid #e2e5f0; }
.kd-section-header { display: flex; align-items: center; gap: 10px; margin-bottom: 1.1rem; }
.kd-section-title { font-size: 0.95rem; font-weight: 700; color: #333344; }
.kd-full-width { grid-column: 1 / -1; }
.kd-footer { padding: 1rem 1.5rem; background: #f8f9fc; display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.kd-required-note { font-size: 0.8rem; color: #999aab; margin-left: auto; }

/* ── SIDEBAR: SUB-LINKS & ABSTAND ── */
.kb-sidebar .nav-link-sub { padding-left: 2.5rem; font-size: 0.82rem; }
.kb-sidebar .nav-section-spaced { margin-top: 2rem; }

/* ── LOGIN: BG-PATTERN & GRID-OVERLAY ── */
.bg-pattern {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%; z-index: 0;
    overflow: hidden; pointer-events: none;
}
.bg-pattern::before {
    content: '';
    position: absolute;
    width: 800px; height: 800px;
    background: radial-gradient(circle, var(--primary-bg-hover) 0%, transparent 70%);
    top: -200px; right: -200px; border-radius: 50%;
    animation: kbFloat1 20s ease-in-out infinite;
}
.bg-pattern::after {
    content: '';
    position: absolute;
    width: 600px; height: 600px;
    background: radial-gradient(circle, var(--brown-bg-hover) 0%, transparent 70%);
    bottom: -150px; left: -100px; border-radius: 50%;
    animation: kbFloat2 25s ease-in-out infinite;
}
@keyframes kbFloat1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-40px,30px); } }
@keyframes kbFloat2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(30px,-40px); } }
.grid-overlay {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background-image:
        linear-gradient(rgba(0,0,0,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.02) 1px, transparent 1px);
    background-size: 60px 60px; z-index: 0; pointer-events: none;
}

/* ── LOGIN: BODY & MAIN ── */
.kb-body-login { background: #f0f2f7 !important; height: auto !important; overflow: auto !important; }
.kb-main-login {
    margin-left: 0 !important;
    background: transparent !important;
    height: auto !important;
    min-height: calc(100vh - 60px);
    overflow-y: visible !important;
    padding: 2rem 1rem;
    position: relative;
    z-index: 1;
}

/* ── LOGIN: WRAPPER & LOGO ── */
.kb-lp-wrapper {
    width: 100%; max-width: 440px;
    display: flex; flex-direction: column; align-items: center;
    position: relative; z-index: 1;
}
.kb-lp-logo { text-align: center; margin-bottom: 2rem; }
.kb-lp-logo img { height: 60px; width: auto; margin-bottom: 1rem; display: block; margin-left: auto; margin-right: auto; }
.kb-lp-logo h1 { font-size: 1.5rem; font-weight: 700; color: #333344; margin: 0 0 0.25rem; }
.kb-lp-subtitle-top {
    font-size: 0.85rem; color: rgba(0,0,0,0.35);
    font-weight: 400; letter-spacing: 2px; text-transform: uppercase;
}

/* ── LOGIN: KARTE ── */
.kb-lp-card {
    width: 100%;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 24px; padding: 2.5rem;
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.03) inset;
}
.kb-lp-card h2 { color: #333344; font-size: 1.35rem; font-weight: 700; margin: 0 0 0.25rem; }
.kb-lp-desc { color: #888899; font-size: 0.88rem; margin-bottom: 2rem; }

/* ── LOGIN: FORMULAR ── */
.kb-lp-group { margin-bottom: 1.25rem; }
.kb-lp-group label {
    display: block; color: #555566;
    font-size: 0.82rem; font-weight: 500; margin-bottom: 0.5rem;
}
.kb-lp-input-wrap { position: relative; }
.kb-lp-icon {
    position: absolute; left: 16px; top: 50%;
    transform: translateY(-50%); color: #aaaabb;
    font-size: 0.9rem; pointer-events: none;
}
.kb-lp-input {
    width: 100%; padding: 0.85rem 3rem 0.85rem 2.8rem;
    background: #f8f9fc;
    border: 1.5px solid #e2e5f0;
    border-radius: 12px; color: #333344;
    font-size: 0.9rem; font-family: inherit;
    transition: border-color 0.2s, background 0.2s;
    outline: none; box-sizing: border-box;
}
.kb-lp-input::placeholder { color: #aaaabb; }
.kb-lp-input:focus {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px var(--primary-bg-strong);
}
.kb-lp-pw-toggle {
    position: absolute; right: 14px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none;
    color: #aaaabb; cursor: pointer;
    padding: 0; font-size: 0.9rem; transition: color 0.2s;
}
.kb-lp-pw-toggle:hover { color: #555566; }

/* ── LOGIN: SUBMIT ── */
.kb-lp-submit {
    width: 100%; padding: 0.9rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none; border-radius: 12px;
    color: #fff; font-size: 0.95rem; font-family: inherit; font-weight: 600;
    cursor: pointer; transition: opacity 0.2s, transform 0.1s;
    margin-top: 0.5rem; margin-bottom: 1.5rem; display: block;
}
.kb-lp-submit:hover { opacity: 0.9; }
.kb-lp-submit:active { transform: scale(0.99); }

/* ── LOGIN: BADGE & BACK-LINK ── */
.kb-lp-badge {
    display: flex; align-items: center; justify-content: center;
    gap: 6px; color: #aaaabb; font-size: 0.78rem;
    border-top: 1px solid rgba(0,0,0,0.06); padding-top: 1.25rem;
}
.kb-lp-back {
    margin-top: 1.5rem; color: #888899;
    font-size: 0.85rem; text-decoration: none; transition: color 0.2s;
    display: inline-flex; align-items: center; gap: 4px;
}
.kb-lp-back:hover { color: var(--primary); }

/* ── ALLGEMEIN / DASHBOARD ── */
.kb-customer-no { font-size: 0.8rem; color: #999aab; }
.kb-link-primary { color: var(--primary); }
.kb-link-primary:hover { color: var(--primary-dark); }
.kb-btn-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.kb-card-flush { padding: 0 !important; overflow: hidden; }
.kb-card-narrow { max-width: 480px; }
.kb-pending-notice {
    background: rgba(255,193,7,0.1);
    border: 1px solid rgba(255,193,7,0.35);
    border-radius: 10px;
    padding: 0.9rem 1.2rem;
    margin-bottom: 1.25rem;
    font-size: 0.88rem;
    color: #7a5c00;
    display: flex;
    align-items: center;
    gap: 10px;
}
.empty-icon-primary { color: var(--primary); }
.empty-icon-muted { color: #ccd; }
.kb-reset-link { font-size: 0.85rem; color: var(--primary); text-decoration: none; }
.kb-reset-link:hover { color: var(--primary-dark); }

/* ── TOOLBAR ── */
.kb-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 0.75rem; padding: 0.9rem 1.2rem; border-bottom: 1px solid #e2e5f0; }
.kb-filter-pills { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.kb-flex-spacer { flex: 1; min-width: 8px; }
.kb-search-form { display: flex; align-items: center; gap: 0.4rem; }
.kb-search-wrap { position: relative; }
.kb-search-icon {
    position: absolute;
    left: 0.6rem; top: 50%;
    transform: translateY(-50%);
    color: #aaaabb; font-size: 0.78rem; pointer-events: none;
}
.kb-search-input {
    font-size: 0.83rem;
    border: 1px solid #e2e5f0;
    border-radius: 6px;
    padding: 0.3rem 0.6rem 0.3rem 1.8rem;
    width: 200px;
    transition: border-color 0.15s;
}
.kb-limit-wrap { display: flex; align-items: center; gap: 0.4rem; }
.kb-limit-label { font-size: 0.82rem; color: #6c757d; white-space: nowrap; }
.kb-table-wrap { overflow-x: auto; }

/* ── TABELLEN-ZELLEN ── */
.td-primary { font-weight: 600; color: #333344; }
.td-muted { color: #6c757d; }
.td-bold { font-weight: 600; }
.td-title { font-weight: 600; color: #333344; max-width: 220px; }
.td-desc { color: #6c757d; max-width: 280px; }
.td-empty { color: #999aab; }
.td-amount-open { font-weight: 600; color: #b08000; }

/* ── TABELLEN-FOOTER / PAGINATION ── */
.kb-table-footer {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 0.75rem;
    padding: 0.75rem 1.2rem;
    border-top: 1px solid #e2e5f0; background: #f8f9fc;
}
.kb-table-info { font-size: 0.83rem; color: #6c757d; }
.kb-pagination { display: flex; align-items: center; gap: 0.25rem; }
.inv-page-btn.ellipsis { border: none !important; background: none !important; letter-spacing: 0.05em; }

/* ── 2FA: Verifizierungsseite (Login-Style) ── */
.tfa-code-input {
    text-align: center;
    font-size: 1.4rem !important;
    letter-spacing: 8px;
    font-family: 'Courier New', monospace;
    padding-left: 2.8rem !important;
}
.tfa-switch-methods {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.tfa-switch-link {
    color: #888899;
    font-size: 0.82rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}
.tfa-switch-link:hover { color: var(--primary); }
.tfa-resend-btn {
    background: none;
    border: none;
    color: #888899;
    font-size: 0.82rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
    font-family: inherit;
    padding: 0;
}
.tfa-resend-btn:hover { color: var(--primary); }
.tfa-attempts-bar {
    width: 100%;
    height: 4px;
    background: rgba(0,0,0,0.06);
    border-radius: 2px;
    margin-top: 1rem;
    overflow: hidden;
}
.tfa-attempts-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffc107, #dc3545);
    border-radius: 2px;
    transition: width 0.3s;
}
.tfa-attempts-text {
    text-align: center;
    font-size: 0.75rem;
    color: #999aab;
    margin-top: 0.4rem;
    margin-bottom: 0.5rem;
}

/* ── 2FA: Sicherheitsseite (eingeloggt) ── */
.tfa-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.15rem 0.6rem;
    border-radius: 50px;
}
.tfa-status-active {
    background: rgba(25,135,84,0.1);
    color: #157347;
    border: 1px solid rgba(25,135,84,0.25);
}
.tfa-status-inactive {
    background: rgba(108,117,125,0.1);
    color: #6c757d;
    border: 1px solid rgba(108,117,125,0.25);
}
.tfa-method-desc {
    font-size: 0.88rem;
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}
.tfa-active-notice {
    background: rgba(25,135,84,0.08);
    color: #157347;
    border: 1px solid rgba(25,135,84,0.2);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tfa-setup-steps {
    padding: 0.5rem 0;
}
.tfa-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 1rem;
}
.tfa-step-num {
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}
.tfa-step-text {
    font-size: 0.88rem;
    color: #555;
    line-height: 1.6;
    padding-top: 3px;
}
.tfa-qr-wrap {
    text-align: center;
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 12px;
    margin-bottom: 1rem;
}
.tfa-qr-img {
    width: 200px;
    height: 200px;
    border-radius: 8px;
}
.tfa-manual-key {
    text-align: center;
    margin-bottom: 1rem;
}
.tfa-manual-key label {
    display: block;
    font-size: 0.75rem;
    color: #999aab;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
    font-weight: 600;
}
.tfa-secret-code {
    background: #f0f2f7;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    letter-spacing: 2px;
    color: #333344;
    font-weight: 600;
    user-select: all;
    word-break: break-all;
}
.tfa-confirm-form { margin-top: 0.5rem; }
.tfa-confirm-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.tfa-code-input-light {
    max-width: 180px;
    text-align: center;
    font-size: 1.1rem;
    letter-spacing: 6px;
    font-family: 'Courier New', monospace;
}
.tfa-disable-form { margin-top: 0.5rem; }
.tfa-disable-hint {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.75rem;
}
.tfa-btn-danger {
    color: #dc3545 !important;
    border-color: #dc3545 !important;
}
.tfa-btn-danger:hover {
    background: #dc3545 !important;
    color: #fff !important;
}
.tfa-pref-form { margin-top: 0.5rem; }
.tfa-pref-options {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.tfa-pref-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1.25rem;
    border: 2px solid #e2e5f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.88rem;
    font-weight: 500;
    color: #555;
}
.tfa-pref-option:hover { border-color: var(--primary); color: var(--primary); }
.tfa-pref-option.active { border-color: var(--primary); background: var(--primary-bg-subtle); color: var(--primary); }
.tfa-pref-option input[type="radio"] { display: none; }
.tfa-pref-option i { font-size: 1.1rem; }

/* ── Login Copyright ── */
.kb-lp-copyright {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.72rem;
    color: rgba(0,0,0,0.35);
    letter-spacing: 0.02em;
    line-height: 1.6;
}

/* ══════════════════════════════════════
   THEME TOGGLE (Topnav)
══════════════════════════════════════ */
.kb-theme-toggle {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #e2e5f0;
    background: #f8f9fc;
    color: #888899;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.2s;
    flex-shrink: 0;
    margin-left: 0.75rem;
}
.kb-theme-toggle:hover {
    background: #f0f2f7;
    color: var(--primary);
    border-color: var(--primary-border-hover);
}
#kbThemeIconLight,
#kbThemeIconDark,
#kbThemeIconSystem { display: none; }

/* ── Utility helpers (replaces removed inline styles) ───────────── */
.cp-state-ok       { color: #157347; font-weight: 600; }
.cp-state-muted    { color: #6c757d; }
.cp-email-hint     { font-size: 0.8rem; color: #aaa; margin-top: 2px; }
.cp-icon-primary   { color: var(--primary); }
.cp-icon-primary-inline { color: var(--primary); margin-right: 8px; }
.cp-mt-md          { margin-top: 1.5rem; }
.cp-mt-sm          { margin-top: 1rem; }
.cp-inline-form    { display: inline; }

