* { box-sizing: border-box; }
body {
    margin: 0;
    background: #f1f5f9;
    color: #172033;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.container { max-width: 1500px; margin: 0 auto; padding: 20px; }
.header { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 18px; }
h1 { margin: 0; font-size: 28px; }
.header p { margin: 5px 0 0; color: #64748b; }
.card { background: white; border: 1px solid #dbe2ea; border-radius: 10px; box-shadow: 0 2px 8px rgba(15, 23, 42, .05); }
.controls { display: grid; grid-template-columns: repeat(3, minmax(220px, 1fr)); gap: 16px; padding: 18px; align-items: end; }
.selector label, .search-box label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; }
select, input[type="search"] { width: 100%; padding: 10px; border: 1px solid #cbd5e1; border-radius: 7px; background: white; font-size: 14px; }
.toolbar-row { grid-column: 1 / -1; display: flex; gap: 16px; align-items: end; justify-content: space-between; }
.search-box { flex: 1; max-width: 500px; }
.buttons { display: flex; gap: 8px; flex-wrap: wrap; }
button { border: 0; border-radius: 7px; padding: 10px 14px; background: #172033; color: white; font-weight: 700; cursor: pointer; }
button:hover { filter: brightness(1.08); }
button:disabled { opacity: .6; cursor: wait; }
button.secondary { background: white; color: #172033; border: 1px solid #cbd5e1; }
.status { display: flex; gap: 28px; flex-wrap: wrap; padding: 12px 16px; margin: 12px 0; font-size: 13px; color: #64748b; }
.status strong { color: #172033; }
.source-ok { color: #15803d !important; }
.source-cache { color: #b45309 !important; }
.calendar { padding: 4px; overflow: hidden; }
.error { margin: 12px 0; padding: 12px 16px; border-left: 4px solid #dc2626; background: #fee2e2; color: #991b1b; border-radius: 6px; }
.hidden { display: none !important; }
.loading { color: #2563eb; font-weight: 700; }
.fc .fc-toolbar-title { font-size: 18px; }
.fc-event { cursor: pointer; }
.custom-event { padding: 2px 3px; line-height: 1.2; overflow: hidden; }
.custom-event-title { font-weight: 800; }
.custom-event-meta { font-weight: 700; margin-top: 2px; }
.custom-event-detail { font-size: 11px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-list-event-title { font-weight: 700; }

@media (max-width: 1000px) {
    .controls { grid-template-columns: 1fr 1fr; }
    .toolbar-row { grid-column: 1 / -1; flex-direction: column; align-items: stretch; }
    .search-box { max-width: none; }
}

@media (max-width: 700px) {
    .container { padding: 10px; }
    .header { align-items: start; flex-direction: column; }
    h1 { font-size: 23px; }
    .controls { grid-template-columns: 1fr; padding: 12px; }
    .toolbar-row { grid-column: auto; }
    .buttons { display: grid; grid-template-columns: 1fr 1fr; }
    .buttons button:last-child { grid-column: 1 / -1; }
    .status { gap: 10px 18px; }
    .calendar { padding: 0; }
    .fc .fc-toolbar { flex-wrap: wrap; gap: 8px; }
    .fc .fc-toolbar-title { font-size: 16px; }
    .fc .fc-button { padding: 6px 8px; font-size: 12px; }
}


.promo-toggle {
    display: flex;
    align-items: center;
    min-height: 40px;
    white-space: nowrap;
}

.promo-toggle label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    cursor: pointer;
}

.promo-toggle input {
    width: 16px;
    height: 16px;
}

.release-notes { margin-top: 16px; padding: 18px 20px; }
.release-notes h2 { margin: 0 0 10px; font-size: 18px; }
.release-notes ul { margin: 0; padding-left: 20px; }
.release-notes li { margin: 5px 0; }
.subscription-note { margin: 12px 0 0; color: #64748b; font-size: 13px; }
.footer { padding: 18px 0 8px; text-align: center; color: #64748b; font-size: 13px; }
@media (max-width: 1000px) { .buttons { width: 100%; } }
