.op-screen {
  --op-weekend: #f8fafc;
  display: grid;
  gap: 22px;
}
.op-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}
.op-heading h1 { margin: 0; }

.op-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding-inline: 13px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}
.op-button:hover { background: var(--canvas); }
.op-primary {
  padding-inline: 15px;
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.op-primary:hover { border-color: var(--accent-dark); background: var(--accent-dark); }
.op-icon-button { width: 40px; padding: 0; }

.op-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.op-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 16px 18px;
}
.op-segments {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 11px;
  background: var(--canvas);
}
.op-segments button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 620;
}
.op-segments button:hover { color: var(--ink); }
.op-segments button[aria-pressed="true"] {
  border-color: var(--line);
  background: var(--surface);
  color: var(--accent-dark);
  box-shadow: var(--shadow);
}
.op-segments button span {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  padding-inline: 4px;
  place-items: center;
  border-radius: 5px;
  background: #e6edf4;
  color: #476078;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.op-segments button[aria-pressed="true"] span { background: var(--accent-soft); color: var(--accent-dark); }
.op-filters { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.op-filters select, .op-search, .op-field input, .op-field textarea, .op-field select {
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}
.op-filters select { max-width: 100%; padding-inline: 10px; }
.op-search {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 8px;
  min-width: 170px;
  padding-inline: 11px;
  color: var(--muted);
}
.op-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
}
.op-search:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }

