/* Body padding variants used across 51 templates */
.page-body        { padding-top: 50px; padding-bottom: 50px; }
.page-body-sm     { padding-top: 30px; padding-bottom: 30px; }

/* Background color used across 8 templates */
.bg-light-blue    { background-color: #a3c1e6; }

/* Progress bar height (profile pages) */
.progress-sm      { height: 5px; }

/* Login form translucent background */
.bg-white-50      { background-color: rgba(255,255,255,0.5); }

/* Table cell borders (admin task views) */
.border-black     { border: 1px solid black; }

/* Constrain notes column so it wraps instead of stretching the table */
.notes-cell       { max-width: 150px; white-space: normal !important; word-wrap: break-word; }

/* Prevent passive-event-listener warning from TableDnD touch handlers */
[data-reorderable-rows="true"] tbody tr { touch-action: none; }

/* Dashboard summary cards */
.dash-card         { border-left: 4px solid; }
.dash-card-primary { border-left-color: #158cba; }
.dash-card-success { border-left-color: #28b62c; }
.dash-card-warning { border-left-color: #ff851b; }
.dash-card-info    { border-left-color: #75caeb; }

/* Chart container */
.chart-container   { position: relative; height: 300px; }

/* Task status badges */
.badge-task        { font-size: 0.75rem; padding: 0.25em 0.6em; }

/* Quick action buttons grid */
.quick-actions .btn { text-align: left; }

/* Login page */
.login-page {
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    min-height: 100vh;
}
.login-wrapper {
    min-height: calc(100vh - 56px - 40px); /* viewport minus navbar minus footer */
}
.login-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 0.75rem;
}
.alert-sm { padding: 0.4rem 0.75rem; font-size: 0.875rem; }

/* ===== Mobile-First Responsive ===== */
@media (max-width: 767.98px) {
    /* Reduce page padding on mobile */
    .page-body    { padding-top: 60px; padding-bottom: 20px; }
    .page-body-sm { padding-top: 60px; padding-bottom: 15px; }

    /* Force notes to wrap on mobile */
    .notes-cell { max-width: 100px; word-break: break-word; }

    /* Group header rows (day separators in userWeekTasks) */
    .grouplabel th,
    .grouplabel td {
        font-size: 0.9rem;
        padding: 0.5rem !important;
        text-align: center;
    }
}

/* Bootstrap Table card-view enhancements (card-view elements only exist when
   BT mobile extension activates, so no media query needed) */
.bootstrap-table .fixed-table-body .card-view {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0.5rem;
    border-bottom: 1px solid #f0f0f0;
}
.bootstrap-table .fixed-table-body .card-view:last-child {
    border-bottom: none;
}
.bootstrap-table .fixed-table-body .card-view-title {
    font-weight: 600;
    font-size: 0.8rem;
    color: #555;
    flex: 0 0 40%;
}
.bootstrap-table .fixed-table-body .card-view-value {
    text-align: right;
    font-size: 0.85rem;
    flex: 0 0 58%;
}

/* Swipe navigation hint */
.swipe-hint {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 0.5rem 1.25rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    z-index: 1050;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.swipe-hint.show { opacity: 1; }

/* Swipe edge indicator */
.swipe-indicator {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 4px;
    z-index: 1040;
    opacity: 0;
    transition: opacity 0.15s;
    pointer-events: none;
}
.swipe-indicator.left  { left: 0;  background: linear-gradient(to right, #158cba, transparent); }
.swipe-indicator.right { right: 0; background: linear-gradient(to left, #158cba, transparent); }
.swipe-indicator.active { opacity: 1; width: 6px; }

/* Mobile wizard */
@media (max-width: 767.98px) {
    .wizard-progress {
        position: sticky;
        top: 56px;
        z-index: 100;
        background: #fff;
        padding: 0.75rem 0;
    }
    .wizard-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        border-top: 1px solid #dee2e6;
        padding: 0.75rem 1rem;
        z-index: 1030;
        display: flex;
        gap: 0.5rem;
    }
    .wizard-nav .btn { flex: 1; }
    .wizard-review-list {
        list-style: none;
        padding: 0;
    }
    .wizard-review-list li {
        display: flex;
        justify-content: space-between;
        padding: 0.4rem 0;
        border-bottom: 1px solid #f0f0f0;
    }
    .wizard-review-list .review-label {
        font-weight: 600;
        color: #555;
        font-size: 0.85rem;
    }
    .wizard-review-list .review-value {
        font-size: 0.85rem;
    }
    /* Extra bottom padding so content isn't hidden behind fixed wizard nav */
    form[data-mobile-wizard] { padding-bottom: 80px; }
}
