:root {
    --page: #eef2ef;
    --surface: #ffffff;
    --surface-soft: #f8faf8;
    --line: #dce4de;
    --line-strong: #c9d5ce;
    --text: #17211c;
    --muted: #657169;
    --brand: #1c6b5c;
    --brand-strong: #155346;
    --brand-soft: #e2f0ec;
    --blue-soft: #e8f2ff;
    --blue-text: #1d4f85;
    --amber-soft: #fff1d9;
    --amber-text: #865615;
    --green-soft: #e4f5e9;
    --green-text: #26613b;
    --violet-soft: #f2e8ff;
    --violet-text: #65418b;
    --shadow: 0 18px 45px rgba(19, 32, 26, 0.08);
}

html,
body {
    min-height: 100%;
    background: var(--page);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(28, 107, 92, 0.24);
    outline-offset: 2px;
}

a,
.btn-link {
    color: var(--brand);
}

.page {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

.sidebar {
    background: #14231d;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08);
}

.top-row {
    display: flex;
    align-items: center;
    height: 3.5rem;
    border-bottom: 1px solid var(--line);
    background-color: rgba(255, 255, 255, 0.92);
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 750;
    justify-content: flex-end;
    backdrop-filter: blur(12px);
}

.sidebar .top-row {
    min-height: 3.5rem;
    border-bottom: 0;
    background-color: rgba(0, 0, 0, 0.2);
    justify-content: flex-start;
}

.navbar-brand {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 850;
    text-decoration: none;
}

.navbar-brand:hover {
    color: #ffffff;
}

.navbar-toggler {
    appearance: none;
    cursor: pointer;
    width: 3.5rem;
    height: 2.5rem;
    color: white;
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.72%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") no-repeat center/1.65rem rgba(255, 255, 255, 0.1);
}

.navbar-toggler:checked {
    background-color: rgba(255, 255, 255, 0.5);
}

.bi {
    display: inline-block;
    position: relative;
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
    top: -1px;
    background-size: cover;
}

.bi-calendar-nav-menu {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5ZM1 5v9a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V5H1Z'/%3E%3C/svg%3E");
}

.bi-import-nav-menu {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M.5 9.9a.5.5 0 0 1 .5.5V13a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-2.6a.5.5 0 0 1 1 0V13a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-2.6a.5.5 0 0 1 .5-.5Z'/%3E%3Cpath d='M7.646 10.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 9.293V1.5a.5.5 0 0 0-1 0v7.793L5.354 7.146a.5.5 0 1 0-.708.708l3 3Z'/%3E%3C/svg%3E");
}

.bi-colors-nav-menu {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M8 1a7 7 0 0 0 0 14h.5a1.5 1.5 0 0 0 0-3H8a1 1 0 0 1 0-2h2.5A4.5 4.5 0 0 0 15 5.5C15 3 12.4 1 8 1ZM4.5 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm2-2.5a1 1 0 1 1 2 0 1 1 0 0 1-2 0Zm4 2.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm-7 3a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z'/%3E%3C/svg%3E");
}

.nav-item {
    font-size: 0.9rem;
    padding-bottom: 0.5rem;
}

.nav-item:first-of-type {
    padding-top: 1rem;
}

.nav-item:last-of-type {
    padding-bottom: 1rem;
}

.nav-item .nav-link {
    display: flex;
    align-items: center;
    width: 100%;
    height: 2.8rem;
    border: 0;
    border-radius: 8px;
    background: none;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 750;
    line-height: 2.8rem;
}

.nav-item a.active {
    background-color: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.nav-item .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.nav-scrollable {
    display: none;
}

.navbar-toggler:checked ~ .nav-scrollable {
    display: block;
}

.content {
    padding-top: 1.4rem;
    padding-bottom: 2rem;
}

h1:focus {
    outline: none;
}

.calendar-shell {
    display: grid;
    gap: 1rem;
    width: min(100%, 1420px);
    margin: 0 auto;
}

.ticker-banner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #14231d;
    color: #ffffff;
    box-shadow: var(--shadow);
}

.ticker-label {
    position: relative;
    z-index: 1;
    height: 100%;
    padding: 0.8rem 1rem;
    background: var(--brand);
    font-size: 0.82rem;
    font-weight: 900;
    text-transform: uppercase;
    white-space: nowrap;
}

.ticker-track {
    overflow: hidden;
    min-width: 0;
    mask-image: linear-gradient(90deg, transparent 0, black 2rem, black calc(100% - 2rem), transparent 100%);
}

.ticker-content {
    display: inline-flex;
    width: max-content;
    gap: 2rem;
    padding: 0 2rem;
    animation: ticker-scroll 34s linear infinite;
    white-space: nowrap;
}

.ticker-content span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 750;
}

