.staff-calendar { min-width: 0; width: 100%; color: var(--ink, #17324f); }
.staff-calendar-header { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; }
.staff-calendar-header h1 { margin: 0 0 6px; font-size: 24px; line-height: 1.3; }
.staff-calendar-header p { margin: 4px 0; color: #687f94; font-size: 13px; line-height: 1.6; }
.staff-calendar .staff-calendar-timezone, .staff-calendar-dialog .staff-calendar-timezone { color: #687f94; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.staff-calendar-tools { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; min-width: 0; margin-bottom: 12px; }
.staff-calendar-navigation { display: flex; align-items: center; flex: 1 1 350px; flex-wrap: wrap; gap: 6px; min-width: 0; }
.staff-calendar-navigation h2 { flex: 1 1 180px; min-width: 0; margin: 0 0 0 8px; font-size: 17px; text-transform: capitalize; overflow-wrap: anywhere; }
.staff-calendar-filters { display: flex; flex: 0 1 430px; flex-wrap: wrap; gap: 10px; min-width: 0; max-width: 100%; }
.staff-calendar-filters label { display: grid; flex: 1 1 150px; gap: 5px; min-width: 0; max-width: 100%; color: #536f88; font-size: 11px; }
.staff-calendar-filters select { box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; min-height: 36px; }
.staff-calendar .button { min-height: 36px; max-width: 100%; white-space: normal; }
.staff-calendar-status { min-height: 20px; margin-bottom: 8px; color: #6b8195; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.staff-calendar-legend { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 0 0 12px; }
.staff-calendar-vacation-badge { display: inline-flex; justify-self: start; align-items: center; max-width: 100%; padding: 2px 7px; border: 1px solid #e8d29b; border-radius: 9px; background: #fff6dd; color: #946516; font-size: 10px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.staff-calendar-vacation-badge.is-approved { border-color: #b9deca; background: #eaf8f0; color: #287855; }
.staff-calendar-vacation-badge.is-declined { border-color: #e7bdc5; background: #fff0f2; color: #a44759; }
.staff-calendar-event.is-vacation.is-requested { border-left-color: #d5a548; }
.staff-calendar-event.is-vacation.is-approved { border-left-color: #429f76; }
.staff-calendar-event.is-vacation.is-declined { border-left-color: #c87b8a; }
.staff-calendar-day-events > .staff-calendar-vacation-day.is-requested { color: #946516; background: #fff3ce; }
.staff-calendar-day-events > .staff-calendar-vacation-day.is-approved { color: #287855; background: #e5f5eb; }
.staff-calendar-day-events > .staff-calendar-vacation-day.is-declined { color: #a44759; background: #ffedf0; }
.staff-calendar-vacation-marks { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
.staff-calendar-vacation-marks:empty { display: none; }
.staff-calendar-vacation-marks i { width: 6px; height: 6px; border-radius: 50%; background: #d5a548; }
.staff-calendar-vacation-marks i.is-approved { background: #429f76; }
.staff-calendar-vacation-marks i.is-declined { background: #c87b8a; }
.staff-calendar-vacation-details { display: grid; gap: 6px; min-width: 0; padding: 12px; border: 1px solid #dce7f1; border-radius: 6px; background: #f7faff; }
.staff-calendar-vacation-details [data-calendar-review-metadata] { display: grid; gap: 5px; min-width: 0; }
.staff-calendar-vacation-details [data-calendar-review-conflict]:not(:empty) { display: grid; gap: 7px; padding: 10px; border: 1px solid #e7c893; border-radius: 5px; background: #fff8e9; }
.staff-calendar-vacation-details p { margin: 0; color: #657f96; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.staff-calendar-vacation-review { display: grid; gap: 10px; min-width: 0; padding-top: 8px; }
.staff-calendar-review-actions { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.staff-calendar-vacation-details .staff-calendar-review-comment { padding: 8px; border-left: 3px solid #bfd3e5; background: #fff; white-space: pre-wrap; }
.staff-calendar-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 320px); align-items: start; gap: 18px; min-width: 0; }
.staff-calendar-month { min-width: 0; overflow: hidden; border: 1px solid #dce6f0; border-radius: 9px; background: #fff; }
.staff-calendar-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); min-width: 0; }
.staff-calendar-weekdays { border-bottom: 1px solid #dce6f0; background: #f5f8fc; }
.staff-calendar-weekdays > span { padding: 10px 4px; color: #71859a; font-size: 11px; font-weight: 600; text-align: center; overflow: hidden; }
.staff-calendar-cell { min-width: 0; border-right: 1px solid #e6edf4; border-bottom: 1px solid #e6edf4; }
.staff-calendar-cell:nth-child(7n) { border-right: 0; }
.staff-calendar-week:last-child .staff-calendar-cell { border-bottom: 0; }
.staff-calendar-cell > button { position: relative; display: block; box-sizing: border-box; width: 100%; min-width: 0; min-height: 98px; height: 100%; margin: 0; padding: 8px; border: 2px solid transparent; border-radius: 0; background: #fff; color: #365973; text-align: left; cursor: pointer; }
.staff-calendar-cell > button:hover { background: #f2f8fe; }
.staff-calendar-cell > button[aria-selected="true"] { border-color: #3184cd; background: #edf6ff; }
.staff-calendar-cell > button:focus-visible, .staff-calendar-event:focus-visible { outline: 2px solid #197ac8; outline-offset: -3px; }
.staff-calendar-date { display: inline-flex; align-items: center; justify-content: center; min-width: 23px; min-height: 23px; border-radius: 50%; font-size: 12px; font-weight: 600; }
.staff-calendar-cell.is-outside > button { background: #f8fafc; color: #9aabba; }
.staff-calendar-cell.is-today .staff-calendar-date { background: #0876d3; color: #fff; }
.staff-calendar-count { float: right; min-width: 16px; padding: 1px 4px; border-radius: 7px; background: #e6eff8; color: #497192; font-size: 10px; text-align: center; }
.staff-calendar-day-events { display: grid; gap: 3px; min-width: 0; margin-top: 5px; }
.staff-calendar-day-events > span { display: block; min-width: 0; overflow: hidden; padding: 2px 4px; border-radius: 3px; background: #edf2f9; color: #536d87; font-size: 10px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.staff-calendar-agenda { min-width: 0; border: 1px solid #dce6f0; border-radius: 9px; background: #fff; }
.staff-calendar-agenda-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 5px; padding: 16px; border-bottom: 1px solid #e5edf5; }
.staff-calendar-agenda-heading h2 { margin: 0; font-size: 15px; line-height: 1.5; text-transform: capitalize; overflow-wrap: anywhere; }
.staff-calendar-agenda-heading > span { color: #8092a5; font-size: 11px; }
.staff-calendar-agenda ol { display: grid; gap: 8px; margin: 0; padding: 12px; list-style: none; }
.staff-calendar-agenda li { min-width: 0; }
.staff-calendar-event { display: grid; box-sizing: border-box; gap: 4px; width: 100%; min-width: 0; padding: 11px; border: 1px solid #dce7f1; border-left: 3px solid #6ea7d7; border-radius: 5px; background: #f8fbff; color: #4c6a84; font: inherit; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.staff-calendar-event:hover { border-color: #80afd7; background: #f0f7ff; }
.staff-calendar-event time { color: #537d9f; font-size: 11px; font-variant-numeric: tabular-nums; }
.staff-calendar-event strong { color: #2d5575; font-size: 13px; line-height: 1.5; }
.staff-calendar-event > span, .staff-calendar-event small { color: #71879c; font-size: 11px; line-height: 1.5; }
.staff-calendar-empty { margin: 0; padding: 24px 16px; color: #8093a5; font-size: 12px; line-height: 1.7; }
.staff-calendar-error { margin: 8px 0; color: #aa3d4e; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.staff-calendar-error:empty { display: none; }
.staff-calendar-message { margin: 8px 0; color: #687f94; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.staff-calendar-dialog { box-sizing: border-box; width: min(620px, calc(100% - 24px)); max-width: calc(100% - 24px); max-height: calc(100dvh - 32px); padding: 0; overflow: auto; overscroll-behavior: contain; border: 1px solid #d4e1ed; border-radius: 11px; background: #fff; color: #315470; box-shadow: 0 22px 90px #16344d33; }
.staff-calendar-dialog::backdrop { background: #122b435c; }
.staff-calendar-dialog form { display: grid; gap: 14px; min-width: 0; padding: 22px; }
.staff-calendar-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.staff-calendar-dialog h2 { margin: 0; font-size: 19px; line-height: 1.4; }
.staff-calendar-dialog label { display: grid; gap: 5px; min-width: 0; color: #607b93; font-size: 12px; }
.staff-calendar-dialog .form-input { box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; min-height: 38px; }
.staff-calendar-dialog textarea.form-input { min-height: 96px; height: auto; resize: vertical; }
.staff-calendar-dialog .staff-calendar-owner { color: #365b78; font-size: 13px; line-height: 1.5; }
.staff-calendar-time-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; min-width: 0; }
.staff-calendar-time-fields small { min-height: 16px; color: #8395a6; font-size: 10px; }
.staff-calendar-durations, .staff-calendar-dialog footer { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.staff-calendar-dialog footer { justify-content: end; padding-top: 12px; border-top: 1px solid #e1eaf3; }
.staff-calendar-dialog .button { min-height: 36px; max-width: 100%; font-size: 12px; white-space: normal; }
.staff-calendar-dialog footer > .danger { margin-right: auto; }
.staff-calendar-delete-confirm { min-width: 0; padding: 12px; border: 1px solid #efcbd1; border-radius: 5px; background: #fff5f6; }
.staff-calendar-delete-confirm p { margin: 0 0 8px; font-size: 12px; }
.staff-calendar-delete-confirm .button { margin: 0 6px 4px 0; }
.staff-calendar-linked-visit { min-width: 0; padding: 12px; border: 1px solid #b9d5e8; border-radius: 6px; background: #f0f7fc; overflow-wrap: anywhere; }
.staff-calendar-linked-visit p { margin: 7px 0; font-size: 12px; line-height: 1.5; }
.staff-calendar-linked-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
@media (max-width: 1050px) {
  .staff-calendar-layout { grid-template-columns: minmax(0, 1fr); }
  .staff-calendar-agenda ol { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
}
@media (max-width: 600px) {
  .staff-calendar-header { gap: 10px; margin-bottom: 14px; }
  .staff-calendar-header h1 { font-size: 21px; }
  .staff-calendar-header p { font-size: 12px; }
  .staff-calendar-header > .button { min-height: 42px; }
  .staff-calendar-tools { gap: 10px; }
  .staff-calendar-navigation { flex-basis: 100%; }
  .staff-calendar-navigation .button { flex: 1 1 80px; min-height: 40px; padding: 6px; font-size: 11px; }
  .staff-calendar-navigation h2 { flex-basis: 100%; margin: 4px 0; font-size: 16px; }
  .staff-calendar-filters { flex: 1 1 100%; }
  .staff-calendar-filters label { flex-basis: 130px; }
  .staff-calendar-filters select { font-size: 16px; }
  .staff-calendar-cell > button { min-height: 65px; padding: 4px 2px; }
  .staff-calendar-date { min-width: 21px; min-height: 21px; font-size: 11px; }
  .staff-calendar-count { float: none; display: block; width: max-content; min-width: 14px; margin: 3px auto 0; padding: 0 3px; font-size: 9px; }
  .staff-calendar-day-events { display: none; }
  .staff-calendar-weekdays > span { padding: 9px 1px; font-size: 10px; }
  .staff-calendar-agenda-heading { padding: 12px; }
  .staff-calendar-dialog { max-height: calc(100dvh - 20px); }
  .staff-calendar-dialog form { gap: 12px; padding: 16px; }
  .staff-calendar-dialog .form-input { font-size: 16px; }
  .staff-calendar-time-fields { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .staff-calendar-dialog .button { min-height: 42px; }
}
