/* =========================================================
   KONTOAUSZÜGE / BANKIMPORT
========================================================= */

.statement-page-header{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:24px;
    margin-bottom:28px;
}

.statement-page-header h1{
    margin:5px 0 8px;
}

.statement-eyebrow{
    display:block;
    font-size:11px;
    letter-spacing:.18em;
    font-weight:700;
    color:#0f766e;
}

.statement-header-badge{
    display:flex;
    align-items:center;
    gap:9px;
    padding:11px 15px;
    border-radius:999px;
    border:1px solid #dbe7e4;
    background:#f6fbf9;
    color:#176b61;
    font-size:13px;
    font-weight:600;
}

.statement-header-badge svg{width:18px;height:18px;}

.statement-step-grid{
    display:grid;
    grid-template-columns:minmax(0,1.45fr) minmax(280px,.75fr);
    gap:22px;
    margin-bottom:24px;
}

.statement-upload-card,
.statement-help-card,
.statement-analysis,
.statement-history-card{
    background:#fff;
    border:1px solid #e6ebe9;
    border-radius:20px;
    box-shadow:0 10px 32px rgba(16,24,40,.055);
}

.statement-upload-card,
.statement-help-card{
    padding:24px;
}

.statement-card-title{
    display:flex;
    align-items:center;
    gap:13px;
    margin-bottom:22px;
}

.statement-card-title span{
    display:block;
    font-size:11px;
    font-weight:700;
    letter-spacing:.13em;
    color:#78908b;
    text-transform:uppercase;
}

.statement-card-title h3{
    margin:2px 0 0;
    font-size:18px;
    color:#153b37;
}

.statement-icon-box{
    width:46px;
    height:46px;
    display:grid;
    place-items:center;
    border-radius:14px;
    background:#eaf4f1;
    color:#186c61;
    flex:0 0 auto;
}

.statement-icon-box.soft{
    background:#f2f5f4;
    color:#45635f;
}

.statement-icon-box svg{width:21px;height:21px;}

.statement-field-label{
    display:block;
    margin:0 0 8px;
    color:#50635f;
    font-size:13px;
    font-weight:600;
}

.statement-select,
.statement-toolbar select{
    width:100%;
    min-height:46px;
    border:1px solid #dfe6e4;
    border-radius:12px;
    background:#fff;
    padding:0 13px;
    font:inherit;
    color:#173a36;
    outline:none;
}

.statement-select:focus,
.statement-toolbar select:focus,
.statement-search-wrap:focus-within{
    border-color:#87b9b0;
    box-shadow:0 0 0 3px rgba(23,118,105,.08);
}

