.op-page {
  --op-ink: #231b35;
  --op-muted: #635e70;
  --op-border: #eae6ef;
  --op-purple: #5b38a0;
  --op-lilac: #f3eefb;
  color: var(--op-ink);
}

.op-header { align-items: center; }
.op-header h1 { overflow-wrap: anywhere; }
.op-header-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.op-date-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px;
  border: 1px solid var(--op-border); border-radius: 9px; background: #fff;
  color: var(--op-muted); font-size: .85rem; font-weight: 600; white-space: nowrap;
}
.op-date-chip svg { color: var(--op-purple); flex: 0 0 auto; }
.op-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 21px; }
.op-metric { min-width: 0; padding: 17px 17px 16px; }
.op-metric-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; color: #5a5368; font-size: .875rem; font-weight: 600; }
.op-metric > strong { display: block; font-size: clamp(1.38rem, 2.25vw, 1.95rem); font-weight: 750; line-height: 1.24; letter-spacing: -.04em; margin: 5px 0 4px; }
.op-metric > small { display: block; min-height: 1.3em; color: var(--op-muted); font-size: .78rem; }
.op-metric-icon, .op-panel-icon, .op-event-icon { display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; width: 38px; height: 38px; }
.op-tone-violet, .op-panel-icon { color: #6941ac; background: #efe7fc; }
.op-tone-blue { color: #285c9e; background: #e8f1ff; }
.op-tone-green { color: #167251; background: #e5f6ee; }
.op-tone-orange { color: #a44d2c; background: #fcebdf; }

.op-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; gap: 20px; }
.op-panel, .op-attendance, .op-calendar, .op-clock-card { min-width: 0; overflow: hidden; }
.op-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 19px 15px; }
.op-panel-heading h2, .op-calendar-toolbar h2 { margin: 0; font-size: 1.075rem; font-weight: 730; line-height: 1.25; letter-spacing: -.025em; }
.op-panel-heading p, .op-calendar-toolbar p { margin: 5px 0 0; color: var(--op-muted); font-size: .85rem; line-height: 1.45; }
.op-page .op-button-sm { min-height: 34px; padding: 7px 10px; font-size: .8rem; white-space: nowrap; }
.op-panel-link {
  display: inline-flex; align-items: center; gap: 4px; width: 100%; min-height: 42px;
  padding: 10px 19px; border: 0; border-top: 1px solid var(--op-border);
  background: transparent; color: var(--op-purple); text-align: left; font: inherit; font-size: .85rem; font-weight: 700;
}
.op-panel-link:hover { background: #f9f6fe; }
.op-panel-link:focus-visible { outline-offset: -4px; }
.op-week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; padding: 0 19px 15px; }
.op-week-tile {
  display: grid; justify-items: center; gap: 5px; padding: 9px 4px 8px; min-width: 0; border: 1px solid var(--op-border);
  border-radius: 10px; background: #faf9fc; color: var(--op-muted); font: inherit;
}
.op-week-tile:hover { border-color: #c7b4e8; background: #f5f0fc; }
.op-week-tile.is-selected { border-color: #633da7; background: #633da7; color: #faf6ff; }
.op-week-tile span { font-size: .76rem; font-weight: 600; }
.op-week-tile strong { color: var(--op-ink); font-size: 1rem; font-weight: 720; line-height: 1; }
.op-week-tile.is-selected strong { color: #fff; }
.op-week-tile i { width: 4px; height: 4px; margin-top: 2px; border-radius: 50%; background: #9a75d3; }
.op-week-tile.is-selected i { background: #e6d5ff; }
.op-week-tile i.is-hidden { visibility: hidden; }
.op-agenda-label {
  display: flex; justify-content: space-between; align-items: center; padding: 8px 20px;
  border-top: 1px solid #f1edf5; border-bottom: 1px solid #f1edf5; background: #faf9fc;
  color: #736a80; font-size: .71rem; font-weight: 720; letter-spacing: .045em;
}
.op-agenda-label span:last-child { font-size: .78rem; font-weight: 640; letter-spacing: 0; }
.op-agenda-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) minmax(0, auto) auto; gap: 9px; align-items: center; padding: 10px 14px 10px 19px; min-height: 58px; }
.op-agenda-row + .op-agenda-row { border-top: 1px solid #f1edf5; }
.op-agenda-time { display: flex; gap: 9px; align-items: stretch; min-width: 0; }
.op-agenda-time strong, .op-agenda-time small { display: block; font-variant-numeric: tabular-nums; }
.op-agenda-time strong { font-size: .85rem; }
.op-agenda-time small { margin-top: 2px; font-size: .76rem; color: var(--op-muted); }
.op-agenda-rail { align-self: center; height: 29px; width: 3px; border-radius: 4px; flex: 0 0 auto; background: #a684d3; }
.op-agenda-row:nth-child(odd) .op-agenda-rail { background: #7196d4; }
.op-person { display: flex; align-items: center; gap: 8px; min-width: 0; }
.op-person > div, .op-activity-item > div { min-width: 0; }
.op-person strong, .op-person small, .op-activity-item strong, .op-activity-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.op-person strong, .op-activity-item strong { font-size: .875rem; font-weight: 690; }
.op-person small, .op-activity-item small { color: var(--op-muted); margin-top: 2px; font-size: .77rem; }
.op-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; font-size: .72rem; font-weight: 760; }
.op-avatar-0 { color: #6436a2; background: #eee1fc; }
.op-avatar-1 { color: #1a5a90; background: #e3effe; }
.op-avatar-2 { color: #a1492e; background: #fcebe1; }
.op-avatar-3 { color: #177253; background: #e2f5ed; }
.op-avatar-4 { color: #963c6b; background: #fae7f3; }
.op-location-tag { display: inline-flex; align-items: center; gap: 4px; max-width: 210px; padding: 4px 7px; border-radius: 6px; background: #f5f1fa; color: #624989; font-size: .77rem; font-weight: 640; overflow-wrap: anywhere; }
.op-location-tag svg { flex: 0 0 auto; }
.op-page .op-quiet-action { color: #766886; width: 31px; height: 31px; min-width: 31px; }
.op-activity-list { padding: 0 17px; }
.op-activity-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; min-height: 57px; padding: 8px 1px; }
.op-activity-item + .op-activity-item { border-top: 1px solid #f1edf5; }
.op-event-icon { width: 34px; height: 34px; }
.op-event-in { background: #e4f5eb; color: #13724c; }
.op-event-out { background: #efeafa; color: #6947a1; }
.op-activity-item time { color: #544964; font-size: .765rem; font-weight: 690; white-space: nowrap; }

.op-empty { display: grid; justify-items: center; gap: 7px; padding: 25px 19px 28px; text-align: center; }
.op-empty-icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 2px; border-radius: 12px; background: #f3edf9; color: var(--op-purple); }
.op-empty strong { font-size: .91rem; }
.op-empty p { max-width: 36ch; margin: 0; color: var(--op-muted); font-size: .85rem; line-height: 1.4; }
.op-empty button { margin-top: 4px; }

.op-calendar-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 15px 17px; }
.op-week-controls, .op-calendar-controls { display: flex; align-items: center; gap: 10px; }
.op-week-jump { display: flex; gap: 2px; border: 1px solid var(--op-border); border-radius: 8px; }
.op-page .op-week-jump .icon-button { padding: 0; width: 33px; height: 34px; min-width: 33px; border: 0; }
.op-filter { display: grid; gap: 6px; min-width: 0; }
.op-filter > span { color: #51465f; font-size: .82rem; font-weight: 680; }
.op-filter select {
  width: 100%; min-height: 38px; padding: 7px 29px 7px 10px; border: 1px solid var(--op-border); border-radius: 8px;
  appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='m6 8 4 4 4-4' stroke='%23766986' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'/%3E%3C/svg%3E") right 7px center / 18px no-repeat;
  color: var(--op-ink); font: inherit; font-size: .87rem; text-overflow: ellipsis;
}
.op-filter select:disabled { opacity: .65; }
.op-filter-inline select { min-height: 34px; max-width: 212px; }
.op-calendar-scroll, .op-table-scroll { overflow-x: auto; outline-offset: -3px; }
.op-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(121px, 1fr)); min-width: 847px; border-top: 1px solid var(--op-border); }
.op-calendar-day { min-height: 326px; background: #fff; }
.op-calendar-day + .op-calendar-day { border-left: 1px solid var(--op-border); }
.op-calendar-day.is-today { background: #fcfaff; }
.op-calendar-day > header { position: relative; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; justify-content: center; min-height: 58px; padding: 8px 11px; border-bottom: 1px solid var(--op-border); background: #faf9fc; font-size: .82rem; color: var(--op-muted); }
.op-calendar-day > header strong { font-size: 1.15rem; color: var(--op-ink); line-height: 1; }
.op-calendar-day.is-today > header { background: #f3eafb; color: #623d99; }
.op-calendar-day.is-today > header strong { color: #623d99; }
.op-today-text { position: absolute; right: 8px; top: 8px; padding: 2px 6px; border-radius: 5px; background: #e6d6f9; color: #543083; font-size: .73rem; font-weight: 670; }
.op-calendar-events { display: grid; gap: 6px; padding: 8px 7px 11px; }
.op-shift-card { display: grid; gap: 4px; max-width: 100%; min-width: 0; padding: 7px 7px 7px 8px; border: 0; border-left: 3px solid var(--event-line); border-radius: 6px; background: var(--event-paper); color: var(--event-ink); font: inherit; text-align: left; }
button.op-shift-card:hover { box-shadow: inset 0 0 0 1px var(--event-line); }
.op-shift-0 { --event-line: #9766d1; --event-paper: #f2e9fc; --event-ink: #57318a; }
.op-shift-1 { --event-line: #5588cc; --event-paper: #eaf1ff; --event-ink: #245291; }
.op-shift-2 { --event-line: #3d9c7e; --event-paper: #e3f5ef; --event-ink: #1a604c; }
.op-shift-3 { --event-line: #d58461; --event-paper: #fff0e7; --event-ink: #8b412b; }
.op-shift-card strong { font-size: .84rem; line-height: 1.2; overflow-wrap: anywhere; }
.op-shift-time { font-size: .735rem; font-weight: 720; font-variant-numeric: tabular-nums; }
.op-shift-card small { display: flex; align-items: flex-start; gap: 3px; font-size: .73rem; line-height: 1.25; overflow-wrap: anywhere; }
.op-shift-card small svg { flex: 0 0 auto; margin-top: 1px; }
.op-shift-card .op-shift-notes { padding-top: 2px; }
.op-add-day { display: inline-flex; justify-content: center; align-items: center; gap: 4px; min-height: 32px; border: 1px dashed #ddd1eb; border-radius: 6px; background: transparent; color: #6b5091; font: inherit; font-size: .78rem; font-weight: 680; }
.op-add-day:hover { border-color: #a681d6; background: #f5eefb; }
.op-calendar-empty { margin: 8px 0; text-align: center; font-size: .8rem; color: var(--op-muted); }
.op-remove-shift { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 7px; padding: 7px; margin: 0 -7px; background: transparent; color: #a23645; font: inherit; font-size: .87rem; font-weight: 680; }
.op-remove-shift:hover { background: #fcecef; }
.op-delete-description { color: #63566f; line-height: 1.5; }

.op-attendance-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 197px)); gap: 9px; padding: 0 19px 15px; }
.op-attendance-table { width: 100%; min-width: 600px; border-collapse: collapse; text-align: left; }
.op-attendance-table th { padding: 9px 13px; border-top: 1px solid var(--op-border); border-bottom: 1px solid var(--op-border); background: #faf9fc; color: #65596f; font-size: .79rem; font-weight: 720; white-space: nowrap; }
.op-attendance-table td { padding: 10px 13px; border-bottom: 1px solid #f1edf5; font-size: .86rem; vertical-align: middle; }
.op-attendance-table tr:last-child td { border-bottom: 0; }
.op-attendance-table :is(td, th):first-child { padding-left: 19px; }
.op-attendance-table :is(td, th):last-child { padding-right: 19px; }
.op-attendance-table td time { display: grid; gap: 2px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.op-attendance-table td time small { color: var(--op-muted); font-size: .76rem; }
.op-status { display: inline-flex; align-items: center; gap: 5px; width: max-content; padding: 4px 8px; border-radius: 999px; font-size: .78rem; font-weight: 690; white-space: nowrap; }
.op-status-open { background: #e5f6ed; color: #176548; }
.op-status-open i { width: 6px; height: 6px; border-radius: 50%; background: #269264; }
.op-status-closed { background: #eeeaf5; color: #655276; }
.op-muted { color: var(--op-muted); }

.op-clock-grid { display: grid; grid-template-columns: minmax(0, 1.23fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.op-clock-art {
  position: relative; display: flex; align-items: end; min-height: 174px; isolation: isolate; overflow: hidden;
  padding: 18px; background: radial-gradient(circle at 77% 50%, #7b51bf 0%, #6139a1 40%, #4f2d87 100%); color: #fff;
}
.op-clock-art::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(90deg, #fff1 1px, transparent 1px), linear-gradient(#fff1 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(to right, transparent, #000 75%); }
.op-clock-art-text { max-width: 23ch; z-index: 1; }
.op-clock-art-text > span { display: inline-flex; gap: 5px; align-items: center; margin-bottom: 7px; color: #eedfff; font-size: .82rem; font-weight: 650; }
.op-clock-art-text > strong { display: block; max-width: 16ch; font-size: clamp(1.2rem, 2.6vw, 1.85rem); line-height: 1.13; letter-spacing: -.025em; text-wrap: pretty; }
.op-clock-map { position: absolute; display: grid; place-items: center; top: 0; bottom: 0; right: 0; width: 44%; }
.op-clock-map i, .op-clock-map > span { position: absolute; border-radius: 50%; border: 1px solid #f0e1ff75; }
.op-clock-map i:nth-child(1) { width: 164px; height: 164px; border-style: dashed; }
.op-clock-map i:nth-child(2) { width: 118px; height: 118px; background: #efddff14; }
.op-clock-map i:nth-child(3) { width: 77px; height: 77px; background: #efddff22; }
.op-clock-map > span { width: 54px; height: 54px; display: grid; place-items: center; background: #f2e6ff; color: #6236a4; box-shadow: 0 3px 14px #32175170; }
.op-clock-content { padding: 18px; }
.op-clock-content .op-panel-heading { padding: 0 0 17px; }
.op-clock-select select { margin-top: 1px; min-height: 42px; }
.op-location-detail { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 8px 0 0; color: var(--op-muted); font-size: .81rem; }
.op-location-detail svg { flex: 0 0 auto; color: var(--op-purple); }
.op-location-detail > span { font-weight: 650; }
.op-clock-location { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 9px; border-radius: 8px; background: #faf7fe; }
.op-clock-location > div { flex: 1; min-width: 0; }
.op-clock-location strong, .op-clock-location small { display: block; }
.op-clock-location strong { font-size: .875rem; }
.op-clock-location small { margin-top: 3px; color: var(--op-muted); font-size: .8rem; }
.op-radius { font-size: .78rem; font-weight: 650; color: var(--op-purple); text-align: right; }
.op-clock-content .op-clock-button { justify-content: center; width: 100%; margin-top: 13px; min-height: 44px; }
.op-clock-alert, .op-clock-notice { display: flex; gap: 7px; align-items: flex-start; margin: 10px 0 0; padding: 8px 9px; border-radius: 7px; background: #f9f2e9; color: #853e25; font-size: .84rem; line-height: 1.4; }
.op-clock-notice > svg { flex: 0 0 auto; margin-top: 2px; }
.op-clock-notice.is-error { background: #fbedf0; color: #9a2f47; }
.op-clock-notice.is-success { background: #e5f5ed; color: #176548; }
.op-clock-guide ul { display: grid; gap: 13px; padding: 3px 19px 15px; margin: 0; list-style: none; }
.op-clock-guide li { display: flex; align-items: flex-start; gap: 9px; }
.op-clock-guide li span { display: grid; place-items: center; width: 33px; height: 33px; flex: 0 0 auto; border-radius: 8px; background: #f4eefb; color: var(--op-purple); }
.op-clock-guide li strong { font-size: .88rem; }
.op-clock-guide li p { margin: 3px 0 0; color: var(--op-muted); font-size: .81rem; line-height: 1.4; }

.op-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 1120px) {
  .op-date-chip { padding-inline: 8px; }
  .op-dashboard-grid { gap: 14px; }
  .op-metrics { gap: 10px; }
  .op-metric { padding-inline: 13px; }
  .op-agenda-row { grid-template-columns: 56px minmax(0, 1fr) minmax(0, auto) auto; gap: 6px; }
}

@media (max-width: 1130px) {
  .op-calendar-grid { min-width: 0; grid-template-columns: 1fr; }
  .op-calendar-day { min-height: 0; display: grid; grid-template-columns: 76px minmax(0, 1fr); }
  .op-calendar-day + .op-calendar-day { border-left: 0; border-top: 1px solid var(--op-border); }
  .op-calendar-day > header { border-bottom: 0; border-right: 1px solid var(--op-border); min-height: 57px; }
  .op-calendar-events { grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)); align-items: center; }
  .op-add-day { justify-self: start; padding-inline: 7px; }
}

@media (max-width: 930px) {
  .op-dashboard-grid, .op-clock-grid { grid-template-columns: minmax(0, 1fr); }
  .op-empty { padding-block: 23px; }
}

@media (max-width: 640px) {
  .op-header { align-items: flex-start; }
  .op-header-actions { width: 100%; }
  .op-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 13px; }
  .op-metric { padding: 10px; }
  .op-metric-top { font-size: .8rem; }
  .op-metric-icon, .op-panel-icon { width: 32px; height: 32px; }
  .op-metric-icon svg, .op-panel-icon svg { width: 18px; height: 18px; }
  .op-panel-heading { padding: 12px 11px; }
  .op-week-strip { padding: 0 11px 12px; gap: 4px; }
  .op-week-tile { border-radius: 7px; padding-inline: 2px; }
  .op-agenda-row { grid-template-columns: 53px minmax(0, 1fr) minmax(0, 105px) auto; gap: 5px; padding-inline: 9px 4px; }
  .op-agenda-time { gap: 5px; }
  .op-agenda-row .op-avatar { display: none; }
  .op-agenda-row .op-location-tag { padding: 3px 4px; font-size: .72rem; }
  .op-agenda-row .op-location-tag svg { width: 12px; height: 12px; }
  .op-agenda-label { padding-inline: 11px; }
  .op-activity-list { padding-inline: 11px; }
  .op-panel-link { padding-inline: 11px; }
  .op-calendar-toolbar { align-items: flex-start; flex-direction: column; padding: 12px 10px; }
  .op-calendar-controls { width: 100%; flex-wrap: wrap; }
  .op-calendar-controls > label { flex: 1 1 auto; }
  .op-calendar-controls > label > select { max-width: 100%; }
  .op-filter select { font-size: 1rem; }
  .op-attendance-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-inline: 11px; }
  .op-attendance-table { min-width: 0; }
  .op-attendance-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .op-attendance-table tbody { display: block; }
  .op-attendance-table tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; padding: 10px 11px; border-top: 1px solid var(--op-border); }
  .op-attendance-table td, .op-attendance-table td:first-child, .op-attendance-table td:last-child { border: 0; padding: 0; }
  .op-attendance-table td:has(.op-person), .op-attendance-table td:has(.op-location-tag) { grid-column: 1 / -1; }
  .op-attendance-table td[data-label]::before { content: attr(data-label); display: block; color: var(--op-muted); margin-bottom: 3px; font-size: .75rem; }
  .op-clock-content { padding-inline: 12px; }
  .op-clock-art { padding-inline: 12px; }
  .op-clock-art-text { max-width: 55%; }
  .op-clock-map { right: -5%; width: 53%; }
  .op-clock-map i:nth-child(1) { width: 139px; height: 139px; }
  .op-clock-map i:nth-child(2) { width: 99px; height: 99px; }
  .op-clock-map i:nth-child(3) { width: 68px; height: 68px; }
  .op-clock-map > span { width: 49px; height: 49px; }
  .op-clock-guide ul { padding-inline: 11px; }
}

@media (max-width: 345px) {
  .op-header-actions > .btn { width: 100%; justify-content: center; }
  .op-date-chip { font-size: .76rem; }
  .op-metric-top { align-items: flex-start; }
  .op-metric-icon { width: 25px; height: 25px; }
  .op-metric-icon svg { width: 15px; height: 15px; }
}