.op-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.op-table th, .op-table td {
  padding: 12px clamp(12px, 1.65vw, 21px);
  border-top: 1px solid var(--line);
  text-align: left;
}
.op-table th {
  padding-block: 10px;
  background: var(--canvas);
  color: var(--muted);
  font-size: 12px;
  font-weight: 640;
}
.op-table td { color: var(--ink); }
.op-table tr[data-asset] { cursor: pointer; }
.op-table tr[data-asset]:hover, .op-table tr[data-asset]:focus-within { background: #f7fafd; }
.op-item-name {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
}
.op-item-name strong, .op-item-name small { display: block; overflow-wrap: anywhere; }
.op-item-name small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.op-item-icon, .op-agenda-icon, .op-empty-icon {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 37px;
  height: 37px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.op-asset-ip code {
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--canvas);
  color: #465a70;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.op-asset-status { white-space: nowrap; }
.op-row-arrow { float: right; margin-inline-start: 14px; color: var(--muted); }
.op-mobile-label { display: none; }
.op-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #edf1f5;
  color: #485a70;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}
.op-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.op-active, .op-completed { background: #e9f6ee; color: #176542; }
.op-scheduled { background: var(--accent-soft); color: var(--accent-dark); }
.op-maintenance, .op-no_show { background: #fcf1d9; color: #805708; }
.op-retired, .op-cancelled { background: #fae9ed; color: #98374a; }
.op-table-footer { padding: 12px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.op-table .op-empty { height: 155px; text-align: center; color: var(--muted); }
.op-empty .op-empty-icon { display: grid; margin: 0 auto 9px; }

.op-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.op-field { display: grid; align-content: start; gap: 6px; color: var(--ink); font-size: 13px; font-weight: 650; }
.op-field-wide { grid-column: 1 / -1; }
.op-field input, .op-field textarea, .op-field select { min-width: 0; width: 100%; padding: 8px 11px; }
.op-field textarea { resize: vertical; }

.op-calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(222px, 26%);
  gap: 16px;
  align-items: start;
}
.op-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 17px;
}
.op-calendar-header h2, .op-agenda h2 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}
.op-calendar-header h2::first-letter, .op-agenda h2::first-letter { text-transform: uppercase; }
.op-calendar-actions, .op-calendar-step { display: flex; align-items: center; gap: 5px; }
.op-calendar-step { gap: 0; }
.op-calendar-step .op-button:first-child { border-radius: 9px 0 0 9px; }
.op-calendar-step .op-button:last-child { margin-left: -1px; border-radius: 0 9px 9px 0; }
.op-calendar-step .op-button:focus-visible { position: relative; z-index: 1; }
.op-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.op-weekdays {
  padding-block: 9px;
  border-top: 1px solid var(--line);
  background: var(--canvas);
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  font-weight: 620;
}
.op-date {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
  min-height: clamp(73px, 8vw, 95px);
  padding: 7px;
  border: 0;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  font: inherit;
}
.op-date:nth-child(7n) { border-right: 0; }
.op-date:nth-last-child(7) { border-bottom-left-radius: 15px; }
.op-date:last-child { border-bottom-right-radius: 15px; }
.op-date:nth-child(7n), .op-date:nth-child(7n - 1) { background: var(--op-weekend); }
.op-date.op-date-muted { color: #6b7b8f; background: var(--op-weekend); }
.op-date:hover { background: #edf6fc; }
.op-date:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.op-date.op-date-selected { background: var(--accent-soft); box-shadow: inset 0 0 0 1px #8cb8db; }
.op-date-number {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.op-date-today .op-date-number { background: var(--accent); color: #fff; }
.op-date-events { display: grid; gap: 3px; width: 100%; min-width: 0; }
.op-date-meeting {
  display: flex;
  gap: 4px;
  align-items: center;
  min-width: 0;
  padding: 1px 4px;
  border-radius: 4px;
  background: #e6f2fa;
  color: #165986;
  font-size: 11px;
  font-weight: 620;
}
.op-date-meeting::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: none; }
.op-date-meeting span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.op-date-completed { background: #e9f6ee; color: #176542; }
.op-date-cancelled, .op-date-no_show { background: #edf1f5; color: #485a70; }
.op-date small { color: var(--muted); font-size: 10px; }

.op-agenda-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}
.op-agenda-head p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.op-agenda-body { display: grid; gap: 8px; padding: 12px; }
.op-meeting {
  position: relative;
  display: grid;
  justify-items: start;
  gap: 4px;
  padding: 11px 29px 11px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  text-align: left;
}
.op-meeting:hover { background: #f7fafd; border-color: #cadcea; }
.op-meeting strong { color: var(--ink); font-size: 13px; overflow-wrap: anywhere; }
.op-meeting-time { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-dark); font-weight: 700; font-variant-numeric: tabular-nums; }
.op-meeting-arrow { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); }
.op-meeting .op-pill { margin-top: 4px; }
.op-agenda-empty { display: grid; justify-items: center; gap: 9px; padding: 26px 8px; color: var(--muted); font-size: 13px; text-align: center; }

@media (max-width: 1000px) {
  .op-calendar-layout { grid-template-columns: minmax(0, 1fr); }
  .op-agenda-body { grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); }
}
@media (max-width: 640px) {
  .op-screen { gap: 16px; }
  .op-heading { flex-wrap: wrap; gap: 10px; }
  .op-toolbar { gap: 10px; padding: 13px; }
  .op-filters { width: 100%; }
  .op-search { min-width: min(140px, 100%); }
  .op-table, .op-table tbody { display: block; }
  .op-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .op-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; padding: 12px 13px; border-top: 1px solid var(--line); }
  .op-table td { min-width: 0; padding: 0; border: 0; }
  .op-asset-main { grid-column: 1; grid-row: 1; }
  .op-asset-status { grid-column: 2; grid-row: 1; align-self: center; }
  .op-asset-client, .op-asset-ip { min-width: 0; overflow-wrap: anywhere; }
  .op-table .op-asset-client { padding-left: 48px; }
  .op-table .op-row-arrow { display: none; }
  .op-mobile-label { display: block; margin-bottom: 2px; color: var(--muted); font-size: 11px; }
  .op-table .op-empty { display: grid; place-content: center; grid-column: 1 / -1; }
  .op-calendar-header { padding: 11px; }
  .op-calendar-header h2 { font-size: 15px; }
  .op-calendar-actions .op-button { min-height: 34px; }
  .op-calendar-actions .op-icon-button { width: 34px; }
  .op-date { min-height: 51px; padding: 3px; }
  .op-date-number { height: 21px; min-width: 21px; font-size: 12px; }
  .op-date-events { display: flex; align-items: center; gap: 3px; }
  .op-date-meeting { padding: 0; background: none; }
  .op-date-meeting span { display: none; }
  .op-form { grid-template-columns: minmax(0, 1fr); }
}
