:root {
    --app-bg: #f4f6fb;
    --app-card: #ffffff;
    --app-border: #dfe5ef;
    --app-text-muted: #667085;
    --app-primary: #1f3a5f;
    --app-primary-2: #2d5d8f;
}

body {
    background: radial-gradient(circle at top left, #eef6ff 0, var(--app-bg) 42%, #f7f7fb 100%);
    color: #172033;
}

.app-navbar {
    background: linear-gradient(135deg, var(--app-primary), var(--app-primary-2));
    box-shadow: 0 8px 20px rgba(25, 42, 70, .18);
}

.app-container {
    max-width: 1480px;
}

.card {
    border: 1px solid var(--app-border);
    border-radius: 1.1rem;
    box-shadow: 0 12px 28px rgba(22, 34, 51, .06);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--app-border);
    font-weight: 700;
}

.stat-card {
    min-height: 120px;
}

.stat-label {
    color: var(--app-text-muted);
    font-size: .86rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
}

.table thead th {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #667085;
    background: #f8fafc;
}

.badge-soft {
    background: #edf4ff;
    color: #244d7a;
    border: 1px solid #d4e7ff;
}

.form-label {
    font-weight: 650;
}

.amount-positive {
    color: #087443;
    font-weight: 700;
}

.amount-negative, .debt-amount {
    color: #b42318;
    font-weight: 800;
}

.allocation-row {
    border: 1px dashed #c9d4e5;
    border-radius: 1rem;
    padding: 1rem;
    background: #fbfdff;
    margin-bottom: .8rem;
}

.help-small {
    color: var(--app-text-muted);
    font-size: .9rem;
}

@media print {
    .navbar, .btn, .alert, .no-print { display: none !important; }
    body { background: #fff; }
    .card { box-shadow: none; border: 1px solid #ddd; }
    main { padding: 0 !important; }
}

/* V3 felületi finomítások */
.item-card {
    border: 1px solid #d9e3f3;
    border-radius: 1.25rem;
    background: linear-gradient(180deg, #ffffff, #fbfdff);
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 10px 22px rgba(22, 34, 51, .05);
}

.item-card-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    padding-bottom: .75rem;
    margin-bottom: .75rem;
    border-bottom: 1px solid #e7edf7;
    font-weight: 800;
}

.item-number {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: #1f3a5f;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
}

.kpi-card {
    border-radius: 1.25rem;
    border: 1px solid var(--app-border);
    background: rgba(255,255,255,.92);
    box-shadow: 0 12px 28px rgba(22,34,51,.06);
    padding: 1rem;
    min-height: 126px;
}

.kpi-card .kpi-icon {
    width: 42px;
    height: 42px;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #edf4ff;
    color: #244d7a;
    font-weight: 900;
    margin-bottom: .6rem;
}

.kpi-card .kpi-label {
    color: var(--app-text-muted);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 800;
}

.kpi-card .kpi-value {
    font-size: 1.65rem;
    font-weight: 900;
    line-height: 1.15;
}

.filter-card {
    background: rgba(255,255,255,.82);
    backdrop-filter: blur(6px);
}

.tx-row-locked {
    opacity: .72;
}

.badge-lock {
    background: #fff4e5;
    color: #92400e;
    border: 1px solid #fed7aa;
}

.attachment-pill {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .7rem;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    margin: .15rem;
}

@media (max-width: 768px) {
    .item-card { padding: .85rem; }
    .btn-group { flex-wrap: wrap; }
}

/* V3.5 nyomtatható riportok és költséghely karton */
.print-document {
    background: #fff;
}

.print-report-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    border-bottom: 2px solid #172033;
    padding-bottom: .9rem;
    margin-bottom: 1rem;
}

.print-report-header h1 {
    font-size: 1.55rem;
    margin: 0 0 .25rem 0;
    font-weight: 900;
}

.print-muted,
.print-meta {
    color: #667085;
    font-size: .9rem;
}

.print-meta {
    text-align: right;
    min-width: 230px;
}

.print-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: .75rem;
    margin-bottom: 1rem;
}

