/* Dodatak za filtere i mesečnu dolaznost */

.filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.filter-label {
    color: var(--muted);
    font-size: 14px;
    margin-right: 3px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    color: #59635e;
    font-size: 14px;
    font-weight: 600;
}

.filter-chip:hover,
.filter-chip.active {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}

.date-local {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    color: var(--text);
}

.pill.offday {
    background: #f0f2f1;
    color: #707a75;
}

.month-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin: 12px 0 14px;
    color: var(--muted);
    font-size: 13px;
}

.legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    display: inline-block;
}

.legend-dot.present {
    background: #dff1e7;
}

.legend-dot.absent {
    background: #f7dddd;
}

.legend-dot.long {
    background: #f7dca7;
}

.legend-dot.off {
    background: #eef0ef;
}

.month-table-wrap {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: auto;
}

.month-table {
    min-width: 1080px;
    border-collapse: separate;
    border-spacing: 0;
}

.month-table th,
.month-table td {
    padding: 0;
    text-align: center;
    min-width: 34px;
    height: 42px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.month-table thead th {
    position: sticky;
    top: 0;
    background: #fafbfa;
    z-index: 3;
    font-size: 11px;
}

.month-table .student-col {
    position: sticky;
    left: 0;
    z-index: 4;
    width: 210px;
    min-width: 210px;
    text-align: left;
    padding: 10px 13px;
    background: #fff;
}

.month-table thead .student-col {
    z-index: 6;
    background: #fafbfa;
}

.month-table .student-col small {
    display: block;
    color: var(--muted);
    margin-top: 2px;
}

.month-cell a,
.month-cell span {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: inherit;
    font-weight: 800;
}

.present-cell {
    background: #e5f4eb;
    color: #2f765c;
}

.absent-cell {
    background: #fae5e5;
    color: #a54444;
}

.long-absence {
    background: #f8dfad !important;
    color: #8a5c0c !important;
}

.off-day {
    background: #f1f3f2 !important;
    color: #a3aaa6 !important;
}

.future-day {
    background: #f8f9f8 !important;
    color: #c0c5c2 !important;
}

.empty-cell {
    background: #fff;
    color: #b7bdb9;
}

.month-help {
    color: var(--muted);
    font-size: 13px;
    margin-top: 11px;
}

.btn-small {
    padding: 7px 10px;
    font-size: 13px;
}

.btn-large {
    min-height: 46px;
}

.muted {
    color: var(--muted);
}

@media (max-width: 800px) {
    .month-navigation {
        align-items: stretch;
        flex-direction: column;
    }

    .month-navigation strong {
        text-align: center;
        order: -1;
    }

    .month-navigation .btn {
        width: 100%;
    }

    .filter-bar {
        gap: 6px;
    }

    .filter-chip {
        padding: 6px 9px;
        font-size: 13px;
    }
}
