/* NOSSA CASA - CALENDARIO OFICIAL / GRADE MENSAL */

.mais-hub-card.calendar .mais-hub-icon { background: #eef4f3; }

.calendario-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

#calendario-new {
    min-height: 38px;
    padding: 8px 12px;
    flex: 0 0 auto;
    cursor: pointer;
    color: #fff;
    background: var(--secondary);
    border-radius: 10px;
    font-size: 10px;
    font-weight: 900;
}

.calendario-monthbar {
    margin-bottom: 10px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 6px;
    align-items: center;
}

.calendario-monthbar button {
    min-height: 36px;
    padding: 7px 10px;
    cursor: pointer;
    color: var(--text-strong);
    background: #eee9ec;
    border-radius: 9px;
    font-size: 9px;
    font-weight: 900;
}

.calendario-monthbar strong {
    padding: 0 8px;
    color: var(--text-strong);
    font-size: 13px;
    text-align: center;
}

.calendario-summary {
    margin-bottom: 10px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
}

.calendario-summary > div {
    padding: 10px;
    display: flex;
    flex-direction: column;
    background: #faf8f9;
    border-radius: 10px;
}

.calendario-summary .today { background: #fff5d8; }
.calendario-summary .late { background: #fff0f3; }
.calendario-summary .soon { background: #edf2f9; }

.calendario-summary span {
    color: var(--muted);
    font-size: 8px;
    font-weight: 900;
    text-transform: uppercase;
}

.calendario-summary strong {
    margin-top: 4px;
    color: var(--text-strong);
    font-size: 15px;
}

.calendario-filters {
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.calendario-filters button {
    min-height: 31px;
    padding: 5px 8px;
    cursor: pointer;
    color: #736a70;
    background: #f1edef;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 900;
}

.calendario-filters button.active {
    color: #fff;
    background: var(--secondary);
}

.calendario-form {
    margin-bottom: 12px;
    padding: 12px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    background: #faf8f9;
    border-radius: 12px;
}

.calendario-form[hidden] { display: none !important; }
.calendario-form .wide { grid-column: 1 / -1; }

.calendario-form label > span {
    display: block;
    margin: 0 0 5px 3px;
    color: #817980;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
}

.calendario-form input,
.calendario-form select,
.calendario-form textarea {
    width: 100%;
    padding: 8px 9px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 9px;
    font-size: 10px;
}

.calendario-form input,
.calendario-form select { min-height: 39px; }

.calendario-form textarea { resize: vertical; }

.calendario-form-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 7px;
}

.calendario-form-actions button {
    min-height: 36px;
    padding: 7px 11px;
    cursor: pointer;
    border-radius: 9px;
    font-size: 9px;
    font-weight: 900;
}

#calendario-save {
    color: #fff;
    background: var(--primary);
}

#calendario-cancel {
    color: var(--text-strong);
    background: #eee9ec;
}

.calendario-board {
    overflow-x: auto;
    padding-bottom: 3px;
}

.calendario-month {
    min-width: 690px;
    overflow: hidden;
    border: 1px solid #ece6e9;
    border-radius: 13px;
    background: #fff;
}

.calendario-weekdays,
.calendario-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendario-weekdays {
    background: #f5f1f3;
    border-bottom: 1px solid #ece6e9;
}

.calendario-weekdays span {
    padding: 8px 5px;
    color: #82787e;
    font-size: 8px;
    font-weight: 1000;
    text-align: center;
    text-transform: uppercase;
}

.calendario-cell {
    min-height: 105px;
    padding: 7px;
    cursor: pointer;
    outline: none;
    background: #fff;
    border-right: 1px solid #eee9eb;
    border-bottom: 1px solid #eee9eb;
    transition: background .12s ease, box-shadow .12s ease;
}

.calendario-cell:nth-child(7n) { border-right: 0; }

.calendario-cell:hover,
.calendario-cell:focus-visible { background: #fcf9fa; }

.calendario-cell.outside {
    background: #faf8f9;
    opacity: .46;
}

.calendario-cell.today { background: #fffaf0; }

.calendario-cell.selected {
    position: relative;
    z-index: 1;
    box-shadow: inset 0 0 0 2px var(--secondary);
}

.calendario-cell-top {
    min-height: 23px;
    display: flex;
    justify-content: space-between;
    gap: 5px;
    align-items: center;
}

.calendario-day-number {
    width: 23px;
    height: 23px;
    display: inline-grid;
    place-items: center;
    color: var(--text-strong);
    border-radius: 999px;
    font-size: 9px;
    font-weight: 1000;
}

.calendario-cell.today .calendario-day-number {
    color: #fff;
    background: var(--secondary);
}

.calendario-cell-top small {
    color: #927833;
    font-size: 7px;
    font-weight: 900;
}

.calendario-cell-events {
    margin-top: 4px;
    display: grid;
    gap: 3px;
}

.calendario-cell-event {
    width: 100%;
    min-height: 20px;
    padding: 3px 5px;
    overflow: hidden;
    cursor: pointer;
    border-radius: 5px;
    font-size: 7px;
    font-weight: 850;
    line-height: 1.25;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendario-cell-event.manual {
    color: #715d71;
    background: #f3edf4;
}

.calendario-cell-event.manutencao {
    color: #56816a;
    background: #edf7f1;
}

.calendario-cell-event.projeto {
    color: #61769b;
    background: #edf2f9;
}

.calendario-cell-event.financeiro {
    color: #806b2f;
    background: #fff5d8;
}

.calendario-cell-more {
    padding-left: 4px;
    color: var(--muted);
    font-size: 7px;
    font-weight: 900;
}

.calendario-selected {
    margin-top: 12px;
    padding: 12px;
    background: #faf8f9;
    border-radius: 12px;
}

.calendario-selected-head {
    margin-bottom: 9px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.calendario-selected-head span {
    display: block;
    color: var(--muted);
    font-size: 8px;
    font-weight: 900;
    text-transform: uppercase;
}

.calendario-selected-head strong {
    display: block;
    margin-top: 2px;
    color: var(--text-strong);
    font-size: 11px;
}

#calendario-add-selected {
    min-height: 33px;
    padding: 6px 9px;
    flex: 0 0 auto;
    cursor: pointer;
    color: #715d71;
    background: #f3edf4;
    border-radius: 8px;
    font-size: 8px;
    font-weight: 900;
}

.calendario-list {
    display: grid;
    gap: 6px;
}

.calendario-event {
    padding: 9px 10px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: center;
    background: #fff;
    border: 1px solid #eee8eb;
    border-radius: 10px;
}

.calendario-event.done { opacity: .62; }

.calendario-event-time {
    color: var(--text-strong);
    font-size: 9px;
    font-weight: 900;
}

.calendario-event-info strong {
    color: var(--text-strong);
    font-size: 10px;
}

.calendario-event-info small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 8px !important;
}

.calendario-source {
    padding: 4px 6px;
    border-radius: 999px;
    font-size: 7px;
    font-weight: 900;
    white-space: nowrap;
}

.calendario-source.manual {
    color: #715d71;
    background: #f3edf4;
}

.calendario-source.manutencao {
    color: #56816a;
    background: #edf7f1;
}

.calendario-source.projeto {
    color: #61769b;
    background: #edf2f9;
}

.calendario-source.financeiro {
    color: #806b2f;
    background: #fff5d8;
}

.calendario-event-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
}

.calendario-event-actions button {
    padding: 5px 6px;
    cursor: pointer;
    border-radius: 7px;
    font-size: 7px;
    font-weight: 900;
}

.calendario-done,
.calendario-open {
    color: #56816a;
    background: #edf7f1;
}

.calendario-edit {
    color: #61769b;
    background: #edf2f9;
}

.calendario-delete {
    color: #ad5363;
    background: #fff0f3;
}

@media (max-width: 760px) {
    .calendario-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .calendario-form {
        grid-template-columns: 1fr;
    }

    .calendario-form .wide {
        grid-column: auto;
    }

    .calendario-event {
        grid-template-columns: 36px minmax(0, 1fr) auto;
    }

    .calendario-event-actions {
        grid-column: 2 / -1;
        justify-content: flex-start;
    }
}

@media (max-width: 620px) {
    .calendario-head { flex-direction: column; }
    #calendario-new { width: 100%; }

    .calendario-monthbar {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    #calendario-today { grid-column: 1 / -1; }

    .calendario-month { min-width: 620px; }

    .calendario-cell {
        min-height: 91px;
        padding: 5px;
    }

    .calendario-selected-head {
        align-items: flex-start;
    }

    .calendario-event {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .calendario-source,
    .calendario-event-actions {
        grid-column: 2 / 3;
        justify-self: start;
    }
}