.print-kpi {
    border: 1px solid #dfe5ef;
    border-radius: 1rem;
    padding: .85rem;
    background: #fbfdff;
}

.print-kpi .label {
    color: #667085;
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 800;
}

.print-kpi .value {
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1.2;
}

.print-kpi .small-value {
    font-size: 1.05rem;
}

.print-table th {
    background: #f8fafc;
}

.page-break {
    page-break-before: always;
}

@media print {
    @page {
        size: A4;
        margin: 11mm 9mm 12mm 9mm;
    }

    html,
    body {
        background: #fff !important;
        color: #000 !important;
        font-size: 10.5pt;
    }

    .app-container,
    .container-fluid {
        max-width: none !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .navbar,
    .no-print,
    .btn,
    .alert-dismissible .btn-close {
        display: none !important;
    }

    .card {
        border: 1px solid #bbb !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        break-inside: avoid;
    }

    .card-header {
        border-bottom: 1px solid #bbb !important;
        padding: .35rem .5rem !important;
    }

    .card-body {
        padding: .5rem !important;
    }

    .table-responsive {
        overflow: visible !important;
    }

    .table,
    .print-table {
        width: 100% !important;
        border-collapse: collapse !important;
        font-size: 9pt;
    }

    .table th,
    .table td,
    .print-table th,
    .print-table td {
        border: 1px solid #999 !important;
        padding: .25rem .35rem !important;
        background: #fff !important;
        color: #000 !important;
    }

    thead {
        display: table-header-group;
    }

    tfoot {
        display: table-footer-group;
    }

    tr,
    img,
    .print-kpi,
    .report-note {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .print-report-header {
        display: flex !important;
        border-bottom: 2px solid #000 !important;
        margin-bottom: .65rem !important;
        padding-bottom: .55rem !important;
    }

    .print-report-header h1 {
        font-size: 16pt !important;
    }

    .print-kpi-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: .35rem !important;
        margin-bottom: .65rem !important;
    }

    .print-kpi {
        border: 1px solid #999 !important;
        border-radius: 0 !important;
        background: #fff !important;
        padding: .35rem !important;
    }

    .print-kpi .value {
        font-size: 12pt !important;
    }

    .amount-positive,
    .amount-negative,
    .debt-amount {
        color: #000 !important;
        font-weight: 800 !important;
    }

    a {
        color: #000 !important;
        text-decoration: none !important;
    }

    h1,
    h2,
    h3 {
        color: #000 !important;
        break-after: avoid;
    }

    h2 {
        font-size: 13pt !important;
        margin-top: .8rem !important;
    }
}

/* V3.6 attachment manager */
.attachment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}
.attachment-card {
    display: flex;
    gap: .9rem;
    border: 1px solid rgba(148, 163, 184, .35);
    border-radius: 1rem;
    padding: .9rem;
    background: rgba(255,255,255,.84);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
    min-width: 0;
}
.attachment-preview {
    width: 74px;
    height: 74px;
    flex: 0 0 74px;
    border-radius: .85rem;
    overflow: hidden;
    background: rgba(15, 23, 42, .055);
    display: flex;
    align-items: center;
    justify-content: center;
}
.attachment-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.attachment-icon {
    font-size: 2rem;
}
.attachment-info {
    min-width: 0;
    flex: 1 1 auto;
}
.attachment-panel .attachment-card {
    background: rgba(248, 250, 252, .9);
}
@media print {
    .attachment-grid {
        display: block;
    }
    .attachment-card {
        box-shadow: none !important;
        break-inside: avoid;
        margin-bottom: .5rem;
    }
    .attachment-preview {
        display: none;
    }
}

