/* ============================================================
   WABU Finanz GmbH – Kundenportal CSS
   Professionelles Banking-Dashboard Design
   ============================================================ */

:root {
    --navy:        #0d1f3c;
    --navy-light:  #1a2e4a;
    --navy-dark:   #091528;
    --gold:        #c9a84c;
    --gold-light:  #e8c96a;
    --gold-dark:   #a8872e;
    --sidebar-w:   260px;
    --topbar-h:    64px;
    --white:       #ffffff;
    --bg:          #f0f4f8;
    --bg-card:     #ffffff;
    --border:      #e2e8f0;
    --text:        #1e293b;
    --text-muted:  #64748b;
    --text-light:  #94a3b8;
    --success:     #10b981;
    --warning:     #f59e0b;
    --danger:      #ef4444;
    --info:        #3b82f6;
    --radius:      12px;
    --shadow:      0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
    --shadow-lg:   0 8px 32px rgba(0,0,0,.12);
    --transition:  all .2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }

/* ── SCROLLBAR ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── AUTH PAGES ────────────────────────────────────────────── */
.auth-body { background: var(--bg); min-height: 100vh; display: flex; align-items: stretch; }
.auth-container { display: flex; width: 100%; min-height: 100vh; }
.auth-left {
    width: 45%;
    background: linear-gradient(145deg, var(--navy-dark) 0%, var(--navy) 50%, #1e3a5f 100%);
    display: flex; align-items: center; justify-content: center; padding: 3rem;
    position: relative; overflow: hidden;
}
.auth-left::before {
    content: ''; position: absolute; top: -100px; right: -100px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(201,168,76,.15) 0%, transparent 70%);
    border-radius: 50%;
}
.auth-left::after {
    content: ''; position: absolute; bottom: -80px; left: -80px;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(201,168,76,.1) 0%, transparent 70%);
    border-radius: 50%;
}
.auth-left-content { position: relative; z-index: 1; max-width: 380px; }
.auth-logo { display: flex; align-items: center; gap: 1rem; text-decoration: none; margin-bottom: 3rem; }
.auth-logo-icon {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border-radius: 14px; display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: var(--navy);
}
.auth-logo-name { font-size: 1.4rem; font-weight: 700; color: var(--white); line-height: 1.2; }
.auth-logo-sub { font-size: .85rem; color: rgba(255,255,255,.6); }
.auth-tagline h2 { font-size: 1.8rem; font-weight: 700; color: var(--white); margin-bottom: .75rem; line-height: 1.3; }
.auth-tagline p { color: rgba(255,255,255,.7); font-size: 1rem; line-height: 1.7; margin-bottom: 2.5rem; }
.auth-features { display: flex; flex-direction: column; gap: .85rem; margin-bottom: 2.5rem; }
.auth-feature { display: flex; align-items: center; gap: .85rem; color: rgba(255,255,255,.85); font-size: .9rem; }
.auth-feature i { color: var(--gold); width: 20px; text-align: center; font-size: 1rem; }
.auth-esisuisse {
    display: flex; align-items: center; gap: .75rem;
    background: rgba(201,168,76,.15); border: 1px solid rgba(201,168,76,.3);
    border-radius: 8px; padding: .75rem 1rem;
    color: var(--gold); font-size: .85rem; font-weight: 500;
}
.auth-esisuisse i { font-size: 1.1rem; }

.auth-right {
    flex: 1; display: flex; align-items: center; justify-content: center;
    padding: 2rem; background: var(--bg);
}
.auth-form-wrapper { width: 100%; max-width: 420px; }
.auth-form-header { margin-bottom: 2rem; }
.auth-form-header h1 { font-size: 1.75rem; font-weight: 700; color: var(--navy); margin-bottom: .4rem; }
.auth-form-header p { color: var(--text-muted); font-size: .95rem; }