.ticker-content strong {
    color: #ffffff;
    font-weight: 950;
}

.ticker-banner:hover .ticker-content {
    animation-play-state: paused;
}

@keyframes ticker-scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.calendar-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: end;
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.eyebrow {
    margin: 0 0 0.25rem;
    color: var(--brand);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

.calendar-header h1 {
    margin: 0;
    color: var(--text);
    font-size: clamp(2rem, 4vw, 3.6rem);
    font-weight: 800;
    line-height: 1;
}

.header-meta {
    margin: 0.55rem 0 0;
    color: var(--muted);
    font-size: 1rem;
    font-weight: 700;
}

.primary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-end;
}

.secondary-button,
.new-event-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 7rem;
    height: 2.75rem;
    padding: 0 1rem;
    border-radius: 7px;
    font-weight: 850;
    text-decoration: none;
}

.secondary-button {
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: #26342d;
}

.secondary-button:hover {
    background: var(--surface-soft);
}

.new-event-button {
    border: 1px solid var(--brand-strong);
    background: var(--brand);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(28, 107, 92, 0.22);
}

.new-event-button:hover {
    background: var(--brand-strong);
}

.calendar-toolbar {
    display: grid;
    grid-template-columns: auto auto minmax(220px, 1fr);
    gap: 0.8rem;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 12px 32px rgba(19, 32, 26, 0.06);
}

.calendar-actions,
.view-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.icon-button,
.today-button,
.view-switcher button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2.35rem;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font-weight: 850;
}

.icon-button {
    min-width: 2.35rem;
    font-size: 1.25rem;
    line-height: 1;
}

.today-button {
    padding: 0 0.9rem;
    color: var(--brand-strong);
}

.view-switcher button {
    padding: 0 0.95rem;
}

.icon-button:hover,
.today-button:hover,
.view-switcher button:hover {
    background: #edf4f0;
    color: var(--text);
}

.view-switcher button.active {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 2px 8px rgba(19, 32, 26, 0.08);
}

.calendar-search {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-self: stretch;
    min-width: 0;
    height: 2.85rem;
    padding: 0 0.9rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 850;
}

.agenda-picker {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    height: 2.85rem;
    padding: 0 0.9rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 850;
}

.agenda-picker select {
    min-width: 0;
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-weight: 800;
}

.calendar-search input {
    min-width: 0;
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
}

.calendar-search input::placeholder {
    color: #8a948d;
}

.import-shell {
    display: grid;
    gap: 1rem;
    width: min(100%, 1240px);
    margin: 0 auto;
}

.settings-shell {
    display: grid;
    gap: 1rem;
    width: min(100%, 980px);
    margin: 0 auto;
}

.import-header,
.import-editor,
.import-preview {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.import-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: end;
    padding: 1.1rem 1.25rem;
}

.import-header h1 {
    margin: 0;
    color: var(--text);
    font-size: clamp(2rem, 4vw, 3.3rem);
    font-weight: 800;
    line-height: 1;
}

.import-header p:last-child {
    margin: 0.55rem 0 0;
    color: var(--muted);
    font-weight: 700;
}

.import-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 1rem;
    align-items: start;
}

.import-editor {
    display: grid;
    gap: 0.8rem;
    padding: 1rem;
}

