.pb-shell .calendar-page-header {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.pb-shell .calendar-command-bar {
    margin-bottom: 0;
}

.pb-shell .calendar-command-bar-controls {
    justify-content: flex-end;
    gap: 0.75rem;
}

.pb-shell .calendar-view-switch {
    padding: 0.2rem;
    border: 1px solid color-mix(in srgb, var(--pb-line-strong) 76%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--pb-surface-2) 82%, var(--pb-surface) 18%);
}

.pb-shell .calendar-view-switch .mud-button-root,
.pb-shell .calendar-primary-actions .mud-button-root,
.pb-shell .calendar-toolbar-actions .mud-button-root {
    border-radius: 999px;
}

.pb-shell .calendar-view-switch .mud-button-root {
    min-height: 2.35rem;
    padding-inline: 1rem;
}

.pb-shell .calendar-view-switch .mud-button-filled {
    box-shadow: none;
}

.pb-shell .calendar-primary-actions {
    justify-content: flex-end;
}

.pb-shell .calendar-legend {
    gap: 0.45rem;
}

.pb-shell .calendar-legend .mud-chip-root {
    font-weight: 600;
    letter-spacing: 0.01em;
    background: color-mix(in srgb, var(--pb-surface) 90%, transparent);
}

.pb-shell .calendar-content-stack {
    gap: 1.2rem;
}

.pb-shell .calendar-general-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--pb-line-strong) 78%, transparent);
    border-radius: calc(var(--pb-radius-lg) + 2px);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--pb-surface) 98%, transparent), color-mix(in srgb, var(--pb-surface-2) 92%, transparent));
    box-shadow: var(--pb-shadow-sm);
}

.pb-shell .calendar-general-shell::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--pb-primary-rgb), 0.18), transparent);
    pointer-events: none;
}

.pb-shell .calendar-loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 8, 14, 0.16);
    backdrop-filter: blur(10px);
}

.pb-shell .calendar-loading-card {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.95rem 1.1rem;
    border: 1px solid color-mix(in srgb, var(--pb-line-strong) 76%, transparent);
    border-radius: calc(var(--pb-radius-md) + 2px);
    background: color-mix(in srgb, var(--pb-surface) 94%, var(--pb-surface-2) 6%);
    box-shadow: var(--pb-shadow-md);
}

.pb-shell .calendar-scheduler-host.mud-calendar {
    --mud-cal-cell-hover: color-mix(in srgb, rgba(var(--pb-primary-rgb), 0.18) 72%, var(--pb-surface) 28%);
    color: var(--pb-text);
    background: transparent;
    border: 0;
    border-radius: inherit;
}

.pb-shell .calendar-scheduler-host .mud-calendar-container {
    min-height: inherit;
}

.pb-shell .calendar-scheduler-host .mud-cal-toolbar {
    padding: 1rem 1rem 0.9rem !important;
    align-items: center;
    gap: 0.85rem;
    border-bottom: 1px solid color-mix(in srgb, var(--pb-line) 84%, transparent);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--pb-surface-2) 48%, transparent), color-mix(in srgb, var(--pb-surface) 94%, transparent));
}

