/* ============================================================
 * Flow – Mini Házipénztár CSS
 * Fájl: includes/assets/css/bank/flow-cash-register.css
 * ============================================================ */

.flow-cash-register-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 16px;
    font-family: inherit;
}

/* ── Pénztár választó ── */
.flow-cash-reg-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.flow-cash-reg-tab {
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    text-decoration: none;
    color: #475569;
    font-size: 0.88em;
    font-weight: 500;
    transition: all 0.15s;
}

.flow-cash-reg-tab:hover { background: #f1f5f9; text-decoration: none; }
.flow-cash-reg-tab.is-active {
    background: #223a5e;
    color: #fff;
    border-color: #223a5e;
}

.flow-cash-reg-tab-cur {
    margin-left: 4px;
    font-size: 0.85em;
    opacity: 0.75;
}

/* ── Egyenleg kártya ── */
.flow-cash-reg-balance-card {
    background: #223a5e;
    color: #fff;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 20px;
    text-align: center;
}

.flow-cash-reg-balance-label {
    font-size: 0.82em;
    opacity: 0.75;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.flow-cash-reg-balance-value {
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 4px;
}

.flow-cash-reg-balance-value.is-positive { color: #86efac; }
.flow-cash-reg-balance-value.is-negative { color: #fca5a5; }

.flow-cash-reg-balance-hint {
    font-size: 0.78em;
    opacity: 0.6;
}

/* ── Navigáció ── */
.flow-cash-reg-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.flow-cash-reg-nav-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 14px;
    text-decoration: none;
    color: #223a5e;
    font-weight: 700;
    font-size: 1.1em;
    transition: background 0.15s;
}

.flow-cash-reg-nav-btn:hover { background: #e2e8f0; text-decoration: none; }

.flow-cash-reg-period {
    font-size: 1em;
    font-weight: 600;
    color: #223a5e;
    min-width: 160px;
    text-align: center;
}

/* ── Havi összesítő ── */
.flow-cash-reg-summary {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.flow-cash-reg-sum-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.flow-cash-reg-sum-label {
    display: block;
    font-size: 0.75em;
    color: #64748b;
    margin-bottom: 4px;
}

.flow-cash-reg-sum-value {
    display: block;
    font-size: 1.05em;
    font-weight: 700;
}

.flow-cash-reg-sum-in  .flow-cash-reg-sum-value { color: #15803d; }
.flow-cash-reg-sum-out .flow-cash-reg-sum-value { color: #b91c1c; }
.flow-cash-reg-sum-net .flow-cash-reg-sum-value { color: #223a5e; }

/* ── Tételek listája ── */
.flow-cash-reg-list {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}

.flow-cash-reg-empty {
    padding: 24px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.9em;
}

.flow-cash-reg-entry {
    display: grid;
    grid-template-columns: 90px 1fr auto auto;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
    transition: background 0.1s;
}

.flow-cash-reg-entry:last-child { border-bottom: none; }
.flow-cash-reg-entry:hover { background: #f8fafc; }

.flow-cash-reg-entry--in  { border-left: 3px solid #86efac; }
.flow-cash-reg-entry--out { border-left: 3px solid #fca5a5; }

.flow-cash-reg-entry-date {
    font-size: 0.82em;
    color: #64748b;
    white-space: nowrap;
}

.flow-cash-reg-entry-desc {
    font-size: 0.9em;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.flow-cash-reg-entry-source {
    font-size: 0.85em;
    cursor: help;
    opacity: 0.6;
}

.flow-cash-reg-entry-amount {
    font-size: 0.95em;
    font-weight: 700;
    white-space: nowrap;
}

.flow-cash-reg-entry-amount.is-in  { color: #15803d; }
.flow-cash-reg-entry-amount.is-out { color: #b91c1c; }

.flow-cash-reg-delete-btn {
    background: none !important;
    border: none !important;
    padding: 2px !important;
    font-size: 0.85em !important;
    cursor: pointer !important;
    opacity: 0.4;
    transition: opacity 0.15s;
    box-shadow: none !important;
}

.flow-cash-reg-delete-btn:hover { opacity: 1 !important; }

/* ── Manuális rögzítés ── */
.flow-cash-reg-add-wrap { margin-top: 8px; }

.flow-cash-reg-add-toggle {
    background: #f1f5f9 !important;
    border: 1px dashed #cbd5e1 !important;
    border-radius: 6px !important;
    padding: 10px 20px !important;
    font-size: 0.88em !important;
    color: #475569 !important;
    cursor: pointer !important;
    width: 100% !important;
    text-align: left !important;
    box-shadow: none !important;
    transition: background 0.15s !important;
}

.flow-cash-reg-add-toggle:hover {
    background: #e2e8f0 !important;
    color: #223a5e !important;
}

.flow-cash-reg-add-form {
    margin-top: 10px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.flow-cash-reg-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.flow-cash-reg-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.flow-cash-reg-field--full { grid-column: 1 / -1; }

.flow-cash-reg-field label {
    font-size: 0.80em !important;
    font-weight: 600 !important;
    color: #374151 !important;
}

.flow-cash-reg-hint {
    font-weight: 400;
    color: #94a3b8;
}

.flow-cash-reg-input {
    padding: 8px 10px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    font-size: 0.88em !important;
    background: #fff !important;
    color: #1e293b !important;
    box-shadow: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.flow-cash-reg-input:focus {
    outline: none !important;
    border-color: #223a5e !important;
}

.flow-cash-reg-form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.flow-cash-reg-save {
    background: #223a5e !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 9px 22px !important;
    font-size: 0.88em !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    box-shadow: none !important;
}

.flow-cash-reg-save:hover { background: #0d1f3c !important; }

.flow-cash-reg-cancel {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    padding: 9px 18px !important;
    font-size: 0.88em !important;
    cursor: pointer !important;
    box-shadow: none !important;
}

@media (max-width: 640px) {
    .flow-cash-reg-summary { grid-template-columns: 1fr; }
    .flow-cash-reg-form-grid { grid-template-columns: 1fr; }
    .flow-cash-reg-entry { grid-template-columns: 80px 1fr auto; }
}

/* ── Szélesség fix – teljes szélesség mint a banki lista ── */
.flow-cash-register-container {
    max-width: 100% !important;
    width: 100% !important;
    padding: 16px;
    box-sizing: border-box;
}

/* ── Forrás badge a tételeknél ── */
.flow-cash-reg-entry-source {
    font-size: 0.75em;
    padding: 1px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.flow-cash-reg-source-invoice {
    background: #eff6ff;
    color: #1d4ed8;
}

.flow-cash-reg-source-bank {
    background: #f0fdf4;
    color: #15803d;
}

.flow-cash-reg-source-manual {
    background: #fef9c3;
    color: #92400e;
}

/* ── Összeg + deviza select ── */
.flow-cash-reg-amount-wrap {
    display: flex;
    gap: 8px;
}

.flow-cash-reg-amount-wrap .flow-cash-reg-input:first-child {
    flex: 1;
}

.flow-cash-reg-cur-select {
    width: 80px !important;
    flex-shrink: 0;
}

/* ── Havi összesítő is-positive/negative ── */
.flow-cash-reg-sum-net .is-positive { color: #15803d; }
.flow-cash-reg-sum-net .is-negative { color: #b91c1c; }

/* ── Egyenleg kártya – kétoszlopos ── */
.flow-cash-reg-balance-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.flow-cash-reg-balance-col {
    text-align: center;
}

.flow-cash-reg-balance-col--current {
    border-left: 1px solid rgba(255,255,255,0.2);
}

.flow-cash-reg-balance-value {
    font-size: 1.4em;
    font-weight: 700;
    margin: 4px 0;
    line-height: 1.2;
}

.flow-cash-reg-balance-value.is-positive { color: #86efac; }
.flow-cash-reg-balance-value.is-negative { color: #fca5a5; }

/* Havi összesítőben is */
.flow-cash-reg-sum-value.is-positive { color: #15803d; }
.flow-cash-reg-sum-value.is-negative { color: #b91c1c; }

@media (max-width: 480px) {
    .flow-cash-reg-balance-cols { grid-template-columns: 1fr; }
    .flow-cash-reg-balance-col--current { border-left: none; border-top: 1px solid rgba(255,255,255,0.2); padding-top: 12px; }
}

/* ── Havi változás bontás ── */
.flow-cash-reg-monthly-breakdown {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(13,31,60,0.1);
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.82em;
}

.flow-cash-reg-breakdown-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.flow-cash-reg-breakdown-cur {
    font-weight: 700;
    color: #64748b;
    min-width: 32px;
    font-size: 0.9em;
}

.flow-cash-reg-breakdown-in  { color: #15803d; }
.flow-cash-reg-breakdown-out { color: #b91c1c; }

.flow-cash-reg-opening-block { margin-bottom: 16px; }

.flow-cash-reg-ob-card {
    background: #f8faff;
    border: 1px solid #e0e8f5;
    border-left: 4px solid #223a5e;
    border-radius: 8px;
    padding: 16px 20px;
}

.flow-cash-reg-ob-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #223a5e;
    margin-bottom: 8px;
}

.flow-cash-reg-ob-hint {
    font-size: 13px;
    color: #374151;
    line-height: 1.5;
    margin: 0 0 8px;
}

.flow-cash-reg-ob-deadline-hint {
    font-size: 12px;
    color: #b45309;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 4px;
    padding: 6px 10px;
    margin: 0 0 10px;
}

.flow-cash-reg-ob-values {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}
.flow-cash-reg-ob-value {
    font-size: 16px;
    font-weight: 600;
    color: #223a5e;
}
.flow-cash-reg-ob-value-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #223a5e;
}

.flow-cash-reg-ob-empty {
    font-size: 13px;
    color: #8a94a6;
    font-style: italic;
    margin-bottom: 8px;
}

.flow-cash-reg-ob-rows { margin-bottom: 8px; }
.flow-cash-reg-ob-row {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
}
.flow-cash-reg-ob-row select,
.flow-cash-reg-ob-row input {
    border: 1px solid #dbe2f0;
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 13px;
}
.flow-cash-reg-ob-row select { width: 90px; }
.flow-cash-reg-ob-row input { flex: 1; }

.flow-cash-reg-ob-link-btn {
    background: none;
    border: none;
    color: #223a5e;
    font-size: 12px;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}
.flow-cash-reg-ob-delete-root { color: #b91c1c; }

.flow-cash-reg-ob-add-currency {
    background: none;
    border: 1px dashed #223a5e;
    color: #223a5e;
    font-size: 12px;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    margin-bottom: 10px;
}

.flow-cash-reg-ob-actions { margin-top: 8px; }
.flow-cash-reg-ob-save-root,
.flow-cash-reg-ob-refresh-btn {
    background: #223a5e;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.flow-cash-reg-ob-edit-form {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e0e8f5;
}

.flow-cash-reg-ob-banner {
    margin-top: 10px;
    padding: 10px 12px;
    background: #eef3ff;
    border: 1px solid #c7d6f5;
    border-radius: 6px;
    font-size: 13px;
    color: #223a5e;
    line-height: 1.5;
}

/* Egyenleg kártya */
.flow-cash-reg-balance-card {
    background: #223a5e;
    color: #fff;
    border-radius: 8px;
    padding: 20px 28px;
    margin-bottom: 16px;
}
.flow-cash-reg-balance-asof {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #9fb0d0;
    margin-bottom: 14px;
    text-align: center;
}
.flow-cash-reg-balance-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}
.flow-cash-reg-balance-col {
    text-align: center;
}
.flow-cash-reg-balance-col--current {
    border-left: 1px solid rgba(255,255,255,.15);
    padding-left: 32px;
}
.flow-cash-reg-balance-label {
    font-size: 12px;
    color: #9fb0d0;
    margin-bottom: 6px;
}
.flow-cash-reg-balance-value {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
}
.flow-cash-reg-balance-value.is-negative { color: #ff8a8a; }
.flow-cash-reg-balance-value.is-positive { color: #a3e8b0; }
.flow-cash-reg-balance-hint {
    font-size: 11px;
    color: #9fb0d0;
    margin-top: 6px;
}

.flow-cash-reg-entry-storno-badge {
    background: #fde2e2; color: #b91c1c;
    font-size: 11px; font-weight: 600;
    border-radius: 4px; padding: 2px 6px; margin-left: 6px;
}
.flow-cash-reg-checkbox-label { display: flex; align-items: center; gap: 6px; font-size: 13px; }

.flow-cash-reg-import-wrap { margin-bottom: 16px; }
.flow-cash-reg-import-toggle {
    background: #f8faff; border: 1px solid #e0e8f5; color: #223a5e;
    border-radius: 8px; padding: 10px 16px; font-size: 13px; font-weight: 600; cursor: pointer;
    width: 100%; text-align: left;
}
.flow-cash-reg-import-panel {
    border: 1px solid #e0e8f5; border-top: none; border-radius: 0 0 8px 8px; padding: 16px;
}
.flow-cash-reg-import-desc { font-size: 13px; color: #374151; margin: 0 0 10px; }
.flow-cash-reg-import-download {
    display: inline-block; margin-bottom: 12px; font-size: 13px; font-weight: 600;
    color: #223a5e; text-decoration: underline;
}
.flow-cash-reg-import-drop {
    display: block; border: 2px dashed #dbe2f0; border-radius: 8px; padding: 20px;
    text-align: center; cursor: pointer; font-size: 13px; color: #8a94a6;
}
.flow-cash-reg-import-drop span { color: #223a5e; font-weight: 600; text-decoration: underline; }
.flow-cash-reg-import-file-name { display: block; margin-top: 6px; font-weight: 600; color: #223a5e; }
.flow-cash-reg-import-actions { margin-top: 12px; display: flex; gap: 8px; }
.flow-cash-reg-import-submit { background: #223a5e; color: #fff; border: none; border-radius: 6px; padding: 8px 16px; cursor: pointer; }
.flow-cash-reg-import-cancel { background: none; border: 1px solid #dbe2f0; border-radius: 6px; padding: 8px 16px; cursor: pointer; }
.flow-cash-reg-import-progress { margin-top: 10px; font-size: 13px; color: #8a94a6; }
.flow-cash-reg-import-summary { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0; font-size: 13px; font-weight: 600; }
.flow-cash-reg-import-ok   { color: #2e7d32; }
.flow-cash-reg-import-dup  { color: #b45309; }
.flow-cash-reg-import-fail { color: #b91c1c; }
.flow-cash-reg-import-failed-list { border-top: 1px solid #e0e8f5; padding-top: 8px; }
.flow-cash-reg-import-failed-row { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; padding: 4px 0; color: #374151; }
.flow-cash-reg-import-failed-row.is-acked { opacity: .4; text-decoration: line-through; }
.flow-cash-reg-import-error { color: #b91c1c; font-size: 13px; }