/* schedules.css — schedules panel, table, results, status badges */

  /* Schedules panel */
  .schedules-panel { flex: 1; overflow: hidden; padding: 16px; display: none; flex-direction: column; gap: 12px; min-height: 0; }
  .schedules-panel.active { display: flex; }
  .schedules-tabs { flex-shrink: 0; display: flex; gap: 4px; border-bottom: 1px solid var(--border); }
  .schedules-tab { background: transparent; border: none; border-bottom: 2px solid transparent; color: var(--text); opacity: 0.7; padding: 8px 16px; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; transition: all 0.15s ease; }
  .schedules-tab:hover { opacity: 1; color: var(--accent); }
  .schedules-tab.active { opacity: 1; color: var(--accent); border-bottom-color: var(--accent); }
  .schedules-tab-content { flex: 1; min-height: 0; display: none; flex-direction: column; overflow: hidden; }
  .schedules-tab-content.active { display: flex; }
  #schedulesJobsTab { overflow-y: auto; }
  #schedulesJobs { display: flex; flex-direction: column; gap: 8px; }
  .schedules-results-wrap { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
  .schedules-results-wrap .schedules-section-title { flex-shrink: 0; }
  .schedules-results-scroll { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 8px; }
  .schedules-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; table-layout: fixed; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border); }
  .schedules-table col.col-name { width: 15%; }
  .schedules-table col.col-channel { width: 11%; }
  .schedules-table col.col-owner { width: 7%; }
  .schedules-table col.col-status { width: 10%; }
  .schedules-table col.col-schedule { width: 16%; }
  .schedules-table col.col-agent { width: 8%; }
  .schedules-table col.col-runs { width: 5%; }
  .schedules-table col.col-nextrun { width: 16%; }
  .schedules-table col.col-created { width: 9%; }
  .schedules-table th { background: var(--bg); color: var(--accent); text-transform: uppercase; font-size: 12px; font-weight: 600; letter-spacing: 0.5px; padding: 8px 12px; text-align: left; border-bottom: 2px solid var(--border); cursor: pointer; user-select: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .schedules-table th:hover { background: var(--surface2); }
  .schedules-table th::after { content: ' \2195'; opacity: 0.3; font-size: 9px; }
  .schedules-table th.sort-asc::after { content: ' \25B2'; opacity: 0.8; }
  .schedules-table th.sort-desc::after { content: ' \25BC'; opacity: 0.8; }
  .schedules-table th.sort-asc, .schedules-table th.sort-desc { color: var(--strong); }
  .schedules-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .schedules-table .data-row { cursor: pointer; }
  .schedules-table .data-row:hover { background: var(--surface); }
  .schedules-table .prompt-row { display: none; }
  .schedules-table .prompt-row.visible { display: table-row; }
  .schedules-table .prompt-row td { padding: 12px 16px; background: var(--surface); white-space: pre-wrap; word-break: break-word; font-size: 13px; color: var(--text); opacity: 0.8; line-height: 1.5; }
  .status-badge { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 12px; font-weight: 600; text-transform: uppercase; }
  .status-badge.active { background: rgba(95,182,72,0.15); color: var(--success); }
  .status-badge.paused { background: rgba(255,167,38,0.15); color: var(--error); }
  .toggle-switch { position: relative; display: inline-block; width: 36px; height: 20px; vertical-align: middle; margin-left: 8px; }
  .toggle-switch input { opacity: 0; width: 0; height: 0; }
  .toggle-switch .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: var(--border); border-radius: 20px; transition: background 0.2s; }
  .toggle-switch .slider::before { content: ''; position: absolute; height: 14px; width: 14px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: transform 0.2s; }
  .toggle-switch input:checked + .slider { background: var(--success); }
  .toggle-switch input:checked + .slider::before { transform: translateX(16px); }
  .channel-badge { display: inline-block; padding: 2px 6px; border-radius: 3px; font-size: 12px; font-weight: 600; text-transform: uppercase; }
  .channel-badge.web { background: rgba(255,39,42,0.12); color: var(--accent); }
  .channel-badge.telegram { background: rgba(42,171,238,0.15); color: #2AABEE; }
  .channel-badge.intercom { background: rgba(40,110,250,0.15); color: #286efa; }
  .countdown { color: var(--accent); font-variant-numeric: tabular-nums; display: inline-block; min-width: 70px; text-align: left; }
  .channel-id { font-size: 11px; color: var(--text-dim); display: block; margin-top: 2px; }
  .schedule-result { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px 16px; box-shadow: var(--shadow-sm); }
  .schedule-result .result-header { font-size: 13px; color: var(--text); opacity: 0.75; margin-bottom: 8px; display: flex; justify-content: space-between; }
  .schedule-result .result-body { font-size: 15px; line-height: 1.6; }
  .schedule-result .result-body ul, .schedule-result .result-body ol { padding-left: 20px; margin: 6px 0; }
  .schedule-result .result-body li { margin: 3px 0; }
  .schedule-result .result-body p { margin: 6px 0; }
  .schedule-result .result-body p:first-child { margin-top: 0; }
  .schedule-result .result-body p:last-child { margin-bottom: 0; }
  .schedule-result .result-body strong { color: var(--strong); }
  .schedule-result .result-body em { color: var(--em); }
  .schedule-result .result-body code { background: var(--bg); padding: 2px 5px; border-radius: 3px; font-size: 13px; font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace; }
  .schedule-result .result-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
  .schedule-result .result-body blockquote { border-left: 3px solid var(--accent); padding-left: 10px; margin: 6px 0; color: var(--text-dim); }
  .schedules-section-title { font-size: 14px; font-weight: 600; color: var(--text); opacity: 0.7; text-transform: uppercase; letter-spacing: 1px; }
  .schedules-empty { font-size: 14px; color: var(--text); opacity: 0.6; text-align: center; padding: 24px; }
  .tab-active { color: var(--accent) !important; border-color: var(--accent) !important; background: var(--accent-subtle) !important; font-weight: 700 !important; }
