body {
    background-color: #ffffff;
    background-image: url("../images/logo_opacity-E8Tcuxf.webp");
    background-repeat: no-repeat;
    background-position: center;
    background-size: min(45%, 530px) auto;
    height: 100vh;
}

.own-pagination {
    display: flex;    
    justify-content: space-between;
    width: 100%;
}

.pagination {
    list-style-type: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.375rem;
    justify-content: flex-end;
    background: #FFFFFF;
    border-radius: 1rem;
    padding: 0.625rem 0.75rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.08);
    margin: 0;
}

.pagination-item,
.pagination-ellipsis {
    min-width: 2.25rem;
    height: 2.25rem;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.65rem;
    color: #9CA3AF;
}

.pagination-item a {
    text-decoration: none;
    color: inherit;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: inherit;
    transition: 0.2s;
}

.pagination-item a:hover {
    color: #FFFFFF;
    background: var(--bs-primary);
    filter: brightness(90%);
}

.pagination-item.is-current {
    color: #FFFFFF;
    background: var(--bs-primary);
    font-weight: 700;
}

.pagination-item.pagination-next {
    background: #E9ECEF;
    color: #6C757D;
}

.pagination-item.pagination-next a:hover,
.pagination-item.pagination-prev a:hover {
    color: #FFFFFF;
    background: var(--bs-primary);
    filter: brightness(90%);
}

.pagination-item.is-disabled {
    color: #CED4DA;
    cursor: default;
}

.pagination-item.pagination-next.is-disabled {
    background: #F1F3F5;
    color: #CED4DA;
}

/* ===================== Dashboard ===================== */

.dashboard {
    --dash-bg: #f5f6fa;
    --dash-border: #e9ecf2;
    --dash-text: #111827;
    --dash-muted: #6b7280;
    background: var(--dash-bg);
    color: var(--dash-text);
    padding: 1.5rem 0 2.5rem;
    min-height: calc(100vh - 4rem);
}

.dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.dash-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
}

.dash-title-month {
    font-size: 1.25rem;
    font-weight: 400;
    margin-left: 0.25rem;
}

.dash-month-picker {
    position: relative;
}

.dash-month-picker .bi {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 1.05rem;
}

.dash-month-picker .form-select {
    padding-left: 2.5rem;
    min-width: 11rem;
    border-radius: 0.65rem;
    border-color: var(--dash-border);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
    font-weight: 500;
}

/* on phones the picker gets its own full-width line, like the cards below it */
@media (max-width: 575.98px) {
    .dash-month-picker {
        flex: 1 1 100%;
    }

    .dash-month-picker .form-select {
        width: 100%;
    }
}

/* filter selects on index pages, pushed to the right next to the "new" button */
.dash-filters {
    display: flex;
    gap: 0.75rem;
    margin-left: auto;
}

/* on phones the filters get their own line under the title, half width each */
@media (max-width: 767.98px) {
    .dash-filters {
        order: 1;
        flex: 1 1 100%;
        margin-left: 0;
    }

    .dash-filters .dash-month-picker {
        flex: 1 1 0;
        min-width: 0;
    }

    .dash-filters .form-select {
        width: 100%;
        min-width: 0;
    }
}

/* total of the filtered records, shown above the list while a filter is active */
.dash-filter-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.dash-filter-summary-actions {
    display: flex;
    gap: 0.5rem;
}

.dash-filter-summary-actions .btn {
    white-space: nowrap;
}