/* V3.9 quick transaction */
.quick-fav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: .75rem;
}
.quick-fav-tile {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .25rem .65rem;
    align-items: center;
    padding: .85rem;
    border: 1px solid rgba(148, 163, 184, .35);
    border-radius: 1rem;
    background: rgba(255,255,255,.9);
    color: inherit;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(15,23,42,.06);
}
.quick-fav-tile:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(15,23,42,.1);
}
.quick-fav-star {
    grid-row: span 2;
    width: 2.15rem;
    height: 2.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(245, 158, 11, .16);
    color: #b45309;
    font-weight: 800;
}
.quick-fav-name {
    font-weight: 800;
    min-width: 0;
}
.quick-fav-meta {
    font-size: .82rem;
    color: #64748b;
}
.quick-mode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: .75rem;
}
.quick-mode-option,
.quick-center-check {
    border: 1px solid rgba(148, 163, 184, .35);
    border-radius: .9rem;
    padding: .75rem;
    background: rgba(248,250,252,.86);
    min-height: 100%;
}
.quick-mode-option {
    display: flex;
    gap: .6rem;
    align-items: center;
    font-weight: 700;
}
.quick-center-check {
    display: flex;
    gap: .6rem;
}
@media (max-width: 767.98px) {
    .quick-sticky-actions {
        position: sticky;
        bottom: 0;
        z-index: 20;
        background: rgba(255,255,255,.96);
        backdrop-filter: blur(8px);
        border-top: 1px solid rgba(148,163,184,.35);
    }
    .quick-sticky-actions .btn {
        flex: 1 1 auto;
    }
}

/* V3.10 stabilizáló / admin oldalak */
.audit-pre {
    max-height: 240px;
    overflow: auto;
    background: var(--bs-light);
    border: 1px solid rgba(0,0,0,.08);
    border-radius: .75rem;
    padding: .75rem;
    white-space: pre-wrap;
    font-size: .8rem;
}
@media print {
    details summary { display: none; }
    .audit-pre { max-height: none; overflow: visible; border: 0; padding: 0; }
}


/* V4.2 kísérleti drag & drop gyorsrögzítő */
.dnd-source-card {
    position: sticky;
    top: 92px;
}

.dnd-item-list {
    display: grid;
    gap: .75rem;
    max-height: 72vh;
    overflow: auto;
    padding-right: .25rem;
}

.dnd-item-card {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    align-items: center;
    border: 1px solid #dbe5f3;
    border-radius: 1rem;
    padding: .85rem;
    background: #fff;
    cursor: grab;
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.dnd-item-card:active {
    cursor: grabbing;
}

.dnd-item-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(22, 34, 51, .08);
    border-color: #9fc1ef;
}

.dnd-item-card.is-favorite {
    background: linear-gradient(135deg, #fffaf0, #ffffff);
    border-color: #f4cf76;
}

.dnd-item-title {
    font-weight: 800;
}

.dnd-item-meta,
.dnd-item-category,
.dnd-basket-code {
    color: var(--app-text-muted);
    font-size: .86rem;
}

.dnd-basket-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 1rem;
}

.dnd-basket {
    border: 2px dashed #cbd8ea;
    border-radius: 1.1rem;
    background: #fbfdff;
    min-height: 190px;
    padding: .9rem;
    transition: background .12s ease, border-color .12s ease, transform .12s ease;
}

.dnd-basket.is-over {
    background: #eef7ff;
    border-color: #2d6cdf;
    transform: scale(1.01);
}

.dnd-basket-header {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    align-items: flex-start;
    padding-bottom: .7rem;
    border-bottom: 1px solid #e4ebf6;
    margin-bottom: .7rem;
}

.dnd-basket-name {
    font-weight: 800;
}

.dnd-basket-sum,
.dnd-total-box strong {
    font-weight: 900;
    color: #174a7c;
}

.dnd-total-box {
    display: grid;
    gap: .15rem;
    padding: .65rem .9rem;
    border-radius: .9rem;
    background: #edf4ff;
    border: 1px solid #d5e7ff;
    min-width: 160px;
    text-align: right;
}

.dnd-total-box span {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--app-text-muted);
}

.dnd-empty {
    display: grid;
    place-items: center;
    min-height: 94px;
    color: #8a97aa;
    font-weight: 700;
    border-radius: .9rem;
    background: rgba(255,255,255,.7);
}