.statement-dropzone{
    margin-top:18px;
    min-height:210px;
    border:1.5px dashed #b8ccc7;
    border-radius:18px;
    background:linear-gradient(180deg,#fbfdfc 0%,#f7faf9 100%);
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    padding:26px;
    text-align:center;
    cursor:pointer;
    transition:.2s ease;
}

.statement-dropzone:hover,
.statement-dropzone.dragging{
    border-color:#2a8175;
    background:#f3faf8;
    transform:translateY(-1px);
}

.statement-dropzone input{display:none;}
.statement-dropzone strong{font-size:16px;color:#173d38;margin-top:11px;}
.statement-dropzone > span{font-size:13px;color:#71817e;margin-top:5px;}

.statement-drop-icon{
    width:52px;
    height:52px;
    display:grid;
    place-items:center;
    border-radius:50%;
    background:#e7f3f0;
    color:#167165;
}
.statement-drop-icon svg{width:24px;height:24px;}

.statement-file-button,
.statement-primary-btn,
.statement-secondary-btn{
    border:0;
    cursor:pointer;
    font:inherit;
    font-weight:600;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    transition:.18s ease;
}

.statement-file-button{
    margin-top:16px;
    padding:10px 15px;
    border-radius:10px;
    background:#fff;
    border:1px solid #dbe5e2;
    color:#205a53;
}

.statement-file-button:hover,
.statement-secondary-btn:hover{
    background:#f5f9f8;
    border-color:#c6d8d4;
}

.statement-file-button svg,
.statement-primary-btn svg,
.statement-secondary-btn svg{width:17px;height:17px;}

.statement-file-info{
    margin-top:14px;
    border-radius:12px;
    padding:12px 14px;
    background:#f7faf9;
    border:1px solid #e4ebe9;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    font-size:13px;
    color:#51635f;
}

.statement-feature-list{
    display:grid;
    gap:10px;
}

.statement-feature-list > div{
    display:flex;
    gap:12px;
    align-items:center;
    padding:13px;
    border-radius:13px;
    background:#f8faf9;
    border:1px solid #edf1f0;
}

.statement-feature-list svg{width:20px;height:20px;color:#27786e;flex:0 0 auto;}
.statement-feature-list span{display:flex;flex-direction:column;gap:1px;}
.statement-feature-list strong{font-size:13px;color:#274642;}
.statement-feature-list small{font-size:11px;color:#7d8b88;}

.statement-analysis{
    padding:24px;
    margin-bottom:24px;
}

.statement-analysis-head,
.statement-history-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:18px;
}

.statement-analysis-head h2,
.statement-history-head h2{
    margin:4px 0 4px;
    font-size:21px;
    color:#143a36;
}

.statement-analysis-head p{
    margin:0;
    font-size:13px;
    color:#71817e;
}

.statement-analysis-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    justify-content:flex-end;
}

.statement-primary-btn{
    min-height:42px;
    padding:0 16px;
    border-radius:11px;
    background:#1d756a;
    color:#fff;
    box-shadow:0 7px 16px rgba(29,117,106,.17);
}
.statement-primary-btn:hover{background:#17655c;transform:translateY(-1px);}
.statement-primary-btn:disabled{opacity:.45;cursor:not-allowed;transform:none;}

.statement-secondary-btn{
    min-height:42px;
    padding:0 14px;
    border-radius:11px;
    background:#fff;
    border:1px solid #dfe6e4;
    color:#42615c;
}
.statement-secondary-btn.compact{min-height:38px;padding:0 12px;font-size:12px;}

.statement-kpis{
    margin-top:22px;
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:12px;
}

.statement-kpi{
    padding:15px 16px;
    border:1px solid #e6ecea;
    border-radius:14px;
    background:#fbfcfc;
    display:flex;
    flex-direction:column;
    gap:2px;
}
.statement-kpi span{font-size:11px;text-transform:uppercase;letter-spacing:.08em;font-weight:700;color:#81908d;}
.statement-kpi strong{font-size:21px;color:#1c3d39;}
.statement-kpi small{font-size:11px;color:#8b9896;}
.statement-kpi.income strong{color:#16715d;}
.statement-kpi.expense strong{color:#aa4b45;}

.statement-toolbar{
    display:grid;
    grid-template-columns:minmax(240px,1fr) 210px auto auto;
    gap:10px;
    margin-top:18px;
    padding:12px;
    border:1px solid #e9eeec;
    background:#f8faf9;
    border-radius:14px;
}

.statement-search-wrap{
    min-height:42px;
    display:flex;
    align-items:center;
    gap:8px;
    padding:0 12px;
    background:#fff;
    border:1px solid #dfe6e4;
    border-radius:10px;
}
.statement-search-wrap svg{width:17px;height:17px;color:#7e8d8a;}
.statement-search-wrap input{border:0;outline:0;min-width:0;width:100%;font:inherit;background:transparent;}
.statement-toolbar select{min-height:42px;border-radius:10px;}

.statement-table-wrap{
    margin-top:14px;
    border:1px solid #e6ebe9;
    border-radius:15px;
    overflow:hidden;
}

.statement-table-head,
.statement-row{
    display:grid;
    grid-template-columns:42px 105px minmax(260px,1.6fr) minmax(170px,.8fr) 120px 125px;
    gap:12px;
    align-items:center;
}

.statement-table-head{
    min-height:46px;
    padding:0 14px;
    background:#f5f8f7;
    color:#6c7c79;
    font-size:11px;
    text-transform:uppercase;
    letter-spacing:.07em;
    font-weight:700;
}

.statement-row{
    padding:14px;
    background:#fff;
    border-top:1px solid #edf1ef;
    transition:.15s;
}
.statement-row:hover{background:#fbfdfc;}
.statement-row.duplicate{background:#fafafa;opacity:.68;}

.statement-checkbox{
    width:18px;
    height:18px;
    accent-color:#1d756a;
}

.statement-date{font-size:13px;font-weight:600;color:#465f5a;}
.statement-booking-main{min-width:0;}
.statement-booking-main strong{display:block;font-size:13px;color:#203f3b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.statement-booking-main span{display:block;margin-top:3px;font-size:11px;color:#7c8987;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}

.statement-category-select{
    width:100%;
    min-width:0;
    height:36px;
    border:1px solid #dfe6e4;
    border-radius:9px;
    padding:0 9px;
    background:#fff;
    color:#3d5b56;
    font:inherit;
    font-size:12px;
}

.statement-amount{
    font-size:13px;
    font-weight:700;
    text-align:right;
}
.statement-amount.income{color:#14705d;}
.statement-amount.expense{color:#aa4b45;}

.statement-status{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:28px;
    padding:0 9px;
    border-radius:999px;
    font-size:10px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.05em;
    width:max-content;
}
.statement-status.new{background:#eaf5f1;color:#176c5f;}
.statement-status.duplicate{background:#f1f2f2;color:#7b8583;}

.statement-history-card{padding:22px 24px;}
.statement-history-list{display:grid;gap:10px;margin-top:16px;}
.statement-history-row{
    display:grid;
    grid-template-columns:minmax(220px,1fr) 155px 110px 120px;
    gap:14px;
    align-items:center;
    padding:13px 14px;
    border:1px solid #e8eeec;
    border-radius:12px;
    background:#fbfcfc;
    color:#47605c;
    font-size:12px;
}
.statement-history-row strong{display:block;color:#203f3b;font-size:13px;}
.statement-history-row small{color:#86928f;}
.statement-empty{padding:26px;text-align:center;color:#879491;background:#fafcfc;border:1px dashed #dce5e2;border-radius:12px;}

.statement-error,
.statement-success{
    border-radius:12px;
    padding:12px 14px;
    font-size:13px;
    margin-top:12px;
}
.statement-error{background:#fff2f1;border:1px solid #f4d7d4;color:#9f4039;}
.statement-success{background:#edf8f4;border:1px solid #d1ebe2;color:#176759;}

.expense-header-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;}
.expense-header-actions .small-btn{display:inline-flex;align-items:center;gap:7px;}
.expense-header-actions .small-btn svg{width:16px;height:16px;}
.statement-shortcut-btn{background:#eef7f4!important;color:#176b61!important;border-color:#d4e9e3!important;}

.expense-amount.expense-negative strong{color:#a9443d;}
.expense-amount.income-positive strong{color:#14705d;}
.expense-source-line{font-size:10px;color:#8a9694;margin-top:3px;display:block;}

@media(max-width:1100px){
    .statement-step-grid{grid-template-columns:1fr;}
    .statement-toolbar{grid-template-columns:1fr 1fr;}
    .statement-kpis{grid-template-columns:repeat(2,1fr);}
    .statement-table-wrap{overflow-x:auto;}
    .statement-table-head,.statement-row{min-width:900px;}
}

@media(max-width:760px){
    .statement-page-header,.statement-analysis-head,.statement-history-head{flex-direction:column;align-items:stretch;}
    .statement-header-badge{width:max-content;}
    .statement-analysis-actions{justify-content:flex-start;}
    .statement-kpis{grid-template-columns:1fr 1fr;}
    .statement-toolbar{grid-template-columns:1fr;}
    .statement-history-row{grid-template-columns:1fr 1fr;}
}

@media(max-width:500px){
    .statement-kpis{grid-template-columns:1fr;}
    .statement-history-row{grid-template-columns:1fr;}
}

.expense-id-info{min-width:0;}
.expense-id-info > span{display:block;font-size:10px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#8a9694;margin-bottom:3px;}
.expense-id-info h3{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.expense-id-info p{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px!important;font-size:11px!important;color:#889593!important;}

/* V13: ungeklärte Buchungen klar hervorheben statt unter "Sonstige" zu verstecken */
.statement-kpi.review{border-color:#ead9a2;background:#fffdf5;}
.statement-kpi.review strong{color:#8a5a00;}
.statement-row.needs-review{background:#fffdf6;box-shadow:inset 3px 0 0 #d9a72a;}
.statement-row.needs-review:hover{background:#fffaf0;}
.statement-status.review{background:#fff2c7;color:#7a5200;border:1px solid #ead28c;}
.statement-category-select option[value="Ungeklärt"],
.statement-category-select option[value="Ungeklärte Einnahme"]{font-weight:700;}
.statement-detected-account{display:flex;align-items:center;gap:12px;padding:13px 15px;margin:4px 0 14px;border:1px solid #d9e2ec;border-radius:12px;background:#f7f9fc;color:#17324d}.statement-detected-account svg{width:20px;height:20px}.statement-detected-account span{display:flex;flex-direction:column;gap:2px}.statement-detected-account small{color:#718096}.statement-detected-account.detected{background:#eef7f2;border-color:#b8ddc8}.statement-detected-account.error{background:#fff5f5;border-color:#efb8b8}.statement-kpi.reconciled{background:#f0f8f4;border-color:#b9dfc9}.statement-kpi.difference{background:#fff5f5;border-color:#efb8b8}

/* V16 – Finanz-Prüfzentrale */
.bank-review-card{margin-top:24px;background:#fff;border:1px solid #dbe3ec;border-radius:18px;padding:22px;box-shadow:0 8px 28px rgba(18,42,70,.06)}
.bank-review-card .statement-history-head p{margin:5px 0 0;color:#66778a;font-size:13px}
.bank-review-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:18px 0}
.bank-review-kpis>div{border:1px solid #e1e7ee;background:#f8fafc;border-radius:14px;padding:14px 16px;min-width:0}
.bank-review-kpis span,.bank-review-kpis small{display:block;color:#718096;font-size:12px}.bank-review-kpis strong{display:block;color:#173b61;font-size:24px;margin:4px 0}
.bank-review-items{display:grid;gap:9px}.bank-review-row{display:grid;grid-template-columns:42px minmax(220px,1.5fr) minmax(180px,1fr) 130px;align-items:center;gap:12px;border:1px solid #e3e8ef;border-radius:13px;padding:12px 14px}
.bank-review-icon{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;background:#fff7df;color:#9a6a00}.bank-review-icon.transfer{background:#eaf2ff;color:#1f5f9f}.bank-review-icon svg{width:18px;height:18px}.bank-review-main,.bank-review-kind{min-width:0}.bank-review-main strong,.bank-review-kind strong{display:block;color:#1c334b}.bank-review-main span,.bank-review-kind span{display:block;color:#758395;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:3px}.bank-review-amount{text-align:right;font-weight:800}.bank-review-amount.income{color:#18794e}.bank-review-amount.expense{color:#a33a3a}
.bank-review-clean{display:flex;align-items:center;gap:13px;padding:18px;border-radius:14px;background:#f1f8f5;color:#176846}.bank-review-clean svg{width:28px;height:28px}.bank-review-clean strong,.bank-review-clean span{display:block}.bank-review-clean span{font-size:13px;margin-top:3px;color:#55756a}
@media(max-width:900px){.bank-review-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.bank-review-row{grid-template-columns:42px minmax(0,1fr) 110px}.bank-review-kind{grid-column:2/4}.bank-review-amount{grid-column:3;grid-row:1}}
@media(max-width:560px){.bank-review-kpis{grid-template-columns:1fr}.bank-review-row{grid-template-columns:38px minmax(0,1fr)}.bank-review-kind,.bank-review-amount{grid-column:2;text-align:left}.bank-review-amount{grid-row:auto}}