.alert { display: flex; align-items: center; gap: .75rem; padding: .85rem 1.1rem; border-radius: 8px; margin-bottom: 1.25rem; font-size: .9rem; }
.alert i { font-size: 1rem; flex-shrink: 0; }
.alert-danger { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #d97706; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #16a34a; }
.alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #2563eb; }

.auth-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group label { font-size: .875rem; font-weight: 600; color: var(--navy); display: flex; align-items: center; gap: .5rem; }
.form-group label i { color: var(--gold); }
.form-control {
    width: 100%; padding: .75rem 1rem; border: 1.5px solid var(--border);
    border-radius: 8px; font-size: .95rem; font-family: inherit;
    background: var(--white); color: var(--text);
    transition: var(--transition); outline: none;
}
.form-control:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(13,31,60,.08); }
.form-control::placeholder { color: var(--text-light); }
.form-control.is-invalid { border-color: var(--danger); }
.form-control.is-valid { border-color: var(--success); }
.input-password-wrapper { position: relative; }
.input-password-wrapper .form-control { padding-right: 3rem; }
.toggle-password {
    position: absolute; right: .75rem; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: var(--text-muted); cursor: pointer; padding: .25rem;
}
.toggle-password:hover { color: var(--navy); }
.form-row-between { display: flex; align-items: center; justify-content: space-between; }
.checkbox-label { display: flex; align-items: center; gap: .5rem; font-size: .875rem; color: var(--text-muted); cursor: pointer; }
.checkbox-label input { accent-color: var(--navy); }
.link-muted { font-size: .875rem; color: var(--text-muted); text-decoration: none; }
.link-muted:hover { color: var(--navy); }

