/* LAD mobile app shell — admin & user modules */
:root {
    --lad-mobile-header-h: 3.25rem;
    --lad-bottom-nav-h: 4.25rem;
    --lad-app-bg: #edf2f8;
    --lad-user-accent: #be0000;
    --lad-admin-accent: #be0000;
}

@media (max-width: 991.98px) {
    body.lad-app-auth {
        background: var(--lad-app-bg);
        -webkit-tap-highlight-color: transparent;
    }

    body.lad-app-auth main.lad-main {
        max-width: 100%;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        padding-top: 0.65rem;
        padding-bottom: calc(var(--lad-bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 1rem);
    }

    body.lad-app-auth .navbar.lad-desktop-nav {
        display: none !important;
    }

    body.lad-app-auth .lad-mobile-header {
        display: flex;
    }

    body.lad-app-auth .lad-bottom-nav {
        display: flex;
    }

    body.lad-app-auth .alert {
        border-radius: 0.75rem;
        margin-bottom: 0.65rem;
    }

    body.lad-app-auth .card {
        border-radius: 0.75rem;
        box-shadow: var(--lad-shadow, 0 1px 2px rgba(15, 23, 42, 0.04));
        background: #fff;
        border-color: #dfe7f1;
    }

    body.lad-app-auth .card:hover {
        transform: none;
    }

    body.lad-app-auth .form-control,
    body.lad-app-auth .form-select {
        font-size: 16px;
        min-height: 44px;
        border-radius: 0.65rem;
        background: #fff;
        border-color: #dfe7f1;
    }

    body.lad-app-auth .btn:not(.btn-sm):not(.lad-bottom-nav-link):not(.btn-close) {
        min-height: 44px;
        border-radius: 0.65rem;
    }

    body.lad-app-auth .btn-sm {
        min-height: 38px;
    }

    body.lad-app-auth .table-responsive {
        -webkit-overflow-scrolling: touch;
        border-radius: 0.75rem;
    }

    body.lad-app-auth .table > :not(caption) > * > * {
        padding: 0.65rem 0.55rem;
        font-size: 0.88rem;
    }

    body.lad-app-auth h1.h3,
    body.lad-app-auth .h3 {
        font-size: 1.35rem;
    }

    body.lad-app-auth .d-flex.flex-wrap.justify-content-between.align-items-center.mb-4 {
        flex-direction: column;
        align-items: stretch !important;
    }

    body.lad-app-auth .d-flex.flex-wrap.justify-content-between.align-items-center.mb-4 > .d-flex.gap-2 {
        flex-wrap: wrap;
    }

    body.lad-app-auth .d-flex.flex-wrap.justify-content-between.align-items-center.mb-4 > .d-flex.gap-2 .btn {
        flex: 1 1 calc(50% - 0.35rem);
    }

    /* Entry add page uses its own dock */
    body.entry-app-page .lad-bottom-nav {
        display: none !important;
    }

    body.entry-app-page main.lad-main {
        padding-left: 0;
        padding-right: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
}

@media (min-width: 992px) {
    body.lad-app-auth .lad-mobile-header,
    body.lad-app-auth .lad-bottom-nav,
    body.lad-app-auth .lad-mobile-more {
        display: none !important;
    }
}

.lad-mobile-header {
    display: none;
    position: sticky;
    top: 0;
    z-index: 1030;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: var(--lad-mobile-header-h);
    padding: 0.5rem 0.85rem;
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

body.lad-app-auth .lad-mobile-header {
    background: #fff;
    color: #111827;
    border-bottom: 1px solid var(--lad-border, #dfe7f1);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

body.lad-app-auth .lad-mobile-header-btn,
body.lad-app-auth .lad-mobile-header-brand {
    background: #f1f5f9;
    color: #374151;
}

.lad-mobile-header-title {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.lad-mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.lad-mobile-header-btn {
    border: none;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

.lad-mobile-header-btn:active {
    transform: scale(0.96);
}

.lad-bottom-nav {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    min-height: var(--lad-bottom-nav-h);
    padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
    background: rgba(252, 253, 255, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid #dfe7f1;
    box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.08);
    align-items: stretch;
    justify-content: space-around;
    gap: 0 0.15rem;
}

.lad-bottom-nav-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.25rem 0.15rem;
    border: none;
    background: transparent;
    color: #64748b;
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.1;
    border-radius: 0.55rem;
    touch-action: manipulation;
    min-width: 0;
}

.lad-bottom-nav-link i {
    font-size: 1.25rem;
    line-height: 1;
}

.lad-bottom-nav-link.active {
    color: var(--lad-user-accent);
    background: #fef2f2;
}

.lad-bottom-nav-link.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--lad-user-accent);
}

.lad-bottom-nav-link {
    position: relative;
}

.lad-bottom-nav-badge {
    position: absolute;
    top: 0.1rem;
    right: calc(50% - 1.35rem);
    min-width: 1rem;
    height: 1rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: var(--lad-user-accent);
    color: #fff;
    font-size: 0.55rem;
    font-style: normal;
    font-weight: 700;
    line-height: 1rem;
    text-align: center;
}

.lad-bottom-nav-link--fab {
    color: #fff !important;
    background: var(--lad-primary, #be0000) !important;
    max-width: 4.25rem;
    margin-top: -0.75rem;
    min-height: 3.1rem;
    box-shadow: 0 4px 12px rgba(190, 0, 0, 0.25);
}

.lad-bottom-nav-link--fab i {
    font-size: 1.45rem;
}

.lad-mobile-more .offcanvas-body .list-group-item {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 500;
}

/* User dashboard tiles (shared) */
.lad-dash-wrap {
    max-width: 520px;
    margin: 0 auto;
    padding-bottom: 0.5rem;
}

.lad-dash-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 55%, #be0000 120%);
    color: #fff;
    border-radius: 1rem;
    padding: 1rem;
    margin-bottom: 0.85rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.22);
}

.lad-dash-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.lad-dash-hero-date {
    text-align: right;
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.15;
    opacity: 0.95;
}

.lad-dash-hero-date span {
    font-size: 0.72rem;
    font-weight: 600;
    opacity: 0.8;
}

.lad-dash-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.45rem;
    color: inherit;
}

.lad-dash-stat {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.65rem;
    padding: 0.55rem 0.35rem;
    text-align: center;
}

.lad-dash-stat-val {
    font-size: 1.1rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.lad-dash-stat-lbl {
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.85;
    margin-top: 0.15rem;
}

.lad-dash-cta {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: linear-gradient(90deg, #fef2f2 0%, #fff 100%);
    border: 1px solid #fecaca;
    border-radius: 0.75rem;
    padding: 0.7rem 0.85rem;
    margin-bottom: 0.85rem;
    text-decoration: none;
    color: #991b1b;
    box-shadow: 0 4px 12px rgba(190, 0, 0, 0.08);
    touch-action: manipulation;
}

.lad-dash-cta:active {
    transform: scale(0.99);
}

.lad-dash-cta-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    background: #be0000;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lad-dash-cta-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    font-size: 0.78rem;
    color: #6b7280;
}

.lad-dash-cta-body strong {
    color: #991b1b;
    font-size: 0.88rem;
}

.lad-nav-section-badge {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 0.62rem;
    font-weight: 700;
    vertical-align: middle;
}

.lad-draw-card {
    color: #fff;
    font-weight: 700;
    text-align: center;
    border-radius: 0.75rem;
    padding: 0.75rem 0.45rem;
    font-size: 0.88rem;
    box-shadow: 0 6px 14px rgba(16, 24, 40, 0.15);
    min-height: 4.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    line-height: 1.2;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.lad-draw-link:active .lad-draw-card {
    transform: scale(0.97);
}

.lad-draw-card--open {
    box-shadow: 0 6px 18px rgba(190, 0, 0, 0.25);
}

.lad-draw-time {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.lad-draw-name {
    font-size: 0.68rem;
    font-weight: 600;
    opacity: 0.92;
    line-height: 1.15;
}

.lad-draw-badge--open {
    background: rgba(255, 255, 255, 0.28);
    animation: lad-pulse 2s ease-in-out infinite;
}

@keyframes lad-pulse {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 1; transform: scale(1.04); }
}

.lad-draw-disabled .lad-draw-badge {
    background: rgba(0, 0, 0, 0.12);
}

.lad-draw-badge {
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.9;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
}

.lad-draw-blue { background: #0f4d9a; }
.lad-draw-red { background: #d6000b; }
.lad-draw-disabled {
    background: #9ca3af;
    color: #f3f4f6;
    cursor: not-allowed;
    box-shadow: none;
}

.lad-app-tile {
    background: linear-gradient(180deg, #d20010 0%, #1f61ad 100%);
    color: #fff;
    min-height: 7.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    text-decoration: none;
    padding: 0.65rem;
    touch-action: manipulation;
}

.lad-app-tile:active {
    transform: scale(0.98);
}

.lad-app-tile i {
    font-size: 1.65rem;
    margin-bottom: 0.5rem;
}

.lad-app-tile span {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.2;
}

.lad-meta-card {
    background: linear-gradient(135deg, #f6f9fd 0%, #eef3f9 100%);
    border: 1px solid #dfe7f1;
    border-radius: 0.75rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
    padding: 0.75rem;
    font-size: 0.82rem;
    color: #4b5563;
}

.lad-meta-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.2rem 0;
}

.lad-meta-row i {
    color: #9ca3af;
    flex-shrink: 0;
}

/* Dashboard navigation */
.lad-dash-greet {
    text-align: center;
    margin-bottom: 1rem;
}

.lad-dash-greet-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: #111827;
}

.lad-dash-greet-meta {
    font-size: 0.78rem;
    color: #6b7280;
    margin-top: 0.15rem;
}

.lad-nav-section {
    margin-bottom: 1rem;
}

.lad-dash-hero .lad-dash-greet-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
}

.lad-dash-hero .lad-dash-greet-meta {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.82);
    margin-top: 0.15rem;
}

.lad-nav-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    margin-bottom: 0.45rem;
    padding-left: 0.15rem;
}

.lad-quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
}

.lad-quick-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 4.5rem;
    border-radius: 0.75rem;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    touch-action: manipulation;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.lad-quick-btn:active {
    transform: scale(0.98);
}

.lad-quick-btn i {
    font-size: 1.5rem;
}

.lad-quick-btn--primary {
    background: linear-gradient(135deg, #be0000 0%, #dc2626 100%);
    color: #fff;
}

.lad-quick-btn--secondary {
    background: rgba(255, 255, 255, 0.92);
    color: #1e293b;
    border: 1px solid #dfe7f1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    position: relative;
}

.lad-quick-badge {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: #be0000;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1.15rem;
    text-align: center;
}

.lad-report-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.lad-report-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 4.25rem;
    border-radius: 0.75rem;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    font-size: 0.78rem;
    touch-action: manipulation;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.lad-report-tile:active {
    transform: scale(0.97);
}

.lad-report-tile i {
    font-size: 1.35rem;
}

.lad-report-tile--wide {
    grid-column: 1 / -1;
    flex-direction: row;
    min-height: 3.25rem;
    gap: 0.5rem;
}

.lad-report-tile--blue { background: linear-gradient(145deg, #1f61ad, #2563eb); }
.lad-report-tile--green { background: linear-gradient(145deg, #047857, #059669); }
.lad-report-tile--purple { background: linear-gradient(145deg, #6d28d9, #7c3aed); }
.lad-report-tile--gold { background: linear-gradient(145deg, #b45309, #d97706); }
.lad-report-tile--red { background: linear-gradient(145deg, #be0000, #dc2626); }

.lad-nav-list {
    background: #fff;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.lad-nav-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 0.85rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f3f4f6;
    touch-action: manipulation;
}

.lad-nav-row:last-child {
    border-bottom: none;
}

.lad-nav-row:active {
    background: #f9fafb;
}

.lad-nav-row-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
    color: #fff;
}

.lad-nav-row-icon--blue { background: #1f61ad; }
.lad-nav-row-icon--green { background: #059669; }
.lad-nav-row-icon--purple { background: #7c3aed; }
.lad-nav-row-icon--gold { background: #d97706; }
.lad-nav-row-icon--red { background: #be0000; }

.lad-nav-row-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
}

.lad-nav-row-label {
    font-weight: 700;
    font-size: 0.88rem;
    color: #111827;
}

.lad-nav-row-hint {
    font-size: 0.72rem;
    color: #6b7280;
}

.lad-nav-row-chevron {
    color: #cbd5e1;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.lad-mobile-header-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.55rem;
    background: rgba(255, 255, 255, 0.14);
    flex-shrink: 0;
    font-size: 1.1rem;
}

.lad-more-section-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
    padding: 0.65rem 1rem 0.35rem;
    background: #f9fafb;
}

.lad-mobile-more .list-group-item.active {
    background: #fef2f2;
    color: #be0000;
    border-color: #fecaca;
}

.lad-mobile-more .list-group-item i {
    width: 1.25rem;
    text-align: center;
}

.lad-more-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #f8fafd;
    border-bottom: 1px solid #dfe7f1;
    color: #111827;
}

.lad-more-avatar {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    background: #fef2f2;
    color: var(--lad-primary, #be0000);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    flex-shrink: 0;
    border: 1px solid #fecaca;
}

.lad-more-name {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.2;
    color: #111827;
}

.lad-more-id {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.1rem;
}

.lad-more-home .list-group-item {
    font-weight: 600;
}
