:root {
    --app-bg: #f4f6f8;
}
body {
    background: var(--app-bg);
    min-height: 100vh;
}
.card {
    border: 0;
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.06);
}
.stat-card .display-6 {
    font-weight: 700;
}
.table > :not(caption) > * > * {
    vertical-align: middle;
}
.photo-preview,
.coin-photo {
    width: 100%;
    max-height: 420px;
    object-fit: contain;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: .75rem;
}
.photo-placeholder {
    min-height: 240px;
    display: grid;
    place-items: center;
    border: 2px dashed #ced4da;
    border-radius: .75rem;
    color: #6c757d;
    background: #fff;
}
.action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.form-label.required::after {
    content: " *";
    color: #dc3545;
}
.coin-card {
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease;
}
.coin-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.10);
}
.coin-card-image {
    width: 100%;
    height: 220px;
    object-fit: contain;
    background: #fff;
    border-bottom: 1px solid #eef0f2;
}
.coin-card-placeholder {
    height: 220px;
    display: grid;
    place-items: center;
    font-size: 3rem;
    color: #adb5bd;
    background: linear-gradient(135deg, #fff, #eef1f4);
    border-bottom: 1px solid #eef0f2;
}
.filter-card .form-label {
    margin-bottom: .25rem;
    font-size: .85rem;
    color: #6c757d;
}
.progress-thin {
    height: .65rem;
}
.map-container {
    height: min(72vh, 760px);
    min-height: 480px;
    border-radius: .75rem;
    overflow: hidden;
}
.map-marker-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 1px 5px rgba(0,0,0,.45);
}
.map-marker-owned { background: #198754; }
.map-marker-known { background: #ffc107; }
.map-marker-visited { background: #dc3545; }
.map-marker-empty { background: #6c757d; }
.map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: .9rem;
}
.map-legend-item {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}
.map-legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
}
.leaflet-popup-content {
    min-width: 230px;
}
.popup-coin + .popup-coin {
    border-top: 1px solid #e9ecef;
    margin-top: .5rem;
    padding-top: .5rem;
}
.text-bg-warning,
.text-bg-info,
.text-bg-light {
    color: #212529 !important;
}
@media (max-width: 767.98px) {
    .table-responsive .btn { margin-bottom: .25rem; }
    .navbar .d-flex { align-items: stretch !important; flex-direction: column; gap: .5rem !important; }
    .map-container { min-height: 430px; height: 65vh; }
    .coin-card-image, .coin-card-placeholder { height: 190px; }
}
.nearby-map {
    min-height: 560px;
}
#nearbyMap .map-marker-dot {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    font-size: .72rem;
    font-weight: 700;
    color: #212529;
}
#nearbyMap .map-marker-visited {
    color: #fff;
}
.nearby-list {
    max-height: min(72vh, 760px);
    min-height: 560px;
    overflow-y: auto;
}
.nearby-list-item {
    display: grid;
    grid-template-columns: 1.25rem 2rem minmax(0, 1fr);
    gap: .65rem;
    align-items: start;
    padding: .85rem 1rem;
    border-bottom: 1px solid #edf0f2;
    cursor: pointer;
    background: #fff;
}
.nearby-list-item:hover {
    background: #f8f9fa;
}
.nearby-list-item:has(.nearby-check:checked) {
    background: #eef8f2;
}
.nearby-rank {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #e9ecef;
    font-weight: 700;
    font-size: .8rem;
}
.nearby-list-content {
    min-width: 0;
}
.trip-attraction-search {
    width: min(100%, 260px);
}
.trip-attraction-list {
    max-height: 650px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: .75rem;
}
.trip-attraction-row {
    display: flex;
    gap: .75rem;
    align-items: center;
    padding: .75rem 1rem;
    border-bottom: 1px solid #edf0f2;
}
.trip-attraction-row:last-child {
    border-bottom: 0;
}
.trip-attraction-row:has(.trip-attraction-check:checked) {
    background: #eef8f2;
}
.trip-order-field {
    width: 4.5rem;
    flex: 0 0 4.5rem;
}
.trip-card {
    transition: transform .15s ease, box-shadow .15s ease;
}
.trip-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.1);
}
.trip-map {
    min-height: 500px;
}
.trip-number-marker {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #ffc107;
    color: #212529;
    border: 3px solid #fff;
    box-shadow: 0 1px 5px rgba(0,0,0,.45);
    font-size: .8rem;
    font-weight: 800;
}
.trip-number-marker-visited {
    background: #198754;
    color: #fff;
}
.trip-coin-names {
    max-width: 280px;
}
.btn-group form {
    display: inline-flex;
}
.btn-group form:not(:first-child) .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin-left: -1px;
}
.btn-group form:not(:last-child) .btn {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
@media (max-width: 1199.98px) {
    .nearby-list {
        min-height: 360px;
        max-height: 520px;
    }
    .nearby-map {
        min-height: 480px;
    }
}
@media (max-width: 767.98px) {
    .trip-attraction-search {
        width: 100%;
    }
    .trip-attraction-row {
        padding: .75rem;
    }
    .trip-map,
    .nearby-map {
        min-height: 420px;
    }
}


.machine-card {
    overflow: hidden;
}
.machine-card-image,
.machine-card-placeholder {
    width: 100%;
    height: 210px;
}
.machine-card-image {
    object-fit: cover;
    background: #fff;
}
.machine-card-placeholder {
    display: grid;
    place-items: center;
    font-size: 3rem;
    color: #adb5bd;
    background: linear-gradient(135deg, #fff, #eef1f4);
}
.field-machine-thumb,
.field-coin-thumb {
    width: 76px;
    height: 76px;
    object-fit: cover;
    border-radius: .75rem;
    flex: 0 0 76px;
}
.field-machine-placeholder {
    display: grid;
    place-items: center;
    background: #eef1f4;
    color: #6c757d;
    font-size: 1.7rem;
}
.min-width-0 {
    min-width: 0;
}
.field-action-button {
    min-height: 3.25rem;
}
@media (max-width: 575.98px) {
    .field-machine-thumb,
    .field-coin-thumb {
        width: 64px;
        height: 64px;
        flex-basis: 64px;
    }
}

/* Felhasználói menü */
.user-menu-toggle {
    border: 1px solid rgba(255,255,255,.16);
    padding: .38rem .6rem;
    min-width: 190px;
    justify-content: flex-start;
}
.user-menu-toggle:hover,
.user-menu-toggle:focus,
.user-menu-toggle.show {
    border-color: rgba(255,255,255,.4);
    background: rgba(255,255,255,.08);
}
.user-avatar {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    flex: 0 0 2.25rem;
    background: #f8f9fa;
    color: #212529;
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .02em;
}
.user-menu-label {
    min-width: 0;
    max-width: 165px;
}
.user-dropdown {
    min-width: 285px;
}
.permission-group-card .form-check {
    padding-top: .35rem;
    padding-bottom: .35rem;
}
.user-status-dot {
    width: .65rem;
    height: .65rem;
    display: inline-block;
    border-radius: 50%;
    margin-right: .35rem;
}
.user-status-active { background: #198754; }
.user-status-inactive { background: #6c757d; }
.audit-list {
    max-height: 420px;
    overflow-y: auto;
}
.audit-item + .audit-item {
    border-top: 1px solid #edf0f2;
}
@media (max-width: 1199.98px) {
    .user-menu {
        margin-top: .75rem;
        margin-bottom: .25rem;
    }
    .user-menu-toggle {
        width: 100%;
    }
    .user-dropdown {
        width: 100%;
    }
}