.dnd-basket-line {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    align-items: flex-start;
    border: 1px solid #e2eaf5;
    border-radius: .85rem;
    padding: .7rem;
    background: #fff;
    margin-bottom: .55rem;
}

@media (max-width: 768px) {
    .dnd-source-card { position: static; }
    .dnd-item-card { align-items: flex-start; flex-direction: column; }
    .dnd-add-btn { width: 100%; }
    .dnd-total-box { text-align: left; width: 100%; }
}

/* V4.3 drag & drop gyorsrögzítő finomítások */
.dnd-basket.has-items {
    border-style: solid;
    background: linear-gradient(180deg, #fbfdff, #f6faff);
}
.dnd-basket-line[draggable="true"] {
    cursor: grab;
}
.dnd-basket-line[draggable="true"]:active {
    cursor: grabbing;
}
.dnd-basket-line-main {
    min-width: 0;
}
.dnd-basket-line-actions .btn-group {
    margin-top: .35rem;
}
.dnd-review-kpi {
    border: 1px solid #dbe5f3;
    border-radius: 1rem;
    background: #f8fbff;
    padding: .85rem 1rem;
    height: 100%;
}
.dnd-review-kpi span {
    display: block;
    color: var(--app-text-muted);
    font-size: .82rem;
    margin-bottom: .25rem;
}
.dnd-review-kpi strong {
    font-size: 1.05rem;
}
@media (max-width: 768px) {
    .dnd-basket-line {
        flex-direction: column;
    }
    .dnd-basket-line-actions {
        width: 100%;
        text-align: left !important;
    }
}

/* V4.4 kosársablonok */
.dnd-template-bar {
    border-color: #d8e6fa;
    background: linear-gradient(135deg, #f8fbff, #ffffff);
}
.dnd-template-list .list-group-item {
    border-radius: .9rem;
    margin-bottom: .5rem;
    border: 1px solid #e1e8f2;
}
.dnd-template-list .list-group-item.active {
    border-color: #2563eb;
}

/* V4.5 navigációs rendezés */
.app-navbar {
    --bs-navbar-padding-y: .45rem;
}

.app-navbar .navbar-brand {
    display: inline-flex;
    align-items: baseline;
    gap: .45rem;
    letter-spacing: -.02em;
    white-space: nowrap;
}

.app-brand-main {
    font-size: 1.04rem;
}

.app-brand-version {
    display: inline-flex;
    align-items: center;
    padding: .12rem .38rem;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 800;
    background: rgba(255,255,255,.14);
    color: rgba(255,255,255,.86);
    letter-spacing: .02em;
}

.app-main-nav {
    gap: .08rem;
}

.app-main-nav .nav-link {
    border-radius: .75rem;
    padding: .45rem .72rem;
    font-weight: 650;
}

.app-main-nav .nav-link:hover,
.app-main-nav .nav-link:focus {
    background: rgba(255,255,255,.10);
}

.app-main-nav .nav-link.active,
.app-main-nav .show > .nav-link {
    background: rgba(255,255,255,.18);
    color: #fff;
}

.app-dropdown-menu {
    min-width: 245px;
    border: 1px solid rgba(31,58,95,.12);
    border-radius: 1rem;
    box-shadow: 0 18px 44px rgba(22,34,51,.16);
    padding: .55rem;
}

.app-dropdown-menu .dropdown-header {
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #667085;
    padding: .45rem .65rem .25rem;
}

.app-dropdown-menu .dropdown-item {
    border-radius: .75rem;
    padding: .58rem .7rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    font-weight: 650;
}

.app-dropdown-menu .dropdown-item small {
    color: #7b8798;
    font-size: .72rem;
    white-space: nowrap;
}

.app-dropdown-menu .dropdown-item.active,
.app-dropdown-menu .dropdown-item:active {
    background: #1f5d99;
}

.app-dropdown-menu .dropdown-item.active small,
.app-dropdown-menu .dropdown-item:active small {
    color: rgba(255,255,255,.82);
}

.app-user-nav {
    align-items: center;
}

.app-user-name {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-quickbar {
    position: sticky;
    top: 56px;
    z-index: 1010;
    background: rgba(255,255,255,.84);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(31,58,95,.10);
    box-shadow: 0 6px 18px rgba(22,34,51,.05);
}

.app-quickbar-inner {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-height: 42px;
    max-width: 1480px;
}

.app-quickbar-label {
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #667085;
    white-space: nowrap;
}

.app-quickbar-links {
    display: flex;
    align-items: center;
    gap: .45rem;
    overflow-x: auto;
    scrollbar-width: thin;
    padding: .3rem 0;
}

.app-quickbar-link {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    border: 1px solid #dbe6f5;
    color: #244d7a;
    text-decoration: none;
    background: #fff;
    border-radius: 999px;
    padding: .28rem .72rem;
    font-size: .86rem;
    font-weight: 750;
}

.app-quickbar-link:hover,
.app-quickbar-link.active {
    color: #fff;
    background: #1f5d99;
    border-color: #1f5d99;
}

.app-breadcrumb .breadcrumb {
    --bs-breadcrumb-divider-color: #98a2b3;
    font-size: .88rem;
}

.app-breadcrumb a {
    color: #2d5d8f;
    text-decoration: none;
    font-weight: 700;
}

.app-page-title h1 {
    letter-spacing: -.02em;
}

@media (max-width: 1199.98px) {
    .app-main-nav {
        padding-top: .75rem;
        gap: .2rem;
    }
    .app-main-nav .nav-link {
        padding: .62rem .75rem;
    }
    .app-dropdown-menu {
        border-radius: .8rem;
        box-shadow: none;
        border: 0;
        background: rgba(255,255,255,.08);
        margin: .15rem 0 .45rem;
    }
    .app-dropdown-menu .dropdown-header,
    .app-dropdown-menu .dropdown-item,
    .app-dropdown-menu .dropdown-item small {
        color: rgba(255,255,255,.86);
    }
    .app-dropdown-menu .dropdown-item:hover {
        background: rgba(255,255,255,.10);
    }
    .app-user-nav {
        align-items: flex-start;
        border-top: 1px solid rgba(255,255,255,.12);
        margin-top: .75rem;
        padding-top: .75rem;
    }
    .app-quickbar {
        top: 55px;
    }
}

@media (max-width: 768px) {
    .app-brand-version {
        display: none;
    }
    .app-quickbar-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: .15rem;
        padding-top: .45rem;
        padding-bottom: .45rem;
    }
    .app-quickbar-links {
        width: 100%;
    }
}

/* V4.8 - mobilbarát blokkfotós gyorsrögzítés */
.receipt-quick-card .form-control-lg,
.receipt-quick-card .form-select-lg {
    min-height: 3.05rem;
}

.receipt-preset-row {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.receipt-participant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: .55rem;
}

.receipt-participant-tile {
    display: flex;
    align-items: center;
    gap: .65rem;
    border: 1px solid #dbe6f5;
    border-radius: 1rem;
    padding: .75rem .85rem;
    background: #fff;
    cursor: pointer;
    min-height: 64px;
}

.receipt-participant-tile:hover {
    border-color: #8bb7e5;
    background: #f8fbff;
}

.receipt-participant-tile input {
    width: 1.15rem;
    height: 1.15rem;
}

.receipt-participant-tile strong,
.receipt-participant-tile small {
    display: block;
    line-height: 1.15;
}

.receipt-participant-tile small {
    color: #667085;
    margin-top: .18rem;
}

.receipt-split-preview {
    border-radius: 999px;
    background: #eff6ff;
    color: #1f4e79;
    display: inline-flex;
    padding: .35rem .75rem;
    font-weight: 800;
    font-size: .9rem;
}

@media (max-width: 576px) {
    .receipt-participant-grid {
        grid-template-columns: 1fr;
    }
    .receipt-quick-card .card-body {
        padding: 1rem;
    }
}

/* V4.8.1 - mobil használhatóság + gyors tartozáskiegyenlítés */
.debt-mobile-list {
    display: none;
}

.debt-mobile-card {
    border: 1px solid #dbe6f5;
    border-radius: 1rem;
    padding: 1rem;
    background: #fff;
    box-shadow: 0 8px 20px rgba(22,34,51,.06);
    margin-bottom: .8rem;
}

.debt-mobile-row {
    display: flex;
    justify-content: space-between;
    gap: .8rem;
    font-size: .92rem;
    margin-bottom: .35rem;
}

.debt-mobile-row span {
    color: #667085;
    font-weight: 700;
}

.debt-mobile-row strong {
    text-align: right;
}

.debt-mobile-amount {
    font-size: 1.45rem;
    font-weight: 900;
    color: #b42318;
    text-align: right;
    margin-top: .35rem;
}

.debt-partial-details summary {
    cursor: pointer;
    font-weight: 800;
    color: #1f5d99;
    padding: .35rem 0;
}

.receipt-participant-actions {
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    body {
        padding-bottom: 88px;
    }

    .app-quickbar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        z-index: 1065;
        border-bottom: 0;
        border-top: 1px solid rgba(31,58,95,.12);
        box-shadow: 0 -8px 24px rgba(22,34,51,.14);
        background: rgba(255,255,255,.96);
    }

    .app-quickbar-inner {
        min-height: 72px;
        padding: .45rem .55rem .6rem;
        align-items: stretch;
        gap: 0;
    }

    .app-quickbar-label {
        display: none;
    }

    .app-quickbar-links {
        width: 100%;
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(82px, 1fr);
        gap: .4rem;
        overflow-x: auto;
        padding: 0;
    }

    .app-quickbar-link {
        justify-content: center;
        text-align: center;
        border-radius: .85rem;
        padding: .5rem .35rem;
        min-height: 52px;
        font-size: .78rem;
        line-height: 1.1;
        white-space: normal;
    }

    .debt-table-wrap {
        display: none;
    }

    .debt-mobile-list {
        display: block;
    }

    .receipt-preset-row .btn,
    .receipt-participant-actions .btn {
        flex: 1 1 auto;
        min-height: 2.35rem;
    }

    .receipt-quick-card .btn-lg {
        width: 100%;
    }
}

/* v4.8.3 - elszámolási körök */
.settlement-member-box {
    max-height: 320px;
    overflow: auto;
    border: 1px solid rgba(148, 163, 184, .35);
    border-radius: 14px;
    padding: .5rem;
    background: rgba(248, 250, 252, .65);
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}
.settlement-member-check {
    position: relative;
    display: block;
    padding: .45rem .5rem .45rem 2rem;
    border-radius: 10px;
    margin: 0;
    box-sizing: border-box;
    max-width: 100%;
}
.settlement-member-check .form-check-input {
    position: absolute;
    left: .5rem;
    top: .72rem;
    margin: 0;
    float: none;
}
.settlement-member-check .form-check-label {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.settlement-member-check:hover {
    background: rgba(37, 99, 235, .08);
}
@media print {
    .settlement-member-box { max-height: none; overflow: visible; border: 0; padding: 0; }
}


/* v4.8.4 - súgó / családi dashboard */
.family-dashboard-card .quick-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: .5rem;
}
.family-dashboard-card .family-pill {
    border: 1px solid rgba(148, 163, 184, .35);
    border-radius: 14px;
    padding: .75rem;
    background: rgba(248, 250, 252, .7);
}
.help-section-anchor {
    scroll-margin-top: 90px;
}


/* v4.8.8 - riport és lista UX finomítás */
.cm-filter-card {
    border: 1px solid rgba(148, 163, 184, .28) !important;
    background: rgba(255,255,255,.88);
}
.cm-filter-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}
.cm-filter-actions .btn {
    min-width: 120px;
}
.cm-page-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    align-items: center;
}
.cm-empty-state {
    text-align: center;
    padding: 2.25rem 1rem;
    color: var(--app-text-muted);
}
.cm-empty-state-title {
    font-weight: 800;
    color: #344054;
    margin-bottom: .25rem;
}
.cm-empty-state-text {
    max-width: 560px;
    margin: 0 auto;
}
.cm-report-table-wrap {
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 1rem;
    overflow: hidden;
}
.cm-table-note {
    color: var(--app-text-muted);
    font-size: .86rem;
}
.cm-sticky-filter-summary {
    display: inline-flex;
    gap: .35rem;
    align-items: center;
    flex-wrap: wrap;
}
.cm-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .25rem .55rem;
    border-radius: 999px;
    border: 1px solid #d9e3f3;
    background: #f8fafc;
    color: #475467;
    font-size: .78rem;
    font-weight: 650;
}
@media (max-width: 768px) {
    .cm-filter-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
    .cm-filter-actions .btn {
        width: 100%;
        min-width: 0;
    }
    .table-responsive {
        border-radius: .9rem;
    }
    .table thead th,
    .table tbody td {
        white-space: nowrap;
    }
    .table tbody td:nth-child(3),
    .table tbody td:nth-child(4) {
        white-space: normal;
        min-width: 180px;
    }
}
@media print {
    .cm-filter-card,
    .cm-page-actions,
    .cm-filter-actions {
        display: none !important;
    }
    .cm-report-table-wrap {
        border: 0;
        border-radius: 0;
    }
}