.import-editor label {
    color: var(--text);
    font-weight: 900;
}

.import-editor textarea {
    width: 100%;
    min-height: 460px;
    resize: vertical;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--text);
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.92rem;
    line-height: 1.45;
}

.agenda-name-input {
    width: min(100%, 26rem);
    height: 2.85rem;
    padding: 0 0.9rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--text);
    font-weight: 800;
}

.import-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-end;
}

.import-message {
    margin: 0;
    padding: 0.75rem 0.85rem;
    border-radius: 8px;
    background: var(--brand-soft);
    color: var(--brand-strong);
    font-weight: 850;
}

.import-errors {
    display: grid;
    gap: 0.35rem;
    padding: 0.85rem;
    border: 1px solid #edc7bc;
    border-radius: 8px;
    background: #fff3ef;
    color: #833b28;
}

.import-errors span {
    font-size: 0.9rem;
}

.import-preview {
    position: sticky;
    top: 4.5rem;
    padding: 1rem;
}

.color-config-panel {
    display: grid;
    gap: 0.65rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.color-config-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto 5.5rem;
    gap: 0.85rem;
    align-items: center;
    padding: 0.85rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.color-config-row strong {
    color: var(--text);
    font-weight: 900;
}

.color-config-row input[type="color"] {
    width: 3.4rem;
    height: 2.25rem;
    padding: 0.15rem;
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    background: var(--surface);
}

.color-config-row code {
    color: var(--muted);
    font-size: 0.86rem;
}

.preview-list {
    display: grid;
    gap: 0.65rem;
}

.preview-item {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.preview-item > span {
    color: var(--brand);
    font-weight: 900;
}

.preview-item strong,
.preview-item small {
    display: block;
}

.preview-item strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-item small {
    margin-top: 0.15rem;
    color: var(--muted);
}

.calendar-workspace {
    display: grid;
    grid-template-columns: minmax(620px, 1fr) 360px;
    gap: 1rem;
    align-items: start;
}

.month-view,
.year-view,
.agenda-panel {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.year-view {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.mini-month {
    min-width: 0;
    padding: 0.85rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.mini-month.past-month {
    opacity: 0.48;
}

.mini-month.past-month:hover {
    opacity: 0.72;
}

.mini-month header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.mini-month header strong {
    color: var(--text);
    font-size: 1rem;
    font-weight: 900;
}

.mini-month header span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.7rem;
    height: 1.7rem;
    padding: 0 0.45rem;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-strong);
    font-size: 0.78rem;
    font-weight: 950;
}

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

.mini-weekdays {
    margin-bottom: 0.3rem;
}

.mini-weekdays span {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 900;
    text-align: center;
}

.mini-day-grid {
    gap: 0.22rem;
}

.mini-day {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    min-width: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #334039;
    font-size: 0.76rem;
    font-weight: 800;
}

.mini-day:hover {
    background: #edf4f0;
}

.mini-day.muted {
    color: #b0bab3;
}

.mini-day.past-day {
    background: #edf0ed;
    color: #9aa59e;
}

.mini-day.past-day.has-event {
    opacity: 0.62;
}

.mini-day.has-event {
    background: var(--appointment-color, var(--brand));
    color: #ffffff;
    box-shadow: 0 5px 12px rgba(28, 107, 92, 0.24);
}

.mini-day.has-event:hover {
    filter: brightness(0.92);
}

.mini-day.selected {
    box-shadow: inset 0 0 0 2px #ffffff, 0 0 0 2px var(--brand);
}

.season-view .mini-month header strong {
    font-size: 0.92rem;
}

.combined-season-view .mini-day-grid {
    gap: 0.28rem;
}

.combined-day {
    position: relative;
    flex-direction: column;
    gap: 0.12rem;
    border-radius: 7px;
}

.combined-day.has-event {
    background: #ffffff;
    color: var(--text);
    box-shadow: inset 0 0 0 1px var(--line-strong);
}

.combined-day-number {
    line-height: 1;
}

.combined-markers {
    display: flex;
    gap: 0.12rem;
    align-items: center;
    justify-content: center;
    min-height: 0.8rem;
}

.combined-markers i,
.combined-agenda-legend i,
.combined-agenda-group header span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    border-radius: 999px;
    color: #ffffff;
    background: var(--brand);
    font-size: 0.58rem;
    font-style: normal;
    font-weight: 950;
}

.combined-markers i {
    min-width: 0.72rem;
    height: 0.72rem;
    font-size: 0;
}

.combined-agenda-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.combined-agenda-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.55rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 850;
}

.combined-agenda-group {
    padding-top: 1rem;
}

.combined-agenda-group + .combined-agenda-group {
    border-top: 1px solid var(--line);
    margin-top: 1rem;
}

.combined-agenda-group header {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.7rem;
}

.combined-agenda-group header strong {
    color: var(--text);
    font-size: 1rem;
}

.weekday-row,
.day-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.weekday-row {
    border-bottom: 1px solid var(--line);
    background: #fbfcfb;
}

.weekday-row div {
    padding: 0.8rem 0.75rem;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 900;
    text-align: right;
    text-transform: uppercase;
}

.day-grid {
    min-height: 660px;
}

.day-cell {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-height: 110px;
    padding: 0.65rem;
    border: 0;
    border-right: 1px solid #e7ece8;
    border-bottom: 1px solid #e7ece8;
    background: var(--surface);
    color: inherit;
    text-align: left;
    transition: background 140ms ease, box-shadow 140ms ease;
}

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

.day-cell:nth-last-child(-n + 7) {
    border-bottom: 0;
}

.day-cell:hover {
    background: #f3f8f5;
    box-shadow: inset 0 0 0 1px rgba(28, 107, 92, 0.16);
}

.day-cell.selected {
    background: #ecf6f2;
    box-shadow: inset 0 0 0 2px rgba(28, 107, 92, 0.34);
}

.day-cell.muted {
    background: #fafbfa;
    color: #8c968f;
}

.date-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-end;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 900;
}