.pb-shell .calendar-scheduler-host .mud-cal-toolbar-nav {
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

.pb-shell .calendar-scheduler-host .mud-cal-toolbar .mud-button-root,
.pb-shell .calendar-scheduler-host .mud-cal-toolbar .mud-icon-button {
    border-radius: 999px;
}

.pb-shell .calendar-toolbar-actions {
    justify-content: flex-end;
}

.pb-shell .calendar-scheduler-host .mud-picker {
    display: inline-flex;
}

.pb-shell .calendar-scheduler-host .mud-picker .mud-button-root {
    min-height: 2.4rem;
    padding-inline: 0.9rem;
    border-color: color-mix(in srgb, var(--pb-line-strong) 76%, transparent);
    background: color-mix(in srgb, var(--pb-surface) 92%, var(--pb-surface-2) 8%);
}

.pb-shell .calendar-scheduler-host .mud-cal-grid-header {
    background: color-mix(in srgb, var(--pb-surface-2) 86%, var(--pb-surface) 14%);
}

.pb-shell .calendar-scheduler-host .mud-cal-month-grid-header,
.pb-shell .calendar-scheduler-host .mud-cal-week-header,
.pb-shell .calendar-scheduler-host .mud-cal-work-week-header,
.pb-shell .calendar-scheduler-host .mud-cal-day-header {
    border-bottom-color: color-mix(in srgb, var(--pb-line-strong) 72%, transparent);
}

.pb-shell .calendar-scheduler-host .mud-cal-month-header,
.pb-shell .calendar-scheduler-host .mud-cal-week-header > div,
.pb-shell .calendar-scheduler-host .mud-cal-work-week-header > div,
.pb-shell .calendar-scheduler-host .mud-cal-day-header > div {
    min-height: 3.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: color-mix(in srgb, var(--pb-text) 86%, var(--pb-text-muted) 14%);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pb-shell .calendar-scheduler-host .mud-cal-time-cell {
    color: var(--pb-text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: color-mix(in srgb, var(--pb-surface-2) 64%, transparent);
}

.pb-shell .calendar-scheduler-host .mud-cal-week-grid > div.mud-cal-week-not-today,
.pb-shell .calendar-scheduler-host .mud-cal-work-week-grid > div.mud-cal-week-not-today,
.pb-shell .calendar-scheduler-host .mud-cal-day-grid > div,
.pb-shell .calendar-scheduler-host .mud-cal-month-cell {
    border-color: color-mix(in srgb, var(--pb-line) 82%, transparent);
}

.pb-shell .calendar-scheduler-host .mud-cal-week-cell {
    background: color-mix(in srgb, var(--pb-surface) 94%, transparent);
}

.pb-shell .calendar-scheduler-host .mud-cal-week-cell.mud-cal-week-cell-half {
    border-top-color: color-mix(in srgb, var(--pb-line) 60%, transparent);
}

.pb-shell .calendar-scheduler-host .mud-cal-month-link,
.pb-shell .calendar-scheduler-host .mud-cal-week-link {
    transition:
        background-color var(--pb-transition-fast),
        box-shadow var(--pb-transition-fast);
}

@media (hover: hover) {
    .pb-shell .calendar-scheduler-host .mud-cal-month-link:hover,
    .pb-shell .calendar-scheduler-host .mud-cal-week-link:hover {
        background: color-mix(in srgb, rgba(var(--pb-primary-rgb), 0.1) 72%, transparent);
    }
}

.pb-shell .calendar-scheduler-host .mud-cal-month-row-holder {
    background: color-mix(in srgb, var(--pb-surface) 94%, transparent);
}

.pb-shell .calendar-scheduler-host .mud-cal-overflow-message {
    padding-left: 0.8rem;
    padding-bottom: 0.55rem;
    color: var(--pb-primary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.pb-shell .calendar-scheduler-host .mud-cal-current-time {
    border-color: color-mix(in srgb, var(--pb-warning) 80%, #ffffff 20%);
    opacity: 0.9;
}

.pb-shell .calendar-scheduler-host .mud-cal-cell-template,
.pb-shell .calendar-scheduler-host .mud-cal-week-template-holder,
.pb-shell .calendar-scheduler-host .mud-cal-clickable {
    height: 100%;
}

.pb-shell .calendar-scheduler-host .mud-cal-month-cell-title {
    padding: 0.65rem 0.8rem 0.5rem;
}

.pb-shell .pb-month-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    min-height: 2rem;
    color: var(--pb-text);
}

.pb-shell .pb-month-day-header.is-outside {
    color: var(--pb-text-disabled);
}

.pb-shell .pb-month-day-header.is-disabled {
    color: color-mix(in srgb, var(--pb-text-disabled) 84%, transparent);
}

.pb-shell .pb-month-day-header.is-today {
    padding: 0.2rem 0.4rem;
    border: 1px solid rgba(var(--pb-primary-rgb), 0.32);
    border-radius: 999px;
    background: rgba(var(--pb-primary-rgb), 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.pb-shell .pb-month-day-number {
    font-family: "Sora", "IBM Plex Sans", sans-serif;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1;
}

.pb-shell .pb-month-day-state {
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pb-text-muted);
}

.pb-shell .pb-calendar-item {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.24rem;
    padding: 0.5rem 0.6rem;
    border: 1px solid transparent;
    border-radius: 14px;
    background: color-mix(in srgb, var(--pb-surface-2) 74%, var(--pb-surface) 26%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.pb-shell .pb-calendar-item::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: currentColor;
    opacity: 0.65;
}

.pb-shell .pb-calendar-item.week-view,
.pb-shell .pb-calendar-item.day-view {
    justify-content: space-between;
    min-height: 100%;
}

.pb-shell .pb-calendar-item-dot {
    width: 0.48rem;
    height: 0.48rem;
    flex: 0 0 auto;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06);
}

.pb-shell .pb-calendar-item-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.78rem;
    font-weight: 700;
}

.pb-shell .pb-calendar-item-time,
.pb-shell .pb-calendar-item-status {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.pb-shell .pb-calendar-item-headline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.pb-shell .pb-calendar-item-title {
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.3;
}

.pb-shell .pb-calendar-item-subtitle {
    color: color-mix(in srgb, currentColor 76%, var(--pb-text-muted) 24%);
    font-size: 0.72rem;
    line-height: 1.3;
}

.pb-shell .pb-calendar-item.is-appointment.status-confirmado {
    color: color-mix(in srgb, var(--pb-success) 88%, #ffffff 12%);
    background: color-mix(in srgb, var(--pb-success) 14%, var(--pb-surface) 86%);
    border-color: color-mix(in srgb, var(--pb-success) 22%, transparent);
}

.pb-shell .pb-calendar-item.is-appointment.status-pendente {
    color: color-mix(in srgb, var(--pb-warning) 88%, #ffffff 12%);
    background: color-mix(in srgb, var(--pb-warning) 14%, var(--pb-surface) 86%);
    border-color: color-mix(in srgb, var(--pb-warning) 22%, transparent);
}

.pb-shell .pb-calendar-item.is-appointment.status-concluido {
    color: color-mix(in srgb, var(--pb-info) 88%, #ffffff 12%);
    background: color-mix(in srgb, var(--pb-info) 14%, var(--pb-surface) 86%);
    border-color: color-mix(in srgb, var(--pb-info) 22%, transparent);
}

.pb-shell .pb-calendar-item.is-appointment.status-cancelado,
.pb-shell .pb-calendar-item.is-appointment.status-no-show {
    color: color-mix(in srgb, var(--pb-error) 82%, #ffffff 18%);
    background: color-mix(in srgb, var(--pb-error) 12%, var(--pb-surface) 88%);
    border-color: color-mix(in srgb, var(--pb-error) 22%, transparent);
    opacity: 0.9;
}

.pb-shell .pb-calendar-item.is-package {
    color: color-mix(in srgb, var(--pb-primary-light) 82%, #ffffff 18%);
    background: color-mix(in srgb, rgba(var(--pb-primary-rgb), 0.16) 72%, var(--pb-surface) 28%);
    border-color: rgba(var(--pb-primary-rgb), 0.26);
}

.pb-shell .pb-calendar-item.is-block {
    color: color-mix(in srgb, var(--pb-text) 84%, var(--pb-text-muted) 16%);
    background: color-mix(in srgb, var(--pb-surface-3) 62%, var(--pb-surface) 38%);
    border-color: color-mix(in srgb, var(--pb-line-strong) 88%, transparent);
}

.pb-shell .calendar-scheduler-host .pb-calendar-cell-past {
    background: color-mix(in srgb, var(--pb-surface-2) 64%, transparent);
}

.pb-shell .calendar-scheduler-host .pb-calendar-cell-outside-hours,
.pb-shell .calendar-scheduler-host .pb-calendar-cell-closed {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.08));
}

.pb-shell .calendar-scheduler-host .pb-calendar-cell-blocked {
    background:
        repeating-linear-gradient(
            135deg,
            rgba(var(--pb-error-rgb), 0.08) 0,
            rgba(var(--pb-error-rgb), 0.08) 7px,
            rgba(var(--pb-error-rgb), 0.14) 7px,
            rgba(var(--pb-error-rgb), 0.14) 14px
        );
}

.pb-shell .calendar-scheduler-host .pb-calendar-cell-has-items .pb-month-day-number,
.pb-shell .calendar-scheduler-host .pb-calendar-cell-has-block .pb-month-day-number {
    color: var(--pb-text);
}

.pb-shell .calendar-scheduler-host .pb-calendar-cell-has-items .pb-month-day-state {
    color: var(--pb-primary);
}

.pb-shell .calendar-scheduler-host .pb-calendar-cell-has-block .pb-month-day-state {
    color: var(--pb-error);
}

.pb-shell .calendar-team-column {
    min-height: 100%;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--pb-surface) 97%, transparent), color-mix(in srgb, var(--pb-surface-2) 92%, transparent));
}

.pb-shell .calendar-team-column .mud-paper {
    border: 1px solid color-mix(in srgb, var(--pb-line) 84%, transparent);
    border-radius: var(--pb-radius-md);
}

.pb-shell .calendar-team-filters {
    align-items: flex-end;
    padding: 0.85rem 1rem;
    border: 1px solid color-mix(in srgb, var(--pb-line) 78%, transparent);
    border-radius: var(--pb-radius-lg);
    background: color-mix(in srgb, var(--pb-surface) 94%, var(--pb-surface-2) 6%);
}

.pb-shell .calendar-team-entry-list {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.9rem;
}

.pb-shell .calendar-team-entry {
    position: relative;
    width: 100%;
    display: grid;
    gap: 0.22rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid color-mix(in srgb, var(--pb-line-strong) 72%, transparent);
    border-radius: var(--pb-radius-md);
    background: color-mix(in srgb, var(--pb-surface) 96%, var(--pb-surface-2) 4%);
    text-align: left;
    color: var(--pb-text);
    cursor: pointer;
    transition:
        transform var(--pb-transition-fast),
        border-color var(--pb-transition-fast),
        box-shadow var(--pb-transition-fast),
        background-color var(--pb-transition-fast);
}

.pb-shell .calendar-team-entry::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    border-radius: 999px 0 0 999px;
    background: currentColor;
    opacity: 0.55;
}

.pb-shell .calendar-team-entry:focus-visible {
    outline: 2px solid rgba(var(--pb-primary-rgb), 0.4);
    outline-offset: 2px;
}

@media (hover: hover) {
    .pb-shell .calendar-team-entry:hover {
        transform: translateY(-1px);
        box-shadow: var(--pb-shadow-sm);
    }
}

.pb-shell .calendar-team-entry-time {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: color-mix(in srgb, currentColor 80%, var(--pb-text-muted) 20%);
}

.pb-shell .calendar-team-entry-title {
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.3;
}

.pb-shell .calendar-team-entry-subtitle,
.pb-shell .calendar-team-entry-meta {
    font-size: 0.74rem;
    line-height: 1.35;
    color: color-mix(in srgb, currentColor 74%, var(--pb-text-muted) 26%);
}

.pb-shell .calendar-team-entry.is-appointment.status-confirmado {
    color: color-mix(in srgb, var(--pb-success) 88%, #ffffff 12%);
    background: color-mix(in srgb, var(--pb-success) 10%, var(--pb-surface) 90%);
    border-color: color-mix(in srgb, var(--pb-success) 18%, transparent);
}

.pb-shell .calendar-team-entry.is-appointment.status-pendente {
    color: color-mix(in srgb, var(--pb-warning) 88%, #ffffff 12%);
    background: color-mix(in srgb, var(--pb-warning) 11%, var(--pb-surface) 89%);
    border-color: color-mix(in srgb, var(--pb-warning) 20%, transparent);
}

.pb-shell .calendar-team-entry.is-appointment.status-concluido {
    color: color-mix(in srgb, var(--pb-info) 88%, #ffffff 12%);
    background: color-mix(in srgb, var(--pb-info) 10%, var(--pb-surface) 90%);
    border-color: color-mix(in srgb, var(--pb-info) 20%, transparent);
}

.pb-shell .calendar-team-entry.is-appointment.status-cancelado,
.pb-shell .calendar-team-entry.is-appointment.status-no-show {
    color: color-mix(in srgb, var(--pb-error) 82%, #ffffff 18%);
    background: color-mix(in srgb, var(--pb-error) 9%, var(--pb-surface) 91%);
    border-color: color-mix(in srgb, var(--pb-error) 18%, transparent);
}

.pb-shell .calendar-team-entry.is-package {
    color: color-mix(in srgb, var(--pb-primary-light) 82%, #ffffff 18%);
    background: color-mix(in srgb, rgba(var(--pb-primary-rgb), 0.12) 72%, var(--pb-surface) 28%);
    border-color: rgba(var(--pb-primary-rgb), 0.2);
}

.pb-shell .calendar-team-entry.is-block {
    color: color-mix(in srgb, var(--pb-text) 84%, var(--pb-text-muted) 16%);
    background: color-mix(in srgb, var(--pb-surface-3) 54%, var(--pb-surface) 46%);
    border-color: color-mix(in srgb, var(--pb-line-strong) 82%, transparent);
}

@media (max-width: 959.98px) {
    .pb-shell .calendar-command-bar {
        align-items: stretch;
    }

    .pb-shell .calendar-command-bar-controls {
        width: 100%;
        justify-content: stretch;
    }

    .pb-shell .calendar-view-switch,
    .pb-shell .calendar-primary-actions {
        width: 100%;
    }

    .pb-shell .calendar-view-switch .mud-button-root,
    .pb-shell .calendar-primary-actions .mud-button-root {
        flex: 1 1 0;
        min-height: 2.75rem;
    }

    .pb-shell .calendar-team-filters {
        padding: 0.8rem;
        align-items: stretch;
    }

    .pb-shell .calendar-scheduler-host .mud-cal-toolbar {
        padding: 0.85rem 0.85rem 0.8rem !important;
        align-items: stretch;
    }

    .pb-shell .calendar-scheduler-host .mud-cal-toolbar-nav {
        width: 100%;
        flex-wrap: wrap;
        gap: 0.45rem;
    }

    .pb-shell .calendar-scheduler-host .mud-cal-toolbar-nav .mud-button-root,
    .pb-shell .calendar-scheduler-host .mud-cal-toolbar-nav .mud-icon-button {
        min-height: 2.75rem;
        min-width: 2.75rem;
    }

    .pb-shell .calendar-scheduler-host .mud-cal-toolbar > div:last-child {
        width: 100%;
    }

    .pb-shell .calendar-scheduler-host .mud-cal-toolbar > div:last-child > * {
        width: 100%;
    }

    .pb-shell .calendar-scheduler-host .mud-cal-toolbar .mud-input-control,
    .pb-shell .calendar-scheduler-host .mud-cal-toolbar .mud-select {
        width: 100%;
    }

    .pb-shell .calendar-scheduler-host .mud-cal-month-header,
    .pb-shell .calendar-scheduler-host .mud-cal-week-header > div,
    .pb-shell .calendar-scheduler-host .mud-cal-work-week-header > div,
    .pb-shell .calendar-scheduler-host .mud-cal-day-header > div {
        min-height: 2.75rem;
        font-size: 0.68rem;
        letter-spacing: 0.06em;
    }

    .pb-shell .pb-calendar-item {
        padding: 0.42rem 0.48rem;
        border-radius: 12px;
    }

    .pb-shell .calendar-team-entry {
        padding: 0.76rem 0.8rem;
    }
}
