.scheduled-sidebar-item {
  min-width: 0;
  min-height: 44px;
  display: grid;
  grid-template-columns: minmax(0,1fr) 25px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
}

.scheduled-sidebar-row {
  min-width: 0;
  min-height: 42px;
  display: grid;
  grid-template-columns: 12px minmax(0,1fr);
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  padding: 5px 4px 5px 9px;
  color: #43566d;
  background: transparent;
  text-align: left;
  transition: color .12s ease, background .12s ease, box-shadow .12s ease;
}

.scheduled-sidebar-row:hover { color: #2d4257; background: #eef2f5; }
.scheduled-sidebar-row.active { color: #223a51; border-radius: 5px; background: #fff; box-shadow: 0 2px 7px rgba(30,52,82,.07); }
.scheduled-sidebar-row > span,.scheduled-sidebar-row strong,.scheduled-sidebar-row small { min-width: 0; display: block; }
.scheduled-sidebar-row strong { overflow: hidden; color: inherit; font-size: 11px; font-weight: 570; text-overflow: ellipsis; white-space: nowrap; }
.scheduled-sidebar-row small { margin-top: 3px; overflow: hidden; color: #8a98a9; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.scheduled-sidebar-status { width: 7px; height: 7px; justify-self: center; border: 1px solid #99a9b8; border-radius: 50%; background: transparent; }
.scheduled-sidebar-status.running { border-color: #63889e; border-top-color: transparent; animation: scheduled-spin .8s linear infinite; }
.scheduled-sidebar-status.success { border-color: #8296a8; background: #8296a8; box-shadow: 0 0 0 3px rgba(130,150,168,.1); }
.scheduled-sidebar-status.disabled { width: 8px; height: 2px; border: 0; border-radius: 2px; background: #a5b1bd; }
.scheduled-sidebar-status.failed { border-color: #b77e8f; background: #b77e8f; }
.scheduled-sidebar-status.action_required { border-color: #bd945e; background: #bd945e; }
.scheduled-sidebar-delete { width: 24px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 6px; padding: 0; color: #98a4b1; background: transparent; font-size: 14px; line-height: 1; opacity: 0; transition: opacity .12s ease, color .12s ease, background .12s ease; }
.scheduled-sidebar-item:hover .scheduled-sidebar-delete,.scheduled-sidebar-delete:focus-visible { opacity: 1; }
.scheduled-sidebar-delete:hover { color: #9f5f70; background: #f7eef1; }

.scheduled-sidebar-loading,.scheduled-sidebar-empty {
  min-height: 118px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  margin: 8px 2px;
  border: 1px dashed #dce5ed;
  border-radius: 10px;
  padding: 15px;
  color: #8997a7;
  background: rgba(255,255,255,.45);
  text-align: center;
}
.scheduled-sidebar-loading { grid-template-columns: 14px auto; min-height: 54px; }
.scheduled-sidebar-loading i { width: 12px; height: 12px; border: 1.5px solid #d0dbe4; border-top-color: #647f94; border-radius: 50%; animation: scheduled-spin .8s linear infinite; }
.scheduled-sidebar-loading span { font-size: 9px; }
.scheduled-sidebar-empty > i { color: #778ca0; font-size: 18px; font-style: normal; }
.scheduled-sidebar-empty strong { color: #5c6f82; font-size: 10px; }
.scheduled-sidebar-empty small { max-width: 175px; color: #919dac; font-size: 8px; line-height: 1.55; }

.scheduled-conversation-bar {
  min-width: 0;
  min-height: 47px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #e1e8ef;
  padding: 6px 18px;
  background: linear-gradient(96deg,rgba(236,245,249,.92),rgba(246,247,251,.82) 62%,rgba(255,255,255,.9));
}
.scheduled-conversation-bar[hidden] { display: none !important; }
.scheduled-conversation-bar > div { min-width: 0; display: grid; grid-template-columns: auto minmax(0,1fr); align-items: baseline; gap: 2px 9px; }
.scheduled-conversation-bar > div > span { color: #74879a; font-size: 8px; font-weight: 720; letter-spacing: .08em; }
.scheduled-conversation-bar > div > strong { min-width: 0; overflow: hidden; color: #2c425a; font-size: 11px; font-weight: 640; text-overflow: ellipsis; white-space: nowrap; }
.scheduled-conversation-bar > div > small { grid-column: 2; overflow: hidden; color: #8795a5; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.scheduled-conversation-bar nav { flex: 0 0 auto; display: flex; align-items: center; gap: 5px; }
.scheduled-conversation-bar button { height: 28px; border: 1px solid #d7e1e9; border-radius: 6px; padding: 0 8px; color: #53687d; background: rgba(255,255,255,.84); font-size: 9px; white-space: nowrap; transition: border-color .13s ease,color .13s ease,background .13s ease; }
.scheduled-conversation-bar button:hover:not(:disabled) { border-color: #bdcfdb; color: #294d64; background: #fff; }
.scheduled-conversation-bar button:disabled { cursor: default; opacity: .5; }
.scheduled-conversation-bar #scheduledConversationRun { color: #fff; border-color: #263b5e; background: #263b5e; }

.scheduled-tasks-dialog,
.scheduled-editor-dialog,
.scheduled-runs-dialog,
.scheduled-delete-dialog {
  border: 1px solid #dfe6ee;
  border-radius: 18px;
  padding: 0;
  color: #253851;
  background: #f8fafc;
  box-shadow: 0 30px 90px rgba(7, 22, 47, .25);
  scrollbar-gutter: auto;
  overflow-x: hidden;
}

.scheduled-tasks-dialog { width: min(1080px, calc(100vw - 44px)); max-height: min(820px, calc(100dvh - 44px)); overflow: hidden; }
.scheduled-editor-dialog { width: min(680px, calc(100vw - 36px)); max-height: min(820px, calc(100dvh - 36px)); overflow: hidden; }
.scheduled-runs-dialog { width: min(760px, calc(100vw - 36px)); max-height: min(760px, calc(100dvh - 36px)); overflow: hidden; }
.scheduled-delete-dialog { width: min(460px, calc(100vw - 36px)); }

.scheduled-tasks-dialog::backdrop,
.scheduled-editor-dialog::backdrop,
.scheduled-runs-dialog::backdrop,
.scheduled-delete-dialog::backdrop { background: rgba(7, 18, 40, .48); backdrop-filter: blur(7px); }

.scheduled-head { position: relative; }
.scheduled-head::after { content: ""; position: absolute; right: 74px; bottom: 0; width: 220px; height: 1px; background: linear-gradient(90deg, transparent, rgba(83,192,214,.62), transparent); }

.scheduled-scope-bar { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(150px, .55fr) minmax(300px, 1.65fr); align-items: center; gap: 18px; margin: 18px 22px 0; border: 1px solid #dde6ef; border-radius: 13px; padding: 14px 16px; background: linear-gradient(135deg, #f6fbfe, #f8f8fd); }
.scheduled-scope-bar div { min-width: 0; }
.scheduled-scope-bar span { display: block; color: #8492a4; font-size: 9px; font-weight: 700; letter-spacing: .04em; }
.scheduled-scope-bar strong { display: block; margin-top: 5px; overflow: hidden; color: #1c3555; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.scheduled-scope-bar p { margin: 0; border-left: 1px solid #dae4ee; padding-left: 18px; color: #64758a; font-size: 10px; line-height: 1.65; }

.scheduled-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 22px 14px; }
.scheduled-toolbar > div strong,.scheduled-toolbar > div small { display: block; }
.scheduled-toolbar > div strong { color: #1a304f; font-size: 15px; }
.scheduled-toolbar > div small { margin-top: 5px; color: #8a96a7; font-size: 9px; }
.scheduled-toolbar > span { display: flex; gap: 8px; }
.scheduled-toolbar button,
.scheduled-task-card button,
.scheduled-task-form footer button,
.scheduled-delete-dialog footer button { min-height: 34px; border: 1px solid #d8e3ed; border-radius: 9px; padding: 0 13px; color: #53677a; background: #fff; font-size: 10px; font-weight: 670; transition: .17s ease; }
.scheduled-toolbar button:hover:not(:disabled),
.scheduled-task-card button:hover:not(:disabled),
.scheduled-task-form footer button:hover:not(:disabled),
.scheduled-delete-dialog footer button:hover:not(:disabled) { transform: translateY(-1px); border-color: #a9bfd2; box-shadow: 0 6px 15px rgba(32,61,91,.08); }
.scheduled-toolbar button.primary,
.scheduled-task-form footer button.primary { border-color: #101c38; color: #fff; background: linear-gradient(135deg, #16385e, #101c38 66%, #343471); box-shadow: 0 7px 16px rgba(14,36,66,.14); }
.scheduled-toolbar button:disabled,.scheduled-task-card button:disabled,.scheduled-task-form button:disabled { cursor: wait; opacity: .5; transform: none; }

.scheduled-task-list { min-height: 330px; max-height: min(570px, calc(100dvh - 275px)); display: grid; align-content: start; gap: 11px; overflow: auto; overscroll-behavior: contain; padding: 0 22px 22px; }
.pretty-scroll { scrollbar-width: thin; scrollbar-color: rgba(105,133,157,.55) transparent; scrollbar-gutter: stable; }
.pretty-scroll::-webkit-scrollbar { width: 9px; height: 9px; }
.pretty-scroll::-webkit-scrollbar-track { background: transparent; }
.pretty-scroll::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 99px; background: rgba(105,133,157,.55); background-clip: padding-box; }
.pretty-scroll::-webkit-scrollbar-thumb:hover { background: rgba(75,105,132,.78); background-clip: padding-box; }

.scheduled-task-card { position: relative; display: grid; grid-template-columns: minmax(0,1.4fr) minmax(160px,.6fr) minmax(160px,.65fr); gap: 17px; border: 1px solid #dfe7ef; border-radius: 14px; padding: 17px 17px 14px; overflow: hidden; background: rgba(255,255,255,.9); box-shadow: 0 8px 24px rgba(24,51,80,.045); }
.scheduled-task-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: #7585b9; }
.scheduled-task-card.is-running::before { background: #53c0d6; box-shadow: 0 0 14px rgba(83,192,214,.55); }
.scheduled-task-card.is-failed::before { background: #d96a74; }
.scheduled-task-card.is-disabled::before { background: #aeb8c4; }
.scheduled-task-card.is-action::before { background: #d39854; }
.scheduled-card-main { min-width: 0; }
.scheduled-card-title { display: flex; align-items: center; gap: 8px; }
.scheduled-card-title strong { min-width: 0; overflow: hidden; color: #172e4d; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.scheduled-status { flex: none; display: inline-flex; align-items: center; min-height: 21px; border: 1px solid #d8e2eb; border-radius: 99px; padding: 0 8px; color: #60758a; background: #f6f9fc; font-size: 8px; font-weight: 760; }
.scheduled-status.running { border-color: rgba(83,192,214,.38); color: #247b91; background: rgba(83,192,214,.1); }
.scheduled-status.success { border-color: rgba(83,136,190,.28); color: #315f8c; background: rgba(83,136,190,.08); }
.scheduled-status.failed { border-color: rgba(217,106,116,.28); color: #a24350; background: rgba(217,106,116,.08); }
.scheduled-status.disabled { color: #7f8b99; background: #f1f3f6; }
.scheduled-status.action_required { border-color: rgba(211,152,84,.3); color: #976321; background: rgba(211,152,84,.1); }
.scheduled-goal { display: -webkit-box; margin: 9px 0 0; overflow: hidden; color: #5f7084; font-size: 10px; line-height: 1.6; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.scheduled-card-scope { display: flex; gap: 7px; margin-top: 10px; flex-wrap: wrap; }
.scheduled-card-scope span { border-radius: 6px; padding: 4px 7px; color: #6c7d91; background: #f1f5f9; font-size: 8px; }
.scheduled-card-metric { min-width: 0; border-left: 1px solid #e6ebf1; padding-left: 16px; }
.scheduled-card-metric span,.scheduled-card-metric strong,.scheduled-card-metric small { display: block; }
.scheduled-card-metric span { color: #8c98a8; font-size: 8px; font-weight: 680; }
.scheduled-card-metric strong { margin-top: 7px; color: #29415e; font-size: 10px; line-height: 1.45; }
.scheduled-card-metric small { margin-top: 7px; overflow: hidden; color: #8491a1; font-size: 8px; line-height: 1.45; text-overflow: ellipsis; }
.scheduled-card-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 7px; border-top: 1px solid #edf1f5; padding-top: 11px; }
.scheduled-card-actions button { min-height: 29px; padding: 0 10px; font-size: 9px; }
.scheduled-card-actions button.run { border-color: rgba(65,122,173,.28); color: #315f8c; background: #f4f8fc; }
.scheduled-card-actions button.danger,.scheduled-delete-dialog button.danger { border-color: rgba(206,91,103,.28); color: #a13e4a; background: #fff7f8; }

.scheduled-empty,.scheduled-loading { min-height: 290px; display: grid; place-items: center; align-content: center; gap: 9px; border: 1px dashed #d6e0e9; border-radius: 14px; color: #8794a5; background: rgba(255,255,255,.48); text-align: center; }
.scheduled-empty i { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid #d8e4ed; border-radius: 15px; color: #537b9b; background: linear-gradient(145deg,#fff,#f1f7fb); font-size: 22px; font-style: normal; }
.scheduled-empty strong { color: #38516d; font-size: 12px; }
.scheduled-empty small { max-width: 360px; font-size: 9px; line-height: 1.65; }
.scheduled-loading i { width: 22px; height: 22px; border: 2px solid #d7e2eb; border-top-color: #536aa2; border-radius: 50%; animation: scheduled-spin .72s linear infinite; }
@keyframes scheduled-spin { to { transform: rotate(360deg); } }

.scheduled-error { margin: 0 22px 13px; border: 1px solid rgba(208,91,104,.25); border-radius: 9px; padding: 10px 12px; color: #a14350; background: rgba(208,91,104,.07); font-size: 9px; line-height: 1.55; }
.scheduled-task-form { max-height: calc(100dvh - 120px); display: grid; gap: 15px; overflow: auto; padding: 21px 24px 23px; }
.scheduled-automation-fields,.scheduled-automation-fields > div { display: grid; gap: 12px; min-width: 0; }
.scheduled-task-form [hidden] { display: none !important; }
.scheduled-automation-fields { border: 1px solid #dce5ef; border-radius: 12px; padding: 14px; background: linear-gradient(135deg,#f3f8fc,#f7f6fc); }
.scheduled-automation-fields label { display: grid; gap: 6px; min-width: 0; color: #53677f; font-size: 11px; }
.scheduled-automation-fields input,.scheduled-automation-fields select,.scheduled-automation-fields textarea { box-sizing: border-box; width: 100%; min-width: 0; }
.scheduled-operation-note,.scheduled-automation-fields small { margin: 0; color: #73849b; font-size: 10px; line-height: 1.7; overflow-wrap: anywhere; }
.scheduled-automation-fields .scheduled-check { display: flex; align-items: flex-start; gap: 8px; line-height: 1.65; }
.scheduled-check input { width: 15px; flex: 0 0 15px; margin-top: 2px; accent-color: #445e8c; }
.scheduled-capability-search { display: flex !important; gap: 8px; }
.scheduled-automation-fields button { border: 1px solid #d6e1ee; border-radius: 8px; background: #fff; color: #425d80; min-height: 32px; padding: 6px 10px; font-size: 11px; }
.scheduled-capability-search button { flex-shrink: 0; }
.scheduled-automation-fields details { font-size: 10px; line-height: 1.7; color: #637792; }
.scheduled-automation-fields details label { margin-top: 8px; }
.scheduled-authorization-preview { border: 1px solid #cbd8eb; border-radius: 12px; padding: 14px; background: #f3f6fc; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.scheduled-authorization-preview h3 { margin: 0 0 8px; font-size: 13px; }
.scheduled-authorization-details { max-height: 320px; overflow: auto; margin: 8px 0; }
.scheduled-authorization-details dl { margin: 0; }
.scheduled-authorization-details dl > div { display: grid; grid-template-columns: minmax(90px, 30%) minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid #dce5ef; }
.scheduled-authorization-details dt { color: #637792; }
.scheduled-authorization-details dd { margin: 0; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.scheduled-task-form footer { position: sticky; bottom: -23px; z-index: 1; background: #f8fafc; padding-top: 12px; padding-bottom: 12px; }
.scheduled-status.submitted { color: #596d9a; background: #f0f3fc; border-color: #ccd7ec; }
.scheduled-status.partial_success { color: #996334; background: #fcf7f1; }
.scheduled-status.skipped { color: #78869b; background: #f3f5f8; }
@media (max-width: 480px) { .scheduled-automation-fields .scheduled-form-grid { grid-template-columns: minmax(0,1fr); } .scheduled-capability-search { flex-wrap: wrap; } }
@media (prefers-reduced-motion: reduce) { .scheduled-sidebar-status.running,.scheduled-loading i { animation: none; } }
.scheduled-task-form > label,.scheduled-form-grid label { display: grid; gap: 7px; color: #526378; font-size: 10px; font-weight: 660; }
.scheduled-task-form label > span b,.scheduled-task-form legend b { color: #bf5965; }
.scheduled-task-form input,.scheduled-task-form textarea,.scheduled-task-form select { width: 100%; border: 1px solid #d8e3ed; border-radius: 9px; outline: none; padding: 10px 11px; color: #263a56; background: #fbfcfe; font-size: 11px; transition: .16s ease; }
.scheduled-task-form input:focus,.scheduled-task-form textarea:focus,.scheduled-task-form select:focus { border-color: rgba(83,192,214,.82); background: #fff; box-shadow: 0 0 0 3px rgba(83,192,214,.09); }
.scheduled-task-form input[readonly] { color: #64758b; background: #f1f5f9; }
.scheduled-task-form textarea { resize: vertical; min-height: 116px; line-height: 1.65; }
.scheduled-task-form label > small { color: #8995a5; font-size: 8px; font-weight: 500; line-height: 1.55; }
.scheduled-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.scheduled-task-form fieldset { margin: 0; border: 1px solid #dfe7ee; border-radius: 10px; padding: 11px 12px 12px; }
.scheduled-task-form legend { color: #526378; font-size: 9px; font-weight: 680; }
.scheduled-task-form fieldset div { display: grid; grid-template-columns: repeat(7,1fr); gap: 7px; }
.scheduled-task-form fieldset label { display: flex; align-items: center; justify-content: center; gap: 5px; border: 1px solid #dde5ed; border-radius: 8px; padding: 8px 4px; color: #657589; background: #fff; font-size: 9px; cursor: pointer; }
.scheduled-task-form fieldset input { width: 13px; height: 13px; margin: 0; padding: 0; accent-color: #485b95; }
.scheduled-enabled { grid-template-columns: 1fr auto !important; align-items: center; border: 1px solid #dde6ef; border-radius: 11px; padding: 12px 13px; background: #f6f9fc; }
.scheduled-enabled span strong,.scheduled-enabled span small { display: block; }
.scheduled-enabled span small { margin-top: 4px; color: #8794a5; font-size: 8px; font-weight: 500; }
.scheduled-enabled > input { width: 17px; height: 17px; accent-color: #485b95; }
.scheduled-task-form .scheduled-error { margin: 0; }
.scheduled-task-form footer,.scheduled-delete-dialog footer { display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid #e4eaf0; padding-top: 15px; }
.scheduled-delete-dialog .dialog-intro { margin: 20px 23px; line-height: 1.7; }
.scheduled-delete-dialog > footer { padding: 0 23px 21px; }

.scheduled-run-list { max-height: min(590px, calc(100dvh - 180px)); display: grid; gap: 9px; overflow: auto; padding: 4px 22px 22px; }
.scheduled-run-row { display: grid; grid-template-columns: 122px 110px minmax(0,1fr); gap: 13px; align-items: start; border: 1px solid #dfe7ef; border-radius: 12px; padding: 13px 14px; background: #fff; }
.scheduled-run-row > span,.scheduled-run-row > div strong,.scheduled-run-row > div small { display: block; }
.scheduled-run-row > span { color: #778699; font-size: 9px; line-height: 1.55; }
.scheduled-run-row > span b { display: block; margin-bottom: 5px; color: #40566f; font-size: 9px; }
.scheduled-run-row > div strong { color: #334b67; font-size: 9px; }
.scheduled-run-row > div small { margin-top: 6px; color: #6e7e90; font-size: 9px; line-height: 1.65; overflow-wrap: anywhere; }
.scheduled-run-row button { margin-top: 8px; border: 0; padding: 0; color: #3f6990; background: transparent; font-size: 8px; }

@media (max-width: 780px) {
  .scheduled-conversation-bar { align-items: flex-start; padding: 7px 10px; }
  .scheduled-conversation-bar > div { grid-template-columns: 1fr; }
  .scheduled-conversation-bar > div > small { grid-column: 1; }
  .scheduled-conversation-bar nav { max-width: 48%; overflow-x: auto; padding-bottom: 2px; }
  .scheduled-tasks-dialog { width: calc(100vw - 18px); max-height: calc(100dvh - 18px); }
  .scheduled-scope-bar { grid-template-columns: 1fr 1fr; }
  .scheduled-scope-bar p { grid-column: 1 / -1; border-top: 1px solid #dae4ee; border-left: 0; padding: 11px 0 0; }
  .scheduled-task-card { grid-template-columns: 1fr 1fr; }
  .scheduled-card-main { grid-column: 1 / -1; }
  .scheduled-card-metric { border-left: 0; border-top: 1px solid #e6ebf1; padding: 11px 0 0; }
  .scheduled-card-actions { justify-content: flex-start; overflow-x: auto; }
  .scheduled-run-row { grid-template-columns: 1fr 1fr; }
  .scheduled-run-row > div { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .scheduled-toolbar { align-items: flex-start; }
  .scheduled-toolbar > span { flex-direction: column-reverse; }
  .scheduled-form-grid { grid-template-columns: 1fr; }
  .scheduled-task-form fieldset div { grid-template-columns: repeat(4,1fr); }
  .scheduled-task-card { grid-template-columns: 1fr; }
  .scheduled-card-metric { grid-column: 1; }
  .scheduled-card-actions { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .scheduled-loading i { animation-duration: 1.5s; }
  .scheduled-toolbar button,.scheduled-task-card button { transition: none; }
}