.day-cell.today .date-number {
    background: var(--brand);
    color: #ffffff;
}

.event-pill,
.more-events {
    overflow: hidden;
    width: 100%;
    min-height: 1.55rem;
    padding: 0.28rem 0.5rem;
    border-radius: 5px;
    font-size: 0.78rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.event-pill {
    background: var(--appointment-color, var(--brand));
    color: #ffffff;
}

.event-pill.focus {
    background: var(--blue-soft);
    color: var(--blue-text);
}

.event-pill.creative {
    background: var(--amber-soft);
    color: var(--amber-text);
}

.event-pill.team {
    background: var(--green-soft);
    color: var(--green-text);
}

.event-pill.external {
    background: var(--violet-soft);
    color: var(--violet-text);
}

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

.agenda-panel {
    position: sticky;
    top: 4.5rem;
    padding: 1rem;
}

.agenda-date {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.95rem;
    border-bottom: 1px solid var(--line);
}

.agenda-date span {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 800;
}

.agenda-date strong {
    display: block;
    margin-top: 0.15rem;
    color: var(--text);
    font-size: 1.45rem;
    line-height: 1.1;
}

.agenda-count {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-strong) !important;
    font-weight: 950 !important;
}

.agenda-list {
    display: grid;
    gap: 0.75rem;
    padding-top: 1rem;
}

