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

/* Bottom tab bar (mobile) */
.tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    background: #fff;
    border-top: 1px solid #dee2e6;
    z-index: 1030;
    padding-bottom: env(safe-area-inset-bottom);
}

.tabbar a,
.tabbar button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: .45rem 0 .35rem;
    font-size: .7rem;
    color: #6c757d;
    text-decoration: none;
    background: none;
    border: 0;
    width: 100%;
}

.tabbar a span,
.tabbar button span {
    font-size: 1.15rem;
    line-height: 1;
}

.tabbar a.active {
    color: #0d6efd;
    font-weight: 600;
}

.tabbar form {
    flex: 1;
    display: flex;
}

@media (max-width: 767.98px) {
    main.app-container {
        padding-bottom: 5rem !important;
    }
}

/* Adaptive table: normal table on md+, stacked cards on phones */
@media (max-width: 767.98px) {
    .table-adaptive thead {
        display: none;
    }

    .table-adaptive,
    .table-adaptive tbody,
    .table-adaptive tr,
    .table-adaptive td {
        display: block;
        width: 100%;
    }

    .table-adaptive tr {
        border: 1px solid #dee2e6;
        border-radius: .5rem;
        margin-bottom: .75rem;
        padding: .5rem .75rem;
        background: #fff;
    }

    .table-adaptive td {
        border: 0 !important;
        padding: .2rem 0;
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: .75rem;
        text-align: right;
        background: none !important;
        box-shadow: none !important;
    }

    .table-adaptive td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #6c757d;
        text-align: left;
        flex-shrink: 0;
    }

    .table-adaptive td.td-actions {
        justify-content: flex-end;
    }

    .table-adaptive td.td-actions::before {
        content: none;
    }
}

.metric-card .value {
    font-size: 1.4rem;
    font-weight: 700;
}

.metric-card .prev {
    font-size: .78rem;
    color: #6c757d;
}

code.gift-code {
    user-select: all;
    word-break: break-all;
}

.activity-item {
    display: flex;
    gap: .6rem;
    align-items: baseline;
}

.activity-item .when {
    color: #6c757d;
    font-size: .8rem;
    white-space: nowrap;
    margin-left: auto;
}