/* v4.9.1 - Profilképek / avatarok */
.cm-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,.8);
    box-shadow: 0 6px 16px rgba(22,34,51,.14);
    vertical-align: middle;
}
.cm-avatar-fallback {
    background: linear-gradient(135deg, #1f3a5f, #2d5d8f);
    color: #fff;
    font-weight: 900;
    line-height: 1;
}
.app-user-avatar {
    margin-right: .45rem;
}
.user-avatar.cm-avatar,
.profile-avatar.cm-avatar {
    border-radius: 1rem;
}


/* V5.0.3 - Gyorselérés: valódi 2 soros elrendezés
   A layout.php két külön .app-quickbar-row sort generál, ezért nem a böngésző grid automatikájára bízzuk. */
.app-quickbar-inner {
    display: flex !important;
    align-items: flex-start !important;
    gap: .65rem !important;
    overflow: hidden !important;
    min-height: 74px !important;
    padding-top: .38rem !important;
    padding-bottom: .38rem !important;
}

.app-quickbar-label {
    flex: 0 0 auto !important;
    line-height: 32px !important;
    margin-top: 2px !important;
    white-space: nowrap !important;
}

.app-quickbar-links {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: 100% !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: .38rem !important;

    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 0 0 4px 0 !important;
    scrollbar-width: thin;
}

.app-quickbar-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: .45rem !important;
    width: max-content !important;
    min-width: 100% !important;
}

