:root {
    --dc-bottom-nav-height: 64px;
}

body {
    background: #f3f5f9;
    -webkit-tap-highlight-color: transparent;
}

/* Space for the fixed bottom navigation on mobile */
@media (max-width: 767.98px) {
    body.has-bottom-nav {
        padding-bottom: calc(var(--dc-bottom-nav-height) + env(safe-area-inset-bottom));
    }
}

/* Inputs: 16px font stops iOS zooming into fields */
.form-control, .form-select, .input-group-text {
    font-size: 1rem;
}

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}

/* ---------- Radio button groups (big touch targets) ---------- */
.choice-group {
    display: flex;
    gap: .5rem;
}

.choice-group .btn {
    flex: 1 1 0;
    padding: .6rem .5rem;
    font-weight: 500;
    white-space: nowrap;
}

.choice-group.is-invalid .btn {
    border-color: var(--bs-form-invalid-border-color);
}

/* ---------- Bottom navigation (mobile) ---------- */
.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    display: flex;
    height: calc(var(--dc-bottom-nav-height) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: #fff;
    border-top: 1px solid rgba(0, 0, 0, .08);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, .05);
}

.bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #6c757d;
    text-decoration: none;
    font-size: .75rem;
}

.bottom-nav a i {
    font-size: 1.35rem;
    line-height: 1;
}

.bottom-nav a.active {
    color: var(--bs-primary);
    font-weight: 600;
}

.bottom-nav a.bottom-nav-primary i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-top: -18px;
    border-radius: 50%;
    background: var(--bs-primary);
    color: #fff;
    box-shadow: 0 4px 10px rgba(13, 110, 253, .35);
}

/* ---------- Login ---------- */
.login-wrap {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 400px;
}

.login-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--bs-primary);
    color: #fff;
    font-size: 2rem;
}

/* ---------- Dashboard tiles ---------- */
.stat-tile {
    background: #fff;
    border-radius: .5rem;
    padding: .75rem 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
    height: 100%;
}

.stat-tile span {
    display: block;
    font-size: .8rem;
    color: #6c757d;
}

.stat-tile strong {
    display: block;
    font-size: 1.6rem;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.stat-tile-accent {
    background: var(--bs-primary);
    color: #fff;
}

.stat-tile-accent span {
    color: rgba(255, 255, 255, .8);
}

/* ---------- Entry cards (mobile list) ---------- */
.measure-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .25rem;
    background: #f8f9fa;
    border-radius: .375rem;
    padding: .5rem;
    font-size: .85rem;
    font-weight: 600;
}

.measure-grid span {
    display: block;
    font-size: .7rem;
    font-weight: 400;
    color: #6c757d;
}

.division-box .form-check {
    padding-top: .15rem;
    padding-bottom: .15rem;
}
