.communication-calendar-v2 {
    --ccal-purple: #5749e8;
    --ccal-ink: #172033;
    --ccal-muted: #8c99ae;
    --ccal-line: #dfe5ee;
    color: var(--ccal-ink);
    font-size: 13px;
}

.communication-calendar-v2 * { box-sizing: border-box; }
.communication-calendar-v2 a { color: inherit; text-decoration: none; }
.ccal-toolbar { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: -20px -20px 0; padding: 10px 20px; background: #fff; border-bottom: 1px solid var(--ccal-line); }
.ccal-heading h1 { margin: 0; font-size: 20px; font-weight: 760; letter-spacing: -.02em; }
.ccal-heading p { margin: 4px 0 0; color: #9ba7ba; font-size: 11px; }
.ccal-toolbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.ccal-mode-switch, .ccal-period-nav { display: flex; align-items: center; padding: 4px; background: #f1f4f8; border-radius: 11px; }
.ccal-mode-switch a { min-width: 48px; padding: 7px 10px; color: #66748a; border-radius: 8px; text-align: center; font-size: 11px; font-weight: 650; }
.ccal-mode-switch a.is-active { color: #253044; background: #fff; box-shadow: 0 2px 5px rgba(26, 37, 57, .08); }
.ccal-period-nav { padding: 0; }
.ccal-period-nav a { min-width: 34px; height: 36px; display: grid; place-items: center; color: #68768b; }
.ccal-period-nav .ccal-today { min-width: 72px; font-size: 11px; font-weight: 700; }
.ccal-btn { min-height: 38px; padding: 0 13px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: #354156 !important; background: #fff; border: 1px solid #dce2eb; border-radius: 10px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.ccal-btn iconify-icon { color: #f2ad0f; font-size: 16px; }
.ccal-btn:nth-last-child(2) iconify-icon { color: #9c50ec; }
.ccal-btn.is-primary { color: #fff !important; background: linear-gradient(135deg, #6357ed, #4d3cda); border-color: transparent; box-shadow: 0 7px 15px rgba(79, 61, 218, .2); }
.ccal-btn.is-primary iconify-icon { color: #fff; }

.ccal-layout { min-height: calc(100vh - 165px); display: grid; grid-template-columns: 208px minmax(0, 1fr); margin: 0 -20px -20px; }
.ccal-sidebar { padding: 18px 14px; background: #fff; border-right: 1px solid var(--ccal-line); }
.ccal-filter-section { padding: 0 0 15px; margin-bottom: 14px; border-bottom: 1px solid #edf0f5; }
.ccal-filter-section h2 { margin: 0 0 10px; color: #8d9bb0; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.ccal-filter-option { min-height: 30px; margin-bottom: 3px; padding: 4px 7px; display: flex; align-items: center; gap: 9px; color: #47546a; border: 1px solid transparent; border-radius: 7px; cursor: pointer; font-size: 11px; }
.ccal-filter-option:hover, .ccal-filter-option.is-highlighted:has(input:checked) { color: #4256cb; background: #edf4ff; border-color: #cfdffc; }
.ccal-filter-option input { position: absolute; opacity: 0; pointer-events: none; }
.ccal-filter-option > span { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ccal-filter-option > b { color: #91a0b5; font-size: 10px; font-weight: 600; }
.ccal-filter-option > i:not(.ccal-avatar), .ccal-filter-color { width: 10px; height: 10px; flex: 0 0 10px; background: #9aa6b8; border-radius: 2px; }
.ccal-filter-option > i.is-draft { background: #98a6ba; }
.ccal-filter-option > i.is-awaiting { background: #f6ae13; }
.ccal-filter-option > i.is-scheduled { background: #6358eb; }
.ccal-filter-option > i.is-published { background: #20ae83; }
.ccal-filter-option > i.is-failed { background: #ed4450; }
.ccal-filter-option > .ccal-filter-color { background: var(--filter-color); }
.ccal-filter-option > iconify-icon { flex: 0 0 14px; font-size: 14px; }
.ccal-filter-option > iconify-icon.is-linkedin { color: #1875d1; }
.ccal-filter-option > iconify-icon.is-twitter { color: #171d29; }
.ccal-filter-option > iconify-icon.is-instagram { color: #ed4e89; }
.ccal-filter-option > iconify-icon.is-facebook { color: #3477d3; }
.ccal-avatar { width: 20px; height: 20px; flex: 0 0 20px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #2bb4bc, #2d7296); border-radius: 50%; font-size: 9px; font-style: normal; font-weight: 800; }
.ccal-filter-empty { color: #a2acbc; font-size: 10px; }
.ccal-clear { display: flex; align-items: center; justify-content: center; gap: 5px; color: #8290a5 !important; font-size: 10px; }
.ccal-mobile-filter-title, .ccal-mobile-filter { display: none; }

.ccal-content { min-width: 0; padding: 18px; background: #f8fafc; }
.ccal-content-title { min-height: 42px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.ccal-content-title h2 { margin: 3px 0 0; font-size: 19px; font-weight: 750; }
.ccal-content-title > div:first-child { display: flex; align-items: center; gap: 10px; }
.ccal-status-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.ccal-status-legend span { padding: 5px 9px; display: inline-flex; align-items: center; gap: 6px; color: #66748a; background: #fff; border: 1px solid #dfe5ee; border-radius: 99px; font-size: 10px; }
.ccal-status-legend i { width: 7px; height: 7px; border-radius: 50%; }
.ccal-status-legend .is-draft { background: #9aa7ba; }
.ccal-status-legend .is-awaiting { background: #f4ad13; }
.ccal-status-legend .is-scheduled { background: #6358eb; }
.ccal-status-legend .is-published { background: #20ae83; }
.ccal-status-legend .is-failed { background: #ed4653; }

.ccal-calendar { min-width: 760px; overflow: hidden; }
.ccal-weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); height: 36px; align-items: center; color: #8593a9; font-size: 10px; font-weight: 750; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.ccal-days { display: grid; grid-template-columns: repeat(var(--calendar-columns), minmax(0, 1fr)); background: #fff; border: 1px solid var(--ccal-line); border-radius: 12px; overflow: hidden; }
.ccal-day { min-width: 0; min-height: 105px; padding: 7px; background: #fff; border-right: 1px solid var(--ccal-line); border-bottom: 1px solid var(--ccal-line); }
.ccal-calendar.is-month .ccal-day:nth-child(7n) { border-right: 0; }
.ccal-calendar.is-month .ccal-day:nth-last-child(-n+7) { border-bottom: 0; }
.ccal-calendar.is-week .ccal-day { min-height: 570px; border-bottom: 0; }
.ccal-calendar.is-week .ccal-day:last-child { border-right: 0; }
.ccal-calendar.is-day { min-width: 0; }
.ccal-calendar.is-day .ccal-day { min-height: 570px; border: 0; }
.ccal-day.is-outside { background: #f8fafc; }
.ccal-day > header { height: 21px; display: flex; align-items: center; gap: 6px; color: #425067; font-size: 11px; }
.ccal-day.is-outside > header { color: #b6c0cf; }
.ccal-day.is-today { outline: 2px solid #7384f4; outline-offset: -2px; background: #f8f9ff; }
.ccal-day.is-today > header time { width: 22px; height: 22px; display: grid; place-items: center; color: #fff; background: #5a4ce4; border-radius: 50%; font-weight: 750; }
.ccal-day > header strong { color: #5d50e5; font-size: 10px; }
.ccal-day-events { display: flex; flex-direction: column; gap: 4px; }
.ccal-event { min-width: 0; min-height: 42px; padding: 5px 6px; display: block; color: #354156 !important; background: #f3f6fa; border: 1px solid #d9e0e9; border-left: 3px solid #9aa7ba; border-radius: 7px; overflow: hidden; }
.ccal-event > span { display: flex; align-items: center; gap: 3px; color: #78869b; font-size: 9px; }
.ccal-event > span > iconify-icon { font-size: 11px; }
.ccal-event > span > iconify-icon.is-linkedin { color: #1775d1; }
.ccal-event > span > iconify-icon.is-twitter { color: #25a8df; }
.ccal-event > span > iconify-icon.is-instagram { color: #ef4f89; }
.ccal-event > span > iconify-icon.is-facebook { color: #3477d3; }
.ccal-event strong { display: block; margin-top: 2px; overflow: hidden; font-size: 10px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.ccal-event.is-awaiting { background: #fff9e9; border-color: #f4d575; border-left-color: #f4ad13; }
.ccal-event.is-scheduled { background: #eef1ff; border-color: #bec8ff; border-left-color: #6257ea; }
.ccal-event.is-published { background: #eafaf4; border-color: #cdf2e5; border-left-color: #20ae83; }
.ccal-event.is-failed { background: #fff0f1; border-color: #ffd7db; border-left-color: #ed4653; }
.ccal-event-alert { margin-left: auto; color: #ed4653 !important; }
.ccal-day-empty { margin: 30px 10px; color: #9ca8b9; text-align: center; }

.ccal-list-view { background: #fff; border: 1px solid var(--ccal-line); border-radius: 12px; overflow: hidden; }
.ccal-list-view > a { min-height: 66px; padding: 9px 14px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #edf0f4; }
.ccal-list-view > a:last-child { border-bottom: 0; }
.ccal-list-view > a:hover { background: #fafbfe; }
.ccal-list-view time { width: 38px; display: flex; flex-direction: column; align-items: center; color: #5749df; }
.ccal-list-view time b { font-size: 18px; line-height: 1; }
.ccal-list-view time span { margin-top: 3px; font-size: 9px; text-transform: uppercase; }
.ccal-platform { width: 34px; height: 34px; display: grid; place-items: center; color: #69778b; background: #edf2f7; border-radius: 9px; font-style: normal; font-size: 18px; }
.ccal-platform.is-linkedin { color: #1775d1; background: #e9f3ff; }
.ccal-platform.is-instagram { color: #ed4f89; background: #ffedf4; }
.ccal-list-view > a > span { flex: 1; min-width: 0; }
.ccal-list-view strong, .ccal-list-view small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ccal-list-view small { margin-top: 3px; color: #96a2b4; font-size: 10px; }
.ccal-list-status { padding: 5px 9px; color: #66748b; background: #eef2f6; border-radius: 99px; font-size: 9px; }
.ccal-list-status.is-awaiting { color: #b47700; background: #fff3cf; }
.ccal-list-status.is-scheduled { color: #5145d5; background: #ebe9ff; }
.ccal-list-status.is-published { color: #168461; background: #def7ec; }
.ccal-list-status.is-failed { color: #c63e49; background: #ffe5e8; }
.ccal-list-empty { min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #9ba7b8; }
.ccal-list-empty iconify-icon { margin-bottom: 10px; font-size: 35px; }
.ccal-list-empty strong { color: #647187; }
.ccal-list-empty span { margin-top: 4px; font-size: 11px; }

@media (max-width: 1300px) {
    .ccal-toolbar { align-items: flex-start; }
    .ccal-toolbar-actions { flex-wrap: wrap; }
    .ccal-btn:nth-last-child(2) { display: none; }
}

@media (max-width: 1050px) {
    .ccal-layout { grid-template-columns: 1fr; }
    .ccal-sidebar { position: fixed; z-index: 1050; top: 0; bottom: 0; left: 0; width: 270px; padding: 18px; overflow-y: auto; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 10px 0 30px rgba(28, 36, 51, .15); }
    .ccal-sidebar.is-open { transform: translateX(0); }
    .ccal-mobile-filter-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
    .ccal-mobile-filter-title button { padding: 0; color: #7d899b; background: none; border: 0; font-size: 20px; }
    .ccal-mobile-filter { min-height: 32px; padding: 0 10px; display: inline-flex; align-items: center; gap: 5px; color: #536177; background: #fff; border: 1px solid #dce2eb; border-radius: 8px; font-size: 10px; }
    body.ccal-filters-open::after { content: ''; position: fixed; z-index: 1040; inset: 0; background: rgba(19, 27, 42, .35); }
}

@media (max-width: 800px) {
    .ccal-toolbar { flex-direction: column; }
    .ccal-toolbar-actions { width: 100%; justify-content: flex-start; }
    .ccal-mode-switch { order: 1; }
    .ccal-period-nav { order: 2; }
    .ccal-toolbar .ccal-btn { display: none; }
    .ccal-content { overflow-x: auto; }
    .ccal-content-title { min-width: 760px; }
    .ccal-calendar.is-day, .ccal-content:has(.ccal-list-view) .ccal-content-title, .ccal-list-view { min-width: 0; }
}