.app-quickbar-link {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 32px !important;
    white-space: nowrap !important;
}

/* Mobil alsó gyorssáv: továbbra is fix, de valódi 2 sorral. */
@media (max-width: 768px) {
    body {
        padding-bottom: 126px !important;
    }

    .app-quickbar {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        top: auto !important;
        z-index: 1065 !important;
        border-bottom: 0 !important;
        border-top: 1px solid rgba(31,58,95,.12) !important;
        box-shadow: 0 -8px 24px rgba(22,34,51,.14) !important;
        background: rgba(255,255,255,.96) !important;
    }

    .app-quickbar-inner {
        min-height: 104px !important;
        padding: .48rem .55rem .64rem !important;
        align-items: stretch !important;
        gap: 0 !important;
    }

    .app-quickbar-label {
        display: none !important;
    }

    .app-quickbar-links {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        gap: .42rem !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        padding: 0 !important;
    }

    .app-quickbar-row {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: .4rem !important;
        width: max-content !important;
        min-width: 100% !important;
    }

    .app-quickbar-link {
        justify-content: center !important;
        text-align: center !important;
        border-radius: .85rem !important;
        padding: .46rem .55rem !important;
        min-height: 42px !important;
        min-width: 82px !important;
        font-size: .78rem !important;
        line-height: 1.1 !important;
        white-space: normal !important;
    }
}

