/* Entry link on home — unchanged layout */
.sched-entry-row {
  display: flex;
  justify-content: flex-end;
  margin: -24px 2px 8px;
}

a.sched-entry {
  background: none;
  border: 0;
  color: #c5dfa3;
  font-size: 12px;
  font-weight: 650;
  padding: 6px 10px;
  border-radius: 8px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

a.sched-entry:hover {
  background: #2a3129;
  color: #e1efcd;
}

/* Full-page Google Calendar–style workspace schedule */
body.gcal-page {
  background: #151719;
  color: #e8ece6;
}

.gcal-shell {
  min-height: 100dvh;
  width: 100%;
  margin: 0;
  padding: 0 clamp(12px, 2vw, 32px) 32px;
}

.gcal-masthead {
  height: 88px;
}

.gcal-page-eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cal-muted, #8a9488);
}

.gcal-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 0;
  border-bottom: none;
}

.gcal-toolbar-card {
  padding: 14px 18px;
  margin-bottom: 10px;
  border: 1px solid var(--cal-line, #343d36);
  border-radius: 16px;
  background: var(--cal-surface, #1a1f1d);
  box-shadow: var(--sched-elev, 0 12px 36px #00000028);
}

.gcal-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--cal-muted, #aeb8a8);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  margin-right: 4px;
  padding: 8px 14px;
  border-radius: var(--radius-md, 10px);
  border: 1px solid var(--cal-line, #3a403d);
  background: var(--cal-panel, #242a27);
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.gcal-back:hover {
  color: var(--cal-text, #e8ece6);
  border-color: var(--cal-accent);
  background: var(--cal-panel, #2a3129);
}

.gcal-today {
  border: 1px solid #5a6852;
  background: #3d4a38;
  color: #eef4e4;
  border-radius: 10px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 650;
  box-shadow: 0 1px 0 #ffffff0a inset;
  transition: background 0.16s ease, filter 0.16s ease;
}

.gcal-today:hover {
  filter: brightness(1.06);
}

.gcal-nav button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--cal-line, #404840);
  background: var(--cal-panel, #252a27);
  color: var(--cal-text, #dce6d4);
  border-radius: 12px;
  font-size: 22px;
  line-height: 1;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.gcal-nav button:hover {
  border-color: var(--cal-muted);
  background: var(--cal-surface);
}

.gcal-nav { display: flex; gap: 4px; }

.gcal-toolbar-end {
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
}

.gcal-select {
  background: var(--cal-panel, #1c211f);
  border: 1px solid var(--cal-line, #404840);
  color: var(--cal-text, #eef2ea);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 1px 0 #ffffff06 inset;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.gcal-select:hover {
  border-color: var(--cal-muted);
}

.gcal-select:focus-visible {
  border-color: var(--cal-accent);
  box-shadow: 0 0 0 3px #d4e89c33;
  outline: none;
}

.gcal-create {
  padding: 8px 18px;
  border-radius: var(--radius-md, 10px);
  font-size: 13px;
}

.gcal-body {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: 22px;
  padding-top: 6px;
  flex: 1;
  min-height: 0;
  align-items: start;
}

.gcal-sidebar {
  position: sticky;
  top: 16px;
}

.gcal-sidebar-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--cal-line, #333a35);
  border-radius: 16px;
  background: var(--cal-surface, #1a1f1d);
  box-shadow: var(--sched-elev, 0 12px 36px #00000028);
}

.gcal-mini {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  font-size: 11px;
  padding: 10px 6px 4px;
  background: transparent;
  border-radius: 12px;
  border: 0;
}

.gcal-mini .mini-head {
  grid-column: 1 / -1;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #c5d4bc;
}

.gcal-mini .mini-dow {
  text-align: center;
  color: #788178;
  font-size: 9px;
  font-weight: 700;
  padding: 4px 0;
}

.gcal-mini button {
  border: 0;
  background: transparent;
  color: #b8c2b8;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  margin: 0 auto;
  font-size: 11px;
  padding: 0;
}

.gcal-mini button.mini-today {
  background: var(--accent);
  color: #2a3a1c;
  font-weight: 700;
}

.gcal-mini button.mini-selected {
  background: #3d4a38;
  color: #e8f4c8;
  box-shadow: 0 0 0 2px #6b7a62;
}

.gcal-main {
  background: var(--cal-surface, #1a1f1d);
  border: 1px solid var(--cal-line, #2f3833);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 240px);
  box-shadow: var(--sched-elev-lg, 0 16px 48px #00000035);
}

.gcal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid #2e3530;
  background: #1e2321;
}

.gcal-weekdays span {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #7d877f;
  padding: 12px 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.gcal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(6, 112px);
  flex: 1;
}

.gcal-grid .sched-day {
  border-right: 1px solid #2a302c;
  border-bottom: 1px solid #2a302c;
  background: #1a1f1d;
  padding: 6px 8px;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  height: 112px;
  max-height: 112px;
  min-height: 112px;
  border-radius: 0;
  cursor: pointer;
  overflow: hidden;
}

.gcal-grid .sched-day:hover {
  background: #222824;
}

.gcal-grid .sched-day.outside {
  background: #181c1a;
  opacity: 0.55;
}

.gcal-grid .sched-day.today .sched-day-num {
  background: var(--accent);
  color: #2a3a1c;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.gcal-grid .sched-day-num {
  font-size: 12px;
  font-weight: 500;
  color: #e0e5de;
  align-self: flex-end;
}

.gcal-grid .sched-chips {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  flex: 1;
}

.gcal-grid .sched-chip {
  font-size: 11px;
  line-height: 1.25;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  font-weight: 500;
}

.gcal-grid .sched-chip.kind-task { background: #2f3d2a; color: #d2e4c4; }
.gcal-grid .sched-chip.kind-activity_review { background: #2a3238; color: #cfe0ea; }
.gcal-grid .sched-chip.kind-report { background: #3a3228; color: #f0dcc0; }
.gcal-grid .sched-chip.kind-event { background: #3a4230; color: #e8f4c0; }

.gcal-grid .sched-more {
  font-size: 10px;
  color: #9aa89c;
  padding: 2px 4px;
}

.sched-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 6px 8px;
  align-items: end;
  border-radius: 10px;
  padding: 10px 26px 10px 10px;
  background: #252b28;
  border: 1px solid #383f3a;
  font-size: 12px;
}

.sched-item::after {
  content: '';
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
}

.sched-item.kind-task::after { background: #6d8f5a; }
.sched-item.kind-activity_review::after { background: #6a8a9a; }
.sched-item.kind-report::after { background: #b8865a; }
.sched-item.kind-event::after { background: var(--accent); }

.sched-item.event-color-lime::after { background: #c5dfa3; }
.sched-item.event-color-olive::after { background: #8fa87a; }
.sched-item.event-color-ink::after { background: #9aa3b0; }
.sched-item.event-color-amber::after { background: #e0b56a; }
.sched-item.event-color-teal::after { background: #6ab0a8; }
.sched-item.event-color-rose::after { background: #d48a9a; }

.sched-item strong {
  grid-column: 1 / -1;
  grid-row: 1;
  display: block;
  margin: 0;
  padding-right: 12px;
}
.sched-item small {
  grid-column: 1;
  grid-row: 2;
  color: #9aa89c;
}
.sched-item-kind {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
  margin: 0;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.sched-empty {
  font-size: 12px;
  color: #7d877f;
  text-align: center;
  padding: 16px 8px;
}

.sched-errors {
  font-size: 12px;
  color: #e8b4ae;
  margin: 0;
  padding: 0 4px 8px;
}

.gcal-footer {
  margin-top: 28px;
  border-top: 0;
  padding: 16px 8px 0;
  font-size: 12px;
  letter-spacing: 0.01em;
  opacity: 0.92;
}

#scheduler-event-dialog textarea {
  width: 100%;
  background: #161c18;
  border: 1px solid #495443;
  color: #f0f3ec;
  border-radius: 10px;
  padding: 12px;
  font: inherit;
}

.gcal-period-picks {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.gcal-period-select {
  min-width: 8.5rem;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
}

.gcal-field-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8a9488;
  margin: 0;
}

.gcal-calendars-select {
  width: 100%;
  font-size: 13px;
  padding: 10px 12px;
}

.gcal-grid .sched-day:focus-visible {
  outline: 2px solid #6a8455;
  outline-offset: -2px;
}

.sched-day-dialog {
  width: min(440px, calc(100vw - 32px));
  max-height: min(80dvh, 640px);
  padding: 0;
  border: 1px solid #3a423c;
  border-radius: 16px;
  background: #1e2320;
  color: #eef2ea;
  overflow: hidden;
}

.sched-day-dialog::backdrop {
  background: rgba(8, 10, 9, 0.72);
  backdrop-filter: blur(4px);
}

.sched-day-dialog-head {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 12px;
  border-bottom: 1px solid #2f3833;
}

.sched-day-dialog-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.sched-day-dialog-head p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #9aa89c;
}

.sched-day-dialog-close {
  border: 0;
  background: #2a3129;
  color: #dce6d4;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.sched-day-dialog-close:hover {
  background: #353d36;
}

.sched-day-modal-list {
  max-height: min(56dvh, 480px);
  overflow-y: auto;
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.no-scrollbar {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.sched-item.kind-task .sched-item-kind { color: #b8d4a8; }
.sched-item.kind-activity_review .sched-item-kind { color: #b8d0dc; }
.sched-item.kind-report .sched-item-kind { color: #e8c9a0; }

@media (max-width: 960px) {
  .gcal-body { grid-template-columns: 1fr; }
  .gcal-sidebar { order: 2; }
  .gcal-main { min-height: 65dvh; }
  .gcal-toolbar-end { margin-left: 0; width: 100%; }
  .gcal-period-picks { width: 100%; }
  .gcal-period-select { flex: 1; }
}
.sched-day-sheet {
  width: min(1000px, calc(100vw - 24px));
  max-height: min(88dvh, 820px);
}

.sched-day-dialog.sched-day-sheet {
  width: min(1000px, calc(100vw - 24px));
  max-height: min(88dvh, 820px);
}

body.gcal-page #scheduler-day-dialog:not([open]) {
  display: none !important;
}

/* Center only while open — display:flex on the closed dialog overrode UA display:none. */
body.gcal-page #scheduler-day-dialog.sched-day-sheet[open] {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  margin: 0;
  transform: translate(-50%, -50%);
  max-height: min(88dvh, 820px);
  overflow: hidden;
  animation: sched-day-sheet-enter 220ms cubic-bezier(.23, 1, .32, 1) both;
}

@keyframes sched-day-sheet-enter {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 12px)) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.gcal-page #scheduler-day-dialog.sched-day-sheet[open] {
    animation: none;
  }
}


.sched-day-sheet-body {
  display: grid;
  grid-template-columns: minmax(420px, 1.4fr) minmax(260px, 0.75fr);
  gap: 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.sched-day-list-pane {
  border-left: 1px solid #2f3833;
  padding: 16px 18px 20px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sched-day-list-pane h3 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9aa89c;
}

.sched-day-list-pane .sched-day-modal-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.sched-day-form-pane {
  padding: 16px 18px 20px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #1a1f1d;
  scrollbar-width: thin;
  scrollbar-color: #4a5648 #1a1f1d;
}

.sched-day-form-pane::-webkit-scrollbar {
  width: 8px;
}

.sched-day-form-pane::-webkit-scrollbar-thumb {
  background: #4a5648;
  border-radius: 8px;
}

.sched-day-form-pane h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
}

.sched-day-form-pane label {
  font-size: 12px;
  color: #c5d0c0;
  margin-top: 4px;
}

.sched-day-form-pane input,
.sched-day-form-pane select,
.sched-day-form-pane textarea {
  width: 100%;
  background: #161c18;
  border: 1px solid #495443;
  color: #f0f3ec;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
}

.sched-day-form-pane textarea {
  resize: vertical;
  min-height: 64px;
}

.sched-meet-row {
  margin-top: 4px;
}

.sched-meet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}

.sched-meet-actions input {
  flex: 1 1 160px;
}

.sched-people-section {
  margin: 8px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid #2f3833;
}

.sched-people-section h3 {
  margin: 0 0 6px;
  font-size: 14px;
}

.sched-people-section > p {
  font-size: 11px;
  color: #9aa89c;
  margin: 0 0 10px;
}

.sched-people-section input[type="search"] {
  margin: 0;
}

.sched-guest-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.sched-guest-chips[hidden] {
  display: none;
}

.sched-guest-chip {
  border: 0;
  border-radius: var(--radius-md, 10px);
  background: #2f3a30;
  color: #e2ead9;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
}

.sched-org-heading {
  margin: 12px 0 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8a9488;
}

.sched-people-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sched-person-row {
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: #222824;
  color: inherit;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  align-items: center;
}

.sched-person-row strong {
  grid-column: 1;
  font-size: 13px;
}

.sched-person-row small {
  grid-column: 1;
  font-size: 11px;
  color: #9aa89c;
}

.sched-person-row span {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
}

.sched-person-row.selected {
  background: #2f3d2a;
  box-shadow: inset 0 0 0 1px #5f7550;
}

.sched-people-section .invite-results {
  min-height: 140px;
  max-height: min(32dvh, 280px);
  margin-top: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.sched-inline-hint {
  font-size: 11px;
  color: #9aa89c;
  margin: 6px 0 0;
}

.sched-form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid #2f3833;
}

.sched-form-actions .danger {
  margin-right: auto;
}

.sched-item-active {
  box-shadow: inset 0 0 0 2px #6a8455;
}

@media (max-width: 760px) {
  .sched-day-sheet-body {
    grid-template-columns: 1fr;
    height: min(78dvh, 720px);
  }
  .sched-day-list-pane {
    border-left: 0;
    border-top: 1px solid #2f3833;
    max-height: 36dvh;
  }
  .sched-day-form-pane {
    max-height: 48dvh;
  }
}

.sched-day-sheet-body--list-only {
  grid-template-columns: 1fr;
}

.sched-day-sheet-body--list-only .sched-day-list-pane {
  border-left: 0;
}

/* Calendar views: quiet surfaces, one compact control, shared date navigation. */
body.gcal-page {
  --cal-surface: #1a1f1d;
  --cal-panel: #242a27;
  --cal-line: #343d36;
  --cal-text: #e8ece6;
  --cal-muted: #a1ada4;
  --cal-accent: #d4e89c;
  --cal-ink: #24321b;
  --sched-elev: 0 1px 0 #ffffff06 inset, 0 12px 36px #00000028;
  --sched-elev-lg: 0 1px 0 #ffffff06 inset, 0 18px 52px #00000038;
}

html[data-theme="light"] body.gcal-page {
  --cal-surface: #ffffff;
  --cal-panel: #f7f9f5;
  --cal-line: #e0e6dc;
  --cal-text: #253029;
  --cal-muted: #6f7a67;
  --cal-accent: #c5db7a;
  --cal-ink: #24321b;
  --sched-elev: 0 1px 0 #ffffff inset, 0 8px 28px #2a38280c;
  --sched-elev-lg: 0 1px 0 #ffffff inset, 0 16px 44px #2a382814;
}

body.gcal-page button:active {
  transform: none;
}
.gcal-page [hidden] { display:none !important; }
.sched-view-picker { margin-left:auto; position:relative; }
#sched-view-trigger { display:flex; align-items:center; justify-content:space-between; gap:24px; min-width:132px; padding:11px 16px; background:var(--cal-panel); color:var(--cal-text); border:1px solid var(--cal-line); border-radius:var(--radius-md,10px); font:inherit; font-size:14px; }
#sched-view-trigger[aria-expanded="true"] { border-color:var(--cal-accent); }
#sched-view-menu { position:absolute; z-index:30; top:calc(100% + 8px); right:0; width:244px; padding:8px; border:1px solid var(--cal-line); border-radius:16px; background:var(--cal-panel); color:var(--cal-text); box-shadow:0 14px 40px #0005; }
.sched-menu-caption { margin:8px 12px 10px; font-size:11px; text-transform:uppercase; letter-spacing:.09em; color:var(--cal-muted); }
#sched-view-menu button { width:100%; display:flex; align-items:center; gap:10px; text-align:left; padding:12px; border:0; border-radius:8px; background:transparent; color:inherit; font:inherit; font-size:14px; }
#sched-view-menu button:hover { background:var(--cal-surface); }
#sched-view-menu [role="menuitemradio"][aria-checked="true"] { background:var(--cal-accent); color:var(--cal-ink); font-weight:650; }
#sched-view-menu kbd { margin-left:auto; font:inherit; font-size:12px; opacity:.65; }
.sched-menu-divider { border-top:1px solid var(--cal-line); margin:8px 4px; }
.sched-menu-check { color:var(--cal-accent); width:18px; }
#sched-weekends[aria-checked="false"] .sched-menu-check { visibility:hidden; }
.sched-range-label {
  margin: 0 4px 14px;
  min-height: 28px;
  font-size: clamp(20px, 2.1vw, 26px);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--cal-text);
}
.gcal-page button:focus-visible { outline:2px solid var(--cal-accent); outline-offset:2px; }
#sched-grid[data-view="month"] { grid-template-columns:repeat(var(--calendar-columns),minmax(0,1fr)); }
#sched-grid { min-width:0; }
#sched-grid[data-view="year"] { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); grid-template-rows:auto; gap:28px 32px; padding:28px; }
.sched-year-month { min-width:0; }
.sched-year-title { background:transparent; color:var(--cal-text); border:0; padding:0 4px 16px; font:inherit; font-size:15px; font-weight:650; }
.sched-year-days { display:grid; gap:3px; text-align:center; }
.sched-year-days > span { font-size:11px; color:var(--cal-muted); padding:5px 0; }
.sched-year-days button { position:relative; background:transparent; color:var(--cal-text); font:inherit; font-size:12px; border:0; border-radius:50%; width:30px; height:30px; padding:0; margin:auto; }
.sched-year-days button:hover { background:var(--cal-panel); }
.sched-year-days .has-items::after { content:""; width:4px; height:4px; border-radius:50%; position:absolute; bottom:1px; left:calc(50% - 2px); background:var(--cal-accent); }
.sched-year-days .is-today { background:var(--cal-accent); color:var(--cal-ink); }
.sched-year-days .is-today::after { background:var(--cal-ink); }
#sched-grid[data-view="schedule"] { display:block; padding:12px 28px; }
.sched-agenda-day { display:grid; grid-template-columns:140px minmax(0,1fr); gap:20px; border-bottom:1px solid var(--cal-line); padding:20px 0; }
.sched-agenda-date { align-self:start; background:transparent; color:var(--cal-muted); border:0; text-align:left; font:inherit; font-size:14px; padding:12px 0; }
.sched-agenda-day > div { display:grid; gap:8px; }
.sched-entry-item { display:flex; flex-direction:column; gap:4px; text-align:left; border:1px solid var(--cal-line); border-left:3px solid #a9c88c; background:var(--cal-panel); color:var(--cal-text); border-radius:7px; padding:10px 12px; font:inherit; min-width:0; width:100%; overflow:hidden; }
.sched-entry-item strong { font-size:12px; font-weight:600; overflow:hidden; text-overflow:ellipsis; }
.sched-entry-item span { font-size:11px; color:var(--cal-muted); }
.sched-entry-item.kind-report { border-left-color:#dbb57b; }
.sched-entry-item.kind-activity_review { border-left-color:#83b6c5; }
.sched-entry-item:hover { filter:brightness(1.12); }
.sched-agenda-empty { padding:80px 20px; color:var(--cal-muted); text-align:center; }
#sched-grid[data-view="day"],
#sched-grid[data-view="week"] {
  display: block;
  flex: none;
  height: calc(100dvh - 300px);
  min-height: 420px;
  overflow: auto;
  position: relative;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#sched-grid[data-view="day"]::-webkit-scrollbar,
#sched-grid[data-view="week"]::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.sched-time-canvas { display:grid; grid-template-columns:76px repeat(var(--days),minmax(0,1fr)); grid-template-rows:48px minmax(44px,auto) 1344px; min-width:100%; }
#sched-grid[data-view="week"] .sched-time-canvas { min-width:720px; }
.sched-time-heading,.sched-time-corner { position:sticky; top:0; z-index:5; border:0; border-bottom:1px solid var(--cal-line); background:var(--cal-surface); color:var(--cal-text); border-radius:0; font:inherit; font-size:13px; }
.sched-time-heading.is-today { color:var(--cal-accent); font-weight:700; box-shadow:inset 0 -2px var(--cal-accent); }
html[data-theme="light"] .sched-time-heading.is-today { color:#46622c; }
.sched-time-corner { font-size:9px; padding:10px 5px; overflow-wrap:anywhere; color:var(--cal-muted); text-align:center; }
.sched-all-day-label { padding:12px 8px; font-size:10px; color:var(--cal-muted); }
.sched-all-day { padding:4px; border-left:1px solid var(--cal-line); display:flex; flex-direction:column; gap:4px; }
.sched-all-day .sched-entry-item { padding:5px 7px; }
.sched-all-day .sched-entry-item span { display:none; }
.sched-hours { display:flex; flex-direction:column; }
.sched-hours span { height:56px; flex-shrink:0; padding:6px 9px; text-align:right; font-size:10px; color:var(--cal-muted); }
.sched-time-day { position:relative; min-width:0; border-left:1px solid var(--cal-line); }
.sched-hour-slot {
  display: block;
  width: 100%;
  height: 56px;
  padding: 0;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--cal-line);
  border-radius: 0;
  transition: background 0.12s ease;
}

.sched-hour-slot:hover {
  background: var(--cal-panel);
}

html[data-theme="light"] .sched-hour-slot:nth-child(even) {
  background: #fafbf9;
}

html[data-theme="light"] .sched-hour-slot:nth-child(even):hover {
  background: #f3f6f1;
}
.sched-timed-event { position:absolute; z-index:2; padding:5px 7px; gap:2px; }
.sched-timed-event strong { flex-shrink:0; white-space:nowrap; }
@media(max-width:1100px) { .gcal-body { grid-template-columns:210px minmax(0,1fr); } #sched-grid[data-view="year"] { gap:24px 12px; padding:20px; } }
@media(max-width:960px) { .gcal-body { grid-template-columns:1fr; } .gcal-period-picks { width:auto; } .gcal-period-select { min-width:100px; } .gcal-sidebar { max-width:320px; width:100%; } }
@media(max-width:620px) {
 .gcal-shell { padding:0 12px 16px; }
 .gcal-toolbar { gap:10px 8px; }
 .gcal-back { width:100%; }
 .gcal-period-picks { order:2; width:100%; }
 .sched-view-picker { margin-left:auto; }
 #sched-grid[data-view="year"] { grid-template-columns:repeat(2,minmax(0,1fr)); padding:14px; gap:24px 12px; }
 .sched-year-days { gap:1px; }
 .sched-year-days button { width:24px; height:28px; font-size:11px; }
 .sched-agenda-day { grid-template-columns:1fr; gap:6px; padding:14px 0; }
 #sched-grid[data-view="schedule"] { padding:8px 16px; }
 .sched-agenda-date { padding:0 0 6px; }
 #sched-grid[data-view="month"] .sched-day { padding:5px 2px; }
 .gcal-grid .sched-chip { font-size:10px; padding:3px; }
}

.gcal-main:has(#sched-grid[data-view="day"]), .gcal-main:has(#sched-grid[data-view="week"]) { min-height:0; }
.sched-all-day,
.sched-all-day-label {
  position: sticky;
  top: 48px;
  z-index: 4;
  background: var(--cal-surface);
  border-bottom: 1px solid var(--cal-line);
}

/* —— Enterprise scheduler polish —— */
.gcal-weekdays {
  background: var(--cal-panel);
}

.gcal-grid .sched-day {
  transition: background 0.14s ease, box-shadow 0.14s ease;
}

html[data-theme="light"] .gcal-grid .sched-day.today {
  box-shadow: inset 0 0 0 1px #c5db7a88;
}

.gcal-mini .mini-head {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.gcal-field-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

#sched-view-trigger {
  font-weight: 650;
  box-shadow: 0 1px 0 #ffffff80 inset;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

#sched-view-trigger:hover {
  border-color: var(--cal-muted);
}

.sched-time-heading {
  font-weight: 650;
  letter-spacing: -0.01em;
}

.sched-time-corner {
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 8px;
}

.sched-entry-item {
  border-radius: 10px;
  box-shadow: 0 1px 0 #ffffff40 inset;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.sched-entry-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px #00000012;
  filter: none;
}

html[data-theme="light"] body.gcal-page .gcal-today {
  background: linear-gradient(180deg, #dce99c 0%, #d4e89c 100%);
  border-color: #b8cc7a;
  color: #24321b;
}

html[data-theme="light"] body.gcal-page .gcal-today:hover {
  filter: brightness(1.03);
}

html[data-theme="light"] body.gcal-page .gcal-toolbar-card {
  background: #ffffff;
}

html[data-theme="light"] body.gcal-page .gcal-sidebar-card {
  background: #ffffff;
}

html[data-theme="light"] body.gcal-page .gcal-mini button.mini-selected {
  background: #e4eadf;
  color: #2f4a1f;
  box-shadow: inset 0 0 0 2px #a8c48a;
}

html[data-theme="light"] body.gcal-page .gcal-mini button.mini-today:not(.mini-selected) {
  background: var(--cal-accent);
  color: var(--cal-ink);
}

html[data-theme="light"] body.gcal-page .gcal-footer {
  color: #8a948b;
}
