.cron-view {
  container: cron / inline-size;
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding-top: 28px;
  padding-bottom: 20px;
}
.cron-view [hidden] { display: none !important; }
.cron-view h1 { margin: 0; font: 800 28px/1.3 Manrope, sans-serif; letter-spacing: -.6px; }
.cron-view-heading, .cron-dialog header { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.cron-view-heading p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.cron-time-zone { margin: 20px 0 0; color: #777180; font-size: 12px; line-height: 1.6; }
.cron-time-zone strong { color: #5d526f; font-weight: 600; }
.cron-content { min-height: 0; overflow-y: auto; scrollbar-gutter: stable; padding: 0 4px 12px 0; overscroll-behavior-y: contain; }
.cron-content > section:empty { display: none; }
.cron-section-heading { display: flex; align-items: center; margin: 26px 0 12px; }
.cron-section-heading h2 { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 16px; font-weight: 700; }
.cron-count { padding: 2px 7px; border-radius: 6px; background: #eeebf5; color: #77668f; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cron-note { margin: -3px 0 14px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.cron-table-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.cron-table { width: 100%; border-collapse: collapse; table-layout: fixed; text-align: left; font-size: 13px; line-height: 1.5; }
.cron-col-name { width: 23%; }
.cron-col-schedule { width: 19%; }
.cron-col-next { width: 18%; }
.cron-col-result { width: 26%; }
.cron-col-actions { width: 14%; }
.cron-table thead { background: #f5f4f9; color: #847b91; }
.cron-table thead th { padding: 13px 18px; font-size: 11px; font-weight: 700; }
.cron-table tbody th, .cron-table td { padding: 19px 18px; vertical-align: top; font-weight: 400; overflow-wrap: anywhere; border-top: 1px solid var(--line); }
.cron-table tbody tr:hover { background: #fcfbff; }
.cron-row small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.5; font-weight: 400; }
.cron-row .cron-project { color: #77658e; font-weight: 500; }
.cron-view button { min-height: 36px; padding: 8px 12px; border: 1px solid #e3dfea; border-radius: 8px; background: var(--panel); color: #625a70; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s; }
.cron-view button:hover:not(:disabled) { border-color: #c6b9e5; background: #f6f3fd; color: #6044b3; }
.cron-view :is(button, input, select, textarea):focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; }
.cron-view button:disabled { opacity: .45; cursor: default; }
.cron-view .cron-primary { background: var(--purple); color: #fff; border-color: var(--purple); }
.cron-view .cron-primary:hover:not(:disabled) { background: #6345d6; color: #fff; border-color: #6345d6; }
.cron-view .cron-title { min-height: 0; padding: 0; border: 0; border-radius: 3px; background: none; color: var(--ink); font-size: 13px; line-height: 1.6; font-weight: 700; text-align: left; overflow-wrap: anywhere; }
.cron-view .cron-title:hover:not(:disabled) { background: none; color: #6345c9; text-decoration: underline; text-underline-offset: 3px; }
.cron-name { font-size: 13px; font-weight: 600; }
.cron-schedule { font-weight: 500; }
.cron-next-time { display: flex; flex-direction: column; gap: 3px; font-variant-numeric: tabular-nums; }
.cron-next-time strong { color: #41364f; font-size: 17px; line-height: 1.3; font-weight: 700; }
.cron-next-time span { color: #72697e; font-size: 11px; }
.cron-row .cron-relative { color: #856da5; }
.cron-next-muted { color: #8c8494; }
.cron-state { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 8px; border-radius: 6px; background: #f0eef4; color: #736c7e; font-size: 11px; font-weight: 600; }
.cron-state::before { content: ''; flex: none; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.cron-state:is([data-state="failed"], [data-state="unknown"], [data-state="attention"], [data-state="blocked"]) { color: #a34436; background: #fff0e9; }
.cron-state:is([data-state="completed"], [data-state="current"]) { color: #278163; background: #eaf7f0; }
.cron-state:is([data-state="active"], [data-state="running"], [data-state="dispatching"], [data-state="planning"], [data-state="working"], [data-state="verifying"]) { color: #6e4bc3; background: #f0eaff; }
.cron-state:is([data-state="scheduled"], [data-state="queued"]) { color: #59789a; background: #edf3fa; }
.cron-result { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 8px 0 0; color: #746a80; font-size: 11px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.cron-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.cron-row .cron-actions { align-items: stretch; flex-direction: column; gap: 6px; }
.cron-row .cron-actions button { width: 100%; padding: 6px 9px; min-height: 32px; }
.cron-view .cron-stop { color: #aa4b43; }
.cron-empty { margin: 0; padding: 28px; border: 1px dashed #ded8e9; border-radius: 12px; color: var(--muted); background: #fbfafd; font-size: 13px; line-height: 1.7; }
.cron-view [data-status]:empty { display: none; }
.cron-view [data-status], .cron-view [data-form-status] { color: #a6332a; font-size: 13px; line-height: 1.5; }
.cron-dialog { width: min(780px, calc(100vw - 30px)); max-height: 90dvh; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); color: var(--ink); }
.cron-dialog::backdrop { background: #181b3866; }
.cron-dialog form { padding: 0; gap: 0; }
.cron-dialog h2 { margin: 0; font-size: 20px; }
.cron-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0; }
.cron-fields label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.cron-fields input:not([type="checkbox"]), .cron-fields select, .cron-fields textarea { width: 100%; min-width: 0; padding: 10px; border: 1px solid #ddd8e6; border-radius: 7px; background: var(--panel); color: inherit; font: inherit; }
.cron-fields textarea { resize: vertical; }
.cron-wide { grid-column: 1/-1; }
.cron-fields .cron-checkbox { flex-direction: row; align-items: center; }
.cron-weekdays { display: flex; min-width: 0; flex-wrap: wrap; gap: 15px; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.cron-weekdays label { flex-direction: row; align-items: center; }
.cron-fields .cron-note { margin: 0; }
.cron-fields small { color: var(--muted); font-weight: 400; }
.cron-dialog footer { display: flex; justify-content: flex-end; }
.cron-history { margin-top: 24px; padding-top: 12px; border-top: 1px solid var(--line); }
.cron-run { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.cron-run p { white-space: pre-wrap; overflow-wrap: anywhere; }
.cron-run small { color: var(--muted); }
@container cron (max-width: 960px) {
  .cron-table colgroup, .cron-table thead { display: none; }
  .cron-table, .cron-table tbody { display: block; }
  .cron-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 18px; gap: 18px 24px; }
  .cron-table tr + tr { border-top: 1px solid var(--line); }
  .cron-table tbody th, .cron-table td { display: block; padding: 0; border: 0; }
  .cron-table tbody th, .cron-table td:last-child { grid-column: 1/-1; }
  .cron-table td::before { content: attr(data-label); display: block; margin-bottom: 7px; color: #8b8198; font-size: 10px; font-weight: 600; }
  .cron-row .cron-actions { flex-direction: row; flex-wrap: wrap; }
  .cron-row .cron-actions button { width: auto; min-height: 38px; }
}
@container cron (max-width: 520px) {
  .cron-view-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
  .cron-view-heading > .cron-actions { width: 100%; }
  .cron-view-heading > .cron-actions button { flex: 1; min-height: 42px; }
  .cron-table tr { padding: 16px; gap: 18px 16px; }
  .cron-table td[data-label="Status & last result"] { grid-column: 1/-1; }
  .cron-row .cron-actions button { min-height: 42px; }
  .cron-note { font-size: 11px; }
  .cron-section-heading { margin-top: 22px; }
  .cron-time-zone { margin-top: 16px; font-size: 11px; }
}
@media (max-width: 600px) {
  .cron-view { padding-top: 22px; }
  .cron-view h1 { font-size: 24px; }
  .cron-fields { grid-template-columns: minmax(0, 1fr); }
  .cron-wide { grid-column: auto; }
  .cron-dialog { padding: 18px; }
}

.cron-model-notice { margin-top: 10px; overflow-wrap: anywhere; }
.cron-model-notice p { margin: 5px 0 0; font-size: 12px; line-height: 1.5; }
.cron-state[data-state="new-models"] { color: #6e4bc3; background: #f0eaff; }