.agenda-item {
    display: grid;
    grid-template-columns: 4.2rem minmax(0, 1fr);
    gap: 0.8rem;
    padding: 0.8rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.agenda-time {
    color: var(--appointment-color, var(--brand));
    font-weight: 900;
}

.agenda-item strong,
.agenda-item span {
    display: block;
}

.agenda-item div span {
    margin-top: 0.15rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.empty-agenda {
    display: grid;
    gap: 0.25rem;
    margin-top: 1rem;
    padding: 1rem;
    border: 1px dashed var(--line-strong);
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--muted);
}

.empty-agenda strong {
    color: var(--text);
}

.upcoming-block {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.7rem;
}

.panel-heading strong {
    color: var(--text);
    font-size: 0.95rem;
}

.panel-heading span {
    color: var(--muted);
    font-weight: 850;
}

.panel-heading a {
    color: var(--brand);
    font-size: 0.86rem;
    font-weight: 900;
    text-decoration: none;
}

.panel-heading button {
    border: 0;
    background: transparent;
    color: var(--brand);
    font-size: 0.86rem;
    font-weight: 900;
}

.panel-heading button:disabled {
    color: var(--muted);
    cursor: wait;
}

.map-panel {
    display: grid;
    gap: 0.7rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.map-panel iframe {
    width: 100%;
    min-height: 230px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.map-panel a {
    color: var(--brand);
    font-size: 0.86rem;
    font-weight: 850;
    line-height: 1.35;
    text-decoration: none;
}

.map-panel p {
    margin: 0;
    padding: 0.8rem;
    border: 1px dashed var(--line-strong);
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 750;
}

.legend-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.45rem;
}

.legend-list span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 800;
}

.legend-list i,
.legend-swatch {
    display: inline-block;
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.upcoming-item {
    display: grid;
    grid-template-columns: 3.8rem minmax(0, 1fr);
    gap: 0.7rem;
    width: 100%;
    margin-top: 0.45rem;
    padding: 0.7rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    text-align: left;
}

.upcoming-item:hover {
    border-color: var(--line);
    background: var(--surface-soft);
}

.upcoming-item span {
    color: var(--brand);
    font-size: 0.84rem;
    font-weight: 900;
}

.upcoming-item strong {
    overflow: hidden;
    font-size: 0.92rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: #b32121;
    color: white;
    padding: 1rem;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

#blazor-error-ui {
    display: none;
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    box-sizing: border-box;
    padding: 0.7rem 1.25rem;
    border-top: 1px solid #d6bc48;
    background: #fff7cd;
    color: #2f2b16;
    box-shadow: 0 -4px 18px rgba(19, 32, 26, 0.14);
}

#blazor-error-ui .reload {
    color: #155346;
    font-weight: 800;
}

#blazor-error-ui .dismiss {
    position: absolute;
    top: 0.55rem;
    right: 0.75rem;
    cursor: pointer;
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

@media (max-width: 1180px) {
    .calendar-workspace {
        grid-template-columns: 1fr;
    }

    .agenda-panel {
        position: static;
    }

    .import-layout {
        grid-template-columns: 1fr;
    }

    .import-preview {
        position: static;
    }

    .year-view {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 641px) {
    .page {
        flex-direction: row;
    }

    .sidebar {
        width: 230px;
        height: 100vh;
        position: sticky;
        top: 0;
    }

    .top-row {
        position: sticky;
        top: 0;
        z-index: 1;
    }

    .top-row,
    article {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }

    .navbar-toggler {
        display: none;
    }

    .nav-scrollable {
        display: block;
        height: calc(100vh - 3.5rem);
        overflow-y: auto;
    }
}

@media (max-width: 760px) {
    .content {
        padding: 1rem !important;
    }

    .calendar-header {
        grid-template-columns: 1fr;
    }

    .import-header {
        grid-template-columns: 1fr;
    }

    .primary-actions {
        justify-content: stretch;
    }

    .secondary-button,
    .new-event-button {
        flex: 1;
    }

    .calendar-toolbar {
        grid-template-columns: 1fr;
    }

    .calendar-actions,
    .view-switcher {
        justify-content: space-between;
        width: 100%;
    }

    .view-switcher button {
        flex: 1;
    }

    .weekday-row div {
        padding: 0.6rem 0.25rem;
        text-align: center;
    }

    .day-grid {
        min-height: 0;
    }

    .day-cell {
        min-height: 88px;
        padding: 0.45rem;
    }

    .event-pill {
        min-height: 0.45rem;
        padding: 0;
        color: transparent;
    }

    .more-events {
        display: none;
    }

    .year-view {
        grid-template-columns: 1fr;
        padding: 0.75rem;
    }
}
