.calendar-workspace { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(245px, .8fr); align-items: start; gap: 9px; }
.calendar-month-panel { min-width: 0; overflow: hidden; }
.calendar-month-toolbar { display: flex; min-height: 49px; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 9px; border-bottom: 1px solid #2a363a; }
.calendar-month-nav { display: flex; align-items: center; gap: 6px; }
.calendar-month-nav h2 { min-width: 130px; margin: 0; color: #dce6de; font-size: 13px; font-weight: 630; text-align: center; text-transform: capitalize; }
.calendar-nav-button, .calendar-today-button { display: inline-grid; min-width: 27px; height: 27px; place-items: center; border: 1px solid #344247; border-radius: 5px; background: #141d20; color: #c4d0c7; cursor: pointer; }
.calendar-nav-button { font-size: 18px; line-height: 1; }
.calendar-today-button { padding: 0 8px; color: #c7dca9; font-size: 8px; }
.calendar-nav-button:hover, .calendar-today-button:hover { border-color: #627751; background: #1a2520; }
.calendar-month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekday { display: grid; min-height: 27px; place-items: center; border-bottom: 1px solid #2a363a; color: #829087; font-size: 8px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.calendar-day { display: grid; min-width: 0; min-height: 101px; align-content: start; gap: 5px; padding: 6px; border: 0; border-right: 1px solid #222e32; border-bottom: 1px solid #222e32; background: #11191c; color: #d7e0d8; cursor: pointer; text-align: left; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day:hover { background: #172120; }
.calendar-day.is-outside { background: #0e1518; color: #65736c; }
.calendar-day.is-selected { box-shadow: inset 0 0 0 1px #718650; background: #18231d; }
.calendar-day.is-today .calendar-day-heading > strong { display: grid; width: 19px; height: 19px; place-items: center; border-radius: 50%; background: #c6df9e; color: #152019; }
.calendar-day-heading { display: flex; min-height: 19px; align-items: center; justify-content: space-between; gap: 4px; }
.calendar-day-heading > strong { color: inherit; font-size: 9px; font-weight: 620; }
.calendar-day-dots { display: flex; gap: 3px; }
.calendar-day-dots i, .calendar-legend i { width: 5px; height: 5px; border-radius: 50%; background: #8ba993; }
.calendar-day-dots i.impact-high, .calendar-legend i.impact-high { background: #ec8989; }
.calendar-day-dots i.impact-medium, .calendar-legend i.impact-medium { background: #e4c16d; }
.calendar-day-dots i.impact-low, .calendar-legend i.impact-low { background: #8ba993; }
.calendar-day-events { display: grid; min-width: 0; gap: 3px; }
.calendar-event-chip { display: flex; min-width: 0; align-items: center; gap: 4px; overflow: hidden; padding: 2px 3px; border-radius: 3px; background: #17221b; color: #b9ceb5; }
.calendar-event-chip > i { width: 4px; height: 4px; flex: 0 0 auto; border-radius: 50%; background: #8ba993; }
.calendar-event-chip.impact-high { background: #2a1c1e; color: #e5b0ad; }
.calendar-event-chip.impact-high > i { background: #ec8989; }
.calendar-event-chip.impact-medium { background: #292319; color: #e2cb8e; }
.calendar-event-chip.impact-medium > i { background: #e4c16d; }
.calendar-event-chip > span { overflow: hidden; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event-more { color: #87958b; font-size: 7px; }
.calendar-mobile-count { display: none; color: #91a097; font-size: 7px; }
.calendar-legend { display: flex; min-height: 30px; flex-wrap: wrap; align-items: center; gap: 8px 13px; padding: 5px 9px; color: #91a097; }
.calendar-legend > span { display: inline-flex; align-items: center; gap: 4px; font-size: 7px; }
.calendar-legend small { margin-left: auto; color: #74827a; font-size: 7px; }
.calendar-feed-status { min-height: 30px; }
.calendar-next { width: 100%; min-height: 57px; color: inherit; cursor: pointer; text-align: left; transition: border-color .15s ease, background .15s ease; }
.calendar-next:hover { border-color: #8a7842; background: linear-gradient(100deg, #29251a, #17201d); }
.calendar-next-copy { display: grid; min-width: 0; gap: 3px; }
.calendar-next-copy > strong { overflow: hidden; color: #e2dfcc; font-size: 10px; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.calendar-next-copy > small { color: #9b9683; font-size: 8px; }
.calendar-next-action { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 8px; color: #c7bf9e; font-size: 12px; }
.calendar-next-empty { display: flex; min-height: 48px; align-items: center; gap: 10px; padding: 9px 11px; }
.calendar-next-empty > strong { color: #a8b4ab; font-size: 9px; font-weight: 550; }
.calendar-day-agenda { min-width: 0; overflow: hidden; }
.calendar-day-agenda .panel-heading { min-height: 49px; align-items: center; padding: 6px 9px; }
.calendar-day-agenda .panel-heading h2 { max-width: 190px; color: #d6e1d8; font-size: 10px; font-weight: 590; text-transform: capitalize; }
.calendar-agenda-event-list { display: grid; }
.calendar-agenda-event { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 7px; min-height: 58px; padding: 7px 9px; border: 0; border-bottom: 1px solid #253136; background: transparent; color: inherit; cursor: pointer; text-align: left; }
.calendar-agenda-event:last-child { border-bottom: 0; }
.calendar-agenda-event:hover { background: #17211e; }
.calendar-agenda-event-time { color: #bac7bd; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 8px; }
.calendar-agenda-event-copy { display: grid; min-width: 0; gap: 3px; }
.calendar-agenda-event-copy > strong { overflow: hidden; color: #d6e0d8; font-size: 8px; font-weight: 590; text-overflow: ellipsis; white-space: nowrap; }
.calendar-agenda-event-copy > small { overflow: hidden; color: #839188; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.calendar-agenda-event .impact-badge { font-size: 7px; }
.calendar-day-empty { margin: 0; padding: 18px 10px; color: #819087; font-size: 8px; text-align: center; }
.calendar-analysis-dialog { width: min(550px, calc(100vw - 28px)); max-width: 550px; max-height: min(88vh, 760px); margin: auto; padding: 0; overflow: auto; border: 1px solid #40504a; border-radius: 12px; background: #10181a; color: var(--text); box-shadow: 0 28px 90px rgb(4 8 9 / 65%); }
.calendar-analysis-dialog::backdrop { background: rgb(4 8 9 / 76%); backdrop-filter: blur(3px); }
.calendar-analysis-panel { display: grid; gap: 12px; padding: 17px; }
.calendar-analysis-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: start; gap: 9px; }
.calendar-analysis-heading > div { display: grid; min-width: 0; gap: 4px; }
.calendar-analysis-heading h2 { margin: 0; color: #e2ebe4; font-size: 15px; font-weight: 640; line-height: 1.35; }
.calendar-analysis-heading small { color: #8d9b92; font-size: 8px; }
.calendar-analysis-bias { display: inline-flex; min-height: 25px; align-items: center; padding: 0 8px; border: 1px solid #374348; border-radius: 5px; background: #182023; color: #aab6ae; font-size: 8px; font-weight: 680; white-space: nowrap; }
.calendar-analysis-bias.is-bullish { border-color: #31513e; background: #15251b; color: #a9ddb2; }
.calendar-analysis-bias.is-bearish { border-color: #5a393c; background: #25191b; color: #e7a1a1; }
.calendar-analysis-bias.is-neutral { border-color: #384447; background: #171f21; color: #aab6ae; }
.calendar-analysis-summary { margin: 0; padding: 10px 11px; border-left: 2px solid #b7d78a; background: #151e1b; color: #c5d0c7; font-size: 10px; line-height: 1.55; }
.calendar-analysis-section { display: grid; gap: 7px; }
.calendar-analysis-section h3 { margin: 0; color: #d0dbd2; font-size: 9px; font-weight: 650; }
.calendar-analysis-targets { display: flex; flex-wrap: wrap; gap: 5px; }
.calendar-analysis-target { display: grid; min-width: 78px; gap: 3px; padding: 7px 8px; border: 1px solid #30403c; border-radius: 6px; background: #141c1e; }
.calendar-analysis-target > strong { color: #cdd8d0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; }
.calendar-analysis-target > small { color: #9aa69e; font-size: 7px; }
.calendar-analysis-target.is-bullish { border-color: #31513e; background: #15231b; }
.calendar-analysis-target.is-bullish > small { color: #a9ddb2; }
.calendar-analysis-target.is-bearish { border-color: #543638; background: #24191b; }
.calendar-analysis-target.is-bearish > small { color: #e7a1a1; }
.calendar-analysis-scenarios { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.calendar-analysis-scenarios > p { display: grid; gap: 4px; margin: 0; padding: 8px; border: 1px solid #2e3b3e; border-radius: 6px; background: #131b1e; }
.calendar-analysis-scenarios > p > strong { color: #bdd9b8; font-size: 8px; }
.calendar-analysis-scenarios > p:last-child > strong { color: #e0aaa8; }
.calendar-analysis-scenarios > p > span { color: #a2afa6; font-size: 8px; line-height: 1.45; }
.calendar-analysis-scenarios > p > small { color: #8d9d91; font-size: 7px; line-height: 1.4; }
.calendar-analysis-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 8px; border: 1px solid #2c393c; border-radius: 6px; background: #11191c; }
.calendar-analysis-values > div { display: grid; min-width: 0; gap: 3px; }
.calendar-analysis-values span { color: #849188; font-size: 7px; }
.calendar-analysis-values strong { overflow: hidden; color: #c5d0c7; font-size: 8px; font-weight: 570; text-overflow: ellipsis; white-space: nowrap; }
.calendar-analysis-note { margin: 0; color: #77867d; font-size: 7px; line-height: 1.5; }
.calendar-analysis-done { min-height: 32px; justify-content: center; font-size: 8px; }

@media (max-width: 900px) {
  .calendar-workspace { grid-template-columns: 1fr; }
  .calendar-day-agenda .panel-heading h2 { max-width: none; }
}

@media (max-width: 520px) {
  .calendar-month-toolbar { min-height: 43px; padding: 5px; }
  .calendar-month-toolbar > .calendar-count { font-size: 7px; }
  .calendar-month-nav { gap: 4px; }
  .calendar-month-nav h2 { min-width: 105px; font-size: 11px; }
  .calendar-nav-button, .calendar-today-button { min-width: 24px; height: 24px; }
  .calendar-today-button { padding: 0 6px; }
  .calendar-day { min-height: 58px; gap: 2px; padding: 4px 3px; }
  .calendar-day-heading { min-height: 16px; }
  .calendar-day-heading > strong { font-size: 8px; }
  .calendar-day.is-today .calendar-day-heading > strong { width: 16px; height: 16px; }
  .calendar-day-events { display: none; }
  .calendar-mobile-count { display: block; }
  .calendar-day-dots i { width: 4px; height: 4px; }
  .calendar-legend { gap: 5px 9px; }
  .calendar-legend small { width: 100%; margin-left: 0; }
  .calendar-next { min-height: 50px; gap: 6px; padding: 7px 8px; }
  .calendar-next-copy > strong { max-width: 230px; font-size: 8px; }
  .calendar-next-copy > small { font-size: 7px; }
  .calendar-analysis-panel { gap: 9px; padding: 12px; }
  .calendar-analysis-heading { grid-template-columns: minmax(0, 1fr) auto; }
  .calendar-analysis-heading .analysis-dialog-close { grid-column: 2; grid-row: 1; width: 29px; height: 29px; }
  .calendar-analysis-bias { grid-column: 1 / -1; grid-row: 2; justify-self: start; }
  .calendar-analysis-scenarios { grid-template-columns: 1fr; }
}