/* on phones the buttons get their own full-width line, split in halves */
@media (max-width: 767.98px) {
    .dash-filter-summary-actions {
        flex: 1 1 100%;
    }

    .dash-filter-summary-actions .btn {
        flex: 1 1 0;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

.dash-filter-summary-body {
    min-width: 0;
}

.dash-filter-summary-value {
    margin-left: auto;
    font-size: 1.35rem;
    font-weight: 700;
    text-align: right;
}

/* cards */
.dash-card {
    background: #fff;
    border: 1px solid var(--dash-border);
    border-radius: 0.9rem;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
    padding: 1.1rem 1.25rem;
}

.dash-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.dash-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.dash-card-subtitle {
    color: var(--dash-muted);
    font-size: 0.9rem;
    margin: 0.15rem 0 0.75rem;
}

.dash-info {
    color: var(--dash-muted);
    font-size: 0.95rem;
    margin-left: 0.35rem;
    cursor: help;
}

.dash-select {
    width: auto;
    border-radius: 0.5rem;
    border-color: var(--dash-border);
}

.dash-chart {
    position: relative;
    width: 100%;
}

/* card whose chart fills the height left by a taller neighbouring column */
.dash-card-stretch {
    display: flex;
    flex-direction: column;
}

.dash-chart-grow {
    flex: 1 1 auto;
}

.dash-chart-doughnut {
    height: 210px;
}

.dash-empty {
    color: var(--dash-muted);
    padding: 1.5rem 0;
    margin: 0;
    text-align: center;
}

/* KPI cards */
.dash-kpi {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    height: 100%;
}

.dash-kpi-body {
    min-width: 0;
}

.dash-kpi-icon {
    flex: 0 0 3rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.dash-kpi-icon.is-purple { background: #eeedfd; color: #5b5bd6; }
.dash-kpi-icon.is-blue   { background: #e6f1fd; color: #2f7fe0; }
.dash-kpi-icon.is-green  { background: #e7f6ee; color: #23a05a; }
.dash-kpi-icon.is-amber  { background: #fdf3e1; color: #f0a020; }
.dash-kpi-icon.is-red    { background: #fdecec; color: #dc3545; }
.dash-kpi-icon.is-gray   { background: #f1f3f6; color: var(--dash-muted); }

.dash-kpi-label {
    font-size: 0.9rem;
    margin-bottom: 0.15rem;
}

.dash-kpi-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.dash-kpi-name {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
}

.dash-kpi-caption {
    font-size: 0.9rem;
    margin-top: 0.15rem;
}

/* running record */
.dash-live {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #dc3545;
    background: #fdecec;
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
}

.dash-live::before {
    content: '';
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: currentColor;
    animation: dash-pulse 1.4s ease-in-out infinite;
}

@keyframes dash-pulse {
    50% { opacity: 0.25; }
}

.dash-running {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
}

/* running record: icon + time | info | button as three equal columns */
.dash-running.is-active {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
}

.dash-running-clock {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dash-running-body {
    min-width: 0;
    flex: 1 1 12rem;
}

.dash-running-time {
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

.dash-running-info {
    min-width: 0;
    max-width: 22rem;
    color: var(--dash-muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

.dash-running-info .bi {
    margin-right: 0.5rem;
}

.dash-running-action {
    justify-self: end;
}

/* narrow screens: icon + time on their own line, then info | button below */
@media (max-width: 767.98px) {
    .dash-running.is-active {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    /* icon on the left, time pushed to the right edge, in line with the button */
    .dash-running.is-active .dash-running-clock {
        grid-column: 1 / -1;
        justify-content: space-between;
    }

    .dash-running.is-active .dash-running-info {
        max-width: none;
    }

    .dash-running-time {
        font-size: clamp(2.2rem, 11.5vw, 3rem);
    }
}

.dash-running-idle {
    color: var(--dash-muted);
}

.dash-running-stop {
    white-space: nowrap;
    border-radius: 0.65rem;
    font-weight: 600;
    padding: 0.5rem 1.1rem;
}

/* doughnut legend */
.dash-dot {
    display: inline-block;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    margin-right: 0.65rem;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

.dash-legend {
    width: 100%;
    font-size: 0.92rem;
}

.dash-legend td {
    padding: 0.35rem 0.25rem;
}

/* overview table */
.dash-overview {
    display: flex;
    flex-direction: column;
}

.dash-overview-table {
    width: 100%;
    font-size: 0.92rem;
}

.dash-overview-table th {
    font-weight: 400;
    font-size: 0.88rem;
    padding: 0 0.25rem 0.4rem;
}

.dash-overview-table tbody td {
    padding: 0.4rem 0.25rem;
}

.dash-overview-table tfoot td {
    border-top: 1px solid var(--dash-border);
    font-weight: 700;
    padding: 0.9rem 0.25rem;
}

.dash-progress {
    --dash-color: #4353d6;
    position: relative;
    height: 0.75rem;
    width: 8.5rem;
    margin: 0 auto;
    border-radius: 999px;
    background: color-mix(in srgb, var(--dash-color) 10%, white);
}

.dash-progress span {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: 999px;
    background: var(--dash-color);
}

.dash-progress em {
    position: absolute;
    left: 45%;
    top: 50%;
    transform: translateY(-50%);
    font-style: normal;
    font-size: 0.88rem;
    white-space: nowrap;
    line-height: 1;
    padding: 0 0.2rem;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 0.25rem;
}

.dash-overview-link {
    margin-top: auto;
    margin-left: -1.25rem;
    margin-right: -1.25rem;
    margin-bottom: -1.1rem;
    padding: 0.9rem 1.25rem;
    border-top: 1px solid var(--dash-border);
    text-align: right;
    color: var(--dash-text);
    font-weight: 500;
    text-decoration: none;
}

.dash-overview-link:hover {
    color: #4353d6;
}

/* ===================== Dashboard-styled forms (record new/edit) ===================== */

.dash-form-page {
    max-width: 960px;
}

.dash-form {
    padding: 0;
}

.dash-form-section {
    padding: 1.4rem 1.5rem;
}

.dash-form-section + .dash-form-section {
    border-top: 1px solid var(--dash-border);
}

.dash-form-section-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.1rem;
}

.dash-form-section-header .dash-kpi-icon {
    flex-basis: 2.5rem;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.1rem;
}

.dash-form .form-label {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.35rem;
}

.dash-form .form-control,
.dash-form .form-select,
.dash-form .input-group-text {
    border-color: var(--dash-border);
    min-height: 2.75rem;
}

.dash-form .form-control,
.dash-form .form-select {
    border-radius: 0.65rem;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.dash-form .input-group > .form-control {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.dash-form .input-group-text {
    background: var(--dash-bg);
    color: var(--dash-muted);
    border-radius: 0.65rem 0 0 0.65rem;
}

.dash-form .form-control:focus,
.dash-form .form-select:focus {
    border-color: #a5adf0;
    box-shadow: 0 0 0 0.2rem rgba(67, 83, 214, 0.15);
}

.dash-form-hint {
    color: var(--dash-muted);
    font-size: 0.85rem;
    margin-top: 0.75rem;
}

.dash-form-hint .bi {
    margin-right: 0.3rem;
}

/* type of work chips: a visually hidden checkbox (.btn-check) followed by its label */
.dash-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.dash-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2.75rem;
    padding: 0.4rem 1rem;
    border: 1px solid var(--dash-border);
    border-radius: 999px;
    background: #fff;
    font-size: 0.92rem;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.dash-chip .bi {
    display: none;
}

.dash-chip:hover {
    border-color: #a5adf0;
}

.btn-check:checked + .dash-chip {
    background: #eeedfd;
    border-color: #5b5bd6;
    color: #4343b8;
    font-weight: 600;
}

.btn-check:checked + .dash-chip .bi {
    display: inline;
}

.btn-check:focus-visible + .dash-chip {
    box-shadow: 0 0 0 0.2rem rgba(67, 83, 214, 0.25);
}

.dash-form-footer {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--dash-border);
    background: #fafbfc;
    border-radius: 0 0 0.9rem 0.9rem;
}

.dash-form-btn {
    border-radius: 0.65rem;
    font-weight: 600;
    padding: 0.55rem 1.25rem;
}

.dash-form-footer .btn-light {
    border-color: var(--dash-border);
}

/* ===================== Dashboard-styled lists (index pages) ===================== */

.dash-list-page {
    max-width: 960px;
}

.dash-list {
    padding: 0.4rem 0;
    overflow-x: auto;
}

.dash-table {
    width: 100%;
    font-size: 0.95rem;
}

.dash-table th {
    color: var(--dash-muted);
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.6rem 1.25rem;
    border-bottom: 1px solid var(--dash-border);
}

.dash-table td {
    padding: 0.75rem 1.25rem;
    vertical-align: middle;
}

.dash-table tbody tr + tr td {
    border-top: 1px solid var(--dash-border);
}

.dash-table tbody tr:hover td {
    background: #fafbfd;
}

.dash-list-name {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.dash-list-name .dash-kpi-icon {
    flex-basis: 2.25rem;
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1rem;
}

.dash-list-name .text-truncate {
    font-weight: 600;
}

.dash-list-sub {
    color: var(--dash-muted);
    font-size: 0.85rem;
}

.dash-list-truncate {
    max-width: 14rem;
    vertical-align: middle;
}

.dash-list-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

.dash-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.15rem 0.6rem;
    margin: 0.1rem 0.15rem 0.1rem 0;
    border-radius: 999px;
    background: #f1f3f6;
    color: #374151;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.dash-badge.is-purple {
    background: #eeedfd;
    color: #4343b8;
}

.dash-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.4rem;
}

.dash-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 2.25rem;
    height: 2.25rem;
    justify-content: center;
    padding: 0 0.7rem;
    border: 1px solid var(--dash-border);
    border-radius: 0.6rem;
    background: #fff;
    color: #374151;
    font-size: 0.88rem;
    font-weight: 500;
}

.dash-action-btn:hover,
.dash-action-btn:focus-visible {
    border-color: #a5adf0;
    background: #eeedfd;
    color: #4343b8;
}

.dash-action-btn.is-danger:hover,
.dash-action-btn.is-danger:focus-visible {
    border-color: #f3b4b9;
    background: #fdecec;
    color: #dc3545;
}


/* pagination sits under a card, so it takes the card look instead of its own shadow */
.dashboard .pagination {
    border: 1px solid var(--dash-border);
    border-radius: 0.9rem;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
    padding: 0.4rem 0.5rem;
}

/* "main" switch in the name + main form */
.dash-switch {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 2.75rem;
    margin: 0;
    padding-left: 0;
}

.dash-switch .form-check-input {
    float: none;
    margin: 0;
    width: 2.6rem;
    height: 1.4rem;
    cursor: pointer;
}

.dash-switch .form-check-input:checked {
    background-color: #4353d6;
    border-color: #4353d6;
}

.dash-switch .form-check-label {
    font-weight: 500;
    cursor: pointer;
}

/* delete confirmation modal */
.dash-modal .modal-content {
    border: 1px solid var(--dash-border);
    border-radius: 0.9rem;
    box-shadow: 0 10px 30px rgba(16, 24, 40, 0.12);
}

.dash-modal .modal-body {
    padding: 1.4rem 1.5rem 0.5rem;
}

.dash-modal-header {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 0.9rem;
}

.dash-modal-name {
    color: var(--dash-muted);
    font-size: 0.9rem;
    margin-top: 0.15rem;
}

.dash-modal-text {
    margin: 0;
}

.dash-modal .modal-footer {
    border-top: 0;
    padding: 1rem 1.5rem 1.25rem;
}
