
    html, body { font-family: Arial, Helvetica, sans-serif; margin: 0; overflow: hidden; background: #f2f2f2; }

    pre, code, textarea, input, button, select { font-family: inherit; }
    * { font-family: inherit; }
    .app { display: flex; height: 100vh; }
    .sidebar {
      width: 260px;
      border-right: 1px solid #e7e7e7;
      background: #fafafa;
      padding: 12px 10px;
      transition: width 180ms ease;
      overflow: hidden;
      position: sticky;
      top: 0;
      height: 100vh;
    }
    .sidebar.collapsed { width: 56px; padding-left: 8px; padding-right: 8px; }

    .sideTop {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 12px;
    }
    .toggleBtn {
      width: 36px;
      height: 36px;
      border-radius: 10px;
      border: 1px solid #e0e0e0;
      background: #fff;
      cursor: pointer;
      display: grid;
      place-items: center;
      user-select: none;
      flex: 0 0 auto;
    }
    .brand {
      font-weight: 800;
      letter-spacing: 0.2px;
      white-space: nowrap;
    }
    .sidebar.collapsed .brand { display: none; }

    .nav {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    .nav a {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 10px;
      border-radius: 12px;
      text-decoration: none;
      color: #111;
      border: 1px solid transparent;
    }
    .nav a:hover { background: #fff; border-color: #ececec; }
    .nav a.active {
      background: #e6f2ff;
      border-color: #1d4ed8;
      box-shadow: 0 0 0 2px rgba(29,78,216,0.18), 0 1px 0 rgba(0,0,0,0.03);
      color: #0f172a;
    }
    .sidebar.collapsed .nav a.active {
      background: #e6f2ff;
      border-color: #1d4ed8;
      box-shadow: 0 0 0 2px rgba(29,78,216,0.18), 0 1px 0 rgba(0,0,0,0.03);
      color: #0f172a;
    }
    .navIcon { width: 22px; text-align: center; font-size: 16px; }
    .sidebar.collapsed .navLabel { display: none; }
    .navLabel { font-weight: 700; }

    .content { flex: 1; padding: 24px; overflow-y: auto; }

    .row { display: flex; gap: 12px; flex-wrap: wrap; }
    .card { border: 1px solid #ddd; border-radius: 10px; padding: 12px 14px; min-width: 260px; background: #fbfbfb; }
    pre { white-space: pre-wrap; word-break: break-word; background: #f7f7f7; padding: 10px; border-radius: 8px; }
    button { padding: 8px 10px; border-radius: 8px; border: 1px solid #ccc; background: #fff; cursor: pointer; }
    button:disabled { opacity: 0.6; cursor: not-allowed; }
    .cronActionSelect {
      padding: 8px 10px;
      border-radius: 8px;
      border: 1px solid #ccc;
      background: #fff;
      cursor: pointer;
      font-weight: 600;
      position: relative;
      top: 0;
      margin-top: 0;
      transform: translateY(-3px);
    }

    .cronActionWrap { margin-top: -3px; }
    label { display:block; margin: 10px 0 6px; font-weight: 600; }
    input { padding: 8px 10px; width: 320px; max-width: 100%; }
    .muted { color: #666; font-size: 12px; }
    .checkrow { display:flex; align-items:center; gap:6px; font-weight:600; margin-top:10px; }
    #dryRun { margin: 0; }
    #dryRun { width: auto; max-width: none; padding: 0; }
    #cronDryRun { margin: 0; width: auto; max-width: none; padding: 0; }
    input[type="checkbox"] { margin: 0 !important; padding: 0 !important; width: auto !important; max-width: none !important; }
    .checkrow span { margin: 0; white-space: nowrap; }

    .topbar {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 16px;
      margin-bottom: 14px;
      position: relative;
    }
    .topbar h1 { margin: 0; font-size: 24px; text-align: left; }
    .centerTitle {
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
      top: 0;
      font-size: 24px;
      font-weight: 900;
      pointer-events: none;
      white-space: nowrap;
    }
    .pageIcon { margin-right: 10px; }
    .pageLabel { font-weight: 900; margin-right: 8px; }
    .topRight { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
    .refreshRow { display: flex; align-items: center; gap: 10px; }
    .pill {
      padding: 6px 10px;
      border: 1px solid #e6e6e6;
      border-radius: 999px;
      background: #fff;
      font-size: 12px;
      color: #333;
      white-space: nowrap;
    }

    .spinner {
      width: 14px;
      height: 14px;
      display: inline-block;
      vertical-align: middle;
      margin-right: 8px;
      border: 2px solid #d7d7d7;
      border-top-color: #333;
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
    }

    @keyframes spin {
      to { transform: rotate(360deg); }
    }

    .page { display: none; }
    .page.active { display: block; }

    /* Action Centre: make the Restart Services dropdown taller for readability. */
    #acServiceSelect { min-height: 28px; padding: 5px 12px; }

    /* Cron jobs page */
    table.cronTable { width: 100%; border-collapse: collapse; }
    table.cronTable th, table.cronTable td {
      border-bottom: 1px solid #eaeaea;
      padding: 10px 8px;
      vertical-align: top;
      text-align: left;
      font-size: 13px;
    }
    table.cronTable th { font-size: 12px; color: #444; font-weight: 700; }

    /* Nudge the Actions dropdown up to align visually with other columns. */
    table.cronTable td:last-child { padding-top: 7px; }
    table.cronTable th:last-child { padding-top: 7px; }

    .badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 4px 10px;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 700;
      border: 1px solid transparent;
      white-space: nowrap;
    }
    .badge.ok { background: #eafff2; color: #0f6a2f; border-color: #b9f5ce; }
    .badge.fail { background: #ffecec; color: #8b1a1a; border-color: #ffc7c7; }
    .badge.warn { background: #fff6df; color: #7a5a00; border-color: #ffe6a8; }
    .badge.neutral { background: #f4f4f4; color: #333; border-color: #e2e2e2; }

    .modalBackdrop {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.35);
      display: none;
      align-items: center;
      justify-content: center;
      padding: 18px;
      z-index: 50;
    }
    .modalBackdrop.active { display: flex; padding: 0; }

    /* Force perfect vertical centering (especially for the first modal shown). */
    .modalBackdrop.active .modal {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      margin: 0;
    }
    .modal {
      width: min(980px, 100%);
      max-height: 82vh;
      overflow: auto;
      background: #fff;
      border-radius: 14px;
      border: 1px solid #e6e6e6;
      box-shadow: 0 10px 24px rgba(0,0,0,0.12);
      margin: auto;
      align-self: center;
    }
    .modalHeader {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
      padding: 12px 14px;
      border-bottom: 1px solid #ededed;
      position: sticky;
      top: 0;
      background: #fff;
      z-index: 1;
    }
    .modalTitle { font-weight: 900; }
    .modalBody { padding: 12px 14px; }

    pre.code {
      background: #f7f7f7;
      border: 1px solid #ededed;
      padding: 12px;
      border-radius: 10px;
      white-space: pre-wrap;
      word-break: break-word;
      max-height: 56vh;
      overflow: auto;
      font-size: 12px;
      margin: 0;
    }
  