.btn-portal-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
    padding: .85rem 1.5rem; border-radius: 8px; border: none; cursor: pointer;
    font-size: .95rem; font-weight: 600; font-family: inherit;
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    color: var(--white); transition: var(--transition);
}
.btn-portal-primary:hover { background: linear-gradient(135deg, var(--navy-dark), var(--navy)); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(13,31,60,.3); }
.btn-portal-primary:disabled { opacity: .7; cursor: not-allowed; transform: none; }
.btn-portal-gold {
    display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
    padding: .85rem 1.5rem; border-radius: 8px; border: none; cursor: pointer;
    font-size: .95rem; font-weight: 600; font-family: inherit;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--navy); transition: var(--transition);
}
.btn-portal-gold:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(201,168,76,.4); }
.btn-portal-outline {
    display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
    padding: .75rem 1.25rem; border-radius: 8px; border: 1.5px solid var(--border); cursor: pointer;
    font-size: .9rem; font-weight: 500; font-family: inherit;
    background: var(--white); color: var(--text); transition: var(--transition);
}
.btn-portal-outline:hover { border-color: var(--navy); color: var(--navy); background: #f8fafc; }
.btn-portal-danger {
    display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
    padding: .75rem 1.25rem; border-radius: 8px; border: none; cursor: pointer;
    font-size: .9rem; font-weight: 500; font-family: inherit;
    background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; transition: var(--transition);
}
.btn-portal-danger:hover { background: #fee2e2; }
.btn-sm { padding: .5rem .9rem !important; font-size: .8rem !important; }
.btn-full { width: 100%; }

.auth-divider { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; color: var(--text-light); font-size: .8rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.demo-hint {
    display: flex; gap: .85rem; align-items: flex-start;
    background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px;
    padding: .85rem 1rem; font-size: .85rem; color: #1d4ed8; margin-bottom: 1.5rem;
}
.demo-hint i { margin-top: .1rem; flex-shrink: 0; }
.demo-hint code { background: rgba(29,78,216,.1); padding: .1rem .4rem; border-radius: 4px; font-family: monospace; }
.auth-footer-links { display: flex; justify-content: space-between; }
.auth-footer-links a { font-size: .875rem; color: var(--text-muted); text-decoration: none; display: flex; align-items: center; gap: .4rem; }
.auth-footer-links a:hover { color: var(--navy); }

@media (max-width: 768px) {
    .auth-left { display: none; }
    .auth-right { padding: 1.5rem; }
}

/* ── PORTAL LAYOUT ─────────────────────────────────────────── */
.portal-body { background: var(--bg); }

.portal-topbar {
    position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h); z-index: 1000;
    background: var(--white); border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 1.5rem; box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.topbar-left { display: flex; align-items: center; gap: 1rem; }
.sidebar-toggle {
    width: 40px; height: 40px; border: none; background: none; cursor: pointer;
    border-radius: 8px; display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 1.1rem; transition: var(--transition);
}
.sidebar-toggle:hover { background: var(--bg); color: var(--navy); }
.portal-brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.portal-brand-icon {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
    color: var(--gold); font-size: 1rem;
}
.portal-brand-text { line-height: 1.2; }
.brand-name { display: block; font-size: .95rem; font-weight: 700; color: var(--navy); }
.brand-portal { display: block; font-size: .72rem; color: var(--text-muted); font-weight: 400; }
.topbar-right { display: flex; align-items: center; gap: .5rem; }
.topbar-btn {
    position: relative; width: 40px; height: 40px; border: none; background: none; cursor: pointer;
    border-radius: 8px; display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 1rem; text-decoration: none; transition: var(--transition);
}
.topbar-btn:hover { background: var(--bg); color: var(--navy); }
.badge-dot {
    position: absolute; top: 6px; right: 6px;
    min-width: 16px; height: 16px; padding: 0 4px;
    background: var(--danger); color: var(--white);
    border-radius: 8px; font-size: .65rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--white);
}
.topbar-user-btn {
    display: flex; align-items: center; gap: .6rem;
    padding: .4rem .75rem; border: 1.5px solid var(--border); border-radius: 8px;
    background: var(--white); cursor: pointer; transition: var(--transition);
    font-family: inherit; color: var(--text);
}
.topbar-user-btn:hover { border-color: var(--navy); background: #f8fafc; }
.user-avatar-sm {
    width: 30px; height: 30px;
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: var(--gold); font-size: .8rem; font-weight: 700;
}
.user-name-sm { font-size: .875rem; font-weight: 500; }
.topbar-user-btn .fa-chevron-down { font-size: .7rem; color: var(--text-muted); }

/* Dropdown Panels */
.topbar-btn-wrapper { position: relative; }
.dropdown-panel {
    position: absolute; top: calc(100% + 8px); right: 0;
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow-lg);
    min-width: 280px; z-index: 2000;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: all .2s ease; pointer-events: none;
}
.dropdown-panel.open { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: all; }
.dropdown-header { display: flex; align-items: center; justify-content: space-between; padding: .85rem 1rem; border-bottom: 1px solid var(--border); font-size: .875rem; font-weight: 600; color: var(--navy); }
.dropdown-header-link { font-size: .8rem; color: var(--text-muted); text-decoration: none; font-weight: 400; }
.dropdown-header-link:hover { color: var(--navy); }
.dropdown-empty { padding: 1.5rem 1rem; text-align: center; color: var(--text-muted); font-size: .875rem; }
.dropdown-empty i { display: block; font-size: 1.5rem; margin-bottom: .5rem; color: var(--success); }
.dropdown-divider { height: 1px; background: var(--border); margin: .25rem 0; }
.dropdown-item { display: flex; align-items: center; gap: .75rem; padding: .65rem 1rem; font-size: .875rem; color: var(--text); text-decoration: none; transition: var(--transition); }
.dropdown-item:hover { background: var(--bg); color: var(--navy); }
.dropdown-item i { width: 16px; color: var(--text-muted); }
.dropdown-item-danger { color: var(--danger) !important; }
.dropdown-item-danger i { color: var(--danger) !important; }
.dropdown-item-danger:hover { background: #fef2f2 !important; }
.badge-count { background: var(--danger); color: var(--white); border-radius: 10px; padding: .1rem .5rem; font-size: .7rem; font-weight: 700; margin-left: auto; }

.notif-item { display: flex; gap: .75rem; padding: .85rem 1rem; border-bottom: 1px solid #f1f5f9; transition: var(--transition); }
.notif-item:hover { background: var(--bg); }
.notif-item:last-child { border-bottom: none; }
.notif-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: .85rem; }
.notif-info .notif-icon { background: #eff6ff; color: var(--info); }
.notif-warnung .notif-icon { background: #fffbeb; color: var(--warning); }
.notif-erfolg .notif-icon { background: #f0fdf4; color: var(--success); }
.notif-fehler .notif-icon { background: #fef2f2; color: var(--danger); }
.notif-title { font-size: .8rem; font-weight: 600; color: var(--navy); margin-bottom: .15rem; }
.notif-text { font-size: .75rem; color: var(--text-muted); line-height: 1.4; }
.notif-time { font-size: .7rem; color: var(--text-light); margin-top: .25rem; }

.user-panel { min-width: 240px; }
.user-panel-header { display: flex; align-items: center; gap: .85rem; padding: 1rem; }
.user-avatar-lg { width: 44px; height: 44px; background: linear-gradient(135deg, var(--navy), var(--navy-light)); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--gold); font-size: 1.1rem; font-weight: 700; flex-shrink: 0; }
.user-panel-name { font-size: .9rem; font-weight: 600; color: var(--navy); }
.user-panel-nr { font-size: .75rem; color: var(--text-muted); }

/* ── SIDEBAR ───────────────────────────────────────────────── */
.portal-sidebar {
    position: fixed; top: var(--topbar-h); left: 0; bottom: 0;
    width: var(--sidebar-w); background: var(--white);
    border-right: 1px solid var(--border); overflow-y: auto;
    display: flex; flex-direction: column; z-index: 900;
    transition: transform .3s ease;
}
.sidebar-nav { flex: 1; padding: 1.25rem 0; }
.sidebar-section-label { padding: .5rem 1.25rem .25rem; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-light); }
.sidebar-link {
    display: flex; align-items: center; gap: .85rem;
    padding: .65rem 1.25rem; font-size: .875rem; font-weight: 500;
    color: var(--text-muted); text-decoration: none;
    transition: var(--transition); position: relative; border-radius: 0;
    margin: .1rem .75rem; border-radius: 8px;
}
.sidebar-link i { width: 18px; text-align: center; font-size: .95rem; flex-shrink: 0; }
.sidebar-link:hover { background: var(--bg); color: var(--navy); }
.sidebar-link.active { background: linear-gradient(135deg, var(--navy), var(--navy-light)); color: var(--white); }
.sidebar-link.active i { color: var(--gold); }
.sidebar-link-danger { color: var(--danger) !important; margin-top: .5rem; }
.sidebar-link-danger:hover { background: #fef2f2 !important; }
.sidebar-badge { margin-left: auto; background: var(--danger); color: var(--white); border-radius: 10px; padding: .1rem .5rem; font-size: .7rem; font-weight: 700; }
.sidebar-footer { padding: 1rem 1.25rem; border-top: 1px solid var(--border); }
.sidebar-esisuisse { display: flex; align-items: center; gap: .6rem; padding: .75rem; background: linear-gradient(135deg, #f0f4f8, #e8edf5); border-radius: 8px; font-size: .75rem; color: var(--navy); }
.sidebar-esisuisse i { color: var(--gold); font-size: 1rem; flex-shrink: 0; }

/* ── MAIN CONTENT ──────────────────────────────────────────── */
.portal-main { margin-left: var(--sidebar-w); margin-top: var(--topbar-h); min-height: calc(100vh - var(--topbar-h)); padding: 2rem; }
.portal-footer { margin-left: var(--sidebar-w); background: var(--white); border-top: 1px solid var(--border); padding: 1rem 2rem; }
.portal-footer-inner { display: flex; align-items: center; justify-content: space-between; font-size: .8rem; color: var(--text-muted); }
.portal-footer-links { display: flex; gap: 1.5rem; }
.portal-footer-links a { color: var(--text-muted); text-decoration: none; }
.portal-footer-links a:hover { color: var(--navy); }

/* Overlay for mobile */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 850; }
.sidebar-overlay.active { display: block; }

@media (max-width: 1024px) {
    .portal-sidebar { transform: translateX(-100%); }
    .portal-sidebar.open { transform: translateX(0); }
    .portal-main, .portal-footer { margin-left: 0; }
    .user-name-sm { display: none; }
}
@media (max-width: 640px) {
    .portal-main { padding: 1rem; }
}

/* ── PAGE HEADER ───────────────────────────────────────────── */
.page-header { margin-bottom: 2rem; }
.page-header-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.page-title { font-size: 1.5rem; font-weight: 700; color: var(--navy); margin-bottom: .25rem; }
.page-subtitle { font-size: .9rem; color: var(--text-muted); }
.page-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.breadcrumb-portal { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--text-muted); margin-bottom: .75rem; }
.breadcrumb-portal a { color: var(--text-muted); text-decoration: none; }
.breadcrumb-portal a:hover { color: var(--navy); }
.breadcrumb-portal .sep { color: var(--text-light); }
.breadcrumb-portal .current { color: var(--navy); font-weight: 500; }

/* ── CARDS ─────────────────────────────────────────────────── */
.card { background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden; }
.card-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-title { font-size: 1rem; font-weight: 600; color: var(--navy); display: flex; align-items: center; gap: .6rem; }
.card-title i { color: var(--gold); }
.card-body { padding: 1.5rem; }
.card-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); background: #f8fafc; }

/* ── STAT CARDS ────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; margin-bottom: 2rem; }
.stat-card { background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border); padding: 1.5rem; box-shadow: var(--shadow); transition: var(--transition); }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-card-navy { background: linear-gradient(135deg, var(--navy), var(--navy-light)); border-color: transparent; }
.stat-card-gold { background: linear-gradient(135deg, var(--gold-dark), var(--gold)); border-color: transparent; }
.stat-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.stat-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.stat-icon-navy { background: rgba(13,31,60,.08); color: var(--navy); }
.stat-icon-gold { background: rgba(201,168,76,.12); color: var(--gold-dark); }
.stat-icon-success { background: rgba(16,185,129,.1); color: var(--success); }
.stat-icon-warning { background: rgba(245,158,11,.1); color: var(--warning); }
.stat-icon-white { background: rgba(255,255,255,.15); color: var(--white); }
.stat-badge { font-size: .75rem; font-weight: 600; padding: .25rem .6rem; border-radius: 20px; }
.stat-badge-up { background: rgba(16,185,129,.1); color: var(--success); }
.stat-badge-down { background: rgba(239,68,68,.1); color: var(--danger); }
.stat-badge-neutral { background: rgba(100,116,139,.1); color: var(--text-muted); }
.stat-value { font-size: 1.6rem; font-weight: 700; color: var(--navy); line-height: 1.2; }
.stat-card-navy .stat-value, .stat-card-gold .stat-value { color: var(--white); }
.stat-label { font-size: .8rem; color: var(--text-muted); margin-top: .25rem; }
.stat-card-navy .stat-label, .stat-card-gold .stat-label { color: rgba(255,255,255,.7); }

/* ── GRID LAYOUTS ──────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ── TABLES ────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }
.portal-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.portal-table thead tr { background: #f8fafc; }
.portal-table thead th { padding: .85rem 1rem; text-align: left; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
.portal-table tbody tr { border-bottom: 1px solid #f1f5f9; transition: var(--transition); }
.portal-table tbody tr:hover { background: #f8fafc; }
.portal-table tbody tr:last-child { border-bottom: none; }
.portal-table tbody td { padding: .9rem 1rem; color: var(--text); vertical-align: middle; }
.portal-table .td-mono { font-family: 'Courier New', monospace; font-size: .8rem; }
.portal-table .td-right { text-align: right; }
.portal-table .td-center { text-align: center; }

/* ── BADGES ────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .65rem; border-radius: 20px; font-size: .75rem; font-weight: 600; }
.badge-aktiv { background: rgba(16,185,129,.1); color: #059669; }
.badge-faellig { background: rgba(245,158,11,.1); color: #d97706; }
.badge-aufgeloest { background: rgba(100,116,139,.1); color: var(--text-muted); }
.badge-ausstehend { background: rgba(59,130,246,.1); color: #2563eb; }
.badge-ausgefuehrt { background: rgba(16,185,129,.1); color: #059669; }
.badge-storniert { background: rgba(239,68,68,.1); color: var(--danger); }
.badge-kauf { background: rgba(16,185,129,.1); color: #059669; }
.badge-verkauf { background: rgba(239,68,68,.1); color: var(--danger); }
.badge-einzahlung { background: rgba(16,185,129,.1); color: #059669; }
.badge-auszahlung { background: rgba(239,68,68,.1); color: var(--danger); }
.badge-zinsgutschrift { background: rgba(201,168,76,.1); color: var(--gold-dark); }

/* ── FORMS ─────────────────────────────────────────────────── */
.portal-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.25rem; }
@media (max-width: 640px) { .form-row, .form-row-3 { grid-template-columns: 1fr; } }
.form-group-portal { display: flex; flex-direction: column; gap: .4rem; }
.form-label-portal { font-size: .875rem; font-weight: 600; color: var(--navy); }
.form-hint { font-size: .78rem; color: var(--text-muted); margin-top: .25rem; }
.form-error { font-size: .78rem; color: var(--danger); margin-top: .25rem; display: flex; align-items: center; gap: .3rem; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .75rem center; padding-right: 2.5rem; }
textarea.form-control { resize: vertical; min-height: 100px; }

/* ── FESTGELD CARDS ────────────────────────────────────────── */
.festgeld-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }
.festgeld-card { background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden; transition: var(--transition); }
.festgeld-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.festgeld-card-header { background: linear-gradient(135deg, var(--navy), var(--navy-light)); padding: 1.25rem 1.5rem; }
.festgeld-card-nr { font-size: .75rem; color: rgba(255,255,255,.6); margin-bottom: .25rem; }
.festgeld-card-name { font-size: 1rem; font-weight: 600; color: var(--white); margin-bottom: .5rem; }
.festgeld-card-betrag { font-size: 1.5rem; font-weight: 700; color: var(--gold); }
.festgeld-card-body { padding: 1.25rem 1.5rem; }
.festgeld-info-row { display: flex; justify-content: space-between; padding: .5rem 0; border-bottom: 1px solid #f1f5f9; font-size: .875rem; }
.festgeld-info-row:last-child { border-bottom: none; }
.festgeld-info-label { color: var(--text-muted); }
.festgeld-info-value { font-weight: 600; color: var(--navy); }
.festgeld-progress { margin-top: 1rem; }
.progress-label { display: flex; justify-content: space-between; font-size: .75rem; color: var(--text-muted); margin-bottom: .4rem; }
.progress-bar-wrapper { height: 6px; background: #e2e8f0; border-radius: 3px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--gold-dark), var(--gold)); border-radius: 3px; transition: width .5s ease; }
.festgeld-card-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; gap: .75rem; }

/* ── ZINSSATZ CARDS ────────────────────────────────────────── */
.zinssatz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
.zinssatz-card { background: var(--bg-card); border-radius: 10px; border: 1.5px solid var(--border); padding: 1.25rem; text-align: center; cursor: pointer; transition: var(--transition); }
.zinssatz-card:hover, .zinssatz-card.selected { border-color: var(--navy); background: #f0f4f8; }
.zinssatz-card.selected { border-color: var(--gold); background: linear-gradient(135deg, #fef9ec, #fdf3d0); }
.zinssatz-laufzeit { font-size: .8rem; color: var(--text-muted); margin-bottom: .4rem; }
.zinssatz-wert { font-size: 1.4rem; font-weight: 700; color: var(--navy); }
.zinssatz-pa { font-size: .7rem; color: var(--text-muted); }

/* ── WERTPAPIER TABLE ──────────────────────────────────────── */
.rating-badge { display: inline-block; padding: .15rem .5rem; border-radius: 4px; font-size: .72rem; font-weight: 700; font-family: monospace; }
.rating-aaa { background: #dcfce7; color: #15803d; }
.rating-aa { background: #d1fae5; color: #059669; }
.rating-a { background: #e0f2fe; color: #0369a1; }
.rating-bbb { background: #fef9c3; color: #a16207; }
.rating-other { background: #f1f5f9; color: var(--text-muted); }

.kurs-up { color: var(--success); font-weight: 600; }
.kurs-down { color: var(--danger); font-weight: 600; }
.kurs-neutral { color: var(--text-muted); }

/* ── DEPOT CHART ───────────────────────────────────────────── */
.depot-chart-wrapper { position: relative; height: 280px; }

/* ── TRANSACTION LIST ──────────────────────────────────────── */
.tx-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .85rem; flex-shrink: 0; }
.tx-einzahlung { background: rgba(16,185,129,.1); color: var(--success); }
.tx-auszahlung { background: rgba(239,68,68,.1); color: var(--danger); }
.tx-zinsgutschrift { background: rgba(201,168,76,.1); color: var(--gold-dark); }
.tx-festgeld { background: rgba(13,31,60,.1); color: var(--navy); }
.tx-wertpapier { background: rgba(59,130,246,.1); color: var(--info); }
.tx-default { background: #f1f5f9; color: var(--text-muted); }

/* ── NACHRICHTEN ───────────────────────────────────────────── */
.nachricht-item { display: flex; gap: 1rem; padding: 1rem 1.5rem; border-bottom: 1px solid #f1f5f9; cursor: pointer; transition: var(--transition); }
.nachricht-item:hover { background: #f8fafc; }
.nachricht-item.ungelesen { background: #f0f7ff; border-left: 3px solid var(--info); }
.nachricht-item.wichtig { border-left: 3px solid var(--gold); }
.nachricht-avatar { width: 40px; height: 40px; background: linear-gradient(135deg, var(--navy), var(--navy-light)); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--gold); font-size: .9rem; flex-shrink: 0; }
.nachricht-content { flex: 1; min-width: 0; }
.nachricht-betreff { font-size: .9rem; font-weight: 600; color: var(--navy); margin-bottom: .2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nachricht-preview { font-size: .8rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nachricht-meta { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.nachricht-datum { font-size: .75rem; color: var(--text-light); }

/* ── KONTO ERÖFFNUNG STEPS ─────────────────────────────────── */
.steps-indicator { display: flex; align-items: center; margin-bottom: 2.5rem; }
.step-item { display: flex; align-items: center; flex: 1; }
.step-circle { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .85rem; font-weight: 700; flex-shrink: 0; border: 2px solid var(--border); background: var(--white); color: var(--text-muted); transition: var(--transition); }
.step-item.active .step-circle { border-color: var(--navy); background: var(--navy); color: var(--white); }
.step-item.done .step-circle { border-color: var(--success); background: var(--success); color: var(--white); }
.step-label { font-size: .78rem; color: var(--text-muted); margin-left: .5rem; white-space: nowrap; }
.step-item.active .step-label { color: var(--navy); font-weight: 600; }
.step-connector { flex: 1; height: 2px; background: var(--border); margin: 0 .5rem; }
.step-item.done + .step-item .step-connector { background: var(--success); }

/* ── PROFIL ────────────────────────────────────────────────── */
.profil-avatar { width: 80px; height: 80px; background: linear-gradient(135deg, var(--navy), var(--navy-light)); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--gold); font-size: 2rem; font-weight: 700; margin: 0 auto 1rem; }
.profil-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.profil-info-item { padding: .75rem 0; border-bottom: 1px solid #f1f5f9; }
.profil-info-label { font-size: .75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .25rem; }
.profil-info-value { font-size: .9rem; font-weight: 500; color: var(--navy); }

/* ── CALCULATOR ────────────────────────────────────────────── */
.calculator-result { background: linear-gradient(135deg, var(--navy), var(--navy-light)); border-radius: var(--radius); padding: 1.5rem; color: var(--white); margin-top: 1.5rem; }
.calc-result-row { display: flex; justify-content: space-between; padding: .5rem 0; border-bottom: 1px solid rgba(255,255,255,.1); font-size: .9rem; }
.calc-result-row:last-child { border-bottom: none; padding-top: .75rem; }
.calc-result-label { color: rgba(255,255,255,.7); }
.calc-result-value { font-weight: 600; color: var(--white); }
.calc-result-total .calc-result-value { font-size: 1.3rem; color: var(--gold); }

/* ── EMPTY STATE ───────────────────────────────────────────── */
.empty-state { text-align: center; padding: 3rem 1.5rem; }
.empty-state-icon { font-size: 3rem; color: var(--text-light); margin-bottom: 1rem; }
.empty-state-title { font-size: 1.1rem; font-weight: 600; color: var(--navy); margin-bottom: .5rem; }
.empty-state-text { font-size: .9rem; color: var(--text-muted); margin-bottom: 1.5rem; }

/* ── TABS ──────────────────────────────────────────────────── */
.portal-tabs { display: flex; gap: .25rem; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; }
.portal-tab { padding: .65rem 1.25rem; font-size: .875rem; font-weight: 500; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: var(--transition); background: none; border-top: none; border-left: none; border-right: none; font-family: inherit; }
.portal-tab:hover { color: var(--navy); }
.portal-tab.active { color: var(--navy); border-bottom-color: var(--navy); font-weight: 600; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── SEARCH & FILTER ───────────────────────────────────────── */
.filter-bar { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.5rem; }
.search-input-wrapper { position: relative; flex: 1; min-width: 200px; }
.search-input-wrapper i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: .9rem; }
.search-input { padding: .65rem .85rem .65rem 2.5rem; border: 1.5px solid var(--border); border-radius: 8px; font-size: .875rem; font-family: inherit; background: var(--white); color: var(--text); width: 100%; outline: none; transition: var(--transition); }
.search-input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(13,31,60,.06); }
.filter-select { padding: .65rem .85rem; border: 1.5px solid var(--border); border-radius: 8px; font-size: .875rem; font-family: inherit; background: var(--white); color: var(--text); outline: none; cursor: pointer; }
.filter-select:focus { border-color: var(--navy); }

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .festgeld-grid { grid-template-columns: 1fr; }
    .zinssatz-grid { grid-template-columns: repeat(3, 1fr); }
    .page-header-inner { flex-direction: column; }
}
